gdbserver: Suffix generated C files with -generated
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * .gitignore: Remove generated files, replace with wildcard.
4 * (clean): Replace removal of generated files with wildcard.
5 (version.c): Replace with...
6 (version-generated.c): ...this.
7 (xml-builtin.c): Replace with...
8 (xml-builtin-generated.c): ...this.
9 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
10 (%.c: *regformats*): Replace with...
11 (%-generated.c: *regformats*): ...this.
12
13 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14
15 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
16 (xtensa_fill_gregset): Call collect_register_by_name for
17 threadptr register.
18 (xtensa_store_gregset): Call supply_register_by_name for
19 threadptr register.
20
21 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
22
23 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
24 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
25 (xtensa_store_gregset): Call supply_register for all registers in
26 a0_regnum..a0_regnum + C0_NREGS range.
27
28 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
29
30 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
31 (ax-ipa.o: ax.c): Remove.
32 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
33 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
34 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
35 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
36 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
37
38 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
41 (print-utils-ipa.o: ../common/print-utils.c): Remove.
42 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
43 (errors-ipa.o: ../common/errors.c): Remove.
44 (format-ipa.o: ../common/format.c): Remove.
45 (common-utils-ipa.o: ../common/common-utils.c): Remove.
46
47 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * Makefile.in (%-ipa.o: %.c): New rule.
50 (tracepoint-ipa.o: tracepoint.c): Remove.
51 (utils-ipa.o: utils.c): Remove.
52 (remote-utils-ipa.o: remote-utils.c): Remove.
53 (regcache-ipa.o: regcache.c): Remove.
54 (i386-linux-ipa.o: i386-linux.c): Remove.
55 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
56 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
57 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
58 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
59 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
60 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
61 (amd64-linux-ipa.o: amd64-linux.c): Remove.
62 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
63 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
64 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
65 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
66 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
67 (aarch64-ipa.o: aarch64.c): Remove.
68 (s390-linux32-ipa.o: s390-linux32.c): Remove.
69 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
70 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
71 (s390-linux64-ipa.o: s390-linux64.c): Remove.
72 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
73 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
74 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
75 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
76 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
77 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
78 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
79 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
80 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
81 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
82 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
83 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
84 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
85 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
86 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
87 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
88 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
89 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
90 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
91 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
92 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
93 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
94 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
95 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
96 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
97 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
98 (tdesc-ipa.o: tdesc.c): Remove.
99 (x32-linux-ipa.o: x32-linux.c): Remove.
100 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
101 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
102
103 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
104
105 * Makefile.in (%.o: ../arch/%.c): New rule.
106 (arm.o: ../arch/arm.c): Remove.
107 (arm-linux.o: ../arch/arm-linux.c): Remove.
108 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
109 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
110
111 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * Makefile.in (%.o: ../nat/%.c): New rule.
114 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
115 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
116 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
117 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
118 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
119 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
120 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
121 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
122 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
123 (linux-personality.o: ../nat/linux-personality.c): Remove.
124 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
125 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
126 (x86-linux.o: ../nat/x86-linux.c): Remove.
127 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
128 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
129
130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
131
132 * Makefile.in (%.o: ../common/%.c): New rule.
133 (signals.o: ../common/signals.c): Remove.
134 (print-utils.o: ../common/print-utils.c): Remove.
135 (rsp-low.o: ../common/rsp-low.c): Remove.
136 (common-utils.o: ../common/common-utils.c): Remove.
137 (posix-strerror.o: ../common/posix-strerror.c): Remove.
138 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
139 (vec.o: ../common/vec.c): Remove.
140 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
141 (xml-utils.o: ../common/xml-utils.c): Remove.
142 (ptid.o: ../common/ptid.c): Remove.
143 (buffer.o: ../common/buffer.c): Remove.
144 (format.o: ../common/format.c): Remove.
145 (filestuff.o: ../common/filestuff.c): Remove.
146 (agent.o: ../common/agent.c): Remove.
147 (errors.o: ../common/errors.c): Remove.
148 (environ.o: ../common/environ.c): Remove.
149 (common-debug.o: ../common/common-debug.c): Remove.
150 (cleanups.o: ../common/cleanups.c): Remove.
151 (common-exceptions.o: ../common/common-exceptions.c): Remove.
152 (fileio.o: ../common/fileio.c): Remove.
153 (common-regcache.o: ../common/common-regcache.c): Remove.
154 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
155 (new-op.o: ../common/new-op.c): Remove.
156 (btrace-common.o: ../common/btrace-common.c): Remove.
157
158 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * Makefile.in (%.o: ../target/%.c): New rule.
161 (waitstatus.o: ../target/waitstatus.c): Remove.
162
163 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
164
165 * Makefile.in
166 (%.c: ../regformats/%.dat,
167 (%.c: ../regformats/arm/%.dat,
168 (%.c: ../regformats/i386/%.dat,
169 (%.c: ../regformats/rs6000/%.dat): New rules.
170 (aarch64.c): Remove.
171 (reg-arm.c): Remove.
172 (arm-with-iwmmxt.c): Remove.
173 (arm-with-vfpv2.c): Remove.
174 (arm-with-vfpv3.c): Remove.
175 (arm-with-neon.c): Remove.
176 (reg-bfin.c): Remove.
177 (reg-cris.c): Remove.
178 (reg-crisv32.c): Remove.
179 (i386.c): Remove.
180 (i386-linux.c): Remove.
181 (i386-avx.c): Remove.
182 (i386-avx-linux.c): Remove.
183 (i386-avx-avx512.c): Remove.
184 (i386-avx-avx512-linux.c): Remove.
185 (i386-mpx.c): Remove.
186 (i386-mpx-linux.c): Remove.
187 (i386-avx-mpx-avx512-pku.c): Remove.
188 (i386-avx-mpx-avx512-pku-linux.c): Remove.
189 (i386-avx-mpx.c): Remove.
190 (i386-avx-mpx-linux.c): Remove.
191 (i386-mmx.c): Remove.
192 (i386-mmx-linux.c): Remove.
193 (reg-ia64.c): Remove.
194 (reg-m32r.c): Remove.
195 (reg-m68k.c): Remove.
196 (reg-cf.c): Remove.
197 (mips-linux.c): Remove.
198 (mips-dsp-linux.c): Remove.
199 (mips64-linux.c): Remove.
200 (mips64-dsp-linux.c): Remove.
201 (nios2-linux.c): Remove.
202 (powerpc-32.c): Remove.
203 (powerpc-32l.c): Remove.
204 (powerpc-altivec32l.c): Remove.
205 (powerpc-cell32l.c): Remove.
206 (powerpc-vsx32l.c): Remove.
207 (powerpc-isa205-32l.c): Remove.
208 (powerpc-isa205-altivec32l.c): Remove.
209 (powerpc-isa205-vsx32l.c): Remove.
210 (powerpc-e500l.c): Remove.
211 (powerpc-64l.c): Remove.
212 (powerpc-altivec64l.c): Remove.
213 (powerpc-cell64l.c): Remove.
214 (powerpc-vsx64l.c): Remove.
215 (powerpc-isa205-64l.c): Remove.
216 (powerpc-isa205-altivec64l.c): Remove.
217 (powerpc-isa205-vsx64l.c): Remove.
218 (s390-linux32.c): Remove.
219 (s390-linux32v1.c): Remove.
220 (s390-linux32v2.c): Remove.
221 (s390-linux64.c): Remove.
222 (s390-linux64v1.c): Remove.
223 (s390-linux64v2.c): Remove.
224 (s390-te-linux64.c): Remove.
225 (s390-vx-linux64.c): Remove.
226 (s390-tevx-linux64.c): Remove.
227 (s390x-linux64.c): Remove.
228 (s390x-linux64v1.c): Remove.
229 (s390x-linux64v2.c): Remove.
230 (s390x-te-linux64.c): Remove.
231 (s390x-vx-linux64.c): Remove.
232 (s390x-tevx-linux64.c): Remove.
233 (tic6x-c64xp-linux.c): Remove.
234 (tic6x-c64x-linux.c): Remove.
235 (tic6x-c62x-linux.c): Remove.
236 (reg-sh.c): Remove.
237 (reg-sparc64.c): Remove.
238 (reg-spu.c): Remove.
239 (amd64.c): Remove.
240 (amd64-linux.c): Remove.
241 (amd64-avx.c): Remove.
242 (amd64-avx-linux.c): Remove.
243 (amd64-avx-avx512.c): Remove.
244 (amd64-avx-avx512-linux.c): Remove.
245 (amd64-mpx.c): Remove.
246 (amd64-mpx-linux.c): Remove.
247 (amd64-avx-mpx-avx512-pku.c): Remove.
248 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
249 (amd64-avx-mpx.c): Remove.
250 (amd64-avx-mpx-linux.c): Remove.
251 (x32.c): Remove.
252 (x32-linux.c): Remove.
253 (x32-avx.c): Remove.
254 (x32-avx-linux.c): Remove.
255 (x32-avx-avx512.c): Remove.
256 (x32-avx-avx512-linux.c): Remove.
257 (reg-xtensa.c): Remove.
258 (reg-tilegx.c): Remove.
259 (reg-tilegx32.c): Remove.
260
261 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
262
263 * Makefile.in (SFILES): Add "common/environ.c".
264 (OBJS): Add "common/environ.h".
265
266 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
267
268 * configure.ac: Check if the fs_base and gs_base members of
269 `struct user_regs_struct' exist.
270 * config.in: Regenerated.
271 * configure: Likewise.
272
273 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
274
275 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
276 target_read_memory.
277 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
278 (get_next_pcs_syscall_next_pc): Likewise.
279
280 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
281
282 * win32-i386-low.c: Fix incorrect reference to a couple source files.
283 * nto-x86-low.c: Likewise.
284
285 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * Makefile.in: Include disable-implicit-rules.mk.
288
289 2016-11-23 Pedro Alves <palves@redhat.com>
290
291 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
292 (debug_vprintf): Use std::chrono::steady_clock instead of
293 gettimeofday. Use '.' instead of ':'.
294 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
295 (get_timestamp): Use std::chrono::steady_clock instead of
296 gettimeofday.
297
298 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
299
300 * Makefile.in: Fix whitespace formatting.
301
302 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * Makefile.in (SFILES, OBS): Flatten list and order
305 alphabetically.
306
307 2016-11-23 Pedro Alves <palves@redhat.com>
308
309 * event-loop.c (handle_file_event): Use warning.
310 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
311 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
312 Use warning.
313
314 2016-11-23 Pedro Alves <palves@redhat.com>
315
316 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
317 output.
318 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
319 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
320 debug_printf and debug_flush for debug output.
321 * server.c (handle_general_set): Likewise.
322 * thread-db.c (try_thread_db_load): Use debug_printf for debug
323 output.
324
325 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * Makefile.in (.c.o): Replace rule with ...
328 (%.o: %.c): ... this one.
329
330 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
333 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
334 make.
335 * configure.ac: Remove checks for the make program.
336 * configure: Re-generate.
337
338 2016-10-28 Pedro Alves <palves@redhat.com>
339
340 * Makefile.in (CXX_DIALECT): Get from configure.
341 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
342 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
343 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
344 * config.in: Regenerate.
345 * configure: Regenerate.
346
347 2016-10-27 Yao Qi <yao.qi@linaro.org>
348
349 * linux-low.c (linux_supports_range_stepping): Return true if
350 can_software_single_step return true.
351
352 2016-10-27 Yao Qi <yao.qi@linaro.org>
353
354 * inferiors.c (find_inferior_in_random): New function.
355 * inferiors.h (find_inferior_in_random): Declare.
356 * linux-low.c (linux_wait_for_event_filtered): Call
357 find_inferior_in_random instead of find_inferior.
358
359 2016-10-27 Yao Qi <yao.qi@linaro.org>
360
361 * linux-low.c (linux_wait_1): If single-step breakpoints are
362 inserted, remove them.
363
364 2016-10-26 Pedro Alves <palves@redhat.com>
365
366 * linux-low.c (handle_extended_wait): Link parent/child fork
367 threads.
368 (linux_wait_1): Unlink them.
369 (linux_set_resume_request): Ignore resume requests for
370 already-resumed and unhandled fork child threads.
371 * linux-low.h (struct lwp_info) <fork_relative>: New field.
372 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
373 New functions.
374 (handle_v_requests) <vCont>: Don't call require_running.
375 * server.h (in_queued_stop_replies): New declaration.
376
377 2016-10-24 Yao Qi <yao.qi@linaro.org>
378
379 PR server/20733
380 * linux-aarch64-low.c (append_insns): Cast the return value to
381 'uint32_t *'.
382
383 2016-10-10 Yao Qi <yao.qi@linaro.org>
384
385 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
386
387 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
388
389 * target.c (target_supports_multi_process): New function, moved
390 from...
391 * target.h (target_supports_multi_process): ... here. Remove
392 macro.
393
394 2016-10-05 Tom Tromey <tom@tromey.com>
395
396 PR remote/20655:
397 * tracepoint.c (handle_tracepoint_bkpts): Check
398 ipa_error_tracepoint, not ipa_stopping_tracepoint.
399
400 2016-10-05 Yao Qi <yao.qi@linaro.org>
401
402 * configure.srv: Update the path of arm-*.xml files.
403
404 2016-10-05 Terry Guo <terry.guo@arm.com>
405 Yao Qi <yao.qi@linaro.org>
406
407 * Makefile.in: Adjust the path of rules.
408 * configure.srv: Update the path of xml files.
409 * regformats/arm-with-iwmmxt.dat: Regenerated.
410 * regformats/arm-with-neon.dat: Likewise.
411 * regformats/arm-with-vfpv2.dat: Likewise.
412 * regformats/arm-with-vfpv3.dat Likewise.
413
414 2016-09-30 Yao Qi <yao.qi@linaro.org>
415
416 PR gdbserver/20627
417 * target.c (target_stop_and_wait): Don't call
418 target_continue_no_signal, use resume_stop instead.
419
420 2016-09-26 Yao Qi <yao.qi@linaro.org>
421
422 * linux-low.c (linux_wait_1): Call debug_exit.
423
424 2016-09-23 Pedro Alves <palves@redhat.com>
425
426 * Makefile.in (SFILES): Add common/new-op.c.
427 (OBS): Add common/new-op.o.
428 (new-op.o): New rule.
429
430 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
431
432 * .gitinore: Ignore more files.
433
434 2016-09-21 Yao Qi <yao.qi@linaro.org>
435
436 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
437 23.
438
439 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
440
441 * server.c (start_inferior): Call target_mourn_inferior instead of
442 mourn_inferior; pass ptid_t argument to it.
443 (resume): Likewise.
444 (handle_target_event): Likewise.
445 * target.c (target_mourn_inferior): New function.
446 * target.h (mourn_inferior): Delete macro.
447
448 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
449
450 * linux-low.c (lwp_is_stepping): New function.
451
452 2016-09-06 Carl Love <cel@us.ibm.com>
453
454 * server.c (start_inferior): Fixed comment, requested comment change
455 didn't get updated correctly. Removed reference to ptrace () call as
456 it is only true on Linux systems.
457
458 2016-09-06 Carl Love <cel@us.ibm.com>
459
460 * server.c (start_inferior): Do not call
461 function target_post_create_inferior () if the
462 inferior process has already exited.
463
464 2016-09-05 Pedro Alves <palves@redhat.com>
465
466 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
467 (COMPILE.pre, CC_LD): Use CXX directly.
468 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
469 * acinclude.m4: Don't include build-with-cxx.m4.
470 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
471 * configure: Regenerate.
472
473 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
474
475 PR gdb/19495
476 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
477 call writing data to own_buf.
478
479 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
480
481 * target.c (mywait): Call target_wait instead of
482 the_target->wait.
483 (target_wait): New function.
484
485 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
486
487 * server.c (start_inferior): New variable 'ptid'. Replace calls
488 to the_target->resume by target_continue{,_no_signal}, depending
489 on the case.
490 * target.c (target_stop_and_wait): Call target_continue_no_signal
491 instead of the_target->resume.
492 (target_continue): New function.
493
494 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
495
496 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
497
498 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
499
500 PR server/20491
501 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
502 ps_prochandle.
503 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
504 * linux-arm-low.c (ps_get_thread_area): Likewise.
505 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
506 * linux-m68k-low.c (ps_get_thread_area): Likewise.
507 * linux-mips-low.c (ps_get_thread_area): Likewise.
508 * linux-nios2-low.c (ps_get_thread_area): Likewise.
509 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
510 * linux-x86-low.c (ps_get_thread_area): Likewise.
511 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
512
513 2016-08-19 Pedro Alves <palves@redhat.com>
514
515 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
516
517 2016-08-19 Pedro Alves <palves@redhat.com>
518
519 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
520 comment. Use memcpy instead of casting through unsigned long.
521
522 2016-08-19 Pedro Alves <palves@redhat.com>
523
524 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
525 allocating around 0x80000000.
526
527 2016-08-19 Pedro Alves <palves@redhat.com>
528
529 PR gdb/20415
530 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
531 (x32-avx512-linux-ipa.o): New rules.
532 * configure.ac (x86_64-*-linux*): New x32 check.
533 * configure.srv (ipa_x32_linux_regobj): New.
534 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
535 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
536 descriptions.
537 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
538 descriptions.
539 * configure: Regenerate.
540
541 2016-08-09 Pedro Alves <palves@redhat.com>
542
543 PR gdb/18653
544 * Makefile.in (OBS): Add signals-state-save-restore.o.
545 (signals-state-save-restore.o): New rule.
546 * config.in: Regenerate.
547 * configure: Regenerate.
548 * linux-low.c: Include "signals-state-save-restore.h".
549 (linux_create_inferior): Call
550 restore_original_signals_state.
551 * server.c: Include "dispositions-save-restore.h".
552 (captured_main): Call save_original_signals_state.
553
554 2016-08-05 Pedro Alves <palves@redhat.com>
555
556 * configure: Regenerate.
557
558 2016-08-04 Yao Qi <yao.qi@linaro.org>
559
560 * linux-low.c (regsets_fetch_inferior_registers): Check
561 errno is ESRCH or not.
562
563 2016-08-02 Yao Qi <yao.qi@linaro.org>
564
565 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
566 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
567 (thread_db_load_search): Update.
568 (try_thread_db_load_1): Don't look for td_ta_event_addr,
569 td_ta_set_event and td_ta_event_getmsg.
570
571 2016-07-26 Pedro Alves <palves@redhat.com>
572
573 PR server/20414
574 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
575 of unsigned long for 64-bit registers and use uint32_t instead of
576 unsigned int for 32-bit registers.
577
578 2016-07-26 Pedro Alves <palves@redhat.com>
579
580 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
581 to 'ptrace'.
582
583 2016-07-21 Tom Tromey <tom@tromey.com>
584
585 * configure: Rebuild.
586
587 2016-07-21 Yao Qi <yao.qi@linaro.org>
588
589 * mem-break.c (find_gdb_breakpoint): Cast bp to
590 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
591
592 2016-07-21 Yao Qi <yao.qi@linaro.org>
593
594 * server.c (handle_v_requests): Support s and S actions
595 if target_supports_software_single_step return true.
596
597 2016-07-21 Yao Qi <yao.qi@linaro.org>
598
599 * linux-low.c (resume_stopped_resumed_lwps): If resume request
600 is resume_step, call maybe_hw_step.
601 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
602 and unstop them.
603 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
604 breakpoints or not.
605 (proceed_one_lwp): If resume request is resume_step, install
606 reinsert breakpoints and call maybe_hw_step.
607
608 2016-07-21 Yao Qi <yao.qi@linaro.org>
609
610 * linux-low.c (proceed_one_lwp): Declare.
611 (linux_resume_one_thread): Remove local variable 'step'.
612 Lift code enqueue signal. Call proceed_one_lwp instead of
613 linux_resume_one_lwp.
614
615 2016-07-21 Yao Qi <yao.qi@linaro.org>
616
617 * linux-low.c (linux_resume_one_thread): Call
618 enqueue_pending_signal.
619
620 2016-07-21 Yao Qi <yao.qi@linaro.org>
621
622 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
623 * inferiors.c (do_restore_current_thread_cleanup): New function.
624 (make_cleanup_restore_current_thread): Likewise.
625 * linux-low.c (install_software_single_step_breakpoints): Call
626 make_cleanup_restore_current_thread. Switch current_thread to
627 thread.
628
629 2016-07-21 Yao Qi <yao.qi@linaro.org>
630
631 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
632 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
633 (clone_one_breakpoint): Likewise.
634 (delete_reinsert_breakpoints): Change parameter to thread.
635 Callers updated.
636 (has_reinsert_breakpoints): Likewise.
637 (uninsert_reinsert_breakpoints): Likewise.
638 (reinsert_reinsert_breakpoints): Likewise.
639 * mem-break.h (set_reinsert_breakpoint): Update declaration.
640 (delete_reinsert_breakpoints): Likewise.
641 (reinsert_reinsert_breakpoints): Likewise.
642 (uninsert_reinsert_breakpoints): Likewise.
643 (has_reinsert_breakpoints): Likewise.
644
645 2016-07-21 Yao Qi <yao.qi@linaro.org>
646
647 * inferiors.c (get_thread_process): Make parameter const.
648 * inferiors.h (get_thread_process): Update declaration.
649 * mem-break.c (clone_all_breakpoints): Remove all parameters.
650 Add new parameters child_thread and parent_thread. Callers
651 updated.
652 * mem-break.h (clone_all_breakpoints): Update declaration.
653
654 2016-07-21 Yao Qi <yao.qi@linaro.org>
655
656 * mem-break.c (struct breakpoint) <cond_list>: Remove.
657 <command_list, handler>: Remove.
658 (struct gdb_breakpoint): New.
659 (struct other_breakpoint): New.
660 (struct reinsert_breakpoint): New.
661 (is_gdb_breakpoint): New function.
662 (any_persistent_commands): Update command_list if
663 is_gdb_breakpoint returns true.
664 (set_breakpoint): Create breakpoints according to their types.
665 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
666 (set_gdb_breakpoint_1): Likewise.
667 (set_gdb_breakpoint): Likewise.
668 (clear_breakpoint_conditions): Change parameter type to
669 'struct gdb_breakpoint *'.
670 (clear_breakpoint_commands): Likewise.
671 (clear_breakpoint_conditions_and_commands): Likewise.
672 (add_condition_to_breakpoint): Likewise.
673 (add_breakpoint_condition): Likewise.
674 (add_commands_to_breakpoint): Likewise.
675 (check_breakpoints): Check other_breakpoint.
676 (clone_one_breakpoint): Clone breakpopint according to its type.
677 * mem-break.h (struct gdb_breakpoint): Declare.
678 (set_gdb_breakpoint): Update declaration.
679 (clear_breakpoint_conditions_and_commands): Likewise.
680 (add_breakpoint_condition): Likewise.
681 (add_breakpoint_commands): Likewise.
682 * server.c (process_point_options): Change parameter type to
683 'struct gdb_breakpoint *'.
684
685 2016-07-21 Yao Qi <yao.qi@linaro.org>
686
687 * mem-break.c (set_breakpoint_at): Rename it to ...
688 (set_breakpoint_type_at): ... it.
689 (set_breakpoint_at): Call set_breakpoint_type_at.
690 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
691 * mem-break.h (set_breakpoint_at): Update comments.
692
693 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
694
695 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
696 to buf parameter.
697 (nios2_store_gregset): Likewise.
698
699 2016-07-01 Pedro Alves <palves@redhat.com>
700 Antoine Tremblay <antoine.tremblay@ericsson.com>
701
702 * linux-low.c: Change interface to take the target lwp_info
703 pointer directly and return void. Handle detaching from a zombie
704 thread.
705 (linux_detach_lwp_callback): New function.
706 (linux_detach): Detach from the leader thread after detaching from
707 the clone threads.
708
709 2016-06-28 Yao Qi <yao.qi@linaro.org>
710
711 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
712 for variable new_offset.
713 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
714 (aarch64_ftrace_insn_reloc_cb): Likewise.
715 (aarch64_ftrace_insn_reloc_tb): Likewise.
716 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
717 PRIx64 instead of PRIx32.
718
719 2016-06-28 Yao Qi <yao.qi@linaro.org>
720
721 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
722 (the_low_target): Install arm_get_syscall_trapinfo.
723
724 2016-06-28 Yao Qi <yao.qi@linaro.org>
725
726 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
727 function.
728 (the_low_target): Install aarch64_get_syscall_trapinfo.
729
730 2016-06-28 Yao Qi <yao.qi@linaro.org>
731
732 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
733 Callers updated.
734 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
735 Remove parameter sysno.
736 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
737 sysret.
738
739 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
740
741 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
742 (s390_emit_ne_goto): Likewise.
743 (s390_emit_lt_goto): Likewise.
744 (s390_emit_le_goto): Likewise.
745 (s390_emit_gt_goto): Likewise.
746 (s390_emit_ge_goto): Likewise.
747 (s390x_emit_eq_goto): Likewise.
748 (s390x_emit_ne_goto): Likewise.
749 (s390x_emit_lt_goto): Likewise.
750 (s390x_emit_le_goto): Likewise.
751 (s390x_emit_gt_goto): Likewise.
752 (s390x_emit_ge_goto): Likewise.
753 (s390_emit_ops_impl): Mark variable static.
754 (s390x_emit_ops): Likewise.
755
756 2016-06-17 Yao Qi <yao.qi@linaro.org>
757
758 * linux-low.c (handle_extended_wait): Call
759 uninsert_reinsert_breakpoints for the parent process. Remove
760 reinsert breakpoints from the child process. Reinsert them to
761 the parent process when vfork is done.
762 * mem-break.c (uninsert_reinsert_breakpoints): New function.
763 (reinsert_reinsert_breakpoints): New function.
764 * mem-break.h (uninsert_reinsert_breakpoints): Declare
765 (reinsert_reinsert_breakpoints): Declare.
766
767 2016-06-17 Yao Qi <yao.qi@linaro.org>
768
769 * linux-low.c (handle_extended_wait): If the parent is doing
770 step-over, remove the reinsert breakpoints from the forked child.
771
772 2016-06-17 Yao Qi <yao.qi@linaro.org>
773
774 * linux-low.c (unsuspend_all_lwps): Declare.
775 (linux_low_filter_event): If thread exited, call finish_step_over.
776 If step-over is finished, unsuspend other threads.
777
778 2016-06-17 Yao Qi <yao.qi@linaro.org>
779
780 * linux-low.c (linux_resume_one_lwp_throw): Assert
781 has_reinsert_breakpoints returns false.
782 * mem-break.c (delete_disabled_breakpoints): Assert
783 bp type isn't reinsert_breakpoint.
784
785 2016-06-17 Yao Qi <yao.qi@linaro.org>
786
787 * linux-low.c (maybe_hw_step): New function.
788 (linux_resume_one_lwp_throw): Call maybe_hw_step.
789 (finish_step_over): Switch current_thread to lwp temporarily,
790 and assert has_reinsert_breakpoints returns true.
791 (proceed_one_lwp): Call maybe_hw_step.
792 * mem-break.c (has_reinsert_breakpoints): New function.
793 * mem-break.h (has_reinsert_breakpoints): Declare.
794
795 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
796
797 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
798
799 2016-05-17 Yao Qi <yao.qi@linaro.org>
800
801 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
802 instead of find_inferior.
803
804 2016-05-05 Yao Qi <yao.qi@linaro.org>
805
806 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
807 Initialize res to zero.
808
809 2016-05-05 Yao Qi <yao.qi@linaro.org>
810
811 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
812 to uint32_t.
813
814 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
815
816 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
817 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
818 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
819
820 2016-04-28 Par Olsson <par.olsson@windriver.com>
821 Simon Marchi <simon.marchi@ericsson.com>
822
823 * tracepoint.c (write_inferior_int8): New function.
824 (cmd_qtenable_disable): Write enable flag using
825 write_inferior_int8.
826
827 2016-04-25 Yao Qi <yao.qi@linaro.org>
828
829 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
830 (need_step_over_p): Return zero if the LWP has pending signals
831 can be delivered on software single step target.
832
833 2016-04-25 Yao Qi <yao.qi@linaro.org>
834
835 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
836 return instead of error.
837
838 2016-04-22 Yao Qi <yao.qi@linaro.org>
839
840 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
841 to 23.
842
843 2016-04-22 Yao Qi <yao.qi@linaro.org>
844
845 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
846 signal when stepping over breakpoint with software single
847 step.
848
849 2016-04-21 Pedro Alves <palves@redhat.com>
850
851 * linux-s390-low.c (s390_collect_ptrace_register)
852 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
853 add casts.
854 (s390_check_regset): Use void * instead of gdb_byte *.
855
856 2016-04-20 Pedro Alves <palves@redhat.com>
857
858 * configure: Renegerate.
859
860 2016-04-20 Yao Qi <yao.qi@linaro.org>
861
862 * linux-aarch32-low.c: Include "arch/arm-linux.h".
863 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
864 number 16.
865 (arm_store_gregset): Likewise.
866
867 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
868
869 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
870 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
871 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
872 (amd64-avx-mpx-linux.c): New rules.
873 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
874 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
875 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
876 (srv_amd64_regobj): Add amd64-avx-mpx.o.
877 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
878 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
879 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
880 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
881 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
882 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
883 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
884 * linux-x86-low.c (x86_linux_read_description): Add case for
885 X86_XSTATE_AVX_MPX_MASK.
886 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
887 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
888 init_registers_i386_avx_mpx_linux.
889 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
890 (initialize_low_tracepoint): Call
891 init_registers_i386_avx_mpx_linux.
892 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
893 (initialize_low_tracepoint): Call
894 init_registers_amd64_avx_mpx_linux.
895 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
896 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
897 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
898 declarations.
899
900 2016-04-18 Pedro Alves <palves@redhat.com>
901
902 * configure: Regenerate.
903
904 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
905
906 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
907 (aarch64_emit_sub): Likewise.
908
909 2016-04-12 Pedro Alves <palves@redhat.com>
910
911 * utils.c (prepare_to_throw_exception): Delete.
912
913 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
914
915 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
916
917 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
918
919 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
920
921 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
922
923 * linux-aarch64-ipa.c: Add <elf.h> include.
924 * linux-ppc-ipa.c: Add <elf.h> include.
925 * linux-s390-ipa.c: Add <elf.h> include.
926
927 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
928
929 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
930 (get_raw_reg_ptr): Likewise.
931 (get_trace_state_variable_value_ptr): Likewise.
932 (set_trace_state_variable_value_ptr): Likewise.
933 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
934 char *.
935
936 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
937 Marcin Kościelnicki <koriakin@0x04.net>
938
939 PR/17221
940 * linux-ppc-low.c (emit_insns): New function.
941 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
942 (ppc_emit_prologue): New function.
943 (ppc_emit_epilogue): New function.
944 (ppc_emit_add): New function.
945 (ppc_emit_sub): New function.
946 (ppc_emit_mul): New function.
947 (ppc_emit_lsh): New function.
948 (ppc_emit_rsh_signed): New function.
949 (ppc_emit_rsh_unsigned): New function.
950 (ppc_emit_ext): New function.
951 (ppc_emit_zero_ext): New function.
952 (ppc_emit_log_not): New function.
953 (ppc_emit_bit_and): New function.
954 (ppc_emit_bit_or): New function.
955 (ppc_emit_bit_xor): New function.
956 (ppc_emit_bit_not): New function.
957 (ppc_emit_equal): New function.
958 (ppc_emit_less_signed): New function.
959 (ppc_emit_less_unsigned): New function.
960 (ppc_emit_ref): New function.
961 (ppc_emit_const): New function.
962 (ppc_emit_reg): New function.
963 (ppc_emit_pop): New function.
964 (ppc_emit_stack_flush): New function.
965 (ppc_emit_swap): New function.
966 (ppc_emit_stack_adjust): New function.
967 (ppc_emit_call): New function.
968 (ppc_emit_int_call_1): New function.
969 (ppc_emit_void_call_2): New function.
970 (ppc_emit_if_goto): New function.
971 (ppc_emit_goto): New function.
972 (ppc_emit_eq_goto): New function.
973 (ppc_emit_ne_goto): New function.
974 (ppc_emit_lt_goto): New function.
975 (ppc_emit_le_goto): New function.
976 (ppc_emit_gt_goto): New function.
977 (ppc_emit_ge_goto): New function.
978 (ppc_write_goto_address): New function.
979 (ppc_emit_ops_impl): New static variable.
980 (ppc64v1_emit_prologue): New function.
981 (ppc64v2_emit_prologue): New function.
982 (ppc64_emit_epilogue): New function.
983 (ppc64_emit_add): New function.
984 (ppc64_emit_sub): New function.
985 (ppc64_emit_mul): New function.
986 (ppc64_emit_lsh): New function.
987 (ppc64_emit_rsh_signed): New function.
988 (ppc64_emit_rsh_unsigned): New function.
989 (ppc64_emit_ext): New function.
990 (ppc64_emit_zero_ext): New function.
991 (ppc64_emit_log_not): New function.
992 (ppc64_emit_bit_and): New function.
993 (ppc64_emit_bit_or): New function.
994 (ppc64_emit_bit_xor): New function.
995 (ppc64_emit_bit_not): New function.
996 (ppc64_emit_equal): New function.
997 (ppc64_emit_less_signed): New function.
998 (ppc64_emit_less_unsigned): New function.
999 (ppc64_emit_ref): New function.
1000 (ppc64_emit_const): New function.
1001 (ppc64v1_emit_reg): New function.
1002 (ppc64v2_emit_reg): New function.
1003 (ppc64_emit_pop): New function.
1004 (ppc64_emit_stack_flush): New function.
1005 (ppc64_emit_swap): New function.
1006 (ppc64v1_emit_call): New function.
1007 (ppc64v2_emit_call): New function.
1008 (ppc64v1_emit_int_call_1): New function.
1009 (ppc64v2_emit_int_call_1): New function.
1010 (ppc64v1_emit_void_call_2): New function.
1011 (ppc64v2_emit_void_call_2): New function.
1012 (ppc64_emit_if_goto): New function.
1013 (ppc64_emit_eq_goto): New function.
1014 (ppc64_emit_ne_goto): New function.
1015 (ppc64_emit_lt_goto): New function.
1016 (ppc64_emit_le_goto): New function.
1017 (ppc64_emit_gt_goto): New function.
1018 (ppc64_emit_ge_goto): New function.
1019 (ppc64v1_emit_ops_impl): New static variable.
1020 (ppc64v2_emit_ops_impl): New static variable.
1021 (ppc_emit_ops): New function.
1022 (linux_low_target): Wire in ppc_emit_ops.
1023
1024 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1025 Marcin Kościelnicki <koriakin@0x04.net>
1026
1027 PR/17221
1028 * Makefile.in: Add powerpc-*-ipa.o
1029 * configure.srv: Add ipa_obj for powerpc*-linux.
1030 * linux-ppc-ipa.c: New file.
1031 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1032 includes.
1033 (PPC_FIELD): New macro.
1034 (PPC_SEXT): New macro.
1035 (PPC_OP6): New macro.
1036 (PPC_BO): New macro.
1037 (PPC_LI): New macro.
1038 (PPC_BD): New macro.
1039 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1040 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1041 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1042 (ppc_get_thread_area): New function.
1043 (is_elfv2_inferior): New function.
1044 (gen_ds_form): New function.
1045 (GEN_STD): New macro.
1046 (GEN_STDU): New macro.
1047 (GEN_LD): New macro.
1048 (GEN_LDU): New macro.
1049 (gen_d_form): New function.
1050 (GEN_ADDI): New macro.
1051 (GEN_ADDIS): New macro.
1052 (GEN_LI): New macro.
1053 (GEN_LIS): New macro.
1054 (GEN_ORI): New macro.
1055 (GEN_ORIS): New macro.
1056 (GEN_LWZ): New macro.
1057 (GEN_STW): New macro.
1058 (GEN_STWU): New macro.
1059 (gen_xfx_form): New function.
1060 (GEN_MFSPR): New macro.
1061 (GEN_MTSPR): New macro.
1062 (GEN_MFCR): New macro.
1063 (GEN_MTCR): New macro.
1064 (GEN_SYNC): New macro.
1065 (GEN_LWSYNC): New macro.
1066 (gen_x_form): New function.
1067 (GEN_OR): New macro.
1068 (GEN_MR): New macro.
1069 (GEN_LWARX): New macro.
1070 (GEN_STWCX): New macro.
1071 (GEN_CMPW): New macro.
1072 (gen_md_form): New function.
1073 (GEN_RLDICL): New macro.
1074 (GEN_RLDICR): New macro.
1075 (gen_i_form): New function.
1076 (GEN_B): New macro.
1077 (GEN_BL): New macro.
1078 (gen_b_form): New function.
1079 (GEN_BNE): New macro.
1080 (GEN_LOAD): New macro.
1081 (GEN_STORE): New macro.
1082 (gen_limm): New function.
1083 (gen_atomic_xchg): New function.
1084 (gen_call): New function.
1085 (ppc_relocate_instruction): New function.
1086 (ppc_install_fast_tracepoint_jump_pad): New function.
1087 (ppc_get_min_fast_tracepoint_insn_len): New function.
1088 (ppc_get_ipa_tdesc_idx): New function.
1089 (the_low_target): Wire in the new functions.
1090 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1091 tdescs.
1092 * linux-ppc-tdesc.h: New file.
1093
1094 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1095
1096 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1097 (alloc_jump_pad_buffer): New function.
1098 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1099 (alloc_jump_pad_buffer): New function.
1100 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1101 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1102 (alloc_jump_pad_buffer): New function.
1103 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1104 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1105 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1106 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1107
1108 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1109
1110 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1111 * linux-amd64-ipa.c: Likewise.
1112 * linux-i386-ipa.c: Likewise.
1113 * linux-s390-ipa.c: Likewise.
1114 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1115 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1116 set_trace_state_variable_value_ptr.
1117 (struct ipa_sym_addresses): Likewise.
1118 (symbol_list): Likewise.
1119 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1120 accessing gdb_collect directly.
1121 (gdb_collect_ptr_type): New typedef.
1122 (get_raw_reg_ptr_type): New typedef.
1123 (get_trace_state_variable_value_ptr_type): New typedef.
1124 (set_trace_state_variable_value_ptr_type): New typedef.
1125 (gdb_collect_ptr): New global.
1126 (get_raw_reg_ptr): New global.
1127 (get_trace_state_variable_value_ptr): New global.
1128 (set_trace_state_variable_value_ptr): New global.
1129 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1130 accessing get_raw_reg directly.
1131 (get_get_tsv_func_addr): Likewise for
1132 get_trace_state_variable_value_ptr.
1133 (get_set_tsv_func_addr): Likewise for
1134 set_trace_state_variable_value_ptr.
1135 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1136
1137 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1138
1139 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1140
1141 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1142
1143 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1144 packets.
1145 (relocate_instruction): Remove own_buf.
1146 * server.c (own_buf): Make global.
1147 (handle_v_requests): Make global.
1148 * server.h (own_buf): New declaration.
1149 (handle_v_requests): New prototype.
1150
1151 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1152
1153 PR 18377
1154 * linux-s390-low.c (add_insns): New function.
1155 (s390_emit_prologue): New function.
1156 (s390_emit_epilogue): New function.
1157 (s390_emit_add): New function.
1158 (s390_emit_sub): New function.
1159 (s390_emit_mul): New function.
1160 (s390_emit_lsh): New function.
1161 (s390_emit_rsh_signed): New function.
1162 (s390_emit_rsh_unsigned): New function.
1163 (s390_emit_ext): New function.
1164 (s390_emit_log_not): New function.
1165 (s390_emit_bit_and): New function.
1166 (s390_emit_bit_or): New function.
1167 (s390_emit_bit_xor): New function.
1168 (s390_emit_bit_not): New function.
1169 (s390_emit_equal): New function.
1170 (s390_emit_less_signed): New function.
1171 (s390_emit_less_unsigned): New function.
1172 (s390_emit_ref): New function.
1173 (s390_emit_if_goto): New function.
1174 (s390_emit_goto): New function.
1175 (s390_write_goto_address): New function.
1176 (s390_emit_litpool): New function.
1177 (s390_emit_const): New function.
1178 (s390_emit_call): New function.
1179 (s390_emit_reg): New function.
1180 (s390_emit_pop): New function.
1181 (s390_emit_stack_flush): New function.
1182 (s390_emit_zero_ext): New function.
1183 (s390_emit_swap): New function.
1184 (s390_emit_stack_adjust): New function.
1185 (s390_emit_set_r2): New function.
1186 (s390_emit_int_call_1): New function.
1187 (s390_emit_void_call_2): New function.
1188 (s390_emit_eq_goto): New function.
1189 (s390_emit_ne_goto): New function.
1190 (s390_emit_lt_goto): New function.
1191 (s390_emit_le_goto): New function.
1192 (s390_emit_gt_goto): New function.
1193 (s390_emit_ge_goto): New function.
1194 (s390x_emit_prologue): New function.
1195 (s390x_emit_epilogue): New function.
1196 (s390x_emit_add): New function.
1197 (s390x_emit_sub): New function.
1198 (s390x_emit_mul): New function.
1199 (s390x_emit_lsh): New function.
1200 (s390x_emit_rsh_signed): New function.
1201 (s390x_emit_rsh_unsigned): New function.
1202 (s390x_emit_ext): New function.
1203 (s390x_emit_log_not): New function.
1204 (s390x_emit_bit_and): New function.
1205 (s390x_emit_bit_or): New function.
1206 (s390x_emit_bit_xor): New function.
1207 (s390x_emit_bit_not): New function.
1208 (s390x_emit_equal): New function.
1209 (s390x_emit_less_signed): New function.
1210 (s390x_emit_less_unsigned): New function.
1211 (s390x_emit_ref): New function.
1212 (s390x_emit_if_goto): New function.
1213 (s390x_emit_const): New function.
1214 (s390x_emit_call): New function.
1215 (s390x_emit_reg): New function.
1216 (s390x_emit_pop): New function.
1217 (s390x_emit_stack_flush): New function.
1218 (s390x_emit_zero_ext): New function.
1219 (s390x_emit_swap): New function.
1220 (s390x_emit_stack_adjust): New function.
1221 (s390x_emit_int_call_1): New function.
1222 (s390x_emit_void_call_2): New function.
1223 (s390x_emit_eq_goto): New function.
1224 (s390x_emit_ne_goto): New function.
1225 (s390x_emit_lt_goto): New function.
1226 (s390x_emit_le_goto): New function.
1227 (s390x_emit_gt_goto): New function.
1228 (s390x_emit_ge_goto): New function.
1229 (s390_emit_ops): New function.
1230 (struct linux_target_ops): Fill in emit_ops hook.
1231
1232 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1233
1234 PR 18377
1235 * Makefile.in: Add s390 IPA files.
1236 * configure.srv: Build IPA for s390.
1237 * linux-s390-ipa.c: New file.
1238 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1239 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1240 (tdesc_s390_linux32): Likewise.
1241 (init_registers_s390_linux32v1): Likewise.
1242 (tdesc_s390_linux32v1): Likewise.
1243 (init_registers_s390_linux32v2): Likewise.
1244 (tdesc_s390_linux32v2): Likewise.
1245 (init_registers_s390_linux64): Likewise.
1246 (tdesc_s390_linux64): Likewise.
1247 (init_registers_s390_linux64v1): Likewise.
1248 (tdesc_s390_linux64v1): Likewise.
1249 (init_registers_s390_linux64v2): Likewise.
1250 (tdesc_s390_linux64v2): Likewise.
1251 (init_registers_s390_te_linux64): Likewise.
1252 (tdesc_s390_te_linux64): Likewise.
1253 (init_registers_s390_vx_linux64): Likewise.
1254 (tdesc_s390_vx_linux64): Likewise.
1255 (init_registers_s390_tevx_linux64): Likewise.
1256 (tdesc_s390_tevx_linux64): Likewise.
1257 (init_registers_s390x_linux64): Likewise.
1258 (tdesc_s390x_linux64): Likewise.
1259 (init_registers_s390x_linux64v1): Likewise.
1260 (tdesc_s390x_linux64v1): Likewise.
1261 (init_registers_s390x_linux64v2): Likewise.
1262 (tdesc_s390x_linux64v2): Likewise.
1263 (init_registers_s390x_te_linux64): Likewise.
1264 (tdesc_s390x_te_linux64): Likewise.
1265 (init_registers_s390x_vx_linux64): Likewise.
1266 (tdesc_s390x_vx_linux64): Likewise.
1267 (init_registers_s390x_tevx_linux64): Likewise.
1268 (tdesc_s390x_tevx_linux64): Likewise.
1269 (have_hwcap_s390_vx): New static variable.
1270 (s390_arch_setup): Fill have_hwcap_s390_vx.
1271 (s390_get_thread_area): New function.
1272 (s390_ft_entry_gpr_esa): New const.
1273 (s390_ft_entry_gpr_zarch): New const.
1274 (s390_ft_entry_misc): New const.
1275 (s390_ft_entry_fr): New const.
1276 (s390_ft_entry_vr): New const.
1277 (s390_ft_main_31): New const.
1278 (s390_ft_main_64): New const.
1279 (s390_ft_exit_fr): New const.
1280 (s390_ft_exit_vr): New const.
1281 (s390_ft_exit_misc): New const.
1282 (s390_ft_exit_gpr_esa): New const.
1283 (s390_ft_exit_gpr_zarch): New const.
1284 (append_insns): New function.
1285 (s390_relocate_instruction): New function.
1286 (s390_install_fast_tracepoint_jump_pad): New function.
1287 (s390_get_min_fast_tracepoint_insn_len): New function.
1288 (s390_get_ipa_tdesc_idx): New function.
1289 (struct linux_target_ops): Wire in the above functions.
1290 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1291 * linux-s390-tdesc.h: New file.
1292
1293 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1294
1295 * linux-s390-low.c (s390_supports_tracepoints): New function.
1296 (struct linux_target_ops): Fill supports_tracepoints hook.
1297
1298 2016-03-18 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-low.c (lwp_signal_can_be_delivered): New function.
1301 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1302
1303 2016-03-18 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1306 0 if signal is enqueued. Remove 'signal' from one debugging
1307 message. Move one debugging message to some lines below.
1308 Remove code setting 'signal' to 0.
1309
1310 2016-03-18 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-low.c (linux_low_filter_event): Remove redundant
1313 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1314
1315 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1316
1317 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1318 (struct linux_target_ops): Wire in the above.
1319
1320 2016-03-03 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-low.c: Update comments to start_step_over.
1323
1324 2016-03-03 Yao Qi <yao.qi@linaro.org>
1325
1326 PR server/19736
1327 * linux-low.c (handle_extended_wait): Set child suspended
1328 if event_lwp->bp_reinsert isn't zero.
1329
1330 2016-03-02 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1333 enqueue_pending_signal.
1334
1335 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1336
1337 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1338 is actually loaded.
1339
1340 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1341
1342 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1343 (s390_regmap_3264) [!__s390x__]: New global.
1344 (s390_collect_ptrace_register): Skip map entries containing -1.
1345 (s390_supply_ptrace_register): Ditto.
1346 (s390_fill_gprs_high): New function.
1347 (s390_store_gprs_high): New function.
1348 (s390_regsets): Add NT_S390_HIGH_GPRS.
1349 (s390_get_hwcap): Enable on 31-bit.
1350 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1351 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1352 Detect NT_S390_HIGH_GPRS.
1353 (s390_usrregs_info_3264): Enable on 31-bit.
1354 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1355 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1356
1357 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1358
1359 PR gdb/13808
1360 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1361 * configure.srv: Ditto.
1362 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1363 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1364 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1365 (init_registers_amd64_linux): Remove prototype.
1366 (tdesc_amd64_linux): Remove declaration.
1367 (get_ipa_tdesc): New function.
1368 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1369 initialize remaining tdescs.
1370 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1371 (init_registers_i386_linux): Remove prototype.
1372 (tdesc_i386_linux): Remove declaration.
1373 (get_ipa_tdesc): New function.
1374 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1375 initialize remaining tdescs.
1376 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1377 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1378 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1379 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1380 (x86_get_ipa_tdesc_idx): New function.
1381 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1382 * linux-x86-tdesc.h: New file.
1383 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1384 (target_get_ipa_tdesc_idx): New macro.
1385 * tracepoint.c (ipa_tdesc_idx): New macro.
1386 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1387 (symbol_list): Add ipa_tdesc_idx.
1388 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1389 (ipa_tdesc): Remove.
1390 (ipa_tdesc_idx): New variable.
1391 (get_context_regcache): Use get_ipa_tdesc.
1392 (gdb_collect): Ditto.
1393 (gdb_probe): Ditto.
1394 * tracepoint.h (get_ipa_tdesc): New prototype.
1395 (ipa_tdesc): Remove.
1396
1397 2016-02-24 Pedro Alves <palves@redhat.com>
1398
1399 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1400 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1401 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1402 Factor out common code between the USE_SIGTRAP_SIGINFO and
1403 !USE_SIGTRAP_SIGINFO blocks.
1404 (linux_low_filter_event): Call save_stop_reason instead of
1405 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1406 Update comments.
1407 (linux_wait_1): Update comments.
1408
1409 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1410
1411 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1412 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1413 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1414 ppc_insert_point, ppc_remove_point.
1415
1416 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1417
1418 * linux-s390-low.c (s390_supports_z_point_type): New function.
1419 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1420
1421 2016-02-16 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1424 PC. Get pc from regcache_read_pc.
1425
1426 2016-02-12 Yao Qi <yao.qi@linaro.org>
1427
1428 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1429 or linux_get_pc_32bit.
1430 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1431
1432 2016-02-12 Yao Qi <yao.qi@linaro.org>
1433
1434 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1435 arm_linux_get_next_pcs_fixup.
1436
1437 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1438
1439 * tracepoint.c (x_tracepoint_action_download): Change
1440 write_inferior_data_ptr to write_inferior_data_pointer.
1441 (cmd_qtstart): Likewise.
1442 (write_inferior_data_ptr): Remove.
1443 (download_agent_expr): Change write_inferior_data_ptr to
1444 write_inferior_data_pointer.
1445 (download_tracepoint_1): Likewise.
1446 (download_tracepoint): Likewise.
1447 (download_trace_state_variables): Likewise.
1448
1449 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1450 Marcin Kościelnicki <koriakin@0x04.net>
1451
1452 * tracepoint.c (struct tracepoint_action_ops): Remove.
1453 (struct tracepoint_action): Remove ops.
1454 (m_tracepoint_action_download, r_tracepoint_action_download)
1455 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1456 size and offset accordingly.
1457 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1458 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1459 (tracepoint_action_send, tracepoint_action_download): New functions.
1460 Helpers for trace action handlers.
1461 (add_tracepoint_action): Remove setup actions ops.
1462 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1463
1464 2016-02-10 Yao Qi <yao.qi@linaro.org>
1465
1466 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1467
1468 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1469
1470 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1471 to AC_OUTPUT.
1472 * configure: Regenerate.
1473
1474 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1475
1476 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1477 void * to gdb_byte *.
1478 * linux-low.c (siginfo_fixup): Likewise.
1479 (linux_xfer_siginfo): Likewise.
1480 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1481 Likewise.
1482 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1483
1484 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1485
1486 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1487 to srv_tgtobj.
1488 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1489 to srv_tgtobj.
1490 * linux-x86-low.c [__x86_64__]: Include
1491 "nat/amd64-linux-siginfo.h".
1492 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1493 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1494 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1495 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1496 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1497 (cpt_si_fd, si_timerid, si_overrun): Move from
1498 nat/amd64-linux-siginfo.c.
1499 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1500
1501 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * server.c (skip_to_semicolon): Remove.
1504 (process_point_options): Use strchrnul instead of
1505 skip_to_semicolon.
1506
1507 2016-01-26 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1510 * linux-low.c (install_software_single_step_breakpoints): Don't
1511 call regcache_read_pc.
1512 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1513 argument pc.
1514
1515 2016-01-26 Yao Qi <yao.qi@linaro.org>
1516
1517 * linux-low.c (install_software_single_step_breakpoints): Call
1518 regcache_read_pc instead of get_pc.
1519
1520 2016-01-26 Yao Qi <yao.qi@linaro.org>
1521
1522 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1523 (unblock_async_io): Rename to ...
1524 (block_unblock_async_io): ... it. New function.
1525 (enable_async_io): Don't install SIGIO handler. Unblock it
1526 instead.
1527 (disable_async_io): Don't ignore SIGIO. Block it instead.
1528 (initialize_async_io): Install SIGIO handler. Don't call
1529 unblock_async_io.
1530
1531 2016-01-26 Yao Qi <yao.qi@linaro.org>
1532
1533 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1534 first character is '\003', call *the_target->request_interrupt.
1535
1536 2016-01-25 Yao Qi <yao.qi@linaro.org>
1537
1538 * remote-utils.c (new_thread_notify): Remove.
1539 (dead_thread_notify): Likewise.
1540 * remote-utils.h (new_thread_notify): Remove declaration.
1541 (dead_thread_notify): Likewise.
1542
1543 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1544
1545 * gdb.trace/pending.exp: Fix expected message on continue.
1546
1547 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1548
1549 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1550 it works properly on big-endian machines where sizeof (CORE_ADDR)
1551 != sizeof (void *).
1552
1553 2016-01-21 Pedro Alves <palves@redhat.com>
1554
1555 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1556 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1557 * configure: Regenerate.
1558
1559 2016-01-21 Yao Qi <yao.qi@linaro.org>
1560
1561 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1562 is_thumb and set it according to CPSR saved on the stack.
1563 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1564 arm_sigreturn_next_pc.
1565
1566 2016-01-18 Yao Qi <yao.qi@linaro.org>
1567
1568 * linux-low.c (linux_set_pc_64bit): New function.
1569 (linux_get_pc_64bit): New function.
1570 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1571 Declare.
1572 * linux-sparc-low.c (debug_threads): Remove declaration.
1573 (sparc_get_pc): Remove.
1574 (the_low_target): Use linux_get_pc_64bit instead of
1575 sparc_get_pc.
1576 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1577 (the_low_target): Use linux_get_pc_64bit and
1578 linux_set_pc_64bit.
1579
1580 2016-01-18 Yao Qi <yao.qi@linaro.org>
1581
1582 * linux-arm-low.c (debug_threads): Remove declaration.
1583 (arm_get_pc, arm_set_pc): Remove.
1584 (the_low_target): Use linux_get_pc_32bit and
1585 linux_set_pc_32bit.
1586 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1587 (the_low_target): Use linux_get_pc_32bit and
1588 linux_set_pc_32bit.
1589 * linux-cris-low.c (debug_threads): Remove declaration.
1590 (cris_get_pc, cris_set_pc,): Remove.
1591 (the_low_target): Use linux_get_pc_32bit and
1592 linux_set_pc_32bit.
1593 * linux-crisv32-low.c (debug_threads): Remove declaration.
1594 (cris_get_pc, cris_set_pc): Remove.
1595 (the_low_target): Use linux_get_pc_32bit and
1596 linux_set_pc_32bit.
1597 * linux-low.c: Include inttypes.h.
1598 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1599 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1600 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1601 (the_low_target): Use linux_get_pc_32bit and
1602 linux_set_pc_32bit.
1603 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1604 (the_low_target): Use linux_get_pc_32bit and
1605 linux_set_pc_32bit.
1606 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1607 (the_low_target): Use linux_get_pc_32bit and
1608 linux_set_pc_32bit.
1609 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1610 (the_low_target): Use linux_get_pc_32bit and
1611 linux_set_pc_32bit.
1612 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1613 (the_low_target): Use linux_get_pc_32bit and
1614 linux_set_pc_32bit.
1615
1616 2016-01-18 Gary Benson <gbenson@redhat.com>
1617
1618 * configure.ac (AC_FUNC_FORK): New check.
1619 * config.in: Regenerate.
1620 * configure: Likewise.
1621
1622 2016-01-14 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1625 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1626 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1627 arm_get_next_pcs_ctor.
1628
1629 2016-01-12 Josh Stone <jistone@redhat.com>
1630 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1631
1632 * inferiors.h: Include "gdb_vecs.h".
1633 (struct process_info): Add syscalls_to_catch.
1634 * inferiors.c (remove_process): Free syscalls_to_catch.
1635 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1636 syscall_return stops.
1637 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1638 * server.c (handle_general_set): Handle QCatchSyscalls.
1639 (handle_query): Report support for QCatchSyscalls.
1640 * target.h (struct target_ops): Add supports_catch_syscall.
1641 (target_supports_catch_syscall): New macro.
1642 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1643 (struct lwp_info): Add syscall_state.
1644 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1645 Maintain syscall_state and syscalls_to_catch across exec.
1646 (get_syscall_trapinfo): New function, proxy to the_low_target.
1647 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1648 (linux_low_filter_event): Toggle syscall_state entry/return for
1649 syscall traps, and set it ignored for all others.
1650 (gdb_catching_syscalls_p): New function.
1651 (gdb_catch_this_syscall_p): New function.
1652 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1653 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1654 (linux_supports_catch_syscall): New function.
1655 (linux_target_ops): Install it.
1656 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1657 (the_low_target): Install it.
1658
1659 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1660
1661 * acinclude.m4: Include new ../warning.m4 file.
1662 * configure: Regenerated.
1663 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1664
1665 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1666
1667 * ax.c (is_goto_target): Mark static.
1668 * linux-low.c (register_addr): Likewise.
1669 (linux_fetch_registers, linux_store_registers): Likewise.
1670 * mem-break.c (any_persistent_commands): Fix old prototype.
1671 (add_commands_to_breakpoint): Mark static.
1672 * regcache.c (find_register_by_name): Delete unused func.
1673 * remote-utils.c (hex_or_minus_one): Mark static.
1674 * server.c (monitor_show_help): Mark static.
1675 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1676 handle_v_requests): Likewise.
1677
1678 2016-01-12 Pedro Alves <palves@redhat.com>
1679
1680 Remove use of the registered trademark symbol throughout.
1681
1682 2016-01-08 Yao Qi <yao.qi@linaro.org>
1683
1684 * remote-utils.c (getpkt): If c is '\003', call target hook
1685 request_interrupt.
1686
1687 2016-01-06 Yao Qi <yao.qi@linaro.org>
1688
1689 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1690 linux-aarch32-low.c.
1691 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1692 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1693 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1694 (thumb2_breakpoint): Declare.
1695 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1696 linux-aarch32-low.h.
1697 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1698 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1699 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1700
1701 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1702
1703 * gdbreplay.c (gdbreplay_version): Change copyright year in
1704 version message.
1705 * server.c (gdbserver_version): Likewise.
1706
1707 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1708
1709 * server.c (crc32_table): Delete.
1710 (crc32): Use libiberty's xcrc32 function.
1711
1712 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1713
1714 * lynx-low.c (lynx_delete_thread_callback): New function.
1715 (lynx_mourn): Properly delete our process and all of its
1716 threads. Remove call to clear_inferiors.
1717
1718 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1719
1720 * target.c (thread_search_callback): Add check that
1721 the thread_stopped target callback is not NULL before
1722 calling it.
1723
1724 2015-12-21 Yao Qi <yao.qi@linaro.org>
1725
1726 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1727 arm breakpoint.
1728
1729 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1730
1731 * server.c (handle_query): Call target_supports_software_single_step.
1732
1733 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1734
1735 * linux-low.c (single_step): New function.
1736 (linux_resume_one_lwp_throw): Call single_step.
1737 (start_step_over): Likewise.
1738
1739 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1740
1741 * Makefile.in (SFILES): Append arch/arm-linux.c,
1742 arch/arm-get-next-pcs.c.
1743 (arm-linux.o): New rule.
1744 (arm-get-next-pcs.o): New rule.
1745 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1746 arm-linux.o.
1747 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1748 to linux-aarch32-low.c.
1749 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1750 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1751 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1752 (thumb2_breakpoint_len): Likewise.
1753 (arm_is_thumb_mode): Make non-static.
1754 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1755 from linux-aarch32-low.c.
1756 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1757 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1758 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1759 (thumb2_breakpoint_len): Likewise.
1760 (arm_is_thumb_mode): New declaration.
1761 * linux-arm-low.c: Include arch/arm-linux.h
1762 aarch/arm-get-next-pcs.h, sys/syscall.h.
1763 (get_next_pcs_ops): New struct.
1764 (get_next_pcs_addr_bits_remove): New function.
1765 (get_next_pcs_is_thumb): New function.
1766 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1767 (arm_sigreturn_next_pc): Likewise.
1768 (get_next_pcs_syscall_next_pc): Likewise.
1769 (arm_gdbserver_get_next_pcs): Likewise.
1770 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1771 Initialize.
1772 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1773 * server.h: Include gdb_vecs.h.
1774
1775 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1776
1777 * Makefile.in (SFILES): Append common/common-regcache.c.
1778 (OBS): Append common-regcache.o.
1779 (common-regcache.o): New rule.
1780 * regcache.c (init_register_cache): Initialize cache to
1781 REG_UNAVAILABLE.
1782 (regcache_raw_read_unsigned): New function.
1783 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1784 register_status enum.
1785
1786 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1787
1788 * linux-aarch64-low.c (the_low_targets): Rename
1789 breakpoint_reinsert_addr to get_next_pcs.
1790 * linux-arm-low.c (the_low_targets): Likewise.
1791 * linux-bfin-low.c (the_low_targets): Likewise.
1792 * linux-cris-low.c (the_low_targets): Likewise.
1793 * linux-crisv32-low.c (the_low_targets): Likewise.
1794 * linux-low.c (can_software_single_step): Likewise.
1795 (install_software_single_step_breakpoints): New function.
1796 (start_step_over): Use install_software_single_step_breakpoints.
1797 * linux-low.h: New CORE_ADDR vector.
1798 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1799 get_next_pcs.
1800 * linux-mips-low.c (the_low_targets): Likewise.
1801 * linux-nios2-low.c (the_low_targets): Likewise.
1802 * linux-sparc-low.c (the_low_targets): Likewise.
1803
1804 2015-12-17 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (linux_kill_one_lwp): Remove references to
1807 LinuxThreads.
1808 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1809 to 'kill'.
1810 (linux_init_signals): Delete.
1811 (initialize_low): Adjust.
1812 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1813
1814 2015-12-16 Pedro Alves <palves@redhat.com>
1815
1816 * configure.ac (compiler warning flags): When testing a
1817 -Wno-foo option, check whether -Wfoo works instead.
1818 * configure: Regenerate.
1819
1820 2015-12-11 Don Breazeal <donb@codesourcery.com>
1821
1822 * server.c (process_serial_event): Don't exit from gdbserver
1823 in remote mode if there are still active inferiors.
1824
1825 2015-12-11 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1828 arm_breakpoint_at if the process is 32-bit.
1829
1830 2015-12-11 Yao Qi <yao.qi@linaro.org>
1831
1832 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1833 arm breakpoint.
1834
1835 2015-12-07 Yao Qi <yao.qi@linaro.org>
1836
1837 * configure.srv: Append arm.o to srv_tgtobj for
1838 aarch64*-*-linux* target.
1839 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1840 from linux-arm-low.c.
1841 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1842 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1843 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1844 (thumb2_breakpoint_len): Likewise.
1845 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1846 (arm_breakpoint_kinds): Likewise.
1847 (arm_breakpoint_kind_from_pc): Likewise.
1848 (arm_sw_breakpoint_from_kind): Likewise.
1849 (arm_breakpoint_kind_from_current_state): Likewise.
1850 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1851 (arm_sw_breakpoint_from_kind): Declare.
1852 (arm_breakpoint_kind_from_current_state): Declare.
1853 (arm_breakpoint_at): Declare.
1854 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1855 arm_sw_breakpoint_from_kind if process is 32-bit.
1856 (aarch64_breakpoint_kind_from_pc): New function.
1857 (aarch64_breakpoint_kind_from_current_state): New function.
1858 (the_low_target): Initialize fields breakpoint_kind_from_pc
1859 and breakpoint_kind_from_current_state.
1860 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1861 linux-aarch32-low.c.
1862 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1863 (arm_breakpoint, arm_breakpoint_len): Likewise.
1864 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1865 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1866 (arm_is_thumb_mode): Likewise.
1867 (arm_breakpoint_at): Likewise.
1868 (arm_breakpoint_kind_from_pc): Likewise.
1869 (arm_sw_breakpoint_from_kind): Likewise.
1870 (arm_breakpoint_kind_from_current_state): Likewise.
1871
1872 Revert:
1873 2015-08-04 Yao Qi <yao.qi@linaro.org>
1874
1875 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1876 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1877 * server.c (extended_protocol): Remove "static".
1878 * server.h (extended_protocol): Declare it.
1879
1880 2015-12-04 Josh Stone <jistone@redhat.com>
1881
1882 * target.h (struct target_ops) <arch_setup>: Rename to ...
1883 (struct target_ops) <post_create_inferior>: ... this.
1884 (target_arch_setup): Rename to ...
1885 (target_post_create_inferior): ... this, calling post_create_inferior.
1886 * server.c (start_inferior): Update target_arch_setup calls to
1887 target_post_create_inferior.
1888 * linux-low.c (linux_low_ptrace_options): Forward declare.
1889 (linux_arch_setup): Update its comment for general use.
1890 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1891 (struct linux_target_ops): Use linux_post_create_inferior.
1892 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1893 to post_create_inferior.
1894 * nto-low.c (struct nto_target_ops): Likewise.
1895 * spu-low.c (struct spu_target_ops): Likewise.
1896 * win32-low.c (struct win32_target_ops): Likewise.
1897
1898 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1899
1900 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1901
1902 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1903
1904 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1905 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1906 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1907 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1908 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1909 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1910 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1911 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1912 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1913 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1914 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1915 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1916
1917 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1918
1919 * linux-low.c (linux_look_up_symbols): Don't call
1920 linux_supports_traceclone.
1921 * linux-low.h (thread_db_init): Remove use_events argument.
1922 * thread-db.c (thread_db_use_event): Remove global variable.
1923 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1924 (struct thread_db) <td_create_bp>: Remove field.
1925 (thread_db_create_event): Remove function.
1926 (thread_db_enable_reporting): Likewise.
1927 (find_one_thread): Don't check for thread_db_use_events.
1928 (attach_thread): Likewise.
1929 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1930 (try_thread_db_load_1): Don't check for thread_db_use_events.
1931 (thread_db_init): Remove use_events argument and thread events
1932 handling.
1933 (remove_thread_event_breakpoints): Remove function.
1934 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1935
1936 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1937
1938 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1939 New function.
1940 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1941 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1942 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1943 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1944 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1945 Initialize.
1946 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1947 New function.
1948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1949 * linux-low.c (can_hardware_single_step): Use
1950 supports_hardware_single_step.
1951 (can_software_single_step): New function.
1952 (start_step_over): Call can_software_single_step.
1953 (linux_supports_hardware_single_step): New function.
1954 (struct target_ops) <supports_software_single_step>: Initialize.
1955 * linux-low.h (struct linux_target_ops)
1956 <supports_hardware_single_step>: Initialize.
1957 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1958 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1959 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1960 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1961 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1963 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1964 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1965 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1966 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1967 Initialize.
1968 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1969 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1970 Initialize.
1971 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1973 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1974 New function.
1975 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1976 * target.h (struct target_ops): <supports_software_single_step>:
1977 New field.
1978 (target_supports_software_single_step): New macro.
1979
1980 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1981
1982 * linux-low.c (linux_wait_1): Fix pc advance condition.
1983 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1984 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1985
1986 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1987
1988 * linux-arm-low.c (arm_is_thumb_mode): New function.
1989 (arm_breakpoint_at): Use arm_is_thumb_mode.
1990 (arm_breakpoint_kind_from_current_state): New function.
1991 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1992 Initialize.
1993 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1994 (linux_breakpoint_kind_from_current_state): New function.
1995 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1996 * linux-low.h (struct linux_target_ops)
1997 <breakpoint_kind_from_current_state>: New field.
1998 * target.h (struct target_ops): Likewise.
1999 (target_breakpoint_kind_from_current_state): New macro.
2000
2001 2015-11-30 Pedro Alves <palves@redhat.com>
2002
2003 * linux-low.c (linux_resume): Wake up the event loop before
2004 returning.
2005
2006 2015-11-30 Pedro Alves <palves@redhat.com>
2007
2008 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2009 check.
2010 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2011 to -1.
2012 * target.c (struct thread_search): New structure.
2013 (thread_search_callback): New function.
2014 (prev_general_thread): New global.
2015 (prepare_to_access_memory, done_accessing_memory): New functions.
2016 * target.h (prepare_to_access_memory, done_accessing_memory):
2017 Replace macros with function declarations.
2018
2019 2015-11-30 Pedro Alves <palves@redhat.com>
2020
2021 PR 14618
2022 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2023 report TARGET_WAITKIND_NO_RESUMED.
2024 * remote-utils.c (prepare_resume_reply): Handle
2025 TARGET_WAITKIND_NO_RESUMED.
2026 * server.c (report_no_resumed): New global.
2027 (handle_query) <qSupported>: Handle "no-resumed+". Report
2028 "no-resumed+" support.
2029 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2030 return error if the client doesn't support no-resumed events.
2031 (push_stop_notification): New function.
2032 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2033 events if the client supports them.
2034
2035 2015-11-30 Pedro Alves <palves@redhat.com>
2036
2037 * linux-low.c (thread_still_has_status_pending_p): Don't check
2038 vCont;t here.
2039 (lwp_resumed): New function.
2040 (status_pending_p_callback): Return early if the LWP is not
2041 supposed to be resumed.
2042
2043 2015-11-30 Pedro Alves <palves@redhat.com>
2044
2045 * linux-low.c (handle_extended_wait): Assert that the LWP's
2046 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2047 thread create events, leave the new child's status pending.
2048 (linux_low_filter_event): If GDB wants to hear about thread exit
2049 events, leave the LWP marked dead and don't delete it.
2050 (linux_wait_for_event_filtered): Don't check for thread exit.
2051 (filter_exit_event): New function.
2052 (linux_wait_1): Use it, when returning an exit event.
2053 (linux_resume_one_lwp_throw): Assert that the LWP's
2054 waitstatus is TARGET_WAITKIND_IGNORE.
2055 * remote-utils.c (prepare_resume_reply): Handle
2056 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2057 * server.c (report_thread_events): New global.
2058 (handle_general_set): Handle QThreadEvents.
2059 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2060 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2061 TARGET_WAITKIND_THREAD_EXITED.
2062 * server.h (report_thread_events): Declare.
2063
2064 2015-11-30 Pedro Alves <palves@redhat.com>
2065
2066 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2067 the thread's last_resume_kind was resume_stop.
2068
2069 2015-11-30 Pedro Alves <palves@redhat.com>
2070
2071 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2072 before returning.
2073
2074 2015-11-30 Pedro Alves <palves@redhat.com>
2075
2076 * server.c (handle_v_requests): Handle vCtrlC.
2077
2078 2015-11-30 Pedro Alves <palves@redhat.com>
2079
2080 * gdbthread.h (find_any_thread_of_pid): Declare.
2081 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2082 functions.
2083 * server.c (handle_query): If current_thread is NULL, look for
2084 another thread of the selected process.
2085
2086 2015-11-26 Daniel Colascione <dancol@dancol.org>
2087 Simon Marchi <simon.marchi@ericsson.com>
2088
2089 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2090 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2091 name in reply.
2092 * target.h (struct target_ops) <thread_name>: New field.
2093 (target_thread_name): New macro.
2094
2095 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2096
2097 * regcache.h (regcache_invalidate_pid): Add declaration.
2098 * regcache.c (regcache_invalidate_pid): New function, extracted
2099 from regcache_invalidate.
2100 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2101 Add trivial documentation comment.
2102 * lynx-low.c: Use regcache_invalidate_pid instead of
2103 regcache_invalidate.
2104
2105 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2106
2107 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2108 and Elf64_auxv_t if the target is Android.
2109
2110 2015-11-22 Doug Evans <xdje42@gmail.com>
2111
2112 * target.h: #include <sys/types.h>.
2113
2114 2015-11-19 Pedro Alves <palves@redhat.com>
2115
2116 * linux-low.c (linux_process_qsupported): Change prototype.
2117 Adjust.
2118 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2119 Change prototype.
2120 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2121 and adjust to loop over all features.
2122 * server.c (handle_query) <qSupported>: Adjust to call
2123 target_process_qsupported once, passing it a vector of unprocessed
2124 features.
2125 * target.h (struct target_ops) <process_qsupported>: Change
2126 prototype.
2127 (target_process_qsupported): Adjust.
2128
2129 2015-11-19 Pedro Alves <palves@redhat.com>
2130
2131 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2132 mode.
2133 * configure: Regenerate.
2134
2135 2015-11-19 Pedro Alves <palves@redhat.com>
2136
2137 * configure: Regenerate.
2138
2139 2015-11-19 Yao Qi <yao.qi@linaro.org>
2140
2141 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2142 type to uint32_t.
2143
2144 2015-11-19 Yao Qi <yao.qi@linaro.org>
2145
2146 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2147 (struct aarch64_operand): Move enum out.
2148
2149 2015-11-19 Yao Qi <yao.qi@linaro.org>
2150
2151 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2152 struct user_fpsimd_state *.
2153 (aarch64_store_fpregset): Likewise.
2154
2155 2015-11-19 Yao Qi <yao.qi@linaro.org>
2156
2157 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2158 struct user_pt_regs *.
2159 (aarch64_store_gregset): Likewise.
2160
2161 2015-11-18 Pedro Alves <palves@redhat.com>
2162
2163 * Makefile.in (all_object_files): Add $IPA_OBJS.
2164
2165 2015-11-17 Pedro Alves <palves@redhat.com>
2166
2167 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2168 GDB_SIGNAL_0 and gdb_signal_to_string.
2169
2170 2015-11-17 Pedro Alves <palves@redhat.com>
2171
2172 * win32-low.c (handle_output_debug_string): Remove parameter.
2173 (win32_kill): Remove our_status local and adjust call to
2174 handle_output_debug_string.
2175 (get_child_debug_event): Adjust call to
2176 handle_output_debug_string.
2177
2178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2179
2180 * linux-mips-low.c (mips_fill_gregset): Add cast.
2181 (mips_store_gregset): Likewise.
2182 (mips_fill_fpregset): Likewise.
2183 (mips_store_fpregset): Likewise.
2184
2185 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2186
2187 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2188 priv.
2189
2190 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2191
2192 * linux-mips-low.c (mips_linux_new_thread): Change type of
2193 watch_type to enum target_hw_bp_type.
2194
2195 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2196
2197 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2198 Change return type to arm_hwbp_type.
2199
2200 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2201
2202 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2203 (arm_store_gregset): Likewise.
2204 * linux-arm-low.c (arm_get_hwcap): Likewise.
2205 (arm_read_description): Likewise.
2206
2207 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2208
2209 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2210
2211 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2212
2213 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2214 (ppc_fill_vsxregset): Likewise.
2215 (ppc_store_vsxregset): Likewise.
2216 (ppc_fill_vrregset): Likewise.
2217 (ppc_store_vrregset): Likewise.
2218 (ppc_fill_evrregset): Likewise.
2219 (ppc_store_evrregset): Likewise.
2220
2221 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2222
2223 * linux-ppc-low.c (ppc_usrregs_info): Remove
2224 forward-declaration.
2225 (ppc_arch_setup): Move lower in file.
2226
2227 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2228
2229 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2230 (ps_pdwrite): Likewise.
2231
2232 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2233
2234 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2235 to after assert checks.
2236
2237 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * proc-service.c (ps_pdread): Add/adjust casts.
2240 (ps_pdwrite): Add/adjust casts.
2241
2242 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2243
2244 * server.c (handle_search_memory_1): Cast return value of
2245 memmem.
2246
2247 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2248
2249 * server.c (write_qxfer_response): Change type of data to
2250 gdb_byte *.
2251
2252 2015-10-29 Pedro Alves <palves@redhat.com>
2253
2254 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2255
2256 2015-10-29 Pedro Alves <palves@redhat.com>
2257
2258 * tracepoint.c (clear_installed_tracepoints): Add casts.
2259
2260 2015-10-29 Pedro Alves <palves@redhat.com>
2261
2262 * server.c (handle_v_cont, process_serial_event): Add enum
2263 gdb_signal casts to signal parsing code.
2264
2265 2015-10-29 Pedro Alves <palves@redhat.com>
2266
2267 * linux-low.h (NULL_REGSET): Define.
2268 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2269 * linux-arm-low.c (arm_regsets): Likewise.
2270 * linux-crisv32-low.c (cris_regsets): Likewise.
2271 * linux-m68k-low.c (m68k_regsets): Likewise.
2272 * linux-mips-low.c (mips_regsets): Likewise.
2273 * linux-nios2-low.c (nios2_regsets): Likewise.
2274 * linux-ppc-low.c (ppc_regsets): Likewise.
2275 * linux-s390-low.c (s390_regsets): Likewise.
2276 * linux-sh-low.c (sh_regsets): Likewise.
2277 * linux-sparc-low.c (sparc_regsets): Likewise.
2278 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2279 * linux-tile-low.c (tile_regsets): Likewise.
2280 * linux-x86-low.c (x86_regsets): Likewise.
2281 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2282
2283 2015-10-29 Pedro Alves <palves@redhat.com>
2284
2285 * linux-low.h (NULL_REGSET): Define.
2286 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2287 * linux-arm-low.c (arm_regsets): Likewise.
2288 * linux-crisv32-low.c (cris_regsets): Likewise.
2289 * linux-m68k-low.c (m68k_regsets): Likewise.
2290 * linux-mips-low.c (mips_regsets): Likewise.
2291 * linux-nios2-low.c (nios2_regsets): Likewise.
2292 * linux-ppc-low.c (ppc_regsets): Likewise.
2293 * linux-s390-low.c (s390_regsets): Likewise.
2294 * linux-sh-low.c (sh_regsets): Likewise.
2295 * linux-sparc-low.c (sparc_regsets): Likewise.
2296 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2297 * linux-tile-low.c (tile_regsets): Likewise.
2298 * linux-x86-low.c (x86_regsets): Likewise.
2299 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2300
2301 2015-10-26 Doug Evans <dje@google.com>
2302
2303 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2304
2305 2015-10-26 Doug Evans <dje@google.com>
2306
2307 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2308
2309 2015-10-26 Doug Evans <dje@google.com>
2310
2311 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2312 for debug_printf.
2313 (attach_thread, find_new_threads_callback): Ditto.
2314
2315 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2316
2317 * mem-break.h (set_breakpoint_data): Remove.
2318
2319 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2320
2321 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2322 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2323 (initialize_low): Remove set_breakpoint_data call.
2324 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2325 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2326 (initialize_low): Remove set_breakpoint_data call.
2327 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2328 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2329 (initialize_low): Remove set_breakpoint_data call.
2330
2331 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2332
2333 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2334 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2335 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2336 * target.h (target_breakpoint_kind_from_pc): New macro.
2337
2338 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2339
2340 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2341 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2342 the default breakpoint kind.
2343
2344 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2345
2346 * linux-arm-low.c (arm_supports_z_point_type): Add software
2347 breakpoint support.
2348
2349 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2350
2351 * linux-arm-low.c: Refactor breakpoint definitions.
2352 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2353 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2354
2355 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2356
2357 * Makefile.in: Add arm.c/o.
2358 * configure.srv: Likewise.
2359 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2360 (arm_breakpoint_kind_from_pc): New function.
2361 (arm_sw_breakpoint_from_kind): Return proper kind.
2362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2363
2364 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2365
2366 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2367 removal.
2368 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2369 (struct raw_breakpoint) <size>: Remove.
2370 (struct raw_breakpoint) <kind>: Add.
2371 (bp_size): New function.
2372 (bp_opcode): Likewise.
2373 (find_raw_breakpoint_at): Adjust for kind.
2374 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2375 (remove_memory_breakpoint): Adjust for kind call bp_size.
2376 (set_raw_breakpoint_at): Adjust for kind.
2377 (set_breakpoint): Likewise.
2378 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2379 (delete_raw_breakpoint): Adjust for kind.
2380 (delete_breakpoint): Likewise.
2381 (find_gdb_breakpoint): Likewise.
2382 (set_gdb_breakpoint_1): Likewise.
2383 (set_gdb_breakpoint): Likewise.
2384 (delete_gdb_breakpoint_1): Likewise.
2385 (delete_gdb_breakpoint): Likewise.
2386 (uninsert_raw_breakpoint): Likewise.
2387 (reinsert_raw_breakpoint): Likewise.
2388 (set_breakpoint_data): Remove.
2389 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2390 (check_mem_read): Adjust for kind call bp_size.
2391 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2392 (clone_one_breakpoint): Adjust for kind.
2393 * mem-break.h (set_gdb_breakpoint): Likewise.
2394 (delete_gdb_breakpoint): Likewise.
2395 * server.c (process_serial_event): Likewise.
2396
2397 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2398
2399 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2400 (struct linux_target_ops) <breakpoint>: Remove.
2401 (struct linux_target_ops) <breakpoint_len>: Remove.
2402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2404 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2405 (arm_sw_breakpoint_from_kind): New function.
2406 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2407 (struct linux_target_ops) <breakpoint>: Remove.
2408 (struct linux_target_ops) <breakpoint_len>: Remove.
2409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2411 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2412 (struct linux_target_ops) <breakpoint>: Remove.
2413 (struct linux_target_ops) <breakpoint_len>: Remove.
2414 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2416 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2417 (struct linux_target_ops) <breakpoint>: Remove.
2418 (struct linux_target_ops) <breakpoint_len>: Remove.
2419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2421 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2422 and sw_breakpoint_from_kind to increment the pc.
2423 (linux_breakpoint_kind_from_pc): New function.
2424 (linux_sw_breakpoint_from_kind): New function.
2425 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2426 (initialize_low): Call breakpoint_kind_from_pc and
2427 sw_breakpoint_from_kind to replace breakpoint_data/len.
2428 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2429 New field.
2430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2431 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2432 (struct linux_target_ops) <breakpoint>: Remove.
2433 (struct linux_target_ops) <breakpoint_len>: Remove.
2434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2436 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2437 (struct linux_target_ops) <breakpoint>: Remove.
2438 (struct linux_target_ops) <breakpoint_len>: Remove.
2439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2441 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2442 (struct linux_target_ops) <breakpoint>: Remove.
2443 (struct linux_target_ops) <breakpoint_len>: Remove.
2444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2446 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2447 (struct linux_target_ops) <breakpoint>: Remove.
2448 (struct linux_target_ops) <breakpoint_len>: Remove.
2449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2451 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2452 (struct linux_target_ops) <breakpoint>: Remove.
2453 (struct linux_target_ops) <breakpoint_len>: Remove.
2454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2456 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2457 (struct linux_target_ops) <breakpoint>: Remove.
2458 (struct linux_target_ops) <breakpoint_len>: Remove.
2459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2461 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2462 (struct linux_target_ops) <breakpoint>: Remove.
2463 (struct linux_target_ops) <breakpoint_len>: Remove.
2464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2477 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2478 (struct linux_target_ops) <breakpoint>: Remove.
2479 (struct linux_target_ops) <breakpoint_len>: Remove.
2480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2482 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2483 (struct linux_target_ops) <breakpoint>: Remove.
2484 (struct linux_target_ops) <breakpoint_len>: Remove.
2485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2487
2488 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2489
2490 * linux-cris-low.c (cris_get_pc): Remove void arg.
2491
2492 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2493
2494 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2495 variable name.
2496
2497 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2498
2499 * inferiors.c (thread_pid_matches_callback): New function.
2500 (find_thread_process): New function.
2501 (remove_thread): Reset current_thread.
2502 (remove_process): Assert threads have been removed first.
2503
2504 2015-10-15 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2507 if it is 3.
2508 (aarch64_remove_point): Likewise.
2509 * regcache.c (regcache_register_size): New function.
2510
2511 2015-10-12 Yao Qi <yao.qi@linaro.org>
2512
2513 * linux-aarch64-low.c: Update all callers as emit_load_store
2514 is renamed to aarch64_emit_load_store.
2515
2516 2015-10-12 Yao Qi <yao.qi@linaro.org>
2517
2518 * linux-aarch64-low.c: Update all callers of function renaming
2519 from emit_insn to aarch64_emit_insn.
2520
2521 2015-10-12 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2524 arch/aarch64-insn.h.
2525 (struct aarch64_memory_operand): Likewise.
2526 (ENCODE): Likewise.
2527 (emit_insn): Move to arch/aarch64-insn.c.
2528 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2529 (emit_load_store): Move to arch/aarch64-insn.c.
2530 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2531 (can_encode_int32): Remove.
2532
2533 2015-10-12 Yao Qi <yao.qi@linaro.org>
2534
2535 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2536 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2537 (aarch64_relocate_instruction): Likewise.
2538 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2539 (struct aarch64_insn_visitor): Likewise.
2540
2541 2015-10-12 Yao Qi <yao.qi@linaro.org>
2542
2543 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2544 (struct aarch64_insn_visitor): New.
2545 (struct aarch64_insn_relocation_data): New.
2546 (aarch64_ftrace_insn_reloc_b): New function.
2547 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2548 (aarch64_ftrace_insn_reloc_cb): Likewise.
2549 (aarch64_ftrace_insn_reloc_tb): Likewise.
2550 (aarch64_ftrace_insn_reloc_adr): Likewise.
2551 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2552 (aarch64_ftrace_insn_reloc_others): Likewise.
2553 (visitor): New.
2554 (aarch64_relocate_instruction): Use visitor.
2555
2556 2015-10-12 Yao Qi <yao.qi@linaro.org>
2557
2558 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2559 int. Add argument buf.
2560 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2561 aarch64_relocate_instruction.
2562
2563 2015-10-12 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2566 argument insn. Remove local variable insn. Don't call
2567 target_read_uint32.
2568 (aarch64_install_fast_tracepoint_jump_pad): Call
2569 target_read_uint32.
2570
2571 2015-09-30 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2574 (emit_load_store_pair): Likewise.
2575
2576 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * dll.c (match_dll): Add cast(s).
2579 (unloaded_dll): Likewise.
2580 * linux-low.c (second_thread_of_pid_p): Likewise.
2581 (delete_lwp_callback): Likewise.
2582 (count_events_callback): Likewise.
2583 (select_event_lwp_callback): Likewise.
2584 (linux_set_resume_request): Likewise.
2585 * server.c (accumulate_file_name_length): Likewise.
2586 (emit_dll_description): Likewise.
2587 (handle_qxfer_threads_worker): Likewise.
2588 (visit_actioned_threads): Likewise.
2589 * thread-db.c (any_thread_of): Likewise.
2590 * tracepoint.c (same_process_p): Likewise.
2591 (match_blocktype): Likewise.
2592 (build_traceframe_info_xml): Likewise.
2593
2594 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2595
2596 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2597 assignment.
2598 (gdb_unparse_agent_expr): Likewise.
2599 * hostio.c (require_data): Likewise.
2600 (handle_pread): Likewise.
2601 * linux-low.c (disable_regset): Likewise.
2602 (fetch_register): Likewise.
2603 (store_register): Likewise.
2604 (get_dynamic): Likewise.
2605 (linux_qxfer_libraries_svr4): Likewise.
2606 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2607 (set_fast_tracepoint_jump): Likewise.
2608 (uninsert_fast_tracepoint_jumps_at): Likewise.
2609 (reinsert_fast_tracepoint_jumps_at): Likewise.
2610 (validate_inserted_breakpoint): Likewise.
2611 (clone_agent_expr): Likewise.
2612 * regcache.c (init_register_cache): Likewise.
2613 * remote-utils.c (putpkt_binary_1): Likewise.
2614 (decode_M_packet): Likewise.
2615 (decode_X_packet): Likewise.
2616 (look_up_one_symbol): Likewise.
2617 (relocate_instruction): Likewise.
2618 (monitor_output): Likewise.
2619 * server.c (handle_search_memory): Likewise.
2620 (handle_qxfer_exec_file): Likewise.
2621 (handle_qxfer_libraries): Likewise.
2622 (handle_qxfer): Likewise.
2623 (handle_query): Likewise.
2624 (handle_v_cont): Likewise.
2625 (handle_v_run): Likewise.
2626 (captured_main): Likewise.
2627 * target.c (write_inferior_memory): Likewise.
2628 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2629 * tracepoint.c (init_trace_buffer): Likewise.
2630 (add_tracepoint_action): Likewise.
2631 (add_traceframe): Likewise.
2632 (add_traceframe_block): Likewise.
2633 (cmd_qtdpsrc): Likewise.
2634 (cmd_qtdv): Likewise.
2635 (cmd_qtstatus): Likewise.
2636 (response_source): Likewise.
2637 (response_tsv): Likewise.
2638 (cmd_qtnotes): Likewise.
2639 (gdb_collect): Likewise.
2640 (initialize_tracepoint): Likewise.
2641
2642 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2643
2644 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2645 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2646 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2647 <NOP>: New.
2648 (enum aarch64_condition_codes): New enum.
2649 (w0): New static global.
2650 (fp): Likewise.
2651 (lr): Likewise.
2652 (struct aarch64_memory_operand) <type>: New
2653 MEMORY_OPERAND_POSTINDEX type.
2654 (postindex_memory_operand): New helper function.
2655 (emit_ret): New function.
2656 (emit_load_store_pair): New function, factored out of emit_stp
2657 with support for MEMORY_OPERAND_POSTINDEX.
2658 (emit_stp): Rewrite using emit_load_store_pair.
2659 (emit_ldp): New function.
2660 (emit_load_store): Likewise.
2661 (emit_ldr): Mention post-index instruction in comment.
2662 (emit_ldrh): New function.
2663 (emit_ldrb): New function.
2664 (emit_ldrsw): Mention post-index instruction in comment.
2665 (emit_str): Likewise.
2666 (emit_subs): New function.
2667 (emit_cmp): Likewise.
2668 (emit_and): Likewise.
2669 (emit_orr): Likewise.
2670 (emit_orn): Likewise.
2671 (emit_eor): Likewise.
2672 (emit_mvn): Likewise.
2673 (emit_lslv): Likewise.
2674 (emit_lsrv): Likewise.
2675 (emit_asrv): Likewise.
2676 (emit_mul): Likewise.
2677 (emit_sbfm): Likewise.
2678 (emit_sbfx): Likewise.
2679 (emit_ubfm): Likewise.
2680 (emit_ubfx): Likewise.
2681 (emit_csinc): Likewise.
2682 (emit_cset): Likewise.
2683 (emit_nop): Likewise.
2684 (emit_ops_insns): New helper function.
2685 (emit_pop): Likewise.
2686 (emit_push): Likewise.
2687 (aarch64_emit_prologue): New function.
2688 (aarch64_emit_epilogue): Likewise.
2689 (aarch64_emit_add): Likewise.
2690 (aarch64_emit_sub): Likewise.
2691 (aarch64_emit_mul): Likewise.
2692 (aarch64_emit_lsh): Likewise.
2693 (aarch64_emit_rsh_signed): Likewise.
2694 (aarch64_emit_rsh_unsigned): Likewise.
2695 (aarch64_emit_ext): Likewise.
2696 (aarch64_emit_log_not): Likewise.
2697 (aarch64_emit_bit_and): Likewise.
2698 (aarch64_emit_bit_or): Likewise.
2699 (aarch64_emit_bit_xor): Likewise.
2700 (aarch64_emit_bit_not): Likewise.
2701 (aarch64_emit_equal): Likewise.
2702 (aarch64_emit_less_signed): Likewise.
2703 (aarch64_emit_less_unsigned): Likewise.
2704 (aarch64_emit_ref): Likewise.
2705 (aarch64_emit_if_goto): Likewise.
2706 (aarch64_emit_goto): Likewise.
2707 (aarch64_write_goto_address): Likewise.
2708 (aarch64_emit_const): Likewise.
2709 (aarch64_emit_call): Likewise.
2710 (aarch64_emit_reg): Likewise.
2711 (aarch64_emit_pop): Likewise.
2712 (aarch64_emit_stack_flush): Likewise.
2713 (aarch64_emit_zero_ext): Likewise.
2714 (aarch64_emit_swap): Likewise.
2715 (aarch64_emit_stack_adjust): Likewise.
2716 (aarch64_emit_int_call_1): Likewise.
2717 (aarch64_emit_void_call_2): Likewise.
2718 (aarch64_emit_eq_goto): Likewise.
2719 (aarch64_emit_ne_goto): Likewise.
2720 (aarch64_emit_lt_goto): Likewise.
2721 (aarch64_emit_le_goto): Likewise.
2722 (aarch64_emit_gt_goto): Likewise.
2723 (aarch64_emit_ge_got): Likewise.
2724 (aarch64_emit_ops_impl): New static global variable.
2725 (aarch64_emit_ops): New target function, return
2726 &aarch64_emit_ops_impl.
2727 (struct linux_target_ops): Install it.
2728
2729 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2730
2731 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2732 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2733 aarch64-ipa.o.
2734 * linux-aarch64-ipa.c: New file.
2735 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2736 and endian.h.
2737 (aarch64_get_thread_area): New target method.
2738 (extract_signed_bitfield): New helper function.
2739 (aarch64_decode_ldr_literal): New function.
2740 (enum aarch64_opcodes): New enum.
2741 (struct aarch64_register): New struct.
2742 (struct aarch64_operand): New struct.
2743 (x0): New static global.
2744 (x1): Likewise.
2745 (x2): Likewise.
2746 (x3): Likewise.
2747 (x4): Likewise.
2748 (w2): Likewise.
2749 (ip0): Likewise.
2750 (sp): Likewise.
2751 (xzr): Likewise.
2752 (aarch64_register): New helper function.
2753 (register_operand): Likewise.
2754 (immediate_operand): Likewise.
2755 (struct aarch64_memory_operand): New struct.
2756 (offset_memory_operand): New helper function.
2757 (preindex_memory_operand): Likewise.
2758 (enum aarch64_system_control_registers): New enum.
2759 (ENCODE): New macro.
2760 (emit_insn): New helper function.
2761 (emit_b): New function.
2762 (emit_bcond): Likewise.
2763 (emit_cb): Likewise.
2764 (emit_tb): Likewise.
2765 (emit_blr): Likewise.
2766 (emit_stp): Likewise.
2767 (emit_ldp_q_offset): Likewise.
2768 (emit_stp_q_offset): Likewise.
2769 (emit_load_store): Likewise.
2770 (emit_ldr): Likewise.
2771 (emit_ldrsw): Likewise.
2772 (emit_str): Likewise.
2773 (emit_ldaxr): Likewise.
2774 (emit_stxr): Likewise.
2775 (emit_stlr): Likewise.
2776 (emit_data_processing_reg): Likewise.
2777 (emit_data_processing): Likewise.
2778 (emit_add): Likewise.
2779 (emit_sub): Likewise.
2780 (emit_mov): Likewise.
2781 (emit_movk): Likewise.
2782 (emit_mov_addr): Likewise.
2783 (emit_mrs): Likewise.
2784 (emit_msr): Likewise.
2785 (emit_sevl): Likewise.
2786 (emit_wfe): Likewise.
2787 (append_insns): Likewise.
2788 (can_encode_int32_in): New helper function.
2789 (aarch64_relocate_instruction): New function.
2790 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2791 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2792 (struct linux_target_ops): Install aarch64_get_thread_area,
2793 aarch64_install_fast_tracepoint_jump_pad and
2794 aarch64_get_min_fast_tracepoint_insn_len.
2795
2796 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2797
2798 * Makefile.in (aarch64-insn.o): New rule.
2799 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2800
2801 2015-09-21 Yao Qi <yao.qi@linaro.org>
2802
2803 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2804
2805 2015-09-21 Yao Qi <yao.qi@linaro.org>
2806
2807 * tracepoint.c (max_jump_pad_size): Remove.
2808
2809 2015-09-18 Yao Qi <yao.qi@linaro.org>
2810
2811 * linux-aarch64-low.c: Don't include sys/uio.h.
2812 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2813
2814 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2815
2816 * tracepoint.c (eval_result_type): Change prototype.
2817 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2818
2819 2015-09-15 Pedro Alves <palves@redhat.com>
2820
2821 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2822 Check whether to report exec events instead of checking whether
2823 multiprocess is enabled.
2824
2825 2015-09-15 Pedro Alves <palves@redhat.com>
2826
2827 PR remote/18965
2828 * remote-utils.c (prepare_resume_reply): Merge
2829 TARGET_WAITKIND_VFORK_DONE switch case with the
2830 TARGET_WAITKIND_FORKED case.
2831
2832 2015-09-15 Yao Qi <yao.qi@linaro.org>
2833
2834 * server.c (handle_query): Check string comparison using
2835 "else if" instead of "if".
2836
2837 2015-09-15 Yao Qi <yao.qi@linaro.org>
2838
2839 * server.c (vCont_supported): New global variable.
2840 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2841 matches. Append ";vContSupported+" to own_buf.
2842 (handle_v_requests): Append ";s;S" to own_buf if target supports
2843 hardware single step or vCont_supported is false.
2844 (capture_main): Set vCont_supported to zero.
2845
2846 2015-09-15 Yao Qi <yao.qi@linaro.org>
2847
2848 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2849 it to ...
2850 (linux_supports_hardware_single_step): ... New function.
2851 (linux_target_ops): Update.
2852 * lynx-low.c (lynx_target_ops): Set field
2853 supports_hardware_single_step to target_can_do_hardware_single_step.
2854 * nto-low.c (nto_target_ops): Likewise.
2855 * spu-low.c (spu_target_ops): Likewise.
2856 * win32-low.c (win32_target_ops): Likewise.
2857 * target.c (target_can_do_hardware_single_step): New function.
2858 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2859 Remove. <supports_hardware_single_step>: New field.
2860 (target_supports_conditional_breakpoints): Remove.
2861 (target_supports_hardware_single_step): New macro.
2862 (target_can_do_hardware_single_step): Declare.
2863 * server.c (handle_query): Use target_supports_hardware_single_step
2864 instead of target_supports_conditional_breakpoints.
2865
2866 2015-09-15 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2869 function.
2870 (struct linux_target_ops the_low_target): Install
2871 aarch64_linux_siginfo_fixup.
2872
2873 2015-09-11 Don Breazeal <donb@codesourcery.com>
2874 Luis Machado <lgustavo@codesourcery.com>
2875
2876 * linux-low.c (linux_mourn): Static declaration.
2877 (linux_arch_setup): Move in front of
2878 handle_extended_wait.
2879 (linux_arch_setup_thread): New function.
2880 (handle_extended_wait): Handle exec events. Call
2881 linux_arch_setup_thread. Make event_lwp argument a
2882 pointer-to-a-pointer.
2883 (check_zombie_leaders): Do not check stopped threads.
2884 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2885 (linux_low_filter_event): Add lwp and thread for exec'ing
2886 non-leader thread if leader thread has been deleted.
2887 Refactor code into linux_arch_setup_thread and call it.
2888 Pass child lwp pointer by reference to handle_extended_wait.
2889 (linux_wait_for_event_filtered): Update comment.
2890 (linux_wait_1): Prevent clobbering exec event status.
2891 (linux_supports_exec_events): New function.
2892 (linux_target_ops) <supports_exec_events>: Initialize new member.
2893 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2894 new member.
2895 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2896 * server.c (report_exec_events): New global variable.
2897 (handle_query): Handle qSupported query for exec-events feature.
2898 (captured_main): Initialize report_exec_events.
2899 * server.h (report_exec_events): Declare new global variable.
2900 * target.h (struct target_ops) <supports_exec_events>: New
2901 member.
2902 (target_supports_exec_events): New macro.
2903 * win32-low.c (win32_target_ops) <supports_exec_events>:
2904 Initialize new member.
2905
2906 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2907
2908 * linux-low.c (linux_low_enable_btrace): Remove.
2909 (linux_target_ops): Replace linux_low_enable_btrace with
2910 linux_enable_btrace.
2911
2912 2015-09-03 Yao Qi <yao.qi@linaro.org>
2913
2914 * linux-aarch64-low.c (aarch64_insert_point): Call
2915 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2916 returns true.
2917
2918 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2919
2920 * linux-low.c (check_stopped_by_breakpoint): Use
2921 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2922
2923 2015-08-27 Pedro Alves <palves@redhat.com>
2924
2925 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2926
2927 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2928
2929 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2930 the XNEW-family equivalent.
2931 (compile_bytecodes): Likewise.
2932 * dll.c (loaded_dll): Likewise.
2933 * event-loop.c (append_callback_event): Likewise.
2934 (create_file_handler): Likewise.
2935 (create_file_event): Likewise.
2936 * hostio.c (handle_open): Likewise.
2937 * inferiors.c (add_thread): Likewise.
2938 (add_process): Likewise.
2939 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2940 * linux-arm-low.c (arm_new_process): Likewise.
2941 (arm_new_thread): Likewise.
2942 * linux-low.c (add_to_pid_list): Likewise.
2943 (linux_add_process): Likewise.
2944 (handle_extended_wait): Likewise.
2945 (add_lwp): Likewise.
2946 (enqueue_one_deferred_signal): Likewise.
2947 (enqueue_pending_signal): Likewise.
2948 (linux_resume_one_lwp_throw): Likewise.
2949 (linux_resume_one_thread): Likewise.
2950 (linux_read_memory): Likewise.
2951 (linux_write_memory): Likewise.
2952 * linux-mips-low.c (mips_linux_new_process): Likewise.
2953 (mips_linux_new_thread): Likewise.
2954 (mips_add_watchpoint): Likewise.
2955 * linux-x86-low.c (initialize_low_arch): Likewise.
2956 * lynx-low.c (lynx_add_process): Likewise.
2957 * mem-break.c (set_raw_breakpoint_at): Likewise.
2958 (set_breakpoint): Likewise.
2959 (add_condition_to_breakpoint): Likewise.
2960 (add_commands_to_breakpoint): Likewise.
2961 (clone_agent_expr): Likewise.
2962 (clone_one_breakpoint): Likewise.
2963 * regcache.c (new_register_cache): Likewise.
2964 * remote-utils.c (look_up_one_symbol): Likewise.
2965 * server.c (queue_stop_reply): Likewise.
2966 (start_inferior): Likewise.
2967 (queue_stop_reply_callback): Likewise.
2968 (handle_target_event): Likewise.
2969 * spu-low.c (fetch_ppc_memory): Likewise.
2970 (store_ppc_memory): Likewise.
2971 * target.c (set_target_ops): Likewise.
2972 * thread-db.c (thread_db_load_search): Likewise.
2973 (try_thread_db_load_1): Likewise.
2974 * tracepoint.c (add_tracepoint): Likewise.
2975 (add_tracepoint_action): Likewise.
2976 (create_trace_state_variable): Likewise.
2977 (cmd_qtdpsrc): Likewise.
2978 (cmd_qtro): Likewise.
2979 (add_while_stepping_state): Likewise.
2980 * win32-low.c (child_add_thread): Likewise.
2981 (get_image_name): Likewise.
2982
2983 2015-08-25 Yao Qi <yao.qi@linaro.org>
2984
2985 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2986
2987 2015-08-25 Yao Qi <yao.qi@linaro.org>
2988
2989 * Makefile.in (aarch64-linux.o): New rule.
2990 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2991 srv_tgtobj.
2992 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2993 (aarch64_init_debug_reg_state): Make it extern.
2994 (aarch64_linux_prepare_to_resume): Remove.
2995
2996 2015-08-25 Yao Qi <yao.qi@linaro.org>
2997
2998 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2999 lwp_arch_private_info and ptid_of_lwp.
3000
3001 2015-08-25 Yao Qi <yao.qi@linaro.org>
3002
3003 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3004 Find proc_info by find_process_pid. All callers updated.
3005
3006 2015-08-25 Yao Qi <yao.qi@linaro.org>
3007
3008 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3009 Remove.
3010 (debug_reg_change_callback): Remove.
3011 (aarch64_notify_debug_reg_change): Remove.
3012
3013 2015-08-25 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3016 Call current_lwp_ptid.
3017
3018 2015-08-25 Yao Qi <yao.qi@linaro.org>
3019
3020 * linux-aarch64-low.c (debug_reg_change_callback): Use
3021 debug_printf.
3022
3023 2015-08-25 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3026
3027 2015-08-25 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3030
3031 2015-08-25 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3034 the code.
3035
3036 2015-08-25 Yao Qi <yao.qi@linaro.org>
3037
3038 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3039 Remove.
3040 (debug_reg_change_callback): Remove argument entry and add argument
3041 lwp. Remove local variable thread. Don't print thread id in the
3042 debugging output. Don't check whether pid of thread equals to pid.
3043 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3044 iterate_over_lwps instead find_inferior.
3045
3046 2015-08-24 Pedro Alves <palves@redhat.com>
3047
3048 * inferiors.c (get_first_process): New function.
3049 * inferiors.h (get_first_process): New declaration.
3050 * remote-utils.c (read_ptid): Default to the first process in the
3051 list, instead of to the current thread's process.
3052
3053 2015-08-24 Pedro Alves <palves@redhat.com>
3054
3055 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3056 * event-loop.c: Likewise.
3057 * remote-utils.c: Likewise.
3058 * tracepoint.c: Likewise.
3059
3060 2015-08-24 Pedro Alves <palves@redhat.com>
3061
3062 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3063 ptid_get_lwp.
3064
3065 2015-08-21 Pedro Alves <palves@redhat.com>
3066
3067 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3068 instead of literal 1.
3069
3070 2015-08-21 Pedro Alves <palves@redhat.com>
3071
3072 * tdesc.c (default_description): Explicitly zero-initialize.
3073
3074 2015-08-21 Pedro Alves <palves@redhat.com>
3075
3076 PR gdb/18749
3077 * inferiors.c (remove_thread): Discard any pending stop reply for
3078 this thread.
3079 * server.c (remove_all_on_match_pid): Rename to ...
3080 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3081 instead of a pid.
3082 (discard_queued_stop_replies): Change parameter to a ptid. Now
3083 extern.
3084 (handle_v_kill, kill_inferior_callback, captured_main)
3085 (process_serial_event): Adjust.
3086 * server.h (discard_queued_stop_replies): Declare.
3087
3088 2015-08-21 Pedro Alves <palves@redhat.com>
3089
3090 * linux-low.c (wait_for_sigstop): Always switch to no thread
3091 selected if the previously current thread dies.
3092 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3093 process instead of the current thread's.
3094 * remote-utils.c (input_interrupt): Don't check if there's no
3095 current thread.
3096 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3097 current thread to the general thread fails, error out.
3098 (handle_qxfer_auxv, handle_qxfer_libraries)
3099 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3100 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3101 (handle_query): Check if there's a thread selected instead of
3102 checking whether there's any thread in the thread list.
3103 (handle_qxfer_threads, handle_qxfer_btrace)
3104 (handle_qxfer_btrace_conf): Don't error out early if there's no
3105 thread in the thread list.
3106 (handle_v_cont, myresume): Don't set the current thread to the
3107 continue thread.
3108 (process_serial_event) <Hg handling>: Also set thread_id if the
3109 previous general thread is still alive.
3110 (process_serial_event) <g/G handling>: If setting the current
3111 thread to the general thread fails, error out.
3112 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3113 thread's lwp instead of the current thread's.
3114 * target.c (set_desired_thread): If the desired thread was not
3115 found, leave the current thread pointing to NULL. Return an int
3116 (boolean) indicating success.
3117 * target.h (set_desired_thread): Change return type to int.
3118
3119 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3120
3121 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3122 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3123 #includes.
3124 (ps_get_thread_area): New function.
3125
3126 2015-08-19 Gary Benson <gbenson@redhat.com>
3127
3128 * hostio.c (handle_pread): Do not attempt to read more data
3129 than hostio_reply_with_data can fit in a packet.
3130
3131 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3132
3133 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3134
3135 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3136
3137 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3138
3139 2015-08-06 Pedro Alves <palves@redhat.com>
3140
3141 * tracepoint.c (expr_eval_result): Now an int.
3142
3143 2015-08-06 Pedro Alves <palves@redhat.com>
3144
3145 * gdbthread.h (struct regcache): Forward declare.
3146 (struct thread_info) <regcache_data>: Now a struct regcache
3147 pointer.
3148 * inferiors.c (inferior_regcache_data)
3149 (set_inferior_regcache_data): Now work with struct regcache
3150 pointers.
3151 * inferiors.h (struct regcache): Forward declare.
3152 (inferior_regcache_data, set_inferior_regcache_data): Now work
3153 with struct regcache pointers.
3154 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3155 (free_register_cache_thread): Remove struct regcache pointer
3156 casts.
3157
3158 2015-08-06 Pedro Alves <palves@redhat.com>
3159
3160 * server.c (captured_main): On error, print the exception message
3161 to stderr, and if run_once is set, throw a quit.
3162
3163 2015-08-06 Pedro Alves <palves@redhat.com>
3164
3165 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3166 the current thread.
3167
3168 2015-08-06 Pedro Alves <palves@redhat.com>
3169
3170 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3171 reading beyond the passed in buffer length.
3172
3173 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3174
3175 * tracepoint.c (symbol_list) <required>: Remove.
3176
3177 2015-08-06 Pedro Alves <palves@redhat.com>
3178
3179 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3180 count if stopping and suspending threads.
3181 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3182 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3183 (linux_detach): Complete an ongoing step-over.
3184 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3185 throughout.
3186 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3187 (linux_wait_1): If passing a signal to the inferior after
3188 finishing a step-over, unsuspend and re-resume all lwps. If we
3189 see a single-step event but the thread should be continuing, don't
3190 pass the trap to gdb.
3191 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3192 internal_error instead of gdb_assert.
3193 (enqueue_pending_signal): New function.
3194 (check_ptrace_stopped_lwp_gone): Add debug output.
3195 (start_step_over): Use internal_error instead of gdb_assert.
3196 (complete_ongoing_step_over): New function.
3197 (linux_resume_one_thread): Don't resume a suspended thread.
3198 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3199 it stepping.
3200
3201 2015-08-06 Pedro Alves <palves@redhat.com>
3202
3203 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3204 (linux_thread_alive): Use lwp_is_marked_dead.
3205 (extended_event_reported): Delete.
3206 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3207 instead of extended_event_reported.
3208 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3209 as well.
3210 (lwp_is_marked_dead): New function.
3211 (lwp_running): Use lwp_is_marked_dead.
3212 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3213 comment.
3214
3215 2015-08-06 Pedro Alves <palves@redhat.com>
3216
3217 * linux-low.c (linux_wait_1): Move fork event output out of the
3218 !report_to_gdb check. Pass event_child->waitstatus to
3219 target_waitstatus_to_string instead of ourstatus.
3220
3221 2015-08-04 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3224 if current_thread is 32 bit.
3225
3226 2015-08-04 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3229 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3230 * server.c (extended_protocol): Remove "static".
3231 * server.h (extended_protocol): Declare it.
3232
3233 2015-08-04 Yao Qi <yao.qi@linaro.org>
3234
3235 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3236 both aarch64 and aarch32.
3237 (aarch64_set_pc): Likewise.
3238
3239 2015-08-04 Yao Qi <yao.qi@linaro.org>
3240
3241 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3242 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3243 arm-with-neon.xml to srv_xmlfiles.
3244 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3245 (is_64bit_tdesc): New function.
3246 (aarch64_linux_read_description): New function.
3247 (aarch64_arch_setup): Call aarch64_linux_read_description.
3248 (regs_info): Rename to regs_info_aarch64.
3249 (aarch64_regs_info): Return right regs_info.
3250 (initialize_low_arch): Call initialize_low_arch_aarch32.
3251
3252 2015-08-04 Yao Qi <yao.qi@linaro.org>
3253
3254 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3255 * linux-aarch32-low.c: New file.
3256 * linux-aarch32-low.h: New file.
3257 * linux-arm-low.c (arm_fill_gregset): Move it to
3258 linux-aarch32-low.c.
3259 (arm_store_gregset): Likewise.
3260 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3261 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3262 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3263 (regs_info): Rename to regs_info_arm.
3264 (arm_regs_info): Return regs_info_aarch32 if
3265 have_ptrace_getregset is 1 and target description is
3266 arm_with_neon or arm_with_vfpv3.
3267 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3268 Call initialize_low_arch_aarch32 instead.
3269
3270 2015-08-04 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3273 * linux-low.c: ... here.
3274 * linux-low.h (have_ptrace_getregset): Declare it.
3275
3276 2015-08-04 Pedro Alves <palves@redhat.com>
3277
3278 * thread-db.c (struct thread_db): Use new typedefs.
3279 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3280 CHK calls.
3281 (disable_thread_event_reporting): Cast result of dlsym to
3282 destination function pointer type.
3283 (thread_db_mourn): Use td_ta_delete_ftype.
3284
3285 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3286
3287 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3288 arch variant.
3289 (CDX_BREAKPOINT): Define for R2.
3290 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3291 (the_low_target): Add comments.
3292
3293 2015-07-30 Yao Qi <yao.qi@linaro.org>
3294
3295 * linux-arm-low.c (arm_hwcap): Remove it.
3296 (arm_read_description): New local variable arm_hwcap. Don't
3297 set arm_hwcap to zero.
3298
3299 2015-07-30 Yao Qi <yao.qi@linaro.org>
3300
3301 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3302 Use regcache->tdesc instead.
3303 (arm_store_wmmxregset): Likewise.
3304 (arm_fill_vfpregset): Likewise.
3305 (arm_store_vfpregset): Likewise.
3306
3307 2015-07-30 Yao Qi <yao.qi@linaro.org>
3308
3309 * linux-arm-low.c: Include arch/arm.h.
3310 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3311 (arm_store_gregset): Likewise.
3312
3313 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3316 ptrace's 4th parameter.
3317
3318 2015-07-27 Yao Qi <yao.qi@linaro.org>
3319
3320 * configure.srv (case aarch64*-*-linux*): Don't set
3321 srv_linux_usrregs.
3322
3323 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3324
3325 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3326 sys/ptrace.h.
3327 * linux-arm-low.c: Likewise.
3328 * linux-cris-low.c: Likewise.
3329 * linux-crisv32-low.c: Likewise.
3330 * linux-low.c: Likewise.
3331 * linux-m68k-low.c: Likewise.
3332 * linux-mips-low.c: Likewise.
3333 * linux-nios2-low.c: Likewise.
3334 * linux-s390-low.c: Likewise.
3335 * linux-sparc-low.c: Likewise.
3336 * linux-tic6x-low.c: Likewise.
3337 * linux-tile-low.c: Likewise.
3338 * linux-x86-low.c: Likewise.
3339
3340 2015-07-24 Pedro Alves <palves@redhat.com>
3341
3342 * config.in: Regenerate.
3343 * configure: Regenerate.
3344
3345 2015-07-24 Pedro Alves <palves@redhat.com>
3346
3347 * acinclude.m4: Include ../ptrace.m4.
3348 * configure.ac: Call GDB_AC_PTRACE.
3349 * config.in, configure: Regenerate.
3350
3351 2015-07-24 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-low.c (linux_create_inferior): Remove setting to
3354 proc->priv->new_inferior.
3355 (linux_attach): Likewise.
3356 (linux_low_filter_event): Likewise.
3357 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3358
3359 2015-07-24 Yao Qi <yao.qi@linaro.org>
3360
3361 * linux-low.c (linux_arch_setup): New function.
3362 (linux_low_filter_event): If proc->tdesc is NULL and
3363 proc->attached is true, call the_low_target.arch_setup.
3364 Otherwise, keep status pending, and return.
3365 (linux_resume_one_lwp_throw): Don't call get_pc if
3366 thread->while_stepping isn't NULL. Don't call
3367 get_thread_regcache if proc->tdesc is NULL.
3368 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3369 (linux_target_ops): Install arch_setup.
3370 * server.c (start_inferior): Call the_target->arch_setup.
3371 * target.h (struct target_ops) <arch_setup>: New field.
3372 (target_arch_setup): New marco.
3373 * lynx-low.c (lynx_target_ops): Update.
3374 * nto-low.c (nto_target_ops): Update.
3375 * spu-low.c (spu_target_ops): Update.
3376 * win32-low.c (win32_target_ops): Update.
3377
3378 2015-07-24 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-low.c (linux_add_process): Don't set
3381 proc->priv->new_inferior.
3382 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3383 (linux_attach): Likewise.
3384
3385 2015-07-24 Yao Qi <yao.qi@linaro.org>
3386
3387 * server.c (start_inferior): Code refactor.
3388
3389 2015-07-24 Yao Qi <yao.qi@linaro.org>
3390
3391 * server.c (process_serial_event): Set general_thread.
3392
3393 2015-07-21 Yao Qi <yao.qi@linaro.org>
3394
3395 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3396 aarch64_linux_get_debug_reg_capacity.
3397
3398 2015-07-17 Yao Qi <yao.qi@linaro.org>
3399
3400 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3401 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3402 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3403 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3404 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3405 (AARCH64_HWP_ALIGNMENT): Likewise.
3406 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3407 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3408 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3409 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3410 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3411 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3412 (struct aarch64_debug_reg_state): Likewise.
3413 (struct arch_lwp_info): Likewise.
3414 (aarch64_align_watchpoint): Likewise.
3415 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3416 (aarch64_watchpoint_length): Likewise.
3417 (aarch64_point_encode_ctrl_reg): Likewise
3418 (aarch64_point_is_aligned): Likewise.
3419 (aarch64_align_watchpoint): Likewise.
3420 (aarch64_linux_set_debug_regs):
3421 (aarch64_dr_state_insert_one_point): Likewise.
3422 (aarch64_dr_state_remove_one_point): Likewise.
3423 (aarch64_handle_breakpoint): Likewise.
3424 (aarch64_handle_aligned_watchpoint): Likewise.
3425 (aarch64_handle_unaligned_watchpoint): Likewise.
3426 (aarch64_handle_watchpoint): Likewise.
3427
3428 2015-07-17 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3431 and don't aarch64_get_debug_reg_state. All callers update.
3432 (aarch64_handle_aligned_watchpoint): Likewise.
3433 (aarch64_handle_unaligned_watchpoint): Likewise.
3434 (aarch64_handle_watchpoint): Likewise.
3435 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3436 (aarch64_remove_point): Likewise.
3437
3438 2015-07-17 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3441 debug_printf.
3442 (aarch64_handle_unaligned_watchpoint): Likewise.
3443
3444 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3445
3446 Revert the previous 3 commits:
3447 Move gdb_regex* to common/
3448 Move linux_find_memory_regions_full & co.
3449 gdbserver build-id attribute generator
3450
3451 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3452 Jan Kratochvil <jan.kratochvil@redhat.com>
3453
3454 gdbserver build-id attribute generator.
3455 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3456 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3457 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3458 (find_phdr): New.
3459 (get_dynamic): Use find_pdhr to traverse program headers.
3460 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3461 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3462 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3463 (get_hex_build_id): New.
3464 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3465 to reply XML document.
3466
3467 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3468 Jan Kratochvil <jan.kratochvil@redhat.com>
3469
3470 * target.c: Include target/target-utils.h and fcntl.h.
3471 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3472 (target_fileio_read_stralloc): New functions.
3473
3474 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3475
3476 * Makefile.in (OBS): Add gdb_regex.o.
3477 (gdb_regex.o): New.
3478 * config.in: Rebuilt.
3479 * configure: Rebuilt.
3480
3481 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3482 Jan Kratochvil <jan.kratochvil@redhat.com>
3483
3484 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3485 * Makefile.in (OBS): Add target-utils.o.
3486 (linux-maps.o, target-utils.o): New.
3487 * configure.srv (srv_linux_obj): Add linux-maps.o.
3488
3489 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3490
3491 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3492 function, return 1.
3493 (the_low_target): Install it.
3494
3495 2015-07-14 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3498 Instead, ignore ECHILD, and throw an error for other errnos.
3499
3500 2015-07-10 Pedro Alves <palves@redhat.com>
3501
3502 * event-loop.c (struct callback_event) <data>: Change type to
3503 gdb_client_data instance instead of gdb_client_data pointer.
3504 (append_callback_event): Adjust.
3505
3506 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3507
3508 * linux-aarch64-low.c: Add comments for each linux_target_ops
3509 method. Remove comments already covered in target_ops and
3510 linux_target_ops definitions.
3511 (the_low_target): Add comments for each unimplemented method.
3512
3513 2015-07-09 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-aarch64-low.c (aarch64_regmap): Remove.
3516 (aarch64_usrregs_info): Remove.
3517 (regs_info): Set field usrregs to NULL.
3518
3519 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3520
3521 * linux-low.c: Include "rsp-low.h"
3522 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3523 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3524 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3525 (handle_btrace_enable_pt): New.
3526 (handle_btrace_general_set): Support "pt".
3527 (handle_btrace_conf_general_set): Support "pt:size".
3528
3529 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3530
3531 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3532 Z_PACKET_SW_BP.
3533
3534 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3535
3536 * linux-aarch64-low.c: Remove comment about endianness.
3537 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3538 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3539 memcmp.
3540
3541 2015-06-24 Gary Benson <gbenson@redhat.com>
3542
3543 * linux-i386-ipa.c (stdint.h): Do not include.
3544 * lynx-i386-low.c (stdint.h): Likewise.
3545 * lynx-ppc-low.c (stdint.h): Likewise.
3546 * mem-break.c (stdint.h): Likewise.
3547 * thread-db.c (stdint.h): Likewise.
3548 * tracepoint.c (stdint.h): Likewise.
3549 * win32-low.c (stdint.h): Likewise.
3550
3551 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3552
3553 * server.c (write_qxfer_response): Update call to
3554 remote_escape_output.
3555
3556 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3557 Jan Kratochvil <jan.kratochvil@redhat.com>
3558
3559 Merge multiple hex conversions.
3560 * gdbreplay.c (tohex): Rename to 'fromhex'.
3561 (logchar): Use fromhex.
3562
3563 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3564
3565 * server.c (handle_qxfer_libraries): Set `version' attribute for
3566 <library-list>.
3567
3568 2015-06-10 Gary Benson <gbenson@redhat.com>
3569
3570 * target.h (struct target_ops) <multifs_open>: New field.
3571 <multifs_unlink>: Likewise.
3572 <multifs_readlink>: Likewise.
3573 * linux-low.c (nat/linux-namespaces.h): New include.
3574 (linux_target_ops): Initialize the_target->multifs_open,
3575 the_target->multifs_unlink and the_target->multifs_readlink.
3576 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3577 * hostio.c (hostio_fs_pid): New static variable.
3578 (hostio_handle_new_gdb_connection): New function.
3579 (handle_setfs): Likewise.
3580 (handle_open): Use the_target->multifs_open as appropriate.
3581 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3582 (handle_readlink): Use the_target->multifs_readlink as
3583 appropriate.
3584 (handle_vFile): Handle vFile:setfs packets.
3585 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3586 after target_handle_new_gdb_connection.
3587
3588 2015-06-10 Gary Benson <gbenson@redhat.com>
3589
3590 * configure.ac (AC_CHECK_FUNCS): Add setns.
3591 * config.in: Regenerate.
3592 * configure: Likewise.
3593 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3594 (linux-namespaces.o): New rule.
3595 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3596
3597 2015-06-09 Gary Benson <gbenson@redhat.com>
3598
3599 * hostio.c (handle_open): Process mode argument with
3600 fileio_to_host_mode.
3601
3602 2015-06-01 Yao Qi <yao.qi@linaro.org>
3603
3604 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3605 * linux-x86-low.c: Likewise.
3606
3607 2015-05-28 Don Breazeal <donb@codesourcery.com>
3608
3609 * linux-low.c (handle_extended_wait): Initialize
3610 thread_info.last_resume_kind for new fork children.
3611
3612 2015-05-15 Pedro Alves <palves@redhat.com>
3613
3614 * target.h (target_handle_new_gdb_connection): Rewrite using if
3615 wrapped in do/while.
3616
3617 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3618
3619 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3620 * configure, config.in: Regenerate.
3621 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3622 Declare typedef.
3623
3624 2015-05-12 Don Breazeal <donb@codesourcery.com>
3625
3626 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3627 PTRACE_EVENT_VFORK_DONE.
3628 (linux_low_ptrace_options, extended_event_reported): Add vfork
3629 events.
3630 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3631 and "vforkdone" for RSP 'T' Stop Reply Packet.
3632 * server.h (report_vfork_events): Declare
3633 global variable.
3634
3635 2015-05-12 Don Breazeal <donb@codesourcery.com>
3636
3637 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3638 (the_low_target) <new_fork>: Initialize new member.
3639 * linux-arm-low.c (arm_new_fork): New function.
3640 (the_low_target) <new_fork>: Initialize new member.
3641 * linux-low.c (handle_extended_wait): Call new target function
3642 new_fork.
3643 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3644 * linux-mips-low.c (mips_add_watchpoint): New function
3645 extracted from mips_insert_point.
3646 (the_low_target) <new_fork>: Initialize new member.
3647 (mips_linux_new_fork): New function.
3648 (mips_insert_point): Call mips_add_watchpoint.
3649 * linux-x86-low.c (x86_linux_new_fork): New function.
3650 (the_low_target) <new_fork>: Initialize new member.
3651
3652 2015-05-12 Don Breazeal <donb@codesourcery.com>
3653
3654 * linux-low.c (handle_extended_wait): Implement return value,
3655 rename argument 'event_child' to 'event_lwp', handle
3656 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3657 (linux_low_ptrace_options): New function.
3658 (linux_low_filter_event): Call linux_low_ptrace_options,
3659 use different argument fo linux_enable_event_reporting,
3660 use return value from handle_extended_wait.
3661 (extended_event_reported): New function.
3662 (linux_wait_1): Call extended_event_reported and set
3663 status to report fork events.
3664 (linux_write_memory): Add pid to debug message.
3665 (reset_lwp_ptrace_options_callback): New function.
3666 (linux_handle_new_gdb_connection): New function.
3667 (linux_target_ops): Initialize new structure member.
3668 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3669 * lynx-low.c: Initialize new structure member.
3670 * remote-utils.c (prepare_resume_reply): Implement stop reason
3671 "fork" for "T" stop message.
3672 * server.c (handle_query): Call handle_new_gdb_connection.
3673 * server.h (report_fork_events): Declare global flag.
3674 * target.h (struct target_ops) <handle_new_gdb_connection>:
3675 New member.
3676 (target_handle_new_gdb_connection): New macro.
3677 * win32-low.c: Initialize new structure member.
3678
3679 2015-05-12 Don Breazeal <donb@codesourcery.com>
3680
3681 * mem-break.c (APPEND_TO_LIST): Define macro.
3682 (clone_agent_expr): New function.
3683 (clone_one_breakpoint): New function.
3684 (clone_all_breakpoints): New function.
3685 * mem-break.h: Declare new functions.
3686
3687 2015-05-12 Don Breazeal <donb@codesourcery.com>
3688
3689 * linux-low.c (linux_supports_fork_events): New function.
3690 (linux_supports_vfork_events): New function.
3691 (linux_target_ops): Initialize new structure members.
3692 (initialize_low): Call linux_check_ptrace_features.
3693 * lynx-low.c (lynx_target_ops): Initialize new structure
3694 members.
3695 * server.c (report_fork_events, report_vfork_events):
3696 New global flags.
3697 (handle_query): Add new features to qSupported packet and
3698 response.
3699 (captured_main): Initialize new global variables.
3700 * target.h (struct target_ops) <supports_fork_events>:
3701 New member.
3702 <supports_vfork_events>: New member.
3703 (target_supports_fork_events): New macro.
3704 (target_supports_vfork_events): New macro.
3705 * win32-low.c (win32_target_ops): Initialize new structure
3706 members.
3707
3708 2015-05-12 Gary Benson <gbenson@redhat.com>
3709
3710 * server.c (handle_qxfer_exec_file): Use current process
3711 if annex is empty.
3712
3713 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3714
3715 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3716 Remove HAVE_PTRACE_GETREGS conditionals.
3717 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3718 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3719
3720 2015-05-08 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-low.c (linux_supports_conditional_breakpoints): New
3723 function.
3724 (linux_target_ops): Install new target method.
3725 * lynx-low.c (lynx_target_ops): Install NULL hook for
3726 supports_conditional_breakpoints.
3727 * nto-low.c (nto_target_ops): Likewise.
3728 * spu-low.c (spu_target_ops): Likewise.
3729 * win32-low.c (win32_target_ops): Likewise.
3730 * server.c (handle_query): Check
3731 target_supports_conditional_breakpoints.
3732 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3733 New field.
3734 (target_supports_conditional_breakpoints): New macro.
3735
3736 2015-05-06 Pedro Alves <palves@redhat.com>
3737
3738 PR server/18081
3739 * server.c (start_inferior): If the process exits, mourn it.
3740
3741 2015-04-21 Gary Benson <gbenson@redhat.com>
3742
3743 * hostio.c (fileio_open_flags_to_host): Factored out to
3744 fileio_to_host_openflags in common/fileio.c. Single use
3745 updated.
3746
3747 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3748
3749 * linux-xtensa-low.c (xtensa_fill_gregset)
3750 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3751 XCHAL_HAVE_LOOP.
3752
3753 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3754
3755 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3756 (regs_info): Replace usrregs pointer with NULL.
3757
3758 2015-04-17 Gary Benson <gbenson@redhat.com>
3759
3760 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3761 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3762 * server.c (handle_qxfer_exec_file): New function.
3763 (qxfer_packets): Add exec-file entry.
3764 (handle_query): Report qXfer:exec-file:read as supported packet.
3765
3766 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3767
3768 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3769
3770 2015-04-09 Gary Benson <gbenson@redhat.com>
3771
3772 * hostio-errno.c (errno_to_fileio_error): Remove function.
3773 Update caller to use remote_fileio_to_fio_error.
3774
3775 2015-04-09 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-low.c (linux_insert_point): Call
3778 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3779 (linux_remove_point): Call remove_memory_breakpoint if type is
3780 raw_bkpt_type_sw.
3781 * linux-x86-low.c (x86_insert_point): Don't call
3782 insert_memory_breakpoint.
3783 (x86_remove_point): Don't call remove_memory_breakpoint.
3784
3785 2015-04-01 Pedro Alves <palves@redhat.com>
3786 Cleber Rosa <crosa@redhat.com>
3787
3788 * server.c (gdbserver_usage): Reorganize and extend the usage
3789 message.
3790
3791 2015-03-24 Pedro Alves <palves@redhat.com>
3792
3793 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3794 output. Also dump TRAP_TRACE.
3795 (linux_low_filter_event): In debug output, distinguish a
3796 resume_stop SIGSTOP from a delayed SIGSTOP.
3797
3798 2015-03-24 Gary Benson <gbenson@redhat.com>
3799
3800 * linux-x86-low.c (x86_linux_new_thread): Moved to
3801 nat/x86-linux.c.
3802 (x86_linux_prepare_to_resume): Likewise.
3803
3804 2015-03-24 Gary Benson <gbenson@redhat.com>
3805
3806 * Makefile.in (x86-linux-dregs.o): New rule.
3807 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3808 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3809 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3810 (x86_linux_dr_get): Likewise.
3811 (x86_linux_dr_set): Likewise.
3812 (update_debug_registers_callback): Likewise.
3813 (x86_linux_dr_set_addr): Likewise.
3814 (x86_linux_dr_get_addr): Likewise.
3815 (x86_linux_dr_set_control): Likewise.
3816 (x86_linux_dr_get_control): Likewise.
3817 (x86_linux_dr_get_status): Likewise.
3818 (x86_linux_update_debug_registers): Likewise.
3819
3820 2015-03-24 Gary Benson <gbenson@redhat.com>
3821
3822 * linux-x86-low.c (x86_linux_update_debug_registers):
3823 New function, factored out from...
3824 (x86_linux_prepare_to_resume): ...this.
3825
3826 2015-03-24 Gary Benson <gbenson@redhat.com>
3827
3828 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3829 (x86_linux_dr_set): Likewise.
3830 (update_debug_registers_callback): Likewise.
3831 (x86_linux_dr_set_addr): Likewise.
3832 (x86_linux_dr_get_addr): Likewise.
3833 (x86_linux_dr_set_control): Likewise.
3834 (x86_linux_dr_get_control): Likewise.
3835 (x86_linux_dr_get_status): Likewise.
3836 (x86_linux_prepare_to_resume): Likewise.
3837
3838 2015-03-24 Gary Benson <gbenson@redhat.com>
3839
3840 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3841 Use perror_with_name. Pass string through gettext.
3842 (x86_linux_dr_set): Likewise.
3843
3844 2015-03-24 Gary Benson <gbenson@redhat.com>
3845
3846 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3847 (x86_linux_dr_set_addr): ...this.
3848 (x86_dr_low_get_addr): Rename to...
3849 (x86_linux_dr_get_addr): ...this.
3850 (x86_dr_low_set_control): Rename to...
3851 (x86_linux_dr_set_control): ...this.
3852 (x86_dr_low_get_control): Rename to...
3853 (x86_linux_dr_get_control): ...this.
3854 (x86_dr_low_get_status): Rename to...
3855 (x86_linux_dr_get_status): ...this.
3856 (x86_dr_low): Update with new function names.
3857
3858 2015-03-24 Gary Benson <gbenson@redhat.com>
3859
3860 * Makefile.in (x86-linux.o): New rule.
3861 * configure.srv: Add x86-linux.o to relevant targets.
3862 * linux-low.c (lwp_set_arch_private_info): New function.
3863 (lwp_arch_private_info): Likewise.
3864 * linux-x86-low.c: Include nat/x86-linux.h.
3865 (arch_lwp_info): Removed structure.
3866 (update_debug_registers_callback):
3867 Use lwp_set_debug_registers_changed.
3868 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3869 and lwp_set_debug_registers_changed.
3870 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3871
3872 2015-03-24 Gary Benson <gbenson@redhat.com>
3873
3874 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3875 * linux-arm-low.c (arm_new_thread): Likewise.
3876 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3877 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3878 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3879 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3880
3881 2015-03-24 Gary Benson <gbenson@redhat.com>
3882
3883 * linux-low.c (ptid_of_lwp): New function.
3884 (lwp_is_stopped): Likewise.
3885 (lwp_stop_reason): Likewise.
3886 * linux-x86-low.c (update_debug_registers_callback):
3887 Use lwp_is_stopped.
3888 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3889 lwp_stop_reason.
3890
3891 2015-03-24 Gary Benson <gbenson@redhat.com>
3892
3893 * linux-low.h (linux_stop_lwp): Remove declaration.
3894
3895 2015-03-24 Gary Benson <gbenson@redhat.com>
3896
3897 * linux-low.h: Include nat/linux-nat.h.
3898 * linux-low.c (iterate_over_lwps_args): New structure.
3899 (iterate_over_lwps_filter): New function.
3900 (iterate_over_lwps): Likewise.
3901 * linux-x86-low.c (update_debug_registers_callback):
3902 Update signature to what iterate_over_lwps expects.
3903 Remove PID check that iterate_over_lwps now performs.
3904 (x86_dr_low_set_addr): Use iterate_over_lwps.
3905 (x86_dr_low_set_control): Likewise.
3906
3907 2015-03-24 Gary Benson <gbenson@redhat.com>
3908
3909 * linux-x86-low.c (x86_debug_reg_state): New function.
3910 (x86_linux_prepare_to_resume): Use the above.
3911
3912 2015-03-24 Gary Benson <gbenson@redhat.com>
3913
3914 * linux-low.c (current_lwp_ptid): New function.
3915 * linux-x86-low.c: Include nat/linux-nat.h.
3916 (x86_dr_low_get_addr): Use current_lwp_ptid.
3917 (x86_dr_low_get_control): Likewise.
3918 (x86_dr_low_get_status): Likewise.
3919
3920 2015-03-20 Pedro Alves <palves@redhat.com>
3921
3922 * tracepoint.c (cmd_qtstatus): Make "str" const.
3923
3924 2015-03-20 Pedro Alves <palves@redhat.com>
3925
3926 * server.c (handle_general_set): Make "req_str" const.
3927
3928 2015-03-19 Pedro Alves <palves@redhat.com>
3929
3930 * linux-low.c (linux_resume_one_lwp): Rename to ...
3931 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3932 instead call perror_with_name.
3933 (check_ptrace_stopped_lwp_gone): New function.
3934 (linux_resume_one_lwp): Reimplement as wrapper around
3935 linux_resume_one_lwp_throw that swallows errors if the LWP is
3936 gone.
3937
3938 2015-03-19 Pedro Alves <palves@redhat.com>
3939
3940 * linux-low.c (count_events_callback, select_event_lwp_callback):
3941 No longer check whether the thread has resume_stop as last resume
3942 kind.
3943
3944 2015-03-19 Pedro Alves <palves@redhat.com>
3945
3946 * linux-low.c (count_events_callback, select_event_lwp_callback):
3947 Use the lwp's status_pending_p field, not the thread's.
3948
3949 2015-03-19 Pedro Alves <palves@redhat.com>
3950
3951 * linux-low.c (select_event_lwp_callback): Update comments to
3952 no longer mention SIGTRAP.
3953
3954 2015-03-18 Gary Benson <gbenson@redhat.com>
3955
3956 * server.c (handle_query): Do not report vFile:fstat as supported.
3957
3958 2015-03-11 Gary Benson <gbenson@redhat.com>
3959
3960 * hostio.c (sys/types.h): New include.
3961 (sys/stat.h): Likewise.
3962 (common-remote-fileio.h): Likewise.
3963 (handle_fstat): New function.
3964 (handle_vFile): Handle vFile:fstat packets.
3965
3966 2015-03-11 Gary Benson <gbenson@redhat.com>
3967
3968 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3969 struct stat.st_blocks and struct stat.st_blksize.
3970 * configure: Regenerate.
3971 * config.in: Likewise.
3972 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3973 (OBS): Add common-remote-fileio.o.
3974 (common-remote-fileio.o): New rule.
3975
3976 2015-03-09 Pedro Alves <palves@redhat.com>
3977
3978 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3979 'struct sockaddr' pointer in 'accept' call.
3980
3981 2015-03-09 Pedro Alves <palves@redhat.com>
3982
3983 Revert:
3984 2015-03-07 Pedro Alves <palves@redhat.com>
3985 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3986 or <winsock2.h> here. Instead include "gdb_socket.h".
3987 (remote_open): Use union gdb_sockaddr_u.
3988 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3989 or <winsock2.h> here. Instead include "gdb_socket.h".
3990 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3991 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3992 or <sys/un.h>.
3993 (init_named_socket, gdb_agent_helper_thread): Use union
3994 gdb_sockaddr_u.
3995
3996 2015-03-07 Pedro Alves <palves@redhat.com>
3997
3998 * configure.ac (build_warnings): Move
3999 -Wdeclaration-after-statement to the C-specific set.
4000 * configure: Regenerate.
4001
4002 2015-03-07 Pedro Alves <palves@redhat.com>
4003
4004 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4005 or <winsock2.h> here. Instead include "gdb_socket.h".
4006 (remote_open): Use union gdb_sockaddr_u.
4007 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4008 or <winsock2.h> here. Instead include "gdb_socket.h".
4009 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4010 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4011 or <sys/un.h>.
4012 (init_named_socket, gdb_agent_helper_thread): Use union
4013 gdb_sockaddr_u.
4014
4015 2015-03-07 Pedro Alves <palves@redhat.com>
4016
4017 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4018 instead.
4019
4020 2015-03-06 Yao Qi <yao.qi@linaro.org>
4021
4022 * linux-aarch64-low.c (aarch64_insert_point): Use
4023 show_debug_regs as a boolean.
4024 (aarch64_remove_point): Likewise.
4025
4026 2015-03-05 Pedro Alves <palves@redhat.com>
4027
4028 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4029 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4030 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4031 * nto-low.c (nto_target_ops): Likewise.
4032 * spu-low.c (spu_target_ops): Likewise.
4033 * win32-low.c (win32_target_ops): Likewise.
4034
4035 2015-03-04 Pedro Alves <palves@redhat.com>
4036
4037 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4038 Decide whether a breakpoint triggered based on the SIGTRAP's
4039 siginfo.si_code.
4040 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4041 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4042 (linux_low_filter_event): Check for breakpoints before checking
4043 watchpoints.
4044 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4045 siginfo.si_code.
4046 (linux_stopped_by_sw_breakpoint)
4047 (linux_supports_stopped_by_sw_breakpoint)
4048 (linux_stopped_by_hw_breakpoint)
4049 (linux_supports_stopped_by_hw_breakpoint): New functions.
4050 (linux_target_ops): Install new target methods.
4051
4052 2015-03-04 Pedro Alves <palves@redhat.com>
4053
4054 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4055 * server.c (swbreak_feature, hwbreak_feature): New globals.
4056 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4057 (captured_main): Clear swbreak_feature and hwbreak_feature.
4058 * server.h (swbreak_feature, hwbreak_feature): Declare.
4059 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4060 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4061 supports_stopped_by_hw_breakpoint>: New fields.
4062 (target_supports_stopped_by_sw_breakpoint)
4063 (target_stopped_by_sw_breakpoint)
4064 (target_supports_stopped_by_hw_breakpoint)
4065 (target_stopped_by_hw_breakpoint): Declare.
4066
4067 2015-03-04 Pedro Alves <palves@redhat.com>
4068
4069 enum lwp_stop_reason -> enum target_stop_reason
4070 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4071 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4072 (linux_wait_1, stuck_in_jump_pad_callback)
4073 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4074 (linux_stopped_by_watchpoint):
4075 * linux-low.h (enum lwp_stop_reason): Delete.
4076 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4077 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4078
4079 2015-03-04 Yao Qi <yao.qi@linaro.org>
4080
4081 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4082
4083 2015-03-03 Gary Benson <gbenson@redhat.com>
4084
4085 * hostio.c (handle_vFile): Fix prefix lengths.
4086
4087 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4088
4089 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4090 ptr_bits.
4091
4092 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4093
4094 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4095 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4096 (clean): Add "rm -f" for above C files.
4097 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4098 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4099 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4100 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4101 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4102 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4103 (init_registers_s390x_vx_linux64)
4104 (init_registers_s390x_tevx_linux64)
4105 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4106 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4107 declarations.
4108 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4109 (s390_store_vxrs_high): New functions.
4110 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4111 NT_S390_VXRS_HIGH.
4112 (s390_arch_setup): Add logic for selecting one of the new target
4113 descriptions. Activate the new vector regsets if applicable.
4114 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4115 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4116 and init_registers_s390x_tevx_linux64.
4117
4118 2015-03-01 Pedro Alves <palves@redhat.com>
4119
4120 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4121 parameter.
4122
4123 2015-02-27 Pedro Alves <palves@redhat.com>
4124
4125 * linux-x86-low.c (u_debugreg_offset): New function.
4126 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4127
4128 2015-02-27 Pedro Alves <palves@redhat.com>
4129
4130 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4131 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4132 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4133 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4134 (ps_lsetfpregs, ps_getpid)
4135 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4136 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4137 (ps_lsetxregs, ps_plog): Declare.
4138
4139 2015-02-27 Pedro Alves <palves@redhat.com>
4140
4141 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4142 IP_AGENT_EXPORT_FUNC.
4143 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4144 IP_AGENT_EXPORT_FUNC.
4145 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4146 (IP_AGENT_EXPORT): Delete.
4147 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4148 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4149 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4150 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4151 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4152 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4153 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4154 (traceframe_read_count, traceframe_write_count)
4155 (traceframes_created, trace_state_variables, get_raw_reg)
4156 (get_trace_state_variable_value, set_trace_state_variable_value)
4157 (ust_loaded, helper_thread_id, cmd_buf): Use
4158 IPA_SYM_EXPORTED_NAME.
4159 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4160 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4161 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4162 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4163 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4164 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4165 EXTERN_C_PUSH/EXTERN_C_POP.
4166 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4167 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4168 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4169 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4170 (traceframe_write_count, traceframe_read_count)
4171 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4172 (about_to_request_buffer_space, get_trace_state_variable_value)
4173 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4174 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4175 EXTERN_C_PUSH/EXTERN_C_POP.
4176 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4177 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4178 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4179 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4180 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4181 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4182 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4183 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4184 Define.
4185 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4186 (IP_AGENT_EXPORT_VAR_DECL): Define.
4187 (tracing): Declare.
4188 (gdb_agent_get_raw_reg): Declare.
4189
4190 2015-02-27 Tom Tromey <tromey@redhat.com>
4191 Pedro Alves <palves@redhat.com>
4192
4193 Rename symbols whose names are reserved C++ keywords throughout.
4194
4195 2015-02-27 Pedro Alves <palves@redhat.com>
4196
4197 * Makefile.in (COMPILER): New, get it from autoconf.
4198 (CXX): Get from autoconf instead.
4199 (COMPILE.pre): Use COMPILER.
4200 (CC-LD): Rename to ...
4201 (CC_LD): ... this. Use COMPILER.
4202 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4203 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4204 * acinclude.m4: Include build-with-cxx.m4.
4205 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4206 Disable -Werror by default if building in C++ mode.
4207 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4208 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4209 the C++ compiler. Save/restore CXXFLAGS too.
4210 * configure: Regenerate.
4211
4212 2015-02-27 Pedro Alves <palves@redhat.com>
4213
4214 * acinclude.m4: Include libiberty.m4.
4215 * configure.ac: Call libiberty_INIT.
4216 * config.in, configure: Regenerate.
4217
4218 2015-02-26 Pedro Alves <palves@redhat.com>
4219
4220 * linux-low.c (linux_wait_1): When incrementing the PC past a
4221 program breakpoint always use the_low_target.breakpoint_len as
4222 increment, rather than the maximum between that and
4223 the_low_target.decr_pc_after_break.
4224
4225 2015-02-23 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4228 thread was doing a step-over; always adjust the PC if
4229 we stepped over a permanent breakpoint.
4230 (linux_wait_1): If we stepped over breakpoint that was on top of a
4231 permanent breakpoint, manually advance the PC past it.
4232
4233 2015-02-23 Pedro Alves <palves@redhat.com>
4234
4235 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4236 modes.
4237 (x86_fill_gregset, x86_store_gregset): Use it when handling
4238 $orig_eax.
4239
4240 2015-02-20 Pedro Alves <palves@redhat.com>
4241
4242 * thread-db.c: Include "nat/linux-procfs.h".
4243 (thread_db_init): Skip listing new threads if the kernel supports
4244 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4245
4246 2015-02-20 Pedro Alves <palves@redhat.com>
4247
4248 * linux-low.c (status_pending_p_callback): Use ptid_match.
4249
4250 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4251
4252 PR breakpoints/16812
4253 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4254 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4255 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4256
4257 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4258
4259 PR breakpoints/15956
4260 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4261
4262 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4263
4264 * linux-low.c (linux_low_btrace_conf): Print size.
4265 * server.c (handle_btrace_conf_general_set): New.
4266 (hanle_general_set): Call handle_btrace_conf_general_set.
4267 (handle_query): Report Qbtrace-conf:bts:size as supported.
4268
4269 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4270
4271 * linux-low.c (linux_low_enable_btrace): Update parameters.
4272 (linux_low_btrace_conf): New.
4273 (linux_target_ops)<to_btrace_conf>: Initialize.
4274 * server.c (current_btrace_conf): New.
4275 (handle_btrace_enable): Rename to ...
4276 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4277 to target_enable_btrace. Update comment. Update users.
4278 (handle_qxfer_btrace_conf): New.
4279 (qxfer_packets): Add btrace-conf entry.
4280 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4281 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4282 (target_ops)<read_btrace_conf>: New.
4283 (target_enable_btrace): Update parameters.
4284 (target_read_btrace_conf): New.
4285
4286 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4287
4288 * server.c (handle_btrace_general_set): Remove call to
4289 target_supports_btrace.
4290 (supported_btrace_packets): New.
4291 (handle_query): Call supported_btrace_packets.
4292 * target.h: include btrace-common.h.
4293 (btrace_target_info): Removed.
4294 (supports_btrace, target_supports_btrace): Update parameters.
4295
4296 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4297
4298 * Makefile.in (SFILES): Add common/btrace-common.c.
4299 (OBS): Add common/btrace-common.o.
4300 (btrace-common.o): Add build rules.
4301 * linux-low: Include btrace-common.h.
4302 (linux_low_read_btrace): Use struct btrace_data. Call
4303 btrace_data_init and btrace_data_fini.
4304
4305 2015-02-06 Pedro Alves <palves@redhat.com>
4306
4307 * thread-db.c (find_new_threads_callback): Add debug output.
4308
4309 2015-02-04 Pedro Alves <palves@redhat.com>
4310
4311 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4312 (resume_stopped_resumed_lwps): New function.
4313 (linux_wait_for_event_filtered): Use it.
4314
4315 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4316
4317 * Makefile.in (SFILES): Add linux-personality.c.
4318 (linux-personality.o): New rule.
4319 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4320 list of objects to be built.
4321 * linux-low.c: Include nat/linux-personality.h.
4322 (linux_create_inferior): Remove code to disable address space
4323 randomization (moved to ../nat/linux-personality.c). Create
4324 cleanup to disable address space randomization.
4325
4326 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4327
4328 * Makefile.in (posix-strerror.o): New rule.
4329 (mingw-strerror.o): Likewise.
4330 * configure: Regenerated.
4331 * configure.ac: Source file ../common/common.host. Initialize new
4332 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4333
4334 2015-01-14 Yao Qi <yao@codesourcery.com>
4335
4336 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4337 (ppc-linux.o): New rule.
4338 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4339 * configure.ac: AC_CHECK_FUNCS(getauxval).
4340 * config.in: Re-generated.
4341 * configure: Re-generated.
4342 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4343 ppc64_64bit_inferior_p
4344
4345 2015-01-14 Yao Qi <yao@codesourcery.com>
4346
4347 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4348 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4349 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4350 (PT_ORIG_R3, PT_TRAP): Likewise.
4351 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4352 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4353 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4354
4355 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4356
4357 * i387-fp.c (i387_cache_to_xsave): In look over
4358 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4359 zmmh_low_space field by use of zmmh_high_space.
4360
4361 2015-01-09 Pedro Alves <palves@redhat.com>
4362
4363 * linux-low.c (step_over_bkpt): Move higher up in the file.
4364 (handle_extended_wait): Don't store the stop_pc here.
4365 (get_stop_pc): Adjust comments and rename to ...
4366 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4367 stopped for a software breakpoint or hardware breakpoint.
4368 (thread_still_has_status_pending_p): New function.
4369 (status_pending_p_callback): Use
4370 thread_still_has_status_pending_p. If the event is no longer
4371 interesting, resume the LWP.
4372 (handle_tracepoints): Add assert.
4373 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4374 (wstatus_maybe_breakpoint): New function.
4375 (cancel_breakpoint): Delete function.
4376 (check_stopped_by_watchpoint): New function, factored out from
4377 linux_low_filter_event.
4378 (lp_status_maybe_breakpoint): Delete function.
4379 (linux_low_filter_event): Remove filter_ptid argument.
4380 Leave thread group exits pending here. Store the LWP's stop PC.
4381 Always leave events pending.
4382 (linux_wait_for_event_filtered): Pull all events out of the
4383 kernel, and leave them all pending.
4384 (count_events_callback, select_event_lwp_callback): Consider all
4385 events.
4386 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4387 (select_event_lwp): Only give preference to the stepping LWP in
4388 all-stop mode. Adjust comments.
4389 (ignore_event): New function.
4390 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4391 references to cancel_breakpoints. Adjust to renames. Also give
4392 equal priority to all LWPs that have had events in non-stop mode.
4393 If reporting a software breakpoint event, unadjust the LWP's PC.
4394 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4396 Adjust.
4397 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4398 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4399 (linux_stopped_by_watchpoint): Adjust.
4400 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4401 * linux-low.h (enum lwp_stop_reason): New.
4402 (struct lwp_info) <stop_pc>: Adjust comment.
4403 <stopped_by_watchpoint>: Delete field.
4404 <stop_reason>: New field.
4405 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4406 * mem-break.c (software_breakpoint_inserted_here)
4407 (hardware_breakpoint_inserted_here): New function.
4408 * mem-break.h (software_breakpoint_inserted_here)
4409 (hardware_breakpoint_inserted_here): Declare.
4410 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4411 (cancel_breakpoints): Delete.
4412 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4413 (upload_fast_traceframes): Remove references to
4414 cancel_breakpoints.
4415
4416 2015-01-09 Pedro Alves <palves@redhat.com>
4417
4418 * thread-db.c (find_new_threads_callback): Ignore thread if the
4419 kernel thread ID is -1.
4420
4421 2015-01-09 Pedro Alves <palves@redhat.com>
4422
4423 * linux-low.c (linux_attach_fail_reason_string): Move to
4424 nat/linux-ptrace.c, and rename.
4425 (linux_attach_lwp): Update comment.
4426 (attach_proc_task_lwp_callback): New function.
4427 (linux_attach): Adjust to rename and use
4428 linux_proc_attach_tgid_threads.
4429 (linux_attach_fail_reason_string): Delete declaration.
4430
4431 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4432
4433 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4434 * server.c (gdbserver_version): Likewise.
4435
4436 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4437
4438 * remote-utils.c: Include ctype.h.
4439 (input_interrupt): Explicitly handle the case when the char
4440 received is the NUL byte. Improve the printing of non-ASCII
4441 characters.
4442
4443 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4444
4445 * linux-low.c (linux_low_filter_event): Update call to
4446 linux_enable_event_reporting following the addition of
4447 a new parameter to that function.
4448
4449 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4450
4451 PR server/17457
4452 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4453 (AARCH64_FPCR_REGNO): Likewise.
4454 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4455 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4456 (aarch64_store_fpregset): Likewise.
4457
4458 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4459
4460 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4461 Remove FIXME comment about assumption about N.
4462
4463 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4464
4465 * configure.ac: If large-file support is disabled in GDBserver,
4466 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4467 * configure: Regenerate.
4468
4469 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4470
4471 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4472 warning upon ENODATA from ptrace.
4473 * linux-s390-low.c (s390_store_tdb): New.
4474 (s390_regsets): Add regset for NT_S390_TDB.
4475
4476 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4477
4478 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4479 without a fill_function.
4480 * linux-s390-low.c (s390_fill_last_break): Remove.
4481 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4482 (s390_arch_setup): Use regset's size instead of fill_function for
4483 loop end condition.
4484
4485 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4486
4487 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4488 the regset's store function when ptrace returned an error.
4489 * regcache.c (get_thread_regcache): Invalidate register cache
4490 before fetching inferior's registers.
4491
4492 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4493
4494 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4495 while-loop as for-loop.
4496 (regsets_store_inferior_registers): Likewise.
4497
4498 2014-11-28 Yao Qi <yao@codesourcery.com>
4499
4500 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4501 * config.in, configure: Re-generate.
4502 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4503 is defined.
4504
4505 2014-11-21 Yao Qi <yao@codesourcery.com>
4506
4507 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4508 (AC_CHECK_HEADERS): Remove malloc.h.
4509 * configure: Re-generated.
4510 * config.in: Re-generated.
4511 * server.h: Don't include alloca.h and malloc.h.
4512 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4513 Don't include malloc.h.
4514
4515 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4516
4517 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4518 corresponding ERRNO check in same block.
4519
4520 2014-11-12 Pedro Alves <palves@redhat.com>
4521
4522 * server.c (cont_thread): Update comment.
4523 (start_inferior, attach_inferior): No longer clear cont_thread.
4524 (handle_v_cont): No longer set cont_thread.
4525 (captured_main): Clear cont_thread each time a GDB connects.
4526
4527 2014-11-12 Pedro Alves <palves@redhat.com>
4528
4529 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4530 thread, and don't resume all threads if the Hc thread has exited.
4531
4532 2014-11-12 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4535 the process group instead of to a specific LWP.
4536
4537 2014-10-15 Pedro Alves <palves@redhat.com>
4538
4539 PR server/17487
4540 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4541 parameter.
4542 (arm_set_thread_context): Delete.
4543 (the_low_target): Adjust.
4544 * win32-i386-low.c (debug_registers_changed)
4545 (debug_registers_used): Delete.
4546 (update_debug_registers_callback): New function.
4547 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4548 needing to update their debug registers.
4549 (win32_get_current_dr): New function.
4550 (x86_dr_low_get_addr, x86_dr_low_get_control)
4551 (x86_dr_low_get_status): Fetch the debug register from the thread
4552 record's context.
4553 (i386_initial_stuff): Adjust.
4554 (i386_get_thread_context): Remove current_event parameter. Don't
4555 clear debug_registers_changed nor copy DR values to
4556 debug_reg_state.
4557 (i386_set_thread_context): Delete.
4558 (i386_prepare_to_resume): New function.
4559 (i386_thread_added): Mark the thread as needing to update irs
4560 debug registers.
4561 (the_low_target): Remove i386_set_thread_context and install
4562 i386_prepare_to_resume.
4563 * win32-low.c (win32_get_thread_context): Adjust.
4564 (win32_set_thread_context): Use SetThreadContext
4565 directly.
4566 (win32_prepare_to_resume): New function.
4567 (win32_require_context): New function, factored out from ...
4568 (thread_rec): ... this.
4569 (continue_one_thread): Call win32_prepare_to_resume on each thread
4570 we're about to continue.
4571 (win32_resume): Call win32_prepare_to_resume on the event thread.
4572 * win32-low.h (struct win32_thread_info)
4573 <debug_registers_changed>: New field.
4574 (struct win32_target_ops): Change prototype of set_thread_context,
4575 delete set_thread_context and add prepare_to_resume.
4576 (win32_require_context): New declaration.
4577
4578 2014-10-08 Gary Benson <gbenson@redhat.com>
4579
4580 * server.h: Do not include common-exceptions.h.
4581
4582 2014-10-08 Gary Benson <gbenson@redhat.com>
4583
4584 * server.h: Do not include cleanups.h.
4585
4586 2014-09-30 James Hogan <james.hogan@imgtec.com>
4587
4588 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4589 mips64-dsp-linux.c.
4590
4591 2014-09-23 Yao Qi <yao@codesourcery.com>
4592
4593 * linux-low.c (lp_status_maybe_breakpoint): New function.
4594 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4595 (count_events_callback): Likewise.
4596 (select_event_lwp_callback): Likewise.
4597 (cancel_breakpoints_callback): Likewise.
4598
4599 2014-09-19 Don Breazeal <donb@codesourcery.com>
4600
4601 * linux-low.c (handle_extended_wait): Call
4602 linux_ptrace_get_extended_event.
4603 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4604 linux_is_extended_waitstatus.
4605
4606 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4607
4608 * Makefile.in (CPPFLAGS): Define.
4609 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4610 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4611
4612 2014-09-16 Gary Benson <gbenson@redhat.com>
4613
4614 * inferiors.h (current_inferior): Renamed as...
4615 (current_thread): New variable. All uses updated.
4616 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4617 (maybe_move_out_of_jump_pad): Likewise.
4618 (cancel_breakpoint): Likewise.
4619 (linux_low_filter_event): Likewise.
4620 (wait_for_sigstop): Likewise.
4621 (linux_resume_one_lwp): Likewise.
4622 (need_step_over_p): Likewise.
4623 (start_step_over): Likewise.
4624 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4625 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4626 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4627 and save_inferior as saved_thread.
4628 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4629 saved_thread.
4630 (regcache_invalidate_thread): Likewise.
4631 * remote-utils.c (prepare_resume_reply): Likewise.
4632 * thread-db.c (thread_db_get_tls_address): Likewise.
4633 (disable_thread_event_reporting): Likewise.
4634 (remove_thread_event_breakpoints): Likewise.
4635 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4636 as saved_thread.
4637 * target.h (set_desired_inferior): Renamed as...
4638 (set_desired_thread): New declaration. All uses updated.
4639 * server.c (myresume): Updated comment to reference thread instead
4640 of inferior.
4641 (handle_serial_event): Likewise.
4642 (handle_target_event): Likewise.
4643
4644 2014-09-12 Tom Tromey <tromey@redhat.com>
4645 Gary Benson <gbenson@redhat.com>
4646
4647 * regcache.h: Include common-regcache.h.
4648 (regcache_read_pc): Don't declare.
4649 * regcache.c (get_thread_regcache_for_ptid): New function.
4650
4651 2014-09-11 Tom Tromey <tromey@redhat.com>
4652 Gary Benson <gbenson@redhat.com>
4653
4654 * symbol.c: New file.
4655 * Makefile.in (SFILES): Add symbol.c.
4656 (OBS): Add symbol.o.
4657
4658 2014-09-11 Gary Benson <gbenson@redhat.com>
4659
4660 * target.c (target_stop_ptid, target_continue_ptid): New
4661 functions.
4662
4663 2014-09-11 Tom Tromey <tromey@redhat.com>
4664 Gary Benson <gbenson@redhat.com>
4665
4666 * target.h: Include target/target.h.
4667 * target.c (target_read_memory, target_read_uint32)
4668 (target_write_memory): New functions.
4669
4670 2014-09-11 Gary Benson <gbenson@redhat.com>
4671
4672 * server.h (debug_hw_points): Don't declare.
4673 * server.c (debug_hw_points): Don't define. Replace all uses
4674 with show_debug_regs.
4675 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4676 all uses with show_debug_regs.
4677
4678 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4679
4680 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4681 endianness into account.
4682 (ppc_supply_ptrace_register): Likewise.
4683
4684 2014-09-03 James Hogan <james.hogan@imgtec.com>
4685
4686 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4687 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4688
4689 2014-09-03 Gary Benson <gbenson@redhat.com>
4690
4691 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4692 ALL_DEBUG_ADDRESS_REGISTERS.
4693
4694 2014-09-02 Gary Benson <gbenson@redhat.com>
4695
4696 * i386-low.h: Renamed as...
4697 * x86-low.h: New file. All type, function and variable name
4698 prefixes changed from "i386_" to "x86_". All references updated.
4699 * i386-low.c: Renamed as...
4700 * x86-low.c: New file. All type, function and variable name
4701 prefixes changed from "i386_" to "x86_". All references updated.
4702
4703 2014-09-02 Gary Benson <gbenson@redhat.com>
4704
4705 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4706 (x86_linux_new_thread): Likewise.
4707
4708 2014-08-29 Gary Benson <gbenson@redhat.com>
4709
4710 * server.h (setjmp.h): Do not include.
4711 (toplevel): Do not declare.
4712 (common-exceptions.h): Include.
4713 (cleanups.h): Likewise.
4714 * server.c (toplevel): Do not define.
4715 (exit_code): New static global.
4716 (detach_or_kill_for_exit_cleanup): New function.
4717 (main): New function. Original main renamed to...
4718 (captured_main): New function.
4719 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4720
4721 2014-08-29 Gary Benson <gbenson@redhat.com>
4722
4723 * Makefile.in (SFILES): Add common/common-exceptions.c.
4724 (OBS): Add common-exceptions.o.
4725 (common-exceptions.o): New rule.
4726 * utils.c (prepare_to_throw_exception): New function.
4727
4728 2014-08-29 Gary Benson <gbenson@redhat.com>
4729
4730 * config.in: Regenerate.
4731 * configure: Likewise.
4732
4733 2014-08-29 Gary Benson <gbenson@redhat.com>
4734
4735 * Makefile.in (SFILES): Add common/cleanups.c.
4736 (OBS): cleanups.o.
4737 (cleanups.o): New rule.
4738
4739 2014-08-29 Gary Benson <gbenson@redhat.com>
4740
4741 * utils.c (internal_vwarning): New function.
4742
4743 2014-08-28 Gary Benson <gbenson@redhat.com>
4744
4745 * utils.h (fatal): Remove declaration.
4746 * utils.c (fatal): Remove function.
4747
4748 2014-08-28 Gary Benson <gbenson@redhat.com>
4749
4750 * tracepoint.c (gdb_agent_init): Replace fatal with
4751 perror_with_name.
4752 (initialize_tracepoint): Likewise.
4753
4754 2014-08-28 Gary Benson <gbenson@redhat.com>
4755
4756 * remote-utils.c (remote_prepare): Replace fatal with error.
4757
4758 2014-08-28 Gary Benson <gbenson@redhat.com>
4759
4760 * linux-low.c (linux_async): Replace fatal with warning.
4761 Tidy up and return.
4762 (linux_start_non_stop): Return -1 if linux_async failed.
4763
4764 2014-08-28 Gary Benson <gbenson@redhat.com>
4765
4766 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4767 gdb_assert.
4768 (i386_dr_low_get_addr): Remove vague comment.
4769 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4770 gdb_assert.
4771
4772 2014-08-28 Gary Benson <gbenson@redhat.com>
4773
4774 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4775 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4776 internal_error.
4777 (linux_resume_one_lwp): Likewise.
4778 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4779 gdb_assert.
4780 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4781 with internal_error.
4782 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4783 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4784 (find_register_by_name): Replace fatal with internal_error.
4785 (find_regno): Likewise.
4786 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4787 * thread-db.c (thread_db_create_event): Likewise.
4788 (thread_db_load_search): Likewise.
4789 (try_thread_db_load_1): Likewise.
4790 * tracepoint.c (get_jump_space_head): Replace fatal with
4791 internal_error.
4792 (claim_trampoline_space): Likewise.
4793 (have_fast_tracepoint_trampoline_buffer): Likewise.
4794 (cmd_qtstart): Likewise.
4795 (stop_tracing): Likewise.
4796 (fast_tracepoint_collecting): Likewise.
4797 (target_malloc): Likewise.
4798 (download_tracepoint): Likewise.
4799 (download_trace_state_variables): Replace check with gdb_assert.
4800 (upload_fast_traceframes): Replace fatal with internal_error.
4801
4802 2014-08-19 Tom Tromey <tromey@redhat.com>
4803 Gary Benson <gbenson@redhat.com>
4804
4805 * Makefile.in (SFILES): Add common/common-debug.c.
4806 (OBS): Add common-debug.o.
4807 (common-debug.o): New rule.
4808 * debug.h (debug_printf): Don't declare.
4809 * debug.c (debug_printf): Renamed and rewritten as...
4810 (debug_vprintf): New function.
4811
4812 2014-08-19 Gary Benson <gbenson@redhat.com>
4813
4814 * utils.h: Do not include print-utils.h.
4815
4816 2014-08-19 Tom Tromey <tromey@redhat.com>
4817 Gary Benson <gbenson@redhat.com>
4818
4819 * server.h: Add static assertion.
4820 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4821
4822 2014-08-19 Tom Tromey <tromey@redhat.com>
4823 Gary Benson <gbenson@redhat.com>
4824
4825 * Makefile.in (SFILES): Add common/errors.c.
4826 (OBS): Add errors.o.
4827 (IPA_OBS): Add errors-ipa.o.
4828 (errors.o): New rule.
4829 (errors-ipa.o): Likewise.
4830 * utils.h (perror_with_name, error, warning): Don't declare.
4831 * utils.c (warning): Renamed and rewritten as...
4832 (vwarning): New function.
4833 (error): Renamed and rewritten as...
4834 (verror): New function.
4835 (internal_error): Renamed and rewritten as...
4836 (internal_verror): New function.
4837
4838 2014-08-07 Gary Benson <gbenson@redhat.com>
4839
4840 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4841 * configure: Regenerate.
4842 * config.in: Likewise.
4843 * server.h: Do not include errno.h.
4844 * event-loop.c: Likewise.
4845 * hostio-errno.c: Likewise.
4846 * linux-low.c: Likewise.
4847 * remote-utils.c: Likewise.
4848 * spu-low.c: Likewise.
4849 * utils.c: Likewise.
4850 * gdbreplay.c: Unconditionally include errno.h.
4851
4852 2014-08-07 Gary Benson <gbenson@redhat.com>
4853
4854 * server.h: Do not include string.h.
4855 * event-loop.c: Likewise.
4856 * linux-low.c: Likewise.
4857 * regcache.c: Likewise.
4858 * remote-utils.c: Likewise.
4859 * spu-low.c: Likewise.
4860 * utils.c: Likewise.
4861
4862 2014-08-07 Gary Benson <gbenson@redhat.com>
4863
4864 * server.h: Do not include gdb_assert.h.
4865
4866 2014-08-07 Gary Benson <gbenson@redhat.com>
4867
4868 * server.h: Do not include common-utils.h.
4869
4870 2014-08-07 Gary Benson <gbenson@redhat.com>
4871
4872 * server.h: Do not include ptid.h.
4873 * notif.h: Likewise.
4874
4875 2014-08-07 Gary Benson <gbenson@redhat.com>
4876
4877 * server.h: Do not include gdb_locale.h.
4878
4879 2014-08-07 Gary Benson <gbenson@redhat.com>
4880
4881 * server.h: Do not include gdb/signals.h.
4882 * win32-low.c: Likewise.
4883
4884 2014-08-07 Gary Benson <gbenson@redhat.com>
4885
4886 * server.h: Do not include pathmax.h.
4887
4888 2014-08-07 Gary Benson <gbenson@redhat.com>
4889
4890 * server.h: Do not include libiberty.h.
4891 * linux-bfin-low.c: Likewise.
4892
4893 2014-08-07 Gary Benson <gbenson@redhat.com>
4894
4895 * server.h: Do not include ansidecl.h.
4896
4897 2014-08-07 Gary Benson <gbenson@redhat.com>
4898
4899 * linux-x86-low.c: Do not include stddef.h.
4900 * lynx-ppc-low.c: Likewise.
4901 * tracepoint.c: Likewise.
4902
4903 2014-08-07 Gary Benson <gbenson@redhat.com>
4904
4905 * server.h: Do not include stdarg.h.
4906 * nto-low.c: Likewise.
4907
4908 2014-08-07 Gary Benson <gbenson@redhat.com>
4909
4910 * server.h: Do not include stdlib.h.
4911 * inferiors.c: Likewise.
4912 * linux-low.c: Likewise.
4913 * regcache.c: Likewise.
4914 * spu-low.c: Likewise.
4915 * tracepoint.c: Likewise.
4916 * utils.c: Likewise.
4917
4918 2014-08-07 Gary Benson <gbenson@redhat.com>
4919
4920 * server.h: Do not include stdio.h.
4921 * linux-low.c: Likewise.
4922 * remote-utils.c: Likewise.
4923 * spu-low.c: Likewise.
4924 * utils.c: Likewise.
4925 * wincecompat.c: Likewise.
4926
4927 2014-08-06 Gary Benson <gbenson@redhat.com>
4928
4929 * regcache.c (init_register_cache): Move conditionals inside if.
4930
4931 2014-08-06 Gary Benson <gbenson@redhat.com>
4932
4933 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4934
4935 2014-07-31 Gary Benson <gbenson@redhat.com>
4936
4937 * ax.h: Do not include server.h.
4938 * gdbthread.h: Likewise.
4939 * lynx-low.h: Likewise.
4940 * notif.h: Likewise.
4941
4942 2014-07-30 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Include common-defs.h.
4945 Do not include config.h or build-gnulib-gdbserver/config.h.
4946
4947 2014-07-30 Gary Benson <gbenson@redhat.com>
4948
4949 * hostio-errno.c: Move server.h to top of includes list.
4950 * inferiors.c: Likewise.
4951 * linux-x86-low.c: Likewise.
4952 * notif.c: Include server.h.
4953
4954 2014-07-24 Tom Tromey <tromey@redhat.com>
4955 Gary Benson <gbenson@redhat.com>
4956
4957 * server.h (CORE_ADDR): Now unsigned.
4958
4959 2014-07-16 Pedro Alves <palves@redhat.com>
4960
4961 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4962
4963 2014-07-15 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4966 copy.
4967
4968 2014-07-11 Pedro Alves <palves@redhat.com>
4969
4970 * linux-low.c (kill_wait_lwp): New function, based on
4971 kill_one_lwp_callback, but use my_waitpid directly.
4972 (kill_one_lwp_callback, linux_kill): Use it.
4973
4974 2014-06-23 Pedro Alves <palves@redhat.com>
4975
4976 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4977 before setting DR0..DR3.
4978
4979 2014-06-20 Gary Benson <gbenson@redhat.com>
4980
4981 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4982 * configure: Regenerated.
4983 * config.in: Likewise.
4984
4985 2014-06-20 Gary Benson <gbenson@redhat.com>
4986
4987 * Makefile.in (SFILES): Update locations for files moved
4988 from common to nat.
4989 (object file files): Reordered.
4990
4991 2014-06-20 Gary Benson <gbenson@redhat.com>
4992
4993 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4994 (i386_dr_low_set_addr): Likewise.
4995 (i386_dr_low_get_addr): Likewise.
4996 (i386_dr_low_can_set_control): Likewise.
4997 (i386_dr_low_set_control): Likewise.
4998 (i386_dr_low_get_control): Likewise.
4999 (i386_dr_low_get_status): Likewise.
5000 (i386_get_debug_register_length): Likewise.
5001 * linux-x86-low.c (i386_dr_low_set_addr):
5002 Changed signature. Made static.
5003 (i386_dr_low_get_addr): Likewise.
5004 (i386_dr_low_set_control): Likewise.
5005 (i386_dr_low_get_control): Likewise.
5006 (i386_dr_low_get_status): Likewise.
5007 (i386_dr_low): New global variable.
5008 * win32-i386-low.c (i386_dr_low_set_addr):
5009 Changed signature. Made static.
5010 (i386_dr_low_get_addr): Likewise.
5011 (i386_dr_low_set_control): Likewise.
5012 (i386_dr_low_get_control): Likewise.
5013 (i386_dr_low_get_status): Likewise.
5014 (i386_dr_low): New global variable.
5015
5016 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5017
5018 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5019 * Makefile.in (AR, AR_FLAGS): Define.
5020 * configure: Regenerate.
5021
5022 2014-06-19 Gary Benson <gbenson@redhat.com>
5023
5024 * Makefile.in (i386-dregs.o): New rule.
5025 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5026 * i386-low.c (target.h): Remove include.
5027 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5028 (DR_CONTROL_SHIFT): Likewise.
5029 (DR_CONTROL_SIZE): Likewise.
5030 (DR_RW_EXECUTE): Likewise.
5031 (DR_RW_WRITE): Likewise.
5032 (DR_RW_READ): Likewise.
5033 (DR_RW_IORW): Likewise.
5034 (DR_LEN_1): Likewise.
5035 (DR_LEN_2): Likewise.
5036 (DR_LEN_4): Likewise.
5037 (DR_LEN_8): Likewise.
5038 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5039 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5040 (DR_ENABLE_SIZE): Likewise.
5041 (DR_LOCAL_SLOWDOWN): Likewise.
5042 (DR_GLOBAL_SLOWDOWN): Likewise.
5043 (DR_CONTROL_RESERVED): Likewise.
5044 (I386_DR_CONTROL_MASK): Likewise.
5045 (I386_DR_VACANT): Likewise.
5046 (I386_DR_LOCAL_ENABLE): Likewise.
5047 (I386_DR_GLOBAL_ENABLE): Likewise.
5048 (I386_DR_DISABLE): Likewise.
5049 (I386_DR_SET_RW_LEN): Likewise.
5050 (I386_DR_GET_RW_LEN): Likewise.
5051 (I386_DR_WATCH_HIT): Likewise.
5052 (i386_wp_op_t): Likewise.
5053 (i386_show_dr): Likewise.
5054 (i386_length_and_rw_bits): Likewise.
5055 (i386_insert_aligned_watchpoint): Likewise.
5056 (i386_remove_aligned_watchpoint): Likewise.
5057 (i386_handle_nonaligned_watchpoint): Likewise.
5058 i386_update_inferior_debug_regs(): Likewise.
5059 (i386_dr_insert_watchpoint): Likewise.
5060 (i386_dr_remove_watchpoint): Likewise.
5061 (i386_dr_region_ok_for_watchpoint): Likewise.
5062 (i386_dr_stopped_data_address): Likewise.
5063 (i386_dr_stopped_by_watchpoint): Likewise.
5064
5065 2014-06-19 Gary Benson <gbenson@redhat.com>
5066
5067 * i386-low.c (i386_dr_show): Renamed to
5068 i386_show_dr and made static. All uses updated.
5069 (i386_dr_length_and_rw_bits): Renamed to
5070 i386_length_and_rw_bits and made static.
5071 All uses updated.
5072 (i386_dr_insert_aligned_watchpoint): Renamed to
5073 i386_insert_aligned_watchpoint and made static.
5074 All uses updated.
5075 (i386_dr_remove_aligned_watchpoint): Renamed to
5076 i386_remove_aligned_watchpoint and made static.
5077 All uses updated.
5078 (i386_dr_update_inferior_debug_regs): Renamed to
5079 i386_update_inferior_debug_regs and made static.
5080 All uses updated.
5081
5082 2014-06-18 Gary Benson <gbenson@redhat.com>
5083
5084 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5085 (i386_dr_low_can_set_control): Likewise.
5086 (i386_get_debug_register_length): Likewise.
5087 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5088 (i386_dr_low_can_set_control): Likewise.
5089 (i386_get_debug_register_length): Likewise.
5090
5091 2014-06-17 Gary Benson <gbenson@redhat.com>
5092
5093 * i386-low.h (i386-dregs.h): New include.
5094 (DR_FIRSTADDR): Now in i386-dregs.h.
5095 (DR_LASTADDR): Likewise.
5096 (DR_NADDR): Likewise.
5097 (DR_STATUS): Likewise.
5098 (DR_CONTROL): Likewise.
5099 (i386_debug_reg_state): Likewise.
5100 (i386_dr_insert_watchpoint): Likewise.
5101 (i386_dr_remove_watchpoint): Likewise.
5102 (i386_dr_region_ok_for_watchpoint): Likewise.
5103 (i386_dr_stopped_data_address): Likewise.
5104 (i386_dr_stopped_by_watchpoint): Likewise.
5105 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5106
5107 2014-06-18 Gary Benson <gbenson@redhat.com>
5108
5109 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5110 i386_dr_insert_watchpoint.
5111 (i386_low_remove_watchpoint): Renamed to
5112 i386_dr_remove_watchpoint.
5113 (i386_low_region_ok_for_watchpoint): Renamed to
5114 i386_dr_region_ok_for_watchpoint.
5115 (i386_low_stopped_data_address): Renamed to
5116 i386_dr_stopped_data_address.
5117 (i386_low_stopped_by_watchpoint): Renamed to
5118 i386_dr_stopped_by_watchpoint.
5119 * i386-low.c (i386_show_dr): Renamed to
5120 i386_dr_show and made nonstatic. All uses updated.
5121 (i386_length_and_rw_bits): Renamed to
5122 i386_dr_length_and_rw_bits and made nonstatic.
5123 All uses updated.
5124 (i386_insert_aligned_watchpoint): Renamed to
5125 i386_dr_insert_aligned_watchpoint and made nonstatic.
5126 All uses updated.
5127 (i386_remove_aligned_watchpoint): Renamed to
5128 i386_dr_remove_aligned_watchpoint and made nonstatic.
5129 All uses updated.
5130 (i386_update_inferior_debug_regs): Renamed to
5131 i386_dr_update_inferior_debug_regs and made nonstatic.
5132 All uses updated.
5133 (i386_low_insert_watchpoint): Renamed to
5134 i386_dr_insert_watchpoint. All uses updated.
5135 (i386_low_remove_watchpoint): Renamed to
5136 i386_dr_remove_watchpoint. All uses updated.
5137 (i386_low_region_ok_for_watchpoint): Renamed to
5138 i386_dr_region_ok_for_watchpoint. All uses updated.
5139 (i386_low_stopped_data_address): Renamed to
5140 i386_dr_stopped_data_address. All uses updated.
5141 (i386_low_stopped_by_watchpoint): Renamed to
5142 i386_dr_stopped_by_watchpoint. All uses updated.
5143
5144 2014-06-18 Gary Benson <gbenson@redhat.com>
5145
5146 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5147 (i386_dr_low_can_set_control): Likewise.
5148 (i386_insert_aligned_watchpoint): New check.
5149
5150 2014-06-18 Gary Benson <gbenson@redhat.com>
5151
5152 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5153 Renamed to state.
5154
5155 2014-06-18 Gary Benson <gbenson@redhat.com>
5156
5157 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5158 instead of fatal and error.
5159 (i386_handle_nonaligned_watchpoint): Likewise.
5160
5161 2014-06-18 Gary Benson <gbenson@redhat.com>
5162
5163 * i386-low.c (i386_get_debug_register_length): New macro.
5164 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5165 (i386_show_dr): Use debug_printf instead of fprintf. Use
5166 phex to format values.
5167
5168 2014-06-18 Gary Benson <gbenson@redhat.com>
5169
5170 * i386-low.h: Comment changes.
5171 * i386-low.c: Likewise.
5172
5173 2014-06-18 Gary Benson <gbenson@redhat.com>
5174
5175 * i386-low.c: Whitespace changes.
5176
5177 2014-06-12 Tom Tromey <tromey@redhat.com>
5178
5179 * utils.c (freeargv): Remove.
5180
5181 2014-06-12 Tom Tromey <tromey@redhat.com>
5182
5183 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5184 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5185 (parse_debug_format_options): Likewise.
5186 (gdbserver_usage): Likewise.
5187 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5188 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5189 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5190 against libiberty.
5191 ($(LIBGNU)): Depend on libiberty.
5192 (all-lib): Recurse into all subdirs.
5193 (install-only): Invoke "install" target in subdirs.
5194 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5195 targets.
5196 * configure: Rebuild.
5197 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5198 for vasprintf, vsnprintf, or gettimeofday.
5199 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5200 srv_tgtobj.
5201
5202 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5203
5204 * development.sh: Delete.
5205 * Makefile.in (config.status): Adjust dependency on development.sh.
5206 * configure.ac: Adjust development.sh source call.
5207 * configure: Regenerate.
5208
5209 2014-06-02 Pedro Alves <palves@redhat.com>
5210
5211 * ax.c (gdb_free_agent_expr): New function.
5212 * ax.h (gdb_free_agent_expr): New declaration.
5213 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5214 list.
5215 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5216 static.
5217 (clear_breakpoint_conditions_and_commands): New function.
5218 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5219 (clear_breakpoint_conditions_and_commands): New declaration.
5220
5221 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5222
5223 * linux-aarch64-low.c (asm/ptrace.h): Include.
5224
5225 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5226
5227 Fix TLS access for -static -pthread.
5228 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5229 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5230 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5231
5232 2014-05-20 Pedro Alves <palves@redhat.com>
5233
5234 * linux-aarch64-low.c (aarch64_insert_point)
5235 (aarch64_remove_point): No longer check whether the type is
5236 supported here. Adjust to new interface.
5237 (the_low_target): Install aarch64_supports_z_point_type as
5238 supports_z_point_type method.
5239 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5240 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5241 instead of a Z packet char. Adjust.
5242 (arm_supports_z_point_type): New function.
5243 (arm_insert_point, arm_remove_point): Adjust to new interface.
5244 (the_low_target): Install arm_supports_z_point_type.
5245 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5246 (cris_insert_point, cris_remove_point): Adjust to new interface.
5247 Don't check whether the type is supported here.
5248 (the_low_target): Install cris_supports_z_point_type.
5249 * linux-low.c (linux_supports_z_point_type): New function.
5250 (linux_insert_point, linux_remove_point): Adjust to new interface.
5251 * linux-low.h (struct linux_target_ops) <insert_point,
5252 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5253 raw_breakpoint pointer parameter.
5254 <supports_z_point_type>: New method.
5255 * linux-mips-low.c (mips_supports_z_point_type): New function.
5256 (mips_insert_point, mips_remove_point): Adjust to new interface.
5257 Use mips_supports_z_point_type.
5258 (the_low_target): Install mips_supports_z_point_type.
5259 * linux-ppc-low.c (the_low_target): Install NULL as
5260 supports_z_point_type method.
5261 * linux-s390-low.c (the_low_target): Install NULL as
5262 supports_z_point_type method.
5263 * linux-sparc-low.c (the_low_target): Install NULL as
5264 supports_z_point_type method.
5265 * linux-x86-low.c (x86_supports_z_point_type): New function.
5266 (x86_insert_point): Adjust to new insert_point interface. Use
5267 insert_memory_breakpoint. Adjust to new
5268 i386_low_insert_watchpoint interface.
5269 (x86_remove_point): Adjust to remove_point interface. Use
5270 remove_memory_breakpoint. Adjust to new
5271 i386_low_remove_watchpoint interface.
5272 (the_low_target): Install x86_supports_z_point_type.
5273 * lynx-low.c (lynx_target_ops): Install NULL as
5274 supports_z_point_type callback.
5275 * nto-low.c (nto_supports_z_point_type): New.
5276 (nto_insert_point, nto_remove_point): Adjust to new interface.
5277 (nto_target_ops): Install nto_supports_z_point_type.
5278 * mem-break.c: Adjust intro comment.
5279 (struct raw_breakpoint) <raw_type, size>: New fields.
5280 <inserted>: Update comment.
5281 <shlib_disabled>: Delete field.
5282 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5283 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5284 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5285 (raw_bkpt_type_to_target_hw_bp_type): New function.
5286 (find_enabled_raw_code_breakpoint_at): New function.
5287 (find_raw_breakpoint_at): New type and size parameters. Use them.
5288 (insert_memory_breakpoint): New function, based off
5289 set_raw_breakpoint_at.
5290 (remove_memory_breakpoint): New function.
5291 (set_raw_breakpoint_at): Reimplement.
5292 (set_breakpoint): New, based on set_breakpoint_at.
5293 (set_breakpoint_at): Reimplement.
5294 (delete_raw_breakpoint): Go through the_target->remove_point
5295 instead of assuming memory breakpoints.
5296 (find_gdb_breakpoint_at): Delete.
5297 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5298 (find_gdb_breakpoint): New function.
5299 (set_gdb_breakpoint_at): Delete.
5300 (z_type_supported): New function.
5301 (set_gdb_breakpoint_1): New function, loosely based off
5302 set_gdb_breakpoint_at.
5303 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5304 (delete_gdb_breakpoint_at): Delete.
5305 (delete_gdb_breakpoint_1): New function, loosely based off
5306 delete_gdb_breakpoint_at.
5307 (delete_gdb_breakpoint): New function.
5308 (clear_gdb_breakpoint_conditions): Rename to ...
5309 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5310 breakpoint.
5311 (add_condition_to_breakpoint): Make static.
5312 (add_breakpoint_condition): Take a struct breakpoint pointer
5313 instead of an address. Adjust.
5314 (gdb_condition_true_at_breakpoint): Rename to ...
5315 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5316 z_type parameter.
5317 (gdb_condition_true_at_breakpoint): Reimplement.
5318 (add_breakpoint_commands): Take a struct breakpoint pointer
5319 instead of an address. Adjust.
5320 (gdb_no_commands_at_breakpoint): Rename to ...
5321 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5322 parameter. Return true if no breakpoint was found. Change debug
5323 output.
5324 (gdb_no_commands_at_breakpoint): Reimplement.
5325 (run_breakpoint_commands): Rename to ...
5326 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5327 and change return type to boolean.
5328 (run_breakpoint_commands): New function.
5329 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5330 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5331 breakpoint. Go through the_target->remove_point instead of
5332 assuming memory breakpoint.
5333 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5334 software and hardware breakpoints.
5335 (reinsert_raw_breakpoint): Go through the_target->insert_point
5336 instead of assuming memory breakpoint.
5337 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5338 software and hardware breakpoints.
5339 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5340 Check both software and hardware breakpoints.
5341 (validate_inserted_breakpoint): Assert the breakpoint is a
5342 software breakpoint. Set the inserted flag to -1 instead of
5343 setting shlib_disabled.
5344 (delete_disabled_breakpoints): Adjust.
5345 (validate_breakpoints): Only validate software breakpoints.
5346 Adjust to inserted flag change.
5347 (check_mem_read, check_mem_write): Skip breakpoint types other
5348 than software breakpoints. Adjust to inserted flag change.
5349 * mem-break.h (enum raw_bkpt_type): New enum.
5350 (raw_breakpoint, struct process_info): Forward declare.
5351 (Z_packet_to_target_hw_bp_type): Delete declaration.
5352 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5353 (set_gdb_breakpoint, delete_gdb_breakpoint)
5354 (clear_breakpoint_conditions): New declarations.
5355 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5356 (breakpoint_inserted_here): Update comment.
5357 (add_breakpoint_condition, add_breakpoint_commands): Replace
5358 address parameter with a breakpoint pointer parameter.
5359 (gdb_breakpoint_here): Update comment.
5360 (delete_gdb_breakpoint_at): Delete.
5361 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5362 * server.c (process_point_options): Take a struct breakpoint
5363 pointer instead of an address. Adjust.
5364 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5365 delete_gdb_breakpoint.
5366 * spu-low.c (spu_target_ops): Install NULL as
5367 supports_z_point_type method.
5368 * target.h: Include mem-break.h.
5369 (struct target_ops) <prepare_to_access_memory>: Update comment.
5370 <supports_z_point_type>: New field.
5371 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5372 instead of a char. Also take a raw breakpoint pointer.
5373 * win32-arm-low.c (the_low_target): Install NULL as
5374 supports_z_point_type.
5375 * win32-i386-low.c (i386_supports_z_point_type): New function.
5376 (i386_insert_point, i386_remove_point): Adjust to new interface.
5377 (the_low_target): Install i386_supports_z_point_type.
5378 * win32-low.c (win32_supports_z_point_type): New function.
5379 (win32_insert_point, win32_remove_point): Adjust to new interface.
5380 (win32_target_ops): Install win32_supports_z_point_type.
5381 * win32-low.h (struct win32_target_ops):
5382 <supports_z_point_type>: New method.
5383 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5384 instead of a char. Also take a raw breakpoint pointer.
5385
5386 2014-05-20 Pedro Alves <palves@redhat.com>
5387
5388 * mem-break.h: Include break-common.h.
5389 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5390 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5391 (Z_packet_to_target_hw_bp_type): New declaration.
5392 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5393 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5394 (Z_PACKET_ACCESS_WP): Delete macros.
5395 (Z_packet_to_hw_type): Delete function.
5396 * i386-low.h: Don't include break-common.h here.
5397 (Z_packet_to_hw_type): Delete declaration.
5398 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5399 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5400 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5401 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5402 * linux-aarch64-low.c: Don't include break-common.h here.
5403 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5404 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5405 (Z_packet_to_target_hw_bp_type): Delete function.
5406 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5407 function.
5408 (mips_insert_point, mips_remove_point): Use
5409 Z_packet_to_target_hw_bp_type.
5410
5411 2014-05-20 Pedro Alves <palves@redhat.com>
5412
5413 * linux-aarch64-low.c: Include break-common.h.
5414 (enum target_point_type): Delete.
5415 (Z_packet_to_point_type): Rename to ...
5416 (Z_packet_to_target_hw_bp_type): ... this, and return a
5417 target_hw_bp_type instead.
5418 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5419 instead of an enum target_point_type.
5420 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5421 breakpoint type.
5422 (aarch64_dr_state_insert_one_point)
5423 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5424 (aarch64_handle_aligned_watchpoint)
5425 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5426 Take an enum target_hw_bp_type instead of an enum
5427 target_point_type.
5428 (aarch64_supports_z_point_type): New function.
5429 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5430 use Z_packet_to_target_hw_bp_type.
5431
5432 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5433
5434 * configure.ac: Only use -Werror by default when DEVELOPMENT
5435 is true.
5436 * configure: Regenerate.
5437
5438 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5439
5440 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5441 * linux-x86-low.c (X86_64_USER_REGS): New.
5442 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5443
5444 2014-04-28 Yao Qi <yao@codesourcery.com>
5445
5446 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5447 name.
5448
5449 2014-04-25 Pedro Alves <palves@redhat.com>
5450
5451 PR server/16255
5452 * linux-low.c (linux_attach_fail_reason_string): New function.
5453 (linux_attach_lwp): Delete.
5454 (linux_attach_lwp_1): Rename to ...
5455 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5456 argument. Remove "initial" parameter. Return int instead of
5457 void. Don't error or warn here.
5458 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5459 failure to attach to the tgid. Call warning when failing to
5460 attach to an lwp.
5461 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5462 argument. Remove "initial" parameter. Return int instead of
5463 void. Don't error or warn here.
5464 (linux_attach_fail_reason_string): New declaration.
5465 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5466 interface change. Use linux_attach_fail_reason_string.
5467
5468 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5469 Walfred Tedeschi <walfred.tedeschi@intel.com>
5470
5471 * Makefile.in: Added rules to handle new files
5472 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5473 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5474 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5475 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5476 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5477 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5478 x32-avx512-linux.o.
5479 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5480 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5481 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5482 i386/x32-avx512.xml.
5483 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5484 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5485 i386/x32-avx512-linux.xml.
5486 * i387-fp.c (num_avx512_k_registers): New constant for number
5487 of K registers.
5488 (num_avx512_zmmh_low_registers): New constant for number of
5489 lower ZMM registers (0-15).
5490 (num_avx512_zmmh_high_registers): New constant for number of
5491 higher ZMM registers (16-31).
5492 (num_avx512_ymmh_registers): New contant for number of higher
5493 YMM registers (ymm16-31 added by avx521 on x86_64).
5494 (num_avx512_xmm_registers): New constant for number of higher
5495 XMM registers (xmm16-31 added by AVX512 on x86_64).
5496 (struct i387_xsave): Add space for AVX512 registers.
5497 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5498 Add code to handle AVX512 registers.
5499 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5500 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5501 prototypei from generated file.
5502 (tdesc_amd64_avx512_linux): Likewise.
5503 (init_registers_x32_avx512_linux): Likewise.
5504 (tdesc_x32_avx512_linux): Likewise.
5505 (init_registers_i386_avx512_linux): Likewise.
5506 (tdesc_i386_avx512_linux): Likewise.
5507 (x86_64_regmap): Add AVX512 registers.
5508 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5509 mask.
5510 (initialize_low_arch): Add code to initialize AVX512 registers.
5511
5512 2014-04-23 Pedro Alves <palves@redhat.com>
5513
5514 * mem-break.c (find_gdb_breakpoint_at): Make static.
5515 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5516
5517 2014-04-23 Pedro Alves <palves@redhat.com>
5518
5519 * i386-low.c: Don't include break-common.h here.
5520 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5521 prototype to take target_hw_bp_type as argument instead of a Z
5522 packet char.
5523 * i386-low.h: Include break-common.h here.
5524 (Z_packet_to_hw_type): Declare.
5525 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5526 prototypes.
5527 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5528 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5529 (x86_remove_point): Convert the packet number to a
5530 target_hw_bp_type before calling i386_low_remove_watchpoint.
5531 * win32-i386-low.c (i386_insert_point): Convert the packet number
5532 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5533 (i386_remove_point): Convert the packet number to a
5534 target_hw_bp_type before calling i386_low_remove_watchpoint.
5535
5536 2014-04-23 Pedro Alves <palves@redhat.com>
5537
5538 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5539
5540 2014-04-10 Pedro Alves <palves@redhat.com>
5541
5542 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5543 Check if the condition or command is NULL before checking if the
5544 breakpoint is known. On success, return true.
5545 * mem-break.h (add_breakpoint_condition): Document return.
5546 (add_breakpoint_commands): Add describing comment.
5547 * server.c (skip_to_semicolon): New function.
5548 (process_point_options): Use it.
5549
5550 2014-04-09 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5553 to lwpid_of.
5554
5555 2014-02-27 Pedro Alves <palves@redhat.com>
5556
5557 PR 12702
5558 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5559 macros.
5560 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5561 output.
5562 (last_thread_of_process_p): Take a PID argument instead of a
5563 thread pointer.
5564 (linux_wait_for_lwp): Delete.
5565 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5566 functions.
5567 (linux_low_filter_event): New function, party factored out from
5568 linux_wait_for_event.
5569 (linux_wait_for_event): Rename to ...
5570 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5571 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5572 sigsuspend. Check for zombie leaders.
5573 (linux_wait_for_event): Reimplement as wrapper around
5574 linux_wait_for_event_filtered.
5575 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5576 a normal or signal exit is seen, it's the whole process exiting.
5577 (wait_for_sigstop): No longer a for_each_inferior callback.
5578 Rewrite on top of linux_wait_for_event_filtered.
5579 (stop_all_lwps): Call wait_for_sigstop directly.
5580 * server.c (resume, handle_target_event): Handle
5581 TARGET_WAITKIND_NO_RESUMED.
5582
5583 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5584
5585 * win32-low.c (psapi_get_dll_name,
5586 * win32_CreateToolhelp32Snapshot): Delete.
5587 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5588 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5589 Delete.
5590 (handle_load_dll): Add function description.
5591 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5592
5593 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5594
5595 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5596 Add comment.
5597 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5598 base address when calling win32_add_one_solib.
5599 (handle_load_dll): Delete local variable load_addr.
5600 Remove 0x1000 offset applied to DLL base address when calling
5601 win32_add_one_solib.
5602 (handle_unload_dll): Add comment.
5603
5604 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5605
5606 * win32-low.c (win32_add_all_dlls): Renames
5607 win32_ensure_ntdll_loaded. Rewrite function documentation.
5608 Adjust implementation to always load all DLLs.
5609 Add 0x1000 offset to DLL base address when calling
5610 win32_add_one_solib.
5611 (child_initialization_done): New static global.
5612 (do_initial_child_stuff): Set child_initialization_done to
5613 zero during child initialization, and 1 after. Replace call
5614 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5615 Add comment.
5616 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5617 (handle_unload_dll): Add function documentation.
5618 (get_child_debug_event): Ignore load and unload DLL events
5619 during child initialization.
5620
5621 2014-02-20 Doug Evans <dje@google.com>
5622
5623 Remove global all_lwps.
5624 * inferiors.h (ptid_of): Move here from linux-low.h.
5625 (pid_of, lwpid_of): Ditto.
5626 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5627 parameter is a struct thread_info * now.
5628 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5629 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5630 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5631 directly.
5632 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5633 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5634 * linux-arm-low.c (update_registers_callback): Update, "entry"
5635 parameter is a struct thread_info * now.
5636 Fetch lwpid from current_inferior directly.
5637 (arm_insert_point): Pass &all_threads to find_inferior instead of
5638 &all_lwps.
5639 (arm_remove_point): Ditto.
5640 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5641 (arm_prepare_to_resume): Fetch pid from thread.
5642 (arm_read_description): Fetch lwpid from current_inferior directly.
5643 * linux-low.c (all_lwps): Delete.
5644 (delete_lwp): Delete call to remove_inferior.
5645 (handle_extended_wait): Fetch lwpid from thread.
5646 (add_lwp): Don't set lwp->entry.id. Remove call to
5647 add_inferior_to_list.
5648 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5649 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5650 (kill_one_lwp_callback): Ditto.
5651 (linux_kill): Don't dereference NULL pointer.
5652 Fetch ptid,lwpid from thread.
5653 (get_detach_signal): Fetch ptid from thread.
5654 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5655 Simplify call to regcache_invalidate_thread.
5656 (delete_lwp_callback): Update, "entry" parameter is a
5657 struct thread_info * now. Fetch pid from thread.
5658 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5659 (status_pending_p_callback): Update, "entry" parameter is a
5660 struct thread_info * now. Fetch ptid from thread.
5661 (find_lwp_pid): Update, "entry" parameter is a
5662 struct thread_info * now.
5663 (linux_wait_for_lwp): Fetch pid from thread.
5664 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5665 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5666 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5667 (dequeue_one_deferred_signal): Ditto.
5668 (cancel_breakpoint): Fetch ptid from current_inferior.
5669 (linux_wait_for_event): Pass &all_threads to find_inferior,
5670 not &all_lwps. Fetch ptid, lwpid from thread.
5671 (count_events_callback): Update, "entry" parameter is a
5672 struct thread_info * now.
5673 (select_singlestep_lwp_callback): Ditto.
5674 (select_event_lwp_callback): Ditto.
5675 (cancel_breakpoints_callback): Ditto.
5676 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5677 not &all_lwps.
5678 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5679 (unsuspend_one_lwp): Update, "entry" parameter is a
5680 struct thread_info * now.
5681 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5682 not &all_lwps.
5683 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5684 Fetch lwpid from thread, not lwp.
5685 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5686 Pass &all_threads to find_inferior, not &all_lwps.
5687 (send_sigstop): Fetch lwpid from thread, not lwp.
5688 (send_sigstop_callback): Update, "entry" parameter is a
5689 struct thread_info * now.
5690 (suspend_and_send_sigstop_callback): Ditto.
5691 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5692 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5693 struct thread_info * now.
5694 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5695 from thread, lwp.
5696 (lwp_running): Update, "entry" parameter is a
5697 struct thread_info * now.
5698 (stop_all_lwps): Fetch ptid from thread.
5699 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5700 (linux_resume_one_lwp): Fetch lwpid from thread.
5701 (linux_set_resume_request): Update, "entry" parameter is a
5702 struct thread_info * now. Fetch pid, lwpid from thread.
5703 (resume_status_pending_p): Update, "entry" parameter is a
5704 struct thread_info * now.
5705 (need_step_over_p): Ditto. Fetch lwpid from thread.
5706 (start_step_over): Fetch lwpid from thread.
5707 (linux_resume_one_thread): Update, "entry" parameter is a
5708 struct thread_info * now. Fetch lwpid from thread.
5709 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5710 (proceed_one_lwp): Update, "entry" parameter is a
5711 struct thread_info * now. Fetch lwpid from thread.
5712 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5713 struct thread_info * now.
5714 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5715 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5716 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5717 directly.
5718 (regsets_store_inferior_registers): Ditto.
5719 (fetch_register, store_register): Ditto.
5720 (linux_read_memory, linux_write_memory): Ditto.
5721 (linux_request_interrupt): Ditto.
5722 (linux_read_auxv): Ditto.
5723 (linux_xfer_siginfo): Ditto.
5724 (linux_qxfer_spu): Ditto.
5725 (linux_qxfer_libraries_svr4): Ditto.
5726 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5727 moved to inferiors.h.
5728 (get_lwp): Delete.
5729 (get_thread_lwp): Update.
5730 (struct lwp_info): Delete member "entry". Simplify comment for
5731 member "thread".
5732 (all_lwps): Delete.
5733 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5734 current_inferior directly.
5735 (update_watch_registers_callback): Update, "entry" parameter is a
5736 struct thread_info * now. Fetch pid from thread.
5737 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5738 (mips_insert_point): Fetch lwpid from current_inferior.
5739 Pass &all_threads to find_inferior, not &all_lwps.
5740 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5741 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5742 directly.
5743 (mips_stopped_data_address): Ditto.
5744 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5745 directly.
5746 * linux-tile-low.c (tile_arch_setup): Ditto.
5747 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5748 (update_debug_registers_callback): Update, "entry" parameter is a
5749 struct thread_info * now. Fetch pid from thread.
5750 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5751 Pass &all_threads to find_inferior, not &all_lwps.
5752 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5753 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5754 Pass &all_threads to find_inferior, not &all_lwps.
5755 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5756 (i386_dr_low_get_status): Ditto.
5757 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5758 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5759 (x86_linux_read_description): Ditto.
5760 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5761
5762 2014-02-20 Doug Evans <dje@google.com>
5763
5764 * inferiors.c (get_first_inferior): Fix buglet.
5765
5766 2014-02-19 Doug Evans <dje@google.com>
5767
5768 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5769 * inferiors.c (add_thread): Change result type to struct thread_info *.
5770 All callers updated.
5771 (add_lwp): Call add_thread here instead of in callers.
5772 All callers updated.
5773 * linux-low.h (get_lwp_thread): Rewrite.
5774 (struct lwp_info): New member "thread".
5775
5776 2014-02-19 Doug Evans <dje@google.com>
5777
5778 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5779 All callers updated.
5780
5781 2014-02-19 Doug Evans <dje@google.com>
5782
5783 * inferiors.c (add_thread): Fix whitespace.
5784
5785 2014-02-19 Doug Evans <dje@google.com>
5786
5787 * dll.c (clear_dlls): Replace accessing list implemention details
5788 with API function.
5789 * gdbthread.h (get_first_thread): Declare.
5790 * inferiors.c (for_each_inferior_with_data): New function.
5791 (get_first_thread): New function.
5792 (find_thread_ptid): Simplify.
5793 (get_first_inferior): New function.
5794 (clear_list): Delete.
5795 (one_inferior_p): New function.
5796 (clear_inferior_list): New function.
5797 (clear_inferiors): Update.
5798 * inferiors.h (for_each_inferior_with_data): Declare.
5799 (clear_inferior_list): Declare.
5800 (one_inferior_p): Declare.
5801 (get_first_inferior): Declare.
5802 * linux-low.c (linux_wait_for_event): Replace accessing list
5803 implemention details with API function.
5804 * server.c (target_running): Ditto.
5805 (accumulate_file_name_length): New function.
5806 (emit_dll_description): New function.
5807 (handle_qxfer_libraries): Replace accessing list implemention
5808 details with API function.
5809 (handle_qxfer_threads_worker): New function.
5810 (handle_qxfer_threads_proper): Replace accessing list implemention
5811 details with API function.
5812 (handle_query): Ditto.
5813 (visit_actioned_threads_callback_ftype): New typedef.
5814 (visit_actioned_threads_data): New struct.
5815 (visit_actioned_threads): Rewrite to be find_inferior callback.
5816 (resume): Call find_inferior.
5817 (handle_status): Replace accessing list implemention
5818 details with API function.
5819 (process_serial_event): Replace accessing list implemention details
5820 with API function.
5821 * target.c (set_desired_inferior): Replace accessing list implemention
5822 details with API function.
5823 * tracepoint.c (same_process_p): New function.
5824 (gdb_agent_about_to_close): Replace accessing list implemention
5825 details with API function.
5826 * win32-low.c (child_delete_thread): Replace accessing list
5827 implemention details with API function.
5828 (match_dll_by_basename): New function.
5829 (dll_is_loaded_by_basename): New function.
5830 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5831 details call to dll_is_loaded_by_basename.
5832
5833 2014-02-19 Doug Evans <dje@google.com>
5834
5835 * dll.h (struct dll_info): Add comment.
5836 * gdbthread.h (struct thread_info): Add comment.
5837 (current_ptid): Simplify.
5838 * inferiors.c (add_process): Update.
5839 (remove_process): Update.
5840 * inferiors.h (struct process_info): Rename member "head" to "entry".
5841 * linux-low.c (delete_lwp): Update.
5842 (add_lwp): Update.
5843 (last_thread_of_process_p): Update.
5844 (kill_one_lwp_callback, linux_kill): Update.
5845 (status_pending_p_callback): Update.
5846 (wait_for_sigstop): Update. Simplify read of ptid.
5847 (start_step_over): Update.
5848 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5849 (get_lwp_thread): Update.
5850 (struct lwp_info): Rename member "head" to "entry".
5851 * regcache.h (inferior_list_entry): Delete.
5852 * server.c (kill_inferior_callback): Update.
5853 (detach_or_kill_inferior_callback): Update.
5854 (print_started_pid): Update.
5855 (print_attached_pid): Update.
5856 (process_serial_event): Simplify read of ptid.
5857 * thread-db.c (thread_db_create_event): Update.
5858 (thread_db_get_tls_address): Update.
5859 * win32-low.c (current_inferior_ptid): Simplify.
5860
5861 2014-02-19 Tom Tromey <tromey@redhat.com>
5862
5863 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5864 argument.
5865 (target_supports_btrace): Update.
5866
5867 2014-02-14 Yao Qi <yao@codesourcery.com>
5868
5869 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5870 (rsp-low-ipa.o): New target.
5871
5872 2014-02-12 Tom Tromey <tromey@redhat.com>
5873
5874 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5875 convert_ascii_to_int.
5876 * regcache.c (registers_to_string): Likewise.
5877 * remote-utils.c (decode_M_packet): Likewise.
5878 * server.c (process_serial_event): Likewise.
5879
5880 2014-02-12 Tom Tromey <tromey@redhat.com>
5881
5882 * server.c (handle_query, handle_v_run): Use hex2bin, not
5883 unhexify.
5884 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5885
5886 2014-02-12 Tom Tromey <tromey@redhat.com>
5887
5888 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5889 convert_int_to_ascii.
5890 * regcache.c (registers_to_string, collect_register_as_string):
5891 Likewise.
5892 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5893 Likewise.
5894 * server.c (process_serial_event): Likewise.
5895 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5896 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5897
5898 2014-02-12 Tom Tromey <tromey@redhat.com>
5899
5900 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5901 bin2hex, not hexify.
5902 * tracepoint.c (cmd_qtstatus): Likewise.
5903
5904 2014-02-12 Tom Tromey <tromey@redhat.com>
5905
5906 * remote-utils.c (monitor_output): Pass explicit length to
5907 hexify.
5908
5909 2014-02-12 Tom Tromey <tromey@redhat.com>
5910
5911 * tracepoint.c: Include rsp-low.h.
5912 * server.c: Include rsp-low.h.
5913 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5914 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5915 declare.
5916 * remote-utils.c: Include rsp-low.h.
5917 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5918 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5919 (convert_int_to_ascii, convert_ascii_to_int): Move to
5920 common/rsp-low.c.
5921 * regcache.c: Include rsp-low.h.
5922 * ax.c: Include rsp-low.h.
5923 * Makefile.in (SFILES): Add common/rsp-low.c.
5924 (OBS): Add rsp-low.o.
5925 (rsp-low.o): New target.
5926
5927 2014-02-12 Tom Tromey <tromey@redhat.com>
5928
5929 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5930 Include print-utils.h.
5931 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5932 (plongest, thirty_two, phex_nz): Remove.
5933 * Makefile.in (SFILES): Add common/print-utils.c.
5934 (OBS): Add print-utils.o.
5935 (print-utils-ipa.o): New target.
5936 (print-utils.o): New target.
5937 (IPA_OBJS): Add print-utils-ipa.o.
5938
5939 2014-02-06 Tom Tromey <tromey@redhat.com>
5940
5941 * Makefile.in (SFILES): Fix indentation.
5942
5943 2014-02-05 Doug Evans <dje@google.com>
5944
5945 * linux-low.c (linux_wait_for_event): Improve comment.
5946 (linux_wait_1): Keep current_inferior in sync with event_child.
5947
5948 2014-01-22 Doug Evans <dje@google.com>
5949
5950 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5951
5952 2014-01-22 Doug Evans <dje@google.com>
5953
5954 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5955 * configure: Regenerate.
5956 * config.in: Regenerate.
5957 * Makefile.in (SFILES): Add debug.c.
5958 (OBS): Add debug.o.
5959 * debug.c: New file.
5960 * debug.h: New file.
5961 * linux-aarch64-low.c (*): Update all debugging printfs to use
5962 debug_printf instead of fprintf.
5963 * linux-arm-low.c (*): Ditto.
5964 * linux-cris-low.c (*): Ditto.
5965 * linux-crisv32-low.c (*): Ditto.
5966 * linux-m32r-low.c (*): Ditto.
5967 * linux-sparc-low.c (*): Ditto.
5968 * linux-x86.c (*): Ditto.
5969 * linux-low.c (*): Ditto.
5970 (linux_wait_1): Add calls to debug_enter, debug_exit.
5971 (linux_wait): Remove redundant debugging printf.
5972 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5973 (linux_resume, unstop_all_lwps): Ditto.
5974 * mem-break.c (*): Update all debugging printfs to use
5975 debug_printf instead of fprintf.
5976 * remote-utils.c (*): Ditto.
5977 * thread-db.c (*): Ditto.
5978 * server.c #include <ctype.h>, "gdb_vecs.h".
5979 (debug_threads): Moved to debug.c.
5980 (*): Update all debugging printfs to use debug_printf instead of
5981 fprintf.
5982 (start_inferior): Replace call to fflush with call to debug_flush.
5983 (monitor_show_help): Mention set debug-format.
5984 (parse_debug_format_options): New function.
5985 (handle_monitor_command): Handle "monitor set debug-format".
5986 (gdbserver_usage): Mention --debug-format.
5987 (main): Parse --debug-format.
5988 * server.h (debug_threads): Declaration moved to debug.h.
5989 #include "debug.h".
5990 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5991 trace_debug_1 that uses debug_printf.
5992 (tracepoint_look_up_symbols): Update all debugging printfs to use
5993 debug_printf instead of fprintf.
5994
5995 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5996
5997 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5998 sys/ptrace.h.
5999
6000 2014-01-17 Pedro Alves <palves@redhat.com>
6001
6002 PR build/16445
6003 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6004 defined after including gdb_proc_service.h.
6005
6006 2014-01-16 Doug Evans <dje@google.com>
6007
6008 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6009 (match_dll): Use it.
6010
6011 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6012
6013 * target.h (target_ops) <read_btrace>: Change parameters and
6014 return type to allow error reporting.
6015 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6016 trace reading errors on.
6017 * linux-low.c (linux_low_read_btrace): Pass trace reading
6018 errors on.
6019 (linux_low_disable_btrace): New.
6020
6021 2014-01-15 Doug Evans <dje@google.com>
6022
6023 * inferiors.c (thread_id_to_gdb_id): Delete.
6024 * inferiors.h (thread_id_to_gdb_id): Delete.
6025
6026 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6027
6028 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6029 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6030 versions.
6031
6032 2014-01-08 Pedro Alves <palves@redhat.com>
6033
6034 * server.c (handle_status): Don't discard previous queued stop
6035 replies or thread's pending status here.
6036 (main) <disconnection>: Do it here instead.
6037
6038 2014-01-08 Pedro Alves <palves@redhat.com>
6039
6040 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6041 * server.c (visit_actioned_threads, handle_pending_status): New
6042 function.
6043 (handle_v_cont): Factor out parts to ...
6044 (resume): ... this new function. If in all-stop, and a thread
6045 being resumed has a pending status, report it without actually
6046 resuming.
6047 (myresume): Adjust to use the new 'resume' function.
6048 (clear_pending_status_callback, set_pending_status_callback)
6049 (find_status_pending_thread_callback): New functions.
6050 (handle_status): Handle the case of multiple threads having
6051 interesting statuses to report. Report threads' real last signal
6052 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6053 with an interesting thread to report the status for, instead of
6054 always reporting the status of the first thread.
6055
6056 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6057
6058 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6059 * gdbreplay.c (gdbreplay_version): Likewise.
6060
6061 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6062
6063 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6064 iov.iov_len with the real length in use.
6065
6066 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6067
6068 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6069 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6070 for all targets that use win32-low.c.
6071 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6072 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6073
6074 2013-12-13 Pedro Alves <palves@redhat.com>
6075
6076 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6077 if equal to TARGET_WAITKIND_LOADED.
6078 * win32-low.c (cached_status): New static global.
6079 (win32_wait): Add declaration.
6080 (do_initial_child_stuff): Flush all initial pending debug events
6081 up to the initial breakpoint.
6082 (win32_wait): If CACHED_STATUS was set, return that instead
6083 of doing a real wait. Remove the code resuming the execution
6084 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6085 during the initial phase. Also remove the code changing
6086 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6087 TARGET_WAITKIND_STOPPED.
6088
6089 2013-12-11 Yao Qi <yao@codesourcery.com>
6090
6091 * notif.c (handle_notif_ack): Return 0 if no notification
6092 matches.
6093
6094 2013-11-20 Doug Evans <dje@google.com>
6095
6096 * linux-low.c (linux_set_resume_request): Fix comment.
6097
6098 2013-11-20 Doug Evans <dje@google.com>
6099
6100 * linux-low.c (resume_status_pending_p): Tweak comment.
6101
6102 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6103
6104 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6105 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6106 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6107 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6108 (srv_amd64_regobj): Add amd64-mpx.o.
6109 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6110 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6111 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6112 * i387-fp.c (num_pl_bnd_register) Added constant.
6113 (num_pl_bnd_cfg_registers) Added constant.
6114 (struct i387_xsave) Added reserved area and MPX fields.
6115 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6116 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6117 function.
6118 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6119 (init_registers_amd64_mpx_linux): Declare new function.
6120 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6121 (x86_64_regmap): Add MPX registers.
6122 (x86_linux_read_description): Add MPX case.
6123 (initialize_low_arch): Initialize MPX targets.
6124
6125 2013-11-18 Tom Tromey <tromey@redhat.com>
6126
6127 * configure: Rebuild.
6128 * configure.ac: Don't check for stdlib.h.
6129 * gdbreplay.c: Unconditionally include stdlib.h.
6130
6131 2013-11-18 Tom Tromey <tromey@redhat.com>
6132
6133 * config.in: Rebuild.
6134 * configure: Rebuild.
6135 * configure.ac: Don't use AC_HEADER_DIRENT.
6136
6137 2013-11-18 Tom Tromey <tromey@redhat.com>
6138
6139 * server.h: Don't check HAVE_STRING_H.
6140 * gdbreplay.c: Don't check HAVE_STRING_H.
6141 * configure: Rebuild.
6142
6143 2013-11-18 Tom Tromey <tromey@redhat.com>
6144
6145 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6146 LIBGNU.
6147
6148 2013-11-08 Tom Tromey <tromey@redhat.com>
6149
6150 * configure, config.in: Rebuild.
6151 * configure.ac: Remove unused configury.
6152
6153 2013-11-08 Tom Tromey <tromey@redhat.com>
6154
6155 * acinclude.m4: Include common.m4, codeset.m4.
6156 * configure, config.in: Rebuild.
6157 * configure.ac: Use GDB_AC_COMMON.
6158
6159 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6160
6161 * linux-s390-low.c (HWCAP_S390_TE): New define.
6162 (s390_arch_setup): Consider the TE field in the HWCAP for
6163 determining 'have_regset_tdb'.
6164
6165 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6166
6167 PR gdb/16014
6168 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6169 call to sizeof.
6170
6171 2013-10-02 Pedro Alves <palves@redhat.com>
6172
6173 * server.c (process_serial_event): Don't output "GDBserver
6174 exiting" if GDB is connected through stdio.
6175 * target.c (mywait): Likewise, be silent if GDB is connected
6176 through stdio.
6177
6178 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6179
6180 * lynx-low.c (lynx_add_threads_after_attach): New function.
6181 (lynx_attach): Remove call to add_thread. Add call to
6182 lynx_add_threads_after_attach instead.
6183
6184 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6185
6186 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6187 * config.in, configure: Regenerated.
6188
6189 2013-09-18 Yao Qi <yao@codesourcery.com>
6190
6191 PR server/15959
6192 * server.c (start_inferior): Clear 'resume_info'.
6193
6194 2013-09-16 Jiong Wang <jiwang@tilera.com>
6195
6196 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6197 for each register.
6198
6199 2013-09-16 Jiong Wang <jiwang@tilera.com>
6200
6201 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6202 linux-tile-low.o to srv_tgtobj.
6203
6204 2013-09-16 Will Newton <will.newton@linaro.org>
6205
6206 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6207 out regs.
6208
6209 2013-09-06 Pedro Alves <palves@redhat.com>
6210
6211 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6212 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6213 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6214 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6215 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6216 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6217
6218 2013-09-06 Pedro Alves <palves@redhat.com>
6219
6220 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6221 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6222
6223 2013-09-06 Pedro Alves <palves@redhat.com>
6224
6225 * linux-amd64-ipa.c: Include tracepoint.h.
6226 * linux-i386-ipa.c: Include tracepoint.h.
6227
6228 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6229
6230 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6231 (ps_get_thread_area): New function.
6232
6233 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6234
6235 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6236 (initialize_low_arch): Call init_registers_crisv32 rather than
6237 init_register_crisv32.
6238
6239 2013-09-05 Pedro Alves <palves@redhat.com>
6240
6241 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6242 to ...
6243 * hostio.h: ... this new file.
6244 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6245 win32-low.c: Include hostio.h.
6246
6247 2013-09-05 Pedro Alves <palves@redhat.com>
6248
6249 * server.h (gdb_client_data, handler_func, callback_handler_func)
6250 (delete_file_handler, add_file_handler, append_callback_event)
6251 (delete_callback_event, start_event_loop, initialize_event_loop):
6252 Move to event-loop.h and include it.
6253 * event-loop.h: New file.
6254
6255 2013-09-05 Pedro Alves <palves@redhat.com>
6256
6257 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6258 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6259 (loaded_dll, unloaded_dll): Move to ...
6260 * dll.h: ... this new file.
6261 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6262
6263 2013-09-05 Pedro Alves <palves@redhat.com>
6264
6265 * server.h (current_process, get_thread_process, all_processes)
6266 (add_inferior_to_list, for_each_inferior, current_inferior)
6267 (remove_inferior, add_process, remove_process, find_process_pid)
6268 (have_started_inferiors_p, have_attached_inferiors_p)
6269 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6270 (clear_inferiors, find_inferior, find_inferior_id)
6271 (inferior_target_data, set_inferior_target_data)
6272 (inferior_regcache_data, set_inferior_regcache_data): Move to
6273 inferiors.h, and include it.
6274 * inferiors.h: New file.
6275
6276 2013-09-05 Pedro Alves <palves@redhat.com>
6277
6278 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6279 Move ...
6280 * ax.h: ... here.
6281
6282 2013-09-05 Pedro Alves <palves@redhat.com>
6283
6284 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6285 tracepoint.h.
6286 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6287 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6288 (handle_tracepoint_general_set, handle_tracepoint_query)
6289 (tracepoint_finished_step, tracepoint_was_hit)
6290 (release_while_stepping_state_list, current_traceframe)
6291 (in_readonly_region, traceframe_read_mem)
6292 (fetch_traceframe_registers, traceframe_read_sdata)
6293 (traceframe_read_info, struct fast_tpoint_collect_status)
6294 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6295 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6296 (supply_fast_tracepoint_registers)
6297 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6298 (ipa_tdesc, claim_trampoline_space)
6299 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6300 (agent_mem_read, agent_get_trace_state_variable_value)
6301 (agent_set_trace_state_variable_value, agent_tsv_read)
6302 (agent_mem_read_string, get_raw_reg_func_addr)
6303 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6304 * tracepoint.h: ... this new file.
6305
6306 2013-09-05 Pedro Alves <palves@redhat.com>
6307
6308 * server.h (perror_with_name, error, fatal, warning, paddress)
6309 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6310 include it.
6311 * utils.h: New file.
6312
6313 2013-09-05 Pedro Alves <palves@redhat.com>
6314
6315 * server.h (remote_debug, noack_mode, transport_is_reliable)
6316 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6317 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6318 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6319 (write_enn, initialize_async_io, enable_async_io)
6320 (disable_async_io, check_remote_input_interrupt_request)
6321 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6322 (dead_thread_notify, prepare_resume_reply)
6323 (decode_address_to_semicolon, decode_address, decode_m_packet)
6324 (decode_M_packet, decode_X_packet, decode_xfer_write)
6325 (decode_search_memory_packet, unhexify, hexify)
6326 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6327 (look_up_one_symbol, relocate_instruction)
6328 (monitor_output): Move to remote-utils.h, and include it.
6329 * remote-utils.h: New file.
6330
6331 2013-09-05 Pedro Alves <palves@redhat.com>
6332
6333 * server.h (_): Delete.
6334
6335 2013-09-02 Pedro Alves <palves@redhat.com>
6336
6337 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6338 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6339 allocated.
6340 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6341
6342 2013-09-02 Pierre Muller <muller@sourceware.org>
6343
6344 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6345 or WriteProcessMemory complete successfully and handle
6346 ERROR_PARTIAL_COPY error.
6347
6348 2013-09-02 Pedro Alves <palves@redhat.com>
6349
6350 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6351 error instead of EIO.
6352
6353 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6354
6355 PR server/15604
6356 * linux-low.c: Include filestuff.h.
6357 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6358 * lynx-low.c: Include filestuff.h.
6359 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6360 * server.c: Include filestuff.h.
6361 (main): Call notice_open_fds.
6362 * spu-low.c: Include filestuff.h.
6363 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6364
6365 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6366
6367 * Makefile.in: Explain why ../target and ../nat are not
6368 listed as include file search paths.
6369 (linux-waitpid.o): New object file rule.
6370 * configure.srv (srv_native_linux_obj): New variable.
6371 Replace all occurrences of linux native object files with
6372 $srv_native_linux_obj.
6373 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6374 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6375 (linux_enable_event_reporting): Remove declaration.
6376 (my_waitpid): Moved to common/linux-waitpid.c.
6377 (linux_wait_for_event): Pass ptid when calling
6378 linux_enable_event_reporting.
6379 (linux_supports_tracefork_flag): Remove.
6380 (linux_enable_event_reporting): Likewise.
6381 (linux_tracefork_grandchild): Remove.
6382 (STACK_SIZE): Moved to common/linux-ptrace.c.
6383 (linux_tracefork_child): Remove.
6384 (linux_test_for_tracefork): Remove.
6385 (linux_look_up_symbols): Call linux_supports_traceclone.
6386 (initialize_low): Remove call to linux_test_for_tracefork.
6387 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6388 common/linux-ptrace.h.
6389 (PTRACE_TYPE_ARG4): Likewise.
6390 Include linux-ptrace.h.
6391
6392 2013-08-21 Pedro Alves <palves@redhat.com>
6393
6394 * config.in: Renegerate.
6395
6396 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6397
6398 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6399 (SFILES): Remove $(srcdir)/common/target-common.c and
6400 add $(srcdir)/target/waitstatus.c.
6401 (OBS): Remove target-common.o and add waitstatus.o.
6402 (server_h): Remove $(srcdir)/../common/target-common.h and
6403 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6404 and $(srcdir)/../target/waitstatus.h.
6405 (target-common.o): Remove.
6406 (waitstatus.o): New target object file.
6407 * target.h: Do not include target-common.h and
6408 include target/resume.h, target/wait.h and
6409 target/waitstatus.h.
6410
6411 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6412
6413 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6414 to PTRACE_TYPE_ARG3.
6415 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6416 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6417 PTRACE_TYPE_ARG4.
6418 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6419 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6420
6421 2013-07-27 Jie Zhang <jie@codesourcery.com>
6422 Daniel Jacobowitz <dan@codesourcery.com>
6423 Yao Qi <yao@codesourcery.com>
6424
6425 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6426 (mips-linux-watch.o): New rule.
6427 (mips_linux_watch_h): New variable.
6428 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6429 srv_tgtobj.
6430 * linux-mips-low.c: Include mips-linux-watch.h.
6431 (struct arch_process_info, struct arch_lwp_info): New.
6432 (update_watch_registers_callback): New function.
6433 (mips_linux_new_process, mips_linux_new_thread) New functions.
6434 (mips_linux_prepare_to_resume, mips_insert_point): New
6435 functions.
6436 (mips_remove_point, mips_stopped_by_watchpoint): New
6437 functions.
6438 (rsp_bp_type_to_target_hw_bp_type): New function.
6439 (mips_stopped_data_address): New function.
6440 (the_low_target): Add watchpoint support functions.
6441
6442 2013-07-27 Yao Qi <yao@codesourcery.com>
6443
6444 * i386-low.c: Include break-common.h.
6445 (enum target_hw_bp_type): Remove.
6446
6447 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6448
6449 * Makefile.in (SFILES): /common/target-common.c.
6450 (OBS): Add target-common.o.
6451 (server_h): Add $(srcdir)/../common/target-common.h.
6452 (target-common.o): New target.
6453 * server.c (queue_stop_reply_callback): Free
6454 status string after use.
6455 * target.c (target_waitstatus_to_string): Remove.
6456 * target.h: Include target-common.h.
6457 (resume_kind): Likewise.
6458 (target_waitkind): Likewise.
6459 (target_waitstatus): Likewise.
6460 (TARGET_WNOHANG): Likewise.
6461
6462 2013-07-04 Yao Qi <yao@codesourcery.com>
6463
6464 * Makefile.in (host_alias): Use @host_noncanonical@.
6465 (target_alias): Use @target_noncanonical@.
6466 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6467 ACX_NONCANONICAL_HOST.
6468 * configure: Regenerated.
6469
6470 Revert:
6471 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6472
6473 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6474 * configure: Rebuild.
6475 * Makefile.in (version_host, version_target): Get from configure.
6476 (version.c): Use $(version_host) and $(version_target).
6477
6478 2013-07-03 Pedro Alves <palves@redhat.com>
6479
6480 * Makefile.in (config.status): Depend on development.sh.
6481 * acinclude.m4: Include libmcheck.m4.
6482 * configure: Regenerate.
6483
6484 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6485
6486 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6487 attribute inside the parentheses.
6488 (winapi_DebugSetProcessKillOnExit): Ditto.
6489 (winapi_DebugBreakProcess): Ditto.
6490 (winapi_GenerateConsoleCtrlEvent): Ditto.
6491
6492 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6493
6494 * notif.h (notif_event): Add a dummy member to avoid compiler
6495 errors.
6496
6497 2013-07-01 Pedro Alves <palves@redhat.com>
6498
6499 * hostio.c (HOSTIO_PATH_MAX): Define.
6500 (require_filename, handle_open, handle_unlink, handle_readlink):
6501 Use it.
6502
6503 2013-07-01 Pedro Alves <palves@redhat.com>
6504
6505 * server.h: Include "pathmax.h".
6506 * linux-low.c: Don't include sys/param.h.
6507 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6508 MAXPATHLEN.
6509 * win32-low.c: Don't include sys/param.h.
6510 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6511
6512 2013-07-01 Pedro Alves <palves@redhat.com>
6513
6514 * event-loop.c: Don't check HAVE_UNISTD_H before including
6515 <unistd.h>.
6516 * gdbreplay.c: Likewise.
6517 * remote-utils.c: Likewise.
6518 * server.c: Likewise.
6519 * configure.ac: Don't check for unistd.h.
6520 * configure: Regenerate.
6521
6522 2013-06-28 Tom Tromey <tromey@redhat.com>
6523
6524 * Makefile.in (version.c): Use version.in, not
6525 common/version.in.
6526
6527 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6528
6529 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6530 * configure: Rebuild.
6531 * Makefile.in (version_host, version_target): Get from configure.
6532 (version.c): Use $(version_host) and $(version_target).
6533
6534 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6535
6536 Fix trace-status to output user name without trailing colon.
6537 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6538
6539 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6540
6541 Fix trace-status to output proper start-time and stop-time.
6542 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6543 output start time and stop time in hex as gdb expects.
6544
6545 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6546
6547 * tracepoint.c (build_traceframe_info_xml): Output trace state
6548 variables present in the trace buffer.
6549
6550 2013-06-24 Tom Tromey <tromey@redhat.com>
6551
6552 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6553 create-version.sh.
6554 (version.o): Remove.
6555 * gdbreplay.c: Include version.h.
6556 (version, host_name): Don't declare.
6557 * server.h: Include version.h.
6558 (version, host_name): Don't declare.
6559
6560 2013-06-12 Pedro Alves <palves@redhat.com>
6561
6562 * linux-x86-low.c (linux_is_elf64): Delete global.
6563 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6564 with local linux_pid_exe_is_elf_64_file use.
6565
6566 2013-06-11 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (regset_disabled, disable_regset): New functions.
6569 (regsets_fetch_inferior_registers)
6570 (regsets_store_inferior_registers): Use them.
6571 (initialize_regsets_info); Don't allocate the disabled_regsets
6572 array here.
6573 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6574 comment.
6575
6576 2013-06-11 Pedro Alves <palves@redhat.com>
6577
6578 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6579 xmalloc.
6580
6581 2013-06-11 Pedro Alves <palves@redhat.com>
6582
6583 * linux-x86-low.c (initialize_low_arch): Call
6584 init_registers_x32_avx_linux.
6585
6586 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6587
6588 Fix compatibility with Android Bionic.
6589 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6590 it is not empty.
6591
6592 2013-06-07 Pedro Alves <palves@redhat.com>
6593
6594 PR server/14823
6595 * Makefile.in (OBS): Add tdesc.o.
6596 (IPA_OBJS): Add tdesc-ipa.o.
6597 (tdesc-ipa.o): New rule.
6598 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6599 interface.
6600 * linux-low.c (new_inferior): Delete.
6601 (disabled_regsets, num_regsets): Delete.
6602 (linux_add_process): Adjust to set the new per-process
6603 new_inferior flag.
6604 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6605 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6606 was a stop. When calling arch_setup, switch the current inferior
6607 to the thread that got an event.
6608 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6609 (regsets_fetch_inferior_registers)
6610 (regsets_store_inferior_registers): New regsets_info parameter.
6611 Adjust to use it.
6612 (linux_register_in_regsets): New regs_info parameter. Adjust to
6613 use it.
6614 (register_addr, fetch_register, store_register): New usrregs_info
6615 parameter. Adjust to use it.
6616 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6617 parameter regs_info. Adjust to use it.
6618 (linux_fetch_registers): Get the current inferior's regs_info, and
6619 adjust to use it.
6620 (linux_store_registers): Ditto.
6621 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6622 (initialize_low): Don't initialize the target_regsets here. Call
6623 initialize_low_arch.
6624 * linux-low.h (target_regsets): Delete declaration.
6625 (struct regsets_info): New.
6626 (struct usrregs_info): New.
6627 (struct regs_info): New.
6628 (struct process_info_private) <new_inferior>: New field.
6629 (struct linux_target_ops): Delete the num_regs, regmap, and
6630 regset_bitmap fields. New field regs_info.
6631 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6632 * i387-fp.c (num_xmm_registers): Delete.
6633 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6634 calls to new interface.
6635 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6636 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6637 Infer the number of xmm registers from the regcache's target
6638 description.
6639 * i387-fp.h (num_xmm_registers): Delete.
6640 * inferiors.c (add_thread): Don't install the thread's regcache
6641 here.
6642 * proc-service.c (gregset_info): Fetch the current inferior's
6643 regs_info. Adjust to use it.
6644 * regcache.c: Include tdesc.h.
6645 (register_bytes, reg_defs, num_registers)
6646 (gdbserver_expedite_regs): Delete.
6647 (get_thread_regcache): If the thread doesn't have a regcache yet,
6648 create one, instead of aborting gdbserver.
6649 (regcache_invalidate_one): Rename to ...
6650 (regcache_invalidate_thread): ... this.
6651 (regcache_invalidate_one): New.
6652 (regcache_invalidate): Only invalidate registers of the current
6653 process.
6654 (init_register_cache): Add target_desc parameter, and use it.
6655 (new_register_cache): Ditto. Assert the target description has a
6656 non zero registers_size.
6657 (regcache_cpy): Add assertions. Adjust.
6658 (realloc_register_cache, set_register_cache): Delete.
6659 (registers_to_string, registers_from_string): Adjust.
6660 (find_register_by_name, find_regno, find_register_by_number)
6661 (register_cache_size): Add target_desc parameter, and use it.
6662 (free_register_cache_thread, free_register_cache_thread_one)
6663 (regcache_release, register_cache_size): New.
6664 (register_size): Add target_desc parameter, and use it.
6665 (register_data, supply_register, supply_register_zeroed)
6666 (supply_regblock, supply_register_by_name, collect_register)
6667 (collect_register_as_string, collect_register_by_name): Adjust.
6668 * regcache.h (struct target_desc): Forward declare.
6669 (struct regcache) <tdesc>: New field.
6670 (init_register_cache, new_register_cache): Add target_desc
6671 parameter.
6672 (regcache_invalidate_thread): Declare.
6673 (regcache_invalidate_one): Delete declaration.
6674 (regcache_release): Declare.
6675 (find_register_by_number, register_cache_size, register_size)
6676 (find_regno): Add target_desc parameter.
6677 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6678 declarations.
6679 * remote-utils.c: Include tdesc.h.
6680 (outreg, prepare_resume_reply): Adjust.
6681 * server.c: Include tdesc.h.
6682 (gdbserver_xmltarget): Delete declaration.
6683 (get_features_xml, process_serial_event): Adjust.
6684 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6685 declare.
6686 (struct process_info) <tdesc>: New field.
6687 (ipa_tdesc): Declare.
6688 * tdesc.c: New file.
6689 * tdesc.h: New file.
6690 * tracepoint.c: Include tdesc.h.
6691 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6692 (get_context_regcache): Adjust to pass ipa_tdesc down.
6693 (do_action_at_tracepoint): Adjust to get the register cache size
6694 from the context regcache's description.
6695 (traceframe_walk_blocks): Adjust to get the register cache size
6696 from the current trace frame's description.
6697 (traceframe_get_pc): Adjust to get current trace frame's
6698 description and pass it down.
6699 (gdb_collect): Adjust to get the register cache size from the
6700 IPA's description.
6701 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6702 (gdbserver_xmltarget): Delete.
6703 (initialize_low_tracepoint): Set the ipa's target description.
6704 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6705 (initialize_low_tracepoint): Set the ipa's target description.
6706 * linux-x86-low.c: Include tdesc.h.
6707 [__x86_64__] (is_64bit_tdesc): New.
6708 (ps_get_thread_area, x86_get_thread_area): Use it.
6709 (i386_cannot_store_register): Rename to ...
6710 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6711 (i386_cannot_fetch_register): Rename to ...
6712 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6713 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6714 to new interface.
6715 (target_regsets): Rename to ...
6716 (x86_regsets): ... this.
6717 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6718 interface.
6719 (x86_siginfo_fixup): Use is_64bit_tdesc.
6720 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6721 (tdesc_x32_avx_linux, tdesc_x32_linux)
6722 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6723 Declare.
6724 (x86_linux_update_xmltarget): Delete.
6725 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6726 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6727 (AMD64_LINUX_USER64_CS): New.
6728 (x86_linux_read_description): New, based on
6729 x86_linux_update_xmltarget.
6730 (same_process_callback): New.
6731 (x86_arch_setup_process_callback): New.
6732 (x86_linux_update_xmltarget): New.
6733 (x86_regsets_info): New.
6734 (amd64_linux_regs_info): New.
6735 (i386_linux_usrregs_info): New.
6736 (i386_linux_regs_info): New.
6737 (x86_linux_regs_info): New.
6738 (x86_arch_setup): Reimplement.
6739 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6740 (x86_emit_ops): Ditto.
6741 (the_low_target): Adjust. Install x86_linux_regs_info,
6742 x86_cannot_fetch_register, and x86_cannot_store_register.
6743 (initialize_low_arch): New.
6744 * linux-ia64-low.c (tdesc_ia64): Declare.
6745 (ia64_fetch_register): Adjust.
6746 (ia64_usrregs_info, regs_info): New globals.
6747 (ia64_regs_info): New function.
6748 (the_low_target): Adjust.
6749 (initialize_low_arch): New function.
6750 * linux-sparc-low.c (tdesc_sparc64): Declare.
6751 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6752 Adjust.
6753 (sparc_arch_setup): New function.
6754 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6755 (the_low_target): Adjust.
6756 (initialize_low_arch): New function.
6757 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6758 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6759 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6760 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6761 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6762 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6763 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6764 (tdesc_powerpc_isa205_vsx64l): Declare.
6765 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6766 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6767 (ppc_set_pc, ppc_get_hwcap): Adjust.
6768 (ppc_usrregs_info): Forward declare.
6769 (!__powerpc64__) ppc_regmap_adjusted: New global.
6770 (ppc_arch_setup): Adjust to the current process'es target
6771 description.
6772 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6773 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6774 (ppc_store_evrregset): Adjust.
6775 (target_regsets): Rename to ...
6776 (ppc_regsets): ... this, and make static.
6777 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6778 (ppc_regs_info): New function.
6779 (the_low_target): Adjust.
6780 (initialize_low_arch): New function.
6781 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6782 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6783 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6784 (tdesc_s390x_linux64v2): Declare.
6785 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6786 (s390_fill_gregset, s390_store_last_break): Adjust.
6787 (target_regsets): Rename to ...
6788 (s390_regsets): ... this, and make static.
6789 (s390_get_pc, s390_set_pc): Adjust.
6790 (s390_get_hwcap): New target_desc parameter, and use it.
6791 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6792 (s390_arch_setup): Adjust to set the current process'es target
6793 description. Don't adjust the regmap.
6794 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6795 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6796 (regs_info_3264): New globals.
6797 (s390_regs_info): New function.
6798 (the_low_target): Adjust.
6799 (initialize_low_arch): New function.
6800 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6801 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6802 [__mips64] (init_registers_mips_linux)
6803 (init_registers_mips_dsp_linux): Delete defines.
6804 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6805 (have_dsp): New global.
6806 (mips_read_description): New, based on mips_arch_setup.
6807 (mips_arch_setup): Reimplement.
6808 (get_usrregs_info): New function.
6809 (mips_cannot_fetch_register, mips_cannot_store_register)
6810 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6811 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6812 (target_regsets): Rename to ...
6813 (mips_regsets): ... this, and make static.
6814 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6815 (dsp_regs_info, regs_info): New globals.
6816 (mips_regs_info): New function.
6817 (the_low_target): Adjust.
6818 (initialize_low_arch): New function.
6819 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6820 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6821 Declare.
6822 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6823 (arm_read_description): New, with bits factored from
6824 arm_arch_setup.
6825 (arm_arch_setup): Reimplement.
6826 (target_regsets): Rename to ...
6827 (arm_regsets): ... this, and make static.
6828 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6829 (arm_regs_info): New function.
6830 (the_low_target): Adjust.
6831 (initialize_low_arch): New function.
6832 * linux-m68k-low.c (tdesc_m68k): Declare.
6833 (target_regsets): Rename to ...
6834 (m68k_regsets): ... this, and make static.
6835 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6836 (m68k_regs_info): New function.
6837 (m68k_arch_setup): New function.
6838 (the_low_target): Adjust.
6839 (initialize_low_arch): New function.
6840 * linux-sh-low.c (tdesc_sharch): Declare.
6841 (target_regsets): Rename to ...
6842 (sh_regsets): ... this, and make static.
6843 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6844 (sh_regs_info, sh_arch_setup): New functions.
6845 (the_low_target): Adjust.
6846 (initialize_low_arch): New function.
6847 * linux-bfin-low.c (tdesc_bfin): Declare.
6848 (bfin_arch_setup): New function.
6849 (bfin_usrregs_info, regs_info): New globals.
6850 (bfin_regs_info): New function.
6851 (the_low_target): Adjust.
6852 (initialize_low_arch): New function.
6853 * linux-cris-low.c (tdesc_cris): Declare.
6854 (cris_arch_setup): New function.
6855 (cris_usrregs_info, regs_info): New globals.
6856 (cris_regs_info): New function.
6857 (the_low_target): Adjust.
6858 (initialize_low_arch): New function.
6859 * linux-cris-low.c (tdesc_crisv32): Declare.
6860 (cris_arch_setup): New function.
6861 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6862 (cris_regs_info): New function.
6863 (the_low_target): Adjust.
6864 (initialize_low_arch): New function.
6865 * linux-m32r-low.c (tdesc_m32r): Declare.
6866 (m32r_arch_setup): New function.
6867 (m32r_usrregs_info, regs_info): New globals.
6868 (m32r_regs_info): Adjust.
6869 (initialize_low_arch): New function.
6870 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6871 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6872 (tic6x_usrregs_info): Forward declare.
6873 (tic6x_read_description): New function, based on ...
6874 (tic6x_arch_setup): ... this. Reimplement.
6875 (target_regsets): Rename to ...
6876 (tic6x_regsets): ... this, and make static.
6877 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6878 (tic6x_regs_info): New function.
6879 (the_low_target): Adjust.
6880 (initialize_low_arch): New function.
6881 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6882 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6883 (target_regsets): Rename to ...
6884 (xtensa_regsets): ... this, and make static.
6885 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6886 globals.
6887 (xtensa_arch_setup, xtensa_regs_info): New functions.
6888 (the_low_target): Adjust.
6889 (initialize_low_arch): New function.
6890 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6891 (nios2_arch_setup): Set the current process'es tdesc.
6892 (target_regsets): Rename to ...
6893 (nios2_regsets): ... this.
6894 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6895 (nios2_regs_info): New function.
6896 (the_low_target): Adjust.
6897 (initialize_low_arch): New function.
6898 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6899 (aarch64_arch_setup): Set the current process'es tdesc.
6900 (target_regsets): Rename to ...
6901 (aarch64_regsets): ... this.
6902 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6903 (aarch64_regs_info): New function.
6904 (the_low_target): Adjust.
6905 (initialize_low_arch): New function.
6906 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6907 globals.
6908 (target_regsets): Rename to ...
6909 (tile_regsets): ... this.
6910 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6911 (tile_regs_info): New function.
6912 (tile_arch_setup): Set the current process'es tdesc.
6913 (the_low_target): Adjust.
6914 (initialize_low_arch): New function.
6915 * spu-low.c (tdesc_spu): Declare.
6916 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6917 * win32-arm-low.c (tdesc_arm): Declare.
6918 (arm_arch_setup): New function.
6919 (the_low_target): Install arm_arch_setup instead of
6920 init_registers_arm.
6921 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6922 (init_windows_x86): Rename to ...
6923 (i386_arch_setup): ... this. Set `win32_tdesc'.
6924 (the_low_target): Adjust.
6925 * win32-low.c (win32_tdesc): New global.
6926 (child_add_thread): Don't create the thread cache here.
6927 (do_initial_child_stuff): Set the new process'es tdesc.
6928 * win32-low.h (struct target_desc): Forward declare.
6929 (win32_tdesc): Declare.
6930 * lynx-i386-low.c (tdesc_i386): Declare global.
6931 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6932 * lynx-low.c (lynx_tdesc): New global.
6933 (lynx_add_process): Set the new process'es tdesc.
6934 * lynx-low.h (struct target_desc): Forward declare.
6935 (lynx_tdesc): Declare global.
6936 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6937 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6938 * nto-low.c (nto_tdesc): New global.
6939 (do_attach): Set the new process'es tdesc.
6940 * nto-low.h (struct target_desc): Forward declare.
6941 (nto_tdesc): Declare.
6942 * nto-x86-low.c (tdesc_i386): Declare.
6943 (nto_x86_arch_setup): Set `nto_tdesc'.
6944
6945 2013-06-04 Gary Benson <gbenson@redhat.com>
6946
6947 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6948 to qSupported response when appropriate.
6949 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6950 with nonzero-length annex.
6951 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6952 arguments supplied in annex.
6953
6954 2013-05-31 Doug Evans <dje@google.com>
6955
6956 PR server/15594
6957 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6958 64 bits in 64-cross-32 environment.
6959
6960 2013-05-28 Pedro Alves <palves@redhat.com>
6961
6962 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6963 (aarch64-without-fpu.c): Delete rule.
6964 * configure.srv (aarch64*-*-linux*): Remove references to
6965 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6966 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6967 declaration.
6968
6969 2013-05-24 Pedro Alves <palves@redhat.com>
6970
6971 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6972 instead of strchr/decode_address. Error if the range isn't split
6973 with a ','. Don't assume there's be a ':' in the action.
6974
6975 2013-05-23 Yao Qi <yao@codesourcery.com>
6976 Pedro Alves <palves@redhat.com>
6977
6978 * linux-low.c (lwp_in_step_range): New function.
6979 (linux_wait_1): If the thread was range stepping and stopped
6980 outside the stepping range, report the stop to GDB. Otherwise,
6981 continue stepping. Add range stepping debug output.
6982 (linux_set_resume_request): Copy the step range from the resume
6983 request to the lwp.
6984 (linux_supports_range_stepping): New.
6985 (linux_target_ops) <supports_range_stepping>: Set to
6986 linux_supports_range_stepping.
6987 * linux-low.h (struct linux_target_ops)
6988 <supports_range_stepping>: New field.
6989 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6990 * linux-x86-low.c (x86_supports_range_stepping): New.
6991 (the_low_target) <supports_range_stepping>: Set to
6992 x86_supports_range_stepping.
6993 * server.c (handle_v_cont): Handle 'r' action.
6994 (handle_v_requests): Append ";r" if the target supports range
6995 stepping.
6996 * target.h (struct thread_resume) <step_range_start,
6997 step_range_end>: New fields.
6998 (struct target_ops) <supports_range_stepping>:
6999 New field.
7000 (target_supports_range_stepping): New macro.
7001
7002 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7003
7004 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7005 confusion in comment.
7006
7007 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7008
7009 * lynx-low.c (struct process_info_private): New type.
7010 (lynx_add_process): New function.
7011 (lynx_create_inferior, lynx_attach): Replace calls to
7012 add_process by calls to lynx_add_process.
7013 (lynx_resume): If PTID is null, then try using
7014 current_process()->private->last_wait_event_ptid.
7015 Add comments.
7016 (lynx_clear_inferiors): Delete. The contents of that function
7017 has been inlined in lynx_mourn;
7018 (lynx_wait_1): Save the ptid in the process's private data.
7019 (lynx_mourn): Free the process' private data. Replace call
7020 to lynx_clear_inferiors by call to clear_inferiors.
7021
7022 2013-05-17 Yao Qi <yao@codesourcery.com>
7023
7024 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7025 the right place.
7026
7027 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7028
7029 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7030 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7031 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7032 PT_TEXT_END_ADDR guards. Update comments.
7033 (linux_target_op) <read_offsets>: Conditionally define to
7034 linux_read_offsets if the target is UCLIBC and if it defines
7035 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7036
7037 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7038 Andrew Jenner <andrew@codesourcery.com>
7039
7040 * Makefile.in (SFILES): Add linux-nios2-low.c.
7041 (clean): Add action to delete nios2-linux.c.
7042 (nios2-linux.c): New rule.
7043 * configure.srv: Add nios2*-*-linux*.
7044 * linux-nios2-low.c: New.
7045
7046 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7047
7048 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7049
7050 2013-04-25 Hui Zhu <hui@codesourcery.com>
7051
7052 PR gdb/15186
7053 * ax.c (ax_printf): Add fflush.
7054
7055 2013-04-22 Tom Tromey <tromey@redhat.com>
7056
7057 * Makefile.in (SFILES): Add filestuff.c.
7058 (OBS): Add filestuff.o.
7059 (filestuff.o): New target.
7060 * config.in, configure: Rebuild.
7061 * configure.ac: Check for fdwalk, pipe2.
7062
7063 2013-04-17 Pedro Alves <palves@redhat.com>
7064
7065 * configure.ac (USE_THREAD_DB): Delete variable.
7066 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7067 Don't AC_SUBST USE_THREAD_DB.
7068 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7069 * config.in, configure: Regenerate.
7070
7071 2013-04-16 Pedro Alves <palves@redhat.com>
7072
7073 * linux-low.h (struct lwp_info) <thread_known>: Move under
7074 the USE_THREAD_DB #ifdef.
7075
7076 2013-04-16 Pedro Alves <palves@redhat.com>
7077
7078 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7079 (linux-low.o): Delete rule.
7080 * linux-low.h: Always include "gdb_thread_db.h" instead of
7081 conditionally including thread_db.h.
7082 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7083 HAVE_THREAD_DB_H.
7084
7085 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7086
7087 * Makefile.in (install-only): Fix make install regression.
7088
7089 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7090
7091 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7092 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7093 installation.
7094 * gdbserver.1: Remove.
7095
7096 2013-03-22 Pedro Alves <palves@redhat.com>
7097
7098 * linux-low.c (handle_extended_wait): Don't call
7099 linux_enable_event_reporting.
7100
7101 2013-03-15 Tony Theodore <tonyt@logyst.com>
7102
7103 PR build/9098:
7104 * Makefile.in (SHELL): Use @SHELL@.
7105
7106 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7107
7108 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7109 compiler warning.
7110
7111 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7112
7113 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7114 Remove extraneous NULL element.
7115
7116 2013-03-13 Yao Qi <yao@codesourcery.com>
7117
7118 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7119 'V' block in trace frame.
7120
7121 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7122
7123 * target.h (struct target_ops): Add btrace ops.
7124 (target_supports_btrace): New macro.
7125 (target_enable_btrace): New macro.
7126 (target_disable_btrace): New macro.
7127 (target_read_btrace): New macro.
7128 * gdbthread.h (struct thread_info): Add btrace field.
7129 * server.c: Include btrace-common.h.
7130 (handle_btrace_general_set): New function.
7131 (handle_btrace_enable): New function.
7132 (handle_btrace_disable): New function.
7133 (handle_general_set): Call handle_btrace_general_set.
7134 (handle_qxfer_btrace): New function.
7135 (struct qxfer qxfer_packets[]): Add btrace entry.
7136 * inferiors.c (remove_thread): Disable btrace.
7137 * linux-low: Include linux-btrace.h.
7138 (linux_low_enable_btrace): New function.
7139 (linux_low_read_btrace): New function.
7140 (linux_target_ops): Add btrace ops.
7141 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7142 Add srv_linux_btrace=yes.
7143 (x86_64-*-linux*): Add linux-btrace.o.
7144 Add srv_linux_btrace=yes.
7145 * configure.ac: Define HAVE_LINUX_BTRACE.
7146 * config.in: Regenerated.
7147 * configure: Regenerated.
7148
7149 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7150
7151 * server.c (handle_qxfer): Preserve error message if -3 is
7152 returned.
7153 (qxfer): Document the -3 return value.
7154
7155 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7156
7157 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7158 (linux_btrace_h): New variable.
7159 (linux-btrace.o): New rule.
7160
7161 2013-03-08 Stan Shebs <stan@codesourcery.com>
7162 Hafiz Abid Qadeer <abidh@codesourcery.com>
7163
7164 * tracepoint.c (trace_buffer_size): New global.
7165 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7166 (init_trace_buffer): Change to one-argument function. Allocate
7167 trace buffer memory.
7168 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7169 handle QTBuffer:size packet.
7170 (cmd_bigqtbuffer_size): New function.
7171 (initialize_tracepoint): Call init_trace_buffer with
7172 DEFAULT_TRACE_BUFFER_SIZE.
7173 * server.c (handle_query): Add QTBuffer:size in the
7174 supported packets.
7175
7176 2013-03-07 Yao Qi <yao@codesourcery.com>
7177
7178 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7179 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7180 of -1.
7181 (cmd_qtsp): Adjust condition. Do post increment.
7182 Set cur_action and cur_step_action back to 0.
7183
7184 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7185
7186 PR server/15236
7187 * linux-low.c (linux_write_memory): Return early success if LEN is
7188 zero.
7189
7190 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7191
7192 * configure.srv: Add x86_64-*-cygwin* as target.
7193
7194 2013-02-28 Tom Tromey <tromey@redhat.com>
7195
7196 * configure.ac: Invoke AC_SYS_LARGEFILE.
7197 * configure, config.in: Rebuild.
7198
7199 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7200
7201 * win32-low.c: Throughout, fix format strings and casts of
7202 printf-like functions to avoid type related warnings on all
7203 platforms.
7204 (get_child_debug_event): Print dwDebugEventCode as hex since
7205 that's how it's usually documented.
7206
7207 2013-02-28 Yao Qi <yao@codesourcery.com>
7208
7209 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7210 pulongest.
7211
7212 2013-02-27 Jiong Wang <jiwang@tilera.com>
7213
7214 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7215 (reg-tilegx32.c): New rule.
7216 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7217 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7218 different register info initializer according to elf class.
7219 (init_registers_tilgx32): New function. The tilegx32 register info
7220 initializer.
7221 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7222 (tile_store_gregset): Likewise.
7223
7224 2013-02-27 Yao Qi <yao@codesourcery.com>
7225
7226 * server.c (process_point_options): Print debug message when
7227 debug_threads is true.
7228
7229 2013-02-26 Yao Qi <yao@codesourcery.com>
7230
7231 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7232
7233 2013-02-19 Pedro Alves <palves@redhat.com>
7234 Kai Tietz <ktietz@redhat.com>
7235
7236 PR gdb/15161
7237
7238 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7239 instead of strtoul to extract address from packet.
7240 (process_serial_event) <'z'>: Likewise.
7241
7242 2013-02-18 Yao Qi <yao@codesourcery.com>
7243
7244 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7245
7246 2013-02-14 Pedro Alves <palves@redhat.com>
7247
7248 Plug memory leak.
7249
7250 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7251 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7252
7253 2013-02-14 Pedro Alves <palves@redhat.com>
7254
7255 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7256
7257 2013-02-14 Pedro Alves <palves@redhat.com>
7258
7259 * tracepoint.c (save_string): Delete.
7260 (add_tracepoint_action): Use savestring instead of save_string.
7261
7262 2013-02-12 Pedro Alves <palves@redhat.com>
7263
7264 * linux-xtensa-low.c: Ditto.
7265 * xtensa-xtregs.c: Ditto.
7266
7267 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7268
7269 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7270 thread_db.
7271
7272 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7273
7274 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7275 aarch64_num_wp_regs and aarch64_num_bp_regs to
7276 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7277
7278 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7279
7280 * linux-aarch64-low.c (ps_get_thread_area): Replace
7281 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7282
7283 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7284 Marcus Shawcroft <marcus.shawcroft@arm.com>
7285 Nigel Stephens <nigel.stephens@arm.com>
7286 Yufeng Zhang <yufeng.zhang@arm.com>
7287
7288 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7289 (aarch64.c, aarch64-without-fpu.c): New targets.
7290 * configure.srv (aarch64*-*-linux*): New.
7291 * linux-aarch64-low.c: New file.
7292
7293 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7294
7295 * linux-low.c (handle_extended_wait, linux_create_inferior)
7296 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7297 (dequeue_one_deferred_signal, linux_resume_one_thread)
7298 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7299 (linux_tracefork_grandchild, linux_test_for_tracefork)
7300 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7301 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7302 where the argument is 0.
7303
7304 2013-01-25 Yao Qi <yao@codesourcery.com>
7305
7306 * event-loop.c: Include "queue.h".
7307 (gdb_event_p): New typedef.
7308 (struct gdb_event) <next_event>: Remove.
7309 (event_queue): Change to QUEUE(gdb_event_p).
7310 (async_queue_event): Remove.
7311 (gdb_event_xfree): New.
7312 (initialize_event_loop): New.
7313 (process_event): Use API from QUEUE.
7314 (wait_for_event): Likewise.
7315 * server.c (main): Call initialize_event_loop.
7316 * server.h (initialize_event_loop): Declare.
7317
7318 2013-01-18 Yao Qi <yao@codesourcery.com>
7319
7320 * ax.h (struct eval_agent_expr_context): New.
7321 (gdb_eval_agent_expr): Update declaration.
7322 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7323 TFRAME. Add new argument CTX.
7324 * server.h (struct eval_agent_expr_context): Declare.
7325 (agent_mem_read, agent_tsv_read): Update declaration.
7326 (agent_mem_read_string): Likewise.
7327 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7328 (add_traceframe_block): Add new argument TPOINT.
7329 Increase TPOINT->traceframe_usage.
7330 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7331 eval_tracepoint_agent_expr.
7332 (condition_true_at_tracepoint): Likewise.
7333 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7334 (agent_mem_read_string, agent_tsv_read): Likewise.
7335
7336 2013-01-16 Yao Qi <yao@codesourcery.com>
7337
7338 * linux-low.c (linux_resume_one_lwp): Don't check
7339 'lwp->bp_reinsert != 0'.
7340
7341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7342 Pedro Alves <palves@redhat.com>
7343
7344 * lynx-low.c (ptrace_request_to_str): Define a temporary
7345 macro and use it to simplify this function's implementation.
7346
7347 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7348
7349 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7350 sets errno.
7351
7352 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7353
7354 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7355
7356 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7357
7358 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7359
7360 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7361
7362 * lynx-low.c (lynx_resume): Use the resume_info parameter
7363 to determine the ptid for the lynx_ptrace call, unless
7364 it is equal to minus_one_ptid, in which case we use the
7365 ptid of the current_inferior.
7366 (lynx_wait_1): After having received a thread create/exit
7367 event, resume the inferior's execution using the signaling
7368 thread's ptid, rather than the old ptid.
7369
7370 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7371
7372 * lynx-low.c (lynx_resume): Delete variable ret.
7373
7374 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7375
7376 * gdbreplay.c (gdbreplay_version): Update copyright year.
7377 * server.c (gdbserver_version): Likewise.
7378
7379 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7380
7381 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7382 new thread.
7383
7384 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7385
7386 * lynx-low.c (ptrace_request_to_str): Add handling for
7387 PTRACE_GETTRACESIG.
7388
7389 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7390
7391 * lynx-low.c (lynx_attach): Delete variable new_process.
7392
7393 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7394
7395 * lynx-low.c (lynx_create_inferior): Delete variable
7396 new_process.
7397
7398 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7399
7400 * lynx-low.c (ptrace_request_to_str): Do not handle
7401 PTRACE_GETTHREADLIST if this macro does not exist.
7402
7403 2012-12-15 Yao Qi <yao@codesourcery.com>
7404
7405 * Makefile.in (OBS): Add notif.o.
7406 * notif.c, notif.h: New.
7407 * server.c: Include "notif.h".
7408 (struct vstop_notif) <next>: Remove.
7409 <base>: New field.
7410 (queue_stop_reply): Update.
7411 (push_event, send_next_stop_reply): Remove.
7412 (discard_queued_stop_replies): Update.
7413 (notif_stop): New variable.
7414 (handle_v_stopped): Remove.
7415 (handle_v_requests): Don't call handle_v_stopped. Call
7416 handle_ack_notif instead.
7417 (queue_stop_reply_callback): Call notif_event_enque instead
7418 of queue_stop_reply.
7419 (handle_status): Don't call send_next_stop_reply, call
7420 notif_write_event instead.
7421 (kill_inferior_callback): Likewise.
7422 (detach_or_kill_inferior_callback): Likewise.
7423 (main): Call initialize_notif.
7424 (process_serial_event): Call QUEUE_is_empty.
7425 (handle_target_event): Call notif_push instead of push event.
7426 * server.h (push_event): Remove declaration.
7427
7428 2012-12-10 Tom Tromey <tromey@redhat.com>
7429
7430 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7431 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7432 macros.
7433 (.c.o): Rewrite.
7434 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7435 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7436 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7437 (amd64-linux-ipa.o, ax.o): Rewrite.
7438 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7439 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7440 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7441 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7442 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7443 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7444 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7445 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7446 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7447 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7448 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7449 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7450 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7451 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7452 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7453 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7454 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7455 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7456 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7457 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7458 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7459 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7460 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7461 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7462 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7463 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7464 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7465 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7466 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7467 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7468 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7469 (reg-tilegx.o): Remove.
7470 (all_object_files): New macro.
7471 Include .deps files.
7472 * aclocal.m4, configure: Rebuild.
7473 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7474 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7475 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7476
7477 2012-12-05 Tom Tromey <tromey@redhat.com>
7478
7479 PR gdb/14917:
7480 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7481
7482 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7483
7484 * configure.ac: Check for linux/perf_event.h.
7485 * config.in: Regenerated.
7486 * configure: Regenerated.
7487
7488 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7489
7490 * hostio.c (handle_readlink): Decrease buffer size
7491 parameter passed to readlink by one byte.
7492
7493 2012-11-26 Yao Qi <yao@codesourcery.com>
7494
7495 * configure.ac (build_warnings): Append '-Wempty-body'.
7496 * configure: Regenerated.
7497 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7498 body.
7499
7500 2012-11-15 Pierre Muller <muller@sourceware.org>
7501
7502 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7503 * config.in: Regenerate.
7504 * configure: Regenerate.
7505 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7506 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7507 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7508 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7509 header.
7510 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7511 instead of <sys/wait.h> header.
7512 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7513
7514 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7515
7516 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7517 (various make rules): Remove -DGDBSERVER
7518
7519 2012-11-09 Yao Qi <yao@codesourcery.com>
7520
7521 * spu-low.c (current_ptid): Move it to ..
7522 * gdbthread.h: ... here. New.
7523 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7524 * server.c (myresume, process_serial_event): Likewise.
7525 * thread-db.c (thread_db_find_new_threads): Likewise.
7526 * tracepoint.c (run_inferior_command): Likewise.
7527
7528 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7529
7530 * server.c (handle_search_memory_1): Include access length in
7531 warning message.
7532
7533 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7534
7535 * linux-crisv32-low.c: Fix compile errors.
7536
7537 2012-09-04 Yao Qi <yao@codesourcery.com>
7538
7539 * tracepoint.c (cmd_qtsv): Adjust debug message.
7540 Don't check CUR_TPOINT.
7541
7542 2012-08-28 Yao Qi <yao@codesourcery.com>
7543
7544 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7545 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7546 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7547 Remove declarations of xmalloc, xreallloc, xstrdup and
7548 freeargv.
7549 * Makefile.in (libiberty_h): New.
7550 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7551 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7552
7553 2012-08-23 Yao Qi <yao@codesourcery.com>
7554
7555 * server.h: Remove declaration of 'xsnprintf'.
7556
7557 2012-08-22 Keith Seitz <keiths@redhat.com>
7558
7559 * server.h: Include build-gnulib-gbserver/config.h.
7560 * gdbreplay.c: Likewise.
7561
7562 2012-08-08 Doug Evans <dje@google.com>
7563
7564 * Makefile.in (SFILES): Add gdb_vecs.c.
7565 (OBS): Add gdb_vecs.o.
7566 (gdb_vecs_h, host_defs_h): New variables.
7567 (thread-db.o): Add $(gdb_vecs_h) dependency.
7568 (gdb_vecs.o): New rule.
7569 * thread-db.c: #include "gdb_vecs.h".
7570 (thread_db_load_search): Use a vector to iterate over path elements.
7571 Handle text appearing after "$pdir".
7572
7573 * configure.ac: Add check for strstr.
7574 * config.in: Regenerate.
7575 * configure: Regenerate.
7576
7577 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7578
7579 * hostio.c (handle_pread): If pread fails, fall back to attempting
7580 lseek/read.
7581 (handle_pwrite): Likewise for pwrite.
7582
7583 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7584
7585 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7586 between unsupported TYPE and unimplementable ADDR/LEN combination.
7587 (arm_insert_point): Act on new return value.
7588
7589 2012-07-31 Pedro Alves <palves@redhat.com>
7590
7591 * server.c (process_point_options): Only skip tokens if we find
7592 one that is unrecognized. Don't treat 'X' specially while
7593 skipping unrecognized tokens.
7594
7595 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7596
7597 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7598 to 4-byte-align HW breakpoint addresses for Thumb.
7599
7600 2012-07-27 Yao Qi <yao@codesourcery.com>
7601
7602 PR remote/14161.
7603
7604 * server.h: Declare gdb_agent_about_to_close.
7605 * target.c (kill_inferior): Include "agent.h".
7606 New. Send command 'kill'.
7607 * target.h (kill_inferior): Removed macro.
7608 * tracepoint.c (gdb_agent_about_to_close): New.
7609 (gdb_agent_helper_thread): Handle command 'close'.
7610 Wait endlessly until the inferior stops.
7611 Install gdb_agent_remove_socket to atexit hook.
7612 (agent_socket_name): New static variable.
7613 (gdb_agent_socket_init): Replace local variable 'name' with
7614 'agent_socket_name'.
7615 (gdb_agent_remove_socket): New.
7616
7617 2012-07-27 Yao Qi <yao@codesourcery.com>
7618
7619 * server.c (process_point_options): Stop at 'X' when parsing.
7620
7621 2012-07-19 Michael Eager <eager@eagercon.com>
7622
7623 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7624 to hw_execute.
7625 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7626 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7627 hardware breakpoint.
7628
7629 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7630
7631 * gdbserver/linux-low.c (initialize_low): Call
7632 linux_ptrace_init_warnings.
7633
7634 2012-07-02 Doug Evans <dje@google.com>
7635
7636 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7637 pointer to int.
7638
7639 2012-07-02 Stan Shebs <stan@codesourcery.com>
7640
7641 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7642 (ax.o): Add it to build rule.
7643 (ax-ipa.o): Ditto.
7644 (OBS): Add format.o.
7645 (IPA_OBS): Add format.o.
7646 * server.c (handle_query): Claim support for breakpoint commands.
7647 (process_point_options): Add command case.
7648 (process_serial_event): Leave running if there are printfs in
7649 effect.
7650 * mem-break.h (any_persistent_commands): Declare.
7651 (add_breakpoint_commands): Declare.
7652 (gdb_no_commands_at_breakpoint): Declare.
7653 (run_breakpoint_commands): Declare.
7654 * mem-break.c (struct point_command_list): New struct.
7655 (struct breakpoint): New field command_list.
7656 (any_persistent_commands): New function.
7657 (add_commands_to_breakpoint): New function.
7658 (add_breakpoint_commands): New function.
7659 (gdb_no_commands_at_breakpoint): New function.
7660 (run_breakpoint_commands): New function.
7661 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7662 locally.
7663 * ax.c: Include format.h.
7664 (ax_printf): New function.
7665 (gdb_eval_agent_expr): Add printf opcode.
7666
7667 2012-06-13 Yao Qi <yao@codesourcery.com>
7668
7669 * server.c (start_inferior): Remove duplicated writes to fields
7670 'last_resume_kind' and 'last_status' of 'current_inferior'.
7671
7672 2012-06-12 Yao Qi <yao@codesourcery.com>
7673 Pedro Alves <palves@redhat.com>
7674
7675 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7676 comment.
7677 * server.c (handle_v_cont): Extend comment.
7678
7679 2012-06-11 Yao Qi <yao@codesourcery.com>
7680
7681 * linux-low.c (linux_attach): Add 'static'.
7682
7683 2012-06-06 Yao Qi <yao@codesourcery.com>
7684
7685 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7686
7687 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7688
7689 Fix gcc -flto compilation warning.
7690 * server.c (main): Make variable multi_mode and attach volatile.
7691
7692 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7693
7694 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7695 if the platform doesn't know about it.
7696
7697 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7698
7699 * Makefile.in (SFILES): Add linux-tile-low.c.
7700 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7701 * configure.srv: Handle tilegx-*-linux*.
7702 * linux-tile-low.c: New file.
7703
7704 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7705
7706 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7707
7708 2012-05-24 Pedro Alves <palves@redhat.com>
7709
7710 PR gdb/7205
7711
7712 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7713
7714 2012-05-24 Pedro Alves <palves@redhat.com>
7715
7716 PR gdb/7205
7717
7718 Replace target_signal with gdb_signal throughout.
7719
7720 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7721
7722 * linux-low.c (linux_store_registers): Avoid the copying sequence
7723 when no data has been retrieved by ptrace.
7724
7725 2012-05-22 Will Deacon <will.deacon@arm.com>
7726
7727 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7728 Include asm/ptrace.h.
7729 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7730 already defined.
7731
7732 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7733
7734 * linux-low.c (linux_store_registers): Don't re-retrieve data
7735 with ptrace that has already been obtained from /proc. Always
7736 copy any data retrieved with ptrace to the buffer supplied.
7737
7738 2012-05-11 Yao Qi <yao@codesourcery.com>
7739 Pedro Alves <palves@redhat.com>
7740
7741 * linux-low.c (enum stopping_threads_kind): New.
7742 (stopping_threads): Change type to `enum stopping_threads_kind'.
7743 (handle_extended_wait): If stopping and suspending threads, leave
7744 the new_lwp suspended too.
7745 (linux_wait_for_event): Adjust.
7746 (stop_all_lwps): Set `stopping_threads' to
7747 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7748 whether we're suspending threads or just stopping them. Assert no
7749 recursion happens.
7750
7751 2012-04-29 Yao Qi <yao@codesourcery.com>
7752
7753 * server.h: Move some code to ...
7754 * gdbthread.h: ... here. New.
7755 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7756 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7757 (nto-low.o, win32-low.o): Likewise.
7758 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7759 * regcache.c, remote-utils.c, server.c: Likewise.
7760 * target.c, tracepoint.c, win32-low.c: Likewise.
7761
7762 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7763
7764 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7765 (PTRACE_ARG4_TYPE): Likewise.
7766 (PTRACE_XFER_TYPE): Likewise.
7767 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7768 ptrace to PTRACE_ARG3_TYPE.
7769 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7770 (PTRACE_ARG4_TYPE): Likewise.
7771 (PTRACE_XFER_TYPE): Likewise.
7772 (linux_detach_one_lwp): Cast fourth argument of
7773 ptrace to long then PTRACE_ARG4_TYPE.
7774 (regsets_fetch_inferior_registers): Cast third argument of
7775 ptrace to long then PTRACE_ARG3_TYPE.
7776 (regsets_store_inferior_registers): Likewise.
7777
7778 2012-04-20 Pedro Alves <palves@redhat.com>
7779
7780 * configure: Regenerate.
7781
7782 2012-04-19 Pedro Alves <palves@redhat.com>
7783
7784 * Makefile.in (GNULIB_BUILDDIR): New.
7785 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7786 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7787 (all, install-only, uninstall, clean-info, all-lib, clean): No
7788 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7789 (maintainer-clean realclean distclean): Use subdir_do.
7790 (subdir_do): New.
7791 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7792 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7793 * acinclude.m4: Include acx_configure_dir.m4.
7794 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7795 calls. Call AC_PROG_RANLIB. Configure gnulib using
7796 ACX_CONFIGURE_DIR.
7797 (GNULIB): New.
7798 (GNULIB_STDINT_H): Adjust.
7799 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7800 * gdbreplay.c: Include build-gnulib/config.h.
7801 * server.h: Likewise.
7802 * aclocal.m4: Regenerate.
7803 * config.in: Regenerate.
7804 * configure: Regenerate.
7805
7806 2012-04-19 Pedro Alves <palves@redhat.com>
7807
7808 * Makefile.in (LIBGNU, INCGNU): Adjust.
7809 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7810 (all, install-only, uninstall, clean-info, all-lib, clean)
7811 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7812 * configure.ac: Adjust AC_OUTPUT output.
7813 * aclocal.m4: Regenerate.
7814 * configure: Regenerate.
7815
7816 2012-04-19 Pedro Alves <palves@redhat.com>
7817
7818 * Makefile.in (generated_files): New.
7819 (server_h): Remove the explicit dependency on config.h, and depend
7820 on $generated_files.
7821
7822 2012-04-19 Pedro Alves <palves@redhat.com>
7823
7824 * Makefile.in (INCGNU): Add -Ignulib.
7825
7826 2012-04-19 Pedro Alves <palves@redhat.com>
7827
7828 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7829 (INCGNU): ... this, and spell out -I here.
7830 (GNULIB_LIB): Rename to ...
7831 (LIBGNU): ... this.
7832 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7833
7834 2012-04-19 Pedro Alves <palves@redhat.com>
7835
7836 * config.in: Regenerate.
7837
7838 2012-04-19 Pedro Alves <palves@redhat.com>
7839
7840 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7841 * server.h (memmem): Remove declaration.
7842 * config.in: Regenerate.
7843 * configure: Regenerate.
7844
7845 2012-04-19 Yao Qi <yao@codesourcery.com>
7846
7847 * Makefile.in (SFILES): Add common/vec.c.
7848 (OBS): Add vec.o.
7849 (vec.o): New rule.
7850
7851 2012-04-19 Yao Qi <yao@codesourcery.com>
7852
7853 * remote-utils.c (prepare_resume_reply): Replace with macro
7854 target_core_of_thread.
7855 * server.c (handle_qxfer_threads_proper): Likewise.
7856 * target.h (traget_core_of_thread): New macro.
7857
7858 2012-04-18 Pedro Alves <palves@redhat.com>
7859
7860 * aclocal.m4: Regenerate.
7861 * configure: Regenerate.
7862
7863 2012-04-16 Yao Qi <yao@codesourcery.com>
7864
7865 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7866 duplicated on address.
7867
7868 2012-04-16 Yao Qi <yao@codesourcery.com>
7869
7870 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7871 (struct tracepoint_action_ops) <send>: New field.
7872 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7873 (agent_expr_send, x_tracepoint_action_send): New.
7874 (l_tracepoint_action_send): New.
7875 (cmd_qtdp): Download and install tracepoint
7876 according to `use_agent'.
7877 (run_inferior_command): Add one more parameter `len'.
7878 Update callers.
7879 (tracepoint_send_agent): New.
7880 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7881
7882 2012-04-16 Yao Qi <yao@codesourcery.com>
7883
7884 * tracepoint.c (download_tracepoints): Moved to ...
7885 (cmd_qtstart): ... here.
7886
7887 2012-04-14 Yao Qi <yao@codesourcery.com>
7888
7889 * tracepoint.c: Include inttypes.h.
7890 (struct collect_memory_action): Use sized types.
7891 (struct tracepoint): Likewise.
7892 (cmd_qtdp, stop_tracing): Update print specifiers.
7893 (cmd_qtp, response_tracepoint): Likewise.
7894 (collect_data_at_tracepoint): Likewise.
7895 (collect_data_at_step): Likewise.
7896
7897 2012-04-14 Yao Qi <yao@codesourcery.com>
7898
7899 Import gnulib module inttypes.
7900 * aclocal.m4, config.in, configure: Regenerated.
7901
7902 2012-04-14 Yao Qi <yao@codesourcery.com>
7903
7904 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7905 Makefile and config.status at last.
7906
7907 2012-04-13 Yao Qi <yao@codesourcery.com>
7908
7909 * tracepoint.c: Include stdint.h unconditionally.
7910
7911 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7912
7913 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7914 on BFD_HAVE_SYS_PROCFS_TYPE.
7915 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7916 * configure: Regenerate.
7917 * config.in: Likewise.
7918
7919 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7920
7921 * Makefile.in (clean): Also remove x32.c x32-linux.c
7922 x32-avx.c x32-avx-linux.c.
7923 (x32.o): New target.
7924 (x32.c): Likewise.
7925 (x32-linux.o): Likewise.
7926 (x32-linux.c): Likewise.
7927 (x32-avx.o): Likewise.
7928 (x32-avx.c): Likewise.
7929 (x32-avx-linux.o): Likewise.
7930 (x32-avx-linux.c): Likewise.
7931
7932 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7933 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7934 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7935 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7936 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7937 i386/x32-avx-linux.xml.
7938
7939 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7940 (init_registers_x32_avx_linux): Likwise.
7941 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7942 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7943
7944 2012-04-13 Pedro Alves <palves@redhat.com>
7945
7946 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7947 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7948 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7949 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7950 the sub-make.
7951
7952 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7953
7954 * linux-x86-low.c (compat_x32_clock_t): New.
7955 (compat_x32_siginfo_t): Likewise.
7956 (compat_x32_siginfo_from_siginfo): Likewise.
7957 (siginfo_from_compat_x32_siginfo): Likewise.
7958 (linux_is_elf64): Likewise.
7959 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7960 and siginfo_from_compat_x32_siginfo for x32.
7961 (x86_arch_setup): Set linux_is_elf64.
7962
7963 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7964
7965 PR gdb/13969
7966 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7967 e_machine field.
7968 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7969 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7970 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7971 compatible with process.
7972
7973 2012-04-12 Yao Qi <yao@codesourcery.com>
7974
7975 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7976 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7977 (install-only, install-info, clean): Handle sub dir gnulib.
7978 (all-lib, am--refresh): New targets.
7979 (memmem.o): Remove target.
7980 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7981 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7982 (AC_REPLACE_FUNCS): Remove memmem.
7983 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7984 (AC_OUTPUT): Generate Makefile in gnulib/.
7985 * aclocal.m4, config.in, configure: Regenerated.
7986
7987 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7988
7989 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7990
7991 2012-04-05 Pedro Alves <palves@redhat.com>
7992
7993 -Werror=strict-aliasing
7994
7995 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7996 pointer.
7997
7998 2012-04-04 Pedro Alves <palves@redhat.com>
7999
8000 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8001 (sparc_store_gregset_from_stack, sparc_store_gregset)
8002 (sparc_breakpoint_at): Fix formatting.
8003
8004 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8005
8006 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8007 are available.
8008 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8009 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8010 * config.in: Regenerate.
8011 * configure: Likewise.
8012
8013 2012-03-29 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8016 Correct ptrace arguments.
8017
8018 2012-03-28 Pedro Alves <palves@redhat.com>
8019
8020 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8021 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8022 (IA64_FR1_REGNUM): New defines.
8023 (ia64_fetch_register): New.
8024 (the_low_target): Install it.
8025 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8026 field.
8027 * linux-low.c (linux_fetch_registers): Try the
8028 the_low_target.fetch_register hook first.
8029
8030 * linux-arm-low.c (the_low_target): Adjust.
8031 * linux-bfin-low.c (the_low_target): Adjust.
8032 * linux-cris-low.c (the_low_target): Adjust.
8033 * linux-crisv32-low.c (the_low_target): Adjust.
8034 * linux-m32r-low.c (the_low_target): Adjust.
8035 * linux-m68k-low.c (the_low_target): Adjust.
8036 * linux-mips-low.c (the_low_target): Adjust.
8037 * linux-ppc-low.c (the_low_target): Adjust.
8038 * linux-s390-low.c (the_low_target): Adjust.
8039 * linux-sh-low.c (the_low_target): Adjust.
8040 * linux-sparc-low.c (the_low_target): Adjust.
8041 * linux-tic6x-low.c (the_low_target): Adjust.
8042 * linux-x86-low.c (the_low_target): Adjust.
8043 * linux-xtensa-low.c (the_low_target): Adjust.
8044
8045 2012-03-26 Pedro Alves <palves@redhat.com>
8046
8047 * server.c (handle_qxfer_libraries): Don't bail early if
8048 the_target->qxfer_libraries_svr4 is not NULL.
8049
8050 2012-03-26 Pedro Alves <palves@redhat.com>
8051
8052 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8053
8054 2012-03-23 Pedro Alves <palves@redhat.com>
8055
8056 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8057 "library-list-svr4" element's start tag when the the DSO list is
8058 empty.
8059
8060 2012-03-23 Pedro Alves <palves@redhat.com>
8061
8062 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8063 a variable whose type size is the same as the inferior's pointer
8064 size.
8065
8066 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8067
8068 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8069 struct siginfo.
8070 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8071 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8072 * linux-low.h: Include <signal.h>.
8073 (struct siginfo): Remove forward declaration.
8074 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8075 struct siginfo.
8076
8077 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8078
8079 * .gitignore: Ignore more files.
8080
8081 2012-03-19 Pedro Alves <palves@redhat.com>
8082 Jan Kratochvil <jan.kratochvil@redhat.com>
8083
8084 * server.c (cont_thread, general_thread): Add describing comments.
8085 (start_inferior): Clear `cont_thread'.
8086 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8087 of a process.
8088
8089 2012-03-15 Yao Qi <yao@codesourcery.com>
8090
8091 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8092 handling to ...
8093 (cmd_qtdp): ... here.
8094
8095 2012-03-15 Yao Qi <yao@codesourcery.com>
8096
8097 * tracepoint.c (struct tracepoint_action_ops): New.
8098 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8099 (m_tracepoint_action_download): New.
8100 (r_tracepoint_action_download): New.
8101 (x_tracepoint_action_download): New.
8102 (l_tracepoint_action_download): New.
8103 (add_tracepoint_action): Install `action->ops' according type.
8104 (download_tracepoint_1): Move code `download' function pointer
8105 of various tracepoint_action_ops.
8106
8107 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8108
8109 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8110 linux_ptrace_attach_warnings.
8111
8112 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8113
8114 * Makefile.in (linux-ptrace.o): New.
8115 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8116 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8117 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8118 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8119 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8120 of these targets.
8121 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8122
8123 2012-03-08 Yao Qi <yao@codesourcery.com>
8124 Pedro Alves <palves@redhat.com>
8125
8126 Fix PR server/13392.
8127 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8128 offset of JMP insn.
8129 * tracepoint.c (remove_tracepoint): New.
8130 (cmd_qtdp): Call remove_tracepoint when failed to install.
8131
8132 2012-03-07 Pedro Alves <palves@redhat.com>
8133
8134 * linux-low.c (get_detach_signal): New.
8135 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8136 Pass on pending signals to PTRACE_DETACH. Check the result of the
8137 ptrace call.
8138 * server.c (program_signals, program_signals_p): New.
8139 (handle_general_set): Handle QProgramSignals.
8140 * server.h (program_signals, program_signals_p): Declare.
8141
8142 2012-03-05 Pedro Alves <palves@redhat.com>
8143 Jan Kratochvil <jan.kratochvil@redhat.com>
8144
8145 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8146 New comment why.
8147
8148 2012-03-03 Yao Qi <yao@codesourcery.com>
8149
8150 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8151 agent_look_up_symbols.
8152
8153 2012-03-03 Yao Qi <yao@codesourcery.com>
8154
8155 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8156 (linux-x86-low.o): Likewise.
8157 * server.h: Remove in_process_agent_loaded.
8158 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8159 common/agent.c.
8160 Update callers.
8161
8162 2012-03-03 Yao Qi <yao@codesourcery.com>
8163
8164 * tracepoint.c (gdb_agent_capability): New global.
8165 (in_process_agent_loaded_ust): Renamed to
8166 `in_process_agent_supports_ust'.
8167 Update callers.
8168 (in_process_agent_supports_ust): Call agent_capability_check.
8169 (clear_installed_tracepoints): Assert that agent supports
8170 agent.
8171
8172 2012-03-03 Yao Qi <yao@codesourcery.com>
8173
8174 * linux-low.c (linux_supports_agent): New.
8175 (linux_target_ops): Initialize field `supports_agent' with
8176 linux_supports_agent.
8177 * target.h (struct target_ops) <supports_agent>: New.
8178 (target_supports_agent): New macro.
8179 * server.c (handle_general_set): Handle packet 'QAgent'.
8180 (handle_query): Send `QAgent+'.
8181 * Makefile.in (server.o): Depends on agent.h.
8182
8183 2012-03-03 Yao Qi <yao@codesourcery.com>
8184
8185 * Makefile.in (OBS): Add agent.o.
8186 Add new rule for agent.o.
8187 Track dependence of tracepoint.c on agent.h.
8188 * tracepoint.c (run_inferior_command_1):
8189 (run_inferior_command): Call agent_run_command.
8190 (gdb_ust_connect_sync_socket): Deleted. Move it to
8191 common/agent.c.
8192 (resume_thread, stop_thread): Likewise.
8193 (gdb_ust_socket_init): Renamed to ...
8194 (gdb_agent_socket_init): ... New.
8195 (gdb_ust_thread): Renamed to ...
8196 (gdb_agent_helper_thread): ... New.
8197 (gdb_ust_init): Move some code to ...
8198 (gdb_agent_init): ... here. New.
8199 [HAVE_UST]: Call gdb_ust_init.
8200 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8201 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8202 * config.in, configure: Regenerated.
8203
8204 2012-03-02 Pedro Alves <palves@redhat.com>
8205
8206 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8207 * linux-low.c (struct simple_pid_list): New.
8208 (stopped_pids): New a struct simple_pid_list pointer.
8209 (add_to_pid_list, pull_pid_from_list): New.
8210 (handle_extended_wait): Don't assume the first signal new children
8211 report is SIGSTOP. Adjust call to pull_pid_from_list.
8212 (linux_wait_for_lwp): Adjust.
8213
8214 2012-03-02 Yao Qi <yao@codesourcery.com>
8215
8216 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8217 debug log.
8218
8219 2012-03-02 Yao Qi <yao@codesourcery.com>
8220
8221 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8222 `stop_pc' and `tpoint'. Update caller.
8223
8224 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8225
8226 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8227 * linux-low.c (use_linux_regsets): New macro.
8228 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8229 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8230 (linux_register_in_regsets): New function.
8231 (usr_fetch_inferior_registers): Skip registers covered by
8232 regsets.
8233 (usr_store_inferior_registers): Likewise.
8234 (usr_fetch_inferior_registers): New macro.
8235 (usr_store_inferior_registers): Likewise.
8236 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8237 (linux_store_registers): Likewise.
8238 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8239 prototype.
8240 (init_registers_mips64_dsp_linux): Likewise.
8241 (init_registers_mips_linux): New macro.
8242 (init_registers_mips_dsp_linux): Likewise.
8243 (mips_dsp_num_regs): Likewise.
8244 (DSP_BASE, DSP_CONTROL): New fallback macros.
8245 (mips_base_regs): New macro.
8246 (mips_regmap): Use it. Fix the size.
8247 (mips_dsp_regmap): New variable.
8248 (mips_dsp_regset_bitmap): Likewise.
8249 (mips_arch_setup): New function.
8250 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8251 than mips_regmap.
8252 (mips_cannot_store_register): Likewise.
8253 (the_low_target): Update .arch_setup, .num_regs and .regmap
8254 initializers. Add .regset_bitmap initializer.
8255 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8256 initializer.
8257 * linux-bfin-low.c (the_low_target): Likewise.
8258 * linux-cris-low.c (the_low_target): Likewise.
8259 * linux-crisv32-low.c (the_low_target): Likewise.
8260 * linux-ia64-low.c (the_low_target): Likewise.
8261 * linux-m32r-low.c (the_low_target): Likewise.
8262 * linux-m68k-low.c (the_low_target): Likewise.
8263 * linux-ppc-low.c (the_low_target): Likewise.
8264 * linux-s390-low.c (the_low_target): Likewise.
8265 * linux-sh-low.c (the_low_target): Likewise.
8266 * linux-sparc-low.c (the_low_target): Likewise.
8267 * linux-tic6x-low.c (the_low_target): Likewise.
8268 * linux-x86-low.c (the_low_target): Likewise.
8269 * linux-xtensa-low.c (the_low_target): Likewise.
8270 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8271 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8272 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8273 srv_xmlfiles.
8274 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8275 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8276
8277 2012-02-29 Yao Qi <yao@codesourcery.com>
8278 Pedro Alves <palves@redhat.com>
8279
8280 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8281 `step_over_finished' is true.
8282
8283 2012-02-27 Pedro Alves <palves@redhat.com>
8284
8285 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8286 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8287
8288 2012-02-27 Pedro Alves <palves@redhat.com>
8289
8290 PR server/9684
8291 * linux-low.c (pid_is_stopped): New.
8292 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8293
8294 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8295
8296 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8297 of conditions.
8298
8299 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8300
8301 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8302
8303 2012-02-24 Luis Machado <lgustavo@codesourcery>
8304
8305 * server.c (handle_query): Advertise support for target-side
8306 breakpoint condition evaluation.
8307 (process_point_options): New function.
8308 (process_serial_event): When inserting a breakpoint, check for
8309 a target-side condition that should be evaluated.
8310
8311 * mem-break.c: Include regcache.h and ax.h.
8312 (point_cond_list_t): New data structure.
8313 (breakpoint) <cond_list>: New field.
8314 (find_gdb_breakpoint_at): Make non-static.
8315 (delete_gdb_breakpoint_at): Clear any target-side
8316 conditions.
8317 (clear_gdb_breakpoint_conditions): New function.
8318 (add_condition_to_breakpoint): Likewise.
8319 (add_breakpoint_condition): Likewise.
8320 (gdb_condition_true_at_breakpoint): Likewise.
8321 (gdb_breakpoint_here): Return result directly instead
8322 of going through a local variable.
8323
8324 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8325 (clear_gdb_breakpoint_conditions): Likewise.
8326 (add_breakpoint_condition): Likewise.
8327 (gdb_condition_true_at_breakpoint): Likewise.
8328
8329 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8330 (need_step_over_p): Take target-side breakpoint condition into
8331 consideration.
8332
8333 2012-02-24 Luis Machado <lgustavo@codesourcery>
8334
8335 * server.h: Include tracepoint.h.
8336 (agent_mem_read, agent_get_trace_state_variable_value,
8337 agent_set_trace_state_variable_value,
8338 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8339 get_set_tsv_func_addr): New prototypes.
8340
8341 * ax.h: New include file.
8342 * ax.c: New source file.
8343
8344 * tracepoint.c: Include ax.h.
8345 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8346 agent_expr, eval_result_type): Move to ax.h.
8347 (parse_agent_expr): Rename to ...
8348 (gdb_parse_agent_expr): ... this, make it non-static and move
8349 to ax.h.
8350 (unparse_agent_expr) Rename to ...
8351 (gdb_unparse_agent_expr): ... this, make it non-static and move
8352 to ax.h.
8353 (eval_agent_expr): Rename to ...
8354 (eval_tracepoint_agent_expr): ... this.
8355 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8356 forward declarations.
8357 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8358 (agent_get_trace_state_variable_value): New function.
8359 (agent_set_trace_state_variable_value): New function.
8360 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8361 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8362 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8363 (condition_true_at_tracepoint): Likewise.
8364 (parse_agent_expr): Rename to ...
8365 (gdb_parse_agent_expr): ... this and move to ax.c.
8366 (unparse_agent_expr): Rename to ...
8367 (gdb_unparse_agent_expr): ... this and move to ax.c.
8368 (gdb_agent_op_name): Move to ax.c.
8369 (eval_agent_expr): Rename to ...
8370 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8371 and move to ax.c.
8372 (eval_tracepoint_agent_expr): New function.
8373 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8374 non-static.
8375 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8376 ax.c.
8377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8378 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8379 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8380 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8381 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8382 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8383 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8384 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8385 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8386 (compile_bytecodes): Remove forward declaration.
8387 (is_goto_target): Move to ax.c.
8388 (compile_bytecodes): Move to ax.c and call
8389 agent_get_trace_state_variable_value (...) and
8390 agent_set_trace_state_variable_value (...).
8391
8392 * Makefile.in: Update ax.c and IPA dependencies.
8393
8394 2012-02-24 Pedro Alves <palves@redhat.com>
8395
8396 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8397 (cmd_bigqtbuffer_circular): ... this. Only handle
8398 'QTBuffer:circular:'.
8399 (handle_tracepoint_general_set): Adjust.
8400
8401 2012-02-16 Yao Qi <yao@codesourcery.com>
8402
8403 * inferiors.c: Move code to ...
8404 * dll.c: .... here. New.
8405 * server.h: Declare clear_dlls.
8406 * Makefile.in (SFILES): Add dll.c.
8407 (OBS): Add dll.o
8408 (dll.o): New rule.
8409
8410 2012-02-11 Yao Qi <yao@codesourcery.com>
8411
8412 * server.c: (handle_monitor_command): Add a new parameter
8413 `own_buf'.
8414 (handle_query): Update caller.
8415
8416 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8417
8418 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8419 * configure, config.in: Regenerate.
8420 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8421 is not defined.
8422
8423 2012-02-02 Pedro Alves <palves@redhat.com>
8424
8425 Try SIGKILL first, then PTRACE_KILL.
8426 * linux-low.c (linux_kill_one_lwp): New.
8427 (linux_kill_one_lwp): Rename to ...
8428 (kill_one_lwp_callback): ... this. Use the new
8429 linux_kill_one_lwp.
8430
8431 2012-02-02 Pedro Alves <palves@redhat.com>
8432
8433 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8434 inferior.
8435
8436 2012-01-27 Pedro Alves <palves@redhat.com>
8437
8438 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8439 (elf_64_file_p): Make static.
8440 (linux_pid_exe_is_elf_64_file): New.
8441 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8442 Delete declarations.
8443 (linux_pid_exe_is_elf_64_file): Declare.
8444 * linux-x86-low.c (x86_arch_setup): Use
8445 linux_pid_exe_is_elf_64_file.
8446
8447 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8448
8449 * linux-low.c (linux_wait_for_event_1): Rename to ...
8450 (linux_wait_for_event): ... here and merge it with former
8451 linux_wait_for_event - new variable wait_ptid, use it.
8452 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8453
8454 2012-01-23 Pedro Alves <palves@redhat.com>
8455
8456 * server.c (main): Avoid yet another case of infinite loop while
8457 detaching/killing after a longjmp.
8458
8459 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8460
8461 Code cleanup.
8462 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8463
8464 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8465
8466 * hostio.c (handle_readlink): New function.
8467 (handle_vFile): Call it to handle "vFile:readlink" packets.
8468
8469 2012-01-20 Pedro Alves <palves@redhat.com>
8470 Ulrich Weigand <ulrich.weigand@linaro.org>
8471
8472 * server.c (handle_v_requests): Only support vAttach and vRun to
8473 start multiple processes when in extended protocol mode.
8474
8475 2012-01-17 Pedro Alves <palves@redhat.com>
8476
8477 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8478 memalign plus mprotect to allocate the scratch buffer.
8479
8480 2012-01-13 Pedro Alves <palves@redhat.com>
8481
8482 * server.c (attach_inferior): Clear `cont_thread'.
8483
8484 2012-01-13 Pedro Alves <palves@redhat.com>
8485
8486 * server.c (main): Avoid infinite loop while detaching/killing
8487 after a longjmp.
8488
8489 2012-01-09 Doug Evans <dje@google.com>
8490
8491 * server.c (start_inferior): Set last_ptid in --wrapper case.
8492
8493 2012-01-06 Yao Qi <yao@codesourcery.com>
8494
8495 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8496 defined.
8497 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8498
8499 2012-01-04 Yao Qi <yao@codesourcery.com>
8500
8501 * tracepoint.c (cmd_qtdp): Print debug message
8502 for static tracepoint.
8503
8504 2012-01-04 Yao Qi <yao@codesourcery.com>
8505
8506 * tracepoint.c (trace_vdebug): Differentiate debug message
8507 between gdbserver and IPA.
8508
8509 2012-01-03 Yao Qi <yao@codesourcery.com>
8510
8511 * tracepoint.c (tracepoint_was_hit): Don't collect for
8512 static tracepoint.
8513
8514 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8515
8516 * terminal.h: Reformat copyright header.
8517
8518 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8519
8520 * server.c (gdbserver_version): Update copyright year.
8521 * gdbreplay.c (gdbreplay_version): Likewise.
8522
8523 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8524
8525 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8526
8527 Revert:
8528 2011-12-18 Hui Zhu <teawater@gmail.com>
8529 * linux-low.c (linux_create_inferior): Save return value to ret.
8530
8531 2011-12-18 Hui Zhu <teawater@gmail.com>
8532
8533 * linux-low.c (linux_create_inferior): Save return value to ret.
8534
8535 2011-12-16 Doug Evans <dje@google.com>
8536
8537 * linux-low.c (linux_create_inferior): If stdio connection,
8538 redirect stdin from /dev/null, stdout to stderr.
8539 * remote-utils.c (remote_is_stdio): New static global.
8540 (remote_connection_is_stdio): New function.
8541 (remote_prepare): Handle stdio connection.
8542 (remote_open): Ditto.
8543 (remote_close): Don't close stdin for stdio connections.
8544 (read_prim,write_prim): New functions. Replace all calls to
8545 read/write to these.
8546 * server.c (main): Watch for "-" argument. Move call to
8547 remote_prepare before start_inferior.
8548 * server.h (STDIO_CONNECTION_NAME): New macro.
8549 (remote_connection_is_stdio): Declare.
8550
8551 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8552 in debugging output.
8553
8554 2011-12-15 Yao Qi <yao@codesourcery.com>
8555
8556 * tracepoint.c: Include sys/syscall.h.
8557 (gdb_ust_thread): Remove preprocessor conditional.
8558
8559 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8560
8561 * linux-low.c (linux_detach_one_lwp): Call
8562 the_low_target.prepare_to_resume before detaching.
8563
8564 2011-12-14 Yao Qi <yao@codesourcery.com>
8565
8566 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8567 of write.
8568
8569 2011-12-14 Yao Qi <yao@codesourcery.com>
8570
8571 * i386-low.c (i386_low_stopped_data_address): Initialize local
8572 variable `control'.
8573
8574 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8575
8576 PR remote/13492
8577
8578 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8579 DR_CONTROL unless necessary. Extend comments.
8580 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8581 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8582
8583 2011-12-13 Yao Qi <yao@codesourcery.com>
8584
8585 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8586 macros.
8587 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8588
8589 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8590
8591 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8592 Print new debug message for such case.
8593
8594 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8595
8596 Fix overlapping memcpy.
8597 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8598 the read_inferior_memory transfer.
8599 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8600 write_inferior_memory transfer.
8601 (set_fast_tracepoint_jump): New variable buf. Use it for the
8602 read_inferior_memory and write_inferior_memory transfers.
8603 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8604 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8605 Use it for the write_inferior_memory transfer.
8606 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8607 buffers.
8608
8609 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8610
8611 * linux-low.c (fetch_register, store_register): Make code
8612 consistent, fix formatting.
8613
8614 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8615
8616 * linux-low.c (usr_store_inferior_registers): Factor out code
8617 to handle individual registers into...
8618 (store_register): ... this new function.
8619
8620 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8621
8622 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8623 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8624 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8625 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8626 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8627 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8628 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8629 (srv_xmlfiles): Add new XML files.
8630
8631 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8632 and <sys/uio.h>.
8633 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8634 (init_registers_s390_linux32v1): Add prototype.
8635 (init_registers_s390_linux32v2): Likewise.
8636 (init_registers_s390_linux64v1): Likewise.
8637 (init_registers_s390_linux64v2): Likewise.
8638 (init_registers_s390x_linux64v1): Likewise.
8639 (init_registers_s390x_linux64v2): Likewise.
8640 (s390_num_regs): Increment to 52.
8641 (s390_regmap): Add orig_r2 register.
8642 (s390_num_regs_3264): Increment to 68.
8643 (s390_regmap_3264): Add orig_r2 register.
8644 (s390_collect_ptrace_register): Handle orig_r2 register.
8645 (s390_supply_ptrace_register): Likewise.
8646 (s390_fill_last_break): New function.
8647 (s390_store_last_break): Likewise.
8648 (s390_fill_system_call): New function.
8649 (s390_store_system_call): Likewise.
8650 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8651 register sets.
8652 (s390_check_regset): New function.
8653 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8654 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8655 Update target_regsets for available register sets.
8656
8657 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8658 Jan Kratochvil <jan.kratochvil@redhat.com>
8659
8660 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8661 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8662 New.
8663 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8664 * linux-low.h (struct process_info_private): New member r_debug.
8665 * server.c (handle_qxfer_libraries): Call
8666 the_target->qxfer_libraries_svr4.
8667 (handle_qxfer_libraries_svr4): New function.
8668 (qxfer_packets): New entry "libraries-svr4".
8669 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8670 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8671 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8672 PACKET_qXfer_libraries_svr4.
8673
8674 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8675
8676 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8677 PSW address/mask between 8-byte and 16-byte formats.
8678 (s390_supply_ptrace_register): Likewise.
8679 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8680 basic addressing mode bit.
8681
8682 2011-11-24 Stan Shebs <stan@codesourcery.com>
8683
8684 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8685
8686 2011-11-17 Stan Shebs <stan@codesourcery.com>
8687
8688 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8689 (tracing_start_time): New global.
8690 (tracing_stop_time): New global.
8691 (tracing_user_name): New global.
8692 (tracing_notes): New global.
8693 (tracing_stop_note): New global.
8694 (cmd_qtstart): Set traceframe_usage, start_time.
8695 (stop_tracing): Set stop_time.
8696 (cmd_qtstatus): Report additional status.
8697 (cmd_qtp): New function.
8698 (handle_tracepoint_query): Call it.
8699 (cmd_qtnotes): New function.
8700 (handle_tracepoint_general_set): Call it.
8701 (get_timestamp): Rename from tsv_get_timestamp.
8702
8703 2011-11-14 Stan Shebs <stan@codesourcery.com>
8704 Kwok Cheung Yeung <kcy@codesourcery.com>
8705
8706 * linux-x86-low.c (small_jump_insn): New.
8707 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8708 trampoline and error message, build a trampoline and issue a small
8709 jump instruction to it.
8710 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8711 trampoline and error message.
8712 (x86_get_min_fast_tracepoint_insn_len): New.
8713 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8714 * linux-low.h (struct linux_target_ops): Add arguments to
8715 install_fast_tracepoint_jump_pad operation, add new operation.
8716 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8717 arguments.
8718 (linux_get_min_fast_tracepoint_insn_len): New function.
8719 (linux_target_op): Add new operation.
8720 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8721 (gdb_trampoline_buffer_end): Ditto.
8722 (gdb_trampoline_buffer_error): Ditto.
8723 (struct ipa_sym_addresses): Add fields for new IPA variables.
8724 (symbol_list): Add entries for new IPA variables.
8725 (struct tracepoint): Add fields to hold the address range of the
8726 trampoline used by the tracepoint.
8727 (trampoline_buffer_head): New static variable.
8728 (trampoline_buffer_tail): Ditto.
8729 (claim_trampoline_space): New function.
8730 (have_fast_tracepoint_trampoline_buffer): New function.
8731 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8732 structure.
8733 (install_fast_tracepoint): Ditto, also add error buffer argument.
8734 (cmd_qtminftpilen): New function.
8735 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8736 (fast_tracepoint_from_trampoline_address): New function.
8737 (fast_tracepoint_collecting): Handle trampoline as part of jump
8738 pad space.
8739 (set_trampoline_buffer_space): New function.
8740 (initialize_tracepoint): Initialize new IPA variables.
8741 * target.h (struct target_ops): Add arguments to
8742 install_fast_tracepoint_jump_pad operation, add new
8743 get_min_fast_tracepoint_insn_len operation.
8744 (target_get_min_fast_tracepoint_insn_len): New.
8745 (install_fast_tracepoint_jump_pad): Add arguments.
8746 * server.h (IPA_BUFSIZ): Define.
8747 * linux-i386-ipa.c: Include extra header files.
8748 (initialize_fast_tracepoint_trampoline_buffer): New function.
8749 (initialize_low_tracepoint): Call it.
8750 * server.h (set_trampoline_buffer_space): Declare.
8751 (claim_trampoline_space): Ditto.
8752 (have_fast_tracepoint_trampoline_buffer): Ditto.
8753
8754 2011-11-14 Yao Qi <yao@codesourcery.com>
8755
8756 * server.c (handle_query): Handle InstallInTrace for qSupported.
8757 * tracepoint.c (add_tracepoint): Sort list.
8758 (install_tracepoint, download_tracepoint): New.
8759 (cmd_qtdp): Call them to install and download tracepoints.
8760 (sort_tracepoints): Removed.
8761 (cmd_qtstart): Update.
8762
8763 2011-11-14 Yao Qi <yao@codesourcery.com>
8764
8765 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8766 * mem-break.h: Declare.
8767 * tracepoint.c (cmd_qtstart): Move some code to ...
8768 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8769 New.
8770 (download_tracepoints): Move some code to ...
8771 (download_tracepoint_1): ... here. New.
8772
8773 2011-11-08 Yao Qi <yao@codesourcery.com>
8774
8775 * remote-utils.c (relocate_instruction): A comment fix.
8776
8777 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8778
8779 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8780 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8781 dr_status_mirror and dr_control_mirror from debug_reg_state.
8782 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8783 (i386_initial_stuff): Remove use of deleted globals.
8784 (i386_get_thread_context, i386_set_thread_context,
8785 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8786 from debug_reg_state.
8787
8788 2011-11-05 Yao Qi <yao@codesourcery.com>
8789
8790 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8791 address as TPOINT's.
8792
8793 2011-11-02 Stan Shebs <stan@codesourcery.com>
8794
8795 * tracepoint.c (agent_mem_read_string): New function.
8796 (eval_agent_expr): Call it for tracenz.
8797 * server.c (handle_query): Report support for tracenz.
8798
8799 2011-11-02 Yao Qi <yao@codesourcery.com>
8800
8801 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8802
8803 2011-11-02 Yao Qi <yao@codesourcery.com>
8804
8805 * target.h: Fix a typo in comment.
8806
8807 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8808
8809 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8810 clobber the breakpoints' shadows with fast tracepoint jumps.
8811 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8812 * target.c (write_inferior_memory): Also pass MYADDR down to
8813 check_mem_write.
8814
8815 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8816
8817 * configure.ac: Check support for personality routine.
8818 * configure: Regenerate.
8819 * config.in: Likewise.
8820 * linux-low.c: Include <sys/personality.h>.
8821 Define ADDR_NO_RANDOMIZE if necessary.
8822 (linux_create_inferior): Disable address space randomization when
8823 forking inferior, if requested.
8824 (linux_supports_disable_randomization): New function.
8825 (linux_target_ops): Install it.
8826 * server.h (disable_randomization): Declare.
8827 * server.c (disable_randomization): New global variable.
8828 (handle_general_set): Handle QDisableRandomization.
8829 (handle_query): Likewise for qSupported.
8830 (main): Support --disable-randomization and --no-disable-randomization
8831 command line arguments.
8832 * target.h (struct target_ops): Add supports_disable_randomization.
8833 (target_supports_disable_randomization): New macro.
8834
8835 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8836
8837 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8838 ifdef check.
8839 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8840 [!PT_GETDSBT] (target_loadmap): New definition.
8841 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8842 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8843 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8844 and PT_GETDSBT to LINUX_LOADMAP.
8845 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8846 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8847
8848 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8849
8850 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8851 (arm_linux_hwbp_cap): New static variable.
8852 (arm_linux_get_hwbp_cap): Replace by ...
8853 (arm_linux_init_hwbp_cap): ... this new function.
8854 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8855 (arm_linux_get_hw_watchpoint_count): Likewise.
8856 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8857 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8858 (arm_prepare_to_resume): Use perror_with_name instead of error.
8859
8860 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8861
8862 * linux-arm-low.c: Include <signal.h>.
8863 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8864 (struct arm_linux_hwbp_cap): New data type.
8865 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8866 (struct arm_linux_hw_breakpoint): New data type.
8867 (MAX_BPTS, MAX_WPTS): Define.
8868 (struct arch_process_info, struct arch_lwp_info): New data types.
8869 (arm_linux_get_hwbp_cap): New function.
8870 (arm_linux_get_hw_breakpoint_count): Likewise.
8871 (arm_linux_get_hw_watchpoint_count): Likewise.
8872 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8873 (arm_hwbp_control_initialize): Likewise.
8874 (arm_hwbp_control_is_enabled): Likewise.
8875 (arm_hwbp_control_is_initialized): Likewise.
8876 (arm_hwbp_control_disable): Likewise.
8877 (arm_linux_hw_breakpoint_equal): Likewise.
8878 (arm_linux_hw_point_initialize): Likewise.
8879 (struct update_registers_data): New data structure.
8880 (update_registers_callback: New function.
8881 (arm_insert_point): Likewise.
8882 (arm_remove_point): Likewise.
8883 (arm_stopped_by_watchpoint): Likewise.
8884 (arm_stopped_data_address): Likewise.
8885 (arm_new_process): Likewise.
8886 (arm_new_thread): Likewise.
8887 (arm_prepare_to_resume): Likewise.
8888 (the_low_target): Register arm_insert_point, arm_remove_point,
8889 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8890 arm_new_thread, and arm_prepare_to_resume.
8891
8892 2011-09-15 Stan Shebs <stan@codesourcery.com>
8893
8894 * server.h (struct emit_ops): Add compare-goto fields.
8895 * tracepoint.c (gdb_agent_op_sizes): New table.
8896 (emit_eq_goto): New function.
8897 (emit_ne_goto): New function.
8898 (emit_lt_goto): New function.
8899 (emit_le_goto): New function.
8900 (emit_gt_goto): New function.
8901 (emit_ge_goto): New function.
8902 (is_goto_target): New function.
8903 (compile_bytecodes): Recognize special cases of compare-goto
8904 combinations and call specialized emitters for them.
8905 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8906 (amd64_emit_ne_goto): New function.
8907 (amd64_emit_lt_goto): New function.
8908 (amd64_emit_le_goto): New function.
8909 (amd64_emit_gt_goto): New function.
8910 (amd64_emit_ge_goto): New function.
8911 (amd64_emit_ops): Add the new functions.
8912 (i386_emit_eq_goto): New function.
8913 (i386_emit_ne_goto): New function.
8914 (i386_emit_lt_goto): New function.
8915 (i386_emit_le_goto): New function.
8916 (i386_emit_gt_goto): New function.
8917 (i386_emit_ge_goto): New function.
8918 (i386_emit_ops): Add the new functions.
8919
8920 2011-09-08 Stan Shebs <stan@codesourcery.com>
8921
8922 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8923 (i386_emit_epilogue): Restore %ebx.
8924
8925 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8926
8927 * server.c (step_thread): Remove definition.
8928 (process_serial_event): Don't handle Hs.
8929 * server.h (step_thread): Remove declaration.
8930 * target.c (set_desired_inferior): Remove use of step_thread.
8931
8932 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8933
8934 * linux-low.c: Include linux-procfs.h.
8935 (linux_attach_lwp_1): Update comments.
8936 (linux_attach): Scan for existing threads when attaching to a
8937 process that is the tgid.
8938 * Makefile.in: Update dependencies.
8939
8940 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8941
8942 * configure.srv: Add linux-procfs.o dependencies.
8943
8944 2011-08-14 Yao Qi <yao@codesourcery.com>
8945
8946 * target.h (struct target_ops): Fix indent.
8947 * win32-low.c (win32_target_ops): Fix comment.
8948
8949 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8950 Yao Qi <yao@codesourcery.com>
8951
8952 * Makefile.in (clean): Remove tic6x-*.c files.
8953 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8954 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8955 (tic6x-c64xp-linux.c): Likewise.
8956 * configure.srv: Add support for tic6x-*-uclinux.
8957 * linux-tic6x-low.c: New.
8958 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8959
8960 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8961 Yao Qi <yao@codesourcery.com>
8962
8963 * target.h (struct target_ops): Add read_loadmap.
8964 * linux-low.c (struct target_loadseg): New type.
8965 (struct target_loadmap): New type.
8966 (linux_read_loadmap): New function.
8967 (linux_target_ops): Add linux_read_loadmap.
8968 * server.c (handle_query): Support qXfer:fdpic:read packet.
8969 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8970 to NULL.
8971
8972 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8973
8974 * win32-low.c: Include <stdint.h>.
8975
8976 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8977
8978 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8979 to the inferior here.
8980 (i386_remove_aligned_watchpoint): Ditto.
8981 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8982 fit part of the watchpoint in the debug registers.
8983 (i386_update_inferior_debug_regs): New.
8984 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8985 registers, and only update the inferior on success.
8986 (i386_low_remove_watchpoint): Ditto.
8987
8988 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8989
8990 * linux-low.c (compare_ints, unique, list_threads, show_process,
8991 linux_core_of_thread): Delete.
8992 (linux_target_ops): Change linux_core_of_thread to
8993 linux_common_core_of_thread.
8994 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8995 * utils.c (malloc_failure): Change type of argument.
8996 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8997 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8998 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8999 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9000 (IPA_OBJS): Add common-utils-ipa.o.
9001 (ptid_h, linux_osdata_h): New macros.
9002 (server_h): Add common/common-utils.h, common/xml-utils.h,
9003 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9004 common/ptid.h.
9005 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9006 ptid.o, buffer.o): New rules.
9007 (linux-low.o): Add common/linux-osdata.h as a dependency.
9008 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9009 * configure.ac: Add AC_HEADER_DIRENT check.
9010 * config.in: Regenerate.
9011 * configure: Regenerate.
9012 * remote-utils.c (xml_escape_text): Delete.
9013 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9014 buffer_xml_printf): Move to common/buffer.c.
9015 * server.c (main): Remove call to initialize_inferiors.
9016 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9017 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9018 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9019 internal_error, gdb_assert, gdb_assert_fail): Delete.
9020 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9021 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9022 common/buffer.h.
9023 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9024 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9025 initialize_inferiors): Delete.
9026
9027 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9028
9029 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9030 symbol error.
9031
9032 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9033
9034 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9035 assertion.
9036 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9037
9038 2011-05-26 Yao Qi <yao@codesourcery.com>
9039
9040 * Makefile.in (thread-db.o): Track dependence to
9041 common/gdb_thread_db.h.
9042 * thread-db.c: include gdb_thread_db.h from right place.
9043
9044 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9045
9046 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9047 __FILE__ and __LINE__ to internal_error.
9048
9049 2011-05-13 Doug Evans <dje@google.com>
9050
9051 * thread-db.c (try_thread_db_load_from_sdir): New function.
9052 (try_thread_db_load_from_dir): New function.
9053 (thread_db_load_search): Handle $sdir, ignore $pdir.
9054 Remove trying of system directories if search of
9055 libthread-db-search-path fails, that is now done via $sdir.
9056
9057 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9058
9059 * server.c (handle_query): Add EnableDisableTracepoints to the list
9060 of supported features.
9061 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9062 tracepoints.
9063 (cmd_qtenable_disable): New.
9064 (cmd_qtstart): Install tracepoints even if disabled.
9065 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9066 receiving a QTEnable or QTDisable packet.
9067 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9068 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9069 tracepoints.
9070 (gdb_probe): Skip data collection if static tracepoint is disabled.
9071
9072 2011-05-10 Doug Evans <dje@google.com>
9073
9074 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9075
9076 2011-05-04 Doug Evans <dje@google.com>
9077
9078 * linux-low.c (linux_join): Skip process lookup.
9079 * spu-low.c (spu_join): Ditto.
9080 * server.c (join_inferiors_callback): Delete.
9081 (process_serial_event): For 'D' packet (detach) call join_inferior
9082 directly.
9083
9084 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9085
9086 * README: Don't mention xscale*-*-linux*.
9087 * configure.srv (xscale*-*-linux*): Don't handle target.
9088
9089 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9090
9091 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9092 casting pointers.
9093 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9094 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9095 (i386_emit_void_call_2): Likewise.
9096
9097 2011-04-26 Yao Qi <yao@codesourcery.com>
9098
9099 * linux-low.c: Move common macros to linux-ptrace.h.
9100 Include linux-ptrace.h.
9101 * Makefile.in (linux_ptrace_h): New.
9102 (linux-low.o): Depends on linux-ptrace.h.
9103
9104 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9105
9106 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9107 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9108 (remote_prepare): New function with most of the TCP code from ...
9109 (remote_open): ... here. Detect PORT here unconditionally. Move also
9110 setting transport_is_reliable.
9111 * server.c (run_once): New variable.
9112 (gdbserver_usage): Document it.
9113 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9114 the first run if RUN_ONCE.
9115 * server.h (run_once, remote_prepare): New declarations.
9116
9117 2011-04-19 Tom Tromey <tromey@redhat.com>
9118
9119 * win32-low.c (handle_load_dll): Remove duplicate "the".
9120
9121 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9122
9123 Remove support for old Cygwin 1.5 versions.
9124 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9125 function to avoid warning.
9126 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9127 warning.
9128
9129 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9130
9131 * gdbserver/server.h (Macro _): Define it if not available.
9132
9133 2011-03-14 Michael Snyder <msnyder@vmware.com>
9134
9135 * hostio.c (handle_close): Remove unnecessary null test.
9136
9137 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9138
9139 * Makefile.in (maintainer-clean realclean distclean): Remove
9140 "make ... subdir_do" command.
9141
9142 2011-03-10 Michael Snyder <msnyder@vmware.com>
9143
9144 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9145
9146 * server.c (handle_v_run): Free alloced buffer on early return.
9147
9148 2011-03-09 Yao Qi <yao@codesourcery.com>
9149
9150 Revert:
9151 2011-03-04 Yao Qi <yao@codesourcery.com>
9152
9153 * Makefile.in: Remove GNU make feature --directory.
9154
9155 2011-03-05 Yao Qi <yao@codesourcery.com>
9156
9157 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9158 (subdir_do): New make target. Copied from gdb/Makefile.
9159 (maintainer-clean, realclean, distclean, clean): Call corresponding
9160 make targets in common/Makefile.
9161
9162 2011-02-11 Yao Qi <yao@codesourcery.com>
9163
9164 * configure.ac: Call AC_PROG_RANLIB.
9165 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9166 * configure: Regenerate.
9167
9168 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9169
9170 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9171
9172 2011-03-06 Yao Qi <yao@codesourcery.com>
9173
9174 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9175
9176 2011-03-05 Yao Qi <yao@codesourcery.com>
9177
9178 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9179 (subdir_do): New make target. Copied from gdb/Makefile.
9180 (maintainer-clean, realclean, distclean, clean): Call corresponding
9181 make targets in common/Makefile.
9182
9183 2011-03-04 Yao Qi <yao@codesourcery.com>
9184
9185 * Makefile.in: Remove GNU make feature --directory.
9186
9187 2011-03-04 Michael Snyder <msnyder@vmware.com>
9188
9189 * server.c (queue_stop_reply): Call xmalloc not malloc.
9190
9191 2011-03-02 Michael Snyder <msnyder@vmware.com>
9192
9193 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9194
9195 2011-02-28 Michael Snyder <msnyder@vmware.com>
9196
9197 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9198 (cmd_qtframe): Ditto.
9199 (cmd_qtbuffer): Ditto.
9200 (cmd_bigqtbuffer): Ditto.
9201
9202 * utils.c (decimal2str): Initialize 'width' to nine, then
9203 don't mess with it.
9204
9205 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9206
9207 * hostio.c (require_data): Free *data, not data.
9208
9209 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9210
9211 * hostio.c (require_data): Use free, not xfree.
9212
9213 2011-02-27 Michael Snyder <msnyder@vmware.com>
9214
9215 * server.c (handle_query): Discard unused value.
9216
9217 * hostio.c (require_data): Free malloc memory before returning
9218 error.
9219
9220 2011-02-26 Michael Snyder <msnyder@vmware.com>
9221
9222 * linux-low.c (list_threads): Call closedir for dirent.
9223
9224 2011-02-27 Michael Snyder <msnyder@vmware.com>
9225
9226 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9227 a case statement falls through.
9228
9229 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9230
9231 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9232 in comparison.
9233
9234 2011-02-26 Michael Snyder <msnyder@vmware.com>
9235
9236 * utils.c (decimal2str): Eliminate dead code and dead param.
9237 (pulongest): Drop dead param from call to decimal2str.
9238 (plongest): Ditto.
9239
9240 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9241
9242 Revert the following patch (not approved yet):
9243 2011-02-21 Hui Zhu <teawater@gmail.com>
9244 * tracepoint.c (tp_printf): New function.
9245 (eval_agent_expr): Handle gdb_agent_op_printf.
9246
9247 2011-02-21 Hui Zhu <teawater@gmail.com>
9248
9249 * tracepoint.c (tp_printf): New function.
9250 (eval_agent_expr): Handle gdb_agent_op_printf.
9251
9252 2011-02-18 Tom Tromey <tromey@redhat.com>
9253
9254 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9255 (tracepoint.o): Likewise.
9256 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9257 (gdb_agent_op_names): Likewise.
9258
9259 2011-02-18 Tom Tromey <tromey@redhat.com>
9260
9261 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9262 gdb_agent_op_rot>: New constants.
9263 (gdb_agent_op_names): Add pick and roll.
9264 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9265 cases.
9266
9267 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9268
9269 * aclocal.m4: Regenerated with aclocal-1.11.1.
9270
9271 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9272
9273 * server.c (handle_qxfer_traceframe_info): New.
9274 (qxfer_packets): Register "traceframe-info".
9275 (handle_query): Report support for qXfer:traceframe-info:read+.
9276 * tracepoint.c (match_blocktype): New.
9277 (traceframe_find_block_type): Rename to ...
9278 (traceframe_walk_blocks): ... this. Add callback filter argument,
9279 and use it.
9280 (traceframe_find_block_type): New, reimplemented on top of
9281 traceframe_walk_blocks.
9282 (build_traceframe_info_xml): New.
9283 (traceframe_read_info): New.
9284 * server.h (traceframe_read_info): Declare.
9285
9286 2011-02-11 Yao Qi <yao@codesourcery.com>
9287
9288 * configure.ac: Call AC_PROG_RANLIB.
9289 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9290 * configure: Regenerate.
9291
9292 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9293
9294 * server.c (gdb_read_memory): Change return semantics to allow
9295 partial transfers.
9296 (handle_search_memory_1): Adjust.
9297 (process_serial_event) <'m' packet>: Handle partial transfers.
9298 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9299
9300 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9301
9302 * regcache.c (init_register_cache): Initialize
9303 regcache->register_status.
9304 (free_register_cache): Release regcache->register_status.
9305 (regcache_cpy): Copy register_status.
9306 (registers_to_string): Print 'x's for unavailable registers.
9307 (supply_register): Mark the register's status valid or
9308 unavailable, depending on whether a buffer was passed in or not.
9309 (supply_register_zeroed): New.
9310 (supply_regblock): Mark the registers' status valid or
9311 unavailable, depending on whether a buffer was passed in or not.
9312 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9313 (struct regcache): New `register_status' field.
9314 (supply_register_zeroed): Declare.
9315 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9316 supply_register_zeroed, rather than passing a NULL buffer to
9317 supply_register.
9318 * tracepoint.c (fetch_traceframe_registers): Update comment.
9319
9320 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9321
9322 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9323 buffer explicit.
9324
9325 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9326
9327 * server.h (decode_xfer_write): Change prototype.
9328 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9329 and don't extract the annex here.
9330 * server.c (decode_xfer_read): Remove `annex' parameter,
9331 and don't extract the annex here.
9332 (decode_xfer): New.
9333 (struct qxfer): New.
9334 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9335 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9336 (handle_qxfer_statictrace): New functions, abstracted out from
9337 handle_query, and made to use the struct qxfer interface.
9338 (handle_threads_qxfer_proper): Rename to ...
9339 (handle_qxfer_threads_proper): ... this.
9340 (handle_threads_qxfer): Rename to ...
9341 (handle_qxfer_threads): ... this. Adjust.
9342 (qxfer_packets): New array.
9343 (handle_qxfer): New function.
9344 (handle_query): Use handle_qxfer.
9345
9346 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9347
9348 * gdbreplay.c: Shorten lines of >= 80 columns.
9349 * linux-low.c: Ditto.
9350 * linux-ppc-low.c: Ditto.
9351 * linux-s390-low.c: Ditto.
9352 * linux-sparc-low.c: Ditto.
9353 * linux-x86-low.c: Ditto.
9354 * linux-xtensa-low.c: Ditto.
9355 * mem-break.c: Ditto.
9356 * nto-low.c: Ditto.
9357 * regcache.h: Ditto.
9358 * remote-utils.c: Ditto.
9359 * server.c: Ditto.
9360 * server.h: Ditto.
9361 * thread-db.c: Ditto.
9362 * tracepoint.c: Ditto.
9363 * utils.c: Ditto.
9364 * win32-low.h: Ditto.
9365
9366 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9367
9368 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9369 update.
9370
9371 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9372
9373 * server.c (gdbserver_version): Update copyright year in version
9374 output.
9375 * gdbreplay.c (gdbreplay_version): Ditto.
9376
9377 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9378
9379 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9380 * linux-bfin-low.c: New file.
9381 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9382 PT_DATA_ADDR for BFIN targets.
9383 * Makefile.in (SFILES): Add linux-bfin-low.c.
9384 (clean): Remove reg-bfin.c.
9385 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9386 * README: Mention supported Blackfin targets.
9387
9388 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9389
9390 * .gitignore: New file.
9391
9392 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9393
9394 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9395
9396 2010-10-22 Jie Zhang <jie@codesourcery.com>
9397
9398 * Makefile.in: Add FLAGS_TO_PASS variable.
9399 (install): Remove dependency of install-only and recursively
9400 invoke make for install-only.
9401
9402 2010-10-04 Doug Evans <dje@google.com>
9403
9404 * Makefile.in (uninstall): Use $(DESTDIR).
9405
9406 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9407
9408 PR gdb/11842
9409
9410 * linux-x86-low.c (compat_siginfo_from_siginfo)
9411 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9412 si_code is < 0. Check for si_code == SI_TIMER before checking for
9413 si_code < 0.
9414
9415 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9416
9417 * lynx-i386-low.c: New file.
9418 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9419
9420 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9421
9422 * lynx-low.c (ptrace_request_to_str): Remove handling for
9423 request values that have been removed in LynxOS 5.x.
9424
9425 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9426
9427 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9428 <ptrace.h>
9429
9430 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9431
9432 * configure.ac: Add --enable-inprocess-agent option.
9433 * configure: Rebuilt.
9434
9435 2010-09-06 Yao Qi <yao@codesourcery.com>
9436
9437 * linux-low.c (linux_kill): Remove unused variable.
9438 (linux_stabilize_threads): Likewise.
9439 * server.c (start_inferior): Likewise.
9440 (queue_stop_reply_callback): Likewise.
9441 * tracepoint.c (do_action_at_tracepoint): Likewise.
9442
9443 2010-09-06 Yao Qi <yao@codesourcery.com>
9444
9445 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9446 on return.
9447
9448 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9449
9450 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9451
9452 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9453
9454 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9455 "$(IPA_DEPFILES)".
9456
9457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9458
9459 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9460 gdbserver/lynx-ppc-low.c: New files.
9461 * Makefile.in (lynx_low_h): New variable.
9462 (lynx-low.o, lynx-ppc-low.o): New rules.
9463 * configure.ac: On LynxOS, link with -lnetinet.
9464 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9465 * configure: regenerate.
9466
9467 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9468
9469 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9470 * configure.ac: Add check for vasprintf and vsnprintf.
9471 * configure, config.in: Regenerate.
9472 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9473
9474 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9475
9476 * gdbreplay.c: Move include of alloca.h up, next to include of
9477 malloc.h.
9478 * server.h: Add include of malloc.h.
9479 * mem-break.c: Remove include of malloc.h.
9480 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9481
9482 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9483
9484 * Makefile.in (memmem.o): Build with -Wno-error.
9485
9486 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9487
9488 * utils.c (xsnprintf): Make non-static.
9489 * server.h: Add xsnprintf declaration.
9490 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9491 replace calls to snprintf by calls to xsnprintf throughout.
9492
9493 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9494
9495 * configure.ac: Add configure check for alloca.
9496 * configure, config.in: Regenerate.
9497 * server.h: Include alloca.h if it exists.
9498 * gdbreplay.c: Include alloca.h if it exists.
9499
9500 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9501
9502 * linux-low.c (__SIGRTMIN): Define if not already defined.
9503 (linux_create_inferior): Check for __ANDROID__ rather than
9504 __SIGRTMIN.
9505 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9506 are already deferred.
9507 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9508 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9509 stopped and already has a pending signal to report.
9510 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9511 a pending signal to report or is moving out of a jump pad.
9512 (linux_init_signals): Check for __ANDROID__ rather than
9513 __SIGRTMIN.
9514
9515 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9516
9517 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9518 debug_threads check. Avoid a linear search when not doing debug
9519 output.
9520
9521 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9522
9523 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9524 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9525 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9526 (process_event): Change local fd's type to gdb_fildes_t.
9527 (create_file_handler): Adjust prototype.
9528 (delete_file_handler): Adjust prototype.
9529 (handle_file_event): Adjust prototype. Use pfildes.
9530 (create_file_event): Adjsut prototype.
9531 * remote-utils.c (remote_desc, listen_desc): Change type to
9532 gdb_fildes_t.
9533 * server.h: New gdb_fildes_t typedef.
9534 [USE_WIN32API]: Include winsock2.h.
9535 (delete_file_handler, add_file_handler): Adjust prototypes.
9536 (pfildes): Declare.
9537 * utils.c (pfildes): New.
9538
9539 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9540
9541 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9542 * configure: Regenerate.
9543
9544 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9545
9546 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9547 (linux_done_accessing_memory): ... this.
9548 (linux_target_ops): Adjust.
9549 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9550 * nto-low.c (nto_target_ops): Adjust comment.
9551 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9552 * spu-low.c (spu_target_ops): Adjust comment.
9553 * target.h (target_ops): Rename unprepare_to_access_memory field
9554 to done_accessing_memory.
9555 (unprepare_to_access_memory): Rename to ...
9556 (done_accessing_memory): ... this.
9557
9558 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9559
9560 * linux-low.c (linux_prepare_to_access_memory): New.
9561 (linux_unprepare_to_access_memory): New.
9562 (linux_target_ops): Install them.
9563 * server.c (read_memory): Rename to ...
9564 (gdb_read_memory): ... this. Use
9565 prepare_to_access_memory/prepare_to_access_memory.
9566 (write_memory): Rename to ...
9567 (gdb_write_memory): ... this. Use
9568 prepare_to_access_memory/prepare_to_access_memory.
9569 (handle_search_memory_1): Adjust.
9570 (process_serial_event): Adjust.
9571 * target.h (struct target_ops): New fields
9572 prepare_to_access_memory and unprepare_to_access_memory.
9573 (prepare_to_access_memory, unprepare_to_access_memory): New.
9574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9575 prepare_to_access_memory/prepare_to_access_memory.
9576 * nto-low.c (nto_target_ops): Adjust.
9577 * spu-low.c (spu_target_ops): Adjust.
9578 * win32-low.c (win32_target_ops): Adjust.
9579
9580 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9581
9582 * Makefile.in (WARN_CFLAGS): Get it from configure.
9583 (WERROR_CFLAGS): New.
9584 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9585 * configure.ac: Introduce --enable-werror, which adds -Werror to
9586 the compiler command line. Enabled by default. Disable with
9587 --disable-werror. Add -Wdeclaration-after-statement
9588 Wpointer-arith and -Wformat-nonliteral to warning flags.
9589 * configure: Regenerate.
9590
9591 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9592
9593 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9594
9595 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9596
9597 * gdbreplay.c (remote_error): New.
9598 (gdbchar): New.
9599 (expect): Use gdbchar. Check for error reading from GDB.
9600 Clarify sync error output.
9601 (play): Check for errors writing to GDB.
9602 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9603 * remote-utils.c (getpkt): Check for errors writing to the remote
9604 descriptor.
9605
9606 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9607
9608 * linux-low.c (linux_wait_1): Move non-debugging code out of
9609 `debug_threads' control.
9610
9611 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9612
9613 * linux-low.c (linux_wait_1): Don't set last_status here.
9614 * server.c (push_event, queue_stop_reply_callback): Assert we're
9615 not pushing a TARGET_WAITKIND_IGNORE event.
9616 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9617 (myresume, handle_target_event): Set the thread's last_resume_kind
9618 and last_status from the target returned status.
9619
9620 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9621
9622 PR threads/10729
9623
9624 * linux-x86-low.c (update_debug_registers_callback): New.
9625 (i386_dr_low_set_addr): Use it.
9626 (i386_dr_low_get_addr): New.
9627 (i386_dr_low_set_control): Use update_debug_registers_callback.
9628 (i386_dr_low_get_control): New.
9629 (i386_dr_low_get_status): Adjust.
9630 * linux-low.c (linux_stop_lwp): New.
9631 * linux-low.h (linux_stop_lwp): Declare.
9632
9633 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9634 argument instead of a i386_debug_reg_state.
9635 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9636 a i386_debug_reg_state.
9637 (i386_insert_aligned_watchpoint): Adjust.
9638 (i386_remove_aligned_watchpoint): Adjust.
9639 (i386_low_stopped_data_address): Read the debug registers from the
9640 inferior instead of from the mirrors.
9641 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9642 (i386_dr_low_get_addr): Declare.
9643 (i386_dr_low_get_control): Declare.
9644 (i386_dr_low_get_status): Change prototype.
9645
9646 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9647 (i386_dr_low_get_addr): New.
9648 (i386_dr_low_get_control): New.
9649 (i386_dr_low_get_status): Adjust prototype. Return
9650 dr_status_mirror.
9651 (i386_initial_stuff): Clear dr_status_mirror and
9652 dr_control_mirror.
9653 (i386_get_thread_context): Adjust.
9654 (i386_set_thread_context): Adjust.
9655 (i386_thread_added): Adjust.
9656
9657 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9658
9659 * linux-low.h (linux_thread_area): Delete declaration.
9660
9661 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9662
9663 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9664 after its termination.
9665
9666 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9667
9668 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9669 (gdb_wants_all_stopped): Delete.
9670 (linux_wait_1): Don't call them.
9671 * server.c (handle_v_cont): Tag all threads as want-stopped.
9672 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9673 stopped as "client-wants-stopped".
9674
9675 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9676
9677 * Makefile.in (signals_h): New.
9678 (server_h): Depend on it.
9679 (server.o): Don't depend on $(signals_def).
9680 (signals.o): Depend on $(signals_def).
9681
9682 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9683
9684 * Makefile.in (signals_def): New.
9685 (server_h): Append include/gdb/signals.h and signals_def.
9686 (server.o): Append signals_def.
9687
9688 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9689
9690 * server.c (handle_target_event): Use target_signal_to_host for
9691 resume_info.sig initialization.
9692 * target.h (struct thread_resume) <sig>: New comment.
9693
9694 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9695
9696 * server.c (handle_query): strcpy() the returned string from paddress()
9697 instead of sprintf().
9698 * utils.c (paddress): Return phex_nz().
9699
9700 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9701
9702 * server.c (handle_v_cont): Call mourn_inferior if process
9703 just exited.
9704 (myresume): Likewise.
9705
9706 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9707
9708 Static tracepoints, and integration with UST.
9709
9710 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9711 * mem-break.c (uninsert_all_breakpoints)
9712 (reinsert_all_breakpoints): New.
9713 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9714 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9715 (gdb_agent_ust_loaded, helper_thread_id)
9716 (gdb_agent_helper_thread_id): New macros.
9717 (struct ipa_sym_addresses): Add addr_ust_loaded,
9718 addr_helper_thread_id, addr_cmd_buf.
9719 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9720 (in_process_agent_loaded_ust): New.
9721 (write_e_ust_not_loaded): New.
9722 (maybe_write_ipa_ust_not_loaded): New.
9723 (struct collect_static_trace_data_action): New.
9724 (enum tracepoint_type) <static_tracepoint>: New.
9725 (struct tracepoint) <handle>: Mention static tracepoints.
9726 (struct static_tracepoint_ctx): New.
9727 (CMD_BUF_SIZE): New.
9728 (add_tracepoint_action): Handle static tracepoint actions.
9729 (unprobe_marker_at): New.
9730 (clear_installed_tracepoints): Handle static tracepoints.
9731 (cmd_qtdp): Handle static tracepoints.
9732 (probe_marker_at): New.
9733 (cmd_qtstart): Handle static tracepoints.
9734 (response_tracepoint): Handle static tracepoints.
9735 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9736 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9737 (get_context_regcache): Handle static tracepoints.
9738 (do_action_at_tracepoint): Handle static tracepoint actions.
9739 (traceframe_find_block_type): Handle static trace data blocks.
9740 (traceframe_read_sdata): New.
9741 (download_tracepoints): Download static tracepoint actions.
9742 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9743 (GDB_PROBE_NAME): New.
9744 (ust_ops): New.
9745 (GET_UST_SYM): New.
9746 (USTF): New.
9747 (dlsym_ust): New.
9748 (ust_marker_to_static_tracepoint): New.
9749 (gdb_probe): New.
9750 (collect_ust_data_at_tracepoint): New.
9751 (gdb_ust_probe): New.
9752 (UNIX_PATH_MAX, SOCK_DIR): New.
9753 (gdb_ust_connect_sync_socket): New.
9754 (resume_thread, stop_thread): New.
9755 (run_inferior_command): New.
9756 (init_named_socket): New.
9757 (gdb_ust_socket_init): New.
9758 (cstr_to_hexstr): New.
9759 (next_st): New.
9760 (first_marker, next_marker): New.
9761 (response_ust_marker): New.
9762 (cmd_qtfstm, cmd_qtsstm): New.
9763 (unprobe_marker_at, probe_marker_at): New.
9764 (cmd_qtstmat, gdb_ust_thread): New.
9765 (gdb_ust_init): New.
9766 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9767 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9768 (ST_REGENTRY): New.
9769 (x86_64_st_collect_regmap): New.
9770 (X86_64_NUM_ST_COLLECT_GREGS): New.
9771 (AMD64_RIP_REGNUM): New.
9772 (supply_static_tracepoint_registers): New.
9773 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9774 (ST_REGENTRY): New.
9775 (i386_st_collect_regmap): New.
9776 (i386_NUM_ST_COLLECT_GREGS): New.
9777 (supply_static_tracepoint_registers): New.
9778 * server.c (handle_query): Handle qXfer:statictrace:read.
9779 <qSupported>: Report support for StaticTracepoints, and
9780 qXfer:statictrace:read features.
9781 * server.h (traceframe_read_sdata)
9782 (supply_static_tracepoint_registers): Declare.
9783 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9784 (unpack_varlen_hex): Include in IPA build.
9785 * Makefile.in (ustlibs, ustinc): New.
9786 (IPA_OBJS): Add remote-utils-ipa.o.
9787 ($(IPA_LIB)): Link -ldl and -lpthread.
9788 (UST_CFLAGS): New.
9789 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9790 * config.in, configure: Regenerate.
9791
9792 2010-06-20 Ian Lance Taylor <iant@google.com>
9793 Pedro Alves <pedro@codesourcery.com>
9794
9795 * linux-x86-low.c (always_true): Delete.
9796 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9797 trying to fool the compiler with always_true.
9798
9799 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9800
9801 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9802 conditions in gdbserver.
9803
9804 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9805
9806 * spu-low.c (spu_read_memory): Wrap around local store limit.
9807 (spu_write_memory): Likewise.
9808
9809 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9810
9811 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9812 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9813 LONGEST uses.
9814 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9815 uses.
9816 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9817 uses with LONGEST uses.
9818
9819 2010-06-14 Stan Shebs <stan@codesourcery.com>
9820 Pedro Alves <pedro@codesourcery.com>
9821
9822 Bytecode compiler.
9823
9824 * linux-x86-low.c: Include limits.h.
9825 (add_insns): New.
9826 (always_true): New.
9827 (EMIT_ASM): New.
9828 (EMIT_ASM32): New.
9829 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9830 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9831 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9832 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9833 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9834 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9835 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9836 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9837 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9838 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9839 (amd64_emit_void_call_2): New.
9840 (amd64_emit_ops): New.
9841 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9842 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9843 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9844 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9845 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9846 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9847 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9848 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9849 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9850 (i386_emit_stack_adjust, i386_emit_int_call_1)
9851 (i386_emit_void_call_2): New.
9852 (i386_emit_ops): New.
9853 (x86_emit_ops): New.
9854 (the_low_target): Install x86_emit_ops.
9855 * server.h (struct emit_ops): New.
9856 (get_raw_reg_func_addr): Declare.
9857 (current_insn_ptr, emit_error): Declare.
9858 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9859 (set_trace_state_variable_value): New defines.
9860 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9861 addr_get_trace_state_variable_value and
9862 addr_set_trace_state_variable_value.
9863 (symbol_list): New fields for get_raw_reg,
9864 get_trace_state_variable_value and set_trace_state_variable_value.
9865 (condfn): New typedef.
9866 (struct tracepoint): New field `compiled_cond'.
9867 (do_action_at_tracepoint): Clear compiled_cond.
9868 (get_trace_state_variable_value, set_trace_state_variable_value):
9869 Export in the IPA.
9870 (condition_true_at_tracepoint): If there's a compiled condition,
9871 run that.
9872 (current_insn_ptr, emit_error): New globals.
9873 (struct bytecode_address): New.
9874 (get_raw_reg_func_addr): New.
9875 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9876 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9877 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9878 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9879 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9880 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9881 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9882 (compile_tracepoint_condition, compile_bytecodes): New.
9883 * target.h (emit_ops): Forward declare.
9884 (struct target_ops): New field emit_ops.
9885 (target_emit_ops): New.
9886 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9887 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9888 * linux-low.c (linux_emit_ops): New.
9889 (linux_target_ops): Install it.
9890 * linux-low.h (struct linux_target_ops): New field emit_ops.
9891
9892 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9893
9894 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9895 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9896
9897 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9898 Stan Shebs <stan@codesourcery.com>
9899
9900 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9901 (all): Depend on $(extra_libraries).
9902 (install-only): Install the IPA.
9903 (IPA_OBJS, IPA_LIB): New.
9904 (clean): Remove the IPA lib.
9905 (IPAGENT_CFLAGS): New.
9906 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9907 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9908 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9909 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9910 * configure.ac: Check for atomic builtins support in the compiler.
9911 (IPA_DEPFILES, extra_libraries): Define.
9912 * configure.srv (ipa_obj): Add description.
9913 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9914 (i[34567]86-*-linux*): Set ipa_obj.
9915 (x86_64-*-linux*): Set ipa_obj.
9916 * linux-low.c (stabilizing_threads): New.
9917 (supports_fast_tracepoints): New.
9918 (linux_detach): Stabilize threads before detaching.
9919 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9920 the lwp is either not stabilizing, or is moving out of a jump pad.
9921 (linux_fast_tracepoint_collecting): New.
9922 (maybe_move_out_of_jump_pad): New.
9923 (enqueue_one_deferred_signal): New.
9924 (dequeue_one_deferred_signal): New.
9925 (linux_wait_for_event_1): If moving out of a jump pad, defer
9926 pending signals to later.
9927 (linux_stabilize_threads): New.
9928 (linux_wait_1): Check if threads need moving out of jump pads, and
9929 do it if so.
9930 (stuck_in_jump_pad_callback): New.
9931 (move_out_of_jump_pad_callback): New.
9932 (lwp_running): New.
9933 (linux_resume_one_lwp): Handle moving out of jump pads.
9934 (linux_set_resume_request): Dequeue deferred signals.
9935 (need_step_over_p): Also step over fast tracepoint jumps.
9936 (start_step_over): Also uninsert fast tracepoint jumps.
9937 (finish_step_over): Also reinsert fast tracepoint jumps.
9938 (linux_install_fast_tracepoint_jump): New.
9939 (linux_target_ops): Install linux_stabilize_threads and
9940 linux_install_fast_tracepoint_jump_pad.
9941 * linux-low.h (linux_target_ops) <get_thread_area,
9942 install_fast_tracepoint_jump_pad>: New fields.
9943 (struct lwp_info) <collecting_fast_tracepoint,
9944 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9945 (linux_get_thread_area): Declare.
9946 * linux-x86-low.c (jump_insn): New.
9947 (x86_get_thread_area): New.
9948 (append_insns): New.
9949 (push_opcode): New.
9950 (amd64_install_fast_tracepoint_jump_pad): New.
9951 (i386_install_fast_tracepoint_jump_pad): New.
9952 (x86_install_fast_tracepoint_jump_pad): New.
9953 (the_low_target): Install x86_get_thread_area and
9954 x86_install_fast_tracepoint_jump_pad.
9955 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9956 (struct fast_tracepoint_jump): New.
9957 (fast_tracepoint_jump_insn): New.
9958 (fast_tracepoint_jump_shadow): New.
9959 (find_fast_tracepoint_jump_at): New.
9960 (fast_tracepoint_jump_here): New.
9961 (delete_fast_tracepoint_jump): New.
9962 (set_fast_tracepoint_jump): New.
9963 (uninsert_fast_tracepoint_jumps_at): New.
9964 (reinsert_fast_tracepoint_jumps_at): New.
9965 (set_breakpoint_at): Use write_inferior_memory.
9966 (uninsert_raw_breakpoint): Use write_inferior_memory.
9967 (check_mem_read): Mask out fast tracepoint jumps.
9968 (check_mem_write): Mask out fast tracepoint jumps.
9969 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9970 (set_fast_tracepoint_jump): Declare.
9971 (delete_fast_tracepoint_jump)
9972 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9973 (reinsert_fast_tracepoint_jumps_at): Declare.
9974 * regcache.c: Don't compile many functions when building the
9975 in-process agent library.
9976 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9977 the register buffer in the heap.
9978 (free_register_cache): If the register buffer isn't owned by the
9979 regcache, don't free it.
9980 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9981 pre-existing register caches.
9982 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9983 type.
9984 (convert_ascii_to_int): : Constify `from' parameter type.
9985 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9986 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9987 the needed buffer in-place.
9988 (relocate_instruction): New.
9989 * server.c (handle_query) <qSymbols>: If the target supports
9990 tracepoints, give it a chance of looking up symbols. Report
9991 support for fast tracepoints.
9992 (handle_status): Stabilize threads.
9993 (process_serial_event): Adjust.
9994 * server.h (struct fast_tracepoint_jump): Forward declare.
9995 (struct process_info) <fast_tracepoint_jumps>: New field.
9996 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9997 (decode_X_packet, decode_M_packet): Adjust.
9998 (relocate_instruction): Declare.
9999 (in_process_agent_loaded): Declare.
10000 (tracepoint_look_up_symbols): Declare.
10001 (struct fast_tpoint_collect_status): Declare.
10002 (fast_tracepoint_collecting): Declare.
10003 (force_unlock_trace_buffer): Declare.
10004 (handle_tracepoint_bkpts): Declare.
10005 (initialize_low_tracepoint)
10006 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10007 * target.h (struct target_ops) <stabilize_threads,
10008 install_fast_tracepoint_jump_pad>: New fields.
10009 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10010 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10011 [HAVE_STDINT_H]: Include stdint.h.
10012 (trace_debug_1): Rename to ...
10013 (trace_vdebug): ... this.
10014 (trace_debug): Rename to ...
10015 (trace_debug_1): ... this. Add `level' parameter.
10016 (trace_debug): New.
10017 (ATTR_USED, ATTR_NOINLINE): New.
10018 (IP_AGENT_EXPORT): New.
10019 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10020 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10021 (about_to_request_buffer_space, trace_buffer_is_full)
10022 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10023 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10024 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10025 (traceframe_write_count, traceframes_created)
10026 (trace_state_variables)
10027 New renaming defines.
10028 (struct ipa_sym_addresses): New.
10029 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10030 (symbol_list): New.
10031 (ipa_sym_addrs): New.
10032 (all_tracepoint_symbols_looked_up): New.
10033 (in_process_agent_loaded): New.
10034 (write_e_ipa_not_loaded): New.
10035 (maybe_write_ipa_not_loaded): New.
10036 (tracepoint_look_up_symbols): New.
10037 (debug_threads) [IN_PROCESS_AGENT]: New.
10038 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10039 (UNKNOWN_SIDE_EFFECTS): New.
10040 (stop_tracing): New.
10041 (flush_trace_buffer): New.
10042 (stop_tracing_bkpt): New.
10043 (flush_trace_buffer_bkpt): New.
10044 (read_inferior_integer): New.
10045 (read_inferior_uinteger): New.
10046 (read_inferior_data_pointer): New.
10047 (write_inferior_data_pointer): New.
10048 (write_inferior_integer): New.
10049 (write_inferior_uinteger): New.
10050 (struct collect_static_trace_data_action): Delete.
10051 (enum tracepoint_type): New.
10052 (struct tracepoint) <type>: New field `type'.
10053 <actions_str, step_actions, step_actions_str>: Only include in
10054 GDBserver.
10055 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10056 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10057 (tracepoints): Use IP_AGENT_EXPORT.
10058 (last_tracepoint): Don't include in the IPA.
10059 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10060 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10061 (alloced_trace_state_variables): New.
10062 (trace_state_variables): Use IP_AGENT_EXPORT.
10063 (traceframe_t): Delete unused variable.
10064 (circular_trace_buffer): Don't include in the IPA.
10065 (trace_buffer_start): Delete.
10066 (struct trace_buffer_control): New.
10067 (trace_buffer_free): Delete.
10068 (struct ipa_trace_buffer_control): New.
10069 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10070 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10071 New.
10072 (trace_buffer_ctrl): New.
10073 (TRACE_BUFFER_CTRL_CURR): New.
10074 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10075 Reimplement as macros.
10076 (trace_buffer_wrap): Delete.
10077 (traceframe_write_count, traceframe_read_count)
10078 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10079 (struct tracepoint_hit_ctx) <type>: New field.
10080 (struct fast_tracepoint_ctx): New.
10081 (memory_barrier): New.
10082 (cmpxchg): New.
10083 (record_tracepoint_error): Update atomically in the IPA.
10084 (clear_inferior_trace_buffer): New.
10085 (about_to_request_buffer_space): New.
10086 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10087 updating the same buffer.
10088 (add_tracepoint): Default the tracepoint's type to trap
10089 tracepoint, and orig_size to -1.
10090 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10091 internal variables.
10092 (create_trace_state_variable): New parameter `gdb'. Handle it.
10093 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10094 (cmd_qtdp): Handle fast tracepoints.
10095 (cmd_qtdv): Adjust.
10096 (max_jump_pad_size): New.
10097 (gdb_jump_pad_head): New.
10098 (get_jump_space_head): New.
10099 (claim_jump_space): New.
10100 (sort_tracepoints): New.
10101 (MAX_JUMP_SIZE): New.
10102 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10103 IPA.
10104 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10105 support. Upload fast traceframes, and delete internal IPA
10106 breakpoints.
10107 (stop_tracing_handler): New.
10108 (flush_trace_buffer_handler): New.
10109 (cmd_qtstop): Upload fast tracepoints.
10110 (response_tracepoint): Handle fast tracepoints.
10111 (tracepoint_finished_step): Upload fast traceframes. Set the
10112 tracepoint hit context's tracepoint type.
10113 (handle_tracepoint_bkpts): New.
10114 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10115 type. Add comment about fast tracepoints.
10116 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10117 non-existing action_str field.
10118 (get_context_regcache): Handle fast tracepoints.
10119 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10120 to the regcache.
10121 (fast_tracepoint_from_jump_pad_address): New.
10122 (fast_tracepoint_from_ipa_tpoint_address): New.
10123 (collecting_t): New.
10124 (force_unlock_trace_buffer): New.
10125 (fast_tracepoint_collecting): New.
10126 (collecting): New.
10127 (gdb_collect): New.
10128 (write_inferior_data_ptr): New.
10129 (target_tp_heap): New.
10130 (target_malloc): New.
10131 (download_agent_expr): New.
10132 (UALIGN): New.
10133 (download_tracepoints): New.
10134 (download_trace_state_variables): New.
10135 (upload_fast_traceframes): New.
10136 (IPA_FIRST_TRACEFRAME): New.
10137 (IPA_NEXT_TRACEFRAME_1): New.
10138 (IPA_NEXT_TRACEFRAME): New.
10139 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10140 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10141 (gdb_jump_pad_buffer_end): New.
10142 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10143 (initialize_tracepoint): Adjust.
10144 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10145 buffer. Initialize the low module.
10146 * utils.c (PREFIX, TOOLNAME): New.
10147 (malloc_failure): Use PREFIX.
10148 (error): In the IPA, an error causes an exit.
10149 (fatal, warning): Use PREFIX.
10150 (internal_error): Use TOOLNAME.
10151 (NUMCELLS): Increase to 10.
10152 * configure, config.in: Regenerate.
10153
10154 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10155
10156 * server.c (handle_query) <qSupported>: Do two passes over the
10157 qSupported string to avoid nesting strtok.
10158
10159 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10160
10161 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10162 (CDEPS): New.
10163 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10164 -Wl,--dynamic-list.
10165 * configure: Regenerate.
10166 * proc-service.list: New.
10167
10168 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10169
10170 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10171 New comment.
10172
10173 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10174
10175 * gdbreplay.c (remote_open): Check error return from socket() call by
10176 its equality to -1 not by it being negative.
10177 * remote-utils.c (remote_open): Likewise.
10178
10179 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10180
10181 * config.h: Regenerate.
10182
10183 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10184
10185 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10186 doesn't provide PTRACE_GET_THREAD_AREA.
10187
10188 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10189
10190 * linux-m68k-low.c: Include <asm/ptrace.h>
10191 (ps_get_thread_area): Implement.
10192
10193 2010-05-03 Doug Evans <dje@google.com>
10194
10195 * event-loop.c (struct callback_event): New struct.
10196 (callback_list): New global.
10197 (append_callback_event, delete_callback_event): New functions.
10198 (process_callback): New function.
10199 (start_event_loop): Call it.
10200 * remote-utils.c (NOT_SCHEDULED): Define.
10201 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10202 moved out of readchar.
10203 (readchar): Rewrite. Call reschedule before returning.
10204 (reset_readchar): New function.
10205 (remote_close): Call it.
10206 (process_remaining, reschedule): New functions.
10207 * server.h (callback_handler_func): New typedef.
10208 (append_callback_event, delete_callback_event): Declare.
10209
10210 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10211
10212 * proc-service.c (ps_pglobal_lookup): Use
10213 thread_db_look_up_one_symbol.
10214 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10215 parameter. Use it instead of all_symbols_looked_up.
10216 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10217 field.
10218 (all_symbols_looked_up): Don't declare.
10219 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10220 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10221 field.
10222 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10223 Set all_symbols_looked_up here.
10224 (thread_db_look_up_one_symbol): New.
10225 (thread_db_get_tls_address): Adjust.
10226 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10227 thread_db object on the heap, and tentatively set it in the
10228 process structure.
10229 (thread_db_init): Don't set all_symbols_looked_up here.
10230 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10231
10232 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10233
10234 * linux-low.c (linux_kill, linux_detach): Adjust.
10235 (status_pending_p_callback): Remove redundant statement. Check
10236 for !TARGET_WAITIKIND_IGNORE, instead of
10237 TARGET_WAITKIND_STOPPED.
10238 (handle_tracepoints): Make sure LWP is locked. Adjust.
10239 (linux_wait_for_event_1): Adjust.
10240 (linux_cancel_breakpoints): New.
10241 (unsuspend_one_lwp): New.
10242 (unsuspend_all_lwps): New.
10243 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10244 (send_sigstop_callback): Change return type to int, add new
10245 `except' parameter and handle it.
10246 (suspend_and_send_sigstop_callback): New.
10247 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10248 pass them down. If SUSPEND, also increment the lwp's suspend
10249 count.
10250 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10251 (need_step_over_p): Don't consider suspended LWPs.
10252 (start_step_over): Adjust.
10253 (proceed_one_lwp): Change return type to int, add new `except'
10254 parameter and handle it.
10255 (unsuspend_and_proceed_one_lwp): New.
10256 (proceed_all_lwps): Use find_inferior instead of
10257 for_each_inferior.
10258 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10259 also decrement the suspend count of LWPs. Pass `except' down,
10260 instead of hacking its suspend count.
10261 (linux_pause_all): Add `freeze' parameter. Adjust.
10262 (linux_unpause_all): New.
10263 (linux_target_ops): Install linux_unpause_all.
10264 * server.c (handle_status): Adjust.
10265 * target.h (struct target_ops): New fields `unpause_all' and
10266 `cancel_breakpoints'. Add new parameter to `pause_all'.
10267 (pause_all): Add new `freeze' parameter.
10268 (unpause_all): New.
10269 (cancel_breakpoints): New.
10270 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10271 cancel breakpoints.
10272 (cmd_qtstart): Pause threads.
10273 (stop_tracing): Pause threads, and cancel breakpoints.
10274 * win32-low.c (win32_target_ops): Adjust.
10275
10276 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10277
10278 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10279 the inferior right away from here...
10280 (linux_wait_1): ... to here, and adjust to check the thread's
10281 last_resume_kind instead of the lwp's step or stop_expected flags.
10282
10283 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10284
10285 * README: Use consistent `GDB' and `GDBserver' spellings.
10286
10287 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10288
10289 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10290 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10291 (linux_detach_one_lwp): Assume the lwp is stopped.
10292 (any_thread_of): Delete.
10293 (linux_detach): Stop all lwps here. Don't blindly delete all
10294 breakpoints.
10295 (delete_lwp_callback): New.
10296 (linux_mourn): Delete all lwps of the process that is gone.
10297 (linux_wait_1): Don't delete the last lwp of the process here.
10298 * mem-break.h (mark_breakpoints_out): Declare.
10299 * mem-break.c (mark_breakpoints_out): New.
10300 (free_all_breakpoints): Use it.
10301 * server.c (handle_target_event): If the process is gone, mark
10302 breakpoints out.
10303 * thread-db.c (struct thread_db) <create_bp>: New field.
10304 (thread_db_enable_reporting): Fix prototype. Store a thread event
10305 breakpoint reference in the thread_db struct.
10306 (thread_db_load_search): Clear the thread_db object.
10307 (try_thread_db_load_1): Ditto.
10308 (switch_to_process): New.
10309 (disable_thread_event_reporting): Use it.
10310 (remove_thread_event_breakpoints): New.
10311 (thread_db_detach, thread_db_mourn): Use it.
10312
10313 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10314
10315 * linux-low.c (linux_enable_event_reporting): New.
10316 (linux_wait_for_event_1, handle_extended_wait): Use it.
10317
10318 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10319
10320 * linux-low.c (linux_kill_one_lwp, linux_kill)
10321 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10322 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10323 SIGSTOP even if the LWP is stopped.
10324 (send_sigstop_callback): New.
10325 (stop_all_lwps): Use send_sigstop_callback instead.
10326 (linux_resume_one_thread): Adjust.
10327 (proceed_one_lwp): Still proceed an LWP that the client has
10328 requested to stop, if we haven't reported it as stopped yet. Make
10329 sure that LWPs the client want stopped, have a pending SIGSTOP.
10330
10331 2010-04-26 Doug Evans <dje@google.com>
10332
10333 * server.c (handle_general_set): Make static.
10334
10335 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10336 Print received char after testing for error/eof instead of before.
10337 (input_interrupt): Tweak comment.
10338
10339 2010-04-23 Doug Evans <dje@google.com>
10340
10341 * server.c (start_inferior): Print inferior argv if --debug.
10342
10343 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10344
10345 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10346 * nto-x86-low.c: Include server.h
10347
10348 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10349
10350 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10351 be consistent with other sources of this directory.
10352 (init_registers_amd64): Correct name of source file of this function
10353 in the comment.
10354
10355 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10356
10357 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10358 64-bit executables.
10359
10360 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10361
10362 * win32-i386-low.c: Add 64-bit support.
10363 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10364 (init_registers_amd64): Declare.
10365 (mappings): Add 64-bit version of array.
10366 (init_windows_x86): New function.
10367 (the_low_target): Change init_arch field to init_windows_x86.
10368
10369 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10370
10371 * win32-low.c: Adapt to support also 64-bit architecture.
10372 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10373 (get_image_name): Use SIZE_T type for local variable `done'.
10374 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10375 (toolhelp_get_dll_name): Idem.
10376 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10377 Use uintptr_t typecast to avoid warning.
10378 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10379 (handle_exception): Use phex_nz to avoid warning.
10380 (win32_wait): Remove unused local variable `process'.
10381
10382 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10383
10384 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10385 `amd64-avx.o'.
10386
10387 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10388
10389 * configure.ac: Use `ws2_32' library for srv_mingw.
10390 * configure: Regenerate.
10391 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10392 * remote-utils.c: Likewise.
10393
10394 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10395
10396 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10397 if __x86_64__ is defined.
10398
10399 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10400
10401 * configure: Regenerate.
10402
10403 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10404
10405 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10406 * target.h (target_ops): New get_tib_address field.
10407 * win32-low.h (win32_thread_info): Add thread_local_base field.
10408 * win32-low.c (child_add_thread): Add tlb argument.
10409 Set thread_local_base field to TLB.
10410 (get_child_debug_event): Adapt to child_add_thread change.
10411 (win32_get_tib_address): New function.
10412 (win32_target_ops): Set get_tib_address field to
10413 win32_get_tib_address.
10414 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10415
10416 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10417
10418 * linux-low.c (linux_mourn): Also remove the process.
10419 * server.c (handle_target_event): Don't remove the process here.
10420 * nto-low.c (nto_mourn): New.
10421 (nto_target_ops): Install it.
10422 * spu-low.c (spu_mourn): New.
10423 (spu_target_ops): Install it.
10424 * win32-low.c (win32_mourn): New.
10425 (win32_target_ops): Install it.
10426
10427 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10428
10429 * server.h (buffer_xml_printf): Remove redundant `;'.
10430
10431 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10432
10433 * regcache.c (set_register_cache): Invalidate regcaches before
10434 changing the register cache layout.
10435 (regcache_invalidate_one): Allow a NULL regcache.
10436 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10437 regcaches before changing the register cache layout or the target
10438 regsets.
10439
10440 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10441
10442 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10443 variable warning on Linux/x86-64.
10444
10445 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10446
10447 GDBserver disconnected tracing support.
10448
10449 * linux-low.c (linux_remove_process): Delete.
10450 (add_lwp): Don't set last_resume_kind here.
10451 (linux_kill): Use `mourn'.
10452 (linux_detach): Use `thread_db_detach', and `mourn'.
10453 (linux_mourn): New.
10454 (linux_attach_lwp_1): Adjust comment.
10455 (linux_attach): last_resume_kind moved the thread_info; adjust.
10456 (status_pending_p_callback): Adjust.
10457 (linux_wait_for_event_1): Adjust.
10458 (count_events_callback, select_singlestep_lwp_callback)
10459 (select_event_lwp_callback, cancel_breakpoints_callback)
10460 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10461 (proceed_one_lwp): Adjust.
10462 (linux_async): Add debug output.
10463 (linux_thread_stopped): New.
10464 (linux_pause_all): New.
10465 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10466 linux_pause_all.
10467 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10468 (thread_db_free): Delete declaration.
10469 (thread_db_detach, thread_db_mourn): Declare.
10470 * thread-db.c (thread_db_init): Use thread_db_mourn.
10471 (thread_db_free): Delete, split in two.
10472 (disable_thread_event_reporting): New.
10473 (thread_db_detach): New.
10474 (thread_db_mourn): New.
10475
10476 * server.h (struct thread_info) <last_resume_kind>: New field.
10477 <attached>: Add comment.
10478 <gdb_detached>: New field.
10479 (handler_func): Change return type to int.
10480 (handle_serial_event, handle_target_event): Ditto.
10481 (gdb_connected): Declare.
10482 (tracing): Delete.
10483 (disconnected_tracing): Declare.
10484 (stop_tracing): Declare.
10485
10486 * server.c (handle_query) <qSupported>: Report support for
10487 disconnected tracing.
10488 (queue_stop_reply_callback): Account for running threads.
10489 (gdb_wants_thread_stopped): New.
10490 (gdb_wants_all_threads_stopped): New.
10491 (gdb_reattached_process): New.
10492 (handle_status): Clear the `gdb_detached' flag of all processes.
10493 In all-stop, stop all threads.
10494 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10495 (process_serial_event): If the remote connection breaks, or if an
10496 exit was forced with "monitor exit", force an event loop exit.
10497 Handle disconnected tracing on detach.
10498 (handle_serial_event): Adjust.
10499 (handle_target_event): If GDB isn't connected, forward events back
10500 to the inferior, unless the last process exited, in which case,
10501 exit gdbserver. Adjust interface.
10502
10503 * remote-utils.c (remote_open): Don't block in accept. Instead
10504 register an event loop source on the listen socket file
10505 descriptor. Refactor bits into ...
10506 (listen_desc): ... this new global.
10507 (gdb_connected): ... this new function.
10508 (enable_async_notification): ... this new function.
10509 (handle_accept_event): ... this new function.
10510 (remote_close): Clear remote_desc.
10511
10512 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10513
10514 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10515 New fields.
10516 (mourn_inferior): Define.
10517 (target_process_qsupported): Avoid the dangling else problem.
10518 (thread_stopped): Define.
10519 (pause_all): Define.
10520 (target_waitstatus_to_string): Declare.
10521 * target.c (target_waitstatus_to_string): New.
10522
10523 * tracepoint.c (tracing): Make extern.
10524 (disconnected_tracing): New.
10525 (stop_tracing): Make extern. Handle tracing stops due to GDB
10526 disconnecting.
10527 (cmd_qtdisconnected): New.
10528 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10529 (handle_tracepoint_general_set): Handle QTDisconnected.
10530
10531 * event-loop.c (event_handler_func): Change return type to int.
10532 (process_event): Bail out if the event handler wants the event
10533 loop to stop.
10534 (handle_file_event): Ditto.
10535 (start_event_loop): Bail out if the event handler wants the event
10536 loop to stop.
10537
10538 * nto-low.c (nto_target_ops): Adjust.
10539 * spu-low.c (spu_wait): Don't remove the process here.
10540 (spu_target_ops): Adjust.
10541 * win32-low.c (win32_wait): Don't remove the process here.
10542 (win32_target_ops): Adjust.
10543
10544 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10545
10546 * regcache.c (realloc_register_cache): Invalidate inferior's
10547 regcache before recreating it.
10548
10549 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10550
10551 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10552
10553 2010-04-09 Stan Shebs <stan@codesourcery.com>
10554 Pedro Alves <pedro@codesourcery.com>
10555
10556 * server.h (LONGEST): New.
10557 (struct thread_info) <while_stepping>: New field.
10558 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10559 Declare.
10560 (initialize_tracepoint, handle_tracepoint_general_set)
10561 (handle_tracepoint_query, tracepoint_finished_step)
10562 (tracepoint_was_hit, release_while_stepping_state_list):
10563 (current_traceframe): Declare.
10564 * server.c (handle_general_set): Handle tracepoint packets.
10565 (read_memory): New.
10566 (write_memory): New.
10567 (handle_search_memory_1): Use read_memory.
10568 (handle_query): Report support for conditional tracepoints, trace
10569 state variables, and tracepoint sources. Handle tracepoint
10570 queries.
10571 (main): Initialize the tracepoints module.
10572 (process_serial_event): Handle traceframe reads/writes.
10573
10574 * linux-low.c (handle_tracepoints): New.
10575 (linux_wait_1): Call it.
10576 (linux_resume_one_lwp): Handle while-stepping.
10577 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10578 (linux_target_ops): Install them.
10579 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10580 New field.
10581 * linux-x86-low.c (x86_supports_tracepoints): New.
10582 (the_low_target). Install it.
10583
10584 * mem-break.h (delete_breakpoint): Declare.
10585 * mem-break.c (delete_breakpoint): Make external.
10586
10587 * target.h (struct target_ops): Add `supports_tracepoints',
10588 `read_pc', and `write_pc' fields.
10589 (target_supports_tracepoints): Define.
10590 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10591 (phex_nz): New.
10592
10593 * regcache.h (struct regcache) <registers_owned>: New field.
10594 (init_register_cache, regcache_cpy): Declare.
10595 (regcache_read_pc, regcache_write_pc): Declare.
10596 (register_cache_size): Declare.
10597 (supply_regblock): Declare.
10598 * regcache.c (init_register_cache): New.
10599 (new_register_cache): Use it.
10600 (regcache_cpy): New.
10601 (register_cache_size): New.
10602 (supply_regblock): New.
10603 (regcache_read_pc, regcache_write_pc): New.
10604
10605 * tracepoint.c: New.
10606
10607 * Makefile.in (OBS): Add tracepoint.o.
10608 (tracepoint.o): New rule.
10609
10610 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10611
10612 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10613 (i386-mmx.o): New.
10614 (i386-mmx.c): Likewise.
10615 (i386-mmx-linux.o): Likewise.
10616 (i386-mmx-linux.c): Likewise.
10617
10618 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10619 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10620 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10621 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10622
10623 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10624 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10625 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10626
10627 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10628
10629 * Makefile.in (clean): Updated.
10630 (i386-avx.o): New.
10631 (i386-avx.c): Likewise.
10632 (i386-avx-linux.o): Likewise.
10633 (i386-avx-linux.c): Likewise.
10634 (amd64-avx.o): Likewise.
10635 (amd64-avx.c): Likewise.
10636 (amd64-avx-linux.o): Likewise.
10637 (amd64-avx-linux.c): Likewise.
10638
10639 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10640 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10641 (srv_amd64_regobj): Add amd64-avx.o.
10642 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10643 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10644 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10645 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10646 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10647 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10648 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10649
10650 * i387-fp.c: Include "i386-xstate.h".
10651 (i387_xsave): New.
10652 (i387_cache_to_xsave): Likewise.
10653 (i387_xsave_to_cache): Likewise.
10654 (x86_xcr0): Likewise.
10655
10656 * i387-fp.h (i387_cache_to_xsave): Likewise.
10657 (i387_xsave_to_cache): Likewise.
10658 (x86_xcr0): Likewise.
10659
10660 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10661 * linux-crisv32-low.c (target_regsets): Likewise.
10662 * linux-m68k-low.c (target_regsets): Likewise.
10663 * linux-mips-low.c (target_regsets): Likewise.
10664 * linux-ppc-low.c (target_regsets): Likewise.
10665 * linux-s390-low.c (target_regsets): Likewise.
10666 * linux-sh-low.c (target_regsets): Likewise.
10667 * linux-sparc-low.c (target_regsets): Likewise.
10668 * linux-xtensa-low.c (target_regsets): Likewise.
10669
10670 * linux-low.c: Include <sys/uio.h>.
10671 (regsets_fetch_inferior_registers): Support nt_type.
10672 (regsets_store_inferior_registers): Likewise.
10673 (linux_process_qsupported): New.
10674 (linux_target_ops): Add linux_process_qsupported.
10675
10676 * linux-low.h (regset_info): Add nt_type.
10677 (linux_target_ops): Add process_qsupported.
10678
10679 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10680 and <sys/uio.h>.
10681 (init_registers_i386_avx_linux): New.
10682 (init_registers_amd64_avx_linux): Likewise.
10683 (xmltarget_i386_linux_no_xml): Likewise.
10684 (xmltarget_amd64_linux_no_xml): Likewise.
10685 (PTRACE_GETREGSET): Likewise.
10686 (PTRACE_SETREGSET): Likewise.
10687 (x86_fill_xstateregset): Likewise.
10688 (x86_store_xstateregset): Likewise.
10689 (use_xml): Likewise.
10690 (x86_linux_update_xmltarget): Likewise.
10691 (x86_linux_process_qsupported): Likewise.
10692 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10693 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10694 init_registers_i386_linux here. Call
10695 x86_linux_update_xmltarget.
10696 (the_low_target): Add x86_linux_process_qsupported.
10697
10698 * server.c (handle_query): Call target_process_qsupported.
10699
10700 * target.h (target_ops): Add process_qsupported.
10701 (target_process_qsupported): New.
10702
10703 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10704
10705 * inferiors.c (add_thread): Set last_status kind to
10706 TARGET_WAITKIND_IGNORE.
10707 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10708 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10709 (linux_wait_1): Move `thread' local definition to block that uses
10710 it. Don't NULL initialize `event_child'.
10711 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10712 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10713 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10714
10715 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10716
10717 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10718 an extended waitstatus, or by a watchpoint.
10719 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10720 thread was stepping or has been stopped by a watchpoint.
10721
10722 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10723
10724 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10725 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10726 of another, then delete the previous, and validate all
10727 breakpoints.
10728 (validate_inserted_breakpoint): New.
10729 (delete_disabled_breakpoints): New.
10730 (validate_breakpoints): New.
10731 (check_mem_read): Validate breakpoints before trusting their
10732 shadow. Delete disabled breakpoints.
10733 (check_mem_write): Validate breakpoints before trusting they
10734 should be inserted. Delete disabled breakpoints.
10735 * mem-break.h (validate_breakpoints):
10736 * server.c (handle_query): Validate breakpoints when we see a
10737 qSymbol query.
10738
10739 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10740
10741 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10742 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10743 if we could tell there's a GDB breakpoint at stop_pc.
10744 (need_step_over_p): Don't do a step over if we find a GDB
10745 breakpoint at the resume PC.
10746
10747 * mem-break.c (struct raw_breakpoint): New.
10748 (enum bkpt_type): New type `gdb_breakpoint'.
10749 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10750 fields. New field `raw'.
10751 (find_raw_breakpoint_at): New.
10752 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10753 breakpoint instead.
10754 (set_breakpoint_at): Adjust.
10755 (delete_raw_breakpoint): New.
10756 (release_breakpoint): New.
10757 (delete_breakpoint): Rename to...
10758 (delete_breakpoint_1): ... this. Add proc parameter. Use
10759 release_breakpoint. Return ENOENT.
10760 (delete_breakpoint): Reimplement.
10761 (find_breakpoint_at): Delete.
10762 (find_gdb_breakpoint_at): New.
10763 (delete_breakpoint_at): Delete.
10764 (set_gdb_breakpoint_at): New.
10765 (delete_gdb_breakpoint_at): New.
10766 (gdb_breakpoint_here): New.
10767 (set_reinsert_breakpoint): Use release_breakpoint.
10768 (uninsert_breakpoint): Rename to ...
10769 (uninsert_raw_breakpoint): ... this.
10770 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10771 (reinsert_raw_breakpoint): Change parameter type to
10772 raw_breakpoint.
10773 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10774 instead.
10775 (check_breakpoints): Adjust. Use release_breakpoint.
10776 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10777 (breakpoint_inserted_here): Ditto.
10778 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10779 Don't trust the breakpoint's shadow if it is not inserted.
10780 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10781 (delete_all_breakpoints): Adjust.
10782 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10783 use delete_breakpoint_1.
10784
10785 * mem-break.h (breakpoints_supported): Delete declaration.
10786 (set_gdb_breakpoint_at): Declare.
10787 (gdb_breakpoint_here): Declare.
10788 (delete_breakpoint_at): Delete.
10789 (delete_gdb_breakpoint_at): Declare.
10790
10791 * server.h (struct raw_breakpoint): Forward declare.
10792 (struct process_info): New field `raw_breakpoints'.
10793
10794 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10795 breakpoints.
10796
10797 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10798
10799 * linux-low.c (status_pending_p_callback): Fix comment.
10800 (linux_wait_for_event_1): Move most of the internal breakpoint
10801 handling from here...
10802 (linux_wait_1): ... to here.
10803 (count_events_callback): New.
10804 (select_singlestep_lwp_callback): New.
10805 (select_event_lwp_callback): New.
10806 (cancel_breakpoints_callback): New.
10807 (select_event_lwp): New.
10808 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10809 priority to all LWPs that have had events that should be reported
10810 to the client. Cancel breakpoints when about to reporting the
10811 event to the client, not while stopping lwps. No longer cancel
10812 finished single-steps here.
10813 (cancel_finished_single_step): Delete.
10814 (cancel_finished_single_steps): Delete.
10815
10816 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10817
10818 * mem-break.c (enum bkpt_type): New.
10819 (struct breakpoint): New field `type'.
10820 (set_breakpoint_at): Change return type to struct breakpoint
10821 pointer. Set type to `other_breakpoint' by default.
10822 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10823 in the breakpoint list.
10824 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10825 (reinsert_breakpoint): Rename to ...
10826 (reinsert_raw_breakpoint): ... this.
10827 (reinsert_breakpoints_at): Adjust.
10828 * mem-break.h (struct breakpoint): Declare.
10829 (set_breakpoint_at): Change return type to struct breakpoint
10830 pointer.
10831
10832 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10833
10834 * server.c (handle_query): Assign, not compare.
10835
10836 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10837
10838 Teach linux gdbserver to step-over-breakpoints.
10839
10840 * linux-low.c (can_hardware_single_step): New.
10841 (supports_breakpoints): New.
10842 (handle_extended_wait): If stopping threads, read the stop pc of
10843 the new cloned LWP.
10844 (get_pc): New.
10845 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10846 low target doesn't support retrieving the PC.
10847 (add_lwp): Set last_resume_kind to resume_continue.
10848 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10849 (linux_attach): Don't clear stop_expected. Set the lwp's
10850 last_resume_kind to resume_stop.
10851 (linux_detach_one_lwp): Don't check for removed breakpoints.
10852 (check_removed_breakpoint): Delete.
10853 (status_pending_p): Rename to ...
10854 (status_pending_p_callback): ... this. Don't check for removed
10855 breakpoints. Don't consider threads that are stopped from GDB's
10856 perspective.
10857 (linux_wait_for_lwp): Always read the stop_pc here.
10858 (cancel_breakpoint): New.
10859 (step_over_bkpt): New global.
10860 (linux_wait_for_event_1): Implement stepping over breakpoints.
10861 (gdb_wants_lwp_stopped): New.
10862 (gdb_wants_all_stopped): New.
10863 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10864 single-step traps here. Store the thread's last reported target
10865 wait status.
10866 (send_sigstop): Don't clear stop_expected. Always set it,
10867 instead.
10868 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10869 (cancel_finished_single_step): New.
10870 (cancel_finished_single_steps): New.
10871 (wait_for_sigstop): Don't cancel finished single-step traps here.
10872 (linux_resume_one_lwp): Don't check for removed breakpoints.
10873 Don't set `step' on non-hardware step archs.
10874 (linux_set_resume_request): Ignore resume_stop requests if already
10875 stopping or stopped. Set the lwp's last_resume_kind.
10876 (resume_status_pending_p): Don't check for removed breakpoints.
10877 (need_step_over_p): New.
10878 (start_step_over): New.
10879 (finish_step_over): New.
10880 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10881 requests. Clear the thread's last reported target waitstatus.
10882 Don't use the `suspended' flag. Don't consider pending breakpoints.
10883 (linux_resume): Start a step-over if necessary.
10884 (proceed_one_lwp): New.
10885 (proceed_all_lwps): New.
10886 (unstop_all_lwps): New.
10887 * linux-low.h (struct lwp_info): Rewrite comment for the
10888 `suspended' flag. Add the `stop_pc' field. Delete the
10889 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10890 Add `'last_resume_kind' and `need_step_over' fields.
10891 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10892 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10893 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10894 (set_raw_breakpoint_at): New.
10895 (set_breakpoint_at): Rewrite to use it.
10896 (reinsert_breakpoint_handler): Delete.
10897 (set_reinsert_breakpoint): New.
10898 (reinsert_breakpoint_by_bp): Delete.
10899 (delete_reinsert_breakpoints): New.
10900 (uninsert_breakpoint): Rewrite.
10901 (uninsert_breakpoints_at): New.
10902 (reinsert_breakpoint): Rewrite.
10903 (reinsert_breakpoints_at): New.
10904 (check_breakpoints): Rewrite.
10905 (breakpoint_here): New.
10906 (breakpoint_inserted_here): New.
10907 (check_mem_read): Adjust.
10908 * mem-break.h (breakpoints_supported, breakpoint_here)
10909 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10910 (reinsert_breakpoint_by_bp): Delete declaration.
10911 (delete_reinsert_breakpoints): Declare.
10912 (reinsert_breakpoint): Delete declaration.
10913 (reinsert_breakpoints_at): Declare.
10914 (uninsert_breakpoint): Delete declaration.
10915 (uninsert_breakpoints_at): Declare.
10916 (check_breakpoints): Adjust prototype.
10917 * server.h: Adjust include order.
10918 (struct thread_info): Declare here. Add a `last_status' field.
10919
10920 2010-03-23 Michael Snyder <msnyder@vmware.com>
10921
10922 * server.c (crc32): New function.
10923 (handle_query): Add handling for 'qCRC:' request.
10924
10925 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10926
10927 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10928 lwp had been stopped by a watchpoint.
10929
10930 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10931
10932 * server.h (internal_error): Declare.
10933 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10934 * utils.c (internal_error): New function.
10935
10936 2010-03-15 Andreas Schwab <schwab@redhat.com>
10937
10938 * configure.srv: Fix typo setting srv_regobj.
10939
10940 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10941
10942 * linux-low.c (fetch_register): Avoid passing a non string literal
10943 format to `error'.
10944 (usr_store_inferior_registers): Ditto.
10945
10946 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10947
10948 * linux-low.c (linux_write_memory): Bail out early if peeking
10949 memory failed.
10950
10951 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10952
10953 * linux-low.h (struct lwp_info): New fields
10954 `stopped_by_watchpoint' and `stopped_data_address'.
10955 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10956 here, and cache them in the lwp object.
10957 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10958 directly.
10959 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10960 field.
10961 (linux_stopped_by_watchpoint): Rewrite.
10962 (linux_stopped_data_address): Rewrite.
10963
10964 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10965
10966 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10967 switching the current inferior, not before.
10968
10969 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10970
10971 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10972 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10973 i386-linux.c and amd64-linux.c.
10974 (reg-i386.o): Removed.
10975 (reg-i386.c): Likewise.
10976 (reg-i386-linux.o): Likewise.
10977 (reg-i386-linux.c): Likewise.
10978 (reg-x86-64.o): Likewise.
10979 (reg-x86-64.c): Likewise.
10980 (reg-x86-64-linux.o): Likewise.
10981 (reg-x86-64-linux.c): Likewise.
10982 (i386.o): New.
10983 (i386.c): Likewise.
10984 (i386-linux.o): Likewise.
10985 (i386-linux.c): Likewise.
10986 (amd64.o): Likewise.
10987 (amd64.c): Likewise.
10988 (amd64-linux.o): Likewise.
10989 (amd64-linux.c): Likewise.
10990
10991 * configure.srv (srv_i386_regobj): New.
10992 (srv_i386_linux_regobj): Likewise.
10993 (srv_amd64_regobj): Likewise.
10994 (srv_amd64_linux_regobj): Likewise.
10995 (srv_i386_32bit_xmlfiles): Likewise.
10996 (srv_i386_64bit_xmlfiles): Likewise.
10997 (srv_i386_xmlfiles): Likewise.
10998 (srv_amd64_xmlfiles): Likewise.
10999 (srv_i386_linux_xmlfiles): Likewise.
11000 (srv_amd64_linux_xmlfiles): Likewise.
11001 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11002 srv_xmlfiles to $srv_i386_xmlfiles.
11003 (i[34567]86-*-mingw32ce*): Likewise.
11004 (i[34567]86-*-mingw*): Likewise.
11005 (i[34567]86-*-nto*): Likewise.
11006 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11007 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11008 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11009 (x86_64-*-linux*): Likewise.
11010
11011 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11012 (init_registers_amd64_linux): New.
11013 (x86_arch_setup): Replace init_registers_x86_64_linux with
11014 init_registers_amd64_linux.
11015
11016 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11017
11018 * configure.ac: Check for libdl. If it is not available link against
11019 static libthread_db.
11020 * configure: Regenerate.
11021
11022 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11023
11024 PR9605
11025
11026 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11027 handing a read watchpoint.
11028 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11029
11030 2010-02-12 Doug Evans <dje@google.com>
11031
11032 * linux-low.c (linux_supports_tracefork_flag): Document.
11033 (linux_look_up_symbols): Add comment.
11034
11035 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11036
11037 * regcache.c (supply_register): Clear regcache if buf is NULL.
11038
11039 2010-02-02 Nicolas Roche <roche@sourceware.org>
11040 Joel Brobecker <brobecker@adacore.com>
11041
11042 * inferiors.c (find_inferior): Add function documentation.
11043 (unloaded_dll): Handle the case where the unloaded dll has not
11044 been previously registered in the dll list.
11045
11046 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11047
11048 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11049 (thumb2_breakpoint): New.
11050 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11051
11052 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11053
11054 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11055 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11056 breakpoints.
11057
11058 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11059
11060 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11061
11062 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11063
11064 * linux-s390-low.c (s390_collect_ptrace_register)
11065 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11066
11067 2010-01-21 Doug Evans <dje@google.com>
11068
11069 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11070 (PTRACE_ARG4_TYPE): New macro.
11071 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11072 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11073 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11074 (usr_store_inferior_registers): Ditto.
11075 (linux_read_memory, linux_write_memory): Ditto.
11076 (linux_test_for_tracefork): Ditto.
11077
11078 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11079 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11080
11081 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11082
11083 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11084 target.
11085
11086 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11087
11088 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11089 prototype to take a regcache. Adjust.
11090
11091 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11092
11093 * regcache.h (struct thread_info): Forward declare.
11094 (struct regcache): New.
11095 (new_register_cache): Adjust prototype.
11096 (get_thread_regcache): Declare.
11097 (free_register_cache): Adjust prototype.
11098 (registers_to_string, registers_from_string): Ditto.
11099 (supply_register, supply_register_by_name, collect_register)
11100 (collect_register_as_string, collect_register_by_name): Ditto.
11101 * regcache.c (struct inferior_regcache_data): Delete.
11102 (get_regcache): Rename to ...
11103 (get_thread_regcache): ... this. Adjust. Switch inferior before
11104 fetching registers.
11105 (regcache_invalidate_one): Adjust.
11106 (regcache_invalidate): Fix prototype.
11107 (new_register_cache): Return the new register cache.
11108 (free_register_cache): Change prototype.
11109 (realloc_register_cache): Adjust.
11110 (registers_to_string): Change prototype to take a regcache. Adjust.
11111 (registers_from_string): Ditto.
11112 (register_data): Ditto.
11113 (supply_register): Ditto.
11114 (supply_register_by_name): Ditto.
11115 (collect_register): Ditto.
11116 (collect_register_as_string): Ditto.
11117 (collect_register_by_name): Ditto.
11118 * server.c (process_serial_event): Adjust.
11119 * linux-low.h (regset_fill_func, regset_store_func): Change
11120 prototype.
11121 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11122 Change prototype.
11123 * linux-low.c (get_stop_pc): Adjust.
11124 (check_removed_breakpoint): Adjust.
11125 (linux_wait_for_event): Adjust.
11126 (linux_resume_one_lwp): Adjust.
11127 (fetch_register): Add regcache parameter. Adjust.
11128 (usr_store_inferior_registers): Ditto.
11129 (regsets_fetch_inferior_registers): Ditto.
11130 (regsets_store_inferior_registers): Ditto.
11131 (linux_fetch_registers, linux_store_registers): Ditto.
11132 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11133 regcache. Adjust.
11134 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11135 Ditto.
11136 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11137 prototype to take a regcache.
11138 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11139 * remote-utils.c (convert_ascii_to_int, outreg)
11140 (prepare_resume_reply): Change prototype to take a regcache.
11141 Adjust.
11142 * target.h (struct target_ops) <fetch_registers, store_registers>:
11143 Change prototype to take a regcache.
11144 (fetch_inferior_registers, store_inferior_registers): Change
11145 prototype to take a regcache. Adjust.
11146 * proc-service.c (ps_lgetregs): Adjust.
11147 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11148 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11149 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11150 take a regcache. Adjust.
11151 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11152 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11153 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11154 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11155 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11156 (cris_cannot_fetch_register):
11157 (cris_breakpoint_at): Change prototype to take a regcache.
11158 Adjust.
11159 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11160 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11161 to take a regcache. Adjust.
11162 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11163 Adjust.
11164 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11165 take a regcache. Adjust.
11166 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11167 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11168 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11169 * linux-mips-low.c (mips_get_pc):
11170 (mips_set_pc): Change prototype to take a regcache. Adjust.
11171 (mips_reinsert_addr): Adjust.
11172 (mips_collect_register): Change prototype to take a regcache.
11173 Adjust.
11174 (mips_supply_register):
11175 (mips_collect_register_32bit, mips_supply_register_32bit)
11176 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11177 (mips_store_fpregset): Ditto.
11178 * linux-ppc-low.c (ppc_supply_ptrace_register)
11179 (ppc_supply_ptrace_register): Ditto.
11180 (parse_spufs_run): Adjust.
11181 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11182 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11183 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11184 take a regcache. Adjust.
11185 * linux-s390-low.c (s390_collect_ptrace_register)
11186 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11187 (s390_set_pc): Change prototype to take a regcache. Adjust.
11188 (s390_arch_setup): Adjust.
11189 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11190 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11191 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11192 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11193 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11194 regcache. Adjust.
11195 (sparc_breakpoint_at): Adjust.
11196 * linux-xtensa-low.c (xtensa_fill_gregset):
11197 (xtensa_store_gregset):
11198 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11199 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11200 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11201 prototype to take a regcache. Adjust.
11202 * win32-arm-low.c (arm_fetch_inferior_register)
11203 (arm_store_inferior_register): Change prototype to take a
11204 regcache. Adjust.
11205 * win32-i386-low.c (i386_fetch_inferior_register)
11206 (i386_store_inferior_register): Change prototype to take a
11207 regcache. Adjust.
11208 * win32-low.c (child_fetch_inferior_registers)
11209 (child_store_inferior_registers): Change prototype to take a
11210 regcache. Adjust.
11211 (win32_wait): Adjust.
11212 (win32_fetch_inferior_registers): Change prototype to take a
11213 regcache. Adjust.
11214 (win32_store_inferior_registers): Adjust.
11215 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11216 store_inferior_register>: Change prototype to take a regcache.
11217
11218 2010-01-20 Doug Evans <dje@google.com>
11219
11220 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11221 #ifdef.
11222 (linux_wait_for_event1, linux_init_signals): Ditto.
11223 (W_STOPCODE): Provide definition if missing.
11224
11225 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11226
11227 * linux-low.c (linux_core_of_thread): New.
11228 (compare_ints, show_process, list_threads): New.
11229 (linux_qxfer_osdata): Report threads and cores.
11230 (linux_target_op): Register linux_core_of_thread.
11231 * remote-utils.c (prepare_resume_reply): Report the core.
11232 (buffer_xml_printf): Support %d specifier.
11233 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11234 New.
11235 (handle_query): Handle qXfer:threads. Announce availability
11236 thereof.
11237 * target.h (struct target_ops): New field core_of_thread.
11238
11239 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11240
11241 * Makefile.in (clean): Remove new generated files.
11242 (reg-s390.o, reg-s390.c): Remove rules.
11243 (reg-s390x.o, reg-s390x.c): Likewise.
11244 (s390-linux32.o, s390-linux32.c): Add rules.
11245 (s390-linux64.o, s390-linux64.c): Likewise.
11246 (s390x-linux64.o, s390x-linux64.c): Likewise.
11247 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11248 * linux-s390-low.c: Include <elf.h>.
11249 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11250 (init_registers_s390): Remove prototype.
11251 (init_registers_s390x): Likewise.
11252 (init_registers_s390_linux32): Add prototype.
11253 (init_registers_s390_linux64): Likewise.
11254 (init_registers_s390x_linux64): Likewise.
11255 (s390_num_regs_3264): New define.
11256 (s390_regmap_3264): New global variable.
11257 (s390_cannot_fetch_register): Remove obsolete check.
11258 (s390_cannot_store_register): Likewise.
11259 (s390_collect_ptrace_register): Handle upper/lower register halves.
11260 (s390_supply_ptrace_register): Likewise.
11261 (s390_fill_gregset): Update to register number changes.
11262 (s390_get_hwcap): New routine.
11263 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11264 Install appropriate regmap and register set.
11265
11266 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11267
11268 * server.c (gdbserver_version): Update copyright year to 2010.
11269 * gdbreplay.c (gdbreplay_version): Likewise.
11270
11271 2009-12-28 Doug Evans <dje@google.com>
11272
11273 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11274 elf/external.h. Include <elf.h> instead but only if necessary.
11275
11276 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11277
11278 * linux-low.c (linux_remove_process): Remove `detaching'
11279 parameter. Don't release/detach from thread_db here.
11280 (linux_kill): Release/detach from thread_db here, ...
11281 (linux_detach): ... and here, before actually detaching.
11282 (linux_wait_1): ... and here, when a process exits.
11283 * thread-db.c (any_thread_of): New.
11284 (thread_db_free): Switch the current inferior to a thread of the
11285 passed in process.
11286
11287 2009-12-21 Doug Evans <dje@google.com>
11288
11289 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11290
11291 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11292 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11293 warning ifndef __NR_tkill. Move setting of errno there too.
11294 Delete unnecessary resetting of errno after syscall.
11295 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11296
11297 * configure.ac: Check for dladdr.
11298 * config.in: Regenerate.
11299 * configure: Regenerate.
11300 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11301 (try_thread_db_load): Update.
11302
11303 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11304
11305 2009-12-18 Doug Evans <dje@google.com>
11306
11307 * event-loop.c: Include unistd.h if it exists.
11308
11309 * linux-low.c (my_waitpid): Move definition away from being in
11310 between linux_tracefork_child/linux_test_for_tracefork.
11311
11312 * gdb_proc_service.h (psaddr_t): Fix type.
11313 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11314 signature to match glibc.
11315
11316 2009-12-16 Doug Evans <dje@google.com>
11317
11318 * linux-low.c (linux_read_memory): Fix argument to read.
11319
11320 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11321
11322 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11323 events, don't leave current_inferior pointing at null.
11324
11325 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11326
11327 * win32-low.c (LOG): Delete.
11328 (OUTMSG): Output to stderr.
11329 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11330 on compile time LOG macro.
11331 (win32_wait): Fix debug output.
11332
11333 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11334
11335 * win32-low.c (win32_add_one_solib): If the dll name is
11336 "ntdll.dll", prepend the system directory to the dll path.
11337
11338 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11339
11340 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11341
11342 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11343 Vladimir Prus <vladimir@codesourcery.com>
11344
11345 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11346 * configure.ac: Check for __mcoldfire__ and set
11347 gdb_cv_m68k_is_coldfire.
11348 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11349 reg-cf.o and reg-m68k.o.
11350 * configure: Regenerated.
11351
11352 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11353
11354 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11355 Pass it to thread_db_free.
11356 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11357 proper `detaching' argument to linux_remove_process.
11358 * linux-low.h (thread_db_free): Add `detaching' parameter.
11359 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11360 to thread_db_free.
11361 (thread_db_free): Add `detaching' parameter. Only
11362 call td_ta_clear_event if detaching from process.
11363
11364 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11365
11366 * thread-db.c (thread_db_free): Fix typo.
11367
11368 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11369
11370 PR gdb/10838
11371 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11372
11373 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11374
11375 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11376 with an i686 compiler.
11377 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11378 needed.
11379 * configure: Rebuilt.
11380
11381 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11382
11383 PR gdb/10783
11384
11385 * server.c (handle_search_memory_1): Correct read_addr initialization
11386 in loop for searching subsequent chunks.
11387
11388 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11389
11390 * configure.ac: New --with-libthread-db option.
11391 * thread-db.c: Allow direct dependence on libthread_db.
11392 (thread_db_free): Adjust.
11393 * config.in: Regenerate.
11394 * configure: Likewise.
11395
11396 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11397
11398 PR gdb/10757
11399 * thread-db.c (attach_thread): New function.
11400 (maybe_attach_thread): Return success/failure.
11401 (find_new_threads_callback): Adjust.
11402 (thread_db_find_new_threads): Loop until no new threads.
11403
11404 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11405
11406 * proc-service.c (ps_lgetregs): Formatting.
11407
11408 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11409
11410 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11411 * configure.ac: Adjust.
11412 * linux-low.h (struct process_info_private): Move members to struct
11413 thread_db.
11414 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11415 * linux-low.c (linux_remove_process): Adjust.
11416 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11417 * server.c (handle_query): Move code ...
11418 (handle_monitor_command): ... here. New function.
11419 * target.h (struct target_ops): New member.
11420 * thread-db.c (struct thread_db): New.
11421 (libthread_db_search_path): New variable.
11422 (thread_db_create_event, thread_db_enable_reporting)
11423 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11424 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11425 (try_thread_db_load_1, dladdr_to_soname): New functions.
11426 (try_thread_db_load, thread_db_load_search): New functions.
11427 (thread_db_init): Search for libthread_db.
11428 (thread_db_free): New function.
11429 (thread_db_handle_monitor_command): Likewise.
11430 * config.in: Regenerate.
11431 * configure: Regenerate.
11432
11433 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11434
11435 * spu-low.c (spu_kill): Wait for inferior to terminate.
11436 Call clear_inferiors.
11437 (spu_detach): Call clear_inferiors.
11438
11439 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11440
11441 * aclocal.m4: Regenerate.
11442 * config.in: Likewise.
11443 * configure: Likewise.
11444
11445 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11446
11447 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11448 (parse_spufs_run): New function.
11449 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11450 (ppc_breakpoint_at): Handle SPU breakpoints.
11451
11452 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11453
11454 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11455 (SPUFS_MAGIC): Define.
11456 (spu_enumerate_spu_ids): New function.
11457 (linux_qxfer_spu): New function.
11458 (linux_target_ops): Install linux_qxfer_spu.
11459
11460 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11461
11462 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11463 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11464 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11465 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11466 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11467 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11468 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11469 (init_registers_powerpc_cell32l): Add prototype.
11470 (init_registers_powerpc_cell64l): Likewise.
11471 (ppc_arch_setup): Detect Cell/B.E. architecture.
11472
11473 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11474
11475 * Makefile.in (datarootdir): New variable.
11476
11477 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11478
11479 * linux-low.c (linux_write_memory): Update debugging output.
11480 * Makefile.in (clean): Add new descriptions.
11481 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11482 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11483 * configure.srv: Add new files for arm*-*-linux*.
11484 * linux-arm-low.c: Add new declarations.
11485 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11486 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11487 (HWCAP_VFPv3D16): New.
11488 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11489 instead of __IWMMXT__.
11490 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11491 (arm_arch_setup): New.
11492 (target_regsets): Remove #ifdef. Add VFP regset.
11493 (the_low_target): Use arm_arch_setup.
11494
11495 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11498 the main thread again.
11499
11500 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11501
11502 Adding Neutrino gdbserver.
11503 * configure: Regenerated.
11504 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11505 * configure.srv (i[34567]86-*-nto*): New target.
11506 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11507 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11508 (nto_comctrl) [__QNX__]: New function.
11509 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11510
11511 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11512
11513 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11514 srv_tgtobj.
11515
11516 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11517 Pedro Alves <pedro@codesourcery.com>
11518
11519 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11520 don't support CONTEXT_EXTENDED_REGISTERS.
11521 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11522 (the_low_target): Install them.
11523 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11524 failing with ERROR_PIPE_NOT_CONNECTED.
11525
11526 2009-06-30 Doug Evans <dje@google.com>
11527 Pierre Muller <muller@ics.u-strasbg.fr>
11528
11529 Add h/w watchpoint support to x86-linux, win32-i386.
11530 * Makefile.in (SFILES): Add i386-low.c
11531 (i386_low_h): Define.
11532 (i386-low.o): Add dependencies.
11533 (linux-x86-low.o): Add i386-low.h dependency.
11534 (win32-i386-low.o): Ditto.
11535 * i386-low.c: New file.
11536 * i386-low.h: New file.
11537 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11538 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11539 * linux-low.c (linux_add_process): Initialize arch_private.
11540 (linux_remove_process): Free arch_private.
11541 (add_lwp): Initialize arch_private.
11542 (delete_lwp): Free arch_private.
11543 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11544 provided.
11545 * linux-low.h (process_info_private): New member arch_private.
11546 (lwp_info): New member arch_private.
11547 (linux_target_ops): New members new_process, new_thread,
11548 prepare_to_resume.
11549 (ptid_of): New macro.
11550 * linux-x86-low.c: Include stddef.h, i386-low.h.
11551 (arch_process_info): New struct.
11552 (arch_lwp_info): New struct.
11553 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11554 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11555 (i386_dr_low_get_status): New function.
11556 (x86_insert_point, x86_remove_point): New functions.
11557 (x86_stopped_by_watchpoint): New function.
11558 (x86_stopped_data_address): New function.
11559 (x86_linux_new_process, x86_linux_new_thread): New functions.
11560 (x86_linux_prepare_to_resume): New function.
11561 (the_low_target): Add entries for insert_point, remove_point,
11562 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11563 prepare_to_resume.
11564 * server.c (debug_hw_points): New global.
11565 (monitor_show_help): Document set debug-hw-points.
11566 (handle_query): Process "set debug-hw-points".
11567 * server.h (debug_hw_points): Declare.
11568 (paddress): Declare.
11569 * utils.c (NUMCELLS, CELLSIZE): New macros.
11570 (get_sell, xsnprintf, paddress): New functions.
11571 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11572 remove_point, stopped_by_watchpoint, stopped_data_address.
11573 * win32-i386-low.c: Include i386-low.h.
11574 (debug_reg_state): Replaces dr.
11575 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11576 (i386_dr_low_get_status): New function.
11577 (i386_insert_point, i386_remove_point): New functions.
11578 (i386_stopped_by_watchpoint): New function.
11579 (i386_stopped_data_address): New function.
11580 (i386_initial_stuff): Update.
11581 (get_thread_context,set_thread_context,i386_thread_added): Update.
11582 (the_low_target): Add entries for insert_point,
11583 remove_point, stopped_by_watchpoint, stopped_data_address.
11584 * win32-low.c (win32_insert_watchpoint): New function.
11585 (win32_remove_watchpoint): New function.
11586 (win32_stopped_by_watchpoint): New function.
11587 (win32_stopped_data_address): New function.
11588 (win32_target_ops): Add entries for insert_watchpoint,
11589 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11590 * win32-low.h (win32_target_ops): New members insert_point,
11591 remove_point, stopped_by_watchpoint, stopped_data_address.
11592
11593 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11594
11595 * server.c (process_serial_event): Re-return unsupported, not
11596 error, if the type isn't recognized. Re-allow supporting only
11597 insert or remove packets. Also call require_running for
11598 breakpoints. Add missing break statement to default case. Tidy.
11599 * target.h (struct target_ops): Rename insert_watchpoint to
11600 insert_point, and remove_watchpoint to remove_point.
11601
11602 * linux-low.h (struct linux_target_ops): Likewise.
11603 * linux-low.c (linux_insert_watchpoint): Rename to ...
11604 (linux_insert_point): ... this. Adjust.
11605 (linux_remove_watchpoint): Rename to ...
11606 (linux_remove_point): ... this. Adjust.
11607 (linux_target_ops): Adjust.
11608 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11609 (cris_insert_point): ... this.
11610 (cris_remove_watchpoint): Rename to ...
11611 (cris_remove_point): ... this.
11612 (the_low_target): Adjust.
11613
11614 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11615
11616 * server.c (handle_v_kill): Pass signal_pid to
11617 kill_inferior if multi_process is zero.
11618
11619 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11620
11621 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11622 * target.h (target_ops): Comment for *_watchpoint to make it clear
11623 the functions can get types '0' and '1'.
11624
11625 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11626
11627 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11628 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11629 * regcache.c (get_regcache): Likewise.
11630 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11631 * win32-low.c (child_fetch_inferior_registers): Remove check for
11632 regno 0.
11633
11634 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11635 Pedro Alves <pedro@codesourcery.com>
11636
11637 * target.h (struct target_ops) <supports_multi_process>: New
11638 callback.
11639 (target_supports_multi_process): New.
11640 * server.c (handle_query): Even if GDB reports support, only
11641 enable multi-process if the target also supports it. Report
11642 multi-process support only if the target backend supports it.
11643 * linux-low.c (linux_supports_multi_process): New function.
11644 (linux_target_ops): Install it as target_supports_multi_process
11645 callback.
11646
11647 2009-05-24 Doug Evans <dje@google.com>
11648
11649 Global renaming of find_thread_pid to find_thread_ptid.
11650 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11651 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11652 All callers updated.
11653
11654 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11655 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11656 directly.
11657
11658 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11659 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11660 (linux_resume_one_lwp): Ditto.
11661
11662 2009-05-23 Doug Evans <dje@google.com>
11663
11664 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11665 from struct inferior_list_entry * to struct lwp_info *.
11666 All callers updated.
11667
11668 2009-05-13 Doug Evans <dje@google.com>
11669
11670 * linux-x86-low.c: Don't include assert.h.
11671 (x86_siginfo_fixup): Use fatal, not assert.
11672 (x86_arch_setup): Fix comment.
11673
11674 2009-05-12 Doug Evans <dje@google.com>
11675
11676 Biarch support for i386/amd64 gdbserver.
11677 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11678 Add linux-x86-low.c.
11679 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11680 (linux-x86-low.o): Add.
11681 * linux-x86-64-low.c: Delete.
11682 * linux-i386-low.c: Delete.
11683 * linux-x86-low.c: New file.
11684 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11685 linux-x86-low.o.
11686 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11687 linux-x86-low.o.
11688 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11689 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11690 (linux_child_pid_to_exec_file): New function.
11691 (elf_64_header_p, elf_64_file_p): New functions.
11692 (siginfo_fixup): New function.
11693 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11694 give target a chance to convert layout.
11695 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11696 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11697
11698 2009-05-07 Doug Evans <dje@google.com>
11699
11700 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11701 (regsets_store_inferior_registers): Ditto.
11702
11703 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11704
11705 PR server/10048
11706
11707 * linux-low.c (must_set_ptrace_flags): Delete.
11708 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11709 of the global.
11710 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11711 `lwp->must_set_ptrace_flags' instead.
11712 (linux_wait_for_event_1): Set ptrace options here.
11713 (linux_wait_1): ... not here.
11714
11715 2009-04-30 Doug Evans <dje@google.com>
11716
11717 * inferiors.c (started_inferior_callback): New function.
11718 (attached_inferior_callback): New function.
11719 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11720 * server.c (print_started_pid, print_attached_pid): New functions.
11721 (detach_or_kill_for_exit): New function.
11722 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11723 * server.h (have_started_inferiors_p): Declare.
11724 (have_attached_inferiors_p): Declare.
11725
11726 * inferiors.c (remove_process): Fix memory leak, free process.
11727 * linux-low.c (linux_remove_process): New function.
11728 (linux_kill): Call it instead of remove_process.
11729 (linux_detach, linux_wait_1): Ditto.
11730
11731 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11732
11733 * configure.srv: Add x86 Windows CE target.
11734
11735 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11736
11737 * inferiors.c (get_thread_process): Make global.
11738 * server.h (get_thread_process): Add prototype.
11739 * thread-db.c (find_one_thread): Use get_thread_process
11740 instead of current_process.
11741 (thread_db_get_tls_address): Do not crash if called when
11742 thread layer is not yet initialized.
11743
11744 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11745
11746 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11747 * spu-low.c (current_tid): Rename to ...
11748 (current_ptid): ... this.
11749 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11750 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11751 ptid_get_lwp (current_ptid) instead of current_tid.
11752 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11753 instead of current_tid. Use find_process_pid to verify pid
11754 argument is valid. Pass proper argument to remove_process.
11755 (spu_thread_alive): Compare current_ptid instead of current_tid.
11756 (spu_resume): Likewise.
11757
11758 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11759
11760 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11761 variable.
11762
11763 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11764
11765 Implement the multiprocess extensions, and add linux multiprocess
11766 support.
11767
11768 * server.h (ULONGEST): Declare.
11769 (struct ptid, ptid_t): New.
11770 (minus_one_ptid, null_ptid): Declare.
11771 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11772 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11773 (struct inferior_list_entry): Change `id' type from unsigned from
11774 to ptid_t.
11775 (struct sym_cache, struct breakpoint, struct
11776 process_info_private): Forward declare.
11777 (struct process_info): Declare.
11778 (current_process): Declare.
11779 (all_processes): Declare.
11780 (initialize_inferiors): Declare.
11781 (add_thread): Adjust to use ptid_t.
11782 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11783 (add_process, remove_process, find_thread_pid): Declare.
11784 (find_inferior_id): Adjust to use ptid_t.
11785 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11786 (multi_process): Declare.
11787 (push_event): Adjust to use ptid_t.
11788 (read_ptid, write_ptid): Declare.
11789 (prepare_resume_reply): Adjust to use ptid_t.
11790 (clear_symbol_cache): Declare.
11791 * inferiors.c (all_processes): New.
11792 (null_ptid, minus_one_ptid): New.
11793 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11794 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11795 (add_thread): Change unsigned long to ptid. Remove gdb_id
11796 parameter. Adjust.
11797 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11798 (gdb_id_to_thread): Rename to ...
11799 (find_thread_pid): ... this. Change unsigned long to ptid.
11800 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11801 (loaded_dll, pull_pid_from_list): Adjust.
11802 (add_process, remove_process, find_process_pid)
11803 (get_thread_process, current_process, initialize_inferiors): New.
11804 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11805 (struct target_waitstatus) <related_pid>: Ditto.
11806 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11807 return type to int.
11808 (struct target_ops) <join>: Add `pid' argument.
11809 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11810 (struct target_ops) <wait>: Add `ptid' field. Change return type
11811 to ptid.
11812 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11813 (mywait): Add `ptid' argument. Change return type to ptid_t.
11814 (target_pid_to_str): Declare.
11815 * target.c (set_desired_inferior): Adjust to use ptids.
11816 (mywait): Add new `ptid' argument. Adjust.
11817 (target_pid_to_str): New.
11818 * mem-break.h (free_all_breakpoints): Declare.
11819 * mem-break.c (breakpoints): Delelete.
11820 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11821 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11822 to use per-process breakpoint list.
11823 (free_all_breakpoints): New.
11824 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11825 (symbol_cache, all_symbols_looked_up): Delete.
11826 (hexchars): New.
11827 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11828 read_ptid): New.
11829 (prepare_resume_reply): Change ptid argument's type from unsigned
11830 long to ptid_t. Adjust. Implement W;process and X;process.
11831 (free_sym_cache, clear_symbol_cache): New.
11832 (look_up_one_symbol): Adjust to per-process symbol cache. *
11833 * server.c (cont_thread, general_thread, step_thread): Change type
11834 to ptid_t.
11835 (attached): Delete.
11836 (multi_process): New.
11837 (last_ptid): Change type to ptid_t.
11838 (struct vstop_notif) <ptid>: Change type to ptid_t.
11839 (queue_stop_reply, push_event): Change `ptid' argument's type to
11840 ptid_t.
11841 (discard_queued_stop_replies): Add `pid' argument.
11842 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11843 changes. Don't reference the `attached' global.
11844 (attach_inferior): Adjust to mywait interface changes.
11845 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11846 features. Handle and report "multiprocess+". Handle
11847 "qAttached:PID".
11848 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11849 changes.
11850 (handle_v_kill): New.
11851 (handle_v_stopped): Adjust to use target_pid_to_str.
11852 (handle_v_requests): Allow multiple attaches and runs when
11853 multiprocess extensions are in effect. Handle "vKill".
11854 (myresume): Adjust to use ptids.
11855 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11856 (handle_status): Adjust to discard_queued_stop_replies interface
11857 change.
11858 (first_thread_of, kill_inferior_callback)
11859 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11860 (main): Call initialize_inferiors. Adjust to use ptids, killing
11861 and detaching from all inferiors. Handle multiprocess packet
11862 variants.
11863 * linux-low.h: Include gdb_proc_service.h.
11864 (struct process_info_private): New.
11865 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11866 <lwpid_of>: Use ptid_get_lwp.
11867 (get_lwp_thread): Adjust.
11868 (struct lwp_info): Add `dead' member.
11869 (find_lwp_pid): Declare.
11870 * linux-low.c (thread_db_active): Delete.
11871 (new_inferior): Adjust comment.
11872 (inferior_pid): Delete.
11873 (linux_add_process): New.
11874 (handle_extended_wait): Adjust.
11875 (add_lwp): Change unsigned long to ptid.
11876 (linux_create_inferior): Add process to processes table. Adjust
11877 to use ptids. Don't set new_inferior here.
11878 (linux_attach_lwp): Rename to ...
11879 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11880 it. Adjust to use ptids.
11881 (linux_attach_lwp): New.
11882 (linux_attach): Add process to processes table. Don't set
11883 new_inferior here.
11884 (struct counter): New.
11885 (second_thread_of_pid_p, last_thread_of_process_p): New.
11886 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11887 multiple processes.
11888 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11889 processes. Remove process from process table.
11890 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11891 to multiple processes.
11892 (any_thread_of): New.
11893 (linux_detach): Add `pid' argument, and handle it. Remove process
11894 from processes table.
11895 (linux_join): Add `pid' argument. Handle it.
11896 (linux_thread_alive): Change unsighed long argument to ptid_t.
11897 Consider dead lwps as not being alive.
11898 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11899 threads we're not interested in.
11900 (same_lwp, find_lwp_pid): New.
11901 (linux_wait_for_lwp): Change `pid' argument's type from int to
11902 ptid_t. Adjust.
11903 (linux_wait_for_event): Rename to ...
11904 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11905 from int to ptid_t. Adjust.
11906 (linux_wait_for_event): New.
11907 (linux_wait_1): Add `ptid' argument. Change return type to
11908 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11909 that exit from the process table.
11910 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11911 Adjust.
11912 (mark_lwp_dead): New.
11913 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11914 stopping all threads, mark its main lwp as dead.
11915 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11916 ptids.
11917 (fetch_register, usr_store_inferior_registers)
11918 (regsets_fetch_inferior_registers)
11919 (regsets_store_inferior_registers, linux_read_memory)
11920 (linux_write_memory): Inline `inferior_pid'.
11921 (linux_look_up_symbols): Adjust to use per-process
11922 `thread_db_active'.
11923 (linux_request_interrupt): Adjust to use ptids.
11924 (linux_read_auxv): Inline `inferior_pid'.
11925 (initialize_low): Don't reference thread_db_active.
11926 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11927 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11928 (ps_getpid): Return the pid of the current inferior.
11929 * thread-db.c (proc_handle, thread_agent): Delete.
11930 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11931 per-process data.
11932 (find_one_thread): Change argument type to ptid_t. Adjust to
11933 per-process data.
11934 (maybe_attach_thread): Adjust to per-process data and ptids.
11935 (thread_db_find_new_threads): Ditto.
11936 (thread_db_init): Ditto.
11937 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11938 processes table. Adjust to use ptids.
11939 (spu_kill, spu_detach): Adjust interface. Remove process from
11940 processes table.
11941 (spu_join, spu_thread_alive): Adjust interface.
11942 (spu_wait): Adjust interface. Remove process from processes
11943 table. Adjust to use ptids.
11944 * win32-low.c (current_inferior_tid): Delete.
11945 (current_inferior_ptid): New.
11946 (debug_event_ptid): New.
11947 (thread_rec): Take a ptid. Adjust.
11948 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11949 (child_delete_thread): Ditto.
11950 (do_initial_child_stuff): Add `attached' argument. Add process to
11951 processes table.
11952 (child_fetch_inferior_registers, child_store_inferior_registers):
11953 Adjust.
11954 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11955 (win32_attach): Pass 1 to do_initial_child_stuff.
11956 (win32_kill): Adjust interface. Remove process from processes
11957 table.
11958 (win32_detach): Ditto.
11959 (win32_join): Adjust interface.
11960 (win32_thread_alive): Take a ptid.
11961 (win32_resume): Adjust to use ptids.
11962 (get_child_debug_event): Ditto.
11963 (win32_wait): Adjust interface. Remove exiting process from
11964 processes table.
11965
11966 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11967
11968 Non-stop mode support.
11969
11970 * server.h (non_stop): Declare.
11971 (gdb_client_data, handler_func): Declare.
11972 (delete_file_handler, add_file_handler, start_event_loop):
11973 Declare.
11974 (handle_serial_event, handle_target_event, push_event)
11975 (putpkt_notif): Declare.
11976 * target.h (enum resume_kind): New.
11977 (struct thread_resume): Replace `step' field by `kind' field.
11978 (TARGET_WNOHANG): Define.
11979 (struct target_ops) <wait>: Add `options' argument.
11980 <supports_non_stop, async, start_non_stop>: New fields.
11981 (target_supports_non_stop, target_async): New.
11982 (start_non_stop): Declare.
11983 (mywait): Add `options' argument.
11984 * target.c (mywait): Add `options' argument. Print child exit
11985 notifications here.
11986 (start_non_stop): New.
11987 * server.c (non_stop, own_buf, mem_buf): New globals.
11988 (struct vstop_notif): New.
11989 (notif_queue): New global.
11990 (queue_stop_reply, push_event, discard_queued_stop_replies)
11991 (send_next_stop_reply): New.
11992 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11993 interface changes.
11994 (attach_inferior): In non-stop mode, don't wait for the target
11995 here.
11996 (handle_general_set): Handle QNonStop.
11997 (handle_query): When handling qC, return the current general
11998 thread, instead of the first thread of the list.
11999 (handle_query): If the backend supports non-stop mode, include
12000 QNonStop+ in the qSupported query response.
12001 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12002 and non-stop mode.
12003 (handle_v_attach, handle_v_run): Handle non-stop mode.
12004 (handle_v_stopped): New.
12005 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12006 (myresume): Adjust to use resume_kind. Handle non-stop.
12007 (queue_stop_reply_callback): New.
12008 (handle_status): Handle non-stop mode.
12009 (main): Clear non_stop flag on reconnection. Use the event-loop.
12010 Refactor serial protocol handling from here ...
12011 (process_serial_event): ... to this new function. When GDB
12012 selects any thread, select one here. In non-stop mode, wait until
12013 GDB acks all pending events before exiting.
12014 (handle_serial_event, handle_target_event): New.
12015 * remote-utils.c (remote_open): Install remote_desc in the event
12016 loop.
12017 (remote_close): Remove remote_desc from the event loop.
12018 (putpkt_binary): Rename to...
12019 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12020 (putpkt_binary): New as wrapper around putpkt_binary_1.
12021 (putpkt_notif): New.
12022 (prepare_resume_reply): In non-stop mode, don't change the
12023 general_thread.
12024 * event-loop.c: New.
12025 * Makefile.in (OBJ): Add event-loop.o.
12026 (event-loop.o): New rule.
12027
12028 * linux-low.h (pid_of): Moved here.
12029 (lwpid_of): New.
12030 (get_lwp_thread): Use lwpid_of.
12031 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12032 * linux-low.c (pid_of): Delete.
12033 (inferior_pid): Use lwpid_of.
12034 (linux_event_pipe): New.
12035 (target_is_async_p): New.
12036 (delete_lwp): New.
12037 (handle_extended_wait): Use lwpid_of.
12038 (add_lwp): Don't set lwpid field.
12039 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12040 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12041 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12042 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12043 first. Adjust to linux_wait_for_event interface changes. Use
12044 lwpid_of.
12045 (linux_detach): Don't delete the main lwp here.
12046 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12047 (status_pending_p): Don't consider explicitly suspended lwps.
12048 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12049 pointer. Add OPTIONS argument. Change return type to int. Use
12050 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12051 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12052 pointer. Add status pointer argument. Return a pid instead of a
12053 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12054 changes. In non-stop mode, don't switch to a random thread.
12055 (linux_wait): Rename to...
12056 (linux_wait_1): ... this. Add target_options argument, and handle
12057 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12058 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12059 clean exit and signal exit code. Don't stop all threads in
12060 non-stop mode. In all-stop mode, only stop all threads when
12061 reporting a stop to GDB. Handle explicit thread stop requests.
12062 (async_file_flush, async_file_mark): New.
12063 (linux_wait): New.
12064 (send_sigstop): Use lwpid_of.
12065 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12066 interface changes. In non-stop mode, don't switch to a random
12067 thread.
12068 (linux_resume_one_lwp): Use lwpid_of.
12069 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12070 (linux_resume_one_thread): ... this. Handle resume_stop. In
12071 non-stop mode, don't look for pending flag in all threads.
12072 (resume_status_pending_p): Don't consider explicitly suspended
12073 threads.
12074 (my_waitpid): Reimplement. Emulate __WALL.
12075 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12076 Use lwpid_of.
12077 (sigchld_handler, linux_supports_non_stop, linux_async)
12078 (linux_start_non_stop): New.
12079 (linux_target_ops): Register linux_supports_non_stop, linux_async
12080 and linux_start_non_stop.
12081 (initialize_low): Install SIGCHLD handler.
12082 * thread-db.c (thread_db_create_event, find_one_thread)
12083 (thread_db_get_tls_address): Use lwpid_of.
12084 * win32-low.c (win32_detach): Adjust to use resume_kind.
12085 (win32_wait): Add `options' argument.
12086 * spu-low.c (spu_resume): Adjust to use resume_kind.
12087 (spu_wait): Add `options' argument.
12088
12089 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12090
12091 Decouple target code from remote protocol.
12092
12093 * target.h (enum target_waitkind): New.
12094 (struct target_waitstatus): New.
12095 (struct target_ops) <wait>: Return an unsigned long. Take a
12096 target_waitstatus pointer instead of a char pointer.
12097 (mywait): Likewise.
12098 * target.c (mywait): Change prototype to return an unsigned long.
12099 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12100 * server.h (thread_from_wait, old_thread_from_wait): Delete
12101 declarations.
12102 (prepare_resume_reply): Change prototype to take a
12103 target_waitstatus.
12104 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12105 (last_status, last_ptid): New.
12106 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12107 pid instead of a signal.
12108 (attach_inferior): Remove "status" and "signal" parameters.
12109 Adjust.
12110 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12111 not as an address.
12112 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12113 (handle_v_requests, myresume): Remove "status" and "signal"
12114 parameters. Adjust.
12115 (handle_status): New.
12116 (main): Delete local `status'. Adjust.
12117 * remote-utils.c: Include target.h.
12118 (prepare_resume_reply): Change prototype to take a
12119 target_waitstatus. Adjust.
12120
12121 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12122 interface.
12123 * spu-low.c (spu_wait): Adjust.
12124 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12125 Delete.
12126 (win32_wait): Adjust.
12127
12128 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12129
12130 * target.h (struct thread_resume): Delete leave_stopped member.
12131 (struct target_ops): Add a `n' argument to the `resume' callback.
12132 * server.c (start_inferior): Adjust.
12133 (handle_v_cont, myresume): Adjust.
12134 * linux-low.c (check_removed_breakpoint): Adjust to resume
12135 interface change, and to removed leave_stopped field.
12136 (resume_ptr): Delete.
12137 (struct thread_resume_array): New.
12138 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12139 resume interface change.
12140 (linux_continue_one_thread, linux_queue_one_thread)
12141 (resume_status_pending_p): Check if the resume field is NULL
12142 instead of checking the leave_stopped member.
12143 (linux_resume): Adjust to the target resume interface change.
12144 * spu-low.c (spu_resume): Adjust to the target resume interface
12145 change.
12146 * win32-low.c (win32_detach, win32_resume): Ditto.
12147
12148 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12149
12150 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12151 flag.
12152 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12153 pending.
12154 (linux_continue_one_thread): Only preserve the stepping flag if
12155 there's a pending breakpoint.
12156
12157 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12158
12159 * server.c (main): After the inferior having exited, call
12160 remote_close before exiting gdbserver.
12161
12162 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12163
12164 Fix size of FPSCR in Power 7 processors.
12165 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12166 (PPC_FEATURE_HAS_DFP): New #define.
12167 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12168 size of the FPSCR.
12169
12170 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12171
12172 * server.c (handle_query) Whitespace and formatting.
12173
12174 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12175
12176 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12177 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12178 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12179 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12180 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12181 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12182 Makefile.in, configure.ac: Fix whitespace throughout.
12183 * configure: Regenerate.
12184
12185 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12186
12187 * inferiors.c (find_inferior): Make it safe for the callback
12188 function to delete the currently iterated inferior.
12189
12190 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12191
12192 * Makefile.in (linuw_low_h): Move higher.
12193 (thread-db.o): Depend on $(linux_low_h).
12194
12195 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12196
12197 Rename "process" to "lwp" throughout.
12198
12199 * linux-low.c (all_processes): Rename to...
12200 (all_lwps): ... this.
12201 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12202 (add_process): Rename to ...
12203 (add_lwp): ... this. Adjust.
12204 (linux_create_inferior): Adjust.
12205 (linux_attach_lwp): Adjust.
12206 (linux_attach): Adjust.
12207 (linux_kill_one_process): Rename to ...
12208 (linux_kill_one_lwp): ... this. Adjust.
12209 (linux_kill): Adjust.
12210 (linux_detach_one_process): Rename to ...
12211 (linux_detach_one_lwp): ... this. Adjust.
12212 (linux_detach): Adjust.
12213 (check_removed_breakpoint): Adjust.
12214 (status_pending_p): Adjust.
12215 (linux_wait_for_process): Rename to ...
12216 (linux_wait_for_lwp): ... this. Adjust.
12217 (linux_wait_for_event): Adjust.
12218 (send_sigstop): Adjust.
12219 (wait_for_sigstop): Adjust.
12220 (stop_all_processes): Rename to ...
12221 (stop_all_lwps): ... this.
12222 (linux_resume_one_process): Rename to ...
12223 (linux_resume_one_lwp): ... this. Adjust.
12224 (linux_set_resume_request, linux_continue_one_thread)
12225 (linux_queue_one_thread, resume_status_pending_p)
12226 (usr_store_inferior_registers, regsets_store_inferior_registers)
12227 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12228 Adjust.
12229 * linux-low.h (get_process): Rename to ...
12230 (get_lwp): ... this. Adjust.
12231 (get_thread_process): Rename to ...
12232 (get_thread_lwp): ... this. Adjust.
12233 (get_process_thread): Rename to ...
12234 (get_lwp_thread): ... this. Adjust.
12235 (struct process_info): Rename to ...
12236 (struct lwp_info): ... this.
12237 (all_processes): Rename to ...
12238 (all_lwps): ... this.
12239 * proc-service.c (ps_lgetregs): Adjust.
12240 * thread-db.c (thread_db_create_event, find_one_thread)
12241 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12242
12243 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12244
12245 * server.c (handle_query): Handle "qAttached".
12246
12247 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12248
12249 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12250 GPLv3, update license URL.
12251
12252 2009-03-01 Doug Evans <dje@google.com>
12253
12254 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12255 (server_h): Add gdb_signals.h.
12256 (signals.o): Update.
12257 * server.h (target_signal_from_host,target_signal_to_host_p)
12258 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12259
12260 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12261
12262 * remote-utils.c (getpkt): Also generate remote-debug
12263 information if noack_mode is set.
12264
12265 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12266
12267 * server.c (handle_query): Report qXfer:siginfo:read and
12268 qXfer:siginfo:write as supported and handle them.
12269 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12270 * linux-low.c (linux_xfer_siginfo): New.
12271 (linux_target_ops): Set it.
12272
12273 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12274
12275 * server.c (gdbserver_usage): Mention --remote-debug.
12276 (main): Accept '--remote-debug' switch.
12277
12278 2009-01-18 Doug Evans <dje@google.com>
12279
12280 * regcache.c (new_register_cache): No need to check result of xcalloc.
12281 * server.c (handle_search_memory): Back out calls to xmalloc,
12282 result is checked and error is returned to user upon failure.
12283 (handle_query): Ditto. Add more checks for result of malloc.
12284 (handle_v_cont): Check result of malloc, report error back to
12285 user upon failure.
12286 (handle_v_run): Ditto. Call freeargv.
12287 * server.h (freeargv): Declare.
12288 * utils.c (freeargv): New fn.
12289
12290 2009-01-15 Doug Evans <dje@google.com>
12291
12292 * gdbreplay.c (perror_with_name): Make arg const char *.
12293 * server.h (target_signal_to_name): Make return type const char *.
12294 * thread-db.c (thread_db_err_str): Make return type const char *.
12295 * utils.c (perror_with_name): Make arg const char *.
12296
12297 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12298
12299 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12300 when handling a EXIT_PROCESS_DEBUG_EVENT.
12301
12302 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12303
12304 * gdbreplay.c (gdbreplay_version): Update copyright year.
12305 * server.c (gdbserver_version): Likewise.
12306
12307 2009-01-05 Doug Evans <dje@google.com>
12308
12309 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12310 (handle_extended_wait): Improve comment.
12311
12312 2008-12-13 Doug Evans <dje@google.com>
12313
12314 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12315 * server.h (ATTR_MALLOC): New macro.
12316 (xmalloc,xcalloc,xstrdup): Declare.
12317 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12318 * inferiors.c: Ditto.
12319 * linux-low.c: Ditto.
12320 * mem-break.c: Ditto.
12321 * regcache.c: Ditto.
12322 * remote-utils.c: Ditto.
12323 * server.c: Ditto.
12324 * target.c: Ditto.
12325 * win32-low.c: Ditto.
12326
12327 2008-12-12 Doug Evans <dje@google.com>
12328
12329 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12330 in debugging printf.
12331
12332 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12333
12334 2008-12-09 Doug Evans <dje@google.com>
12335
12336 * linux-low.h (struct process_info): Delete member tid, unused.
12337 * thread-db.c (find_one_thread): Update.
12338 (maybe_attach_thread): Update.
12339
12340 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12341
12342 * target.h (struct target_ops): Add qxfer_osdata member.
12343 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12344 and dirent.h.
12345 (linux_qxfer_osdata): New functions.
12346 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12347 callback.
12348 * server.c (handle_query): Handle "qXfer:osdata:read:".
12349 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12350 (buffer_xml_printf): New functions.
12351 * server.h (struct buffer): New.
12352 (buffer_grow_str, buffer_grow_str0): New macros.
12353 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12354 (buffer_xml_printf): Declare.
12355
12356 2008-11-24 Doug Evans <dje@google.com>
12357
12358 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12359
12360 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * server.c (handle_v_run): Always use the supplied argument list.
12363
12364 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12365
12366 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12367 (xtensa_regmap_table): Add entry for scompare1.
12368
12369 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12370
12371 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12372 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12373 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12374 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12375 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12376 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12377 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12378 XML target descriptions.
12379 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12380 when inferior is running on an ISA 2.05 or later processor. Add
12381 special case to return offset for full 64-bit slot of FPSCR when
12382 in 32-bits.
12383
12384 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12385
12386 * Makefile.in (SFILES, clean): Added sparc64 files.
12387 (reg-sparc64.o, reg-sparc64.c): New.
12388 * configure.srv (sparc*-*-linux*): New configuration.
12389 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12390 syscall arguments for SPARC.
12391 (regsets_store_inferior_registers): Likewise.
12392 * linux-sparc-low.c: New file.
12393
12394 2008-10-21 Doug Evans <dje@google.com>
12395
12396 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12397 (READLINE_DIR,READLINE_DEP): Delete.
12398 (INTERNAL_CFLAGS): Update.
12399 (LINTFLAGS): Update.
12400
12401 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12402
12403 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12404 whole argv from the last run, not just argv[0].
12405
12406 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12407
12408 * regcache.c (new_register_cache): Return NULL if the register
12409 cache size isn't known yet.
12410 (free_register_cache): Avoid dereferencing a NULL regcache.
12411
12412 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12413
12414 * configure.srv: Merge MIPS and MIPS64.
12415
12416 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12417
12418 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12419
12420 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12421
12422 * Makefile.in: Add required vsx dependencies.
12423
12424 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12425 Declare init_registers_powerpc_vsx32l.
12426 Declare init_registers_powerpc_vsx64l.
12427 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12428 (ppc_arch_setup): Check for VSX in hwcap.
12429 (ppc_fill_vsxregset): New function.
12430 (ppc_store_vsxregset): New function.
12431 Add new VSX entry in regset_info target_regsets.
12432
12433 * configure.srv: Add new VSX dependencies.
12434
12435 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12436
12437 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12438 (remote_open): Set or clear transport_is_reliable.
12439 (putpkt_binary): Don't expect acks in noack mode.
12440 (getpkt): Don't send ack/nac in noack mode.
12441 * server.c (handle_general_set): Handle QStartNoAckMode.
12442 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12443 qSupported.
12444 (main): Reset noack_mode on every connection.
12445 * server.h (noack_mode): Declare.
12446
12447 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12448
12449 * Makefile.in (GDBREPLAY_OBS): New variable.
12450 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12451
12452 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12453 Daniel Jacobowitz <dan@codesourcery.com>
12454
12455 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12456 (usr_store_inferior_registers): Likewise.
12457 (regsets_store_inferior_registers): Likewise.
12458
12459 2008-07-31 Rolf Jansen <rj@surtec.com>
12460 Pedro Alves <pedro@codesourcery.com>
12461
12462 * configure.ac: Check for memmem declaration.
12463 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12464 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12465 (disable_packet_qfThreadInfo): Unconditionally compile.
12466 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12467 * configure, config.in: Regenerate.
12468
12469 2008-07-28 Doug Kwan <dougkwan@google.com>
12470
12471 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12472 (linux_write_memory): Remove declaration of errno.
12473
12474 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12475
12476 * linux-low.c (handle_extended_wait): Do not use "status"
12477 variable uninitialized.
12478
12479 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12480
12481 * server.c (handle_v_attach): Inhibit reporting dll changes.
12482
12483 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12484
12485 * remote-utils.c (prepare_resume_reply): If requested, don't
12486 output "thread:TID" in the T stop reply.
12487
12488 * server.c (disable_packet_vCont, disable_packet_Tthread)
12489 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12490 (handle_query): If requested, disable support for qC, qfThreadInfo
12491 and qsThreadInfo.
12492 (handle_v_requests): If requested, disable support for vCont.
12493 (gdbserver_show_disableable): New.
12494 (main): Handle --disable-packet and --disable-packet=LIST.
12495
12496 * server.h (disable_packet_vCont, disable_packet_Tthread)
12497 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12498
12499 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12500
12501 * server.c (gdbserver_usage): Mention --version.
12502
12503 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12504
12505 * Makefile.in (gdbreplay.o): New rule.
12506
12507 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12508
12509 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12510 message, not gdbserver.
12511
12512 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12513 Nathan Sidwell <nathan@codesourcery.com>
12514 Joseph Myers <joseph@codesourcery.com>
12515
12516 * acinclude.m4: Include ../../config/acx.m4.
12517 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12518 * configure, config.in: Regenerate.
12519 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12520 * server.c (gdbserver_version): Print PKGVERSION.
12521 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12522 (main): Adjust gdbserver_usage calls.
12523 * gdbreplay.c (version, host_name): Add declarations.
12524 (gdbreplay_version, gdbreplay_usage): New.
12525 (main): Accept --version and --help options.
12526
12527 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12528
12529 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12530 (arm_breakpoint_at): Handle Thumb.
12531 (the_low_target): Add comment.
12532
12533 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12534
12535 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12536
12537 2008-05-09 Doug Evans <dje@google.com>
12538
12539 * server.h (decode_search_memory_packet): Declare.
12540 * remote-utils.c (decode_search_memory_packet): New fn.
12541 * server.c (handle_search_memory_1): New fn.
12542 (handle_search_memory): New fn.
12543 (handle_query): Process qSearch:memory packets.
12544
12545 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12546
12547 * regcache.c (registers_length): Remove.
12548 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12549 full register packet.
12550 * regcache.h (registers_length): Remove prototype.
12551 * server.h (PBUFSIZ): Define to 16384.
12552
12553 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12554
12555 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12556 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12557 powerpc-64l.o, and powerpc-altivec64l.o.
12558 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12559 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12560 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12561 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12562 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12563 to srv_xmlfiles.
12564
12565 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12566 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12567 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12568 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12569 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12570 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12571 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12572 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12573 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12574 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12575 (clean): Update.
12576
12577 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12578 (init_registers_powerpc_32l): ... this new prototype.
12579 (init_registers_powerpc_32): Remove, replace by ...
12580 (init_registers_powerpc_altivec32l): ... this new prototype.
12581 (init_registers_powerpc_e500): Remove, replace by ...
12582 (init_registers_powerpc_e500l): ... this new prototype.
12583 (init_registers_ppc64): Remove, replace by ...
12584 (init_registers_powerpc_64l): ... this new prototype.
12585 (init_registers_powerpc_64): Remove, replace by ...
12586 (init_registers_powerpc_altivec64l): ... this new prototype.
12587 (ppc_num_regs): Set to 73.
12588 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12589 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12590 (ppc_cannot_store_register): Handle orig_r3 and trap.
12591 (ppc_arch_setup): Update init_registers_... calls.
12592 (ppc_fill_gregset): Handle orig_r3 and trap.
12593
12594 * inferiors.c (clear_inferiors): Reset current_inferior.
12595
12596 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12597
12598 * acinclude.m4: Add override.m4.
12599 * configure: Regenerate.
12600
12601 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12602
12603 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12604 initial call to init_register_ppc64.
12605
12606 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12607
12608 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12609 single powerpc*-*-linux* case.
12610 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12611
12612 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12613
12614 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12615 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12616 from reg_xmlfiles.
12617 * linux-ppc-low.c: Include <elf.h>.
12618 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12619 (ppc_hwcap): New global variable.
12620 (ppc_regmap): Remove __SPE__ #ifdef sections.
12621 (ppc_regmap_e500): New global variable.
12622 (ppc_cannot_store_register): Update __SPE__ special case.
12623 (ppc_get_hwcap): New function.
12624 (ppc_arch_setup): Use it to determine whether inferior supports
12625 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12626 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12627 Do not access registers if target does not support AltiVec.
12628 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12629 Do not access registers if target does not support SPE.
12630 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12631
12632 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12633
12634 * linux-low.c (disabled_regsets, num_regsets): New.
12635 (use_regsets_p): Delete.
12636 (linux_wait_for_process): Clear disabled_regsets.
12637 (regsets_fetch_inferior_registers): Check and set it.
12638 (regsets_store_inferior_registers): Likewise.
12639 (linux_fetch_registers, linux_store_registers): Do not use
12640 use_regsets_p.
12641 (initialize_low): Allocate disabled_regsets.
12642
12643 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12644
12645 * Makefile.in (LIBOBJS): New.
12646 (OBS): Use LIBOBJS.
12647 (memmem.o): New rule.
12648 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12649 * configure: Regenerated.
12650
12651 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12652
12653 * server.c (handle_query): Never return "unsupported" for
12654 qXfer:features:read queries.
12655
12656 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12657
12658 * server.c (get_features_xml): Fix inverted condition.
12659 (handle_query): Always support qXfer:feature:read.
12660
12661 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12662
12663 * server.c (wrapper_argv): New.
12664 (start_inferior): Handle wrapper_argv. If set, expect an extra
12665 trap.
12666 (gdbserver_usage): Document --wrapper.
12667 (main): Parse --wrapper.
12668
12669 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12670
12671 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12672 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12673 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12674 (ppc_set_pc): Likewise.
12675 (ppc_arch_setup): New function.
12676 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12677 of collect_register.
12678 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12679
12680 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12681
12682 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12683 instead of linux-ppc64-low.o.
12684 * linux-ppc64-low.c: Remove file.
12685 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12686 (linux-ppc64-low.o): Remove rule.
12687
12688 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12689 (init_registers_powerpc_64): Likewise.
12690 (ppc_regmap): Conditionally define depending on __powerpc64__.
12691 (ppc_cannot_store_register): Do not special-case "fpscr" when
12692 compiled on __powerpc64__.
12693 (ppc_collect_ptrace_register): New function.
12694 (ppc_supply_ptrace_register): New function.
12695 (ppc_breakpoint): Change type to "unsigned int".
12696 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12697 (the_low_target): Conditionally provide initializers for the
12698 arch_setup member depending on __powerpc64__. Install
12699 collect_ptrace_register and supply_ptrace_register members.
12700
12701 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12702
12703 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12704 * server.c (gdbserver_xmltarget): Define.
12705 (get_features_xml): Use it to replace "target.xml" and arch_string.
12706
12707 * configure.srv: Remove srv_xmltarget. Add XML files that were
12708 mentioned there to srv_xmlfiles instead. Remove conditional tests
12709 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12710 srv_xmlfiles and srv_regobj to include all possible choices.
12711 * configure.ac (srv_xmltarget): Remove.
12712 (srv_xmlfiles): Do not add "target.xml".
12713 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12714 checks for supplementary target information.
12715 * configure: Regenerate.
12716 * Makefile.in (XML_TARGET): Remove.
12717 (target.xml): Remove rule.
12718 (clean): Do not clean up target.xml.
12719 (.PRECIOUS): Do not mention target.xml.
12720
12721 * target.h (struct target_ops): Remove arch_string member.
12722 * linux-low.c (linux_arch_string): Remove.
12723 (linux_target_ops): Remove arch_string initializer.
12724 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12725 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12726 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12727 * spu-low.c (spu_arch_string): Remove.
12728 (spu_target_ops): Remove arch_string initializer.
12729 * win32-low.c (win32_arch_string): Remove.
12730 (win32_target_ops): Remove arch_string initializer.
12731 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12732 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12733 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12734
12735 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12736
12737 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12738 by collect_ptrace_register and supply_ptrace_register hooks.
12739 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12740 instead of checking for the_low_target.left_pad_xfer.
12741 (usr_store_inferior_registers): Use collect_ptrace_register callback
12742 instead of checking for the_low_target.left_pad_xfer.
12743
12744 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12745 (s390_supply_ptrace_register): Likewise.
12746 (s390_fill_gregset): Call s390_collect_ptrace_register.
12747 (the_low_target): Update.
12748
12749 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12750 (ppc_supply_ptrace_register): Likewise.
12751 (the_low_target): Update.
12752
12753 * linux-i386-low.c (the_low_target): Update.
12754 * linux-x86-64-low.c (the_low_target): Update.
12755
12756 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12757
12758 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12759 reg-s390.o and reg-s390x.o.
12760
12761 * linux-low.c (new_inferior): New global variable.
12762 (linux_create_inferior, linux_attach): Set it.
12763 (linux_wait_for_process): Call the_low_target.arch_setup after the
12764 target has stopped for the first time.
12765 (initialize_low): Do not call the_low_target.arch_setup.
12766
12767 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12768 (s390_set_pc): Likewise.
12769 (s390_arch_setup): New function.
12770 (the_low_target): Use s390_arch_setup as arch_setup routine.
12771
12772 * regcache.c (realloc_register_cache): New function.
12773 (set_register_cache): Call it for each existing regcache.
12774
12775 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12776
12777 * server.h (init_registers): Remove prototype.
12778
12779 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12780 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12781 instead of init_registers ().
12782 * linux-arm-low.c (init_registers_arm): Add prototype.
12783 (init_registers_arm_with_iwmmxt): Likewise.
12784 (the_low_target): Add initializer for arch_setup field.
12785 * linux-cris-low.c (init_registers_cris): Add prototype.
12786 (the_low_target): Add initializer for arch_setup field.
12787 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12788 (the_low_target): Add initializer for arch_setup field.
12789 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12790 (the_low_target): Add initializer for arch_setup field.
12791 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12792 (the_low_target): Add initializer for arch_setup field.
12793 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12794 (the_low_target): Add initializer for arch_setup field.
12795 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12796 (the_low_target): Add initializer for arch_setup field.
12797 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12798 (init_registers_mips64_linux): Likewise.
12799 (the_low_target): Add initializer for arch_setup field.
12800 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12801 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12802 (the_low_target): Add initializer for arch_setup field.
12803 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12804 (init_registers_powerpc_64): Likewise.
12805 (the_low_target): Add initializer for arch_setup field.
12806 * linux-s390-low.c (init_registers_s390): Add prototype.
12807 (init_registers_s390x): Likewise.
12808 (the_low_target): Add initializer for arch_setup field.
12809 * linux-sh-low.c (init_registers_sh): Add prototype.
12810 (the_low_target): Add initializer for arch_setup field.
12811 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12812 (the_low_target): Add initializer for arch_setup field.
12813 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12814 (the_low_target): Add initializer for arch_setup field.
12815
12816 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12817 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12818 instead of init_registers ().
12819 * win32-arm-low.c (init_registers_arm): Add prototype.
12820 (the_low_target): Add initializer for arch_setup field.
12821 * win32-i386-low.c (init_registers_i386): Add prototype.
12822 (the_low_target): Add initializer for arch_setup field.
12823
12824 * spu-low.c (init_registers_spu): Add prototype.
12825 (initialize_low): Call initialie_registers_spu () instead of
12826 initialize_registers ().
12827
12828 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12829
12830 * server.c (handle_v_requests): When handling the vRun and vAttach
12831 packets, if already debugging a process, don't kill it. Return an
12832 error instead.
12833
12834 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12835
12836 * server.c (handle_query): Correct length check.
12837
12838 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12839
12840 * win32-low.c (do_initial_child_stuff): Add process handle
12841 parameter. Set current_process_handle and current_process_id from the
12842 parameters. Clear globals.
12843 (win32_create_inferior): Don't set current_process_handle and
12844 current_process_id here. Instead pass them on the call to
12845 do_initial_child_stuff.
12846 (win32_attach): Likewise.
12847 (win32_clear_inferiors): New.
12848 (win32_kill): Don't close the current process handle or the
12849 current thread handle here. Instead call win32_clear_inferiors.
12850 (win32_detach): Don't open a new handle to the process. Call
12851 win32_clear_inferiors.
12852 (win32_join): Don't rely on current_process_handle; open a new
12853 handle using the process id.
12854 (win32_wait): Call win32_clear_inferiors when the inferior process
12855 has exited.
12856
12857 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12858
12859 * server.c (monitor_show_help): Add "exit".
12860
12861 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12862
12863 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12864 (clean): Add reg-xtensa.c.
12865 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12866 * configure.srv (xtensa*-*-linux*) New target.
12867 * linux-xtensa-low.c: New.
12868 * xtensa-xtregs.c: New.
12869
12870 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12871
12872 * hostio.c: Don't include errno.h.
12873 (errno_to_fileio_errno): Move to hostio-errno.
12874 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12875 error number outputting to the target->hostio_last_error callback.
12876 (hostio_packet_error): Use FILEIO_EINVAL directly.
12877 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12878 calls to hostio_error.
12879 * hostio-errno.c: New.
12880 * server.h (hostio_last_error_from_errno): Declare.
12881 * target.h (target_ops): Add hostio_last_error member.
12882 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12883 as hostio_last_error handler.
12884 * spu-low.c (spu_target_ops): Likewise.
12885 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12886 (wince_hostio_last_error): New functions.
12887 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12888 as hostio_last_error handler.
12889 (win32_target_ops) [!_WIN32_WCE]: Register
12890 hostio_last_error_from_errno as hostio_last_error handler.
12891 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12892 (hostio-errno.o): New rule.
12893 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12894 * configure.srv (srv_hostio_err_objs): New variable. Default to
12895 hostio-errno.o.
12896 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12897 * configure: Regenerate.
12898
12899 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12900
12901 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12902 (linux_kill, linux_detach): Clean up the process list.
12903 * remote-utils.c (remote_open): Improve port number parsing.
12904 (putpkt_binary, input_interrupt): Only send interrupts if the target
12905 is running.
12906 * server.c (extended_protocol): Make static.
12907 (attached): Define earlier.
12908 (exit_requested, response_needed, program_argv): New variables.
12909 (target_running): New.
12910 (start_inferior): Clear attached here.
12911 (attach_inferior): Set attached here.
12912 (require_running): Define.
12913 (handle_query): Use require_running and target_running. Implement
12914 "monitor exit".
12915 (handle_v_attach, handle_v_run): New.
12916 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12917 (gdbserver_usage): Update.
12918 (main): Redo argument parsing. Handle --debug and --multi. Handle
12919 --attach along with other options or after the port. Save
12920 program_argv. Support no initial program. Resynchronize
12921 communication with GDB after an error. Handle "monitor exit".
12922 Use require_running and target_running. Always allow the extended
12923 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12924 restart in extended mode.
12925 * README: Refer to the GDB manual. Update --attach usage.
12926
12927 2007-12-20 Andreas Schwab <schwab@suse.de>
12928
12929 * linux-low.c (STACK_SIZE): Define.
12930 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12931 (linux_test_for_tracefork): Likewise.
12932
12933 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * linux-low.c (linux_wait_for_event): Update messages. Do not
12936 reinsert auto-delete breakpoints.
12937 * mem-break.c (struct breakpoint): Change return type of handler to
12938 int.
12939 (set_breakpoint_at): Update handler type.
12940 (reinsert_breakpoint_handler): Return 1 instead of calling
12941 delete_breakpoint.
12942 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12943 setting a new one.
12944 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12945 * mem-break.h (set_breakpoint_at): Update handler type.
12946 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12947 * win32-low.c (auto_delete_breakpoint): New.
12948 (get_child_debug_event): Use it.
12949
12950 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12951
12952 * configure.ac: Check for pread and pwrite.
12953 * hostio.c (handle_pread): Fall back to lseek and read.
12954 (handle_pwrite): Fall back to lseek and write.
12955 * config.in, configure: Regenerated.
12956
12957 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12958
12959 * server.c (myresume): Add own_buf argument.
12960 (main): Update calls.
12961
12962 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12963
12964 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12965 * remote-utils.c (remote_open): Do not call disable_async_io.
12966 (block_async_io): Delete.
12967 (unblock_async_io): Make static.
12968 (initialize_async_io): New.
12969 * server.c (handle_v_cont): Handle async I/O here.
12970 (myresume): Likewise. Move other common resume tasks here...
12971 (main): ... from here. Call initialize_async_io. Disable async
12972 I/O before the main loop.
12973 * server.h (initialize_async_io): Declare.
12974 (block_async_io, unblock_async_io): Delete prototypes.
12975 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12976
12977 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12978
12979 * remote-utils.c (readchar): Allow binary data in received messages.
12980
12981 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12982
12983 * win32-low.c (attaching): New global.
12984 (win32_create_inferior): Clear the `attaching' global.
12985 (win32_attach): Set the `attaching' global.
12986 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12987 attaching. Only set a breakpoint at the entry point if not
12988 attaching.
12989
12990 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12991
12992 * server.c (main): Don't report dll events on the initial
12993 connection on attaches.
12994
12995 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12996
12997 * server.c (main): Relax numerical bases supported for the pid of
12998 the --attach command line argument.
12999
13000 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13001
13002 * win32-low.c (win32_attach): Call OpenProcess before
13003 DebugActiveProcess, not after. Add last error output to error
13004 call.
13005
13006 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13007
13008 * win32-low.c (win32_get_thread_context)
13009 (win32_set_thread_context): New functions.
13010 (thread_rec): Use win32_get_thread_context.
13011 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13012 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13013 field.
13014
13015 2007-12-03 Leo Zayas
13016 Pedro Alves <pedro_alves@portugalmail.pt>
13017
13018 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13019 global variables.
13020 (child_add_thread): Minor cleanup.
13021 (child_continue): Resume artificially suspended threads before
13022 calling ContinueDebugEvent.
13023 (suspend_one_thread): New.
13024 (fake_breakpoint_event): New.
13025 (get_child_debug_event): Change return type to int. Check here if
13026 gdb sent an interrupt request. If a soft interrupt was requested,
13027 fake a breakpoint event. Return 0 if there is no event to handle,
13028 and 1 otherwise.
13029 (win32_wait): Don't check here if gdb sent an interrupt request.
13030 Ensure there is a valid event to handle.
13031 (win32_request_interrupt): Add soft interruption method as last
13032 resort.
13033
13034 2007-12-03 Leo Zayas
13035 Pedro Alves <pedro_alves@portugalmail.pt>
13036
13037 * win32-low.h (win32_thread_info): Add descriptions to the
13038 structure members. Replace `suspend_count' counter by a
13039 `suspended' flag.
13040 * win32-low.c (thread_rec): Update condition of when to get the
13041 context from the inferior. Rely on ContextFlags being set if it
13042 has already been retrieved. Only suspend the inferior thread if
13043 we haven't already. Warn if that fails.
13044 (continue_one_thread): s/suspend_count/suspended/. Only call
13045 ResumeThread once. Warn if that fails.
13046
13047 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13048
13049 * win32-low.c (win32_wait): Don't read from the inferior when it
13050 has already exited.
13051
13052 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13053
13054 * Makefile.in (win32_low_h): New variable.
13055 (win32-low.o): Add dependency on $(win32_low_h).
13056 (win32-arm-low.o, win32-i386-low.o): New rules.
13057
13058 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13059
13060 * hostio.c: Correct copyright year.
13061
13062 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13063
13064 * Makefile.in (OBS): Add hostio.o.
13065 (hostio.o): New rule.
13066 * server.h (handle_vFile): Declare.
13067 * hostio.c: New file.
13068 * server.c (handle_v_requests): Take packet_len and new_packet_len
13069 for binary packets. Call handle_vFile.
13070 (main): Update call to handle_v_requests.
13071
13072 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13073
13074 * linux-low.c: Include <sched.h>.
13075
13076 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13077
13078 * linux-low.c (linux_tracefork_grandchild): New.
13079 (linux_tracefork_child): Use clone.
13080 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13081
13082 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13083
13084 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13085
13086 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13087
13088 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13089
13090 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * inferiors.c (change_inferior_id): Delete.
13093 (add_pid_to_list, pull_pid_from_list): New.
13094 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13095 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13096 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13097 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13098 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13099 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13100 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13101 (using_threads): Always set to 1.
13102 (handle_extended_wait): New.
13103 (add_process): Do not set TID.
13104 (linux_create_inferior): Set must_set_ptrace_flags.
13105 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13106 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13107 (linux_thread_alive): Rename TID argument to LWPID.
13108 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13109 (linux_wait_for_event): Do not use TID or check using_threads. Update
13110 call to dead_thread_notify. Call handle_extended_wait.
13111 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13112 (send_sigstop): Delete sigstop_sent.
13113 (wait_for_sigstop): Avoid TID.
13114 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13115 (linux_test_for_tracefork): New.
13116 (linux_lookup_signals): Use thread_db_active and
13117 linux_supports_tracefork_flag.
13118 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13119 * linux-low.h (get_process_thread): Avoid TID.
13120 (struct process_ifo): Move thread_known and tid to the end. Remove
13121 sigstop_sent.
13122 (linux_attach_lwp, thread_db_init): Update prototypes.
13123 * server.h (change_inferior_id): Delete prototype.
13124 (add_pid_to_list, pull_pid_from_list): New prototypes.
13125 * thread-db.c (thread_db_use_events): New.
13126 (find_first_thread): Rename to...
13127 (find_one_thread): ...this. Update callers and messages. Do not
13128 call fatal. Check thread_db_use_events. Do not call
13129 change_inferior_id or new_thread_notify.
13130 (maybe_attach_thread): Update. Do not call new_thread_notify.
13131 (thread_db_init): Set thread_db_use_events. Check use_events.
13132 * utils.c (fatal, warning): Correct message prefix.
13133
13134 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13135
13136 * Makefile.in (clean): Remove new files.
13137 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13138 (powerpc-64.o, powerpc-64.c): New rules.
13139 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13140 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13141 with SPE.
13142 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13143 SPE targets.
13144 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13145 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13146 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13147 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13148 (target_regsets): Add AltiVec and SPE register sets.
13149 * configure.ac: Check for AltiVec and SPE.
13150 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13151 (ppc_fill_vrregset, ppc_store_vrregset): New.
13152 (target_regsets): Add AltiVec register set.
13153 * configure: Regenerated.
13154
13155 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * linux-low.c (O_LARGEFILE): Define.
13158 (linux_read_memory): Use /proc/PID/mem.
13159 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13160 * configure, config.in: Regenerated.
13161
13162 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13163
13164 * linux-low.c (linux_wait_for_event): Do not pass signals while
13165 single-stepping.
13166
13167 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13168
13169 * win32-low.c (create_process): New.
13170 (win32_create_inferior): Use create_process instead of
13171 CreateProcess. If create_process failed retry appending an ".exe"
13172 suffix. Store the GetLastError result immediatelly after
13173 create_process calls and use it on the call to error.
13174
13175 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13176
13177 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13178
13179 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13180
13181 * configure.ac: Switch license to GPLv3.
13182
13183 2007-08-01 Michael Snyder <msnyder@access-company.com>
13184
13185 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13186
13187 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13188
13189 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13190 typedef.
13191 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13192 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13193 CloseToolhelp32Snapshot.
13194 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13195 CloseToolhelp32Snapshot.
13196
13197 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13198
13199 * server.c (main): Check for inferior exit before main loop.
13200
13201 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13202
13203 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13204 instead of on tmp_desc.
13205
13206 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13207 Daniel Jacobowitz <dan@codesourcery.com>
13208
13209 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13210 (add_thread): Minor cleanups.
13211 (clear_inferiors): Move lower in the file. Clear the DLL
13212 list.
13213 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13214 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13215 (xml_escape_text): New.
13216 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13217 for qSupported.
13218 (handle_v_cont): Report errors.
13219 (gdbserver_version): Update.
13220 (main): Correct size of own_buf. Do not report initial DLL events.
13221 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13222 (unloaded_dll, xml_escape_text): New.
13223 * win32-low.c (enum target_waitkind): Update comments.
13224 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13225 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13226 (win32_EnumProcessModules, win32_GetModuleInformation)
13227 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13228 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13229 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13230 (win32_Module32First, win32_Module32Next, load_toolhelp)
13231 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13232 (get_child_debug_event): Handle DLL events.
13233 (win32_wait): Likewise.
13234
13235 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13238 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13239
13240 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13241
13242 * win32-low.c (handle_output_debug_string): Ignore event if not
13243 waiting.
13244
13245 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13246
13247 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13248
13249 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13250
13251 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13252
13253 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13254
13255 * inferiors.c (change_inferior_id): Add comment.
13256 * linux-low.c (check_removed_breakpoint): Add an early
13257 prototype. Improve debug output.
13258 (linux_attach): Doc update.
13259 (linux_detach_one_process, linux_detach): Clean up before releasing
13260 each process.
13261 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13262 * linux-low.h (struct process_info): Doc improvement.
13263 * mem-break.c (delete_all_breakpoints): New.
13264 * mem-break.h (delete_all_breakpoints): New prototype.
13265 * thread-db.c (find_first_thread): New.
13266 (thread_db_create_event): Call it instead of
13267 thread_db_find_new_threads. Clean up unused variables.
13268 (maybe_attach_thread): Remove first thread handling.
13269 (thread_db_find_new_threads): Use find_first_thread.
13270 (thread_db_get_tls_address): Likewise.
13271
13272 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13273
13274 * thread-db.c (thread_db_find_new_threads): Add prototype.
13275 (thread_db_create_event): Check for the main thread before adding
13276 a new thread.
13277 (maybe_attach_thread): Only enable event reporting if TID == 0.
13278 (thread_db_get_tls_address): Check for new threads.
13279
13280 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * linux-low.c (linux_create_inferior): Try execv before execvp.
13283 * spu-low.c (spu_create_inferior): Likewise.
13284
13285 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13286
13287 * linux-low.c (linux_create_inferior): Change execv to execvp.
13288 * spu-low.c (spu_create_inferior): Likewies.
13289
13290 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13291
13292 * Makefile.in (clean): Clean new files instead of deleted ones.
13293 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13294 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13295 rules.
13296 * configure.srv: Specify XML files and new regformats for MIPS and
13297 MIPS64 GNU/Linux.
13298 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13299 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13300 an entry for the restart register.
13301 (mips_cannot_fetch_register, mips_cannot_store_register)
13302 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13303 register names to match the XML descriptions.
13304 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13305 restart register instead of $0.
13306
13307 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13308 Markus Deuling <deuling@de.ibm.com>
13309
13310 * remote-utils.c (decode_xfer_write): New function.
13311 * server.h (decode_xfer_write): Add prototype.
13312 * server.c (handle_query): Add PACKET_LEN argument. Support
13313 qXfer:spu:read and qXfer:spu:write packets.
13314 (main): Pass packet_len to handle_query.
13315 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13316 * target.h (target_ops): Add qxfer_spu.
13317
13318 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13319
13320 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13321 accessing non-seekable spufs files.
13322
13323 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13324
13325 * server.c (handle_query): Add reply for qC packet.
13326
13327 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13328 Leo Zayas <lerele@champenstudios@com>
13329
13330 * server.h (check_remote_input_interrupt_request): New function.
13331 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13332 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13333 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13334 (check_remote_input_interrupt_request): New function.
13335 * server.h (check_remote_input_interrupt_request): Declare.
13336 * win32-low.c (winapi_DebugBreakProcess,
13337 winapi_GenerateConsoleCtrlEvent): New typedefs.
13338 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13339 to 250 ms.
13340 (win32_wait): Check for remote interrupt request
13341 with check_remote_input_interrupt_request.
13342 (win32_request_interrupt): New function.
13343 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13344
13345 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13346
13347 * win32-low.c (debug_registers_changed,
13348 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13349 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13350 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13351 (thread_rec): Get context using the low target.
13352 (child_add_thread): Call thread_added on the low target,
13353 which does the same thing.
13354 (regptr): Delete.
13355 (do_initial_child_stuff): Remove debug registers references.
13356 Set context using the low target. Resume threads after
13357 setting the contexts.
13358 (child_continue): Remove dead variable. Remove debug
13359 registers references.
13360 (child_fetch_inferior_registers): Go through the low target.
13361 (do_child_store_inferior_registers): Remove.
13362 (child_store_inferior_registers): Go through the low target.
13363 (win32_resume): Remove debug registers references.
13364 Set context using the low target.
13365 (handle_exception): Change return type to void. Don't record
13366 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13367 first chance exception.
13368 (get_child_debug_event): Change return type to void. Remove
13369 goto loop. Always return after waiting for debug event.
13370 (win32_wait): Convert to switch statement. Handle spurious
13371 events.
13372
13373 * win32-i386-low.c (debug_registers_changed,
13374 debug_registers_used): New.
13375 (initial_stuff): Rename to ...
13376 (i386_initial_stuff): ... this. Clear debug registers
13377 state variables.
13378 (store_debug_registers): Delete.
13379 (i386_get_thread_context): New.
13380 (load_debug_registers): Delete.
13381 (i386_set_thread_context): New.
13382 (i386_thread_added): New.
13383 (single_step): Rename to ...
13384 (i386_single_step): ... this.
13385 (do_fetch_inferior_registers): Rename to ...
13386 (i386_fetch_inferior_register): ... this.
13387 (i386_store_inferior_register): New.
13388 (the_low_target): Adapt to new interface.
13389
13390 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13391 (arm_get_thread_context): New.
13392 (arm_set_thread_context): New.
13393 (regptr): New.
13394 (do_fetch_inferior_registers): Rename to ...
13395 (arm_fetch_inferior_register): ... this.
13396 (arm_store_inferior_register): New.
13397 (arm_wince_breakpoint): Reimplement as unsigned long.
13398 (arm_wince_breakpoint_len): Define.
13399 (the_low_target): Adapt to new interface.
13400
13401 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13402 load_debug_registers. Add get_thread_context, set_thread_context,
13403 thread_added and store_inferior_register. Rename
13404 fetch_inferior_registers to fetch_inferior_register.
13405 (regptr): Remove declaration.
13406
13407 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13408
13409 * linux-low.c (linux_detach): Change return type to int. Return 0.
13410 * spu-low.c (spu_detach): Likewise.
13411
13412 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13413
13414 * target.h (target_ops): Change return type of detach to int.
13415 Add join.
13416 (join_inferior): New.
13417 * server.c (main): Don't skip detach support on mingw32.
13418 If the inferior doesn't support detaching return error.
13419 Call join_inferior instead of using waitpid.
13420 * linux-low.c (linux_join): New.
13421 (linux_target_op): Add linux_join.
13422 * spu-low.c (spu_join): New.
13423 (spu_target_ops): Add spu_join.
13424 * win32-low.c (win32_detach): Adapt to new interface.
13425 Reopen current_process_handle before detaching. Issue a child
13426 resume before detaching.
13427 (win32_join): New.
13428 (win32_target_op): Add win32_join.
13429
13430 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13431
13432 * win32-low.c (win32-attach): Fix return value.
13433 * target.h (target_ops): Describe ATTACH return values.
13434
13435 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13436
13437 * win32-low.c (GETPROCADDRESS): Define.
13438 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13439 (winapi_DebugSetProcessKillOnExit): Likewise.
13440 (win32_create_inferior): Force usage of ansi CreateProcessA.
13441 (win32_attach): Use GETPROCADDRESS.
13442 (win32_detach): Likewise.
13443
13444 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13447
13448 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13449
13450 * win32-low.c: Commit leftover changes from 2007-03-29.
13451
13452 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13453
13454 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13455 fields short instead of int. Add explicit padding.
13456 (i387_cache_to_fsave): Remove unnecessary casts.
13457 (i387_fsave_to_cache): Doc fix.
13458 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13459
13460 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13461
13462 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13463 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13464
13465 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13466
13467 * configure.srv (arm*-*-mingw32ce*): Move near the other
13468 arm targets.
13469
13470 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13471
13472 * configure.ac: Add errno checking.
13473 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13474 sys/file.h and malloc.h.
13475 (AC_CHECK_DECLS): Add perror.
13476 (srv_mingwce): Handle.
13477 * configure.srv (i[34567]86-*-cygwin*): Add
13478 win32-i386-low.o to srv_tgtobj.
13479 (i[34567]86-*-mingw*): Likewise.
13480 (arm*-*-mingw32ce*): Add case.
13481 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13482 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13483 [__MINGW32CE__] (strerror): New function.
13484 [__MINGW32CE__] (errno): Define to GetLastError.
13485 [__MINGW32CE__] (COUNTOF): New macro.
13486 (remote_open): Remove extra close call.
13487 * mem-break.c (delete_breakpoint_at): New function.
13488 * mem-break.h (delete_breakpoint_at): Declare.
13489 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13490 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13491 [USE_WIN32API] (read, write): Add char* casts.
13492 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13493 * server.h: Include wincecompat.h on Windows CE.
13494 [HAVE_ERRNO_H]: Check.
13495 (perror): Declare if not declared.
13496 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13497 (perror_with_name): Remove errno declaration.
13498 * wincecompat.h: New.
13499 * wincecompat.c: New.
13500 * win32-low.h: New.
13501 * win32-arm-low.c: New.
13502 * win32-i386-low.c: New.
13503 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13504 (OUTMSG2): Make it safe.
13505 (_T): New macro.
13506 (COUNTOF): New macro.
13507 (NUM_REGS): Get it from the low target.
13508 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13509 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13510 (thread_rec): Let low target handle debug registers.
13511 (child_add_thread): Likewise.
13512 (child_init_thread_list): Likewise.
13513 (continue_one_thread): Likewise.
13514 (regptr): New.
13515 (do_child_fetch_inferior_registers): Move to ...
13516 * win32-i386-low.c: ... here, and rename to ...
13517 (do_fetch_inferior_registers): ... this.
13518 * win32-low.c (child_fetch_inferior_registers):
13519 Go through the low target.
13520 (do_child_store_inferior_registers): Use regptr.
13521 (strwinerror): New function.
13522 (win32_create_inferior): Handle Windows CE.
13523 Use strwinerror instead of strerror on Windows error
13524 codes. Add program to the error output.
13525 Don't close the main thread handle on Windows CE.
13526 (win32_attach): Use coredll.dll on Windows CE.
13527 (win32_kill): Close current process and current
13528 thread handles.
13529 (win32_detach): Use coredll.dll on Windows CE.
13530 (win32_resume): Let low target handle debug registers, and
13531 step request.
13532 (handle_exception): Add/Remove initial breakpoint. Avoid
13533 non-existant WSTOPSIG on Windows CE.
13534 (win32_read_inferior_memory): Cast to remove warning.
13535 (win32_arch_string): Go through the low target.
13536 (initialize_low): Call set_breakpoint_data with the low
13537 target's breakpoint.
13538 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13539 FOP_REGNUM, mappings): Move to ...
13540 * win32-i386-low.c: ... here.
13541 * win32-low.c (win32_thread_info): Move to ...
13542 * win32-low.h: ... here.
13543 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13544 win32-arm-low.c and wincecompat.c.
13545 (all:): Add $EXEEXT.
13546 (install-only:): Likewise.
13547 (gdbserver:): Likewise.
13548 (gdbreplay:): Likewise.
13549 * config.in: Regenerate.
13550 * configure: Regenerate.
13551
13552 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13553
13554 * win32-low.c: Rename typedef thread_info to
13555 win32_thread_info throughout.
13556
13557 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13558
13559 * win32-i386-low.c: Rename to ...
13560 * win32-low.c: ... this.
13561 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13562 * Makefile.in: Likewise.
13563
13564 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13565
13566 * remote-utils.c (monitor_output): Constify msg parameter.
13567 * server.h (monitor_output): Likewise.
13568 * win32-i386-low.c (handle_output_debug_string): New.
13569 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13570 handle_output_debug_string.
13571 (get_child_debug_event): Likewise.
13572
13573 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13574
13575 * server.c (main): Correct strtoul check.
13576
13577 2007-03-27 Jon Ringle <jon@ringle.org>
13578
13579 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13580
13581 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13582
13583 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13584
13585 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13586
13587 * terminal.h: Check HAVE_SGTTY_H.
13588
13589 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13590
13591 * remote-utils.c (remote_open): Print out the assigned port number.
13592
13593 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * remote-utils.c (monitor_output): New function.
13596 * server.c (debug_threads): Define here.
13597 (monitor_show_help): New function.
13598 (handle_query): Handle qRcmd.
13599 (main): Do not handle 'd' packet.
13600 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13601 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13602 of debug_threads.
13603
13604 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13605
13606 * Makefile.in (EXEEXT): New.
13607 (clean): Use $(EXEEXT).
13608
13609 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13610
13611 * target.h (target_ops): Rename send_signal to request_interrupt,
13612 and remove enum target_signal parameter.
13613 * linux-low.c (linux_request_interrupt): Rename from
13614 linux_send_signal, and always send SIGINT.
13615 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13616 and always send SIGINT.
13617 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13618 of send_signal.
13619 (input_interrupt): Likewise.
13620
13621 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13622
13623 * server.c (get_features_xml): Check if target implemented
13624 arch_string.
13625 * win32-i386-low.c (win32_arch_string): New.
13626 (win32_target_ops): Add win32_arch_string as arch_string member.
13627
13628 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13629
13630 * spu-low.c (spu_arch_string): New.
13631 (spu_target_ops): Add spu_arch_string.
13632
13633 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13634
13635 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13636 * configure.ac: Do not check for terminal.h.
13637 * configure, config.in: Regenerated.
13638
13639 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13640
13641 * Makefile.in (OBS): Add $(XML_BUILTIN).
13642 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13643 (clean): Update.
13644 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13645 (arm-with-iwmmxt.c): New.
13646 * config.in, configure: Regenerate.
13647 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13648 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13649 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13650 (arm*-*-linux*): Add iWMMXt and regset support.
13651 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13652 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13653 (arm_store_wmmxregset, target_regsets): New.
13654 * server.c (get_features_xml): Take annex argument. Check builtin
13655 XML documents.
13656 (handle_query): Handle multiple annexes.
13657
13658 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * remote-utils.c [USE_WIN32API] (read, write): Define.
13661 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13662 write.
13663
13664 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * linux-i386-low.c (the_low_target): Set arch_string.
13667 * linux-x86-64-low.c (the_low_target): Likewise.
13668 * linux-low.c (linux_arch_string): New.
13669 (linux_target_ops): Add it.
13670 * linux-low.h (struct linux_target_ops): Add arch_string.
13671 * server.c (write_qxfer_response): Use const void * for DATA.
13672 (get_features_xml): New.
13673 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13674 * target.h (struct target_ops): Add arch_string method.
13675
13676 2007-01-03 Denis Pilat <denis.pilat@st.com>
13677 Daniel Jacobowitz <dan@codesourcery.com>
13678
13679 * linux-low.c (linux_kill): Handle being called with no threads.
13680 * win32-i386-low.c (win32_kill): Likewise.
13681 (get_child_debug_event): Clear current_process_handle.
13682
13683 2006-12-30 Denis PILAT <denis.pilat@st.com>
13684 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * remote-utils.c (remote_open): Check the type of specified
13687 serial port devices before opening them.
13688 * server.c (main): Kill the inferior if an error occurs during
13689 the first remote_open.
13690
13691 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13692
13693 * README: Update supported targets.
13694
13695 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13696
13697 * Makefile.in (clean): Remove reg-mips64.c.
13698 (reg-mips64.c, reg-mips64.o): New rules.
13699 * configure.srv: Handle mips64. Include regset support for mips.
13700 * linux-mips-low.c (union mips_register): New.
13701 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13702 (mips_breakpoint, mips_breakpoint_at): Use int.
13703 (mips_collect_register, mips_supply_register)
13704 (mips_collect_register_32bit, mips_supply_register_32bit)
13705 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13706 (mips_store_fpregset, target_regsets): New.
13707 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13708
13709 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13710
13711 * configure.srv: Add target "spu*-*-*".
13712 * Makefile.in (clean): Remove reg-spu.c.
13713 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13714 * spu-low.c: New file.
13715
13716 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13717
13718 * configure.ac: Correct td_thr_tls_get_addr test.
13719 * configure: Regenerated.
13720
13721 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * linux-low.c (linux_wait_for_event): Reformat. Use the
13724 pass_signals array.
13725 * remote-utils.c (decode_address_to_semicolon): New.
13726 * server.c (pass_signals, handle_general_set): New.
13727 (handle_query): Mention QPassSignals for qSupported.
13728 (main): Call handle_general_set.
13729 * server.h (pass_signals, decode_address_to_semicolon): New.
13730
13731 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13732
13733 * server.c (handle_query): Correct error handling for read_auxv.
13734
13735 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13736
13737 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13738 and srv_linux_thread_db to yes.
13739 * linux-s390-low.c (s390_fill_gregset): New function.
13740 (target_regsets): Define data structure.
13741
13742 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13745 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13746 * config.in, configure: Regenerated.
13747 * inferiors.c (gdb_id_to_thread): New function.
13748 (gdb_id_to_thread_id): Use it.
13749 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13750 * linux-low.h (struct process_info): Add th member.
13751 (thread_db_get_tls_address): New prototype.
13752 * remote-utils.c (decode_address): Make non-static.
13753 * server.c (handle_query): Handle qGetTLSAddr.
13754 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13755 * target.h (struct target_ops): Add get_tls_address.
13756 * thread-db.c (maybe_attach_thread): Save the thread handle.
13757 (thread_db_get_tls_address): New.
13758
13759 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13760
13761 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13762 (linux_resume_one_process): Take a siginfo_t *. Update all
13763 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13764 (struct pending_signals): Add a siginfo_t.
13765 (linux_wait_for_process): Always set last_status.
13766 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13767 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13768 * linux-low.h (struct process_info): Add last_status.
13769
13770 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13771
13772 * remote-utils.c (try_rle): New function.
13773 (putpkt_binary): Use it.
13774
13775 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13776
13777 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13778 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13779 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13780 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13781 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13782 point registers.
13783
13784 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13785
13786 * server.c (terminal_fd): New variable.
13787 (old_foreground_pgrp): Likewise.
13788 (restore_old_foreground_pgrp): New function.
13789 (start_inferior): Record the terminal file descriptor in terminal_fd
13790 and its original foreground group in old_foreground_pgrp. Register
13791 restore_old_foreground_pgrp with atexit().
13792
13793 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13794
13795 * server.c (handle_query): Correct qPart to qXfer.
13796
13797 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * configure.ac: Check for more headers which are missing on
13800 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13801 * configure.srv: Add Cygwin and mingw32.
13802 * remote-utils.c: Don't include headers unconditionally which
13803 are missing on mingw32. Include <winsock.h> for mingw32.
13804 (remote_open): Adjust for mingw32 support. Flush
13805 standard error after writing to it.
13806 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13807 (unblock_async_io, enable_async_io, disable_async_io)
13808 (readchar, getpkt): Update for Winsock support.
13809 (prepare_resume_reply): Expect a protocol signal number.
13810 * server.c: Disable <sys/wait.h> on mingw32.
13811 (start_inferior): Adjust for mingw32 support. Flush
13812 standard error after writing to it.
13813 (attach_inferior): Likewise. Use protocol signal
13814 numbers.
13815 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13816 and names.
13817 * win32-i386-low.c: New file.
13818 * Makefile.in (XM_CLIBS): Set.
13819 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13820 (win32-i386-low.o): New dependency rule.
13821 * linux-low.c (linux_wait): Use target signal numbers.
13822 * target.h (struct target_ops): Doc fix.
13823 * server.h (target_signal_to_name): New prototype.
13824 * gdbreplay.c: Don't include headers unconditionally which
13825 are missing on mingw32. Include <winsock.h> for mingw32.
13826 (remote_close, remote_open): Adjust for Winsock support.
13827 * configure, config.in: Regenerated.
13828
13829 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * server.c (decode_xfer_read, write_qxfer_response): New.
13832 (handle_query): Take a packet length argument. Handle
13833 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13834 the qSupported response.
13835 (main): Update call to handle_query.
13836
13837 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13840 (putpkt_binary): Renamed from putpkt and adjusted for binary
13841 data.
13842 (putpkt): New wrapper for putpkt_binary.
13843 (readchar): Don't mask off the high bit.
13844 (decode_X_packet): New function.
13845 * server.c (main): Call putpkt_binary if a handler sets the packet
13846 length. Save the length of the incoming packet. Handle 'X'.
13847 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13848
13849 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13850
13851 * server.c (handle_query): Handle qSupported.
13852
13853 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * remote-utils.c (all_symbols_looked_up): New variable.
13856 (look_up_one_symbol): Check it.
13857 * server.h (look_up_one_symbol): New declaration.
13858 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13859
13860 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * Makefile.in (linux-arm-low.o): Update dependencies.
13863 * linux-arm-low.c: Include "gdb_proc_service.h".
13864 (PTRACE_GET_THREAD_AREA): Define.
13865 (ps_get_thread_area): New function.
13866
13867 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13868
13869 * configure.srv (m68k*-*-uclinux*): New target.
13870 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13871 (linux_resume_one_process): Remove extraneous cast.
13872 (linux_read_offsets): New.
13873 (linux_target_op): Add linux_read_offsets on mmuless systems.
13874 * server.c (handle_query): Add qOffsets logic.
13875 * target.h (struct target_ops): Add read_offsets.
13876
13877 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13878
13879 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13880 (PTRACE_GET_THREAD_AREA): Define.
13881 (ps_get_thread_area): New function.
13882 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13883 (linux-x86-64-low.o): Update.
13884
13885 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13886
13887 * configure.ac: Remove checks for prfpregset_t.
13888 * gdb_proc_service.h: New file.
13889 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13890 new "gdb_proc_service.h".
13891 * proc-service.c: Likewise.
13892 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13893 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13894 * Makefile.in (gdb_proc_service_h): Updated.
13895 * configure, config.in: Regenerated.
13896
13897 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13898
13899 * remote-utils.c (prepare_resume_reply): Move declaration
13900 of gdb_id_from_wait to the top of the block.
13901
13902 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13903
13904 * linux-low.c (regsets_store_inferior_registers): Read the regset
13905 from the target before filling it.
13906
13907 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * server.c (attach_inferior): Return SIGTRAP for a successful
13910 attach.
13911
13912 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * Makefile.in (OBS): Add version.o.
13915 (STAGESTUFF): Delete.
13916 (version.o): Add dependencies.
13917 (version.c): Replace rule.
13918 (clean): Remove version.c.
13919 * server.c (gdbserver_version): New.
13920 (gdbserver_usage): Use printf.
13921 (main): Handle --version and --help.
13922 * server.h (version, host_name): Add declarations.
13923
13924 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13925
13926 * linux-arm-low.c:
13927 * linux-arm-low.c:
13928 * inferiors.c:
13929 * i387-fp.h:
13930 * i387-fp.c:
13931 * gdbreplay.c:
13932 * regcache.c:
13933 * proc-service.c:
13934 * mem-break.h:
13935 * mem-break.c:
13936 * linux-x86-64-low.c:
13937 * linux-sh-low.c:
13938 * linux-s390-low.c:
13939 * linux-ppc64-low.c:
13940 * linux-ppc-low.c:
13941 * linux-mips-low.c:
13942 * linux-m68k-low.c:
13943 * linux-m32r-low.c:
13944 * linux-low.h:
13945 * linux-low.c:
13946 * linux-ia64-low.c:
13947 * linux-i386-low.c:
13948 * linux-crisv32-low.c:
13949 * thread-db.c:
13950 * terminal.h:
13951 * target.h:
13952 * target.c:
13953 * server.h:
13954 * server.c:
13955 * remote-utils.c:
13956 * regcache.h:
13957 * utils.c:
13958 * Makefile.in:
13959 * configure.ac:
13960 * gdbserver.1: Add (C) after Copyright. Update the FSF
13961 address.
13962
13963 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13964
13965 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13966 (arm_breakpoint_at): Recognize both breakpoints.
13967 (the_low_target): Use the correct breakpoint instruction.
13968
13969 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13972 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13973 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13974 (the_low_target): Update.
13975
13976 2005-10-25 Andreas Schwab <schwab@suse.de>
13977
13978 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13979
13980 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13981 (ia64_num_regs): Reduce to 462.
13982
13983 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * acinclude.m4: Correct quoting.
13986 * aclocal.m4: Regenerated.
13987
13988 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13989 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13990 (thread_db_init): Call thread_db_err_str.
13991 * configure.ac: Check for TD_VERSION.
13992 * config.in, configure: Regenerated.
13993
13994 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13995
13996 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13997
13998 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13999
14000 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14001 is not available. Define HAVE_PTRACE_GETREGS if it is.
14002 * config.in, configure: Regenerated.
14003 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14004 * linux-i386-low.c, linux-m68k-low.c: Update to use
14005 HAVE_PTRACE_GETREGS.
14006 * linux-low.c (regsets_fetch_inferior_registers)
14007 (regsets_store_inferior_registers): Only return 0 if we processed
14008 GENERAL_REGS.
14009 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14010 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14011
14012 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14013
14014 * inferiors.c (struct thread_info): Add gdb_id.
14015 (add_thread): Add gdb_id argument.
14016 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14017 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14018 calls to add_thread.
14019 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14020 * server.c (handle_query): Use thread_to_gdb_id.
14021 (handle_v_cont, main): Use gdb_id_to_thread_id.
14022 * server.h (add_thread): Update prototype.
14023 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14024 prototypes.
14025
14026 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14027
14028 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14029 left-padded registers.
14030 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14031 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14032
14033 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14034
14035 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14036 * configure: Regenerate.
14037 * config.in: Regenerate.
14038 * server.h (NEED_DECLARATION_STRERROR):
14039 Replace with !HAVE_DECL_STRERROR.
14040
14041 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * linux-low.c (linux_wait, linux_send_signal): Don't test
14044 an unsigned long variable for > 0 if it could be MAX_ULONG.
14045 * server.c (myresume): Likewise.
14046 * target.c (set_desired_inferior): Likewise.
14047
14048 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14049
14050 * configure.ac: Simplify and improve check for socklen_t.
14051 * configure, config.in: Regenerate.
14052
14053 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * acconfig.h: Remove.
14056 * configure.ac: Add a test for socklen_t. Use three-argument
14057 AC_DEFINE throughout.
14058 * config.in: Regenerated using autoheader 2.59.
14059 * configure: Regenerated.
14060
14061 * gdbreplay.c (socklen_t): Provide a default.
14062 (remote_open): Use socklen_t.
14063 * remote-utils.c (socklen_t): Provide a default.
14064 (remote_open): Use socklen_t.
14065 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14066 unsigned char.
14067
14068 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14069 char for buffers.
14070 * linux-low.c (linux_read_memory, linux_write_memory)
14071 (linux_read_auxv): Likewise.
14072 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14073 (check_mem_write): Likewise.
14074 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14075 Likewise.
14076 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14077 (registers_from_string, register_data): Likewise.
14078 * server.c (handle_query, main): Likewise.
14079 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14080 (decode_M_packet): Likewise.
14081 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14082 * target.h (struct target_ops): Update read_memory, write_memory,
14083 and read_auxv.
14084 (read_inferior_memory, write_inferior_memory): Update.
14085 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14086 to unsigned char *.
14087 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14088 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14089 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14090 linux-s390-low.c, linux-sh-low.c: Update for changes in
14091 read_inferior_memory and the_low_target->breakpoint.
14092
14093 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14096 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14097 * configure.srv: Add powerpc64-*-linux*.
14098 * linux-ppc64-low.c: New file.
14099
14100 2005-05-23 Orjan Friberg <orjanf@axis.com>
14101
14102 * linux-cris-low.c: New file with support for CRIS.
14103 * linux-crisv32-low.c: Ditto for CRISv32.
14104 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14105 (clean): Add reg-cris.c and reg-crisv32.c.
14106 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14107 reg-crisv32.o, and reg-crisv32.c to make rules.
14108 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14109 recognized targets.
14110
14111 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14112
14113 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14114 of sizeof (PTRACE_XFER_TYPE).
14115 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14116
14117 2005-05-12 Orjan Friberg <orjanf@axis.com>
14118
14119 * target.h (struct target_ops): Add insert_watchpoint,
14120 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14121 pointers for hardware watchpoint support.
14122 * linux-low.h (struct linux_target_ops): Ditto.
14123 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14124 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14125 to linux_target_ops.
14126 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14127 reply packet.
14128 * server.c (main): Recognize 'Z' and 'z' packets.
14129
14130 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14131
14132 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14133 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14134 (the_low_target): Add new members.
14135
14136 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14137
14138 * proc-service.c (ps_lgetregs): Search all_processes instead of
14139 all_threads.
14140
14141 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14142
14143 * server.c (start_inferior): Change return type to int.
14144 (attach_inferior): Change sigptr to int *.
14145 (handle_v_cont, handle_v_requests): Change signal to int *.
14146 (main): Change signal to int.
14147
14148 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14149
14150 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14151 * configure.srv: Add m32r*-*-linux*.
14152 * linux-m32r-low.c: New file.
14153
14154 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14157
14158 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14159
14160 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14161 Take unsigned long arguments for PIDs.
14162 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14163 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14164 (wait_for_sigstop, linux_resume_one_process)
14165 (regsets_fetch_inferior_registers, linux_send_signal)
14166 (linux_read_auxv): Likewise. Update the types of variables holding
14167 PIDs. Update format string specifiers.
14168 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14169 * remote-utils.c (prepare_resume_reply): Likewise.
14170 * server.c (cont_thread, general_thread, step_thread)
14171 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14172 unsigned long.
14173 (handle_query): Update format specifiers.
14174 (handle_v_cont, main): Use strtoul for thread IDs.
14175 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14176 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14177 (general_thread, step_thread, thread_from_wait)
14178 (old_thread_from_wait): Update.
14179 * target.h (struct thread_resume): Use unsigned long for THREAD.
14180 (struct target_ops): Use unsigned long for arguments to attach and
14181 thread_alive.
14182
14183 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * acinclude.m4: Include bfd/bfd.m4 directly.
14186 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14187 <agriffis@toolchain.org>.
14188 * aclocal.m4, configure: Regenerated.
14189
14190 2005-01-07 Andrew Cagney <cagney@gnu.org>
14191
14192 * configure.ac: Rename configure.in, require autoconf 2.59.
14193 * configure: Re-generate.
14194
14195 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14196
14197 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14198 LIBS when finished.
14199 * aclocal.m4: Regenerated.
14200 * configure: Regenerated.
14201
14202 2004-11-21 Andreas Schwab <schwab@suse.de>
14203
14204 * linux-m68k-low.c (m68k_num_gregs): Define.
14205 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14206 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14207 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14208 (m68k_breakpoint_at): New. Add to the_low_target.
14209
14210 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14211 srv_linux_thread_db to yes.
14212
14213 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14214
14215 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14216 (ARCH_SET_FS): Likewise.
14217 (ARCH_GET_FS): Likewise.
14218 (ARCH_GET_GS): Likewise.
14219
14220 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14221
14222 * linux-i386-low.c (ps_get_thread_area): New.
14223 * linux-x86-64-low.c (ps_get_thread_area): New.
14224 * linux-low.c: Include <sys/syscall.h>.
14225 (linux_kill_one_process): Don't kill the first thread here.
14226 (linux_kill): Kill the first thread here.
14227 (kill_lwp): New function.
14228 (send_sigstop, linux_send_signal): Use it.
14229 * proc-service.c: Clean up #ifdefs.
14230 (fpregset_info): Delete.
14231 (ps_lgetregs): Update and enable implementation.
14232 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14233 implementations.
14234 * remote-utils.c (struct sym_cache, symbol_cache): New.
14235 (input_interrupt): Print a clearer message.
14236 (async_io_enabled): New variable.
14237 (enable_async_io, disable_async_io): Use it. Update comments.
14238 (look_up_one_symbol): Use the symbol cache.
14239 * thread-db.c (thread_db_look_up_symbols): New function.
14240 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14241
14242 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14243
14244 * configure.in: Test for -rdynamic.
14245 * configure: Regenerated.
14246 * Makefile (INTERNAL_LDFLAGS): New.
14247 (gdbserver, gdbreplay): Use it.
14248
14249 2004-09-02 Andrew Cagney <cagney@gnu.org>
14250
14251 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14252
14253 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14254
14255 * linux-low.c (linux_wait): Clear all_processes list also.
14256
14257 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14258
14259 * linux-low.c: Include <errno.h>. Remove extern declaration of
14260 errno.
14261
14262 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14263
14264 * gdbreplay.c, server.h, utils.c: Update copyright years.
14265
14266 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14267
14268 * server.c (main): Print child status or termination signal from
14269 variable 'signal', not 'sig'.
14270
14271 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14272
14273 * linux-low.c (linux_read_memory): Change return type to
14274 int. Check for and return error from ptrace().
14275 * target.c (read_inferior_memory): Change return type to int. Pass
14276 back return status from the_target->read_memory().
14277 * target.h (struct target_ops): Adapt *read_memory() prototype.
14278 Update comment.
14279 (read_inferior_memory): Adapt prototype.
14280 * server.c (main): Return an error packet if
14281 read_inferior_memory() returns an error.
14282
14283 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14284
14285 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14286 Unify with other clean targets.
14287
14288 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14289
14290 * server.c (handle_v_cont): Call set_desired_inferior.
14291
14292 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14293
14294 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14295
14296 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14297
14298 * linux-low.c (linux_wait): Unblock async I/O.
14299 (linux_resume): Block and enable async I/O.
14300 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14301 * server.h (block_async_io, unblock_async_io): Add prototypes.
14302
14303 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14304
14305 * remote-utils.c (remote_open): Print a status notice after
14306 opening a TCP port.
14307 * server.c (attach_inferior): Print a status notice after
14308 attaching.
14309
14310 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14311
14312 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14313
14314 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14315
14316 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14317 error packet.
14318 * server.c, target.h: Update copyright years.
14319
14320 2004-02-25 Roland McGrath <roland@redhat.com>
14321
14322 * target.h (struct target_ops): New member `read_auxv'.
14323 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14324 * linux-low.c (linux_read_auxv): New function.
14325 (linux_target_ops): Initialize `read_auxv' member to that.
14326
14327 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14328
14329 Committed by Jim Blandy <jimb@redhat.com>.
14330
14331 * linux-s390-low.c (s390_num_regs): Update.
14332 (s390_regmap): Remove control registers. Use __s390x__ predefine
14333 instead of GPR_SIZE to distiguish s390 and s390x targets.
14334
14335 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14336
14337 * linux-low.c: Update copyright year.
14338 (check_removed_breakpoint): Clear pending_is_breakpoint.
14339 (linux_set_resume_request, linux_queue_one_thread)
14340 (resume_status_pending_p): New functions.
14341 (linux_continue_one_thread): Use process->resume.
14342 (linux_resume): Only resume threads if there are no pending events.
14343 * linux-low.h (struct process_info): Add resume request
14344 pointer.
14345
14346 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14347
14348 * regcache.c (new_register_cache): Clear the allocated register
14349 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14350
14351 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14352
14353 * linux-low.c (linux_resume): Take a struct thread_resume *
14354 argument.
14355 (linux_wait): Update call.
14356 (resume_ptr): New static variable.
14357 (linux_continue_one_thread): Renamed from
14358 linux_continue_one_process. Use resume_ptr.
14359 (linux_resume): Use linux_continue_one_thread.
14360 * server.c (handle_v_cont, handle_v_requests): New functions.
14361 (myresume): New function.
14362 (main): Handle 'v' case.
14363 * target.h (struct thread_resume): New type.
14364 (struct target_ops): Change argument of "resume" to struct
14365 thread_resume *.
14366 (myresume): Delete macro.
14367
14368 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14369
14370 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14371 (uninstall): Support DESTDIR.
14372
14373 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14374
14375 * configure.srv: Add xscale*linux copy of arm*linux entry.
14376
14377 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14378
14379 * linux-arm-low.c (arm_reinsert_addr): New function.
14380 (the_low_target): Add arm_reinsert_addr.
14381
14382 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14383
14384 * mem-break.c: Remove whitespace at end of file.
14385
14386 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14387
14388 * configure.in: Check whether we need to prototype strerror.
14389 * server.h: Optionally prototype strerror.
14390 * gdbreplay.c (perror_with_name): Use strerror.
14391 * linux-low.c (linux_attach_lwp): Use strerror.
14392 * utils.c (perror_with_name): Use strerror.
14393 * config.in, configure: Regenerated.
14394
14395 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14396
14397 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14398 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14399
14400 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14401
14402 * Makefile.in (SFILES): Update.
14403 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14404 low-sun3.c: Remove files.
14405
14406 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14407
14408 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14409 (linux_detach_one_process, linux_detach): New functions.
14410 (linux_target_ops): Add linux_detach.
14411 * server.c (main): Handle 'D' packet.
14412 * target.h (struct target_ops): Add "detach" member.
14413 (detach_inferior): Define.
14414
14415 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14416
14417 From Kelley Cook <kelleycook@wideopenwest.com>:
14418 * configure.srv: Accept i[34567]86 variants.
14419
14420 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14421
14422 * linux-low.c (linux_wait_for_event): Correct comment typos.
14423 (linux_resume_one_process): Call check_removed_breakpoint.
14424 (linux_send_signal): New function.
14425 (linux_target_ops): Add linux_send_signal.
14426 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14427 of kill.
14428 * target.h (struct target_ops): Add send_signal.
14429
14430 2003-05-29 Jim Blandy <jimb@redhat.com>
14431
14432 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14433 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14434 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14435 away part of the register's value.
14436
14437 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14438
14439 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14440 (linux_wait_for_event, linux_init_signals): Likewise.
14441
14442 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14443
14444 * configure.in: Check for stdlib.h.
14445 * configure: Regenerated.
14446 * config.in: Regenerated.
14447
14448 2003-01-04 Andreas Schwab <schwab@suse.de>
14449
14450 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14451
14452 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14453
14454 * Makefile.in: Remove obsolete code.
14455
14456 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14457
14458 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14459 defined(PT_FPR0_HI).
14460
14461 2002-11-17 Stuart Hughes <seh@zee2.com>
14462
14463 * linux-arm-low.c (arm_num_regs): Increase.
14464 (arm_regmap): Include status register.
14465
14466 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14467
14468 * linux-low.c (register_addr): Remove incorrect -1 check.
14469
14470 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14471
14472 * linux-low.c (linux_create_inferior): Call setpgid. Return
14473 the new PID.
14474 (unstopped_p, linux_signal_pid): Remove.
14475 (linux_target_ops): Remove linux_signal_pid.
14476 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14477 global instead of target method.
14478 * target.h (struct target_ops): Remove signal_pid. Update comment
14479 for create_inferior.
14480 * server.c (signal_pid): New variable.
14481 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14482 gdbserver. Set the child to be the foreground process group.
14483 (attach_inferior): Set signal_pid.
14484
14485 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14486
14487 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14488
14489 2002-08-20 Jim Blandy <jimb@redhat.com>
14490
14491 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14492 default for this.
14493
14494 2002-08-01 Andrew Cagney <cagney@redhat.com>
14495
14496 * Makefile.in: Make chill references obsolete.
14497
14498 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14499
14500 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14501 * configure: Regenerate.
14502 * config.in: Regenerate.
14503
14504 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14505
14506 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14507 (perror_with_name, remote_close, remote_open, expect, play): Static.
14508
14509 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14510
14511 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14512 byte offsets instead of an array of indexes.
14513 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14514
14515 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14516
14517 * regcache.c: Add comment.
14518
14519 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14520
14521 * thread-db.c: New file.
14522 * proc-service.c: New file.
14523 * acinclude.m4: New file.
14524 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14525 proc-service.o, and thread-db.o.
14526 (linux-low.o): Add USE_THREAD_DB.
14527 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14528 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14529 * aclocal.m4: Regenerated.
14530 * config.in: Regenerated.
14531 * configure: Regenerated.
14532 * configure.in: Check for proc_service.h, sys/procfs.h,
14533 thread_db.h, and linux/elf.h headrs.
14534 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14535 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14536 Check for -lthread_db and thread support.
14537 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14538 PowerPC, and SuperH.
14539 * i387-fp.c: Constify arguments.
14540 * i387-fp.h: Likewise.
14541 * inferiors.c: (struct thread_info): Renamed from
14542 `struct inferior_info'. Remove PID member. Use generic inferior
14543 list header. All uses updated.
14544 (inferiors, signal_pid): Removed.
14545 (all_threads): New variable.
14546 (get_thread): Define.
14547 (add_inferior_to_list): New function.
14548 (for_each_inferior): New function.
14549 (change_inferior_id): New function.
14550 (add_inferior): Removed.
14551 (remove_inferior): New function.
14552 (add_thread): New function.
14553 (free_one_thread): New function.
14554 (remove_thread): New function.
14555 (clear_inferiors): Use for_each_inferior and free_one_thread.
14556 (find_inferior): New function.
14557 (find_inferior_id): New function.
14558 (inferior_target_data): Update argument type.
14559 (set_inferior_target_data): Likewise.
14560 (inferior_regcache_data): Likewise.
14561 (set_inferior_regcache_data): Likewise.
14562 * linux-low.c (linux_bp_reinsert): Remove.
14563 (all_processes, stopping_threads, using_thrads)
14564 (struct pending_signals, debug_threads, pid_of): New.
14565 (inferior_pid): Replace with macro.
14566 (struct inferior_linux_data): Remove.
14567 (get_stop_pc, add_process): New functions.
14568 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14569 Use add_process and add_thread.
14570 (linux_attach_lwp): New function, based on old linux_attach. Use
14571 add_process and add_thread. Set stop_expected for new threads.
14572 (linux_attach): New function.
14573 (linux_kill_one_process): New function.
14574 (linux_kill): Kill all LWPs.
14575 (linux_thread_alive): Use find_inferior_id.
14576 (check_removed_breakpoints, status_pending_p): New functions.
14577 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14578 Update. Use WNOHANG. Wait for cloned processes also. Update process
14579 struct for the found process.
14580 (linux_wait_for_event): New function.
14581 (linux_wait): Use it. Support LWPs.
14582 (send_sigstop, wait_for_sigstop, stop_all_processes)
14583 (linux_resume_one_process, linux_continue_one_process): New functions.
14584 (linux_resume): Support LWPs.
14585 (REGISTER_RAW_SIZE): Remove.
14586 (fetch_register): Use register_size instead. Call supply_register.
14587 (usr_store_inferior_registers): Likewise. Call collect_register.
14588 Fix recursive case.
14589 (regsets_fetch_inferior_registers): Improve error message.
14590 (regsets_store_inferior_registers): Add debugging.
14591 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14592 (unstopped_p, linux_signal_pid): New functions.
14593 (linux_target_ops): Add linux_signal_pid.
14594 (linux_init_signals): New function.
14595 (initialize_low): Call it. Initialize using_threads.
14596 * regcache.c (inferior_regcache_data): Add valid
14597 flag.
14598 (get_regcache): Fetch registers lazily. Add fetch argument
14599 and update all callers.
14600 (regcache_invalidate_one, regcache_invalidate): New
14601 functions.
14602 (new_register_cache): Renamed from create_register_cache.
14603 Return the new regcache.
14604 (free_register_cache): Change argument to a void *.
14605 (registers_to_string, registers_from_string): Call get_regcache
14606 with fetch flag set.
14607 (register_data): Make static. Pass fetch flag to get_regcache.
14608 (supply_register): Call get_regcache with fetch flag clear.
14609 (collect_register): Call get_regcache with fetch flag set.
14610 (collect_register_as_string): New function.
14611 * regcache.h: Update.
14612 * remote-utils.c (putpkt): Flush after debug output and use
14613 stderr.
14614 Handle input interrupts while waiting for an ACK.
14615 (input_interrupt): Use signal_pid method.
14616 (getpkt): Flush after debug output and use stderr.
14617 (outreg): Use collect_register_as_string.
14618 (new_thread_notify, dead_thread_notify): New functions.
14619 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14620 and general_thread.
14621 (look_up_one_symbol): Flush after debug output.
14622 * server.c (step_thread, server_waiting): New variables.
14623 (start_inferior): Don't use signal_pid. Update call to mywait.
14624 (attach_inferior): Update call to mywait.
14625 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14626 (main): Don't fetch/store registers explicitly. Use
14627 set_desired_inferior. Support proposed ``Hs'' packet. Update
14628 calls to mywait.
14629 * server.h: Update.
14630 (struct inferior_list, struct_inferior_list_entry): New.
14631 * target.c (set_desired_inferior): New.
14632 (write_inferior_memory): Constify.
14633 (mywait): New function.
14634 * target.h: Update.
14635 (struct target_ops): New signal_pid method.
14636 (mywait): Removed macro, added prototype.
14637
14638 * linux-low.h (regset_func): Removed.
14639 (regset_fill_func, regset_store_func): New.
14640 (enum regset_type): New.
14641 (struct regset_info): Add type field. Use new operation types.
14642 (struct linux_target_ops): stop_pc renamed to get_pc.
14643 Add decr_pc_after_break and breakpoint_at.
14644 (get_process, get_thread_proess, get_process_thread)
14645 (strut process_info, all_processes, linux_attach_lwp)
14646 (thread_db_init): New.
14647
14648 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14649 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14650 (the_low_target): Add new members.
14651 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14652 (i386_store_fpxregset): Constify.
14653 (target_regsets): Add new kind identifier.
14654 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14655 (i386_set_pc): Add debugging.
14656 (i386_breakpoint_at): New function.
14657 (the_low_target): Add new members.
14658 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14659 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14660 (mips_breakpoint_at): New.
14661 (the_low_target): Add new members.
14662 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14663 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14664 (the_low_target): Add new members.
14665 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14666 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14667 (the_low_target): Add new members.
14668 * linux-x86-64-low.c (target_regsets): Add new kind
14669 identifier.
14670
14671 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14672
14673 From Martin Pool <mbp@samba.org>:
14674 * server.c (gdbserver_usage): New function.
14675 (main): Call it.
14676
14677 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14678
14679 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14680 stop_at -> stop_pc.
14681
14682 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14683
14684 * Makefile.in: Remove obsolete code.
14685
14686 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14687
14688 * linux-low.c (regsets_fetch_inferior_registers),
14689 (regsets_store_inferior_registers): Removed cast to int from
14690 ptrace() calls.
14691 * regcache.h: Added declaration of struct inferior_info.
14692
14693 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14694
14695 * inferiors.c (struct inferior_info): Add regcache_data.
14696 (add_inferior): Call create_register_cache.
14697 (clear_inferiors): Call free_register_cache.
14698 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14699 * regcache.c (struct inferior_regcache_data): New.
14700 (registers): Remove.
14701 (get_regcache): New function.
14702 (create_register_cache, free_register_cache): New functions.
14703 (set_register_cache): Don't initialize the register cache here.
14704 (registers_to_string, registers_from_string, register_data): Call
14705 get_regcache.
14706 * regcache.h: Add prototypes.
14707 * server.h: Likewise.
14708
14709 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14710
14711 * mem-break.c: New file.
14712 * mem-break.h: New file.
14713 * Makefile.in: Add mem-break.o rule; update server.h
14714 dependencies.
14715 * inferiors.c (struct inferior_info): Add target_data
14716 member.
14717 (clear_inferiors): Free target_data member if set.
14718 (inferior_target_data, set_inferior_target_data): New functions.
14719 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14720 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14721 * linux-low.c (linux_bp_reinsert): New variable.
14722 (struct inferior_linux_data): New.
14723 (linux_create_inferior): Use set_inferior_target_data.
14724 (linux_attach): Likewise. Call add_inferior.
14725 (linux_wait_for_one_inferior): New function.
14726 (linux_wait): Call it.
14727 (linux_write_memory): Add const.
14728 (initialize_low): Call set_breakpoint_data.
14729 * linux-low.h (struct linux_target_ops): Add breakpoint
14730 handling members.
14731 * server.c (attach_inferior): Remove extra add_inferior
14732 call.
14733 * server.h: Include mem-break.h. Update inferior.c
14734 prototypes.
14735 * target.c (read_inferior_memory)
14736 (write_inferior_memory): New functions.
14737 * target.h (read_inferior_memory)
14738 (write_inferior_memory): Change macros to prototypes.
14739 (struct target_ops): Update comments. Add const to write_memory
14740 definition.
14741
14742 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14743
14744 * linux-low.c (usr_store_inferior_registers): Support
14745 registers which are allowed to fail to store.
14746 * linux-low.h (linux_target_ops): Likewise.
14747 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14748 (ppc_cannot_store_register): FPSCR may not be storable.
14749
14750 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14751
14752 * server.h: Include <string.h> if HAVE_STRING_H.
14753 * ChangeLog: Correct paths in last ChangeLog entry.
14754
14755 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14756
14757 * linux-low.h: Remove obsolete prototypes.
14758 (struct linux_target_ops): New.
14759 (extern the_low_target): New.
14760 * linux-low.c (num_regs, regmap): Remove declarations.
14761 (register_addr): Use the_low_target explicitly.
14762 (fetch_register): Likewise.
14763 (usr_fetch_inferior_registers): Likewise.
14764 (usr_store_inferior_registers): Likewise.
14765 * linux-arm-low.c (num_regs): Remove.
14766 (arm_num_regs): Define.
14767 (arm_regmap): Renamed from regmap, made static.
14768 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14769 made static.
14770 (arm_cannot_store_register): Renamed from cannot_store_register,
14771 made static.
14772 (the_low_target): New.
14773 * linux-i386-low.c (num_regs): Remove.
14774 (i386_num_regs): Define.
14775 (i386_regmap): Renamed from regmap, made static.
14776 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14777 made static.
14778 (i386_cannot_store_register): Renamed from cannot_store_register,
14779 made static.
14780 (the_low_target): New.
14781 * linux-ia64-low.c (num_regs): Remove.
14782 (ia64_num_regs): Define.
14783 (ia64_regmap): Renamed from regmap, made static.
14784 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14785 made static.
14786 (ia64_cannot_store_register): Renamed from cannot_store_register,
14787 made static.
14788 (the_low_target): New.
14789 * linux-m68k-low.c (num_regs): Remove.
14790 (m68k_num_regs): Define.
14791 (m68k_regmap): Renamed from regmap, made static.
14792 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14793 made static.
14794 (m68k_cannot_store_register): Renamed from cannot_store_register,
14795 made static.
14796 (the_low_target): New.
14797 * linux-mips-low.c (num_regs): Remove.
14798 (mips_num_regs): Define.
14799 (mips_regmap): Renamed from regmap, made static.
14800 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14801 made static.
14802 (mips_cannot_store_register): Renamed from cannot_store_register,
14803 made static.
14804 (the_low_target): New.
14805 * linux-ppc-low.c (num_regs): Remove.
14806 (ppc_num_regs): Define.
14807 (ppc_regmap): Renamed from regmap, made static.
14808 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14809 made static.
14810 (ppc_cannot_store_register): Renamed from cannot_store_register,
14811 made static.
14812 (the_low_target): New.
14813 * linux-s390-low.c (num_regs): Remove.
14814 (s390_num_regs): Define.
14815 (s390_regmap): Renamed from regmap, made static.
14816 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14817 made static.
14818 (s390_cannot_store_register): Renamed from cannot_store_register,
14819 made static.
14820 (the_low_target): New.
14821 * linux-sh-low.c (num_regs): Remove.
14822 (sh_num_regs): Define.
14823 (sh_regmap): Renamed from regmap, made static.
14824 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14825 made static.
14826 (sh_cannot_store_register): Renamed from cannot_store_register,
14827 made static.
14828 (the_low_target): New.
14829 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14830 (the_low_target): New.
14831
14832 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14833
14834 * Makefile.in: Add stamp-h target.
14835 * configure.in: Create stamp-h.
14836 * configure: Regenerated.
14837
14838 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14839
14840 * inferiors.c: New file.
14841 * target.c: New file.
14842 * target.h: New file.
14843 * Makefile.in: Add target.o and inferiors.o. Update
14844 dependencies.
14845 * linux-low.c (inferior_pid): New static variable,
14846 moved from server.c.
14847 (linux_create_inferior): Renamed from create_inferior.
14848 Call add_inferior. Return 0 on success instead of a PID.
14849 (linux_attach): Renamed from myattach.
14850 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14851 (linux_thread_alive): Renamed from mythread_alive.
14852 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14853 child dies.
14854 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14855 (regsets_store_inferior_registers): Correct error message.
14856 Add missing ``return 0''.
14857 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14858 (linux_store_registers): Renamed from store_inferior_registers.
14859 (linux_read_memory): Renamed from read_inferior_memory.
14860 (linux_write_memory): Renamed from write_inferior_memory.
14861 (linux_target_ops): New structure.
14862 (initialize_low): Call set_target_ops ().
14863 * remote-utils.c (unhexify): New function.
14864 (hexify): New function.
14865 (input_interrupt): Send signals to ``signal_pid''.
14866 * server.c (inferior_pid): Remove.
14867 (start_inferior): Update create_inferior call.
14868 (attach_inferior): Call add_inferior.
14869 (handle_query): New function.
14870 (main): Call handle_query for `q' packets.
14871 * server.h: Include "target.h". Remove obsolete prototypes.
14872 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14873
14874 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14875
14876 * Makefile.in: Add WARN_CFLAGS. Update configury
14877 dependencies.
14878 * configure.in: Check for <string.h>
14879 * configure: Regenerate.
14880 * config.in: Regenerate.
14881 * gdbreplay.c: Include needed system headers.
14882 (remote_open): Remove strchr prototype.
14883 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14884 * regcache.c (supply_register): Change buf argument to const void *.
14885 (supply_register_by_name): Likewise.
14886 (collect_register): Change buf argument to void *.
14887 (collect_register_by_name): Likewise.
14888 * regcache.h: Add missing prototypes.
14889 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14890 * server.c (handle_query): New function.
14891 (attached): New static variable, moved out of main.
14892 (main): Quiet longjmp clobber warnings.
14893 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14894 * utils.c (error): Remove NORETURN.
14895 (fatal): Likewise.
This page took 0.351563 seconds and 5 git commands to generate.