Include <signal.h> on gdbserver/fork-child.c (and fix regressions)
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * fork-child.c: Conditionally include <signal.h>.
4
5 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * server.c (handle_general_set): Handle new packet
8 "QStartupWithShell".
9 (handle_query): Add "QStartupWithShell" to the list of supported
10 packets.
11 (gdbserver_usage): Add help text explaining the
12 new "--startup-with-shell" and "--no-startup-with-shell" CLI
13 options.
14 (captured_main): Recognize and act upon the presence of the new
15 CLI options.
16
17 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
18 Pedro Alves <palves@redhat.com>
19
20 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
21 * configure: Regenerate.
22 * configure.srv (srv_linux_obj): Add "fork-child.o" and
23 "fork-inferior.o".
24 (i[34567]86-*-lynxos*): Likewise.
25 (spu*-*-*): Likewise.
26 * fork-child.c: New file.
27 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
28 and "environ.h".
29 (linux_ptrace_fun): New function.
30 (linux_create_inferior): Adjust function prototype to reflect
31 change on "target.h". Adjust function code to use
32 "fork_inferior".
33 (linux_request_interrupt): Delete "signal_pid".
34 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
35 (lynx_ptrace_fun): New function.
36 (lynx_create_inferior): Adjust function prototype to reflect
37 change on "target.h". Adjust function code to use
38 "fork_inferior".
39 * nto-low.c (nto_create_inferior): Adjust function prototype and
40 code to reflect change on "target.h". Update comments.
41 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
42 "common-terminal.h" and "environ.h".
43 (terminal_fd): Moved to fork-child.c.
44 (old_foreground_pgrp): Likewise.
45 (restore_old_foreground_pgrp): Likewise.
46 (last_status): Make it global.
47 (last_ptid): Likewise.
48 (our_environ): New variable.
49 (startup_with_shell): Likewise.
50 (program_name): Likewise.
51 (program_argv): Rename to...
52 (program_args): ...this.
53 (wrapper_argv): New variable.
54 (start_inferior): Delete function.
55 (get_exec_wrapper): New function.
56 (get_exec_file): Likewise.
57 (get_environ): Likewise.
58 (prefork_hook): Likewise.
59 (post_fork_inferior): Likewise.
60 (postfork_hook): Likewise.
61 (postfork_child_hook): Likewise.
62 (handle_v_run): Update code to deal with arguments coming from the
63 remote host. Update calls from "start_inferior" to
64 "create_inferior".
65 (captured_main): Likewise. Initialize environment variable. Call
66 "have_job_control".
67 * server.h (post_fork_inferior): New prototype.
68 (get_environ): Likewise.
69 (last_status): Declare.
70 (last_ptid): Likewise.
71 (signal_pid): Likewise.
72 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
73 (spu_ptrace_fun): New function.
74 (spu_create_inferior): Adjust function prototype to reflect change
75 on "target.h". Adjust function code to use "fork_inferior".
76 * target.c (target_terminal_init): New function.
77 (target_terminal_inferior): Likewise.
78 (target_terminal_ours): Likewise.
79 * target.h: Include <vector>.
80 (struct target_ops) <create_inferior>: Update prototype.
81 (create_inferior): Update macro.
82 * utils.c (gdb_flush_out_err): New function.
83 * win32-low.c (win32_create_inferior): Adjust function prototype
84 and code to reflect change on "target.h".
85
86 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
87
88 * inferiors.c (switch_to_thread): New function.
89
90 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
91
92 * Makefile.in (SFILE): Add "common/job-control.c".
93 (OBS): Add "job-control.o".
94
95 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
96
97 * Makefile: Remove "@host_makefile_frag@".
98
99 2017-05-05 Pedro Alves <palves@redhat.com>
100
101 * configure: Regenerate.
102
103 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
104
105 * configure: Regenerate.
106
107 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
110 software_single_step change of return type to
111 std::vector<CORE_ADDR>.
112 * linux-low.c (install_software_single_step_breakpoints):
113 Likewise.
114 * linux-low.h (install_software_single_step_breakpoints):
115 Likewise.
116
117 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
118
119 * remote-utils.c: Include "gdb_termios.h" instead of
120 "terminal.h".
121 * terminal.h: Delete file.
122
123 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
124
125 * server.c: Include <vector>.
126 <program_argv, wrapper_argv>: Convert to std::vector.
127 (start_inferior): Rewrite function to use C++.
128 (handle_v_run): Likewise. Update code that calculates the argv
129 based on the vRun packet; use C++.
130 (captured_main): Likewise.
131
132 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
133
134 * server.c (handle_v_cont): Initialize thread_resume::thread
135 with null_ptid.
136
137 2017-04-05 Pedro Alves <palves@redhat.com>
138
139 * configure: Regenerate.
140
141 2017-04-05 Pedro Alves <palves@redhat.com>
142
143 * gdbreplay.c (sync_error): Constify.
144 * linux-x86-low.c (push_opcode): Constify.
145
146 2017-04-05 Pedro Alves <palves@redhat.com>
147
148 * win32-low.c (get_child_debug_event)
149 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
150 Report TARGET_WAITKIND_SPURIOUS instead.
151
152 2017-04-05 Pedro Alves <palves@redhat.com>
153
154 * remote-utils.c (remote_prepare, remote_open): Constify.
155 * remote-utils.h (remote_prepare, remote_open): Constify.
156 * server.c (captured_main): Constify 'port' handling.
157
158 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
159
160 * Makefile.in (clean): Clear .deps.
161
162 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * .gitignore: Remove generated files, replace with wildcard.
165 * (clean): Replace removal of generated files with wildcard.
166 (version.c): Replace with...
167 (version-generated.c): ...this.
168 (xml-builtin.c): Replace with...
169 (xml-builtin-generated.c): ...this.
170 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
171 (%.c: *regformats*): Replace with...
172 (%-generated.c: *regformats*): ...this.
173
174 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
175
176 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
177 (xtensa_fill_gregset): Call collect_register_by_name for
178 threadptr register.
179 (xtensa_store_gregset): Call supply_register_by_name for
180 threadptr register.
181
182 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
183
184 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
185 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
186 (xtensa_store_gregset): Call supply_register for all registers in
187 a0_regnum..a0_regnum + C0_NREGS range.
188
189 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
192 (ax-ipa.o: ax.c): Remove.
193 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
194 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
195 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
196 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
197 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
198
199 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
202 (print-utils-ipa.o: ../common/print-utils.c): Remove.
203 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
204 (errors-ipa.o: ../common/errors.c): Remove.
205 (format-ipa.o: ../common/format.c): Remove.
206 (common-utils-ipa.o: ../common/common-utils.c): Remove.
207
208 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
209
210 * Makefile.in (%-ipa.o: %.c): New rule.
211 (tracepoint-ipa.o: tracepoint.c): Remove.
212 (utils-ipa.o: utils.c): Remove.
213 (remote-utils-ipa.o: remote-utils.c): Remove.
214 (regcache-ipa.o: regcache.c): Remove.
215 (i386-linux-ipa.o: i386-linux.c): Remove.
216 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
217 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
218 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
219 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
220 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
221 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
222 (amd64-linux-ipa.o: amd64-linux.c): Remove.
223 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
224 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
225 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
226 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
227 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
228 (aarch64-ipa.o: aarch64.c): Remove.
229 (s390-linux32-ipa.o: s390-linux32.c): Remove.
230 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
231 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
232 (s390-linux64-ipa.o: s390-linux64.c): Remove.
233 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
234 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
235 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
236 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
237 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
238 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
239 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
240 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
241 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
242 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
243 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
244 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
245 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
246 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
247 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
248 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
249 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
250 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
251 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
252 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
253 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
254 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
255 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
256 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
257 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
258 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
259 (tdesc-ipa.o: tdesc.c): Remove.
260 (x32-linux-ipa.o: x32-linux.c): Remove.
261 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
262 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
263
264 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * Makefile.in (%.o: ../arch/%.c): New rule.
267 (arm.o: ../arch/arm.c): Remove.
268 (arm-linux.o: ../arch/arm-linux.c): Remove.
269 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
270 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
271
272 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * Makefile.in (%.o: ../nat/%.c): New rule.
275 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
276 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
277 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
278 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
279 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
280 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
281 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
282 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
283 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
284 (linux-personality.o: ../nat/linux-personality.c): Remove.
285 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
286 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
287 (x86-linux.o: ../nat/x86-linux.c): Remove.
288 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
289 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
290
291 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * Makefile.in (%.o: ../common/%.c): New rule.
294 (signals.o: ../common/signals.c): Remove.
295 (print-utils.o: ../common/print-utils.c): Remove.
296 (rsp-low.o: ../common/rsp-low.c): Remove.
297 (common-utils.o: ../common/common-utils.c): Remove.
298 (posix-strerror.o: ../common/posix-strerror.c): Remove.
299 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
300 (vec.o: ../common/vec.c): Remove.
301 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
302 (xml-utils.o: ../common/xml-utils.c): Remove.
303 (ptid.o: ../common/ptid.c): Remove.
304 (buffer.o: ../common/buffer.c): Remove.
305 (format.o: ../common/format.c): Remove.
306 (filestuff.o: ../common/filestuff.c): Remove.
307 (agent.o: ../common/agent.c): Remove.
308 (errors.o: ../common/errors.c): Remove.
309 (environ.o: ../common/environ.c): Remove.
310 (common-debug.o: ../common/common-debug.c): Remove.
311 (cleanups.o: ../common/cleanups.c): Remove.
312 (common-exceptions.o: ../common/common-exceptions.c): Remove.
313 (fileio.o: ../common/fileio.c): Remove.
314 (common-regcache.o: ../common/common-regcache.c): Remove.
315 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
316 (new-op.o: ../common/new-op.c): Remove.
317 (btrace-common.o: ../common/btrace-common.c): Remove.
318
319 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
320
321 * Makefile.in (%.o: ../target/%.c): New rule.
322 (waitstatus.o: ../target/waitstatus.c): Remove.
323
324 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * Makefile.in
327 (%.c: ../regformats/%.dat,
328 (%.c: ../regformats/arm/%.dat,
329 (%.c: ../regformats/i386/%.dat,
330 (%.c: ../regformats/rs6000/%.dat): New rules.
331 (aarch64.c): Remove.
332 (reg-arm.c): Remove.
333 (arm-with-iwmmxt.c): Remove.
334 (arm-with-vfpv2.c): Remove.
335 (arm-with-vfpv3.c): Remove.
336 (arm-with-neon.c): Remove.
337 (reg-bfin.c): Remove.
338 (reg-cris.c): Remove.
339 (reg-crisv32.c): Remove.
340 (i386.c): Remove.
341 (i386-linux.c): Remove.
342 (i386-avx.c): Remove.
343 (i386-avx-linux.c): Remove.
344 (i386-avx-avx512.c): Remove.
345 (i386-avx-avx512-linux.c): Remove.
346 (i386-mpx.c): Remove.
347 (i386-mpx-linux.c): Remove.
348 (i386-avx-mpx-avx512-pku.c): Remove.
349 (i386-avx-mpx-avx512-pku-linux.c): Remove.
350 (i386-avx-mpx.c): Remove.
351 (i386-avx-mpx-linux.c): Remove.
352 (i386-mmx.c): Remove.
353 (i386-mmx-linux.c): Remove.
354 (reg-ia64.c): Remove.
355 (reg-m32r.c): Remove.
356 (reg-m68k.c): Remove.
357 (reg-cf.c): Remove.
358 (mips-linux.c): Remove.
359 (mips-dsp-linux.c): Remove.
360 (mips64-linux.c): Remove.
361 (mips64-dsp-linux.c): Remove.
362 (nios2-linux.c): Remove.
363 (powerpc-32.c): Remove.
364 (powerpc-32l.c): Remove.
365 (powerpc-altivec32l.c): Remove.
366 (powerpc-cell32l.c): Remove.
367 (powerpc-vsx32l.c): Remove.
368 (powerpc-isa205-32l.c): Remove.
369 (powerpc-isa205-altivec32l.c): Remove.
370 (powerpc-isa205-vsx32l.c): Remove.
371 (powerpc-e500l.c): Remove.
372 (powerpc-64l.c): Remove.
373 (powerpc-altivec64l.c): Remove.
374 (powerpc-cell64l.c): Remove.
375 (powerpc-vsx64l.c): Remove.
376 (powerpc-isa205-64l.c): Remove.
377 (powerpc-isa205-altivec64l.c): Remove.
378 (powerpc-isa205-vsx64l.c): Remove.
379 (s390-linux32.c): Remove.
380 (s390-linux32v1.c): Remove.
381 (s390-linux32v2.c): Remove.
382 (s390-linux64.c): Remove.
383 (s390-linux64v1.c): Remove.
384 (s390-linux64v2.c): Remove.
385 (s390-te-linux64.c): Remove.
386 (s390-vx-linux64.c): Remove.
387 (s390-tevx-linux64.c): Remove.
388 (s390x-linux64.c): Remove.
389 (s390x-linux64v1.c): Remove.
390 (s390x-linux64v2.c): Remove.
391 (s390x-te-linux64.c): Remove.
392 (s390x-vx-linux64.c): Remove.
393 (s390x-tevx-linux64.c): Remove.
394 (tic6x-c64xp-linux.c): Remove.
395 (tic6x-c64x-linux.c): Remove.
396 (tic6x-c62x-linux.c): Remove.
397 (reg-sh.c): Remove.
398 (reg-sparc64.c): Remove.
399 (reg-spu.c): Remove.
400 (amd64.c): Remove.
401 (amd64-linux.c): Remove.
402 (amd64-avx.c): Remove.
403 (amd64-avx-linux.c): Remove.
404 (amd64-avx-avx512.c): Remove.
405 (amd64-avx-avx512-linux.c): Remove.
406 (amd64-mpx.c): Remove.
407 (amd64-mpx-linux.c): Remove.
408 (amd64-avx-mpx-avx512-pku.c): Remove.
409 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
410 (amd64-avx-mpx.c): Remove.
411 (amd64-avx-mpx-linux.c): Remove.
412 (x32.c): Remove.
413 (x32-linux.c): Remove.
414 (x32-avx.c): Remove.
415 (x32-avx-linux.c): Remove.
416 (x32-avx-avx512.c): Remove.
417 (x32-avx-avx512-linux.c): Remove.
418 (reg-xtensa.c): Remove.
419 (reg-tilegx.c): Remove.
420 (reg-tilegx32.c): Remove.
421
422 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
423
424 * Makefile.in (SFILES): Add "common/environ.c".
425 (OBJS): Add "common/environ.h".
426
427 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
428
429 * configure.ac: Check if the fs_base and gs_base members of
430 `struct user_regs_struct' exist.
431 * config.in: Regenerated.
432 * configure: Likewise.
433
434 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
435
436 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
437 target_read_memory.
438 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
439 (get_next_pcs_syscall_next_pc): Likewise.
440
441 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
442
443 * win32-i386-low.c: Fix incorrect reference to a couple source files.
444 * nto-x86-low.c: Likewise.
445
446 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * Makefile.in: Include disable-implicit-rules.mk.
449
450 2016-11-23 Pedro Alves <palves@redhat.com>
451
452 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
453 (debug_vprintf): Use std::chrono::steady_clock instead of
454 gettimeofday. Use '.' instead of ':'.
455 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
456 (get_timestamp): Use std::chrono::steady_clock instead of
457 gettimeofday.
458
459 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * Makefile.in: Fix whitespace formatting.
462
463 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
464
465 * Makefile.in (SFILES, OBS): Flatten list and order
466 alphabetically.
467
468 2016-11-23 Pedro Alves <palves@redhat.com>
469
470 * event-loop.c (handle_file_event): Use warning.
471 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
472 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
473 Use warning.
474
475 2016-11-23 Pedro Alves <palves@redhat.com>
476
477 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
478 output.
479 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
480 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
481 debug_printf and debug_flush for debug output.
482 * server.c (handle_general_set): Likewise.
483 * thread-db.c (try_thread_db_load): Use debug_printf for debug
484 output.
485
486 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
487
488 * Makefile.in (.c.o): Replace rule with ...
489 (%.o: %.c): ... this one.
490
491 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
492
493 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
494 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
495 make.
496 * configure.ac: Remove checks for the make program.
497 * configure: Re-generate.
498
499 2016-10-28 Pedro Alves <palves@redhat.com>
500
501 * Makefile.in (CXX_DIALECT): Get from configure.
502 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
503 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
504 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
505 * config.in: Regenerate.
506 * configure: Regenerate.
507
508 2016-10-27 Yao Qi <yao.qi@linaro.org>
509
510 * linux-low.c (linux_supports_range_stepping): Return true if
511 can_software_single_step return true.
512
513 2016-10-27 Yao Qi <yao.qi@linaro.org>
514
515 * inferiors.c (find_inferior_in_random): New function.
516 * inferiors.h (find_inferior_in_random): Declare.
517 * linux-low.c (linux_wait_for_event_filtered): Call
518 find_inferior_in_random instead of find_inferior.
519
520 2016-10-27 Yao Qi <yao.qi@linaro.org>
521
522 * linux-low.c (linux_wait_1): If single-step breakpoints are
523 inserted, remove them.
524
525 2016-10-26 Pedro Alves <palves@redhat.com>
526
527 * linux-low.c (handle_extended_wait): Link parent/child fork
528 threads.
529 (linux_wait_1): Unlink them.
530 (linux_set_resume_request): Ignore resume requests for
531 already-resumed and unhandled fork child threads.
532 * linux-low.h (struct lwp_info) <fork_relative>: New field.
533 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
534 New functions.
535 (handle_v_requests) <vCont>: Don't call require_running.
536 * server.h (in_queued_stop_replies): New declaration.
537
538 2016-10-24 Yao Qi <yao.qi@linaro.org>
539
540 PR server/20733
541 * linux-aarch64-low.c (append_insns): Cast the return value to
542 'uint32_t *'.
543
544 2016-10-10 Yao Qi <yao.qi@linaro.org>
545
546 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
547
548 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
549
550 * target.c (target_supports_multi_process): New function, moved
551 from...
552 * target.h (target_supports_multi_process): ... here. Remove
553 macro.
554
555 2016-10-05 Tom Tromey <tom@tromey.com>
556
557 PR remote/20655:
558 * tracepoint.c (handle_tracepoint_bkpts): Check
559 ipa_error_tracepoint, not ipa_stopping_tracepoint.
560
561 2016-10-05 Yao Qi <yao.qi@linaro.org>
562
563 * configure.srv: Update the path of arm-*.xml files.
564
565 2016-10-05 Terry Guo <terry.guo@arm.com>
566 Yao Qi <yao.qi@linaro.org>
567
568 * Makefile.in: Adjust the path of rules.
569 * configure.srv: Update the path of xml files.
570 * regformats/arm-with-iwmmxt.dat: Regenerated.
571 * regformats/arm-with-neon.dat: Likewise.
572 * regformats/arm-with-vfpv2.dat: Likewise.
573 * regformats/arm-with-vfpv3.dat Likewise.
574
575 2016-09-30 Yao Qi <yao.qi@linaro.org>
576
577 PR gdbserver/20627
578 * target.c (target_stop_and_wait): Don't call
579 target_continue_no_signal, use resume_stop instead.
580
581 2016-09-26 Yao Qi <yao.qi@linaro.org>
582
583 * linux-low.c (linux_wait_1): Call debug_exit.
584
585 2016-09-23 Pedro Alves <palves@redhat.com>
586
587 * Makefile.in (SFILES): Add common/new-op.c.
588 (OBS): Add common/new-op.o.
589 (new-op.o): New rule.
590
591 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
592
593 * .gitinore: Ignore more files.
594
595 2016-09-21 Yao Qi <yao.qi@linaro.org>
596
597 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
598 23.
599
600 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
601
602 * server.c (start_inferior): Call target_mourn_inferior instead of
603 mourn_inferior; pass ptid_t argument to it.
604 (resume): Likewise.
605 (handle_target_event): Likewise.
606 * target.c (target_mourn_inferior): New function.
607 * target.h (mourn_inferior): Delete macro.
608
609 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
610
611 * linux-low.c (lwp_is_stepping): New function.
612
613 2016-09-06 Carl Love <cel@us.ibm.com>
614
615 * server.c (start_inferior): Fixed comment, requested comment change
616 didn't get updated correctly. Removed reference to ptrace () call as
617 it is only true on Linux systems.
618
619 2016-09-06 Carl Love <cel@us.ibm.com>
620
621 * server.c (start_inferior): Do not call
622 function target_post_create_inferior () if the
623 inferior process has already exited.
624
625 2016-09-05 Pedro Alves <palves@redhat.com>
626
627 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
628 (COMPILE.pre, CC_LD): Use CXX directly.
629 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
630 * acinclude.m4: Don't include build-with-cxx.m4.
631 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
632 * configure: Regenerate.
633
634 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
635
636 PR gdb/19495
637 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
638 call writing data to own_buf.
639
640 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
641
642 * target.c (mywait): Call target_wait instead of
643 the_target->wait.
644 (target_wait): New function.
645
646 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
647
648 * server.c (start_inferior): New variable 'ptid'. Replace calls
649 to the_target->resume by target_continue{,_no_signal}, depending
650 on the case.
651 * target.c (target_stop_and_wait): Call target_continue_no_signal
652 instead of the_target->resume.
653 (target_continue): New function.
654
655 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
656
657 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
658
659 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
660
661 PR server/20491
662 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
663 ps_prochandle.
664 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
665 * linux-arm-low.c (ps_get_thread_area): Likewise.
666 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
667 * linux-m68k-low.c (ps_get_thread_area): Likewise.
668 * linux-mips-low.c (ps_get_thread_area): Likewise.
669 * linux-nios2-low.c (ps_get_thread_area): Likewise.
670 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
671 * linux-x86-low.c (ps_get_thread_area): Likewise.
672 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
673
674 2016-08-19 Pedro Alves <palves@redhat.com>
675
676 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
677
678 2016-08-19 Pedro Alves <palves@redhat.com>
679
680 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
681 comment. Use memcpy instead of casting through unsigned long.
682
683 2016-08-19 Pedro Alves <palves@redhat.com>
684
685 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
686 allocating around 0x80000000.
687
688 2016-08-19 Pedro Alves <palves@redhat.com>
689
690 PR gdb/20415
691 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
692 (x32-avx512-linux-ipa.o): New rules.
693 * configure.ac (x86_64-*-linux*): New x32 check.
694 * configure.srv (ipa_x32_linux_regobj): New.
695 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
696 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
697 descriptions.
698 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
699 descriptions.
700 * configure: Regenerate.
701
702 2016-08-09 Pedro Alves <palves@redhat.com>
703
704 PR gdb/18653
705 * Makefile.in (OBS): Add signals-state-save-restore.o.
706 (signals-state-save-restore.o): New rule.
707 * config.in: Regenerate.
708 * configure: Regenerate.
709 * linux-low.c: Include "signals-state-save-restore.h".
710 (linux_create_inferior): Call
711 restore_original_signals_state.
712 * server.c: Include "dispositions-save-restore.h".
713 (captured_main): Call save_original_signals_state.
714
715 2016-08-05 Pedro Alves <palves@redhat.com>
716
717 * configure: Regenerate.
718
719 2016-08-04 Yao Qi <yao.qi@linaro.org>
720
721 * linux-low.c (regsets_fetch_inferior_registers): Check
722 errno is ESRCH or not.
723
724 2016-08-02 Yao Qi <yao.qi@linaro.org>
725
726 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
727 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
728 (thread_db_load_search): Update.
729 (try_thread_db_load_1): Don't look for td_ta_event_addr,
730 td_ta_set_event and td_ta_event_getmsg.
731
732 2016-07-26 Pedro Alves <palves@redhat.com>
733
734 PR server/20414
735 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
736 of unsigned long for 64-bit registers and use uint32_t instead of
737 unsigned int for 32-bit registers.
738
739 2016-07-26 Pedro Alves <palves@redhat.com>
740
741 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
742 to 'ptrace'.
743
744 2016-07-21 Tom Tromey <tom@tromey.com>
745
746 * configure: Rebuild.
747
748 2016-07-21 Yao Qi <yao.qi@linaro.org>
749
750 * mem-break.c (find_gdb_breakpoint): Cast bp to
751 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
752
753 2016-07-21 Yao Qi <yao.qi@linaro.org>
754
755 * server.c (handle_v_requests): Support s and S actions
756 if target_supports_software_single_step return true.
757
758 2016-07-21 Yao Qi <yao.qi@linaro.org>
759
760 * linux-low.c (resume_stopped_resumed_lwps): If resume request
761 is resume_step, call maybe_hw_step.
762 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
763 and unstop them.
764 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
765 breakpoints or not.
766 (proceed_one_lwp): If resume request is resume_step, install
767 reinsert breakpoints and call maybe_hw_step.
768
769 2016-07-21 Yao Qi <yao.qi@linaro.org>
770
771 * linux-low.c (proceed_one_lwp): Declare.
772 (linux_resume_one_thread): Remove local variable 'step'.
773 Lift code enqueue signal. Call proceed_one_lwp instead of
774 linux_resume_one_lwp.
775
776 2016-07-21 Yao Qi <yao.qi@linaro.org>
777
778 * linux-low.c (linux_resume_one_thread): Call
779 enqueue_pending_signal.
780
781 2016-07-21 Yao Qi <yao.qi@linaro.org>
782
783 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
784 * inferiors.c (do_restore_current_thread_cleanup): New function.
785 (make_cleanup_restore_current_thread): Likewise.
786 * linux-low.c (install_software_single_step_breakpoints): Call
787 make_cleanup_restore_current_thread. Switch current_thread to
788 thread.
789
790 2016-07-21 Yao Qi <yao.qi@linaro.org>
791
792 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
793 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
794 (clone_one_breakpoint): Likewise.
795 (delete_reinsert_breakpoints): Change parameter to thread.
796 Callers updated.
797 (has_reinsert_breakpoints): Likewise.
798 (uninsert_reinsert_breakpoints): Likewise.
799 (reinsert_reinsert_breakpoints): Likewise.
800 * mem-break.h (set_reinsert_breakpoint): Update declaration.
801 (delete_reinsert_breakpoints): Likewise.
802 (reinsert_reinsert_breakpoints): Likewise.
803 (uninsert_reinsert_breakpoints): Likewise.
804 (has_reinsert_breakpoints): Likewise.
805
806 2016-07-21 Yao Qi <yao.qi@linaro.org>
807
808 * inferiors.c (get_thread_process): Make parameter const.
809 * inferiors.h (get_thread_process): Update declaration.
810 * mem-break.c (clone_all_breakpoints): Remove all parameters.
811 Add new parameters child_thread and parent_thread. Callers
812 updated.
813 * mem-break.h (clone_all_breakpoints): Update declaration.
814
815 2016-07-21 Yao Qi <yao.qi@linaro.org>
816
817 * mem-break.c (struct breakpoint) <cond_list>: Remove.
818 <command_list, handler>: Remove.
819 (struct gdb_breakpoint): New.
820 (struct other_breakpoint): New.
821 (struct reinsert_breakpoint): New.
822 (is_gdb_breakpoint): New function.
823 (any_persistent_commands): Update command_list if
824 is_gdb_breakpoint returns true.
825 (set_breakpoint): Create breakpoints according to their types.
826 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
827 (set_gdb_breakpoint_1): Likewise.
828 (set_gdb_breakpoint): Likewise.
829 (clear_breakpoint_conditions): Change parameter type to
830 'struct gdb_breakpoint *'.
831 (clear_breakpoint_commands): Likewise.
832 (clear_breakpoint_conditions_and_commands): Likewise.
833 (add_condition_to_breakpoint): Likewise.
834 (add_breakpoint_condition): Likewise.
835 (add_commands_to_breakpoint): Likewise.
836 (check_breakpoints): Check other_breakpoint.
837 (clone_one_breakpoint): Clone breakpopint according to its type.
838 * mem-break.h (struct gdb_breakpoint): Declare.
839 (set_gdb_breakpoint): Update declaration.
840 (clear_breakpoint_conditions_and_commands): Likewise.
841 (add_breakpoint_condition): Likewise.
842 (add_breakpoint_commands): Likewise.
843 * server.c (process_point_options): Change parameter type to
844 'struct gdb_breakpoint *'.
845
846 2016-07-21 Yao Qi <yao.qi@linaro.org>
847
848 * mem-break.c (set_breakpoint_at): Rename it to ...
849 (set_breakpoint_type_at): ... it.
850 (set_breakpoint_at): Call set_breakpoint_type_at.
851 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
852 * mem-break.h (set_breakpoint_at): Update comments.
853
854 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
855
856 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
857 to buf parameter.
858 (nios2_store_gregset): Likewise.
859
860 2016-07-01 Pedro Alves <palves@redhat.com>
861 Antoine Tremblay <antoine.tremblay@ericsson.com>
862
863 * linux-low.c: Change interface to take the target lwp_info
864 pointer directly and return void. Handle detaching from a zombie
865 thread.
866 (linux_detach_lwp_callback): New function.
867 (linux_detach): Detach from the leader thread after detaching from
868 the clone threads.
869
870 2016-06-28 Yao Qi <yao.qi@linaro.org>
871
872 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
873 for variable new_offset.
874 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
875 (aarch64_ftrace_insn_reloc_cb): Likewise.
876 (aarch64_ftrace_insn_reloc_tb): Likewise.
877 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
878 PRIx64 instead of PRIx32.
879
880 2016-06-28 Yao Qi <yao.qi@linaro.org>
881
882 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
883 (the_low_target): Install arm_get_syscall_trapinfo.
884
885 2016-06-28 Yao Qi <yao.qi@linaro.org>
886
887 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
888 function.
889 (the_low_target): Install aarch64_get_syscall_trapinfo.
890
891 2016-06-28 Yao Qi <yao.qi@linaro.org>
892
893 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
894 Callers updated.
895 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
896 Remove parameter sysno.
897 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
898 sysret.
899
900 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
901
902 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
903 (s390_emit_ne_goto): Likewise.
904 (s390_emit_lt_goto): Likewise.
905 (s390_emit_le_goto): Likewise.
906 (s390_emit_gt_goto): Likewise.
907 (s390_emit_ge_goto): Likewise.
908 (s390x_emit_eq_goto): Likewise.
909 (s390x_emit_ne_goto): Likewise.
910 (s390x_emit_lt_goto): Likewise.
911 (s390x_emit_le_goto): Likewise.
912 (s390x_emit_gt_goto): Likewise.
913 (s390x_emit_ge_goto): Likewise.
914 (s390_emit_ops_impl): Mark variable static.
915 (s390x_emit_ops): Likewise.
916
917 2016-06-17 Yao Qi <yao.qi@linaro.org>
918
919 * linux-low.c (handle_extended_wait): Call
920 uninsert_reinsert_breakpoints for the parent process. Remove
921 reinsert breakpoints from the child process. Reinsert them to
922 the parent process when vfork is done.
923 * mem-break.c (uninsert_reinsert_breakpoints): New function.
924 (reinsert_reinsert_breakpoints): New function.
925 * mem-break.h (uninsert_reinsert_breakpoints): Declare
926 (reinsert_reinsert_breakpoints): Declare.
927
928 2016-06-17 Yao Qi <yao.qi@linaro.org>
929
930 * linux-low.c (handle_extended_wait): If the parent is doing
931 step-over, remove the reinsert breakpoints from the forked child.
932
933 2016-06-17 Yao Qi <yao.qi@linaro.org>
934
935 * linux-low.c (unsuspend_all_lwps): Declare.
936 (linux_low_filter_event): If thread exited, call finish_step_over.
937 If step-over is finished, unsuspend other threads.
938
939 2016-06-17 Yao Qi <yao.qi@linaro.org>
940
941 * linux-low.c (linux_resume_one_lwp_throw): Assert
942 has_reinsert_breakpoints returns false.
943 * mem-break.c (delete_disabled_breakpoints): Assert
944 bp type isn't reinsert_breakpoint.
945
946 2016-06-17 Yao Qi <yao.qi@linaro.org>
947
948 * linux-low.c (maybe_hw_step): New function.
949 (linux_resume_one_lwp_throw): Call maybe_hw_step.
950 (finish_step_over): Switch current_thread to lwp temporarily,
951 and assert has_reinsert_breakpoints returns true.
952 (proceed_one_lwp): Call maybe_hw_step.
953 * mem-break.c (has_reinsert_breakpoints): New function.
954 * mem-break.h (has_reinsert_breakpoints): Declare.
955
956 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
957
958 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
959
960 2016-05-17 Yao Qi <yao.qi@linaro.org>
961
962 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
963 instead of find_inferior.
964
965 2016-05-05 Yao Qi <yao.qi@linaro.org>
966
967 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
968 Initialize res to zero.
969
970 2016-05-05 Yao Qi <yao.qi@linaro.org>
971
972 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
973 to uint32_t.
974
975 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
976
977 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
978 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
979 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
980
981 2016-04-28 Par Olsson <par.olsson@windriver.com>
982 Simon Marchi <simon.marchi@ericsson.com>
983
984 * tracepoint.c (write_inferior_int8): New function.
985 (cmd_qtenable_disable): Write enable flag using
986 write_inferior_int8.
987
988 2016-04-25 Yao Qi <yao.qi@linaro.org>
989
990 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
991 (need_step_over_p): Return zero if the LWP has pending signals
992 can be delivered on software single step target.
993
994 2016-04-25 Yao Qi <yao.qi@linaro.org>
995
996 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
997 return instead of error.
998
999 2016-04-22 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1002 to 23.
1003
1004 2016-04-22 Yao Qi <yao.qi@linaro.org>
1005
1006 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1007 signal when stepping over breakpoint with software single
1008 step.
1009
1010 2016-04-21 Pedro Alves <palves@redhat.com>
1011
1012 * linux-s390-low.c (s390_collect_ptrace_register)
1013 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1014 add casts.
1015 (s390_check_regset): Use void * instead of gdb_byte *.
1016
1017 2016-04-20 Pedro Alves <palves@redhat.com>
1018
1019 * configure: Renegerate.
1020
1021 2016-04-20 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1024 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1025 number 16.
1026 (arm_store_gregset): Likewise.
1027
1028 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1029
1030 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1031 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1032 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1033 (amd64-avx-mpx-linux.c): New rules.
1034 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1035 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1036 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1037 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1038 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1039 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1040 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1041 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1042 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1043 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1044 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1045 * linux-x86-low.c (x86_linux_read_description): Add case for
1046 X86_XSTATE_AVX_MPX_MASK.
1047 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1048 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1049 init_registers_i386_avx_mpx_linux.
1050 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1051 (initialize_low_tracepoint): Call
1052 init_registers_i386_avx_mpx_linux.
1053 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1054 (initialize_low_tracepoint): Call
1055 init_registers_amd64_avx_mpx_linux.
1056 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1057 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1058 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1059 declarations.
1060
1061 2016-04-18 Pedro Alves <palves@redhat.com>
1062
1063 * configure: Regenerate.
1064
1065 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1066
1067 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1068 (aarch64_emit_sub): Likewise.
1069
1070 2016-04-12 Pedro Alves <palves@redhat.com>
1071
1072 * utils.c (prepare_to_throw_exception): Delete.
1073
1074 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1077
1078 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1079
1080 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1081
1082 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1083
1084 * linux-aarch64-ipa.c: Add <elf.h> include.
1085 * linux-ppc-ipa.c: Add <elf.h> include.
1086 * linux-s390-ipa.c: Add <elf.h> include.
1087
1088 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1089
1090 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1091 (get_raw_reg_ptr): Likewise.
1092 (get_trace_state_variable_value_ptr): Likewise.
1093 (set_trace_state_variable_value_ptr): Likewise.
1094 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1095 char *.
1096
1097 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1098 Marcin Kościelnicki <koriakin@0x04.net>
1099
1100 PR/17221
1101 * linux-ppc-low.c (emit_insns): New function.
1102 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1103 (ppc_emit_prologue): New function.
1104 (ppc_emit_epilogue): New function.
1105 (ppc_emit_add): New function.
1106 (ppc_emit_sub): New function.
1107 (ppc_emit_mul): New function.
1108 (ppc_emit_lsh): New function.
1109 (ppc_emit_rsh_signed): New function.
1110 (ppc_emit_rsh_unsigned): New function.
1111 (ppc_emit_ext): New function.
1112 (ppc_emit_zero_ext): New function.
1113 (ppc_emit_log_not): New function.
1114 (ppc_emit_bit_and): New function.
1115 (ppc_emit_bit_or): New function.
1116 (ppc_emit_bit_xor): New function.
1117 (ppc_emit_bit_not): New function.
1118 (ppc_emit_equal): New function.
1119 (ppc_emit_less_signed): New function.
1120 (ppc_emit_less_unsigned): New function.
1121 (ppc_emit_ref): New function.
1122 (ppc_emit_const): New function.
1123 (ppc_emit_reg): New function.
1124 (ppc_emit_pop): New function.
1125 (ppc_emit_stack_flush): New function.
1126 (ppc_emit_swap): New function.
1127 (ppc_emit_stack_adjust): New function.
1128 (ppc_emit_call): New function.
1129 (ppc_emit_int_call_1): New function.
1130 (ppc_emit_void_call_2): New function.
1131 (ppc_emit_if_goto): New function.
1132 (ppc_emit_goto): New function.
1133 (ppc_emit_eq_goto): New function.
1134 (ppc_emit_ne_goto): New function.
1135 (ppc_emit_lt_goto): New function.
1136 (ppc_emit_le_goto): New function.
1137 (ppc_emit_gt_goto): New function.
1138 (ppc_emit_ge_goto): New function.
1139 (ppc_write_goto_address): New function.
1140 (ppc_emit_ops_impl): New static variable.
1141 (ppc64v1_emit_prologue): New function.
1142 (ppc64v2_emit_prologue): New function.
1143 (ppc64_emit_epilogue): New function.
1144 (ppc64_emit_add): New function.
1145 (ppc64_emit_sub): New function.
1146 (ppc64_emit_mul): New function.
1147 (ppc64_emit_lsh): New function.
1148 (ppc64_emit_rsh_signed): New function.
1149 (ppc64_emit_rsh_unsigned): New function.
1150 (ppc64_emit_ext): New function.
1151 (ppc64_emit_zero_ext): New function.
1152 (ppc64_emit_log_not): New function.
1153 (ppc64_emit_bit_and): New function.
1154 (ppc64_emit_bit_or): New function.
1155 (ppc64_emit_bit_xor): New function.
1156 (ppc64_emit_bit_not): New function.
1157 (ppc64_emit_equal): New function.
1158 (ppc64_emit_less_signed): New function.
1159 (ppc64_emit_less_unsigned): New function.
1160 (ppc64_emit_ref): New function.
1161 (ppc64_emit_const): New function.
1162 (ppc64v1_emit_reg): New function.
1163 (ppc64v2_emit_reg): New function.
1164 (ppc64_emit_pop): New function.
1165 (ppc64_emit_stack_flush): New function.
1166 (ppc64_emit_swap): New function.
1167 (ppc64v1_emit_call): New function.
1168 (ppc64v2_emit_call): New function.
1169 (ppc64v1_emit_int_call_1): New function.
1170 (ppc64v2_emit_int_call_1): New function.
1171 (ppc64v1_emit_void_call_2): New function.
1172 (ppc64v2_emit_void_call_2): New function.
1173 (ppc64_emit_if_goto): New function.
1174 (ppc64_emit_eq_goto): New function.
1175 (ppc64_emit_ne_goto): New function.
1176 (ppc64_emit_lt_goto): New function.
1177 (ppc64_emit_le_goto): New function.
1178 (ppc64_emit_gt_goto): New function.
1179 (ppc64_emit_ge_goto): New function.
1180 (ppc64v1_emit_ops_impl): New static variable.
1181 (ppc64v2_emit_ops_impl): New static variable.
1182 (ppc_emit_ops): New function.
1183 (linux_low_target): Wire in ppc_emit_ops.
1184
1185 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1186 Marcin Kościelnicki <koriakin@0x04.net>
1187
1188 PR/17221
1189 * Makefile.in: Add powerpc-*-ipa.o
1190 * configure.srv: Add ipa_obj for powerpc*-linux.
1191 * linux-ppc-ipa.c: New file.
1192 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1193 includes.
1194 (PPC_FIELD): New macro.
1195 (PPC_SEXT): New macro.
1196 (PPC_OP6): New macro.
1197 (PPC_BO): New macro.
1198 (PPC_LI): New macro.
1199 (PPC_BD): New macro.
1200 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1201 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1202 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1203 (ppc_get_thread_area): New function.
1204 (is_elfv2_inferior): New function.
1205 (gen_ds_form): New function.
1206 (GEN_STD): New macro.
1207 (GEN_STDU): New macro.
1208 (GEN_LD): New macro.
1209 (GEN_LDU): New macro.
1210 (gen_d_form): New function.
1211 (GEN_ADDI): New macro.
1212 (GEN_ADDIS): New macro.
1213 (GEN_LI): New macro.
1214 (GEN_LIS): New macro.
1215 (GEN_ORI): New macro.
1216 (GEN_ORIS): New macro.
1217 (GEN_LWZ): New macro.
1218 (GEN_STW): New macro.
1219 (GEN_STWU): New macro.
1220 (gen_xfx_form): New function.
1221 (GEN_MFSPR): New macro.
1222 (GEN_MTSPR): New macro.
1223 (GEN_MFCR): New macro.
1224 (GEN_MTCR): New macro.
1225 (GEN_SYNC): New macro.
1226 (GEN_LWSYNC): New macro.
1227 (gen_x_form): New function.
1228 (GEN_OR): New macro.
1229 (GEN_MR): New macro.
1230 (GEN_LWARX): New macro.
1231 (GEN_STWCX): New macro.
1232 (GEN_CMPW): New macro.
1233 (gen_md_form): New function.
1234 (GEN_RLDICL): New macro.
1235 (GEN_RLDICR): New macro.
1236 (gen_i_form): New function.
1237 (GEN_B): New macro.
1238 (GEN_BL): New macro.
1239 (gen_b_form): New function.
1240 (GEN_BNE): New macro.
1241 (GEN_LOAD): New macro.
1242 (GEN_STORE): New macro.
1243 (gen_limm): New function.
1244 (gen_atomic_xchg): New function.
1245 (gen_call): New function.
1246 (ppc_relocate_instruction): New function.
1247 (ppc_install_fast_tracepoint_jump_pad): New function.
1248 (ppc_get_min_fast_tracepoint_insn_len): New function.
1249 (ppc_get_ipa_tdesc_idx): New function.
1250 (the_low_target): Wire in the new functions.
1251 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1252 tdescs.
1253 * linux-ppc-tdesc.h: New file.
1254
1255 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1256
1257 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1258 (alloc_jump_pad_buffer): New function.
1259 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1260 (alloc_jump_pad_buffer): New function.
1261 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1262 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1263 (alloc_jump_pad_buffer): New function.
1264 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1265 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1266 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1267 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1268
1269 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1270
1271 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1272 * linux-amd64-ipa.c: Likewise.
1273 * linux-i386-ipa.c: Likewise.
1274 * linux-s390-ipa.c: Likewise.
1275 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1276 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1277 set_trace_state_variable_value_ptr.
1278 (struct ipa_sym_addresses): Likewise.
1279 (symbol_list): Likewise.
1280 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1281 accessing gdb_collect directly.
1282 (gdb_collect_ptr_type): New typedef.
1283 (get_raw_reg_ptr_type): New typedef.
1284 (get_trace_state_variable_value_ptr_type): New typedef.
1285 (set_trace_state_variable_value_ptr_type): New typedef.
1286 (gdb_collect_ptr): New global.
1287 (get_raw_reg_ptr): New global.
1288 (get_trace_state_variable_value_ptr): New global.
1289 (set_trace_state_variable_value_ptr): New global.
1290 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1291 accessing get_raw_reg directly.
1292 (get_get_tsv_func_addr): Likewise for
1293 get_trace_state_variable_value_ptr.
1294 (get_set_tsv_func_addr): Likewise for
1295 set_trace_state_variable_value_ptr.
1296 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1297
1298 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1299
1300 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1301
1302 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1303
1304 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1305 packets.
1306 (relocate_instruction): Remove own_buf.
1307 * server.c (own_buf): Make global.
1308 (handle_v_requests): Make global.
1309 * server.h (own_buf): New declaration.
1310 (handle_v_requests): New prototype.
1311
1312 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1313
1314 PR 18377
1315 * linux-s390-low.c (add_insns): New function.
1316 (s390_emit_prologue): New function.
1317 (s390_emit_epilogue): New function.
1318 (s390_emit_add): New function.
1319 (s390_emit_sub): New function.
1320 (s390_emit_mul): New function.
1321 (s390_emit_lsh): New function.
1322 (s390_emit_rsh_signed): New function.
1323 (s390_emit_rsh_unsigned): New function.
1324 (s390_emit_ext): New function.
1325 (s390_emit_log_not): New function.
1326 (s390_emit_bit_and): New function.
1327 (s390_emit_bit_or): New function.
1328 (s390_emit_bit_xor): New function.
1329 (s390_emit_bit_not): New function.
1330 (s390_emit_equal): New function.
1331 (s390_emit_less_signed): New function.
1332 (s390_emit_less_unsigned): New function.
1333 (s390_emit_ref): New function.
1334 (s390_emit_if_goto): New function.
1335 (s390_emit_goto): New function.
1336 (s390_write_goto_address): New function.
1337 (s390_emit_litpool): New function.
1338 (s390_emit_const): New function.
1339 (s390_emit_call): New function.
1340 (s390_emit_reg): New function.
1341 (s390_emit_pop): New function.
1342 (s390_emit_stack_flush): New function.
1343 (s390_emit_zero_ext): New function.
1344 (s390_emit_swap): New function.
1345 (s390_emit_stack_adjust): New function.
1346 (s390_emit_set_r2): New function.
1347 (s390_emit_int_call_1): New function.
1348 (s390_emit_void_call_2): New function.
1349 (s390_emit_eq_goto): New function.
1350 (s390_emit_ne_goto): New function.
1351 (s390_emit_lt_goto): New function.
1352 (s390_emit_le_goto): New function.
1353 (s390_emit_gt_goto): New function.
1354 (s390_emit_ge_goto): New function.
1355 (s390x_emit_prologue): New function.
1356 (s390x_emit_epilogue): New function.
1357 (s390x_emit_add): New function.
1358 (s390x_emit_sub): New function.
1359 (s390x_emit_mul): New function.
1360 (s390x_emit_lsh): New function.
1361 (s390x_emit_rsh_signed): New function.
1362 (s390x_emit_rsh_unsigned): New function.
1363 (s390x_emit_ext): New function.
1364 (s390x_emit_log_not): New function.
1365 (s390x_emit_bit_and): New function.
1366 (s390x_emit_bit_or): New function.
1367 (s390x_emit_bit_xor): New function.
1368 (s390x_emit_bit_not): New function.
1369 (s390x_emit_equal): New function.
1370 (s390x_emit_less_signed): New function.
1371 (s390x_emit_less_unsigned): New function.
1372 (s390x_emit_ref): New function.
1373 (s390x_emit_if_goto): New function.
1374 (s390x_emit_const): New function.
1375 (s390x_emit_call): New function.
1376 (s390x_emit_reg): New function.
1377 (s390x_emit_pop): New function.
1378 (s390x_emit_stack_flush): New function.
1379 (s390x_emit_zero_ext): New function.
1380 (s390x_emit_swap): New function.
1381 (s390x_emit_stack_adjust): New function.
1382 (s390x_emit_int_call_1): New function.
1383 (s390x_emit_void_call_2): New function.
1384 (s390x_emit_eq_goto): New function.
1385 (s390x_emit_ne_goto): New function.
1386 (s390x_emit_lt_goto): New function.
1387 (s390x_emit_le_goto): New function.
1388 (s390x_emit_gt_goto): New function.
1389 (s390x_emit_ge_goto): New function.
1390 (s390_emit_ops): New function.
1391 (struct linux_target_ops): Fill in emit_ops hook.
1392
1393 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1394
1395 PR 18377
1396 * Makefile.in: Add s390 IPA files.
1397 * configure.srv: Build IPA for s390.
1398 * linux-s390-ipa.c: New file.
1399 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1400 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1401 (tdesc_s390_linux32): Likewise.
1402 (init_registers_s390_linux32v1): Likewise.
1403 (tdesc_s390_linux32v1): Likewise.
1404 (init_registers_s390_linux32v2): Likewise.
1405 (tdesc_s390_linux32v2): Likewise.
1406 (init_registers_s390_linux64): Likewise.
1407 (tdesc_s390_linux64): Likewise.
1408 (init_registers_s390_linux64v1): Likewise.
1409 (tdesc_s390_linux64v1): Likewise.
1410 (init_registers_s390_linux64v2): Likewise.
1411 (tdesc_s390_linux64v2): Likewise.
1412 (init_registers_s390_te_linux64): Likewise.
1413 (tdesc_s390_te_linux64): Likewise.
1414 (init_registers_s390_vx_linux64): Likewise.
1415 (tdesc_s390_vx_linux64): Likewise.
1416 (init_registers_s390_tevx_linux64): Likewise.
1417 (tdesc_s390_tevx_linux64): Likewise.
1418 (init_registers_s390x_linux64): Likewise.
1419 (tdesc_s390x_linux64): Likewise.
1420 (init_registers_s390x_linux64v1): Likewise.
1421 (tdesc_s390x_linux64v1): Likewise.
1422 (init_registers_s390x_linux64v2): Likewise.
1423 (tdesc_s390x_linux64v2): Likewise.
1424 (init_registers_s390x_te_linux64): Likewise.
1425 (tdesc_s390x_te_linux64): Likewise.
1426 (init_registers_s390x_vx_linux64): Likewise.
1427 (tdesc_s390x_vx_linux64): Likewise.
1428 (init_registers_s390x_tevx_linux64): Likewise.
1429 (tdesc_s390x_tevx_linux64): Likewise.
1430 (have_hwcap_s390_vx): New static variable.
1431 (s390_arch_setup): Fill have_hwcap_s390_vx.
1432 (s390_get_thread_area): New function.
1433 (s390_ft_entry_gpr_esa): New const.
1434 (s390_ft_entry_gpr_zarch): New const.
1435 (s390_ft_entry_misc): New const.
1436 (s390_ft_entry_fr): New const.
1437 (s390_ft_entry_vr): New const.
1438 (s390_ft_main_31): New const.
1439 (s390_ft_main_64): New const.
1440 (s390_ft_exit_fr): New const.
1441 (s390_ft_exit_vr): New const.
1442 (s390_ft_exit_misc): New const.
1443 (s390_ft_exit_gpr_esa): New const.
1444 (s390_ft_exit_gpr_zarch): New const.
1445 (append_insns): New function.
1446 (s390_relocate_instruction): New function.
1447 (s390_install_fast_tracepoint_jump_pad): New function.
1448 (s390_get_min_fast_tracepoint_insn_len): New function.
1449 (s390_get_ipa_tdesc_idx): New function.
1450 (struct linux_target_ops): Wire in the above functions.
1451 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1452 * linux-s390-tdesc.h: New file.
1453
1454 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1455
1456 * linux-s390-low.c (s390_supports_tracepoints): New function.
1457 (struct linux_target_ops): Fill supports_tracepoints hook.
1458
1459 2016-03-18 Yao Qi <yao.qi@linaro.org>
1460
1461 * linux-low.c (lwp_signal_can_be_delivered): New function.
1462 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1463
1464 2016-03-18 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1467 0 if signal is enqueued. Remove 'signal' from one debugging
1468 message. Move one debugging message to some lines below.
1469 Remove code setting 'signal' to 0.
1470
1471 2016-03-18 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-low.c (linux_low_filter_event): Remove redundant
1474 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1475
1476 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1477
1478 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1479 (struct linux_target_ops): Wire in the above.
1480
1481 2016-03-03 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-low.c: Update comments to start_step_over.
1484
1485 2016-03-03 Yao Qi <yao.qi@linaro.org>
1486
1487 PR server/19736
1488 * linux-low.c (handle_extended_wait): Set child suspended
1489 if event_lwp->bp_reinsert isn't zero.
1490
1491 2016-03-02 Yao Qi <yao.qi@linaro.org>
1492
1493 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1494 enqueue_pending_signal.
1495
1496 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1497
1498 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1499 is actually loaded.
1500
1501 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1502
1503 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1504 (s390_regmap_3264) [!__s390x__]: New global.
1505 (s390_collect_ptrace_register): Skip map entries containing -1.
1506 (s390_supply_ptrace_register): Ditto.
1507 (s390_fill_gprs_high): New function.
1508 (s390_store_gprs_high): New function.
1509 (s390_regsets): Add NT_S390_HIGH_GPRS.
1510 (s390_get_hwcap): Enable on 31-bit.
1511 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1512 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1513 Detect NT_S390_HIGH_GPRS.
1514 (s390_usrregs_info_3264): Enable on 31-bit.
1515 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1516 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1517
1518 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1519
1520 PR gdb/13808
1521 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1522 * configure.srv: Ditto.
1523 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1524 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1525 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1526 (init_registers_amd64_linux): Remove prototype.
1527 (tdesc_amd64_linux): Remove declaration.
1528 (get_ipa_tdesc): New function.
1529 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1530 initialize remaining tdescs.
1531 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1532 (init_registers_i386_linux): Remove prototype.
1533 (tdesc_i386_linux): Remove declaration.
1534 (get_ipa_tdesc): New function.
1535 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1536 initialize remaining tdescs.
1537 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1538 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1539 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1540 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1541 (x86_get_ipa_tdesc_idx): New function.
1542 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1543 * linux-x86-tdesc.h: New file.
1544 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1545 (target_get_ipa_tdesc_idx): New macro.
1546 * tracepoint.c (ipa_tdesc_idx): New macro.
1547 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1548 (symbol_list): Add ipa_tdesc_idx.
1549 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1550 (ipa_tdesc): Remove.
1551 (ipa_tdesc_idx): New variable.
1552 (get_context_regcache): Use get_ipa_tdesc.
1553 (gdb_collect): Ditto.
1554 (gdb_probe): Ditto.
1555 * tracepoint.h (get_ipa_tdesc): New prototype.
1556 (ipa_tdesc): Remove.
1557
1558 2016-02-24 Pedro Alves <palves@redhat.com>
1559
1560 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1561 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1562 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1563 Factor out common code between the USE_SIGTRAP_SIGINFO and
1564 !USE_SIGTRAP_SIGINFO blocks.
1565 (linux_low_filter_event): Call save_stop_reason instead of
1566 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1567 Update comments.
1568 (linux_wait_1): Update comments.
1569
1570 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1571
1572 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1573 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1574 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1575 ppc_insert_point, ppc_remove_point.
1576
1577 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1578
1579 * linux-s390-low.c (s390_supports_z_point_type): New function.
1580 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1581
1582 2016-02-16 Yao Qi <yao.qi@linaro.org>
1583
1584 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1585 PC. Get pc from regcache_read_pc.
1586
1587 2016-02-12 Yao Qi <yao.qi@linaro.org>
1588
1589 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1590 or linux_get_pc_32bit.
1591 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1592
1593 2016-02-12 Yao Qi <yao.qi@linaro.org>
1594
1595 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1596 arm_linux_get_next_pcs_fixup.
1597
1598 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1599
1600 * tracepoint.c (x_tracepoint_action_download): Change
1601 write_inferior_data_ptr to write_inferior_data_pointer.
1602 (cmd_qtstart): Likewise.
1603 (write_inferior_data_ptr): Remove.
1604 (download_agent_expr): Change write_inferior_data_ptr to
1605 write_inferior_data_pointer.
1606 (download_tracepoint_1): Likewise.
1607 (download_tracepoint): Likewise.
1608 (download_trace_state_variables): Likewise.
1609
1610 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1611 Marcin Kościelnicki <koriakin@0x04.net>
1612
1613 * tracepoint.c (struct tracepoint_action_ops): Remove.
1614 (struct tracepoint_action): Remove ops.
1615 (m_tracepoint_action_download, r_tracepoint_action_download)
1616 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1617 size and offset accordingly.
1618 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1619 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1620 (tracepoint_action_send, tracepoint_action_download): New functions.
1621 Helpers for trace action handlers.
1622 (add_tracepoint_action): Remove setup actions ops.
1623 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1624
1625 2016-02-10 Yao Qi <yao.qi@linaro.org>
1626
1627 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1628
1629 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1630
1631 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1632 to AC_OUTPUT.
1633 * configure: Regenerate.
1634
1635 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1638 void * to gdb_byte *.
1639 * linux-low.c (siginfo_fixup): Likewise.
1640 (linux_xfer_siginfo): Likewise.
1641 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1642 Likewise.
1643 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1644
1645 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1646
1647 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1648 to srv_tgtobj.
1649 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1650 to srv_tgtobj.
1651 * linux-x86-low.c [__x86_64__]: Include
1652 "nat/amd64-linux-siginfo.h".
1653 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1654 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1655 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1656 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1657 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1658 (cpt_si_fd, si_timerid, si_overrun): Move from
1659 nat/amd64-linux-siginfo.c.
1660 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1661
1662 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1663
1664 * server.c (skip_to_semicolon): Remove.
1665 (process_point_options): Use strchrnul instead of
1666 skip_to_semicolon.
1667
1668 2016-01-26 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1671 * linux-low.c (install_software_single_step_breakpoints): Don't
1672 call regcache_read_pc.
1673 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1674 argument pc.
1675
1676 2016-01-26 Yao Qi <yao.qi@linaro.org>
1677
1678 * linux-low.c (install_software_single_step_breakpoints): Call
1679 regcache_read_pc instead of get_pc.
1680
1681 2016-01-26 Yao Qi <yao.qi@linaro.org>
1682
1683 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1684 (unblock_async_io): Rename to ...
1685 (block_unblock_async_io): ... it. New function.
1686 (enable_async_io): Don't install SIGIO handler. Unblock it
1687 instead.
1688 (disable_async_io): Don't ignore SIGIO. Block it instead.
1689 (initialize_async_io): Install SIGIO handler. Don't call
1690 unblock_async_io.
1691
1692 2016-01-26 Yao Qi <yao.qi@linaro.org>
1693
1694 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1695 first character is '\003', call *the_target->request_interrupt.
1696
1697 2016-01-25 Yao Qi <yao.qi@linaro.org>
1698
1699 * remote-utils.c (new_thread_notify): Remove.
1700 (dead_thread_notify): Likewise.
1701 * remote-utils.h (new_thread_notify): Remove declaration.
1702 (dead_thread_notify): Likewise.
1703
1704 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1705
1706 * gdb.trace/pending.exp: Fix expected message on continue.
1707
1708 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1709
1710 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1711 it works properly on big-endian machines where sizeof (CORE_ADDR)
1712 != sizeof (void *).
1713
1714 2016-01-21 Pedro Alves <palves@redhat.com>
1715
1716 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1717 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1718 * configure: Regenerate.
1719
1720 2016-01-21 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1723 is_thumb and set it according to CPSR saved on the stack.
1724 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1725 arm_sigreturn_next_pc.
1726
1727 2016-01-18 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (linux_set_pc_64bit): New function.
1730 (linux_get_pc_64bit): New function.
1731 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1732 Declare.
1733 * linux-sparc-low.c (debug_threads): Remove declaration.
1734 (sparc_get_pc): Remove.
1735 (the_low_target): Use linux_get_pc_64bit instead of
1736 sparc_get_pc.
1737 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1738 (the_low_target): Use linux_get_pc_64bit and
1739 linux_set_pc_64bit.
1740
1741 2016-01-18 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-arm-low.c (debug_threads): Remove declaration.
1744 (arm_get_pc, arm_set_pc): Remove.
1745 (the_low_target): Use linux_get_pc_32bit and
1746 linux_set_pc_32bit.
1747 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1748 (the_low_target): Use linux_get_pc_32bit and
1749 linux_set_pc_32bit.
1750 * linux-cris-low.c (debug_threads): Remove declaration.
1751 (cris_get_pc, cris_set_pc,): Remove.
1752 (the_low_target): Use linux_get_pc_32bit and
1753 linux_set_pc_32bit.
1754 * linux-crisv32-low.c (debug_threads): Remove declaration.
1755 (cris_get_pc, cris_set_pc): Remove.
1756 (the_low_target): Use linux_get_pc_32bit and
1757 linux_set_pc_32bit.
1758 * linux-low.c: Include inttypes.h.
1759 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1760 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1761 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1762 (the_low_target): Use linux_get_pc_32bit and
1763 linux_set_pc_32bit.
1764 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1765 (the_low_target): Use linux_get_pc_32bit and
1766 linux_set_pc_32bit.
1767 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1768 (the_low_target): Use linux_get_pc_32bit and
1769 linux_set_pc_32bit.
1770 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1771 (the_low_target): Use linux_get_pc_32bit and
1772 linux_set_pc_32bit.
1773 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1774 (the_low_target): Use linux_get_pc_32bit and
1775 linux_set_pc_32bit.
1776
1777 2016-01-18 Gary Benson <gbenson@redhat.com>
1778
1779 * configure.ac (AC_FUNC_FORK): New check.
1780 * config.in: Regenerate.
1781 * configure: Likewise.
1782
1783 2016-01-14 Yao Qi <yao.qi@linaro.org>
1784
1785 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1786 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1787 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1788 arm_get_next_pcs_ctor.
1789
1790 2016-01-12 Josh Stone <jistone@redhat.com>
1791 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1792
1793 * inferiors.h: Include "gdb_vecs.h".
1794 (struct process_info): Add syscalls_to_catch.
1795 * inferiors.c (remove_process): Free syscalls_to_catch.
1796 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1797 syscall_return stops.
1798 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1799 * server.c (handle_general_set): Handle QCatchSyscalls.
1800 (handle_query): Report support for QCatchSyscalls.
1801 * target.h (struct target_ops): Add supports_catch_syscall.
1802 (target_supports_catch_syscall): New macro.
1803 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1804 (struct lwp_info): Add syscall_state.
1805 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1806 Maintain syscall_state and syscalls_to_catch across exec.
1807 (get_syscall_trapinfo): New function, proxy to the_low_target.
1808 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1809 (linux_low_filter_event): Toggle syscall_state entry/return for
1810 syscall traps, and set it ignored for all others.
1811 (gdb_catching_syscalls_p): New function.
1812 (gdb_catch_this_syscall_p): New function.
1813 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1814 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1815 (linux_supports_catch_syscall): New function.
1816 (linux_target_ops): Install it.
1817 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1818 (the_low_target): Install it.
1819
1820 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1821
1822 * acinclude.m4: Include new ../warning.m4 file.
1823 * configure: Regenerated.
1824 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1825
1826 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1827
1828 * ax.c (is_goto_target): Mark static.
1829 * linux-low.c (register_addr): Likewise.
1830 (linux_fetch_registers, linux_store_registers): Likewise.
1831 * mem-break.c (any_persistent_commands): Fix old prototype.
1832 (add_commands_to_breakpoint): Mark static.
1833 * regcache.c (find_register_by_name): Delete unused func.
1834 * remote-utils.c (hex_or_minus_one): Mark static.
1835 * server.c (monitor_show_help): Mark static.
1836 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1837 handle_v_requests): Likewise.
1838
1839 2016-01-12 Pedro Alves <palves@redhat.com>
1840
1841 Remove use of the registered trademark symbol throughout.
1842
1843 2016-01-08 Yao Qi <yao.qi@linaro.org>
1844
1845 * remote-utils.c (getpkt): If c is '\003', call target hook
1846 request_interrupt.
1847
1848 2016-01-06 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1851 linux-aarch32-low.c.
1852 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1853 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1854 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1855 (thumb2_breakpoint): Declare.
1856 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1857 linux-aarch32-low.h.
1858 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1859 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1860 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1861
1862 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1863
1864 * gdbreplay.c (gdbreplay_version): Change copyright year in
1865 version message.
1866 * server.c (gdbserver_version): Likewise.
1867
1868 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1869
1870 * server.c (crc32_table): Delete.
1871 (crc32): Use libiberty's xcrc32 function.
1872
1873 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1874
1875 * lynx-low.c (lynx_delete_thread_callback): New function.
1876 (lynx_mourn): Properly delete our process and all of its
1877 threads. Remove call to clear_inferiors.
1878
1879 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1880
1881 * target.c (thread_search_callback): Add check that
1882 the thread_stopped target callback is not NULL before
1883 calling it.
1884
1885 2015-12-21 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1888 arm breakpoint.
1889
1890 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1891
1892 * server.c (handle_query): Call target_supports_software_single_step.
1893
1894 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1895
1896 * linux-low.c (single_step): New function.
1897 (linux_resume_one_lwp_throw): Call single_step.
1898 (start_step_over): Likewise.
1899
1900 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1901
1902 * Makefile.in (SFILES): Append arch/arm-linux.c,
1903 arch/arm-get-next-pcs.c.
1904 (arm-linux.o): New rule.
1905 (arm-get-next-pcs.o): New rule.
1906 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1907 arm-linux.o.
1908 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1909 to linux-aarch32-low.c.
1910 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1911 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1912 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1913 (thumb2_breakpoint_len): Likewise.
1914 (arm_is_thumb_mode): Make non-static.
1915 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1916 from linux-aarch32-low.c.
1917 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1918 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1919 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1920 (thumb2_breakpoint_len): Likewise.
1921 (arm_is_thumb_mode): New declaration.
1922 * linux-arm-low.c: Include arch/arm-linux.h
1923 aarch/arm-get-next-pcs.h, sys/syscall.h.
1924 (get_next_pcs_ops): New struct.
1925 (get_next_pcs_addr_bits_remove): New function.
1926 (get_next_pcs_is_thumb): New function.
1927 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1928 (arm_sigreturn_next_pc): Likewise.
1929 (get_next_pcs_syscall_next_pc): Likewise.
1930 (arm_gdbserver_get_next_pcs): Likewise.
1931 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1932 Initialize.
1933 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1934 * server.h: Include gdb_vecs.h.
1935
1936 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1937
1938 * Makefile.in (SFILES): Append common/common-regcache.c.
1939 (OBS): Append common-regcache.o.
1940 (common-regcache.o): New rule.
1941 * regcache.c (init_register_cache): Initialize cache to
1942 REG_UNAVAILABLE.
1943 (regcache_raw_read_unsigned): New function.
1944 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1945 register_status enum.
1946
1947 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1948
1949 * linux-aarch64-low.c (the_low_targets): Rename
1950 breakpoint_reinsert_addr to get_next_pcs.
1951 * linux-arm-low.c (the_low_targets): Likewise.
1952 * linux-bfin-low.c (the_low_targets): Likewise.
1953 * linux-cris-low.c (the_low_targets): Likewise.
1954 * linux-crisv32-low.c (the_low_targets): Likewise.
1955 * linux-low.c (can_software_single_step): Likewise.
1956 (install_software_single_step_breakpoints): New function.
1957 (start_step_over): Use install_software_single_step_breakpoints.
1958 * linux-low.h: New CORE_ADDR vector.
1959 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1960 get_next_pcs.
1961 * linux-mips-low.c (the_low_targets): Likewise.
1962 * linux-nios2-low.c (the_low_targets): Likewise.
1963 * linux-sparc-low.c (the_low_targets): Likewise.
1964
1965 2015-12-17 Pedro Alves <palves@redhat.com>
1966
1967 * linux-low.c (linux_kill_one_lwp): Remove references to
1968 LinuxThreads.
1969 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1970 to 'kill'.
1971 (linux_init_signals): Delete.
1972 (initialize_low): Adjust.
1973 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1974
1975 2015-12-16 Pedro Alves <palves@redhat.com>
1976
1977 * configure.ac (compiler warning flags): When testing a
1978 -Wno-foo option, check whether -Wfoo works instead.
1979 * configure: Regenerate.
1980
1981 2015-12-11 Don Breazeal <donb@codesourcery.com>
1982
1983 * server.c (process_serial_event): Don't exit from gdbserver
1984 in remote mode if there are still active inferiors.
1985
1986 2015-12-11 Yao Qi <yao.qi@linaro.org>
1987
1988 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1989 arm_breakpoint_at if the process is 32-bit.
1990
1991 2015-12-11 Yao Qi <yao.qi@linaro.org>
1992
1993 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1994 arm breakpoint.
1995
1996 2015-12-07 Yao Qi <yao.qi@linaro.org>
1997
1998 * configure.srv: Append arm.o to srv_tgtobj for
1999 aarch64*-*-linux* target.
2000 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2001 from linux-arm-low.c.
2002 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2003 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2004 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2005 (thumb2_breakpoint_len): Likewise.
2006 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2007 (arm_breakpoint_kinds): Likewise.
2008 (arm_breakpoint_kind_from_pc): Likewise.
2009 (arm_sw_breakpoint_from_kind): Likewise.
2010 (arm_breakpoint_kind_from_current_state): Likewise.
2011 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2012 (arm_sw_breakpoint_from_kind): Declare.
2013 (arm_breakpoint_kind_from_current_state): Declare.
2014 (arm_breakpoint_at): Declare.
2015 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2016 arm_sw_breakpoint_from_kind if process is 32-bit.
2017 (aarch64_breakpoint_kind_from_pc): New function.
2018 (aarch64_breakpoint_kind_from_current_state): New function.
2019 (the_low_target): Initialize fields breakpoint_kind_from_pc
2020 and breakpoint_kind_from_current_state.
2021 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2022 linux-aarch32-low.c.
2023 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2024 (arm_breakpoint, arm_breakpoint_len): Likewise.
2025 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2026 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2027 (arm_is_thumb_mode): Likewise.
2028 (arm_breakpoint_at): Likewise.
2029 (arm_breakpoint_kind_from_pc): Likewise.
2030 (arm_sw_breakpoint_from_kind): Likewise.
2031 (arm_breakpoint_kind_from_current_state): Likewise.
2032
2033 Revert:
2034 2015-08-04 Yao Qi <yao.qi@linaro.org>
2035
2036 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2037 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2038 * server.c (extended_protocol): Remove "static".
2039 * server.h (extended_protocol): Declare it.
2040
2041 2015-12-04 Josh Stone <jistone@redhat.com>
2042
2043 * target.h (struct target_ops) <arch_setup>: Rename to ...
2044 (struct target_ops) <post_create_inferior>: ... this.
2045 (target_arch_setup): Rename to ...
2046 (target_post_create_inferior): ... this, calling post_create_inferior.
2047 * server.c (start_inferior): Update target_arch_setup calls to
2048 target_post_create_inferior.
2049 * linux-low.c (linux_low_ptrace_options): Forward declare.
2050 (linux_arch_setup): Update its comment for general use.
2051 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2052 (struct linux_target_ops): Use linux_post_create_inferior.
2053 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2054 to post_create_inferior.
2055 * nto-low.c (struct nto_target_ops): Likewise.
2056 * spu-low.c (struct spu_target_ops): Likewise.
2057 * win32-low.c (struct win32_target_ops): Likewise.
2058
2059 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060
2061 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2062
2063 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2064
2065 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2066 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2067 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2068 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2069 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2070 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2071 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2072 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2073 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2074 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2075 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2076 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2077
2078 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2079
2080 * linux-low.c (linux_look_up_symbols): Don't call
2081 linux_supports_traceclone.
2082 * linux-low.h (thread_db_init): Remove use_events argument.
2083 * thread-db.c (thread_db_use_event): Remove global variable.
2084 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2085 (struct thread_db) <td_create_bp>: Remove field.
2086 (thread_db_create_event): Remove function.
2087 (thread_db_enable_reporting): Likewise.
2088 (find_one_thread): Don't check for thread_db_use_events.
2089 (attach_thread): Likewise.
2090 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2091 (try_thread_db_load_1): Don't check for thread_db_use_events.
2092 (thread_db_init): Remove use_events argument and thread events
2093 handling.
2094 (remove_thread_event_breakpoints): Remove function.
2095 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2096
2097 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2098
2099 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2100 New function.
2101 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2102 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2104 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2105 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2106 Initialize.
2107 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2108 New function.
2109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2110 * linux-low.c (can_hardware_single_step): Use
2111 supports_hardware_single_step.
2112 (can_software_single_step): New function.
2113 (start_step_over): Call can_software_single_step.
2114 (linux_supports_hardware_single_step): New function.
2115 (struct target_ops) <supports_software_single_step>: Initialize.
2116 * linux-low.h (struct linux_target_ops)
2117 <supports_hardware_single_step>: Initialize.
2118 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2120 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2121 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2122 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2123 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2124 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2125 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2126 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2127 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2128 Initialize.
2129 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2130 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2131 Initialize.
2132 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2133 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2134 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2135 New function.
2136 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2137 * target.h (struct target_ops): <supports_software_single_step>:
2138 New field.
2139 (target_supports_software_single_step): New macro.
2140
2141 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2142
2143 * linux-low.c (linux_wait_1): Fix pc advance condition.
2144 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2145 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2146
2147 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2148
2149 * linux-arm-low.c (arm_is_thumb_mode): New function.
2150 (arm_breakpoint_at): Use arm_is_thumb_mode.
2151 (arm_breakpoint_kind_from_current_state): New function.
2152 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2153 Initialize.
2154 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2155 (linux_breakpoint_kind_from_current_state): New function.
2156 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2157 * linux-low.h (struct linux_target_ops)
2158 <breakpoint_kind_from_current_state>: New field.
2159 * target.h (struct target_ops): Likewise.
2160 (target_breakpoint_kind_from_current_state): New macro.
2161
2162 2015-11-30 Pedro Alves <palves@redhat.com>
2163
2164 * linux-low.c (linux_resume): Wake up the event loop before
2165 returning.
2166
2167 2015-11-30 Pedro Alves <palves@redhat.com>
2168
2169 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2170 check.
2171 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2172 to -1.
2173 * target.c (struct thread_search): New structure.
2174 (thread_search_callback): New function.
2175 (prev_general_thread): New global.
2176 (prepare_to_access_memory, done_accessing_memory): New functions.
2177 * target.h (prepare_to_access_memory, done_accessing_memory):
2178 Replace macros with function declarations.
2179
2180 2015-11-30 Pedro Alves <palves@redhat.com>
2181
2182 PR 14618
2183 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2184 report TARGET_WAITKIND_NO_RESUMED.
2185 * remote-utils.c (prepare_resume_reply): Handle
2186 TARGET_WAITKIND_NO_RESUMED.
2187 * server.c (report_no_resumed): New global.
2188 (handle_query) <qSupported>: Handle "no-resumed+". Report
2189 "no-resumed+" support.
2190 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2191 return error if the client doesn't support no-resumed events.
2192 (push_stop_notification): New function.
2193 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2194 events if the client supports them.
2195
2196 2015-11-30 Pedro Alves <palves@redhat.com>
2197
2198 * linux-low.c (thread_still_has_status_pending_p): Don't check
2199 vCont;t here.
2200 (lwp_resumed): New function.
2201 (status_pending_p_callback): Return early if the LWP is not
2202 supposed to be resumed.
2203
2204 2015-11-30 Pedro Alves <palves@redhat.com>
2205
2206 * linux-low.c (handle_extended_wait): Assert that the LWP's
2207 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2208 thread create events, leave the new child's status pending.
2209 (linux_low_filter_event): If GDB wants to hear about thread exit
2210 events, leave the LWP marked dead and don't delete it.
2211 (linux_wait_for_event_filtered): Don't check for thread exit.
2212 (filter_exit_event): New function.
2213 (linux_wait_1): Use it, when returning an exit event.
2214 (linux_resume_one_lwp_throw): Assert that the LWP's
2215 waitstatus is TARGET_WAITKIND_IGNORE.
2216 * remote-utils.c (prepare_resume_reply): Handle
2217 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2218 * server.c (report_thread_events): New global.
2219 (handle_general_set): Handle QThreadEvents.
2220 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2221 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2222 TARGET_WAITKIND_THREAD_EXITED.
2223 * server.h (report_thread_events): Declare.
2224
2225 2015-11-30 Pedro Alves <palves@redhat.com>
2226
2227 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2228 the thread's last_resume_kind was resume_stop.
2229
2230 2015-11-30 Pedro Alves <palves@redhat.com>
2231
2232 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2233 before returning.
2234
2235 2015-11-30 Pedro Alves <palves@redhat.com>
2236
2237 * server.c (handle_v_requests): Handle vCtrlC.
2238
2239 2015-11-30 Pedro Alves <palves@redhat.com>
2240
2241 * gdbthread.h (find_any_thread_of_pid): Declare.
2242 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2243 functions.
2244 * server.c (handle_query): If current_thread is NULL, look for
2245 another thread of the selected process.
2246
2247 2015-11-26 Daniel Colascione <dancol@dancol.org>
2248 Simon Marchi <simon.marchi@ericsson.com>
2249
2250 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2251 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2252 name in reply.
2253 * target.h (struct target_ops) <thread_name>: New field.
2254 (target_thread_name): New macro.
2255
2256 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2257
2258 * regcache.h (regcache_invalidate_pid): Add declaration.
2259 * regcache.c (regcache_invalidate_pid): New function, extracted
2260 from regcache_invalidate.
2261 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2262 Add trivial documentation comment.
2263 * lynx-low.c: Use regcache_invalidate_pid instead of
2264 regcache_invalidate.
2265
2266 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2267
2268 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2269 and Elf64_auxv_t if the target is Android.
2270
2271 2015-11-22 Doug Evans <xdje42@gmail.com>
2272
2273 * target.h: #include <sys/types.h>.
2274
2275 2015-11-19 Pedro Alves <palves@redhat.com>
2276
2277 * linux-low.c (linux_process_qsupported): Change prototype.
2278 Adjust.
2279 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2280 Change prototype.
2281 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2282 and adjust to loop over all features.
2283 * server.c (handle_query) <qSupported>: Adjust to call
2284 target_process_qsupported once, passing it a vector of unprocessed
2285 features.
2286 * target.h (struct target_ops) <process_qsupported>: Change
2287 prototype.
2288 (target_process_qsupported): Adjust.
2289
2290 2015-11-19 Pedro Alves <palves@redhat.com>
2291
2292 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2293 mode.
2294 * configure: Regenerate.
2295
2296 2015-11-19 Pedro Alves <palves@redhat.com>
2297
2298 * configure: Regenerate.
2299
2300 2015-11-19 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2303 type to uint32_t.
2304
2305 2015-11-19 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2308 (struct aarch64_operand): Move enum out.
2309
2310 2015-11-19 Yao Qi <yao.qi@linaro.org>
2311
2312 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2313 struct user_fpsimd_state *.
2314 (aarch64_store_fpregset): Likewise.
2315
2316 2015-11-19 Yao Qi <yao.qi@linaro.org>
2317
2318 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2319 struct user_pt_regs *.
2320 (aarch64_store_gregset): Likewise.
2321
2322 2015-11-18 Pedro Alves <palves@redhat.com>
2323
2324 * Makefile.in (all_object_files): Add $IPA_OBJS.
2325
2326 2015-11-17 Pedro Alves <palves@redhat.com>
2327
2328 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2329 GDB_SIGNAL_0 and gdb_signal_to_string.
2330
2331 2015-11-17 Pedro Alves <palves@redhat.com>
2332
2333 * win32-low.c (handle_output_debug_string): Remove parameter.
2334 (win32_kill): Remove our_status local and adjust call to
2335 handle_output_debug_string.
2336 (get_child_debug_event): Adjust call to
2337 handle_output_debug_string.
2338
2339 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2340
2341 * linux-mips-low.c (mips_fill_gregset): Add cast.
2342 (mips_store_gregset): Likewise.
2343 (mips_fill_fpregset): Likewise.
2344 (mips_store_fpregset): Likewise.
2345
2346 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2347
2348 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2349 priv.
2350
2351 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2352
2353 * linux-mips-low.c (mips_linux_new_thread): Change type of
2354 watch_type to enum target_hw_bp_type.
2355
2356 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2357
2358 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2359 Change return type to arm_hwbp_type.
2360
2361 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2362
2363 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2364 (arm_store_gregset): Likewise.
2365 * linux-arm-low.c (arm_get_hwcap): Likewise.
2366 (arm_read_description): Likewise.
2367
2368 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2371
2372 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2373
2374 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2375 (ppc_fill_vsxregset): Likewise.
2376 (ppc_store_vsxregset): Likewise.
2377 (ppc_fill_vrregset): Likewise.
2378 (ppc_store_vrregset): Likewise.
2379 (ppc_fill_evrregset): Likewise.
2380 (ppc_store_evrregset): Likewise.
2381
2382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2383
2384 * linux-ppc-low.c (ppc_usrregs_info): Remove
2385 forward-declaration.
2386 (ppc_arch_setup): Move lower in file.
2387
2388 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2391 (ps_pdwrite): Likewise.
2392
2393 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2394
2395 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2396 to after assert checks.
2397
2398 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * proc-service.c (ps_pdread): Add/adjust casts.
2401 (ps_pdwrite): Add/adjust casts.
2402
2403 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2404
2405 * server.c (handle_search_memory_1): Cast return value of
2406 memmem.
2407
2408 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2409
2410 * server.c (write_qxfer_response): Change type of data to
2411 gdb_byte *.
2412
2413 2015-10-29 Pedro Alves <palves@redhat.com>
2414
2415 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2416
2417 2015-10-29 Pedro Alves <palves@redhat.com>
2418
2419 * tracepoint.c (clear_installed_tracepoints): Add casts.
2420
2421 2015-10-29 Pedro Alves <palves@redhat.com>
2422
2423 * server.c (handle_v_cont, process_serial_event): Add enum
2424 gdb_signal casts to signal parsing code.
2425
2426 2015-10-29 Pedro Alves <palves@redhat.com>
2427
2428 * linux-low.h (NULL_REGSET): Define.
2429 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2430 * linux-arm-low.c (arm_regsets): Likewise.
2431 * linux-crisv32-low.c (cris_regsets): Likewise.
2432 * linux-m68k-low.c (m68k_regsets): Likewise.
2433 * linux-mips-low.c (mips_regsets): Likewise.
2434 * linux-nios2-low.c (nios2_regsets): Likewise.
2435 * linux-ppc-low.c (ppc_regsets): Likewise.
2436 * linux-s390-low.c (s390_regsets): Likewise.
2437 * linux-sh-low.c (sh_regsets): Likewise.
2438 * linux-sparc-low.c (sparc_regsets): Likewise.
2439 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2440 * linux-tile-low.c (tile_regsets): Likewise.
2441 * linux-x86-low.c (x86_regsets): Likewise.
2442 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2443
2444 2015-10-29 Pedro Alves <palves@redhat.com>
2445
2446 * linux-low.h (NULL_REGSET): Define.
2447 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2448 * linux-arm-low.c (arm_regsets): Likewise.
2449 * linux-crisv32-low.c (cris_regsets): Likewise.
2450 * linux-m68k-low.c (m68k_regsets): Likewise.
2451 * linux-mips-low.c (mips_regsets): Likewise.
2452 * linux-nios2-low.c (nios2_regsets): Likewise.
2453 * linux-ppc-low.c (ppc_regsets): Likewise.
2454 * linux-s390-low.c (s390_regsets): Likewise.
2455 * linux-sh-low.c (sh_regsets): Likewise.
2456 * linux-sparc-low.c (sparc_regsets): Likewise.
2457 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2458 * linux-tile-low.c (tile_regsets): Likewise.
2459 * linux-x86-low.c (x86_regsets): Likewise.
2460 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2461
2462 2015-10-26 Doug Evans <dje@google.com>
2463
2464 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2465
2466 2015-10-26 Doug Evans <dje@google.com>
2467
2468 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2469
2470 2015-10-26 Doug Evans <dje@google.com>
2471
2472 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2473 for debug_printf.
2474 (attach_thread, find_new_threads_callback): Ditto.
2475
2476 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2477
2478 * mem-break.h (set_breakpoint_data): Remove.
2479
2480 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2481
2482 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2483 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2484 (initialize_low): Remove set_breakpoint_data call.
2485 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2486 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2487 (initialize_low): Remove set_breakpoint_data call.
2488 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2489 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2490 (initialize_low): Remove set_breakpoint_data call.
2491
2492 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2493
2494 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2495 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2496 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2497 * target.h (target_breakpoint_kind_from_pc): New macro.
2498
2499 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2500
2501 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2502 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2503 the default breakpoint kind.
2504
2505 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2506
2507 * linux-arm-low.c (arm_supports_z_point_type): Add software
2508 breakpoint support.
2509
2510 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2511
2512 * linux-arm-low.c: Refactor breakpoint definitions.
2513 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2514 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2515
2516 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2517
2518 * Makefile.in: Add arm.c/o.
2519 * configure.srv: Likewise.
2520 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2521 (arm_breakpoint_kind_from_pc): New function.
2522 (arm_sw_breakpoint_from_kind): Return proper kind.
2523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2524
2525 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2526
2527 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2528 removal.
2529 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2530 (struct raw_breakpoint) <size>: Remove.
2531 (struct raw_breakpoint) <kind>: Add.
2532 (bp_size): New function.
2533 (bp_opcode): Likewise.
2534 (find_raw_breakpoint_at): Adjust for kind.
2535 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2536 (remove_memory_breakpoint): Adjust for kind call bp_size.
2537 (set_raw_breakpoint_at): Adjust for kind.
2538 (set_breakpoint): Likewise.
2539 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2540 (delete_raw_breakpoint): Adjust for kind.
2541 (delete_breakpoint): Likewise.
2542 (find_gdb_breakpoint): Likewise.
2543 (set_gdb_breakpoint_1): Likewise.
2544 (set_gdb_breakpoint): Likewise.
2545 (delete_gdb_breakpoint_1): Likewise.
2546 (delete_gdb_breakpoint): Likewise.
2547 (uninsert_raw_breakpoint): Likewise.
2548 (reinsert_raw_breakpoint): Likewise.
2549 (set_breakpoint_data): Remove.
2550 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2551 (check_mem_read): Adjust for kind call bp_size.
2552 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2553 (clone_one_breakpoint): Adjust for kind.
2554 * mem-break.h (set_gdb_breakpoint): Likewise.
2555 (delete_gdb_breakpoint): Likewise.
2556 * server.c (process_serial_event): Likewise.
2557
2558 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2559
2560 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2561 (struct linux_target_ops) <breakpoint>: Remove.
2562 (struct linux_target_ops) <breakpoint_len>: Remove.
2563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2565 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2566 (arm_sw_breakpoint_from_kind): New function.
2567 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2568 (struct linux_target_ops) <breakpoint>: Remove.
2569 (struct linux_target_ops) <breakpoint_len>: Remove.
2570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2572 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2573 (struct linux_target_ops) <breakpoint>: Remove.
2574 (struct linux_target_ops) <breakpoint_len>: Remove.
2575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2577 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2578 (struct linux_target_ops) <breakpoint>: Remove.
2579 (struct linux_target_ops) <breakpoint_len>: Remove.
2580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2582 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2583 and sw_breakpoint_from_kind to increment the pc.
2584 (linux_breakpoint_kind_from_pc): New function.
2585 (linux_sw_breakpoint_from_kind): New function.
2586 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2587 (initialize_low): Call breakpoint_kind_from_pc and
2588 sw_breakpoint_from_kind to replace breakpoint_data/len.
2589 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2590 New field.
2591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2592 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2593 (struct linux_target_ops) <breakpoint>: Remove.
2594 (struct linux_target_ops) <breakpoint_len>: Remove.
2595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2597 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2598 (struct linux_target_ops) <breakpoint>: Remove.
2599 (struct linux_target_ops) <breakpoint_len>: Remove.
2600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2602 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2603 (struct linux_target_ops) <breakpoint>: Remove.
2604 (struct linux_target_ops) <breakpoint_len>: Remove.
2605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2607 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2608 (struct linux_target_ops) <breakpoint>: Remove.
2609 (struct linux_target_ops) <breakpoint_len>: Remove.
2610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2612 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2613 (struct linux_target_ops) <breakpoint>: Remove.
2614 (struct linux_target_ops) <breakpoint_len>: Remove.
2615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2617 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2618 (struct linux_target_ops) <breakpoint>: Remove.
2619 (struct linux_target_ops) <breakpoint_len>: Remove.
2620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2622 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2623 (struct linux_target_ops) <breakpoint>: Remove.
2624 (struct linux_target_ops) <breakpoint_len>: Remove.
2625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2627 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2628 (struct linux_target_ops) <breakpoint>: Remove.
2629 (struct linux_target_ops) <breakpoint_len>: Remove.
2630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2632 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2633 (struct linux_target_ops) <breakpoint>: Remove.
2634 (struct linux_target_ops) <breakpoint_len>: Remove.
2635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2637 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2638 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2639 (struct linux_target_ops) <breakpoint>: Remove.
2640 (struct linux_target_ops) <breakpoint_len>: Remove.
2641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2643 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2644 (struct linux_target_ops) <breakpoint>: Remove.
2645 (struct linux_target_ops) <breakpoint_len>: Remove.
2646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2647 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2648
2649 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2650
2651 * linux-cris-low.c (cris_get_pc): Remove void arg.
2652
2653 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2654
2655 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2656 variable name.
2657
2658 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2659
2660 * inferiors.c (thread_pid_matches_callback): New function.
2661 (find_thread_process): New function.
2662 (remove_thread): Reset current_thread.
2663 (remove_process): Assert threads have been removed first.
2664
2665 2015-10-15 Yao Qi <yao.qi@linaro.org>
2666
2667 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2668 if it is 3.
2669 (aarch64_remove_point): Likewise.
2670 * regcache.c (regcache_register_size): New function.
2671
2672 2015-10-12 Yao Qi <yao.qi@linaro.org>
2673
2674 * linux-aarch64-low.c: Update all callers as emit_load_store
2675 is renamed to aarch64_emit_load_store.
2676
2677 2015-10-12 Yao Qi <yao.qi@linaro.org>
2678
2679 * linux-aarch64-low.c: Update all callers of function renaming
2680 from emit_insn to aarch64_emit_insn.
2681
2682 2015-10-12 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2685 arch/aarch64-insn.h.
2686 (struct aarch64_memory_operand): Likewise.
2687 (ENCODE): Likewise.
2688 (emit_insn): Move to arch/aarch64-insn.c.
2689 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2690 (emit_load_store): Move to arch/aarch64-insn.c.
2691 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2692 (can_encode_int32): Remove.
2693
2694 2015-10-12 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2697 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2698 (aarch64_relocate_instruction): Likewise.
2699 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2700 (struct aarch64_insn_visitor): Likewise.
2701
2702 2015-10-12 Yao Qi <yao.qi@linaro.org>
2703
2704 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2705 (struct aarch64_insn_visitor): New.
2706 (struct aarch64_insn_relocation_data): New.
2707 (aarch64_ftrace_insn_reloc_b): New function.
2708 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2709 (aarch64_ftrace_insn_reloc_cb): Likewise.
2710 (aarch64_ftrace_insn_reloc_tb): Likewise.
2711 (aarch64_ftrace_insn_reloc_adr): Likewise.
2712 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2713 (aarch64_ftrace_insn_reloc_others): Likewise.
2714 (visitor): New.
2715 (aarch64_relocate_instruction): Use visitor.
2716
2717 2015-10-12 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2720 int. Add argument buf.
2721 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2722 aarch64_relocate_instruction.
2723
2724 2015-10-12 Yao Qi <yao.qi@linaro.org>
2725
2726 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2727 argument insn. Remove local variable insn. Don't call
2728 target_read_uint32.
2729 (aarch64_install_fast_tracepoint_jump_pad): Call
2730 target_read_uint32.
2731
2732 2015-09-30 Yao Qi <yao.qi@linaro.org>
2733
2734 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2735 (emit_load_store_pair): Likewise.
2736
2737 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2738
2739 * dll.c (match_dll): Add cast(s).
2740 (unloaded_dll): Likewise.
2741 * linux-low.c (second_thread_of_pid_p): Likewise.
2742 (delete_lwp_callback): Likewise.
2743 (count_events_callback): Likewise.
2744 (select_event_lwp_callback): Likewise.
2745 (linux_set_resume_request): Likewise.
2746 * server.c (accumulate_file_name_length): Likewise.
2747 (emit_dll_description): Likewise.
2748 (handle_qxfer_threads_worker): Likewise.
2749 (visit_actioned_threads): Likewise.
2750 * thread-db.c (any_thread_of): Likewise.
2751 * tracepoint.c (same_process_p): Likewise.
2752 (match_blocktype): Likewise.
2753 (build_traceframe_info_xml): Likewise.
2754
2755 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2758 assignment.
2759 (gdb_unparse_agent_expr): Likewise.
2760 * hostio.c (require_data): Likewise.
2761 (handle_pread): Likewise.
2762 * linux-low.c (disable_regset): Likewise.
2763 (fetch_register): Likewise.
2764 (store_register): Likewise.
2765 (get_dynamic): Likewise.
2766 (linux_qxfer_libraries_svr4): Likewise.
2767 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2768 (set_fast_tracepoint_jump): Likewise.
2769 (uninsert_fast_tracepoint_jumps_at): Likewise.
2770 (reinsert_fast_tracepoint_jumps_at): Likewise.
2771 (validate_inserted_breakpoint): Likewise.
2772 (clone_agent_expr): Likewise.
2773 * regcache.c (init_register_cache): Likewise.
2774 * remote-utils.c (putpkt_binary_1): Likewise.
2775 (decode_M_packet): Likewise.
2776 (decode_X_packet): Likewise.
2777 (look_up_one_symbol): Likewise.
2778 (relocate_instruction): Likewise.
2779 (monitor_output): Likewise.
2780 * server.c (handle_search_memory): Likewise.
2781 (handle_qxfer_exec_file): Likewise.
2782 (handle_qxfer_libraries): Likewise.
2783 (handle_qxfer): Likewise.
2784 (handle_query): Likewise.
2785 (handle_v_cont): Likewise.
2786 (handle_v_run): Likewise.
2787 (captured_main): Likewise.
2788 * target.c (write_inferior_memory): Likewise.
2789 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2790 * tracepoint.c (init_trace_buffer): Likewise.
2791 (add_tracepoint_action): Likewise.
2792 (add_traceframe): Likewise.
2793 (add_traceframe_block): Likewise.
2794 (cmd_qtdpsrc): Likewise.
2795 (cmd_qtdv): Likewise.
2796 (cmd_qtstatus): Likewise.
2797 (response_source): Likewise.
2798 (response_tsv): Likewise.
2799 (cmd_qtnotes): Likewise.
2800 (gdb_collect): Likewise.
2801 (initialize_tracepoint): Likewise.
2802
2803 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2804
2805 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2806 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2807 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2808 <NOP>: New.
2809 (enum aarch64_condition_codes): New enum.
2810 (w0): New static global.
2811 (fp): Likewise.
2812 (lr): Likewise.
2813 (struct aarch64_memory_operand) <type>: New
2814 MEMORY_OPERAND_POSTINDEX type.
2815 (postindex_memory_operand): New helper function.
2816 (emit_ret): New function.
2817 (emit_load_store_pair): New function, factored out of emit_stp
2818 with support for MEMORY_OPERAND_POSTINDEX.
2819 (emit_stp): Rewrite using emit_load_store_pair.
2820 (emit_ldp): New function.
2821 (emit_load_store): Likewise.
2822 (emit_ldr): Mention post-index instruction in comment.
2823 (emit_ldrh): New function.
2824 (emit_ldrb): New function.
2825 (emit_ldrsw): Mention post-index instruction in comment.
2826 (emit_str): Likewise.
2827 (emit_subs): New function.
2828 (emit_cmp): Likewise.
2829 (emit_and): Likewise.
2830 (emit_orr): Likewise.
2831 (emit_orn): Likewise.
2832 (emit_eor): Likewise.
2833 (emit_mvn): Likewise.
2834 (emit_lslv): Likewise.
2835 (emit_lsrv): Likewise.
2836 (emit_asrv): Likewise.
2837 (emit_mul): Likewise.
2838 (emit_sbfm): Likewise.
2839 (emit_sbfx): Likewise.
2840 (emit_ubfm): Likewise.
2841 (emit_ubfx): Likewise.
2842 (emit_csinc): Likewise.
2843 (emit_cset): Likewise.
2844 (emit_nop): Likewise.
2845 (emit_ops_insns): New helper function.
2846 (emit_pop): Likewise.
2847 (emit_push): Likewise.
2848 (aarch64_emit_prologue): New function.
2849 (aarch64_emit_epilogue): Likewise.
2850 (aarch64_emit_add): Likewise.
2851 (aarch64_emit_sub): Likewise.
2852 (aarch64_emit_mul): Likewise.
2853 (aarch64_emit_lsh): Likewise.
2854 (aarch64_emit_rsh_signed): Likewise.
2855 (aarch64_emit_rsh_unsigned): Likewise.
2856 (aarch64_emit_ext): Likewise.
2857 (aarch64_emit_log_not): Likewise.
2858 (aarch64_emit_bit_and): Likewise.
2859 (aarch64_emit_bit_or): Likewise.
2860 (aarch64_emit_bit_xor): Likewise.
2861 (aarch64_emit_bit_not): Likewise.
2862 (aarch64_emit_equal): Likewise.
2863 (aarch64_emit_less_signed): Likewise.
2864 (aarch64_emit_less_unsigned): Likewise.
2865 (aarch64_emit_ref): Likewise.
2866 (aarch64_emit_if_goto): Likewise.
2867 (aarch64_emit_goto): Likewise.
2868 (aarch64_write_goto_address): Likewise.
2869 (aarch64_emit_const): Likewise.
2870 (aarch64_emit_call): Likewise.
2871 (aarch64_emit_reg): Likewise.
2872 (aarch64_emit_pop): Likewise.
2873 (aarch64_emit_stack_flush): Likewise.
2874 (aarch64_emit_zero_ext): Likewise.
2875 (aarch64_emit_swap): Likewise.
2876 (aarch64_emit_stack_adjust): Likewise.
2877 (aarch64_emit_int_call_1): Likewise.
2878 (aarch64_emit_void_call_2): Likewise.
2879 (aarch64_emit_eq_goto): Likewise.
2880 (aarch64_emit_ne_goto): Likewise.
2881 (aarch64_emit_lt_goto): Likewise.
2882 (aarch64_emit_le_goto): Likewise.
2883 (aarch64_emit_gt_goto): Likewise.
2884 (aarch64_emit_ge_got): Likewise.
2885 (aarch64_emit_ops_impl): New static global variable.
2886 (aarch64_emit_ops): New target function, return
2887 &aarch64_emit_ops_impl.
2888 (struct linux_target_ops): Install it.
2889
2890 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2891
2892 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2893 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2894 aarch64-ipa.o.
2895 * linux-aarch64-ipa.c: New file.
2896 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2897 and endian.h.
2898 (aarch64_get_thread_area): New target method.
2899 (extract_signed_bitfield): New helper function.
2900 (aarch64_decode_ldr_literal): New function.
2901 (enum aarch64_opcodes): New enum.
2902 (struct aarch64_register): New struct.
2903 (struct aarch64_operand): New struct.
2904 (x0): New static global.
2905 (x1): Likewise.
2906 (x2): Likewise.
2907 (x3): Likewise.
2908 (x4): Likewise.
2909 (w2): Likewise.
2910 (ip0): Likewise.
2911 (sp): Likewise.
2912 (xzr): Likewise.
2913 (aarch64_register): New helper function.
2914 (register_operand): Likewise.
2915 (immediate_operand): Likewise.
2916 (struct aarch64_memory_operand): New struct.
2917 (offset_memory_operand): New helper function.
2918 (preindex_memory_operand): Likewise.
2919 (enum aarch64_system_control_registers): New enum.
2920 (ENCODE): New macro.
2921 (emit_insn): New helper function.
2922 (emit_b): New function.
2923 (emit_bcond): Likewise.
2924 (emit_cb): Likewise.
2925 (emit_tb): Likewise.
2926 (emit_blr): Likewise.
2927 (emit_stp): Likewise.
2928 (emit_ldp_q_offset): Likewise.
2929 (emit_stp_q_offset): Likewise.
2930 (emit_load_store): Likewise.
2931 (emit_ldr): Likewise.
2932 (emit_ldrsw): Likewise.
2933 (emit_str): Likewise.
2934 (emit_ldaxr): Likewise.
2935 (emit_stxr): Likewise.
2936 (emit_stlr): Likewise.
2937 (emit_data_processing_reg): Likewise.
2938 (emit_data_processing): Likewise.
2939 (emit_add): Likewise.
2940 (emit_sub): Likewise.
2941 (emit_mov): Likewise.
2942 (emit_movk): Likewise.
2943 (emit_mov_addr): Likewise.
2944 (emit_mrs): Likewise.
2945 (emit_msr): Likewise.
2946 (emit_sevl): Likewise.
2947 (emit_wfe): Likewise.
2948 (append_insns): Likewise.
2949 (can_encode_int32_in): New helper function.
2950 (aarch64_relocate_instruction): New function.
2951 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2952 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2953 (struct linux_target_ops): Install aarch64_get_thread_area,
2954 aarch64_install_fast_tracepoint_jump_pad and
2955 aarch64_get_min_fast_tracepoint_insn_len.
2956
2957 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2958
2959 * Makefile.in (aarch64-insn.o): New rule.
2960 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2961
2962 2015-09-21 Yao Qi <yao.qi@linaro.org>
2963
2964 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2965
2966 2015-09-21 Yao Qi <yao.qi@linaro.org>
2967
2968 * tracepoint.c (max_jump_pad_size): Remove.
2969
2970 2015-09-18 Yao Qi <yao.qi@linaro.org>
2971
2972 * linux-aarch64-low.c: Don't include sys/uio.h.
2973 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2974
2975 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2976
2977 * tracepoint.c (eval_result_type): Change prototype.
2978 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2979
2980 2015-09-15 Pedro Alves <palves@redhat.com>
2981
2982 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2983 Check whether to report exec events instead of checking whether
2984 multiprocess is enabled.
2985
2986 2015-09-15 Pedro Alves <palves@redhat.com>
2987
2988 PR remote/18965
2989 * remote-utils.c (prepare_resume_reply): Merge
2990 TARGET_WAITKIND_VFORK_DONE switch case with the
2991 TARGET_WAITKIND_FORKED case.
2992
2993 2015-09-15 Yao Qi <yao.qi@linaro.org>
2994
2995 * server.c (handle_query): Check string comparison using
2996 "else if" instead of "if".
2997
2998 2015-09-15 Yao Qi <yao.qi@linaro.org>
2999
3000 * server.c (vCont_supported): New global variable.
3001 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3002 matches. Append ";vContSupported+" to own_buf.
3003 (handle_v_requests): Append ";s;S" to own_buf if target supports
3004 hardware single step or vCont_supported is false.
3005 (capture_main): Set vCont_supported to zero.
3006
3007 2015-09-15 Yao Qi <yao.qi@linaro.org>
3008
3009 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3010 it to ...
3011 (linux_supports_hardware_single_step): ... New function.
3012 (linux_target_ops): Update.
3013 * lynx-low.c (lynx_target_ops): Set field
3014 supports_hardware_single_step to target_can_do_hardware_single_step.
3015 * nto-low.c (nto_target_ops): Likewise.
3016 * spu-low.c (spu_target_ops): Likewise.
3017 * win32-low.c (win32_target_ops): Likewise.
3018 * target.c (target_can_do_hardware_single_step): New function.
3019 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3020 Remove. <supports_hardware_single_step>: New field.
3021 (target_supports_conditional_breakpoints): Remove.
3022 (target_supports_hardware_single_step): New macro.
3023 (target_can_do_hardware_single_step): Declare.
3024 * server.c (handle_query): Use target_supports_hardware_single_step
3025 instead of target_supports_conditional_breakpoints.
3026
3027 2015-09-15 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3030 function.
3031 (struct linux_target_ops the_low_target): Install
3032 aarch64_linux_siginfo_fixup.
3033
3034 2015-09-11 Don Breazeal <donb@codesourcery.com>
3035 Luis Machado <lgustavo@codesourcery.com>
3036
3037 * linux-low.c (linux_mourn): Static declaration.
3038 (linux_arch_setup): Move in front of
3039 handle_extended_wait.
3040 (linux_arch_setup_thread): New function.
3041 (handle_extended_wait): Handle exec events. Call
3042 linux_arch_setup_thread. Make event_lwp argument a
3043 pointer-to-a-pointer.
3044 (check_zombie_leaders): Do not check stopped threads.
3045 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3046 (linux_low_filter_event): Add lwp and thread for exec'ing
3047 non-leader thread if leader thread has been deleted.
3048 Refactor code into linux_arch_setup_thread and call it.
3049 Pass child lwp pointer by reference to handle_extended_wait.
3050 (linux_wait_for_event_filtered): Update comment.
3051 (linux_wait_1): Prevent clobbering exec event status.
3052 (linux_supports_exec_events): New function.
3053 (linux_target_ops) <supports_exec_events>: Initialize new member.
3054 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3055 new member.
3056 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3057 * server.c (report_exec_events): New global variable.
3058 (handle_query): Handle qSupported query for exec-events feature.
3059 (captured_main): Initialize report_exec_events.
3060 * server.h (report_exec_events): Declare new global variable.
3061 * target.h (struct target_ops) <supports_exec_events>: New
3062 member.
3063 (target_supports_exec_events): New macro.
3064 * win32-low.c (win32_target_ops) <supports_exec_events>:
3065 Initialize new member.
3066
3067 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3068
3069 * linux-low.c (linux_low_enable_btrace): Remove.
3070 (linux_target_ops): Replace linux_low_enable_btrace with
3071 linux_enable_btrace.
3072
3073 2015-09-03 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch64-low.c (aarch64_insert_point): Call
3076 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3077 returns true.
3078
3079 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3080
3081 * linux-low.c (check_stopped_by_breakpoint): Use
3082 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3083
3084 2015-08-27 Pedro Alves <palves@redhat.com>
3085
3086 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3087
3088 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3089
3090 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3091 the XNEW-family equivalent.
3092 (compile_bytecodes): Likewise.
3093 * dll.c (loaded_dll): Likewise.
3094 * event-loop.c (append_callback_event): Likewise.
3095 (create_file_handler): Likewise.
3096 (create_file_event): Likewise.
3097 * hostio.c (handle_open): Likewise.
3098 * inferiors.c (add_thread): Likewise.
3099 (add_process): Likewise.
3100 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3101 * linux-arm-low.c (arm_new_process): Likewise.
3102 (arm_new_thread): Likewise.
3103 * linux-low.c (add_to_pid_list): Likewise.
3104 (linux_add_process): Likewise.
3105 (handle_extended_wait): Likewise.
3106 (add_lwp): Likewise.
3107 (enqueue_one_deferred_signal): Likewise.
3108 (enqueue_pending_signal): Likewise.
3109 (linux_resume_one_lwp_throw): Likewise.
3110 (linux_resume_one_thread): Likewise.
3111 (linux_read_memory): Likewise.
3112 (linux_write_memory): Likewise.
3113 * linux-mips-low.c (mips_linux_new_process): Likewise.
3114 (mips_linux_new_thread): Likewise.
3115 (mips_add_watchpoint): Likewise.
3116 * linux-x86-low.c (initialize_low_arch): Likewise.
3117 * lynx-low.c (lynx_add_process): Likewise.
3118 * mem-break.c (set_raw_breakpoint_at): Likewise.
3119 (set_breakpoint): Likewise.
3120 (add_condition_to_breakpoint): Likewise.
3121 (add_commands_to_breakpoint): Likewise.
3122 (clone_agent_expr): Likewise.
3123 (clone_one_breakpoint): Likewise.
3124 * regcache.c (new_register_cache): Likewise.
3125 * remote-utils.c (look_up_one_symbol): Likewise.
3126 * server.c (queue_stop_reply): Likewise.
3127 (start_inferior): Likewise.
3128 (queue_stop_reply_callback): Likewise.
3129 (handle_target_event): Likewise.
3130 * spu-low.c (fetch_ppc_memory): Likewise.
3131 (store_ppc_memory): Likewise.
3132 * target.c (set_target_ops): Likewise.
3133 * thread-db.c (thread_db_load_search): Likewise.
3134 (try_thread_db_load_1): Likewise.
3135 * tracepoint.c (add_tracepoint): Likewise.
3136 (add_tracepoint_action): Likewise.
3137 (create_trace_state_variable): Likewise.
3138 (cmd_qtdpsrc): Likewise.
3139 (cmd_qtro): Likewise.
3140 (add_while_stepping_state): Likewise.
3141 * win32-low.c (child_add_thread): Likewise.
3142 (get_image_name): Likewise.
3143
3144 2015-08-25 Yao Qi <yao.qi@linaro.org>
3145
3146 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3147
3148 2015-08-25 Yao Qi <yao.qi@linaro.org>
3149
3150 * Makefile.in (aarch64-linux.o): New rule.
3151 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3152 srv_tgtobj.
3153 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3154 (aarch64_init_debug_reg_state): Make it extern.
3155 (aarch64_linux_prepare_to_resume): Remove.
3156
3157 2015-08-25 Yao Qi <yao.qi@linaro.org>
3158
3159 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3160 lwp_arch_private_info and ptid_of_lwp.
3161
3162 2015-08-25 Yao Qi <yao.qi@linaro.org>
3163
3164 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3165 Find proc_info by find_process_pid. All callers updated.
3166
3167 2015-08-25 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3170 Remove.
3171 (debug_reg_change_callback): Remove.
3172 (aarch64_notify_debug_reg_change): Remove.
3173
3174 2015-08-25 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3177 Call current_lwp_ptid.
3178
3179 2015-08-25 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-aarch64-low.c (debug_reg_change_callback): Use
3182 debug_printf.
3183
3184 2015-08-25 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3187
3188 2015-08-25 Yao Qi <yao.qi@linaro.org>
3189
3190 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3191
3192 2015-08-25 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3195 the code.
3196
3197 2015-08-25 Yao Qi <yao.qi@linaro.org>
3198
3199 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3200 Remove.
3201 (debug_reg_change_callback): Remove argument entry and add argument
3202 lwp. Remove local variable thread. Don't print thread id in the
3203 debugging output. Don't check whether pid of thread equals to pid.
3204 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3205 iterate_over_lwps instead find_inferior.
3206
3207 2015-08-24 Pedro Alves <palves@redhat.com>
3208
3209 * inferiors.c (get_first_process): New function.
3210 * inferiors.h (get_first_process): New declaration.
3211 * remote-utils.c (read_ptid): Default to the first process in the
3212 list, instead of to the current thread's process.
3213
3214 2015-08-24 Pedro Alves <palves@redhat.com>
3215
3216 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3217 * event-loop.c: Likewise.
3218 * remote-utils.c: Likewise.
3219 * tracepoint.c: Likewise.
3220
3221 2015-08-24 Pedro Alves <palves@redhat.com>
3222
3223 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3224 ptid_get_lwp.
3225
3226 2015-08-21 Pedro Alves <palves@redhat.com>
3227
3228 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3229 instead of literal 1.
3230
3231 2015-08-21 Pedro Alves <palves@redhat.com>
3232
3233 * tdesc.c (default_description): Explicitly zero-initialize.
3234
3235 2015-08-21 Pedro Alves <palves@redhat.com>
3236
3237 PR gdb/18749
3238 * inferiors.c (remove_thread): Discard any pending stop reply for
3239 this thread.
3240 * server.c (remove_all_on_match_pid): Rename to ...
3241 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3242 instead of a pid.
3243 (discard_queued_stop_replies): Change parameter to a ptid. Now
3244 extern.
3245 (handle_v_kill, kill_inferior_callback, captured_main)
3246 (process_serial_event): Adjust.
3247 * server.h (discard_queued_stop_replies): Declare.
3248
3249 2015-08-21 Pedro Alves <palves@redhat.com>
3250
3251 * linux-low.c (wait_for_sigstop): Always switch to no thread
3252 selected if the previously current thread dies.
3253 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3254 process instead of the current thread's.
3255 * remote-utils.c (input_interrupt): Don't check if there's no
3256 current thread.
3257 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3258 current thread to the general thread fails, error out.
3259 (handle_qxfer_auxv, handle_qxfer_libraries)
3260 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3261 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3262 (handle_query): Check if there's a thread selected instead of
3263 checking whether there's any thread in the thread list.
3264 (handle_qxfer_threads, handle_qxfer_btrace)
3265 (handle_qxfer_btrace_conf): Don't error out early if there's no
3266 thread in the thread list.
3267 (handle_v_cont, myresume): Don't set the current thread to the
3268 continue thread.
3269 (process_serial_event) <Hg handling>: Also set thread_id if the
3270 previous general thread is still alive.
3271 (process_serial_event) <g/G handling>: If setting the current
3272 thread to the general thread fails, error out.
3273 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3274 thread's lwp instead of the current thread's.
3275 * target.c (set_desired_thread): If the desired thread was not
3276 found, leave the current thread pointing to NULL. Return an int
3277 (boolean) indicating success.
3278 * target.h (set_desired_thread): Change return type to int.
3279
3280 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3281
3282 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3283 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3284 #includes.
3285 (ps_get_thread_area): New function.
3286
3287 2015-08-19 Gary Benson <gbenson@redhat.com>
3288
3289 * hostio.c (handle_pread): Do not attempt to read more data
3290 than hostio_reply_with_data can fit in a packet.
3291
3292 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3293
3294 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3295
3296 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3297
3298 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3299
3300 2015-08-06 Pedro Alves <palves@redhat.com>
3301
3302 * tracepoint.c (expr_eval_result): Now an int.
3303
3304 2015-08-06 Pedro Alves <palves@redhat.com>
3305
3306 * gdbthread.h (struct regcache): Forward declare.
3307 (struct thread_info) <regcache_data>: Now a struct regcache
3308 pointer.
3309 * inferiors.c (inferior_regcache_data)
3310 (set_inferior_regcache_data): Now work with struct regcache
3311 pointers.
3312 * inferiors.h (struct regcache): Forward declare.
3313 (inferior_regcache_data, set_inferior_regcache_data): Now work
3314 with struct regcache pointers.
3315 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3316 (free_register_cache_thread): Remove struct regcache pointer
3317 casts.
3318
3319 2015-08-06 Pedro Alves <palves@redhat.com>
3320
3321 * server.c (captured_main): On error, print the exception message
3322 to stderr, and if run_once is set, throw a quit.
3323
3324 2015-08-06 Pedro Alves <palves@redhat.com>
3325
3326 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3327 the current thread.
3328
3329 2015-08-06 Pedro Alves <palves@redhat.com>
3330
3331 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3332 reading beyond the passed in buffer length.
3333
3334 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3335
3336 * tracepoint.c (symbol_list) <required>: Remove.
3337
3338 2015-08-06 Pedro Alves <palves@redhat.com>
3339
3340 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3341 count if stopping and suspending threads.
3342 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3343 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3344 (linux_detach): Complete an ongoing step-over.
3345 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3346 throughout.
3347 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3348 (linux_wait_1): If passing a signal to the inferior after
3349 finishing a step-over, unsuspend and re-resume all lwps. If we
3350 see a single-step event but the thread should be continuing, don't
3351 pass the trap to gdb.
3352 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3353 internal_error instead of gdb_assert.
3354 (enqueue_pending_signal): New function.
3355 (check_ptrace_stopped_lwp_gone): Add debug output.
3356 (start_step_over): Use internal_error instead of gdb_assert.
3357 (complete_ongoing_step_over): New function.
3358 (linux_resume_one_thread): Don't resume a suspended thread.
3359 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3360 it stepping.
3361
3362 2015-08-06 Pedro Alves <palves@redhat.com>
3363
3364 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3365 (linux_thread_alive): Use lwp_is_marked_dead.
3366 (extended_event_reported): Delete.
3367 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3368 instead of extended_event_reported.
3369 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3370 as well.
3371 (lwp_is_marked_dead): New function.
3372 (lwp_running): Use lwp_is_marked_dead.
3373 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3374 comment.
3375
3376 2015-08-06 Pedro Alves <palves@redhat.com>
3377
3378 * linux-low.c (linux_wait_1): Move fork event output out of the
3379 !report_to_gdb check. Pass event_child->waitstatus to
3380 target_waitstatus_to_string instead of ourstatus.
3381
3382 2015-08-04 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3385 if current_thread is 32 bit.
3386
3387 2015-08-04 Yao Qi <yao.qi@linaro.org>
3388
3389 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3390 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3391 * server.c (extended_protocol): Remove "static".
3392 * server.h (extended_protocol): Declare it.
3393
3394 2015-08-04 Yao Qi <yao.qi@linaro.org>
3395
3396 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3397 both aarch64 and aarch32.
3398 (aarch64_set_pc): Likewise.
3399
3400 2015-08-04 Yao Qi <yao.qi@linaro.org>
3401
3402 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3403 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3404 arm-with-neon.xml to srv_xmlfiles.
3405 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3406 (is_64bit_tdesc): New function.
3407 (aarch64_linux_read_description): New function.
3408 (aarch64_arch_setup): Call aarch64_linux_read_description.
3409 (regs_info): Rename to regs_info_aarch64.
3410 (aarch64_regs_info): Return right regs_info.
3411 (initialize_low_arch): Call initialize_low_arch_aarch32.
3412
3413 2015-08-04 Yao Qi <yao.qi@linaro.org>
3414
3415 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3416 * linux-aarch32-low.c: New file.
3417 * linux-aarch32-low.h: New file.
3418 * linux-arm-low.c (arm_fill_gregset): Move it to
3419 linux-aarch32-low.c.
3420 (arm_store_gregset): Likewise.
3421 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3422 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3423 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3424 (regs_info): Rename to regs_info_arm.
3425 (arm_regs_info): Return regs_info_aarch32 if
3426 have_ptrace_getregset is 1 and target description is
3427 arm_with_neon or arm_with_vfpv3.
3428 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3429 Call initialize_low_arch_aarch32 instead.
3430
3431 2015-08-04 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3434 * linux-low.c: ... here.
3435 * linux-low.h (have_ptrace_getregset): Declare it.
3436
3437 2015-08-04 Pedro Alves <palves@redhat.com>
3438
3439 * thread-db.c (struct thread_db): Use new typedefs.
3440 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3441 CHK calls.
3442 (disable_thread_event_reporting): Cast result of dlsym to
3443 destination function pointer type.
3444 (thread_db_mourn): Use td_ta_delete_ftype.
3445
3446 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3447
3448 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3449 arch variant.
3450 (CDX_BREAKPOINT): Define for R2.
3451 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3452 (the_low_target): Add comments.
3453
3454 2015-07-30 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-arm-low.c (arm_hwcap): Remove it.
3457 (arm_read_description): New local variable arm_hwcap. Don't
3458 set arm_hwcap to zero.
3459
3460 2015-07-30 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3463 Use regcache->tdesc instead.
3464 (arm_store_wmmxregset): Likewise.
3465 (arm_fill_vfpregset): Likewise.
3466 (arm_store_vfpregset): Likewise.
3467
3468 2015-07-30 Yao Qi <yao.qi@linaro.org>
3469
3470 * linux-arm-low.c: Include arch/arm.h.
3471 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3472 (arm_store_gregset): Likewise.
3473
3474 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3477 ptrace's 4th parameter.
3478
3479 2015-07-27 Yao Qi <yao.qi@linaro.org>
3480
3481 * configure.srv (case aarch64*-*-linux*): Don't set
3482 srv_linux_usrregs.
3483
3484 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3485
3486 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3487 sys/ptrace.h.
3488 * linux-arm-low.c: Likewise.
3489 * linux-cris-low.c: Likewise.
3490 * linux-crisv32-low.c: Likewise.
3491 * linux-low.c: Likewise.
3492 * linux-m68k-low.c: Likewise.
3493 * linux-mips-low.c: Likewise.
3494 * linux-nios2-low.c: Likewise.
3495 * linux-s390-low.c: Likewise.
3496 * linux-sparc-low.c: Likewise.
3497 * linux-tic6x-low.c: Likewise.
3498 * linux-tile-low.c: Likewise.
3499 * linux-x86-low.c: Likewise.
3500
3501 2015-07-24 Pedro Alves <palves@redhat.com>
3502
3503 * config.in: Regenerate.
3504 * configure: Regenerate.
3505
3506 2015-07-24 Pedro Alves <palves@redhat.com>
3507
3508 * acinclude.m4: Include ../ptrace.m4.
3509 * configure.ac: Call GDB_AC_PTRACE.
3510 * config.in, configure: Regenerate.
3511
3512 2015-07-24 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-low.c (linux_create_inferior): Remove setting to
3515 proc->priv->new_inferior.
3516 (linux_attach): Likewise.
3517 (linux_low_filter_event): Likewise.
3518 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3519
3520 2015-07-24 Yao Qi <yao.qi@linaro.org>
3521
3522 * linux-low.c (linux_arch_setup): New function.
3523 (linux_low_filter_event): If proc->tdesc is NULL and
3524 proc->attached is true, call the_low_target.arch_setup.
3525 Otherwise, keep status pending, and return.
3526 (linux_resume_one_lwp_throw): Don't call get_pc if
3527 thread->while_stepping isn't NULL. Don't call
3528 get_thread_regcache if proc->tdesc is NULL.
3529 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3530 (linux_target_ops): Install arch_setup.
3531 * server.c (start_inferior): Call the_target->arch_setup.
3532 * target.h (struct target_ops) <arch_setup>: New field.
3533 (target_arch_setup): New marco.
3534 * lynx-low.c (lynx_target_ops): Update.
3535 * nto-low.c (nto_target_ops): Update.
3536 * spu-low.c (spu_target_ops): Update.
3537 * win32-low.c (win32_target_ops): Update.
3538
3539 2015-07-24 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-low.c (linux_add_process): Don't set
3542 proc->priv->new_inferior.
3543 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3544 (linux_attach): Likewise.
3545
3546 2015-07-24 Yao Qi <yao.qi@linaro.org>
3547
3548 * server.c (start_inferior): Code refactor.
3549
3550 2015-07-24 Yao Qi <yao.qi@linaro.org>
3551
3552 * server.c (process_serial_event): Set general_thread.
3553
3554 2015-07-21 Yao Qi <yao.qi@linaro.org>
3555
3556 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3557 aarch64_linux_get_debug_reg_capacity.
3558
3559 2015-07-17 Yao Qi <yao.qi@linaro.org>
3560
3561 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3562 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3563 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3564 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3565 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3566 (AARCH64_HWP_ALIGNMENT): Likewise.
3567 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3568 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3569 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3570 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3571 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3572 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3573 (struct aarch64_debug_reg_state): Likewise.
3574 (struct arch_lwp_info): Likewise.
3575 (aarch64_align_watchpoint): Likewise.
3576 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3577 (aarch64_watchpoint_length): Likewise.
3578 (aarch64_point_encode_ctrl_reg): Likewise
3579 (aarch64_point_is_aligned): Likewise.
3580 (aarch64_align_watchpoint): Likewise.
3581 (aarch64_linux_set_debug_regs):
3582 (aarch64_dr_state_insert_one_point): Likewise.
3583 (aarch64_dr_state_remove_one_point): Likewise.
3584 (aarch64_handle_breakpoint): Likewise.
3585 (aarch64_handle_aligned_watchpoint): Likewise.
3586 (aarch64_handle_unaligned_watchpoint): Likewise.
3587 (aarch64_handle_watchpoint): Likewise.
3588
3589 2015-07-17 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3592 and don't aarch64_get_debug_reg_state. All callers update.
3593 (aarch64_handle_aligned_watchpoint): Likewise.
3594 (aarch64_handle_unaligned_watchpoint): Likewise.
3595 (aarch64_handle_watchpoint): Likewise.
3596 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3597 (aarch64_remove_point): Likewise.
3598
3599 2015-07-17 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3602 debug_printf.
3603 (aarch64_handle_unaligned_watchpoint): Likewise.
3604
3605 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3606
3607 Revert the previous 3 commits:
3608 Move gdb_regex* to common/
3609 Move linux_find_memory_regions_full & co.
3610 gdbserver build-id attribute generator
3611
3612 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3613 Jan Kratochvil <jan.kratochvil@redhat.com>
3614
3615 gdbserver build-id attribute generator.
3616 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3617 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3618 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3619 (find_phdr): New.
3620 (get_dynamic): Use find_pdhr to traverse program headers.
3621 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3622 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3623 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3624 (get_hex_build_id): New.
3625 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3626 to reply XML document.
3627
3628 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3629 Jan Kratochvil <jan.kratochvil@redhat.com>
3630
3631 * target.c: Include target/target-utils.h and fcntl.h.
3632 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3633 (target_fileio_read_stralloc): New functions.
3634
3635 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3636
3637 * Makefile.in (OBS): Add gdb_regex.o.
3638 (gdb_regex.o): New.
3639 * config.in: Rebuilt.
3640 * configure: Rebuilt.
3641
3642 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3643 Jan Kratochvil <jan.kratochvil@redhat.com>
3644
3645 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3646 * Makefile.in (OBS): Add target-utils.o.
3647 (linux-maps.o, target-utils.o): New.
3648 * configure.srv (srv_linux_obj): Add linux-maps.o.
3649
3650 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3651
3652 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3653 function, return 1.
3654 (the_low_target): Install it.
3655
3656 2015-07-14 Pedro Alves <palves@redhat.com>
3657
3658 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3659 Instead, ignore ECHILD, and throw an error for other errnos.
3660
3661 2015-07-10 Pedro Alves <palves@redhat.com>
3662
3663 * event-loop.c (struct callback_event) <data>: Change type to
3664 gdb_client_data instance instead of gdb_client_data pointer.
3665 (append_callback_event): Adjust.
3666
3667 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3668
3669 * linux-aarch64-low.c: Add comments for each linux_target_ops
3670 method. Remove comments already covered in target_ops and
3671 linux_target_ops definitions.
3672 (the_low_target): Add comments for each unimplemented method.
3673
3674 2015-07-09 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-aarch64-low.c (aarch64_regmap): Remove.
3677 (aarch64_usrregs_info): Remove.
3678 (regs_info): Set field usrregs to NULL.
3679
3680 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3681
3682 * linux-low.c: Include "rsp-low.h"
3683 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3684 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3685 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3686 (handle_btrace_enable_pt): New.
3687 (handle_btrace_general_set): Support "pt".
3688 (handle_btrace_conf_general_set): Support "pt:size".
3689
3690 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3691
3692 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3693 Z_PACKET_SW_BP.
3694
3695 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3696
3697 * linux-aarch64-low.c: Remove comment about endianness.
3698 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3699 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3700 memcmp.
3701
3702 2015-06-24 Gary Benson <gbenson@redhat.com>
3703
3704 * linux-i386-ipa.c (stdint.h): Do not include.
3705 * lynx-i386-low.c (stdint.h): Likewise.
3706 * lynx-ppc-low.c (stdint.h): Likewise.
3707 * mem-break.c (stdint.h): Likewise.
3708 * thread-db.c (stdint.h): Likewise.
3709 * tracepoint.c (stdint.h): Likewise.
3710 * win32-low.c (stdint.h): Likewise.
3711
3712 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3713
3714 * server.c (write_qxfer_response): Update call to
3715 remote_escape_output.
3716
3717 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3718 Jan Kratochvil <jan.kratochvil@redhat.com>
3719
3720 Merge multiple hex conversions.
3721 * gdbreplay.c (tohex): Rename to 'fromhex'.
3722 (logchar): Use fromhex.
3723
3724 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3725
3726 * server.c (handle_qxfer_libraries): Set `version' attribute for
3727 <library-list>.
3728
3729 2015-06-10 Gary Benson <gbenson@redhat.com>
3730
3731 * target.h (struct target_ops) <multifs_open>: New field.
3732 <multifs_unlink>: Likewise.
3733 <multifs_readlink>: Likewise.
3734 * linux-low.c (nat/linux-namespaces.h): New include.
3735 (linux_target_ops): Initialize the_target->multifs_open,
3736 the_target->multifs_unlink and the_target->multifs_readlink.
3737 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3738 * hostio.c (hostio_fs_pid): New static variable.
3739 (hostio_handle_new_gdb_connection): New function.
3740 (handle_setfs): Likewise.
3741 (handle_open): Use the_target->multifs_open as appropriate.
3742 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3743 (handle_readlink): Use the_target->multifs_readlink as
3744 appropriate.
3745 (handle_vFile): Handle vFile:setfs packets.
3746 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3747 after target_handle_new_gdb_connection.
3748
3749 2015-06-10 Gary Benson <gbenson@redhat.com>
3750
3751 * configure.ac (AC_CHECK_FUNCS): Add setns.
3752 * config.in: Regenerate.
3753 * configure: Likewise.
3754 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3755 (linux-namespaces.o): New rule.
3756 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3757
3758 2015-06-09 Gary Benson <gbenson@redhat.com>
3759
3760 * hostio.c (handle_open): Process mode argument with
3761 fileio_to_host_mode.
3762
3763 2015-06-01 Yao Qi <yao.qi@linaro.org>
3764
3765 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3766 * linux-x86-low.c: Likewise.
3767
3768 2015-05-28 Don Breazeal <donb@codesourcery.com>
3769
3770 * linux-low.c (handle_extended_wait): Initialize
3771 thread_info.last_resume_kind for new fork children.
3772
3773 2015-05-15 Pedro Alves <palves@redhat.com>
3774
3775 * target.h (target_handle_new_gdb_connection): Rewrite using if
3776 wrapped in do/while.
3777
3778 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3779
3780 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3781 * configure, config.in: Regenerate.
3782 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3783 Declare typedef.
3784
3785 2015-05-12 Don Breazeal <donb@codesourcery.com>
3786
3787 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3788 PTRACE_EVENT_VFORK_DONE.
3789 (linux_low_ptrace_options, extended_event_reported): Add vfork
3790 events.
3791 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3792 and "vforkdone" for RSP 'T' Stop Reply Packet.
3793 * server.h (report_vfork_events): Declare
3794 global variable.
3795
3796 2015-05-12 Don Breazeal <donb@codesourcery.com>
3797
3798 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3799 (the_low_target) <new_fork>: Initialize new member.
3800 * linux-arm-low.c (arm_new_fork): New function.
3801 (the_low_target) <new_fork>: Initialize new member.
3802 * linux-low.c (handle_extended_wait): Call new target function
3803 new_fork.
3804 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3805 * linux-mips-low.c (mips_add_watchpoint): New function
3806 extracted from mips_insert_point.
3807 (the_low_target) <new_fork>: Initialize new member.
3808 (mips_linux_new_fork): New function.
3809 (mips_insert_point): Call mips_add_watchpoint.
3810 * linux-x86-low.c (x86_linux_new_fork): New function.
3811 (the_low_target) <new_fork>: Initialize new member.
3812
3813 2015-05-12 Don Breazeal <donb@codesourcery.com>
3814
3815 * linux-low.c (handle_extended_wait): Implement return value,
3816 rename argument 'event_child' to 'event_lwp', handle
3817 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3818 (linux_low_ptrace_options): New function.
3819 (linux_low_filter_event): Call linux_low_ptrace_options,
3820 use different argument fo linux_enable_event_reporting,
3821 use return value from handle_extended_wait.
3822 (extended_event_reported): New function.
3823 (linux_wait_1): Call extended_event_reported and set
3824 status to report fork events.
3825 (linux_write_memory): Add pid to debug message.
3826 (reset_lwp_ptrace_options_callback): New function.
3827 (linux_handle_new_gdb_connection): New function.
3828 (linux_target_ops): Initialize new structure member.
3829 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3830 * lynx-low.c: Initialize new structure member.
3831 * remote-utils.c (prepare_resume_reply): Implement stop reason
3832 "fork" for "T" stop message.
3833 * server.c (handle_query): Call handle_new_gdb_connection.
3834 * server.h (report_fork_events): Declare global flag.
3835 * target.h (struct target_ops) <handle_new_gdb_connection>:
3836 New member.
3837 (target_handle_new_gdb_connection): New macro.
3838 * win32-low.c: Initialize new structure member.
3839
3840 2015-05-12 Don Breazeal <donb@codesourcery.com>
3841
3842 * mem-break.c (APPEND_TO_LIST): Define macro.
3843 (clone_agent_expr): New function.
3844 (clone_one_breakpoint): New function.
3845 (clone_all_breakpoints): New function.
3846 * mem-break.h: Declare new functions.
3847
3848 2015-05-12 Don Breazeal <donb@codesourcery.com>
3849
3850 * linux-low.c (linux_supports_fork_events): New function.
3851 (linux_supports_vfork_events): New function.
3852 (linux_target_ops): Initialize new structure members.
3853 (initialize_low): Call linux_check_ptrace_features.
3854 * lynx-low.c (lynx_target_ops): Initialize new structure
3855 members.
3856 * server.c (report_fork_events, report_vfork_events):
3857 New global flags.
3858 (handle_query): Add new features to qSupported packet and
3859 response.
3860 (captured_main): Initialize new global variables.
3861 * target.h (struct target_ops) <supports_fork_events>:
3862 New member.
3863 <supports_vfork_events>: New member.
3864 (target_supports_fork_events): New macro.
3865 (target_supports_vfork_events): New macro.
3866 * win32-low.c (win32_target_ops): Initialize new structure
3867 members.
3868
3869 2015-05-12 Gary Benson <gbenson@redhat.com>
3870
3871 * server.c (handle_qxfer_exec_file): Use current process
3872 if annex is empty.
3873
3874 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3875
3876 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3877 Remove HAVE_PTRACE_GETREGS conditionals.
3878 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3879 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3880
3881 2015-05-08 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-low.c (linux_supports_conditional_breakpoints): New
3884 function.
3885 (linux_target_ops): Install new target method.
3886 * lynx-low.c (lynx_target_ops): Install NULL hook for
3887 supports_conditional_breakpoints.
3888 * nto-low.c (nto_target_ops): Likewise.
3889 * spu-low.c (spu_target_ops): Likewise.
3890 * win32-low.c (win32_target_ops): Likewise.
3891 * server.c (handle_query): Check
3892 target_supports_conditional_breakpoints.
3893 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3894 New field.
3895 (target_supports_conditional_breakpoints): New macro.
3896
3897 2015-05-06 Pedro Alves <palves@redhat.com>
3898
3899 PR server/18081
3900 * server.c (start_inferior): If the process exits, mourn it.
3901
3902 2015-04-21 Gary Benson <gbenson@redhat.com>
3903
3904 * hostio.c (fileio_open_flags_to_host): Factored out to
3905 fileio_to_host_openflags in common/fileio.c. Single use
3906 updated.
3907
3908 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3909
3910 * linux-xtensa-low.c (xtensa_fill_gregset)
3911 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3912 XCHAL_HAVE_LOOP.
3913
3914 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3915
3916 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3917 (regs_info): Replace usrregs pointer with NULL.
3918
3919 2015-04-17 Gary Benson <gbenson@redhat.com>
3920
3921 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3922 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3923 * server.c (handle_qxfer_exec_file): New function.
3924 (qxfer_packets): Add exec-file entry.
3925 (handle_query): Report qXfer:exec-file:read as supported packet.
3926
3927 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3928
3929 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3930
3931 2015-04-09 Gary Benson <gbenson@redhat.com>
3932
3933 * hostio-errno.c (errno_to_fileio_error): Remove function.
3934 Update caller to use remote_fileio_to_fio_error.
3935
3936 2015-04-09 Yao Qi <yao.qi@linaro.org>
3937
3938 * linux-low.c (linux_insert_point): Call
3939 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3940 (linux_remove_point): Call remove_memory_breakpoint if type is
3941 raw_bkpt_type_sw.
3942 * linux-x86-low.c (x86_insert_point): Don't call
3943 insert_memory_breakpoint.
3944 (x86_remove_point): Don't call remove_memory_breakpoint.
3945
3946 2015-04-01 Pedro Alves <palves@redhat.com>
3947 Cleber Rosa <crosa@redhat.com>
3948
3949 * server.c (gdbserver_usage): Reorganize and extend the usage
3950 message.
3951
3952 2015-03-24 Pedro Alves <palves@redhat.com>
3953
3954 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3955 output. Also dump TRAP_TRACE.
3956 (linux_low_filter_event): In debug output, distinguish a
3957 resume_stop SIGSTOP from a delayed SIGSTOP.
3958
3959 2015-03-24 Gary Benson <gbenson@redhat.com>
3960
3961 * linux-x86-low.c (x86_linux_new_thread): Moved to
3962 nat/x86-linux.c.
3963 (x86_linux_prepare_to_resume): Likewise.
3964
3965 2015-03-24 Gary Benson <gbenson@redhat.com>
3966
3967 * Makefile.in (x86-linux-dregs.o): New rule.
3968 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3969 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3970 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3971 (x86_linux_dr_get): Likewise.
3972 (x86_linux_dr_set): Likewise.
3973 (update_debug_registers_callback): Likewise.
3974 (x86_linux_dr_set_addr): Likewise.
3975 (x86_linux_dr_get_addr): Likewise.
3976 (x86_linux_dr_set_control): Likewise.
3977 (x86_linux_dr_get_control): Likewise.
3978 (x86_linux_dr_get_status): Likewise.
3979 (x86_linux_update_debug_registers): Likewise.
3980
3981 2015-03-24 Gary Benson <gbenson@redhat.com>
3982
3983 * linux-x86-low.c (x86_linux_update_debug_registers):
3984 New function, factored out from...
3985 (x86_linux_prepare_to_resume): ...this.
3986
3987 2015-03-24 Gary Benson <gbenson@redhat.com>
3988
3989 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3990 (x86_linux_dr_set): Likewise.
3991 (update_debug_registers_callback): Likewise.
3992 (x86_linux_dr_set_addr): Likewise.
3993 (x86_linux_dr_get_addr): Likewise.
3994 (x86_linux_dr_set_control): Likewise.
3995 (x86_linux_dr_get_control): Likewise.
3996 (x86_linux_dr_get_status): Likewise.
3997 (x86_linux_prepare_to_resume): Likewise.
3998
3999 2015-03-24 Gary Benson <gbenson@redhat.com>
4000
4001 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4002 Use perror_with_name. Pass string through gettext.
4003 (x86_linux_dr_set): Likewise.
4004
4005 2015-03-24 Gary Benson <gbenson@redhat.com>
4006
4007 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4008 (x86_linux_dr_set_addr): ...this.
4009 (x86_dr_low_get_addr): Rename to...
4010 (x86_linux_dr_get_addr): ...this.
4011 (x86_dr_low_set_control): Rename to...
4012 (x86_linux_dr_set_control): ...this.
4013 (x86_dr_low_get_control): Rename to...
4014 (x86_linux_dr_get_control): ...this.
4015 (x86_dr_low_get_status): Rename to...
4016 (x86_linux_dr_get_status): ...this.
4017 (x86_dr_low): Update with new function names.
4018
4019 2015-03-24 Gary Benson <gbenson@redhat.com>
4020
4021 * Makefile.in (x86-linux.o): New rule.
4022 * configure.srv: Add x86-linux.o to relevant targets.
4023 * linux-low.c (lwp_set_arch_private_info): New function.
4024 (lwp_arch_private_info): Likewise.
4025 * linux-x86-low.c: Include nat/x86-linux.h.
4026 (arch_lwp_info): Removed structure.
4027 (update_debug_registers_callback):
4028 Use lwp_set_debug_registers_changed.
4029 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4030 and lwp_set_debug_registers_changed.
4031 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4032
4033 2015-03-24 Gary Benson <gbenson@redhat.com>
4034
4035 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4036 * linux-arm-low.c (arm_new_thread): Likewise.
4037 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4038 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4039 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4040 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4041
4042 2015-03-24 Gary Benson <gbenson@redhat.com>
4043
4044 * linux-low.c (ptid_of_lwp): New function.
4045 (lwp_is_stopped): Likewise.
4046 (lwp_stop_reason): Likewise.
4047 * linux-x86-low.c (update_debug_registers_callback):
4048 Use lwp_is_stopped.
4049 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4050 lwp_stop_reason.
4051
4052 2015-03-24 Gary Benson <gbenson@redhat.com>
4053
4054 * linux-low.h (linux_stop_lwp): Remove declaration.
4055
4056 2015-03-24 Gary Benson <gbenson@redhat.com>
4057
4058 * linux-low.h: Include nat/linux-nat.h.
4059 * linux-low.c (iterate_over_lwps_args): New structure.
4060 (iterate_over_lwps_filter): New function.
4061 (iterate_over_lwps): Likewise.
4062 * linux-x86-low.c (update_debug_registers_callback):
4063 Update signature to what iterate_over_lwps expects.
4064 Remove PID check that iterate_over_lwps now performs.
4065 (x86_dr_low_set_addr): Use iterate_over_lwps.
4066 (x86_dr_low_set_control): Likewise.
4067
4068 2015-03-24 Gary Benson <gbenson@redhat.com>
4069
4070 * linux-x86-low.c (x86_debug_reg_state): New function.
4071 (x86_linux_prepare_to_resume): Use the above.
4072
4073 2015-03-24 Gary Benson <gbenson@redhat.com>
4074
4075 * linux-low.c (current_lwp_ptid): New function.
4076 * linux-x86-low.c: Include nat/linux-nat.h.
4077 (x86_dr_low_get_addr): Use current_lwp_ptid.
4078 (x86_dr_low_get_control): Likewise.
4079 (x86_dr_low_get_status): Likewise.
4080
4081 2015-03-20 Pedro Alves <palves@redhat.com>
4082
4083 * tracepoint.c (cmd_qtstatus): Make "str" const.
4084
4085 2015-03-20 Pedro Alves <palves@redhat.com>
4086
4087 * server.c (handle_general_set): Make "req_str" const.
4088
4089 2015-03-19 Pedro Alves <palves@redhat.com>
4090
4091 * linux-low.c (linux_resume_one_lwp): Rename to ...
4092 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4093 instead call perror_with_name.
4094 (check_ptrace_stopped_lwp_gone): New function.
4095 (linux_resume_one_lwp): Reimplement as wrapper around
4096 linux_resume_one_lwp_throw that swallows errors if the LWP is
4097 gone.
4098
4099 2015-03-19 Pedro Alves <palves@redhat.com>
4100
4101 * linux-low.c (count_events_callback, select_event_lwp_callback):
4102 No longer check whether the thread has resume_stop as last resume
4103 kind.
4104
4105 2015-03-19 Pedro Alves <palves@redhat.com>
4106
4107 * linux-low.c (count_events_callback, select_event_lwp_callback):
4108 Use the lwp's status_pending_p field, not the thread's.
4109
4110 2015-03-19 Pedro Alves <palves@redhat.com>
4111
4112 * linux-low.c (select_event_lwp_callback): Update comments to
4113 no longer mention SIGTRAP.
4114
4115 2015-03-18 Gary Benson <gbenson@redhat.com>
4116
4117 * server.c (handle_query): Do not report vFile:fstat as supported.
4118
4119 2015-03-11 Gary Benson <gbenson@redhat.com>
4120
4121 * hostio.c (sys/types.h): New include.
4122 (sys/stat.h): Likewise.
4123 (common-remote-fileio.h): Likewise.
4124 (handle_fstat): New function.
4125 (handle_vFile): Handle vFile:fstat packets.
4126
4127 2015-03-11 Gary Benson <gbenson@redhat.com>
4128
4129 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4130 struct stat.st_blocks and struct stat.st_blksize.
4131 * configure: Regenerate.
4132 * config.in: Likewise.
4133 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4134 (OBS): Add common-remote-fileio.o.
4135 (common-remote-fileio.o): New rule.
4136
4137 2015-03-09 Pedro Alves <palves@redhat.com>
4138
4139 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4140 'struct sockaddr' pointer in 'accept' call.
4141
4142 2015-03-09 Pedro Alves <palves@redhat.com>
4143
4144 Revert:
4145 2015-03-07 Pedro Alves <palves@redhat.com>
4146 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4147 or <winsock2.h> here. Instead include "gdb_socket.h".
4148 (remote_open): Use union gdb_sockaddr_u.
4149 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4150 or <winsock2.h> here. Instead include "gdb_socket.h".
4151 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4152 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4153 or <sys/un.h>.
4154 (init_named_socket, gdb_agent_helper_thread): Use union
4155 gdb_sockaddr_u.
4156
4157 2015-03-07 Pedro Alves <palves@redhat.com>
4158
4159 * configure.ac (build_warnings): Move
4160 -Wdeclaration-after-statement to the C-specific set.
4161 * configure: Regenerate.
4162
4163 2015-03-07 Pedro Alves <palves@redhat.com>
4164
4165 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4166 or <winsock2.h> here. Instead include "gdb_socket.h".
4167 (remote_open): Use union gdb_sockaddr_u.
4168 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4169 or <winsock2.h> here. Instead include "gdb_socket.h".
4170 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4171 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4172 or <sys/un.h>.
4173 (init_named_socket, gdb_agent_helper_thread): Use union
4174 gdb_sockaddr_u.
4175
4176 2015-03-07 Pedro Alves <palves@redhat.com>
4177
4178 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4179 instead.
4180
4181 2015-03-06 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-aarch64-low.c (aarch64_insert_point): Use
4184 show_debug_regs as a boolean.
4185 (aarch64_remove_point): Likewise.
4186
4187 2015-03-05 Pedro Alves <palves@redhat.com>
4188
4189 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4190 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4191 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4192 * nto-low.c (nto_target_ops): Likewise.
4193 * spu-low.c (spu_target_ops): Likewise.
4194 * win32-low.c (win32_target_ops): Likewise.
4195
4196 2015-03-04 Pedro Alves <palves@redhat.com>
4197
4198 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4199 Decide whether a breakpoint triggered based on the SIGTRAP's
4200 siginfo.si_code.
4201 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4202 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4203 (linux_low_filter_event): Check for breakpoints before checking
4204 watchpoints.
4205 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4206 siginfo.si_code.
4207 (linux_stopped_by_sw_breakpoint)
4208 (linux_supports_stopped_by_sw_breakpoint)
4209 (linux_stopped_by_hw_breakpoint)
4210 (linux_supports_stopped_by_hw_breakpoint): New functions.
4211 (linux_target_ops): Install new target methods.
4212
4213 2015-03-04 Pedro Alves <palves@redhat.com>
4214
4215 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4216 * server.c (swbreak_feature, hwbreak_feature): New globals.
4217 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4218 (captured_main): Clear swbreak_feature and hwbreak_feature.
4219 * server.h (swbreak_feature, hwbreak_feature): Declare.
4220 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4221 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4222 supports_stopped_by_hw_breakpoint>: New fields.
4223 (target_supports_stopped_by_sw_breakpoint)
4224 (target_stopped_by_sw_breakpoint)
4225 (target_supports_stopped_by_hw_breakpoint)
4226 (target_stopped_by_hw_breakpoint): Declare.
4227
4228 2015-03-04 Pedro Alves <palves@redhat.com>
4229
4230 enum lwp_stop_reason -> enum target_stop_reason
4231 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4232 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4233 (linux_wait_1, stuck_in_jump_pad_callback)
4234 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4235 (linux_stopped_by_watchpoint):
4236 * linux-low.h (enum lwp_stop_reason): Delete.
4237 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4238 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4239
4240 2015-03-04 Yao Qi <yao.qi@linaro.org>
4241
4242 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4243
4244 2015-03-03 Gary Benson <gbenson@redhat.com>
4245
4246 * hostio.c (handle_vFile): Fix prefix lengths.
4247
4248 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4249
4250 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4251 ptr_bits.
4252
4253 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4254
4255 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4256 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4257 (clean): Add "rm -f" for above C files.
4258 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4259 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4260 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4261 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4262 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4263 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4264 (init_registers_s390x_vx_linux64)
4265 (init_registers_s390x_tevx_linux64)
4266 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4267 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4268 declarations.
4269 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4270 (s390_store_vxrs_high): New functions.
4271 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4272 NT_S390_VXRS_HIGH.
4273 (s390_arch_setup): Add logic for selecting one of the new target
4274 descriptions. Activate the new vector regsets if applicable.
4275 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4276 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4277 and init_registers_s390x_tevx_linux64.
4278
4279 2015-03-01 Pedro Alves <palves@redhat.com>
4280
4281 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4282 parameter.
4283
4284 2015-02-27 Pedro Alves <palves@redhat.com>
4285
4286 * linux-x86-low.c (u_debugreg_offset): New function.
4287 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4288
4289 2015-02-27 Pedro Alves <palves@redhat.com>
4290
4291 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4292 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4293 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4294 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4295 (ps_lsetfpregs, ps_getpid)
4296 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4297 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4298 (ps_lsetxregs, ps_plog): Declare.
4299
4300 2015-02-27 Pedro Alves <palves@redhat.com>
4301
4302 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4303 IP_AGENT_EXPORT_FUNC.
4304 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4305 IP_AGENT_EXPORT_FUNC.
4306 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4307 (IP_AGENT_EXPORT): Delete.
4308 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4309 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4310 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4311 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4312 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4313 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4314 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4315 (traceframe_read_count, traceframe_write_count)
4316 (traceframes_created, trace_state_variables, get_raw_reg)
4317 (get_trace_state_variable_value, set_trace_state_variable_value)
4318 (ust_loaded, helper_thread_id, cmd_buf): Use
4319 IPA_SYM_EXPORTED_NAME.
4320 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4321 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4322 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4323 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4324 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4325 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4326 EXTERN_C_PUSH/EXTERN_C_POP.
4327 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4328 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4329 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4330 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4331 (traceframe_write_count, traceframe_read_count)
4332 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4333 (about_to_request_buffer_space, get_trace_state_variable_value)
4334 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4335 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4336 EXTERN_C_PUSH/EXTERN_C_POP.
4337 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4338 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4339 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4340 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4341 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4342 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4343 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4344 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4345 Define.
4346 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4347 (IP_AGENT_EXPORT_VAR_DECL): Define.
4348 (tracing): Declare.
4349 (gdb_agent_get_raw_reg): Declare.
4350
4351 2015-02-27 Tom Tromey <tromey@redhat.com>
4352 Pedro Alves <palves@redhat.com>
4353
4354 Rename symbols whose names are reserved C++ keywords throughout.
4355
4356 2015-02-27 Pedro Alves <palves@redhat.com>
4357
4358 * Makefile.in (COMPILER): New, get it from autoconf.
4359 (CXX): Get from autoconf instead.
4360 (COMPILE.pre): Use COMPILER.
4361 (CC-LD): Rename to ...
4362 (CC_LD): ... this. Use COMPILER.
4363 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4364 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4365 * acinclude.m4: Include build-with-cxx.m4.
4366 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4367 Disable -Werror by default if building in C++ mode.
4368 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4369 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4370 the C++ compiler. Save/restore CXXFLAGS too.
4371 * configure: Regenerate.
4372
4373 2015-02-27 Pedro Alves <palves@redhat.com>
4374
4375 * acinclude.m4: Include libiberty.m4.
4376 * configure.ac: Call libiberty_INIT.
4377 * config.in, configure: Regenerate.
4378
4379 2015-02-26 Pedro Alves <palves@redhat.com>
4380
4381 * linux-low.c (linux_wait_1): When incrementing the PC past a
4382 program breakpoint always use the_low_target.breakpoint_len as
4383 increment, rather than the maximum between that and
4384 the_low_target.decr_pc_after_break.
4385
4386 2015-02-23 Pedro Alves <palves@redhat.com>
4387
4388 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4389 thread was doing a step-over; always adjust the PC if
4390 we stepped over a permanent breakpoint.
4391 (linux_wait_1): If we stepped over breakpoint that was on top of a
4392 permanent breakpoint, manually advance the PC past it.
4393
4394 2015-02-23 Pedro Alves <palves@redhat.com>
4395
4396 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4397 modes.
4398 (x86_fill_gregset, x86_store_gregset): Use it when handling
4399 $orig_eax.
4400
4401 2015-02-20 Pedro Alves <palves@redhat.com>
4402
4403 * thread-db.c: Include "nat/linux-procfs.h".
4404 (thread_db_init): Skip listing new threads if the kernel supports
4405 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4406
4407 2015-02-20 Pedro Alves <palves@redhat.com>
4408
4409 * linux-low.c (status_pending_p_callback): Use ptid_match.
4410
4411 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4412
4413 PR breakpoints/16812
4414 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4415 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4416 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4417
4418 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4419
4420 PR breakpoints/15956
4421 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4422
4423 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4424
4425 * linux-low.c (linux_low_btrace_conf): Print size.
4426 * server.c (handle_btrace_conf_general_set): New.
4427 (hanle_general_set): Call handle_btrace_conf_general_set.
4428 (handle_query): Report Qbtrace-conf:bts:size as supported.
4429
4430 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4431
4432 * linux-low.c (linux_low_enable_btrace): Update parameters.
4433 (linux_low_btrace_conf): New.
4434 (linux_target_ops)<to_btrace_conf>: Initialize.
4435 * server.c (current_btrace_conf): New.
4436 (handle_btrace_enable): Rename to ...
4437 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4438 to target_enable_btrace. Update comment. Update users.
4439 (handle_qxfer_btrace_conf): New.
4440 (qxfer_packets): Add btrace-conf entry.
4441 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4442 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4443 (target_ops)<read_btrace_conf>: New.
4444 (target_enable_btrace): Update parameters.
4445 (target_read_btrace_conf): New.
4446
4447 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4448
4449 * server.c (handle_btrace_general_set): Remove call to
4450 target_supports_btrace.
4451 (supported_btrace_packets): New.
4452 (handle_query): Call supported_btrace_packets.
4453 * target.h: include btrace-common.h.
4454 (btrace_target_info): Removed.
4455 (supports_btrace, target_supports_btrace): Update parameters.
4456
4457 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4458
4459 * Makefile.in (SFILES): Add common/btrace-common.c.
4460 (OBS): Add common/btrace-common.o.
4461 (btrace-common.o): Add build rules.
4462 * linux-low: Include btrace-common.h.
4463 (linux_low_read_btrace): Use struct btrace_data. Call
4464 btrace_data_init and btrace_data_fini.
4465
4466 2015-02-06 Pedro Alves <palves@redhat.com>
4467
4468 * thread-db.c (find_new_threads_callback): Add debug output.
4469
4470 2015-02-04 Pedro Alves <palves@redhat.com>
4471
4472 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4473 (resume_stopped_resumed_lwps): New function.
4474 (linux_wait_for_event_filtered): Use it.
4475
4476 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4477
4478 * Makefile.in (SFILES): Add linux-personality.c.
4479 (linux-personality.o): New rule.
4480 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4481 list of objects to be built.
4482 * linux-low.c: Include nat/linux-personality.h.
4483 (linux_create_inferior): Remove code to disable address space
4484 randomization (moved to ../nat/linux-personality.c). Create
4485 cleanup to disable address space randomization.
4486
4487 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4488
4489 * Makefile.in (posix-strerror.o): New rule.
4490 (mingw-strerror.o): Likewise.
4491 * configure: Regenerated.
4492 * configure.ac: Source file ../common/common.host. Initialize new
4493 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4494
4495 2015-01-14 Yao Qi <yao@codesourcery.com>
4496
4497 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4498 (ppc-linux.o): New rule.
4499 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4500 * configure.ac: AC_CHECK_FUNCS(getauxval).
4501 * config.in: Re-generated.
4502 * configure: Re-generated.
4503 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4504 ppc64_64bit_inferior_p
4505
4506 2015-01-14 Yao Qi <yao@codesourcery.com>
4507
4508 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4509 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4510 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4511 (PT_ORIG_R3, PT_TRAP): Likewise.
4512 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4513 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4514 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4515
4516 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4517
4518 * i387-fp.c (i387_cache_to_xsave): In look over
4519 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4520 zmmh_low_space field by use of zmmh_high_space.
4521
4522 2015-01-09 Pedro Alves <palves@redhat.com>
4523
4524 * linux-low.c (step_over_bkpt): Move higher up in the file.
4525 (handle_extended_wait): Don't store the stop_pc here.
4526 (get_stop_pc): Adjust comments and rename to ...
4527 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4528 stopped for a software breakpoint or hardware breakpoint.
4529 (thread_still_has_status_pending_p): New function.
4530 (status_pending_p_callback): Use
4531 thread_still_has_status_pending_p. If the event is no longer
4532 interesting, resume the LWP.
4533 (handle_tracepoints): Add assert.
4534 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4535 (wstatus_maybe_breakpoint): New function.
4536 (cancel_breakpoint): Delete function.
4537 (check_stopped_by_watchpoint): New function, factored out from
4538 linux_low_filter_event.
4539 (lp_status_maybe_breakpoint): Delete function.
4540 (linux_low_filter_event): Remove filter_ptid argument.
4541 Leave thread group exits pending here. Store the LWP's stop PC.
4542 Always leave events pending.
4543 (linux_wait_for_event_filtered): Pull all events out of the
4544 kernel, and leave them all pending.
4545 (count_events_callback, select_event_lwp_callback): Consider all
4546 events.
4547 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4548 (select_event_lwp): Only give preference to the stepping LWP in
4549 all-stop mode. Adjust comments.
4550 (ignore_event): New function.
4551 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4552 references to cancel_breakpoints. Adjust to renames. Also give
4553 equal priority to all LWPs that have had events in non-stop mode.
4554 If reporting a software breakpoint event, unadjust the LWP's PC.
4555 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4556 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4557 Adjust.
4558 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4559 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4560 (linux_stopped_by_watchpoint): Adjust.
4561 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4562 * linux-low.h (enum lwp_stop_reason): New.
4563 (struct lwp_info) <stop_pc>: Adjust comment.
4564 <stopped_by_watchpoint>: Delete field.
4565 <stop_reason>: New field.
4566 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4567 * mem-break.c (software_breakpoint_inserted_here)
4568 (hardware_breakpoint_inserted_here): New function.
4569 * mem-break.h (software_breakpoint_inserted_here)
4570 (hardware_breakpoint_inserted_here): Declare.
4571 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4572 (cancel_breakpoints): Delete.
4573 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4574 (upload_fast_traceframes): Remove references to
4575 cancel_breakpoints.
4576
4577 2015-01-09 Pedro Alves <palves@redhat.com>
4578
4579 * thread-db.c (find_new_threads_callback): Ignore thread if the
4580 kernel thread ID is -1.
4581
4582 2015-01-09 Pedro Alves <palves@redhat.com>
4583
4584 * linux-low.c (linux_attach_fail_reason_string): Move to
4585 nat/linux-ptrace.c, and rename.
4586 (linux_attach_lwp): Update comment.
4587 (attach_proc_task_lwp_callback): New function.
4588 (linux_attach): Adjust to rename and use
4589 linux_proc_attach_tgid_threads.
4590 (linux_attach_fail_reason_string): Delete declaration.
4591
4592 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4593
4594 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4595 * server.c (gdbserver_version): Likewise.
4596
4597 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4598
4599 * remote-utils.c: Include ctype.h.
4600 (input_interrupt): Explicitly handle the case when the char
4601 received is the NUL byte. Improve the printing of non-ASCII
4602 characters.
4603
4604 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4605
4606 * linux-low.c (linux_low_filter_event): Update call to
4607 linux_enable_event_reporting following the addition of
4608 a new parameter to that function.
4609
4610 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4611
4612 PR server/17457
4613 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4614 (AARCH64_FPCR_REGNO): Likewise.
4615 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4616 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4617 (aarch64_store_fpregset): Likewise.
4618
4619 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4620
4621 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4622 Remove FIXME comment about assumption about N.
4623
4624 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4625
4626 * configure.ac: If large-file support is disabled in GDBserver,
4627 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4628 * configure: Regenerate.
4629
4630 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4631
4632 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4633 warning upon ENODATA from ptrace.
4634 * linux-s390-low.c (s390_store_tdb): New.
4635 (s390_regsets): Add regset for NT_S390_TDB.
4636
4637 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4638
4639 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4640 without a fill_function.
4641 * linux-s390-low.c (s390_fill_last_break): Remove.
4642 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4643 (s390_arch_setup): Use regset's size instead of fill_function for
4644 loop end condition.
4645
4646 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4647
4648 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4649 the regset's store function when ptrace returned an error.
4650 * regcache.c (get_thread_regcache): Invalidate register cache
4651 before fetching inferior's registers.
4652
4653 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4654
4655 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4656 while-loop as for-loop.
4657 (regsets_store_inferior_registers): Likewise.
4658
4659 2014-11-28 Yao Qi <yao@codesourcery.com>
4660
4661 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4662 * config.in, configure: Re-generate.
4663 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4664 is defined.
4665
4666 2014-11-21 Yao Qi <yao@codesourcery.com>
4667
4668 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4669 (AC_CHECK_HEADERS): Remove malloc.h.
4670 * configure: Re-generated.
4671 * config.in: Re-generated.
4672 * server.h: Don't include alloca.h and malloc.h.
4673 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4674 Don't include malloc.h.
4675
4676 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4677
4678 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4679 corresponding ERRNO check in same block.
4680
4681 2014-11-12 Pedro Alves <palves@redhat.com>
4682
4683 * server.c (cont_thread): Update comment.
4684 (start_inferior, attach_inferior): No longer clear cont_thread.
4685 (handle_v_cont): No longer set cont_thread.
4686 (captured_main): Clear cont_thread each time a GDB connects.
4687
4688 2014-11-12 Pedro Alves <palves@redhat.com>
4689
4690 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4691 thread, and don't resume all threads if the Hc thread has exited.
4692
4693 2014-11-12 Pedro Alves <palves@redhat.com>
4694
4695 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4696 the process group instead of to a specific LWP.
4697
4698 2014-10-15 Pedro Alves <palves@redhat.com>
4699
4700 PR server/17487
4701 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4702 parameter.
4703 (arm_set_thread_context): Delete.
4704 (the_low_target): Adjust.
4705 * win32-i386-low.c (debug_registers_changed)
4706 (debug_registers_used): Delete.
4707 (update_debug_registers_callback): New function.
4708 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4709 needing to update their debug registers.
4710 (win32_get_current_dr): New function.
4711 (x86_dr_low_get_addr, x86_dr_low_get_control)
4712 (x86_dr_low_get_status): Fetch the debug register from the thread
4713 record's context.
4714 (i386_initial_stuff): Adjust.
4715 (i386_get_thread_context): Remove current_event parameter. Don't
4716 clear debug_registers_changed nor copy DR values to
4717 debug_reg_state.
4718 (i386_set_thread_context): Delete.
4719 (i386_prepare_to_resume): New function.
4720 (i386_thread_added): Mark the thread as needing to update irs
4721 debug registers.
4722 (the_low_target): Remove i386_set_thread_context and install
4723 i386_prepare_to_resume.
4724 * win32-low.c (win32_get_thread_context): Adjust.
4725 (win32_set_thread_context): Use SetThreadContext
4726 directly.
4727 (win32_prepare_to_resume): New function.
4728 (win32_require_context): New function, factored out from ...
4729 (thread_rec): ... this.
4730 (continue_one_thread): Call win32_prepare_to_resume on each thread
4731 we're about to continue.
4732 (win32_resume): Call win32_prepare_to_resume on the event thread.
4733 * win32-low.h (struct win32_thread_info)
4734 <debug_registers_changed>: New field.
4735 (struct win32_target_ops): Change prototype of set_thread_context,
4736 delete set_thread_context and add prepare_to_resume.
4737 (win32_require_context): New declaration.
4738
4739 2014-10-08 Gary Benson <gbenson@redhat.com>
4740
4741 * server.h: Do not include common-exceptions.h.
4742
4743 2014-10-08 Gary Benson <gbenson@redhat.com>
4744
4745 * server.h: Do not include cleanups.h.
4746
4747 2014-09-30 James Hogan <james.hogan@imgtec.com>
4748
4749 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4750 mips64-dsp-linux.c.
4751
4752 2014-09-23 Yao Qi <yao@codesourcery.com>
4753
4754 * linux-low.c (lp_status_maybe_breakpoint): New function.
4755 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4756 (count_events_callback): Likewise.
4757 (select_event_lwp_callback): Likewise.
4758 (cancel_breakpoints_callback): Likewise.
4759
4760 2014-09-19 Don Breazeal <donb@codesourcery.com>
4761
4762 * linux-low.c (handle_extended_wait): Call
4763 linux_ptrace_get_extended_event.
4764 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4765 linux_is_extended_waitstatus.
4766
4767 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4768
4769 * Makefile.in (CPPFLAGS): Define.
4770 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4771 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4772
4773 2014-09-16 Gary Benson <gbenson@redhat.com>
4774
4775 * inferiors.h (current_inferior): Renamed as...
4776 (current_thread): New variable. All uses updated.
4777 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4778 (maybe_move_out_of_jump_pad): Likewise.
4779 (cancel_breakpoint): Likewise.
4780 (linux_low_filter_event): Likewise.
4781 (wait_for_sigstop): Likewise.
4782 (linux_resume_one_lwp): Likewise.
4783 (need_step_over_p): Likewise.
4784 (start_step_over): Likewise.
4785 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4786 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4787 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4788 and save_inferior as saved_thread.
4789 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4790 saved_thread.
4791 (regcache_invalidate_thread): Likewise.
4792 * remote-utils.c (prepare_resume_reply): Likewise.
4793 * thread-db.c (thread_db_get_tls_address): Likewise.
4794 (disable_thread_event_reporting): Likewise.
4795 (remove_thread_event_breakpoints): Likewise.
4796 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4797 as saved_thread.
4798 * target.h (set_desired_inferior): Renamed as...
4799 (set_desired_thread): New declaration. All uses updated.
4800 * server.c (myresume): Updated comment to reference thread instead
4801 of inferior.
4802 (handle_serial_event): Likewise.
4803 (handle_target_event): Likewise.
4804
4805 2014-09-12 Tom Tromey <tromey@redhat.com>
4806 Gary Benson <gbenson@redhat.com>
4807
4808 * regcache.h: Include common-regcache.h.
4809 (regcache_read_pc): Don't declare.
4810 * regcache.c (get_thread_regcache_for_ptid): New function.
4811
4812 2014-09-11 Tom Tromey <tromey@redhat.com>
4813 Gary Benson <gbenson@redhat.com>
4814
4815 * symbol.c: New file.
4816 * Makefile.in (SFILES): Add symbol.c.
4817 (OBS): Add symbol.o.
4818
4819 2014-09-11 Gary Benson <gbenson@redhat.com>
4820
4821 * target.c (target_stop_ptid, target_continue_ptid): New
4822 functions.
4823
4824 2014-09-11 Tom Tromey <tromey@redhat.com>
4825 Gary Benson <gbenson@redhat.com>
4826
4827 * target.h: Include target/target.h.
4828 * target.c (target_read_memory, target_read_uint32)
4829 (target_write_memory): New functions.
4830
4831 2014-09-11 Gary Benson <gbenson@redhat.com>
4832
4833 * server.h (debug_hw_points): Don't declare.
4834 * server.c (debug_hw_points): Don't define. Replace all uses
4835 with show_debug_regs.
4836 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4837 all uses with show_debug_regs.
4838
4839 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4840
4841 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4842 endianness into account.
4843 (ppc_supply_ptrace_register): Likewise.
4844
4845 2014-09-03 James Hogan <james.hogan@imgtec.com>
4846
4847 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4848 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4849
4850 2014-09-03 Gary Benson <gbenson@redhat.com>
4851
4852 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4853 ALL_DEBUG_ADDRESS_REGISTERS.
4854
4855 2014-09-02 Gary Benson <gbenson@redhat.com>
4856
4857 * i386-low.h: Renamed as...
4858 * x86-low.h: New file. All type, function and variable name
4859 prefixes changed from "i386_" to "x86_". All references updated.
4860 * i386-low.c: Renamed as...
4861 * x86-low.c: New file. All type, function and variable name
4862 prefixes changed from "i386_" to "x86_". All references updated.
4863
4864 2014-09-02 Gary Benson <gbenson@redhat.com>
4865
4866 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4867 (x86_linux_new_thread): Likewise.
4868
4869 2014-08-29 Gary Benson <gbenson@redhat.com>
4870
4871 * server.h (setjmp.h): Do not include.
4872 (toplevel): Do not declare.
4873 (common-exceptions.h): Include.
4874 (cleanups.h): Likewise.
4875 * server.c (toplevel): Do not define.
4876 (exit_code): New static global.
4877 (detach_or_kill_for_exit_cleanup): New function.
4878 (main): New function. Original main renamed to...
4879 (captured_main): New function.
4880 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4881
4882 2014-08-29 Gary Benson <gbenson@redhat.com>
4883
4884 * Makefile.in (SFILES): Add common/common-exceptions.c.
4885 (OBS): Add common-exceptions.o.
4886 (common-exceptions.o): New rule.
4887 * utils.c (prepare_to_throw_exception): New function.
4888
4889 2014-08-29 Gary Benson <gbenson@redhat.com>
4890
4891 * config.in: Regenerate.
4892 * configure: Likewise.
4893
4894 2014-08-29 Gary Benson <gbenson@redhat.com>
4895
4896 * Makefile.in (SFILES): Add common/cleanups.c.
4897 (OBS): cleanups.o.
4898 (cleanups.o): New rule.
4899
4900 2014-08-29 Gary Benson <gbenson@redhat.com>
4901
4902 * utils.c (internal_vwarning): New function.
4903
4904 2014-08-28 Gary Benson <gbenson@redhat.com>
4905
4906 * utils.h (fatal): Remove declaration.
4907 * utils.c (fatal): Remove function.
4908
4909 2014-08-28 Gary Benson <gbenson@redhat.com>
4910
4911 * tracepoint.c (gdb_agent_init): Replace fatal with
4912 perror_with_name.
4913 (initialize_tracepoint): Likewise.
4914
4915 2014-08-28 Gary Benson <gbenson@redhat.com>
4916
4917 * remote-utils.c (remote_prepare): Replace fatal with error.
4918
4919 2014-08-28 Gary Benson <gbenson@redhat.com>
4920
4921 * linux-low.c (linux_async): Replace fatal with warning.
4922 Tidy up and return.
4923 (linux_start_non_stop): Return -1 if linux_async failed.
4924
4925 2014-08-28 Gary Benson <gbenson@redhat.com>
4926
4927 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4928 gdb_assert.
4929 (i386_dr_low_get_addr): Remove vague comment.
4930 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4931 gdb_assert.
4932
4933 2014-08-28 Gary Benson <gbenson@redhat.com>
4934
4935 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4936 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4937 internal_error.
4938 (linux_resume_one_lwp): Likewise.
4939 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4940 gdb_assert.
4941 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4942 with internal_error.
4943 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4944 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4945 (find_register_by_name): Replace fatal with internal_error.
4946 (find_regno): Likewise.
4947 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4948 * thread-db.c (thread_db_create_event): Likewise.
4949 (thread_db_load_search): Likewise.
4950 (try_thread_db_load_1): Likewise.
4951 * tracepoint.c (get_jump_space_head): Replace fatal with
4952 internal_error.
4953 (claim_trampoline_space): Likewise.
4954 (have_fast_tracepoint_trampoline_buffer): Likewise.
4955 (cmd_qtstart): Likewise.
4956 (stop_tracing): Likewise.
4957 (fast_tracepoint_collecting): Likewise.
4958 (target_malloc): Likewise.
4959 (download_tracepoint): Likewise.
4960 (download_trace_state_variables): Replace check with gdb_assert.
4961 (upload_fast_traceframes): Replace fatal with internal_error.
4962
4963 2014-08-19 Tom Tromey <tromey@redhat.com>
4964 Gary Benson <gbenson@redhat.com>
4965
4966 * Makefile.in (SFILES): Add common/common-debug.c.
4967 (OBS): Add common-debug.o.
4968 (common-debug.o): New rule.
4969 * debug.h (debug_printf): Don't declare.
4970 * debug.c (debug_printf): Renamed and rewritten as...
4971 (debug_vprintf): New function.
4972
4973 2014-08-19 Gary Benson <gbenson@redhat.com>
4974
4975 * utils.h: Do not include print-utils.h.
4976
4977 2014-08-19 Tom Tromey <tromey@redhat.com>
4978 Gary Benson <gbenson@redhat.com>
4979
4980 * server.h: Add static assertion.
4981 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4982
4983 2014-08-19 Tom Tromey <tromey@redhat.com>
4984 Gary Benson <gbenson@redhat.com>
4985
4986 * Makefile.in (SFILES): Add common/errors.c.
4987 (OBS): Add errors.o.
4988 (IPA_OBS): Add errors-ipa.o.
4989 (errors.o): New rule.
4990 (errors-ipa.o): Likewise.
4991 * utils.h (perror_with_name, error, warning): Don't declare.
4992 * utils.c (warning): Renamed and rewritten as...
4993 (vwarning): New function.
4994 (error): Renamed and rewritten as...
4995 (verror): New function.
4996 (internal_error): Renamed and rewritten as...
4997 (internal_verror): New function.
4998
4999 2014-08-07 Gary Benson <gbenson@redhat.com>
5000
5001 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5002 * configure: Regenerate.
5003 * config.in: Likewise.
5004 * server.h: Do not include errno.h.
5005 * event-loop.c: Likewise.
5006 * hostio-errno.c: Likewise.
5007 * linux-low.c: Likewise.
5008 * remote-utils.c: Likewise.
5009 * spu-low.c: Likewise.
5010 * utils.c: Likewise.
5011 * gdbreplay.c: Unconditionally include errno.h.
5012
5013 2014-08-07 Gary Benson <gbenson@redhat.com>
5014
5015 * server.h: Do not include string.h.
5016 * event-loop.c: Likewise.
5017 * linux-low.c: Likewise.
5018 * regcache.c: Likewise.
5019 * remote-utils.c: Likewise.
5020 * spu-low.c: Likewise.
5021 * utils.c: Likewise.
5022
5023 2014-08-07 Gary Benson <gbenson@redhat.com>
5024
5025 * server.h: Do not include gdb_assert.h.
5026
5027 2014-08-07 Gary Benson <gbenson@redhat.com>
5028
5029 * server.h: Do not include common-utils.h.
5030
5031 2014-08-07 Gary Benson <gbenson@redhat.com>
5032
5033 * server.h: Do not include ptid.h.
5034 * notif.h: Likewise.
5035
5036 2014-08-07 Gary Benson <gbenson@redhat.com>
5037
5038 * server.h: Do not include gdb_locale.h.
5039
5040 2014-08-07 Gary Benson <gbenson@redhat.com>
5041
5042 * server.h: Do not include gdb/signals.h.
5043 * win32-low.c: Likewise.
5044
5045 2014-08-07 Gary Benson <gbenson@redhat.com>
5046
5047 * server.h: Do not include pathmax.h.
5048
5049 2014-08-07 Gary Benson <gbenson@redhat.com>
5050
5051 * server.h: Do not include libiberty.h.
5052 * linux-bfin-low.c: Likewise.
5053
5054 2014-08-07 Gary Benson <gbenson@redhat.com>
5055
5056 * server.h: Do not include ansidecl.h.
5057
5058 2014-08-07 Gary Benson <gbenson@redhat.com>
5059
5060 * linux-x86-low.c: Do not include stddef.h.
5061 * lynx-ppc-low.c: Likewise.
5062 * tracepoint.c: Likewise.
5063
5064 2014-08-07 Gary Benson <gbenson@redhat.com>
5065
5066 * server.h: Do not include stdarg.h.
5067 * nto-low.c: Likewise.
5068
5069 2014-08-07 Gary Benson <gbenson@redhat.com>
5070
5071 * server.h: Do not include stdlib.h.
5072 * inferiors.c: Likewise.
5073 * linux-low.c: Likewise.
5074 * regcache.c: Likewise.
5075 * spu-low.c: Likewise.
5076 * tracepoint.c: Likewise.
5077 * utils.c: Likewise.
5078
5079 2014-08-07 Gary Benson <gbenson@redhat.com>
5080
5081 * server.h: Do not include stdio.h.
5082 * linux-low.c: Likewise.
5083 * remote-utils.c: Likewise.
5084 * spu-low.c: Likewise.
5085 * utils.c: Likewise.
5086 * wincecompat.c: Likewise.
5087
5088 2014-08-06 Gary Benson <gbenson@redhat.com>
5089
5090 * regcache.c (init_register_cache): Move conditionals inside if.
5091
5092 2014-08-06 Gary Benson <gbenson@redhat.com>
5093
5094 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5095
5096 2014-07-31 Gary Benson <gbenson@redhat.com>
5097
5098 * ax.h: Do not include server.h.
5099 * gdbthread.h: Likewise.
5100 * lynx-low.h: Likewise.
5101 * notif.h: Likewise.
5102
5103 2014-07-30 Gary Benson <gbenson@redhat.com>
5104
5105 * server.h: Include common-defs.h.
5106 Do not include config.h or build-gnulib-gdbserver/config.h.
5107
5108 2014-07-30 Gary Benson <gbenson@redhat.com>
5109
5110 * hostio-errno.c: Move server.h to top of includes list.
5111 * inferiors.c: Likewise.
5112 * linux-x86-low.c: Likewise.
5113 * notif.c: Include server.h.
5114
5115 2014-07-24 Tom Tromey <tromey@redhat.com>
5116 Gary Benson <gbenson@redhat.com>
5117
5118 * server.h (CORE_ADDR): Now unsigned.
5119
5120 2014-07-16 Pedro Alves <palves@redhat.com>
5121
5122 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5123
5124 2014-07-15 Pedro Alves <palves@redhat.com>
5125
5126 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5127 copy.
5128
5129 2014-07-11 Pedro Alves <palves@redhat.com>
5130
5131 * linux-low.c (kill_wait_lwp): New function, based on
5132 kill_one_lwp_callback, but use my_waitpid directly.
5133 (kill_one_lwp_callback, linux_kill): Use it.
5134
5135 2014-06-23 Pedro Alves <palves@redhat.com>
5136
5137 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5138 before setting DR0..DR3.
5139
5140 2014-06-20 Gary Benson <gbenson@redhat.com>
5141
5142 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5143 * configure: Regenerated.
5144 * config.in: Likewise.
5145
5146 2014-06-20 Gary Benson <gbenson@redhat.com>
5147
5148 * Makefile.in (SFILES): Update locations for files moved
5149 from common to nat.
5150 (object file files): Reordered.
5151
5152 2014-06-20 Gary Benson <gbenson@redhat.com>
5153
5154 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5155 (i386_dr_low_set_addr): Likewise.
5156 (i386_dr_low_get_addr): Likewise.
5157 (i386_dr_low_can_set_control): Likewise.
5158 (i386_dr_low_set_control): Likewise.
5159 (i386_dr_low_get_control): Likewise.
5160 (i386_dr_low_get_status): Likewise.
5161 (i386_get_debug_register_length): Likewise.
5162 * linux-x86-low.c (i386_dr_low_set_addr):
5163 Changed signature. Made static.
5164 (i386_dr_low_get_addr): Likewise.
5165 (i386_dr_low_set_control): Likewise.
5166 (i386_dr_low_get_control): Likewise.
5167 (i386_dr_low_get_status): Likewise.
5168 (i386_dr_low): New global variable.
5169 * win32-i386-low.c (i386_dr_low_set_addr):
5170 Changed signature. Made static.
5171 (i386_dr_low_get_addr): Likewise.
5172 (i386_dr_low_set_control): Likewise.
5173 (i386_dr_low_get_control): Likewise.
5174 (i386_dr_low_get_status): Likewise.
5175 (i386_dr_low): New global variable.
5176
5177 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5178
5179 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5180 * Makefile.in (AR, AR_FLAGS): Define.
5181 * configure: Regenerate.
5182
5183 2014-06-19 Gary Benson <gbenson@redhat.com>
5184
5185 * Makefile.in (i386-dregs.o): New rule.
5186 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5187 * i386-low.c (target.h): Remove include.
5188 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5189 (DR_CONTROL_SHIFT): Likewise.
5190 (DR_CONTROL_SIZE): Likewise.
5191 (DR_RW_EXECUTE): Likewise.
5192 (DR_RW_WRITE): Likewise.
5193 (DR_RW_READ): Likewise.
5194 (DR_RW_IORW): Likewise.
5195 (DR_LEN_1): Likewise.
5196 (DR_LEN_2): Likewise.
5197 (DR_LEN_4): Likewise.
5198 (DR_LEN_8): Likewise.
5199 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5200 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5201 (DR_ENABLE_SIZE): Likewise.
5202 (DR_LOCAL_SLOWDOWN): Likewise.
5203 (DR_GLOBAL_SLOWDOWN): Likewise.
5204 (DR_CONTROL_RESERVED): Likewise.
5205 (I386_DR_CONTROL_MASK): Likewise.
5206 (I386_DR_VACANT): Likewise.
5207 (I386_DR_LOCAL_ENABLE): Likewise.
5208 (I386_DR_GLOBAL_ENABLE): Likewise.
5209 (I386_DR_DISABLE): Likewise.
5210 (I386_DR_SET_RW_LEN): Likewise.
5211 (I386_DR_GET_RW_LEN): Likewise.
5212 (I386_DR_WATCH_HIT): Likewise.
5213 (i386_wp_op_t): Likewise.
5214 (i386_show_dr): Likewise.
5215 (i386_length_and_rw_bits): Likewise.
5216 (i386_insert_aligned_watchpoint): Likewise.
5217 (i386_remove_aligned_watchpoint): Likewise.
5218 (i386_handle_nonaligned_watchpoint): Likewise.
5219 i386_update_inferior_debug_regs(): Likewise.
5220 (i386_dr_insert_watchpoint): Likewise.
5221 (i386_dr_remove_watchpoint): Likewise.
5222 (i386_dr_region_ok_for_watchpoint): Likewise.
5223 (i386_dr_stopped_data_address): Likewise.
5224 (i386_dr_stopped_by_watchpoint): Likewise.
5225
5226 2014-06-19 Gary Benson <gbenson@redhat.com>
5227
5228 * i386-low.c (i386_dr_show): Renamed to
5229 i386_show_dr and made static. All uses updated.
5230 (i386_dr_length_and_rw_bits): Renamed to
5231 i386_length_and_rw_bits and made static.
5232 All uses updated.
5233 (i386_dr_insert_aligned_watchpoint): Renamed to
5234 i386_insert_aligned_watchpoint and made static.
5235 All uses updated.
5236 (i386_dr_remove_aligned_watchpoint): Renamed to
5237 i386_remove_aligned_watchpoint and made static.
5238 All uses updated.
5239 (i386_dr_update_inferior_debug_regs): Renamed to
5240 i386_update_inferior_debug_regs and made static.
5241 All uses updated.
5242
5243 2014-06-18 Gary Benson <gbenson@redhat.com>
5244
5245 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5246 (i386_dr_low_can_set_control): Likewise.
5247 (i386_get_debug_register_length): Likewise.
5248 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5249 (i386_dr_low_can_set_control): Likewise.
5250 (i386_get_debug_register_length): Likewise.
5251
5252 2014-06-17 Gary Benson <gbenson@redhat.com>
5253
5254 * i386-low.h (i386-dregs.h): New include.
5255 (DR_FIRSTADDR): Now in i386-dregs.h.
5256 (DR_LASTADDR): Likewise.
5257 (DR_NADDR): Likewise.
5258 (DR_STATUS): Likewise.
5259 (DR_CONTROL): Likewise.
5260 (i386_debug_reg_state): Likewise.
5261 (i386_dr_insert_watchpoint): Likewise.
5262 (i386_dr_remove_watchpoint): Likewise.
5263 (i386_dr_region_ok_for_watchpoint): Likewise.
5264 (i386_dr_stopped_data_address): Likewise.
5265 (i386_dr_stopped_by_watchpoint): Likewise.
5266 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5267
5268 2014-06-18 Gary Benson <gbenson@redhat.com>
5269
5270 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5271 i386_dr_insert_watchpoint.
5272 (i386_low_remove_watchpoint): Renamed to
5273 i386_dr_remove_watchpoint.
5274 (i386_low_region_ok_for_watchpoint): Renamed to
5275 i386_dr_region_ok_for_watchpoint.
5276 (i386_low_stopped_data_address): Renamed to
5277 i386_dr_stopped_data_address.
5278 (i386_low_stopped_by_watchpoint): Renamed to
5279 i386_dr_stopped_by_watchpoint.
5280 * i386-low.c (i386_show_dr): Renamed to
5281 i386_dr_show and made nonstatic. All uses updated.
5282 (i386_length_and_rw_bits): Renamed to
5283 i386_dr_length_and_rw_bits and made nonstatic.
5284 All uses updated.
5285 (i386_insert_aligned_watchpoint): Renamed to
5286 i386_dr_insert_aligned_watchpoint and made nonstatic.
5287 All uses updated.
5288 (i386_remove_aligned_watchpoint): Renamed to
5289 i386_dr_remove_aligned_watchpoint and made nonstatic.
5290 All uses updated.
5291 (i386_update_inferior_debug_regs): Renamed to
5292 i386_dr_update_inferior_debug_regs and made nonstatic.
5293 All uses updated.
5294 (i386_low_insert_watchpoint): Renamed to
5295 i386_dr_insert_watchpoint. All uses updated.
5296 (i386_low_remove_watchpoint): Renamed to
5297 i386_dr_remove_watchpoint. All uses updated.
5298 (i386_low_region_ok_for_watchpoint): Renamed to
5299 i386_dr_region_ok_for_watchpoint. All uses updated.
5300 (i386_low_stopped_data_address): Renamed to
5301 i386_dr_stopped_data_address. All uses updated.
5302 (i386_low_stopped_by_watchpoint): Renamed to
5303 i386_dr_stopped_by_watchpoint. All uses updated.
5304
5305 2014-06-18 Gary Benson <gbenson@redhat.com>
5306
5307 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5308 (i386_dr_low_can_set_control): Likewise.
5309 (i386_insert_aligned_watchpoint): New check.
5310
5311 2014-06-18 Gary Benson <gbenson@redhat.com>
5312
5313 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5314 Renamed to state.
5315
5316 2014-06-18 Gary Benson <gbenson@redhat.com>
5317
5318 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5319 instead of fatal and error.
5320 (i386_handle_nonaligned_watchpoint): Likewise.
5321
5322 2014-06-18 Gary Benson <gbenson@redhat.com>
5323
5324 * i386-low.c (i386_get_debug_register_length): New macro.
5325 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5326 (i386_show_dr): Use debug_printf instead of fprintf. Use
5327 phex to format values.
5328
5329 2014-06-18 Gary Benson <gbenson@redhat.com>
5330
5331 * i386-low.h: Comment changes.
5332 * i386-low.c: Likewise.
5333
5334 2014-06-18 Gary Benson <gbenson@redhat.com>
5335
5336 * i386-low.c: Whitespace changes.
5337
5338 2014-06-12 Tom Tromey <tromey@redhat.com>
5339
5340 * utils.c (freeargv): Remove.
5341
5342 2014-06-12 Tom Tromey <tromey@redhat.com>
5343
5344 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5345 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5346 (parse_debug_format_options): Likewise.
5347 (gdbserver_usage): Likewise.
5348 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5349 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5350 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5351 against libiberty.
5352 ($(LIBGNU)): Depend on libiberty.
5353 (all-lib): Recurse into all subdirs.
5354 (install-only): Invoke "install" target in subdirs.
5355 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5356 targets.
5357 * configure: Rebuild.
5358 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5359 for vasprintf, vsnprintf, or gettimeofday.
5360 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5361 srv_tgtobj.
5362
5363 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5364
5365 * development.sh: Delete.
5366 * Makefile.in (config.status): Adjust dependency on development.sh.
5367 * configure.ac: Adjust development.sh source call.
5368 * configure: Regenerate.
5369
5370 2014-06-02 Pedro Alves <palves@redhat.com>
5371
5372 * ax.c (gdb_free_agent_expr): New function.
5373 * ax.h (gdb_free_agent_expr): New declaration.
5374 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5375 list.
5376 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5377 static.
5378 (clear_breakpoint_conditions_and_commands): New function.
5379 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5380 (clear_breakpoint_conditions_and_commands): New declaration.
5381
5382 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5383
5384 * linux-aarch64-low.c (asm/ptrace.h): Include.
5385
5386 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5387
5388 Fix TLS access for -static -pthread.
5389 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5390 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5391 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5392
5393 2014-05-20 Pedro Alves <palves@redhat.com>
5394
5395 * linux-aarch64-low.c (aarch64_insert_point)
5396 (aarch64_remove_point): No longer check whether the type is
5397 supported here. Adjust to new interface.
5398 (the_low_target): Install aarch64_supports_z_point_type as
5399 supports_z_point_type method.
5400 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5401 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5402 instead of a Z packet char. Adjust.
5403 (arm_supports_z_point_type): New function.
5404 (arm_insert_point, arm_remove_point): Adjust to new interface.
5405 (the_low_target): Install arm_supports_z_point_type.
5406 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5407 (cris_insert_point, cris_remove_point): Adjust to new interface.
5408 Don't check whether the type is supported here.
5409 (the_low_target): Install cris_supports_z_point_type.
5410 * linux-low.c (linux_supports_z_point_type): New function.
5411 (linux_insert_point, linux_remove_point): Adjust to new interface.
5412 * linux-low.h (struct linux_target_ops) <insert_point,
5413 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5414 raw_breakpoint pointer parameter.
5415 <supports_z_point_type>: New method.
5416 * linux-mips-low.c (mips_supports_z_point_type): New function.
5417 (mips_insert_point, mips_remove_point): Adjust to new interface.
5418 Use mips_supports_z_point_type.
5419 (the_low_target): Install mips_supports_z_point_type.
5420 * linux-ppc-low.c (the_low_target): Install NULL as
5421 supports_z_point_type method.
5422 * linux-s390-low.c (the_low_target): Install NULL as
5423 supports_z_point_type method.
5424 * linux-sparc-low.c (the_low_target): Install NULL as
5425 supports_z_point_type method.
5426 * linux-x86-low.c (x86_supports_z_point_type): New function.
5427 (x86_insert_point): Adjust to new insert_point interface. Use
5428 insert_memory_breakpoint. Adjust to new
5429 i386_low_insert_watchpoint interface.
5430 (x86_remove_point): Adjust to remove_point interface. Use
5431 remove_memory_breakpoint. Adjust to new
5432 i386_low_remove_watchpoint interface.
5433 (the_low_target): Install x86_supports_z_point_type.
5434 * lynx-low.c (lynx_target_ops): Install NULL as
5435 supports_z_point_type callback.
5436 * nto-low.c (nto_supports_z_point_type): New.
5437 (nto_insert_point, nto_remove_point): Adjust to new interface.
5438 (nto_target_ops): Install nto_supports_z_point_type.
5439 * mem-break.c: Adjust intro comment.
5440 (struct raw_breakpoint) <raw_type, size>: New fields.
5441 <inserted>: Update comment.
5442 <shlib_disabled>: Delete field.
5443 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5444 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5445 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5446 (raw_bkpt_type_to_target_hw_bp_type): New function.
5447 (find_enabled_raw_code_breakpoint_at): New function.
5448 (find_raw_breakpoint_at): New type and size parameters. Use them.
5449 (insert_memory_breakpoint): New function, based off
5450 set_raw_breakpoint_at.
5451 (remove_memory_breakpoint): New function.
5452 (set_raw_breakpoint_at): Reimplement.
5453 (set_breakpoint): New, based on set_breakpoint_at.
5454 (set_breakpoint_at): Reimplement.
5455 (delete_raw_breakpoint): Go through the_target->remove_point
5456 instead of assuming memory breakpoints.
5457 (find_gdb_breakpoint_at): Delete.
5458 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5459 (find_gdb_breakpoint): New function.
5460 (set_gdb_breakpoint_at): Delete.
5461 (z_type_supported): New function.
5462 (set_gdb_breakpoint_1): New function, loosely based off
5463 set_gdb_breakpoint_at.
5464 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5465 (delete_gdb_breakpoint_at): Delete.
5466 (delete_gdb_breakpoint_1): New function, loosely based off
5467 delete_gdb_breakpoint_at.
5468 (delete_gdb_breakpoint): New function.
5469 (clear_gdb_breakpoint_conditions): Rename to ...
5470 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5471 breakpoint.
5472 (add_condition_to_breakpoint): Make static.
5473 (add_breakpoint_condition): Take a struct breakpoint pointer
5474 instead of an address. Adjust.
5475 (gdb_condition_true_at_breakpoint): Rename to ...
5476 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5477 z_type parameter.
5478 (gdb_condition_true_at_breakpoint): Reimplement.
5479 (add_breakpoint_commands): Take a struct breakpoint pointer
5480 instead of an address. Adjust.
5481 (gdb_no_commands_at_breakpoint): Rename to ...
5482 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5483 parameter. Return true if no breakpoint was found. Change debug
5484 output.
5485 (gdb_no_commands_at_breakpoint): Reimplement.
5486 (run_breakpoint_commands): Rename to ...
5487 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5488 and change return type to boolean.
5489 (run_breakpoint_commands): New function.
5490 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5491 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5492 breakpoint. Go through the_target->remove_point instead of
5493 assuming memory breakpoint.
5494 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5495 software and hardware breakpoints.
5496 (reinsert_raw_breakpoint): Go through the_target->insert_point
5497 instead of assuming memory breakpoint.
5498 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5499 software and hardware breakpoints.
5500 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5501 Check both software and hardware breakpoints.
5502 (validate_inserted_breakpoint): Assert the breakpoint is a
5503 software breakpoint. Set the inserted flag to -1 instead of
5504 setting shlib_disabled.
5505 (delete_disabled_breakpoints): Adjust.
5506 (validate_breakpoints): Only validate software breakpoints.
5507 Adjust to inserted flag change.
5508 (check_mem_read, check_mem_write): Skip breakpoint types other
5509 than software breakpoints. Adjust to inserted flag change.
5510 * mem-break.h (enum raw_bkpt_type): New enum.
5511 (raw_breakpoint, struct process_info): Forward declare.
5512 (Z_packet_to_target_hw_bp_type): Delete declaration.
5513 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5514 (set_gdb_breakpoint, delete_gdb_breakpoint)
5515 (clear_breakpoint_conditions): New declarations.
5516 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5517 (breakpoint_inserted_here): Update comment.
5518 (add_breakpoint_condition, add_breakpoint_commands): Replace
5519 address parameter with a breakpoint pointer parameter.
5520 (gdb_breakpoint_here): Update comment.
5521 (delete_gdb_breakpoint_at): Delete.
5522 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5523 * server.c (process_point_options): Take a struct breakpoint
5524 pointer instead of an address. Adjust.
5525 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5526 delete_gdb_breakpoint.
5527 * spu-low.c (spu_target_ops): Install NULL as
5528 supports_z_point_type method.
5529 * target.h: Include mem-break.h.
5530 (struct target_ops) <prepare_to_access_memory>: Update comment.
5531 <supports_z_point_type>: New field.
5532 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5533 instead of a char. Also take a raw breakpoint pointer.
5534 * win32-arm-low.c (the_low_target): Install NULL as
5535 supports_z_point_type.
5536 * win32-i386-low.c (i386_supports_z_point_type): New function.
5537 (i386_insert_point, i386_remove_point): Adjust to new interface.
5538 (the_low_target): Install i386_supports_z_point_type.
5539 * win32-low.c (win32_supports_z_point_type): New function.
5540 (win32_insert_point, win32_remove_point): Adjust to new interface.
5541 (win32_target_ops): Install win32_supports_z_point_type.
5542 * win32-low.h (struct win32_target_ops):
5543 <supports_z_point_type>: New method.
5544 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5545 instead of a char. Also take a raw breakpoint pointer.
5546
5547 2014-05-20 Pedro Alves <palves@redhat.com>
5548
5549 * mem-break.h: Include break-common.h.
5550 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5551 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5552 (Z_packet_to_target_hw_bp_type): New declaration.
5553 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5554 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5555 (Z_PACKET_ACCESS_WP): Delete macros.
5556 (Z_packet_to_hw_type): Delete function.
5557 * i386-low.h: Don't include break-common.h here.
5558 (Z_packet_to_hw_type): Delete declaration.
5559 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5560 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5561 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5562 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5563 * linux-aarch64-low.c: Don't include break-common.h here.
5564 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5565 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5566 (Z_packet_to_target_hw_bp_type): Delete function.
5567 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5568 function.
5569 (mips_insert_point, mips_remove_point): Use
5570 Z_packet_to_target_hw_bp_type.
5571
5572 2014-05-20 Pedro Alves <palves@redhat.com>
5573
5574 * linux-aarch64-low.c: Include break-common.h.
5575 (enum target_point_type): Delete.
5576 (Z_packet_to_point_type): Rename to ...
5577 (Z_packet_to_target_hw_bp_type): ... this, and return a
5578 target_hw_bp_type instead.
5579 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5580 instead of an enum target_point_type.
5581 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5582 breakpoint type.
5583 (aarch64_dr_state_insert_one_point)
5584 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5585 (aarch64_handle_aligned_watchpoint)
5586 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5587 Take an enum target_hw_bp_type instead of an enum
5588 target_point_type.
5589 (aarch64_supports_z_point_type): New function.
5590 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5591 use Z_packet_to_target_hw_bp_type.
5592
5593 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5594
5595 * configure.ac: Only use -Werror by default when DEVELOPMENT
5596 is true.
5597 * configure: Regenerate.
5598
5599 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5600
5601 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5602 * linux-x86-low.c (X86_64_USER_REGS): New.
5603 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5604
5605 2014-04-28 Yao Qi <yao@codesourcery.com>
5606
5607 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5608 name.
5609
5610 2014-04-25 Pedro Alves <palves@redhat.com>
5611
5612 PR server/16255
5613 * linux-low.c (linux_attach_fail_reason_string): New function.
5614 (linux_attach_lwp): Delete.
5615 (linux_attach_lwp_1): Rename to ...
5616 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5617 argument. Remove "initial" parameter. Return int instead of
5618 void. Don't error or warn here.
5619 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5620 failure to attach to the tgid. Call warning when failing to
5621 attach to an lwp.
5622 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5623 argument. Remove "initial" parameter. Return int instead of
5624 void. Don't error or warn here.
5625 (linux_attach_fail_reason_string): New declaration.
5626 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5627 interface change. Use linux_attach_fail_reason_string.
5628
5629 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5630 Walfred Tedeschi <walfred.tedeschi@intel.com>
5631
5632 * Makefile.in: Added rules to handle new files
5633 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5634 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5635 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5636 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5637 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5638 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5639 x32-avx512-linux.o.
5640 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5641 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5642 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5643 i386/x32-avx512.xml.
5644 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5645 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5646 i386/x32-avx512-linux.xml.
5647 * i387-fp.c (num_avx512_k_registers): New constant for number
5648 of K registers.
5649 (num_avx512_zmmh_low_registers): New constant for number of
5650 lower ZMM registers (0-15).
5651 (num_avx512_zmmh_high_registers): New constant for number of
5652 higher ZMM registers (16-31).
5653 (num_avx512_ymmh_registers): New contant for number of higher
5654 YMM registers (ymm16-31 added by avx521 on x86_64).
5655 (num_avx512_xmm_registers): New constant for number of higher
5656 XMM registers (xmm16-31 added by AVX512 on x86_64).
5657 (struct i387_xsave): Add space for AVX512 registers.
5658 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5659 Add code to handle AVX512 registers.
5660 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5661 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5662 prototypei from generated file.
5663 (tdesc_amd64_avx512_linux): Likewise.
5664 (init_registers_x32_avx512_linux): Likewise.
5665 (tdesc_x32_avx512_linux): Likewise.
5666 (init_registers_i386_avx512_linux): Likewise.
5667 (tdesc_i386_avx512_linux): Likewise.
5668 (x86_64_regmap): Add AVX512 registers.
5669 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5670 mask.
5671 (initialize_low_arch): Add code to initialize AVX512 registers.
5672
5673 2014-04-23 Pedro Alves <palves@redhat.com>
5674
5675 * mem-break.c (find_gdb_breakpoint_at): Make static.
5676 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5677
5678 2014-04-23 Pedro Alves <palves@redhat.com>
5679
5680 * i386-low.c: Don't include break-common.h here.
5681 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5682 prototype to take target_hw_bp_type as argument instead of a Z
5683 packet char.
5684 * i386-low.h: Include break-common.h here.
5685 (Z_packet_to_hw_type): Declare.
5686 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5687 prototypes.
5688 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5689 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5690 (x86_remove_point): Convert the packet number to a
5691 target_hw_bp_type before calling i386_low_remove_watchpoint.
5692 * win32-i386-low.c (i386_insert_point): Convert the packet number
5693 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5694 (i386_remove_point): Convert the packet number to a
5695 target_hw_bp_type before calling i386_low_remove_watchpoint.
5696
5697 2014-04-23 Pedro Alves <palves@redhat.com>
5698
5699 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5700
5701 2014-04-10 Pedro Alves <palves@redhat.com>
5702
5703 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5704 Check if the condition or command is NULL before checking if the
5705 breakpoint is known. On success, return true.
5706 * mem-break.h (add_breakpoint_condition): Document return.
5707 (add_breakpoint_commands): Add describing comment.
5708 * server.c (skip_to_semicolon): New function.
5709 (process_point_options): Use it.
5710
5711 2014-04-09 Pedro Alves <palves@redhat.com>
5712
5713 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5714 to lwpid_of.
5715
5716 2014-02-27 Pedro Alves <palves@redhat.com>
5717
5718 PR 12702
5719 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5720 macros.
5721 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5722 output.
5723 (last_thread_of_process_p): Take a PID argument instead of a
5724 thread pointer.
5725 (linux_wait_for_lwp): Delete.
5726 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5727 functions.
5728 (linux_low_filter_event): New function, party factored out from
5729 linux_wait_for_event.
5730 (linux_wait_for_event): Rename to ...
5731 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5732 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5733 sigsuspend. Check for zombie leaders.
5734 (linux_wait_for_event): Reimplement as wrapper around
5735 linux_wait_for_event_filtered.
5736 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5737 a normal or signal exit is seen, it's the whole process exiting.
5738 (wait_for_sigstop): No longer a for_each_inferior callback.
5739 Rewrite on top of linux_wait_for_event_filtered.
5740 (stop_all_lwps): Call wait_for_sigstop directly.
5741 * server.c (resume, handle_target_event): Handle
5742 TARGET_WAITKIND_NO_RESUMED.
5743
5744 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5745
5746 * win32-low.c (psapi_get_dll_name,
5747 * win32_CreateToolhelp32Snapshot): Delete.
5748 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5749 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5750 Delete.
5751 (handle_load_dll): Add function description.
5752 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5753
5754 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5755
5756 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5757 Add comment.
5758 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5759 base address when calling win32_add_one_solib.
5760 (handle_load_dll): Delete local variable load_addr.
5761 Remove 0x1000 offset applied to DLL base address when calling
5762 win32_add_one_solib.
5763 (handle_unload_dll): Add comment.
5764
5765 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5766
5767 * win32-low.c (win32_add_all_dlls): Renames
5768 win32_ensure_ntdll_loaded. Rewrite function documentation.
5769 Adjust implementation to always load all DLLs.
5770 Add 0x1000 offset to DLL base address when calling
5771 win32_add_one_solib.
5772 (child_initialization_done): New static global.
5773 (do_initial_child_stuff): Set child_initialization_done to
5774 zero during child initialization, and 1 after. Replace call
5775 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5776 Add comment.
5777 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5778 (handle_unload_dll): Add function documentation.
5779 (get_child_debug_event): Ignore load and unload DLL events
5780 during child initialization.
5781
5782 2014-02-20 Doug Evans <dje@google.com>
5783
5784 Remove global all_lwps.
5785 * inferiors.h (ptid_of): Move here from linux-low.h.
5786 (pid_of, lwpid_of): Ditto.
5787 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5788 parameter is a struct thread_info * now.
5789 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5790 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5791 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5792 directly.
5793 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5794 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5795 * linux-arm-low.c (update_registers_callback): Update, "entry"
5796 parameter is a struct thread_info * now.
5797 Fetch lwpid from current_inferior directly.
5798 (arm_insert_point): Pass &all_threads to find_inferior instead of
5799 &all_lwps.
5800 (arm_remove_point): Ditto.
5801 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5802 (arm_prepare_to_resume): Fetch pid from thread.
5803 (arm_read_description): Fetch lwpid from current_inferior directly.
5804 * linux-low.c (all_lwps): Delete.
5805 (delete_lwp): Delete call to remove_inferior.
5806 (handle_extended_wait): Fetch lwpid from thread.
5807 (add_lwp): Don't set lwp->entry.id. Remove call to
5808 add_inferior_to_list.
5809 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5810 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5811 (kill_one_lwp_callback): Ditto.
5812 (linux_kill): Don't dereference NULL pointer.
5813 Fetch ptid,lwpid from thread.
5814 (get_detach_signal): Fetch ptid from thread.
5815 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5816 Simplify call to regcache_invalidate_thread.
5817 (delete_lwp_callback): Update, "entry" parameter is a
5818 struct thread_info * now. Fetch pid from thread.
5819 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5820 (status_pending_p_callback): Update, "entry" parameter is a
5821 struct thread_info * now. Fetch ptid from thread.
5822 (find_lwp_pid): Update, "entry" parameter is a
5823 struct thread_info * now.
5824 (linux_wait_for_lwp): Fetch pid from thread.
5825 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5826 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5827 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5828 (dequeue_one_deferred_signal): Ditto.
5829 (cancel_breakpoint): Fetch ptid from current_inferior.
5830 (linux_wait_for_event): Pass &all_threads to find_inferior,
5831 not &all_lwps. Fetch ptid, lwpid from thread.
5832 (count_events_callback): Update, "entry" parameter is a
5833 struct thread_info * now.
5834 (select_singlestep_lwp_callback): Ditto.
5835 (select_event_lwp_callback): Ditto.
5836 (cancel_breakpoints_callback): Ditto.
5837 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5838 not &all_lwps.
5839 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5840 (unsuspend_one_lwp): Update, "entry" parameter is a
5841 struct thread_info * now.
5842 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5843 not &all_lwps.
5844 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5845 Fetch lwpid from thread, not lwp.
5846 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5847 Pass &all_threads to find_inferior, not &all_lwps.
5848 (send_sigstop): Fetch lwpid from thread, not lwp.
5849 (send_sigstop_callback): Update, "entry" parameter is a
5850 struct thread_info * now.
5851 (suspend_and_send_sigstop_callback): Ditto.
5852 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5853 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5854 struct thread_info * now.
5855 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5856 from thread, lwp.
5857 (lwp_running): Update, "entry" parameter is a
5858 struct thread_info * now.
5859 (stop_all_lwps): Fetch ptid from thread.
5860 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5861 (linux_resume_one_lwp): Fetch lwpid from thread.
5862 (linux_set_resume_request): Update, "entry" parameter is a
5863 struct thread_info * now. Fetch pid, lwpid from thread.
5864 (resume_status_pending_p): Update, "entry" parameter is a
5865 struct thread_info * now.
5866 (need_step_over_p): Ditto. Fetch lwpid from thread.
5867 (start_step_over): Fetch lwpid from thread.
5868 (linux_resume_one_thread): Update, "entry" parameter is a
5869 struct thread_info * now. Fetch lwpid from thread.
5870 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5871 (proceed_one_lwp): Update, "entry" parameter is a
5872 struct thread_info * now. Fetch lwpid from thread.
5873 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5874 struct thread_info * now.
5875 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5876 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5877 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5878 directly.
5879 (regsets_store_inferior_registers): Ditto.
5880 (fetch_register, store_register): Ditto.
5881 (linux_read_memory, linux_write_memory): Ditto.
5882 (linux_request_interrupt): Ditto.
5883 (linux_read_auxv): Ditto.
5884 (linux_xfer_siginfo): Ditto.
5885 (linux_qxfer_spu): Ditto.
5886 (linux_qxfer_libraries_svr4): Ditto.
5887 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5888 moved to inferiors.h.
5889 (get_lwp): Delete.
5890 (get_thread_lwp): Update.
5891 (struct lwp_info): Delete member "entry". Simplify comment for
5892 member "thread".
5893 (all_lwps): Delete.
5894 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5895 current_inferior directly.
5896 (update_watch_registers_callback): Update, "entry" parameter is a
5897 struct thread_info * now. Fetch pid from thread.
5898 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5899 (mips_insert_point): Fetch lwpid from current_inferior.
5900 Pass &all_threads to find_inferior, not &all_lwps.
5901 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5902 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5903 directly.
5904 (mips_stopped_data_address): Ditto.
5905 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5906 directly.
5907 * linux-tile-low.c (tile_arch_setup): Ditto.
5908 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5909 (update_debug_registers_callback): Update, "entry" parameter is a
5910 struct thread_info * now. Fetch pid from thread.
5911 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5912 Pass &all_threads to find_inferior, not &all_lwps.
5913 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5914 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5915 Pass &all_threads to find_inferior, not &all_lwps.
5916 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5917 (i386_dr_low_get_status): Ditto.
5918 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5919 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5920 (x86_linux_read_description): Ditto.
5921 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5922
5923 2014-02-20 Doug Evans <dje@google.com>
5924
5925 * inferiors.c (get_first_inferior): Fix buglet.
5926
5927 2014-02-19 Doug Evans <dje@google.com>
5928
5929 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5930 * inferiors.c (add_thread): Change result type to struct thread_info *.
5931 All callers updated.
5932 (add_lwp): Call add_thread here instead of in callers.
5933 All callers updated.
5934 * linux-low.h (get_lwp_thread): Rewrite.
5935 (struct lwp_info): New member "thread".
5936
5937 2014-02-19 Doug Evans <dje@google.com>
5938
5939 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5940 All callers updated.
5941
5942 2014-02-19 Doug Evans <dje@google.com>
5943
5944 * inferiors.c (add_thread): Fix whitespace.
5945
5946 2014-02-19 Doug Evans <dje@google.com>
5947
5948 * dll.c (clear_dlls): Replace accessing list implemention details
5949 with API function.
5950 * gdbthread.h (get_first_thread): Declare.
5951 * inferiors.c (for_each_inferior_with_data): New function.
5952 (get_first_thread): New function.
5953 (find_thread_ptid): Simplify.
5954 (get_first_inferior): New function.
5955 (clear_list): Delete.
5956 (one_inferior_p): New function.
5957 (clear_inferior_list): New function.
5958 (clear_inferiors): Update.
5959 * inferiors.h (for_each_inferior_with_data): Declare.
5960 (clear_inferior_list): Declare.
5961 (one_inferior_p): Declare.
5962 (get_first_inferior): Declare.
5963 * linux-low.c (linux_wait_for_event): Replace accessing list
5964 implemention details with API function.
5965 * server.c (target_running): Ditto.
5966 (accumulate_file_name_length): New function.
5967 (emit_dll_description): New function.
5968 (handle_qxfer_libraries): Replace accessing list implemention
5969 details with API function.
5970 (handle_qxfer_threads_worker): New function.
5971 (handle_qxfer_threads_proper): Replace accessing list implemention
5972 details with API function.
5973 (handle_query): Ditto.
5974 (visit_actioned_threads_callback_ftype): New typedef.
5975 (visit_actioned_threads_data): New struct.
5976 (visit_actioned_threads): Rewrite to be find_inferior callback.
5977 (resume): Call find_inferior.
5978 (handle_status): Replace accessing list implemention
5979 details with API function.
5980 (process_serial_event): Replace accessing list implemention details
5981 with API function.
5982 * target.c (set_desired_inferior): Replace accessing list implemention
5983 details with API function.
5984 * tracepoint.c (same_process_p): New function.
5985 (gdb_agent_about_to_close): Replace accessing list implemention
5986 details with API function.
5987 * win32-low.c (child_delete_thread): Replace accessing list
5988 implemention details with API function.
5989 (match_dll_by_basename): New function.
5990 (dll_is_loaded_by_basename): New function.
5991 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5992 details call to dll_is_loaded_by_basename.
5993
5994 2014-02-19 Doug Evans <dje@google.com>
5995
5996 * dll.h (struct dll_info): Add comment.
5997 * gdbthread.h (struct thread_info): Add comment.
5998 (current_ptid): Simplify.
5999 * inferiors.c (add_process): Update.
6000 (remove_process): Update.
6001 * inferiors.h (struct process_info): Rename member "head" to "entry".
6002 * linux-low.c (delete_lwp): Update.
6003 (add_lwp): Update.
6004 (last_thread_of_process_p): Update.
6005 (kill_one_lwp_callback, linux_kill): Update.
6006 (status_pending_p_callback): Update.
6007 (wait_for_sigstop): Update. Simplify read of ptid.
6008 (start_step_over): Update.
6009 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6010 (get_lwp_thread): Update.
6011 (struct lwp_info): Rename member "head" to "entry".
6012 * regcache.h (inferior_list_entry): Delete.
6013 * server.c (kill_inferior_callback): Update.
6014 (detach_or_kill_inferior_callback): Update.
6015 (print_started_pid): Update.
6016 (print_attached_pid): Update.
6017 (process_serial_event): Simplify read of ptid.
6018 * thread-db.c (thread_db_create_event): Update.
6019 (thread_db_get_tls_address): Update.
6020 * win32-low.c (current_inferior_ptid): Simplify.
6021
6022 2014-02-19 Tom Tromey <tromey@redhat.com>
6023
6024 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6025 argument.
6026 (target_supports_btrace): Update.
6027
6028 2014-02-14 Yao Qi <yao@codesourcery.com>
6029
6030 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6031 (rsp-low-ipa.o): New target.
6032
6033 2014-02-12 Tom Tromey <tromey@redhat.com>
6034
6035 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6036 convert_ascii_to_int.
6037 * regcache.c (registers_to_string): Likewise.
6038 * remote-utils.c (decode_M_packet): Likewise.
6039 * server.c (process_serial_event): Likewise.
6040
6041 2014-02-12 Tom Tromey <tromey@redhat.com>
6042
6043 * server.c (handle_query, handle_v_run): Use hex2bin, not
6044 unhexify.
6045 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6046
6047 2014-02-12 Tom Tromey <tromey@redhat.com>
6048
6049 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6050 convert_int_to_ascii.
6051 * regcache.c (registers_to_string, collect_register_as_string):
6052 Likewise.
6053 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6054 Likewise.
6055 * server.c (process_serial_event): Likewise.
6056 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6057 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6058
6059 2014-02-12 Tom Tromey <tromey@redhat.com>
6060
6061 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6062 bin2hex, not hexify.
6063 * tracepoint.c (cmd_qtstatus): Likewise.
6064
6065 2014-02-12 Tom Tromey <tromey@redhat.com>
6066
6067 * remote-utils.c (monitor_output): Pass explicit length to
6068 hexify.
6069
6070 2014-02-12 Tom Tromey <tromey@redhat.com>
6071
6072 * tracepoint.c: Include rsp-low.h.
6073 * server.c: Include rsp-low.h.
6074 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6075 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6076 declare.
6077 * remote-utils.c: Include rsp-low.h.
6078 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6079 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6080 (convert_int_to_ascii, convert_ascii_to_int): Move to
6081 common/rsp-low.c.
6082 * regcache.c: Include rsp-low.h.
6083 * ax.c: Include rsp-low.h.
6084 * Makefile.in (SFILES): Add common/rsp-low.c.
6085 (OBS): Add rsp-low.o.
6086 (rsp-low.o): New target.
6087
6088 2014-02-12 Tom Tromey <tromey@redhat.com>
6089
6090 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6091 Include print-utils.h.
6092 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6093 (plongest, thirty_two, phex_nz): Remove.
6094 * Makefile.in (SFILES): Add common/print-utils.c.
6095 (OBS): Add print-utils.o.
6096 (print-utils-ipa.o): New target.
6097 (print-utils.o): New target.
6098 (IPA_OBJS): Add print-utils-ipa.o.
6099
6100 2014-02-06 Tom Tromey <tromey@redhat.com>
6101
6102 * Makefile.in (SFILES): Fix indentation.
6103
6104 2014-02-05 Doug Evans <dje@google.com>
6105
6106 * linux-low.c (linux_wait_for_event): Improve comment.
6107 (linux_wait_1): Keep current_inferior in sync with event_child.
6108
6109 2014-01-22 Doug Evans <dje@google.com>
6110
6111 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6112
6113 2014-01-22 Doug Evans <dje@google.com>
6114
6115 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6116 * configure: Regenerate.
6117 * config.in: Regenerate.
6118 * Makefile.in (SFILES): Add debug.c.
6119 (OBS): Add debug.o.
6120 * debug.c: New file.
6121 * debug.h: New file.
6122 * linux-aarch64-low.c (*): Update all debugging printfs to use
6123 debug_printf instead of fprintf.
6124 * linux-arm-low.c (*): Ditto.
6125 * linux-cris-low.c (*): Ditto.
6126 * linux-crisv32-low.c (*): Ditto.
6127 * linux-m32r-low.c (*): Ditto.
6128 * linux-sparc-low.c (*): Ditto.
6129 * linux-x86.c (*): Ditto.
6130 * linux-low.c (*): Ditto.
6131 (linux_wait_1): Add calls to debug_enter, debug_exit.
6132 (linux_wait): Remove redundant debugging printf.
6133 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6134 (linux_resume, unstop_all_lwps): Ditto.
6135 * mem-break.c (*): Update all debugging printfs to use
6136 debug_printf instead of fprintf.
6137 * remote-utils.c (*): Ditto.
6138 * thread-db.c (*): Ditto.
6139 * server.c #include <ctype.h>, "gdb_vecs.h".
6140 (debug_threads): Moved to debug.c.
6141 (*): Update all debugging printfs to use debug_printf instead of
6142 fprintf.
6143 (start_inferior): Replace call to fflush with call to debug_flush.
6144 (monitor_show_help): Mention set debug-format.
6145 (parse_debug_format_options): New function.
6146 (handle_monitor_command): Handle "monitor set debug-format".
6147 (gdbserver_usage): Mention --debug-format.
6148 (main): Parse --debug-format.
6149 * server.h (debug_threads): Declaration moved to debug.h.
6150 #include "debug.h".
6151 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6152 trace_debug_1 that uses debug_printf.
6153 (tracepoint_look_up_symbols): Update all debugging printfs to use
6154 debug_printf instead of fprintf.
6155
6156 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6157
6158 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6159 sys/ptrace.h.
6160
6161 2014-01-17 Pedro Alves <palves@redhat.com>
6162
6163 PR build/16445
6164 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6165 defined after including gdb_proc_service.h.
6166
6167 2014-01-16 Doug Evans <dje@google.com>
6168
6169 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6170 (match_dll): Use it.
6171
6172 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6173
6174 * target.h (target_ops) <read_btrace>: Change parameters and
6175 return type to allow error reporting.
6176 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6177 trace reading errors on.
6178 * linux-low.c (linux_low_read_btrace): Pass trace reading
6179 errors on.
6180 (linux_low_disable_btrace): New.
6181
6182 2014-01-15 Doug Evans <dje@google.com>
6183
6184 * inferiors.c (thread_id_to_gdb_id): Delete.
6185 * inferiors.h (thread_id_to_gdb_id): Delete.
6186
6187 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6188
6189 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6190 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6191 versions.
6192
6193 2014-01-08 Pedro Alves <palves@redhat.com>
6194
6195 * server.c (handle_status): Don't discard previous queued stop
6196 replies or thread's pending status here.
6197 (main) <disconnection>: Do it here instead.
6198
6199 2014-01-08 Pedro Alves <palves@redhat.com>
6200
6201 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6202 * server.c (visit_actioned_threads, handle_pending_status): New
6203 function.
6204 (handle_v_cont): Factor out parts to ...
6205 (resume): ... this new function. If in all-stop, and a thread
6206 being resumed has a pending status, report it without actually
6207 resuming.
6208 (myresume): Adjust to use the new 'resume' function.
6209 (clear_pending_status_callback, set_pending_status_callback)
6210 (find_status_pending_thread_callback): New functions.
6211 (handle_status): Handle the case of multiple threads having
6212 interesting statuses to report. Report threads' real last signal
6213 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6214 with an interesting thread to report the status for, instead of
6215 always reporting the status of the first thread.
6216
6217 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6218
6219 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6220 * gdbreplay.c (gdbreplay_version): Likewise.
6221
6222 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6223
6224 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6225 iov.iov_len with the real length in use.
6226
6227 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6228
6229 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6230 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6231 for all targets that use win32-low.c.
6232 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6233 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6234
6235 2013-12-13 Pedro Alves <palves@redhat.com>
6236
6237 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6238 if equal to TARGET_WAITKIND_LOADED.
6239 * win32-low.c (cached_status): New static global.
6240 (win32_wait): Add declaration.
6241 (do_initial_child_stuff): Flush all initial pending debug events
6242 up to the initial breakpoint.
6243 (win32_wait): If CACHED_STATUS was set, return that instead
6244 of doing a real wait. Remove the code resuming the execution
6245 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6246 during the initial phase. Also remove the code changing
6247 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6248 TARGET_WAITKIND_STOPPED.
6249
6250 2013-12-11 Yao Qi <yao@codesourcery.com>
6251
6252 * notif.c (handle_notif_ack): Return 0 if no notification
6253 matches.
6254
6255 2013-11-20 Doug Evans <dje@google.com>
6256
6257 * linux-low.c (linux_set_resume_request): Fix comment.
6258
6259 2013-11-20 Doug Evans <dje@google.com>
6260
6261 * linux-low.c (resume_status_pending_p): Tweak comment.
6262
6263 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6264
6265 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6266 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6267 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6268 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6269 (srv_amd64_regobj): Add amd64-mpx.o.
6270 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6271 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6272 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6273 * i387-fp.c (num_pl_bnd_register) Added constant.
6274 (num_pl_bnd_cfg_registers) Added constant.
6275 (struct i387_xsave) Added reserved area and MPX fields.
6276 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6277 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6278 function.
6279 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6280 (init_registers_amd64_mpx_linux): Declare new function.
6281 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6282 (x86_64_regmap): Add MPX registers.
6283 (x86_linux_read_description): Add MPX case.
6284 (initialize_low_arch): Initialize MPX targets.
6285
6286 2013-11-18 Tom Tromey <tromey@redhat.com>
6287
6288 * configure: Rebuild.
6289 * configure.ac: Don't check for stdlib.h.
6290 * gdbreplay.c: Unconditionally include stdlib.h.
6291
6292 2013-11-18 Tom Tromey <tromey@redhat.com>
6293
6294 * config.in: Rebuild.
6295 * configure: Rebuild.
6296 * configure.ac: Don't use AC_HEADER_DIRENT.
6297
6298 2013-11-18 Tom Tromey <tromey@redhat.com>
6299
6300 * server.h: Don't check HAVE_STRING_H.
6301 * gdbreplay.c: Don't check HAVE_STRING_H.
6302 * configure: Rebuild.
6303
6304 2013-11-18 Tom Tromey <tromey@redhat.com>
6305
6306 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6307 LIBGNU.
6308
6309 2013-11-08 Tom Tromey <tromey@redhat.com>
6310
6311 * configure, config.in: Rebuild.
6312 * configure.ac: Remove unused configury.
6313
6314 2013-11-08 Tom Tromey <tromey@redhat.com>
6315
6316 * acinclude.m4: Include common.m4, codeset.m4.
6317 * configure, config.in: Rebuild.
6318 * configure.ac: Use GDB_AC_COMMON.
6319
6320 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6321
6322 * linux-s390-low.c (HWCAP_S390_TE): New define.
6323 (s390_arch_setup): Consider the TE field in the HWCAP for
6324 determining 'have_regset_tdb'.
6325
6326 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6327
6328 PR gdb/16014
6329 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6330 call to sizeof.
6331
6332 2013-10-02 Pedro Alves <palves@redhat.com>
6333
6334 * server.c (process_serial_event): Don't output "GDBserver
6335 exiting" if GDB is connected through stdio.
6336 * target.c (mywait): Likewise, be silent if GDB is connected
6337 through stdio.
6338
6339 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6340
6341 * lynx-low.c (lynx_add_threads_after_attach): New function.
6342 (lynx_attach): Remove call to add_thread. Add call to
6343 lynx_add_threads_after_attach instead.
6344
6345 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6346
6347 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6348 * config.in, configure: Regenerated.
6349
6350 2013-09-18 Yao Qi <yao@codesourcery.com>
6351
6352 PR server/15959
6353 * server.c (start_inferior): Clear 'resume_info'.
6354
6355 2013-09-16 Jiong Wang <jiwang@tilera.com>
6356
6357 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6358 for each register.
6359
6360 2013-09-16 Jiong Wang <jiwang@tilera.com>
6361
6362 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6363 linux-tile-low.o to srv_tgtobj.
6364
6365 2013-09-16 Will Newton <will.newton@linaro.org>
6366
6367 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6368 out regs.
6369
6370 2013-09-06 Pedro Alves <palves@redhat.com>
6371
6372 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6373 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6374 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6375 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6376 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6377 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6378
6379 2013-09-06 Pedro Alves <palves@redhat.com>
6380
6381 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6382 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6383
6384 2013-09-06 Pedro Alves <palves@redhat.com>
6385
6386 * linux-amd64-ipa.c: Include tracepoint.h.
6387 * linux-i386-ipa.c: Include tracepoint.h.
6388
6389 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6390
6391 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6392 (ps_get_thread_area): New function.
6393
6394 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6395
6396 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6397 (initialize_low_arch): Call init_registers_crisv32 rather than
6398 init_register_crisv32.
6399
6400 2013-09-05 Pedro Alves <palves@redhat.com>
6401
6402 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6403 to ...
6404 * hostio.h: ... this new file.
6405 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6406 win32-low.c: Include hostio.h.
6407
6408 2013-09-05 Pedro Alves <palves@redhat.com>
6409
6410 * server.h (gdb_client_data, handler_func, callback_handler_func)
6411 (delete_file_handler, add_file_handler, append_callback_event)
6412 (delete_callback_event, start_event_loop, initialize_event_loop):
6413 Move to event-loop.h and include it.
6414 * event-loop.h: New file.
6415
6416 2013-09-05 Pedro Alves <palves@redhat.com>
6417
6418 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6419 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6420 (loaded_dll, unloaded_dll): Move to ...
6421 * dll.h: ... this new file.
6422 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6423
6424 2013-09-05 Pedro Alves <palves@redhat.com>
6425
6426 * server.h (current_process, get_thread_process, all_processes)
6427 (add_inferior_to_list, for_each_inferior, current_inferior)
6428 (remove_inferior, add_process, remove_process, find_process_pid)
6429 (have_started_inferiors_p, have_attached_inferiors_p)
6430 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6431 (clear_inferiors, find_inferior, find_inferior_id)
6432 (inferior_target_data, set_inferior_target_data)
6433 (inferior_regcache_data, set_inferior_regcache_data): Move to
6434 inferiors.h, and include it.
6435 * inferiors.h: New file.
6436
6437 2013-09-05 Pedro Alves <palves@redhat.com>
6438
6439 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6440 Move ...
6441 * ax.h: ... here.
6442
6443 2013-09-05 Pedro Alves <palves@redhat.com>
6444
6445 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6446 tracepoint.h.
6447 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6448 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6449 (handle_tracepoint_general_set, handle_tracepoint_query)
6450 (tracepoint_finished_step, tracepoint_was_hit)
6451 (release_while_stepping_state_list, current_traceframe)
6452 (in_readonly_region, traceframe_read_mem)
6453 (fetch_traceframe_registers, traceframe_read_sdata)
6454 (traceframe_read_info, struct fast_tpoint_collect_status)
6455 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6456 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6457 (supply_fast_tracepoint_registers)
6458 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6459 (ipa_tdesc, claim_trampoline_space)
6460 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6461 (agent_mem_read, agent_get_trace_state_variable_value)
6462 (agent_set_trace_state_variable_value, agent_tsv_read)
6463 (agent_mem_read_string, get_raw_reg_func_addr)
6464 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6465 * tracepoint.h: ... this new file.
6466
6467 2013-09-05 Pedro Alves <palves@redhat.com>
6468
6469 * server.h (perror_with_name, error, fatal, warning, paddress)
6470 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6471 include it.
6472 * utils.h: New file.
6473
6474 2013-09-05 Pedro Alves <palves@redhat.com>
6475
6476 * server.h (remote_debug, noack_mode, transport_is_reliable)
6477 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6478 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6479 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6480 (write_enn, initialize_async_io, enable_async_io)
6481 (disable_async_io, check_remote_input_interrupt_request)
6482 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6483 (dead_thread_notify, prepare_resume_reply)
6484 (decode_address_to_semicolon, decode_address, decode_m_packet)
6485 (decode_M_packet, decode_X_packet, decode_xfer_write)
6486 (decode_search_memory_packet, unhexify, hexify)
6487 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6488 (look_up_one_symbol, relocate_instruction)
6489 (monitor_output): Move to remote-utils.h, and include it.
6490 * remote-utils.h: New file.
6491
6492 2013-09-05 Pedro Alves <palves@redhat.com>
6493
6494 * server.h (_): Delete.
6495
6496 2013-09-02 Pedro Alves <palves@redhat.com>
6497
6498 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6499 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6500 allocated.
6501 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6502
6503 2013-09-02 Pierre Muller <muller@sourceware.org>
6504
6505 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6506 or WriteProcessMemory complete successfully and handle
6507 ERROR_PARTIAL_COPY error.
6508
6509 2013-09-02 Pedro Alves <palves@redhat.com>
6510
6511 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6512 error instead of EIO.
6513
6514 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6515
6516 PR server/15604
6517 * linux-low.c: Include filestuff.h.
6518 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6519 * lynx-low.c: Include filestuff.h.
6520 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6521 * server.c: Include filestuff.h.
6522 (main): Call notice_open_fds.
6523 * spu-low.c: Include filestuff.h.
6524 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6525
6526 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6527
6528 * Makefile.in: Explain why ../target and ../nat are not
6529 listed as include file search paths.
6530 (linux-waitpid.o): New object file rule.
6531 * configure.srv (srv_native_linux_obj): New variable.
6532 Replace all occurrences of linux native object files with
6533 $srv_native_linux_obj.
6534 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6535 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6536 (linux_enable_event_reporting): Remove declaration.
6537 (my_waitpid): Moved to common/linux-waitpid.c.
6538 (linux_wait_for_event): Pass ptid when calling
6539 linux_enable_event_reporting.
6540 (linux_supports_tracefork_flag): Remove.
6541 (linux_enable_event_reporting): Likewise.
6542 (linux_tracefork_grandchild): Remove.
6543 (STACK_SIZE): Moved to common/linux-ptrace.c.
6544 (linux_tracefork_child): Remove.
6545 (linux_test_for_tracefork): Remove.
6546 (linux_look_up_symbols): Call linux_supports_traceclone.
6547 (initialize_low): Remove call to linux_test_for_tracefork.
6548 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6549 common/linux-ptrace.h.
6550 (PTRACE_TYPE_ARG4): Likewise.
6551 Include linux-ptrace.h.
6552
6553 2013-08-21 Pedro Alves <palves@redhat.com>
6554
6555 * config.in: Renegerate.
6556
6557 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6558
6559 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6560 (SFILES): Remove $(srcdir)/common/target-common.c and
6561 add $(srcdir)/target/waitstatus.c.
6562 (OBS): Remove target-common.o and add waitstatus.o.
6563 (server_h): Remove $(srcdir)/../common/target-common.h and
6564 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6565 and $(srcdir)/../target/waitstatus.h.
6566 (target-common.o): Remove.
6567 (waitstatus.o): New target object file.
6568 * target.h: Do not include target-common.h and
6569 include target/resume.h, target/wait.h and
6570 target/waitstatus.h.
6571
6572 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6573
6574 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6575 to PTRACE_TYPE_ARG3.
6576 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6577 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6578 PTRACE_TYPE_ARG4.
6579 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6580 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6581
6582 2013-07-27 Jie Zhang <jie@codesourcery.com>
6583 Daniel Jacobowitz <dan@codesourcery.com>
6584 Yao Qi <yao@codesourcery.com>
6585
6586 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6587 (mips-linux-watch.o): New rule.
6588 (mips_linux_watch_h): New variable.
6589 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6590 srv_tgtobj.
6591 * linux-mips-low.c: Include mips-linux-watch.h.
6592 (struct arch_process_info, struct arch_lwp_info): New.
6593 (update_watch_registers_callback): New function.
6594 (mips_linux_new_process, mips_linux_new_thread) New functions.
6595 (mips_linux_prepare_to_resume, mips_insert_point): New
6596 functions.
6597 (mips_remove_point, mips_stopped_by_watchpoint): New
6598 functions.
6599 (rsp_bp_type_to_target_hw_bp_type): New function.
6600 (mips_stopped_data_address): New function.
6601 (the_low_target): Add watchpoint support functions.
6602
6603 2013-07-27 Yao Qi <yao@codesourcery.com>
6604
6605 * i386-low.c: Include break-common.h.
6606 (enum target_hw_bp_type): Remove.
6607
6608 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6609
6610 * Makefile.in (SFILES): /common/target-common.c.
6611 (OBS): Add target-common.o.
6612 (server_h): Add $(srcdir)/../common/target-common.h.
6613 (target-common.o): New target.
6614 * server.c (queue_stop_reply_callback): Free
6615 status string after use.
6616 * target.c (target_waitstatus_to_string): Remove.
6617 * target.h: Include target-common.h.
6618 (resume_kind): Likewise.
6619 (target_waitkind): Likewise.
6620 (target_waitstatus): Likewise.
6621 (TARGET_WNOHANG): Likewise.
6622
6623 2013-07-04 Yao Qi <yao@codesourcery.com>
6624
6625 * Makefile.in (host_alias): Use @host_noncanonical@.
6626 (target_alias): Use @target_noncanonical@.
6627 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6628 ACX_NONCANONICAL_HOST.
6629 * configure: Regenerated.
6630
6631 Revert:
6632 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6633
6634 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6635 * configure: Rebuild.
6636 * Makefile.in (version_host, version_target): Get from configure.
6637 (version.c): Use $(version_host) and $(version_target).
6638
6639 2013-07-03 Pedro Alves <palves@redhat.com>
6640
6641 * Makefile.in (config.status): Depend on development.sh.
6642 * acinclude.m4: Include libmcheck.m4.
6643 * configure: Regenerate.
6644
6645 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6646
6647 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6648 attribute inside the parentheses.
6649 (winapi_DebugSetProcessKillOnExit): Ditto.
6650 (winapi_DebugBreakProcess): Ditto.
6651 (winapi_GenerateConsoleCtrlEvent): Ditto.
6652
6653 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6654
6655 * notif.h (notif_event): Add a dummy member to avoid compiler
6656 errors.
6657
6658 2013-07-01 Pedro Alves <palves@redhat.com>
6659
6660 * hostio.c (HOSTIO_PATH_MAX): Define.
6661 (require_filename, handle_open, handle_unlink, handle_readlink):
6662 Use it.
6663
6664 2013-07-01 Pedro Alves <palves@redhat.com>
6665
6666 * server.h: Include "pathmax.h".
6667 * linux-low.c: Don't include sys/param.h.
6668 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6669 MAXPATHLEN.
6670 * win32-low.c: Don't include sys/param.h.
6671 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6672
6673 2013-07-01 Pedro Alves <palves@redhat.com>
6674
6675 * event-loop.c: Don't check HAVE_UNISTD_H before including
6676 <unistd.h>.
6677 * gdbreplay.c: Likewise.
6678 * remote-utils.c: Likewise.
6679 * server.c: Likewise.
6680 * configure.ac: Don't check for unistd.h.
6681 * configure: Regenerate.
6682
6683 2013-06-28 Tom Tromey <tromey@redhat.com>
6684
6685 * Makefile.in (version.c): Use version.in, not
6686 common/version.in.
6687
6688 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6689
6690 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6691 * configure: Rebuild.
6692 * Makefile.in (version_host, version_target): Get from configure.
6693 (version.c): Use $(version_host) and $(version_target).
6694
6695 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6696
6697 Fix trace-status to output user name without trailing colon.
6698 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6699
6700 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6701
6702 Fix trace-status to output proper start-time and stop-time.
6703 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6704 output start time and stop time in hex as gdb expects.
6705
6706 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6707
6708 * tracepoint.c (build_traceframe_info_xml): Output trace state
6709 variables present in the trace buffer.
6710
6711 2013-06-24 Tom Tromey <tromey@redhat.com>
6712
6713 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6714 create-version.sh.
6715 (version.o): Remove.
6716 * gdbreplay.c: Include version.h.
6717 (version, host_name): Don't declare.
6718 * server.h: Include version.h.
6719 (version, host_name): Don't declare.
6720
6721 2013-06-12 Pedro Alves <palves@redhat.com>
6722
6723 * linux-x86-low.c (linux_is_elf64): Delete global.
6724 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6725 with local linux_pid_exe_is_elf_64_file use.
6726
6727 2013-06-11 Pedro Alves <palves@redhat.com>
6728
6729 * linux-low.c (regset_disabled, disable_regset): New functions.
6730 (regsets_fetch_inferior_registers)
6731 (regsets_store_inferior_registers): Use them.
6732 (initialize_regsets_info); Don't allocate the disabled_regsets
6733 array here.
6734 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6735 comment.
6736
6737 2013-06-11 Pedro Alves <palves@redhat.com>
6738
6739 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6740 xmalloc.
6741
6742 2013-06-11 Pedro Alves <palves@redhat.com>
6743
6744 * linux-x86-low.c (initialize_low_arch): Call
6745 init_registers_x32_avx_linux.
6746
6747 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6748
6749 Fix compatibility with Android Bionic.
6750 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6751 it is not empty.
6752
6753 2013-06-07 Pedro Alves <palves@redhat.com>
6754
6755 PR server/14823
6756 * Makefile.in (OBS): Add tdesc.o.
6757 (IPA_OBJS): Add tdesc-ipa.o.
6758 (tdesc-ipa.o): New rule.
6759 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6760 interface.
6761 * linux-low.c (new_inferior): Delete.
6762 (disabled_regsets, num_regsets): Delete.
6763 (linux_add_process): Adjust to set the new per-process
6764 new_inferior flag.
6765 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6766 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6767 was a stop. When calling arch_setup, switch the current inferior
6768 to the thread that got an event.
6769 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6770 (regsets_fetch_inferior_registers)
6771 (regsets_store_inferior_registers): New regsets_info parameter.
6772 Adjust to use it.
6773 (linux_register_in_regsets): New regs_info parameter. Adjust to
6774 use it.
6775 (register_addr, fetch_register, store_register): New usrregs_info
6776 parameter. Adjust to use it.
6777 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6778 parameter regs_info. Adjust to use it.
6779 (linux_fetch_registers): Get the current inferior's regs_info, and
6780 adjust to use it.
6781 (linux_store_registers): Ditto.
6782 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6783 (initialize_low): Don't initialize the target_regsets here. Call
6784 initialize_low_arch.
6785 * linux-low.h (target_regsets): Delete declaration.
6786 (struct regsets_info): New.
6787 (struct usrregs_info): New.
6788 (struct regs_info): New.
6789 (struct process_info_private) <new_inferior>: New field.
6790 (struct linux_target_ops): Delete the num_regs, regmap, and
6791 regset_bitmap fields. New field regs_info.
6792 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6793 * i387-fp.c (num_xmm_registers): Delete.
6794 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6795 calls to new interface.
6796 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6797 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6798 Infer the number of xmm registers from the regcache's target
6799 description.
6800 * i387-fp.h (num_xmm_registers): Delete.
6801 * inferiors.c (add_thread): Don't install the thread's regcache
6802 here.
6803 * proc-service.c (gregset_info): Fetch the current inferior's
6804 regs_info. Adjust to use it.
6805 * regcache.c: Include tdesc.h.
6806 (register_bytes, reg_defs, num_registers)
6807 (gdbserver_expedite_regs): Delete.
6808 (get_thread_regcache): If the thread doesn't have a regcache yet,
6809 create one, instead of aborting gdbserver.
6810 (regcache_invalidate_one): Rename to ...
6811 (regcache_invalidate_thread): ... this.
6812 (regcache_invalidate_one): New.
6813 (regcache_invalidate): Only invalidate registers of the current
6814 process.
6815 (init_register_cache): Add target_desc parameter, and use it.
6816 (new_register_cache): Ditto. Assert the target description has a
6817 non zero registers_size.
6818 (regcache_cpy): Add assertions. Adjust.
6819 (realloc_register_cache, set_register_cache): Delete.
6820 (registers_to_string, registers_from_string): Adjust.
6821 (find_register_by_name, find_regno, find_register_by_number)
6822 (register_cache_size): Add target_desc parameter, and use it.
6823 (free_register_cache_thread, free_register_cache_thread_one)
6824 (regcache_release, register_cache_size): New.
6825 (register_size): Add target_desc parameter, and use it.
6826 (register_data, supply_register, supply_register_zeroed)
6827 (supply_regblock, supply_register_by_name, collect_register)
6828 (collect_register_as_string, collect_register_by_name): Adjust.
6829 * regcache.h (struct target_desc): Forward declare.
6830 (struct regcache) <tdesc>: New field.
6831 (init_register_cache, new_register_cache): Add target_desc
6832 parameter.
6833 (regcache_invalidate_thread): Declare.
6834 (regcache_invalidate_one): Delete declaration.
6835 (regcache_release): Declare.
6836 (find_register_by_number, register_cache_size, register_size)
6837 (find_regno): Add target_desc parameter.
6838 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6839 declarations.
6840 * remote-utils.c: Include tdesc.h.
6841 (outreg, prepare_resume_reply): Adjust.
6842 * server.c: Include tdesc.h.
6843 (gdbserver_xmltarget): Delete declaration.
6844 (get_features_xml, process_serial_event): Adjust.
6845 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6846 declare.
6847 (struct process_info) <tdesc>: New field.
6848 (ipa_tdesc): Declare.
6849 * tdesc.c: New file.
6850 * tdesc.h: New file.
6851 * tracepoint.c: Include tdesc.h.
6852 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6853 (get_context_regcache): Adjust to pass ipa_tdesc down.
6854 (do_action_at_tracepoint): Adjust to get the register cache size
6855 from the context regcache's description.
6856 (traceframe_walk_blocks): Adjust to get the register cache size
6857 from the current trace frame's description.
6858 (traceframe_get_pc): Adjust to get current trace frame's
6859 description and pass it down.
6860 (gdb_collect): Adjust to get the register cache size from the
6861 IPA's description.
6862 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6863 (gdbserver_xmltarget): Delete.
6864 (initialize_low_tracepoint): Set the ipa's target description.
6865 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6866 (initialize_low_tracepoint): Set the ipa's target description.
6867 * linux-x86-low.c: Include tdesc.h.
6868 [__x86_64__] (is_64bit_tdesc): New.
6869 (ps_get_thread_area, x86_get_thread_area): Use it.
6870 (i386_cannot_store_register): Rename to ...
6871 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6872 (i386_cannot_fetch_register): Rename to ...
6873 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6874 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6875 to new interface.
6876 (target_regsets): Rename to ...
6877 (x86_regsets): ... this.
6878 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6879 interface.
6880 (x86_siginfo_fixup): Use is_64bit_tdesc.
6881 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6882 (tdesc_x32_avx_linux, tdesc_x32_linux)
6883 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6884 Declare.
6885 (x86_linux_update_xmltarget): Delete.
6886 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6887 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6888 (AMD64_LINUX_USER64_CS): New.
6889 (x86_linux_read_description): New, based on
6890 x86_linux_update_xmltarget.
6891 (same_process_callback): New.
6892 (x86_arch_setup_process_callback): New.
6893 (x86_linux_update_xmltarget): New.
6894 (x86_regsets_info): New.
6895 (amd64_linux_regs_info): New.
6896 (i386_linux_usrregs_info): New.
6897 (i386_linux_regs_info): New.
6898 (x86_linux_regs_info): New.
6899 (x86_arch_setup): Reimplement.
6900 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6901 (x86_emit_ops): Ditto.
6902 (the_low_target): Adjust. Install x86_linux_regs_info,
6903 x86_cannot_fetch_register, and x86_cannot_store_register.
6904 (initialize_low_arch): New.
6905 * linux-ia64-low.c (tdesc_ia64): Declare.
6906 (ia64_fetch_register): Adjust.
6907 (ia64_usrregs_info, regs_info): New globals.
6908 (ia64_regs_info): New function.
6909 (the_low_target): Adjust.
6910 (initialize_low_arch): New function.
6911 * linux-sparc-low.c (tdesc_sparc64): Declare.
6912 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6913 Adjust.
6914 (sparc_arch_setup): New function.
6915 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6916 (the_low_target): Adjust.
6917 (initialize_low_arch): New function.
6918 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6919 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6920 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6921 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6922 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6923 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6924 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6925 (tdesc_powerpc_isa205_vsx64l): Declare.
6926 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6927 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6928 (ppc_set_pc, ppc_get_hwcap): Adjust.
6929 (ppc_usrregs_info): Forward declare.
6930 (!__powerpc64__) ppc_regmap_adjusted: New global.
6931 (ppc_arch_setup): Adjust to the current process'es target
6932 description.
6933 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6934 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6935 (ppc_store_evrregset): Adjust.
6936 (target_regsets): Rename to ...
6937 (ppc_regsets): ... this, and make static.
6938 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6939 (ppc_regs_info): New function.
6940 (the_low_target): Adjust.
6941 (initialize_low_arch): New function.
6942 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6943 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6944 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6945 (tdesc_s390x_linux64v2): Declare.
6946 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6947 (s390_fill_gregset, s390_store_last_break): Adjust.
6948 (target_regsets): Rename to ...
6949 (s390_regsets): ... this, and make static.
6950 (s390_get_pc, s390_set_pc): Adjust.
6951 (s390_get_hwcap): New target_desc parameter, and use it.
6952 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6953 (s390_arch_setup): Adjust to set the current process'es target
6954 description. Don't adjust the regmap.
6955 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6956 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6957 (regs_info_3264): New globals.
6958 (s390_regs_info): New function.
6959 (the_low_target): Adjust.
6960 (initialize_low_arch): New function.
6961 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6962 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6963 [__mips64] (init_registers_mips_linux)
6964 (init_registers_mips_dsp_linux): Delete defines.
6965 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6966 (have_dsp): New global.
6967 (mips_read_description): New, based on mips_arch_setup.
6968 (mips_arch_setup): Reimplement.
6969 (get_usrregs_info): New function.
6970 (mips_cannot_fetch_register, mips_cannot_store_register)
6971 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6972 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6973 (target_regsets): Rename to ...
6974 (mips_regsets): ... this, and make static.
6975 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6976 (dsp_regs_info, regs_info): New globals.
6977 (mips_regs_info): New function.
6978 (the_low_target): Adjust.
6979 (initialize_low_arch): New function.
6980 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6981 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6982 Declare.
6983 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6984 (arm_read_description): New, with bits factored from
6985 arm_arch_setup.
6986 (arm_arch_setup): Reimplement.
6987 (target_regsets): Rename to ...
6988 (arm_regsets): ... this, and make static.
6989 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6990 (arm_regs_info): New function.
6991 (the_low_target): Adjust.
6992 (initialize_low_arch): New function.
6993 * linux-m68k-low.c (tdesc_m68k): Declare.
6994 (target_regsets): Rename to ...
6995 (m68k_regsets): ... this, and make static.
6996 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6997 (m68k_regs_info): New function.
6998 (m68k_arch_setup): New function.
6999 (the_low_target): Adjust.
7000 (initialize_low_arch): New function.
7001 * linux-sh-low.c (tdesc_sharch): Declare.
7002 (target_regsets): Rename to ...
7003 (sh_regsets): ... this, and make static.
7004 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7005 (sh_regs_info, sh_arch_setup): New functions.
7006 (the_low_target): Adjust.
7007 (initialize_low_arch): New function.
7008 * linux-bfin-low.c (tdesc_bfin): Declare.
7009 (bfin_arch_setup): New function.
7010 (bfin_usrregs_info, regs_info): New globals.
7011 (bfin_regs_info): New function.
7012 (the_low_target): Adjust.
7013 (initialize_low_arch): New function.
7014 * linux-cris-low.c (tdesc_cris): Declare.
7015 (cris_arch_setup): New function.
7016 (cris_usrregs_info, regs_info): New globals.
7017 (cris_regs_info): New function.
7018 (the_low_target): Adjust.
7019 (initialize_low_arch): New function.
7020 * linux-cris-low.c (tdesc_crisv32): Declare.
7021 (cris_arch_setup): New function.
7022 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7023 (cris_regs_info): New function.
7024 (the_low_target): Adjust.
7025 (initialize_low_arch): New function.
7026 * linux-m32r-low.c (tdesc_m32r): Declare.
7027 (m32r_arch_setup): New function.
7028 (m32r_usrregs_info, regs_info): New globals.
7029 (m32r_regs_info): Adjust.
7030 (initialize_low_arch): New function.
7031 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7032 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7033 (tic6x_usrregs_info): Forward declare.
7034 (tic6x_read_description): New function, based on ...
7035 (tic6x_arch_setup): ... this. Reimplement.
7036 (target_regsets): Rename to ...
7037 (tic6x_regsets): ... this, and make static.
7038 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7039 (tic6x_regs_info): New function.
7040 (the_low_target): Adjust.
7041 (initialize_low_arch): New function.
7042 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7043 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7044 (target_regsets): Rename to ...
7045 (xtensa_regsets): ... this, and make static.
7046 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7047 globals.
7048 (xtensa_arch_setup, xtensa_regs_info): New functions.
7049 (the_low_target): Adjust.
7050 (initialize_low_arch): New function.
7051 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7052 (nios2_arch_setup): Set the current process'es tdesc.
7053 (target_regsets): Rename to ...
7054 (nios2_regsets): ... this.
7055 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7056 (nios2_regs_info): New function.
7057 (the_low_target): Adjust.
7058 (initialize_low_arch): New function.
7059 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7060 (aarch64_arch_setup): Set the current process'es tdesc.
7061 (target_regsets): Rename to ...
7062 (aarch64_regsets): ... this.
7063 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7064 (aarch64_regs_info): New function.
7065 (the_low_target): Adjust.
7066 (initialize_low_arch): New function.
7067 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7068 globals.
7069 (target_regsets): Rename to ...
7070 (tile_regsets): ... this.
7071 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7072 (tile_regs_info): New function.
7073 (tile_arch_setup): Set the current process'es tdesc.
7074 (the_low_target): Adjust.
7075 (initialize_low_arch): New function.
7076 * spu-low.c (tdesc_spu): Declare.
7077 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7078 * win32-arm-low.c (tdesc_arm): Declare.
7079 (arm_arch_setup): New function.
7080 (the_low_target): Install arm_arch_setup instead of
7081 init_registers_arm.
7082 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7083 (init_windows_x86): Rename to ...
7084 (i386_arch_setup): ... this. Set `win32_tdesc'.
7085 (the_low_target): Adjust.
7086 * win32-low.c (win32_tdesc): New global.
7087 (child_add_thread): Don't create the thread cache here.
7088 (do_initial_child_stuff): Set the new process'es tdesc.
7089 * win32-low.h (struct target_desc): Forward declare.
7090 (win32_tdesc): Declare.
7091 * lynx-i386-low.c (tdesc_i386): Declare global.
7092 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7093 * lynx-low.c (lynx_tdesc): New global.
7094 (lynx_add_process): Set the new process'es tdesc.
7095 * lynx-low.h (struct target_desc): Forward declare.
7096 (lynx_tdesc): Declare global.
7097 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7098 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7099 * nto-low.c (nto_tdesc): New global.
7100 (do_attach): Set the new process'es tdesc.
7101 * nto-low.h (struct target_desc): Forward declare.
7102 (nto_tdesc): Declare.
7103 * nto-x86-low.c (tdesc_i386): Declare.
7104 (nto_x86_arch_setup): Set `nto_tdesc'.
7105
7106 2013-06-04 Gary Benson <gbenson@redhat.com>
7107
7108 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7109 to qSupported response when appropriate.
7110 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7111 with nonzero-length annex.
7112 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7113 arguments supplied in annex.
7114
7115 2013-05-31 Doug Evans <dje@google.com>
7116
7117 PR server/15594
7118 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7119 64 bits in 64-cross-32 environment.
7120
7121 2013-05-28 Pedro Alves <palves@redhat.com>
7122
7123 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7124 (aarch64-without-fpu.c): Delete rule.
7125 * configure.srv (aarch64*-*-linux*): Remove references to
7126 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7127 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7128 declaration.
7129
7130 2013-05-24 Pedro Alves <palves@redhat.com>
7131
7132 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7133 instead of strchr/decode_address. Error if the range isn't split
7134 with a ','. Don't assume there's be a ':' in the action.
7135
7136 2013-05-23 Yao Qi <yao@codesourcery.com>
7137 Pedro Alves <palves@redhat.com>
7138
7139 * linux-low.c (lwp_in_step_range): New function.
7140 (linux_wait_1): If the thread was range stepping and stopped
7141 outside the stepping range, report the stop to GDB. Otherwise,
7142 continue stepping. Add range stepping debug output.
7143 (linux_set_resume_request): Copy the step range from the resume
7144 request to the lwp.
7145 (linux_supports_range_stepping): New.
7146 (linux_target_ops) <supports_range_stepping>: Set to
7147 linux_supports_range_stepping.
7148 * linux-low.h (struct linux_target_ops)
7149 <supports_range_stepping>: New field.
7150 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7151 * linux-x86-low.c (x86_supports_range_stepping): New.
7152 (the_low_target) <supports_range_stepping>: Set to
7153 x86_supports_range_stepping.
7154 * server.c (handle_v_cont): Handle 'r' action.
7155 (handle_v_requests): Append ";r" if the target supports range
7156 stepping.
7157 * target.h (struct thread_resume) <step_range_start,
7158 step_range_end>: New fields.
7159 (struct target_ops) <supports_range_stepping>:
7160 New field.
7161 (target_supports_range_stepping): New macro.
7162
7163 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7164
7165 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7166 confusion in comment.
7167
7168 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7169
7170 * lynx-low.c (struct process_info_private): New type.
7171 (lynx_add_process): New function.
7172 (lynx_create_inferior, lynx_attach): Replace calls to
7173 add_process by calls to lynx_add_process.
7174 (lynx_resume): If PTID is null, then try using
7175 current_process()->private->last_wait_event_ptid.
7176 Add comments.
7177 (lynx_clear_inferiors): Delete. The contents of that function
7178 has been inlined in lynx_mourn;
7179 (lynx_wait_1): Save the ptid in the process's private data.
7180 (lynx_mourn): Free the process' private data. Replace call
7181 to lynx_clear_inferiors by call to clear_inferiors.
7182
7183 2013-05-17 Yao Qi <yao@codesourcery.com>
7184
7185 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7186 the right place.
7187
7188 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7189
7190 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7191 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7192 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7193 PT_TEXT_END_ADDR guards. Update comments.
7194 (linux_target_op) <read_offsets>: Conditionally define to
7195 linux_read_offsets if the target is UCLIBC and if it defines
7196 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7197
7198 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7199 Andrew Jenner <andrew@codesourcery.com>
7200
7201 * Makefile.in (SFILES): Add linux-nios2-low.c.
7202 (clean): Add action to delete nios2-linux.c.
7203 (nios2-linux.c): New rule.
7204 * configure.srv: Add nios2*-*-linux*.
7205 * linux-nios2-low.c: New.
7206
7207 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7208
7209 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7210
7211 2013-04-25 Hui Zhu <hui@codesourcery.com>
7212
7213 PR gdb/15186
7214 * ax.c (ax_printf): Add fflush.
7215
7216 2013-04-22 Tom Tromey <tromey@redhat.com>
7217
7218 * Makefile.in (SFILES): Add filestuff.c.
7219 (OBS): Add filestuff.o.
7220 (filestuff.o): New target.
7221 * config.in, configure: Rebuild.
7222 * configure.ac: Check for fdwalk, pipe2.
7223
7224 2013-04-17 Pedro Alves <palves@redhat.com>
7225
7226 * configure.ac (USE_THREAD_DB): Delete variable.
7227 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7228 Don't AC_SUBST USE_THREAD_DB.
7229 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7230 * config.in, configure: Regenerate.
7231
7232 2013-04-16 Pedro Alves <palves@redhat.com>
7233
7234 * linux-low.h (struct lwp_info) <thread_known>: Move under
7235 the USE_THREAD_DB #ifdef.
7236
7237 2013-04-16 Pedro Alves <palves@redhat.com>
7238
7239 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7240 (linux-low.o): Delete rule.
7241 * linux-low.h: Always include "gdb_thread_db.h" instead of
7242 conditionally including thread_db.h.
7243 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7244 HAVE_THREAD_DB_H.
7245
7246 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7247
7248 * Makefile.in (install-only): Fix make install regression.
7249
7250 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7251
7252 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7253 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7254 installation.
7255 * gdbserver.1: Remove.
7256
7257 2013-03-22 Pedro Alves <palves@redhat.com>
7258
7259 * linux-low.c (handle_extended_wait): Don't call
7260 linux_enable_event_reporting.
7261
7262 2013-03-15 Tony Theodore <tonyt@logyst.com>
7263
7264 PR build/9098:
7265 * Makefile.in (SHELL): Use @SHELL@.
7266
7267 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7268
7269 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7270 compiler warning.
7271
7272 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7273
7274 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7275 Remove extraneous NULL element.
7276
7277 2013-03-13 Yao Qi <yao@codesourcery.com>
7278
7279 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7280 'V' block in trace frame.
7281
7282 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7283
7284 * target.h (struct target_ops): Add btrace ops.
7285 (target_supports_btrace): New macro.
7286 (target_enable_btrace): New macro.
7287 (target_disable_btrace): New macro.
7288 (target_read_btrace): New macro.
7289 * gdbthread.h (struct thread_info): Add btrace field.
7290 * server.c: Include btrace-common.h.
7291 (handle_btrace_general_set): New function.
7292 (handle_btrace_enable): New function.
7293 (handle_btrace_disable): New function.
7294 (handle_general_set): Call handle_btrace_general_set.
7295 (handle_qxfer_btrace): New function.
7296 (struct qxfer qxfer_packets[]): Add btrace entry.
7297 * inferiors.c (remove_thread): Disable btrace.
7298 * linux-low: Include linux-btrace.h.
7299 (linux_low_enable_btrace): New function.
7300 (linux_low_read_btrace): New function.
7301 (linux_target_ops): Add btrace ops.
7302 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7303 Add srv_linux_btrace=yes.
7304 (x86_64-*-linux*): Add linux-btrace.o.
7305 Add srv_linux_btrace=yes.
7306 * configure.ac: Define HAVE_LINUX_BTRACE.
7307 * config.in: Regenerated.
7308 * configure: Regenerated.
7309
7310 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7311
7312 * server.c (handle_qxfer): Preserve error message if -3 is
7313 returned.
7314 (qxfer): Document the -3 return value.
7315
7316 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7317
7318 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7319 (linux_btrace_h): New variable.
7320 (linux-btrace.o): New rule.
7321
7322 2013-03-08 Stan Shebs <stan@codesourcery.com>
7323 Hafiz Abid Qadeer <abidh@codesourcery.com>
7324
7325 * tracepoint.c (trace_buffer_size): New global.
7326 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7327 (init_trace_buffer): Change to one-argument function. Allocate
7328 trace buffer memory.
7329 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7330 handle QTBuffer:size packet.
7331 (cmd_bigqtbuffer_size): New function.
7332 (initialize_tracepoint): Call init_trace_buffer with
7333 DEFAULT_TRACE_BUFFER_SIZE.
7334 * server.c (handle_query): Add QTBuffer:size in the
7335 supported packets.
7336
7337 2013-03-07 Yao Qi <yao@codesourcery.com>
7338
7339 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7340 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7341 of -1.
7342 (cmd_qtsp): Adjust condition. Do post increment.
7343 Set cur_action and cur_step_action back to 0.
7344
7345 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7346
7347 PR server/15236
7348 * linux-low.c (linux_write_memory): Return early success if LEN is
7349 zero.
7350
7351 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7352
7353 * configure.srv: Add x86_64-*-cygwin* as target.
7354
7355 2013-02-28 Tom Tromey <tromey@redhat.com>
7356
7357 * configure.ac: Invoke AC_SYS_LARGEFILE.
7358 * configure, config.in: Rebuild.
7359
7360 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7361
7362 * win32-low.c: Throughout, fix format strings and casts of
7363 printf-like functions to avoid type related warnings on all
7364 platforms.
7365 (get_child_debug_event): Print dwDebugEventCode as hex since
7366 that's how it's usually documented.
7367
7368 2013-02-28 Yao Qi <yao@codesourcery.com>
7369
7370 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7371 pulongest.
7372
7373 2013-02-27 Jiong Wang <jiwang@tilera.com>
7374
7375 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7376 (reg-tilegx32.c): New rule.
7377 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7378 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7379 different register info initializer according to elf class.
7380 (init_registers_tilgx32): New function. The tilegx32 register info
7381 initializer.
7382 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7383 (tile_store_gregset): Likewise.
7384
7385 2013-02-27 Yao Qi <yao@codesourcery.com>
7386
7387 * server.c (process_point_options): Print debug message when
7388 debug_threads is true.
7389
7390 2013-02-26 Yao Qi <yao@codesourcery.com>
7391
7392 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7393
7394 2013-02-19 Pedro Alves <palves@redhat.com>
7395 Kai Tietz <ktietz@redhat.com>
7396
7397 PR gdb/15161
7398
7399 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7400 instead of strtoul to extract address from packet.
7401 (process_serial_event) <'z'>: Likewise.
7402
7403 2013-02-18 Yao Qi <yao@codesourcery.com>
7404
7405 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7406
7407 2013-02-14 Pedro Alves <palves@redhat.com>
7408
7409 Plug memory leak.
7410
7411 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7412 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7413
7414 2013-02-14 Pedro Alves <palves@redhat.com>
7415
7416 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7417
7418 2013-02-14 Pedro Alves <palves@redhat.com>
7419
7420 * tracepoint.c (save_string): Delete.
7421 (add_tracepoint_action): Use savestring instead of save_string.
7422
7423 2013-02-12 Pedro Alves <palves@redhat.com>
7424
7425 * linux-xtensa-low.c: Ditto.
7426 * xtensa-xtregs.c: Ditto.
7427
7428 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7429
7430 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7431 thread_db.
7432
7433 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7434
7435 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7436 aarch64_num_wp_regs and aarch64_num_bp_regs to
7437 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7438
7439 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7440
7441 * linux-aarch64-low.c (ps_get_thread_area): Replace
7442 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7443
7444 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7445 Marcus Shawcroft <marcus.shawcroft@arm.com>
7446 Nigel Stephens <nigel.stephens@arm.com>
7447 Yufeng Zhang <yufeng.zhang@arm.com>
7448
7449 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7450 (aarch64.c, aarch64-without-fpu.c): New targets.
7451 * configure.srv (aarch64*-*-linux*): New.
7452 * linux-aarch64-low.c: New file.
7453
7454 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7455
7456 * linux-low.c (handle_extended_wait, linux_create_inferior)
7457 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7458 (dequeue_one_deferred_signal, linux_resume_one_thread)
7459 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7460 (linux_tracefork_grandchild, linux_test_for_tracefork)
7461 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7462 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7463 where the argument is 0.
7464
7465 2013-01-25 Yao Qi <yao@codesourcery.com>
7466
7467 * event-loop.c: Include "queue.h".
7468 (gdb_event_p): New typedef.
7469 (struct gdb_event) <next_event>: Remove.
7470 (event_queue): Change to QUEUE(gdb_event_p).
7471 (async_queue_event): Remove.
7472 (gdb_event_xfree): New.
7473 (initialize_event_loop): New.
7474 (process_event): Use API from QUEUE.
7475 (wait_for_event): Likewise.
7476 * server.c (main): Call initialize_event_loop.
7477 * server.h (initialize_event_loop): Declare.
7478
7479 2013-01-18 Yao Qi <yao@codesourcery.com>
7480
7481 * ax.h (struct eval_agent_expr_context): New.
7482 (gdb_eval_agent_expr): Update declaration.
7483 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7484 TFRAME. Add new argument CTX.
7485 * server.h (struct eval_agent_expr_context): Declare.
7486 (agent_mem_read, agent_tsv_read): Update declaration.
7487 (agent_mem_read_string): Likewise.
7488 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7489 (add_traceframe_block): Add new argument TPOINT.
7490 Increase TPOINT->traceframe_usage.
7491 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7492 eval_tracepoint_agent_expr.
7493 (condition_true_at_tracepoint): Likewise.
7494 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7495 (agent_mem_read_string, agent_tsv_read): Likewise.
7496
7497 2013-01-16 Yao Qi <yao@codesourcery.com>
7498
7499 * linux-low.c (linux_resume_one_lwp): Don't check
7500 'lwp->bp_reinsert != 0'.
7501
7502 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7503 Pedro Alves <palves@redhat.com>
7504
7505 * lynx-low.c (ptrace_request_to_str): Define a temporary
7506 macro and use it to simplify this function's implementation.
7507
7508 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7509
7510 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7511 sets errno.
7512
7513 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7514
7515 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7516
7517 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7518
7519 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7520
7521 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7522
7523 * lynx-low.c (lynx_resume): Use the resume_info parameter
7524 to determine the ptid for the lynx_ptrace call, unless
7525 it is equal to minus_one_ptid, in which case we use the
7526 ptid of the current_inferior.
7527 (lynx_wait_1): After having received a thread create/exit
7528 event, resume the inferior's execution using the signaling
7529 thread's ptid, rather than the old ptid.
7530
7531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7532
7533 * lynx-low.c (lynx_resume): Delete variable ret.
7534
7535 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7536
7537 * gdbreplay.c (gdbreplay_version): Update copyright year.
7538 * server.c (gdbserver_version): Likewise.
7539
7540 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7541
7542 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7543 new thread.
7544
7545 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7546
7547 * lynx-low.c (ptrace_request_to_str): Add handling for
7548 PTRACE_GETTRACESIG.
7549
7550 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7551
7552 * lynx-low.c (lynx_attach): Delete variable new_process.
7553
7554 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7555
7556 * lynx-low.c (lynx_create_inferior): Delete variable
7557 new_process.
7558
7559 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7560
7561 * lynx-low.c (ptrace_request_to_str): Do not handle
7562 PTRACE_GETTHREADLIST if this macro does not exist.
7563
7564 2012-12-15 Yao Qi <yao@codesourcery.com>
7565
7566 * Makefile.in (OBS): Add notif.o.
7567 * notif.c, notif.h: New.
7568 * server.c: Include "notif.h".
7569 (struct vstop_notif) <next>: Remove.
7570 <base>: New field.
7571 (queue_stop_reply): Update.
7572 (push_event, send_next_stop_reply): Remove.
7573 (discard_queued_stop_replies): Update.
7574 (notif_stop): New variable.
7575 (handle_v_stopped): Remove.
7576 (handle_v_requests): Don't call handle_v_stopped. Call
7577 handle_ack_notif instead.
7578 (queue_stop_reply_callback): Call notif_event_enque instead
7579 of queue_stop_reply.
7580 (handle_status): Don't call send_next_stop_reply, call
7581 notif_write_event instead.
7582 (kill_inferior_callback): Likewise.
7583 (detach_or_kill_inferior_callback): Likewise.
7584 (main): Call initialize_notif.
7585 (process_serial_event): Call QUEUE_is_empty.
7586 (handle_target_event): Call notif_push instead of push event.
7587 * server.h (push_event): Remove declaration.
7588
7589 2012-12-10 Tom Tromey <tromey@redhat.com>
7590
7591 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7592 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7593 macros.
7594 (.c.o): Rewrite.
7595 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7596 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7597 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7598 (amd64-linux-ipa.o, ax.o): Rewrite.
7599 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7600 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7601 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7602 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7603 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7604 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7605 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7606 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7607 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7608 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7609 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7610 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7611 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7612 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7613 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7614 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7615 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7616 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7617 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7618 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7619 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7620 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7621 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7622 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7623 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7624 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7625 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7626 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7627 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7628 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7629 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7630 (reg-tilegx.o): Remove.
7631 (all_object_files): New macro.
7632 Include .deps files.
7633 * aclocal.m4, configure: Rebuild.
7634 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7635 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7636 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7637
7638 2012-12-05 Tom Tromey <tromey@redhat.com>
7639
7640 PR gdb/14917:
7641 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7642
7643 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7644
7645 * configure.ac: Check for linux/perf_event.h.
7646 * config.in: Regenerated.
7647 * configure: Regenerated.
7648
7649 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7650
7651 * hostio.c (handle_readlink): Decrease buffer size
7652 parameter passed to readlink by one byte.
7653
7654 2012-11-26 Yao Qi <yao@codesourcery.com>
7655
7656 * configure.ac (build_warnings): Append '-Wempty-body'.
7657 * configure: Regenerated.
7658 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7659 body.
7660
7661 2012-11-15 Pierre Muller <muller@sourceware.org>
7662
7663 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7664 * config.in: Regenerate.
7665 * configure: Regenerate.
7666 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7667 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7668 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7669 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7670 header.
7671 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7672 instead of <sys/wait.h> header.
7673 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7674
7675 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7676
7677 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7678 (various make rules): Remove -DGDBSERVER
7679
7680 2012-11-09 Yao Qi <yao@codesourcery.com>
7681
7682 * spu-low.c (current_ptid): Move it to ..
7683 * gdbthread.h: ... here. New.
7684 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7685 * server.c (myresume, process_serial_event): Likewise.
7686 * thread-db.c (thread_db_find_new_threads): Likewise.
7687 * tracepoint.c (run_inferior_command): Likewise.
7688
7689 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7690
7691 * server.c (handle_search_memory_1): Include access length in
7692 warning message.
7693
7694 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7695
7696 * linux-crisv32-low.c: Fix compile errors.
7697
7698 2012-09-04 Yao Qi <yao@codesourcery.com>
7699
7700 * tracepoint.c (cmd_qtsv): Adjust debug message.
7701 Don't check CUR_TPOINT.
7702
7703 2012-08-28 Yao Qi <yao@codesourcery.com>
7704
7705 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7706 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7707 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7708 Remove declarations of xmalloc, xreallloc, xstrdup and
7709 freeargv.
7710 * Makefile.in (libiberty_h): New.
7711 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7712 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7713
7714 2012-08-23 Yao Qi <yao@codesourcery.com>
7715
7716 * server.h: Remove declaration of 'xsnprintf'.
7717
7718 2012-08-22 Keith Seitz <keiths@redhat.com>
7719
7720 * server.h: Include build-gnulib-gbserver/config.h.
7721 * gdbreplay.c: Likewise.
7722
7723 2012-08-08 Doug Evans <dje@google.com>
7724
7725 * Makefile.in (SFILES): Add gdb_vecs.c.
7726 (OBS): Add gdb_vecs.o.
7727 (gdb_vecs_h, host_defs_h): New variables.
7728 (thread-db.o): Add $(gdb_vecs_h) dependency.
7729 (gdb_vecs.o): New rule.
7730 * thread-db.c: #include "gdb_vecs.h".
7731 (thread_db_load_search): Use a vector to iterate over path elements.
7732 Handle text appearing after "$pdir".
7733
7734 * configure.ac: Add check for strstr.
7735 * config.in: Regenerate.
7736 * configure: Regenerate.
7737
7738 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7739
7740 * hostio.c (handle_pread): If pread fails, fall back to attempting
7741 lseek/read.
7742 (handle_pwrite): Likewise for pwrite.
7743
7744 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7745
7746 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7747 between unsupported TYPE and unimplementable ADDR/LEN combination.
7748 (arm_insert_point): Act on new return value.
7749
7750 2012-07-31 Pedro Alves <palves@redhat.com>
7751
7752 * server.c (process_point_options): Only skip tokens if we find
7753 one that is unrecognized. Don't treat 'X' specially while
7754 skipping unrecognized tokens.
7755
7756 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7757
7758 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7759 to 4-byte-align HW breakpoint addresses for Thumb.
7760
7761 2012-07-27 Yao Qi <yao@codesourcery.com>
7762
7763 PR remote/14161.
7764
7765 * server.h: Declare gdb_agent_about_to_close.
7766 * target.c (kill_inferior): Include "agent.h".
7767 New. Send command 'kill'.
7768 * target.h (kill_inferior): Removed macro.
7769 * tracepoint.c (gdb_agent_about_to_close): New.
7770 (gdb_agent_helper_thread): Handle command 'close'.
7771 Wait endlessly until the inferior stops.
7772 Install gdb_agent_remove_socket to atexit hook.
7773 (agent_socket_name): New static variable.
7774 (gdb_agent_socket_init): Replace local variable 'name' with
7775 'agent_socket_name'.
7776 (gdb_agent_remove_socket): New.
7777
7778 2012-07-27 Yao Qi <yao@codesourcery.com>
7779
7780 * server.c (process_point_options): Stop at 'X' when parsing.
7781
7782 2012-07-19 Michael Eager <eager@eagercon.com>
7783
7784 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7785 to hw_execute.
7786 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7787 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7788 hardware breakpoint.
7789
7790 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7791
7792 * gdbserver/linux-low.c (initialize_low): Call
7793 linux_ptrace_init_warnings.
7794
7795 2012-07-02 Doug Evans <dje@google.com>
7796
7797 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7798 pointer to int.
7799
7800 2012-07-02 Stan Shebs <stan@codesourcery.com>
7801
7802 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7803 (ax.o): Add it to build rule.
7804 (ax-ipa.o): Ditto.
7805 (OBS): Add format.o.
7806 (IPA_OBS): Add format.o.
7807 * server.c (handle_query): Claim support for breakpoint commands.
7808 (process_point_options): Add command case.
7809 (process_serial_event): Leave running if there are printfs in
7810 effect.
7811 * mem-break.h (any_persistent_commands): Declare.
7812 (add_breakpoint_commands): Declare.
7813 (gdb_no_commands_at_breakpoint): Declare.
7814 (run_breakpoint_commands): Declare.
7815 * mem-break.c (struct point_command_list): New struct.
7816 (struct breakpoint): New field command_list.
7817 (any_persistent_commands): New function.
7818 (add_commands_to_breakpoint): New function.
7819 (add_breakpoint_commands): New function.
7820 (gdb_no_commands_at_breakpoint): New function.
7821 (run_breakpoint_commands): New function.
7822 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7823 locally.
7824 * ax.c: Include format.h.
7825 (ax_printf): New function.
7826 (gdb_eval_agent_expr): Add printf opcode.
7827
7828 2012-06-13 Yao Qi <yao@codesourcery.com>
7829
7830 * server.c (start_inferior): Remove duplicated writes to fields
7831 'last_resume_kind' and 'last_status' of 'current_inferior'.
7832
7833 2012-06-12 Yao Qi <yao@codesourcery.com>
7834 Pedro Alves <palves@redhat.com>
7835
7836 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7837 comment.
7838 * server.c (handle_v_cont): Extend comment.
7839
7840 2012-06-11 Yao Qi <yao@codesourcery.com>
7841
7842 * linux-low.c (linux_attach): Add 'static'.
7843
7844 2012-06-06 Yao Qi <yao@codesourcery.com>
7845
7846 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7847
7848 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7849
7850 Fix gcc -flto compilation warning.
7851 * server.c (main): Make variable multi_mode and attach volatile.
7852
7853 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7854
7855 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7856 if the platform doesn't know about it.
7857
7858 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7859
7860 * Makefile.in (SFILES): Add linux-tile-low.c.
7861 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7862 * configure.srv: Handle tilegx-*-linux*.
7863 * linux-tile-low.c: New file.
7864
7865 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7866
7867 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7868
7869 2012-05-24 Pedro Alves <palves@redhat.com>
7870
7871 PR gdb/7205
7872
7873 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7874
7875 2012-05-24 Pedro Alves <palves@redhat.com>
7876
7877 PR gdb/7205
7878
7879 Replace target_signal with gdb_signal throughout.
7880
7881 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7882
7883 * linux-low.c (linux_store_registers): Avoid the copying sequence
7884 when no data has been retrieved by ptrace.
7885
7886 2012-05-22 Will Deacon <will.deacon@arm.com>
7887
7888 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7889 Include asm/ptrace.h.
7890 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7891 already defined.
7892
7893 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7894
7895 * linux-low.c (linux_store_registers): Don't re-retrieve data
7896 with ptrace that has already been obtained from /proc. Always
7897 copy any data retrieved with ptrace to the buffer supplied.
7898
7899 2012-05-11 Yao Qi <yao@codesourcery.com>
7900 Pedro Alves <palves@redhat.com>
7901
7902 * linux-low.c (enum stopping_threads_kind): New.
7903 (stopping_threads): Change type to `enum stopping_threads_kind'.
7904 (handle_extended_wait): If stopping and suspending threads, leave
7905 the new_lwp suspended too.
7906 (linux_wait_for_event): Adjust.
7907 (stop_all_lwps): Set `stopping_threads' to
7908 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7909 whether we're suspending threads or just stopping them. Assert no
7910 recursion happens.
7911
7912 2012-04-29 Yao Qi <yao@codesourcery.com>
7913
7914 * server.h: Move some code to ...
7915 * gdbthread.h: ... here. New.
7916 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7917 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7918 (nto-low.o, win32-low.o): Likewise.
7919 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7920 * regcache.c, remote-utils.c, server.c: Likewise.
7921 * target.c, tracepoint.c, win32-low.c: Likewise.
7922
7923 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7924
7925 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7926 (PTRACE_ARG4_TYPE): Likewise.
7927 (PTRACE_XFER_TYPE): Likewise.
7928 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7929 ptrace to PTRACE_ARG3_TYPE.
7930 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7931 (PTRACE_ARG4_TYPE): Likewise.
7932 (PTRACE_XFER_TYPE): Likewise.
7933 (linux_detach_one_lwp): Cast fourth argument of
7934 ptrace to long then PTRACE_ARG4_TYPE.
7935 (regsets_fetch_inferior_registers): Cast third argument of
7936 ptrace to long then PTRACE_ARG3_TYPE.
7937 (regsets_store_inferior_registers): Likewise.
7938
7939 2012-04-20 Pedro Alves <palves@redhat.com>
7940
7941 * configure: Regenerate.
7942
7943 2012-04-19 Pedro Alves <palves@redhat.com>
7944
7945 * Makefile.in (GNULIB_BUILDDIR): New.
7946 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7947 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7948 (all, install-only, uninstall, clean-info, all-lib, clean): No
7949 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7950 (maintainer-clean realclean distclean): Use subdir_do.
7951 (subdir_do): New.
7952 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7953 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7954 * acinclude.m4: Include acx_configure_dir.m4.
7955 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7956 calls. Call AC_PROG_RANLIB. Configure gnulib using
7957 ACX_CONFIGURE_DIR.
7958 (GNULIB): New.
7959 (GNULIB_STDINT_H): Adjust.
7960 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7961 * gdbreplay.c: Include build-gnulib/config.h.
7962 * server.h: Likewise.
7963 * aclocal.m4: Regenerate.
7964 * config.in: Regenerate.
7965 * configure: Regenerate.
7966
7967 2012-04-19 Pedro Alves <palves@redhat.com>
7968
7969 * Makefile.in (LIBGNU, INCGNU): Adjust.
7970 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7971 (all, install-only, uninstall, clean-info, all-lib, clean)
7972 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7973 * configure.ac: Adjust AC_OUTPUT output.
7974 * aclocal.m4: Regenerate.
7975 * configure: Regenerate.
7976
7977 2012-04-19 Pedro Alves <palves@redhat.com>
7978
7979 * Makefile.in (generated_files): New.
7980 (server_h): Remove the explicit dependency on config.h, and depend
7981 on $generated_files.
7982
7983 2012-04-19 Pedro Alves <palves@redhat.com>
7984
7985 * Makefile.in (INCGNU): Add -Ignulib.
7986
7987 2012-04-19 Pedro Alves <palves@redhat.com>
7988
7989 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7990 (INCGNU): ... this, and spell out -I here.
7991 (GNULIB_LIB): Rename to ...
7992 (LIBGNU): ... this.
7993 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7994
7995 2012-04-19 Pedro Alves <palves@redhat.com>
7996
7997 * config.in: Regenerate.
7998
7999 2012-04-19 Pedro Alves <palves@redhat.com>
8000
8001 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8002 * server.h (memmem): Remove declaration.
8003 * config.in: Regenerate.
8004 * configure: Regenerate.
8005
8006 2012-04-19 Yao Qi <yao@codesourcery.com>
8007
8008 * Makefile.in (SFILES): Add common/vec.c.
8009 (OBS): Add vec.o.
8010 (vec.o): New rule.
8011
8012 2012-04-19 Yao Qi <yao@codesourcery.com>
8013
8014 * remote-utils.c (prepare_resume_reply): Replace with macro
8015 target_core_of_thread.
8016 * server.c (handle_qxfer_threads_proper): Likewise.
8017 * target.h (traget_core_of_thread): New macro.
8018
8019 2012-04-18 Pedro Alves <palves@redhat.com>
8020
8021 * aclocal.m4: Regenerate.
8022 * configure: Regenerate.
8023
8024 2012-04-16 Yao Qi <yao@codesourcery.com>
8025
8026 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8027 duplicated on address.
8028
8029 2012-04-16 Yao Qi <yao@codesourcery.com>
8030
8031 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8032 (struct tracepoint_action_ops) <send>: New field.
8033 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8034 (agent_expr_send, x_tracepoint_action_send): New.
8035 (l_tracepoint_action_send): New.
8036 (cmd_qtdp): Download and install tracepoint
8037 according to `use_agent'.
8038 (run_inferior_command): Add one more parameter `len'.
8039 Update callers.
8040 (tracepoint_send_agent): New.
8041 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8042
8043 2012-04-16 Yao Qi <yao@codesourcery.com>
8044
8045 * tracepoint.c (download_tracepoints): Moved to ...
8046 (cmd_qtstart): ... here.
8047
8048 2012-04-14 Yao Qi <yao@codesourcery.com>
8049
8050 * tracepoint.c: Include inttypes.h.
8051 (struct collect_memory_action): Use sized types.
8052 (struct tracepoint): Likewise.
8053 (cmd_qtdp, stop_tracing): Update print specifiers.
8054 (cmd_qtp, response_tracepoint): Likewise.
8055 (collect_data_at_tracepoint): Likewise.
8056 (collect_data_at_step): Likewise.
8057
8058 2012-04-14 Yao Qi <yao@codesourcery.com>
8059
8060 Import gnulib module inttypes.
8061 * aclocal.m4, config.in, configure: Regenerated.
8062
8063 2012-04-14 Yao Qi <yao@codesourcery.com>
8064
8065 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8066 Makefile and config.status at last.
8067
8068 2012-04-13 Yao Qi <yao@codesourcery.com>
8069
8070 * tracepoint.c: Include stdint.h unconditionally.
8071
8072 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8073
8074 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8075 on BFD_HAVE_SYS_PROCFS_TYPE.
8076 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8077 * configure: Regenerate.
8078 * config.in: Likewise.
8079
8080 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8081
8082 * Makefile.in (clean): Also remove x32.c x32-linux.c
8083 x32-avx.c x32-avx-linux.c.
8084 (x32.o): New target.
8085 (x32.c): Likewise.
8086 (x32-linux.o): Likewise.
8087 (x32-linux.c): Likewise.
8088 (x32-avx.o): Likewise.
8089 (x32-avx.c): Likewise.
8090 (x32-avx-linux.o): Likewise.
8091 (x32-avx-linux.c): Likewise.
8092
8093 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8094 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8095 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8096 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8097 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8098 i386/x32-avx-linux.xml.
8099
8100 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8101 (init_registers_x32_avx_linux): Likwise.
8102 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8103 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8104
8105 2012-04-13 Pedro Alves <palves@redhat.com>
8106
8107 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8108 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8109 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8110 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8111 the sub-make.
8112
8113 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8114
8115 * linux-x86-low.c (compat_x32_clock_t): New.
8116 (compat_x32_siginfo_t): Likewise.
8117 (compat_x32_siginfo_from_siginfo): Likewise.
8118 (siginfo_from_compat_x32_siginfo): Likewise.
8119 (linux_is_elf64): Likewise.
8120 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8121 and siginfo_from_compat_x32_siginfo for x32.
8122 (x86_arch_setup): Set linux_is_elf64.
8123
8124 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8125
8126 PR gdb/13969
8127 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8128 e_machine field.
8129 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8130 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8131 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8132 compatible with process.
8133
8134 2012-04-12 Yao Qi <yao@codesourcery.com>
8135
8136 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8137 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8138 (install-only, install-info, clean): Handle sub dir gnulib.
8139 (all-lib, am--refresh): New targets.
8140 (memmem.o): Remove target.
8141 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8142 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8143 (AC_REPLACE_FUNCS): Remove memmem.
8144 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8145 (AC_OUTPUT): Generate Makefile in gnulib/.
8146 * aclocal.m4, config.in, configure: Regenerated.
8147
8148 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8149
8150 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8151
8152 2012-04-05 Pedro Alves <palves@redhat.com>
8153
8154 -Werror=strict-aliasing
8155
8156 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8157 pointer.
8158
8159 2012-04-04 Pedro Alves <palves@redhat.com>
8160
8161 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8162 (sparc_store_gregset_from_stack, sparc_store_gregset)
8163 (sparc_breakpoint_at): Fix formatting.
8164
8165 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8166
8167 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8168 are available.
8169 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8170 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8171 * config.in: Regenerate.
8172 * configure: Likewise.
8173
8174 2012-03-29 Pedro Alves <palves@redhat.com>
8175
8176 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8177 Correct ptrace arguments.
8178
8179 2012-03-28 Pedro Alves <palves@redhat.com>
8180
8181 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8182 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8183 (IA64_FR1_REGNUM): New defines.
8184 (ia64_fetch_register): New.
8185 (the_low_target): Install it.
8186 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8187 field.
8188 * linux-low.c (linux_fetch_registers): Try the
8189 the_low_target.fetch_register hook first.
8190
8191 * linux-arm-low.c (the_low_target): Adjust.
8192 * linux-bfin-low.c (the_low_target): Adjust.
8193 * linux-cris-low.c (the_low_target): Adjust.
8194 * linux-crisv32-low.c (the_low_target): Adjust.
8195 * linux-m32r-low.c (the_low_target): Adjust.
8196 * linux-m68k-low.c (the_low_target): Adjust.
8197 * linux-mips-low.c (the_low_target): Adjust.
8198 * linux-ppc-low.c (the_low_target): Adjust.
8199 * linux-s390-low.c (the_low_target): Adjust.
8200 * linux-sh-low.c (the_low_target): Adjust.
8201 * linux-sparc-low.c (the_low_target): Adjust.
8202 * linux-tic6x-low.c (the_low_target): Adjust.
8203 * linux-x86-low.c (the_low_target): Adjust.
8204 * linux-xtensa-low.c (the_low_target): Adjust.
8205
8206 2012-03-26 Pedro Alves <palves@redhat.com>
8207
8208 * server.c (handle_qxfer_libraries): Don't bail early if
8209 the_target->qxfer_libraries_svr4 is not NULL.
8210
8211 2012-03-26 Pedro Alves <palves@redhat.com>
8212
8213 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8214
8215 2012-03-23 Pedro Alves <palves@redhat.com>
8216
8217 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8218 "library-list-svr4" element's start tag when the the DSO list is
8219 empty.
8220
8221 2012-03-23 Pedro Alves <palves@redhat.com>
8222
8223 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8224 a variable whose type size is the same as the inferior's pointer
8225 size.
8226
8227 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8228
8229 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8230 struct siginfo.
8231 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8232 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8233 * linux-low.h: Include <signal.h>.
8234 (struct siginfo): Remove forward declaration.
8235 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8236 struct siginfo.
8237
8238 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8239
8240 * .gitignore: Ignore more files.
8241
8242 2012-03-19 Pedro Alves <palves@redhat.com>
8243 Jan Kratochvil <jan.kratochvil@redhat.com>
8244
8245 * server.c (cont_thread, general_thread): Add describing comments.
8246 (start_inferior): Clear `cont_thread'.
8247 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8248 of a process.
8249
8250 2012-03-15 Yao Qi <yao@codesourcery.com>
8251
8252 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8253 handling to ...
8254 (cmd_qtdp): ... here.
8255
8256 2012-03-15 Yao Qi <yao@codesourcery.com>
8257
8258 * tracepoint.c (struct tracepoint_action_ops): New.
8259 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8260 (m_tracepoint_action_download): New.
8261 (r_tracepoint_action_download): New.
8262 (x_tracepoint_action_download): New.
8263 (l_tracepoint_action_download): New.
8264 (add_tracepoint_action): Install `action->ops' according type.
8265 (download_tracepoint_1): Move code `download' function pointer
8266 of various tracepoint_action_ops.
8267
8268 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8269
8270 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8271 linux_ptrace_attach_warnings.
8272
8273 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8274
8275 * Makefile.in (linux-ptrace.o): New.
8276 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8277 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8278 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8279 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8280 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8281 of these targets.
8282 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8283
8284 2012-03-08 Yao Qi <yao@codesourcery.com>
8285 Pedro Alves <palves@redhat.com>
8286
8287 Fix PR server/13392.
8288 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8289 offset of JMP insn.
8290 * tracepoint.c (remove_tracepoint): New.
8291 (cmd_qtdp): Call remove_tracepoint when failed to install.
8292
8293 2012-03-07 Pedro Alves <palves@redhat.com>
8294
8295 * linux-low.c (get_detach_signal): New.
8296 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8297 Pass on pending signals to PTRACE_DETACH. Check the result of the
8298 ptrace call.
8299 * server.c (program_signals, program_signals_p): New.
8300 (handle_general_set): Handle QProgramSignals.
8301 * server.h (program_signals, program_signals_p): Declare.
8302
8303 2012-03-05 Pedro Alves <palves@redhat.com>
8304 Jan Kratochvil <jan.kratochvil@redhat.com>
8305
8306 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8307 New comment why.
8308
8309 2012-03-03 Yao Qi <yao@codesourcery.com>
8310
8311 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8312 agent_look_up_symbols.
8313
8314 2012-03-03 Yao Qi <yao@codesourcery.com>
8315
8316 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8317 (linux-x86-low.o): Likewise.
8318 * server.h: Remove in_process_agent_loaded.
8319 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8320 common/agent.c.
8321 Update callers.
8322
8323 2012-03-03 Yao Qi <yao@codesourcery.com>
8324
8325 * tracepoint.c (gdb_agent_capability): New global.
8326 (in_process_agent_loaded_ust): Renamed to
8327 `in_process_agent_supports_ust'.
8328 Update callers.
8329 (in_process_agent_supports_ust): Call agent_capability_check.
8330 (clear_installed_tracepoints): Assert that agent supports
8331 agent.
8332
8333 2012-03-03 Yao Qi <yao@codesourcery.com>
8334
8335 * linux-low.c (linux_supports_agent): New.
8336 (linux_target_ops): Initialize field `supports_agent' with
8337 linux_supports_agent.
8338 * target.h (struct target_ops) <supports_agent>: New.
8339 (target_supports_agent): New macro.
8340 * server.c (handle_general_set): Handle packet 'QAgent'.
8341 (handle_query): Send `QAgent+'.
8342 * Makefile.in (server.o): Depends on agent.h.
8343
8344 2012-03-03 Yao Qi <yao@codesourcery.com>
8345
8346 * Makefile.in (OBS): Add agent.o.
8347 Add new rule for agent.o.
8348 Track dependence of tracepoint.c on agent.h.
8349 * tracepoint.c (run_inferior_command_1):
8350 (run_inferior_command): Call agent_run_command.
8351 (gdb_ust_connect_sync_socket): Deleted. Move it to
8352 common/agent.c.
8353 (resume_thread, stop_thread): Likewise.
8354 (gdb_ust_socket_init): Renamed to ...
8355 (gdb_agent_socket_init): ... New.
8356 (gdb_ust_thread): Renamed to ...
8357 (gdb_agent_helper_thread): ... New.
8358 (gdb_ust_init): Move some code to ...
8359 (gdb_agent_init): ... here. New.
8360 [HAVE_UST]: Call gdb_ust_init.
8361 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8362 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8363 * config.in, configure: Regenerated.
8364
8365 2012-03-02 Pedro Alves <palves@redhat.com>
8366
8367 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8368 * linux-low.c (struct simple_pid_list): New.
8369 (stopped_pids): New a struct simple_pid_list pointer.
8370 (add_to_pid_list, pull_pid_from_list): New.
8371 (handle_extended_wait): Don't assume the first signal new children
8372 report is SIGSTOP. Adjust call to pull_pid_from_list.
8373 (linux_wait_for_lwp): Adjust.
8374
8375 2012-03-02 Yao Qi <yao@codesourcery.com>
8376
8377 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8378 debug log.
8379
8380 2012-03-02 Yao Qi <yao@codesourcery.com>
8381
8382 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8383 `stop_pc' and `tpoint'. Update caller.
8384
8385 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8386
8387 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8388 * linux-low.c (use_linux_regsets): New macro.
8389 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8390 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8391 (linux_register_in_regsets): New function.
8392 (usr_fetch_inferior_registers): Skip registers covered by
8393 regsets.
8394 (usr_store_inferior_registers): Likewise.
8395 (usr_fetch_inferior_registers): New macro.
8396 (usr_store_inferior_registers): Likewise.
8397 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8398 (linux_store_registers): Likewise.
8399 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8400 prototype.
8401 (init_registers_mips64_dsp_linux): Likewise.
8402 (init_registers_mips_linux): New macro.
8403 (init_registers_mips_dsp_linux): Likewise.
8404 (mips_dsp_num_regs): Likewise.
8405 (DSP_BASE, DSP_CONTROL): New fallback macros.
8406 (mips_base_regs): New macro.
8407 (mips_regmap): Use it. Fix the size.
8408 (mips_dsp_regmap): New variable.
8409 (mips_dsp_regset_bitmap): Likewise.
8410 (mips_arch_setup): New function.
8411 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8412 than mips_regmap.
8413 (mips_cannot_store_register): Likewise.
8414 (the_low_target): Update .arch_setup, .num_regs and .regmap
8415 initializers. Add .regset_bitmap initializer.
8416 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8417 initializer.
8418 * linux-bfin-low.c (the_low_target): Likewise.
8419 * linux-cris-low.c (the_low_target): Likewise.
8420 * linux-crisv32-low.c (the_low_target): Likewise.
8421 * linux-ia64-low.c (the_low_target): Likewise.
8422 * linux-m32r-low.c (the_low_target): Likewise.
8423 * linux-m68k-low.c (the_low_target): Likewise.
8424 * linux-ppc-low.c (the_low_target): Likewise.
8425 * linux-s390-low.c (the_low_target): Likewise.
8426 * linux-sh-low.c (the_low_target): Likewise.
8427 * linux-sparc-low.c (the_low_target): Likewise.
8428 * linux-tic6x-low.c (the_low_target): Likewise.
8429 * linux-x86-low.c (the_low_target): Likewise.
8430 * linux-xtensa-low.c (the_low_target): Likewise.
8431 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8432 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8433 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8434 srv_xmlfiles.
8435 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8436 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8437
8438 2012-02-29 Yao Qi <yao@codesourcery.com>
8439 Pedro Alves <palves@redhat.com>
8440
8441 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8442 `step_over_finished' is true.
8443
8444 2012-02-27 Pedro Alves <palves@redhat.com>
8445
8446 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8447 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8448
8449 2012-02-27 Pedro Alves <palves@redhat.com>
8450
8451 PR server/9684
8452 * linux-low.c (pid_is_stopped): New.
8453 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8454
8455 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8456
8457 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8458 of conditions.
8459
8460 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8461
8462 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8463
8464 2012-02-24 Luis Machado <lgustavo@codesourcery>
8465
8466 * server.c (handle_query): Advertise support for target-side
8467 breakpoint condition evaluation.
8468 (process_point_options): New function.
8469 (process_serial_event): When inserting a breakpoint, check for
8470 a target-side condition that should be evaluated.
8471
8472 * mem-break.c: Include regcache.h and ax.h.
8473 (point_cond_list_t): New data structure.
8474 (breakpoint) <cond_list>: New field.
8475 (find_gdb_breakpoint_at): Make non-static.
8476 (delete_gdb_breakpoint_at): Clear any target-side
8477 conditions.
8478 (clear_gdb_breakpoint_conditions): New function.
8479 (add_condition_to_breakpoint): Likewise.
8480 (add_breakpoint_condition): Likewise.
8481 (gdb_condition_true_at_breakpoint): Likewise.
8482 (gdb_breakpoint_here): Return result directly instead
8483 of going through a local variable.
8484
8485 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8486 (clear_gdb_breakpoint_conditions): Likewise.
8487 (add_breakpoint_condition): Likewise.
8488 (gdb_condition_true_at_breakpoint): Likewise.
8489
8490 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8491 (need_step_over_p): Take target-side breakpoint condition into
8492 consideration.
8493
8494 2012-02-24 Luis Machado <lgustavo@codesourcery>
8495
8496 * server.h: Include tracepoint.h.
8497 (agent_mem_read, agent_get_trace_state_variable_value,
8498 agent_set_trace_state_variable_value,
8499 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8500 get_set_tsv_func_addr): New prototypes.
8501
8502 * ax.h: New include file.
8503 * ax.c: New source file.
8504
8505 * tracepoint.c: Include ax.h.
8506 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8507 agent_expr, eval_result_type): Move to ax.h.
8508 (parse_agent_expr): Rename to ...
8509 (gdb_parse_agent_expr): ... this, make it non-static and move
8510 to ax.h.
8511 (unparse_agent_expr) Rename to ...
8512 (gdb_unparse_agent_expr): ... this, make it non-static and move
8513 to ax.h.
8514 (eval_agent_expr): Rename to ...
8515 (eval_tracepoint_agent_expr): ... this.
8516 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8517 forward declarations.
8518 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8519 (agent_get_trace_state_variable_value): New function.
8520 (agent_set_trace_state_variable_value): New function.
8521 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8522 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8523 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8524 (condition_true_at_tracepoint): Likewise.
8525 (parse_agent_expr): Rename to ...
8526 (gdb_parse_agent_expr): ... this and move to ax.c.
8527 (unparse_agent_expr): Rename to ...
8528 (gdb_unparse_agent_expr): ... this and move to ax.c.
8529 (gdb_agent_op_name): Move to ax.c.
8530 (eval_agent_expr): Rename to ...
8531 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8532 and move to ax.c.
8533 (eval_tracepoint_agent_expr): New function.
8534 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8535 non-static.
8536 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8537 ax.c.
8538 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8539 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8540 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8541 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8542 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8543 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8544 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8545 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8546 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8547 (compile_bytecodes): Remove forward declaration.
8548 (is_goto_target): Move to ax.c.
8549 (compile_bytecodes): Move to ax.c and call
8550 agent_get_trace_state_variable_value (...) and
8551 agent_set_trace_state_variable_value (...).
8552
8553 * Makefile.in: Update ax.c and IPA dependencies.
8554
8555 2012-02-24 Pedro Alves <palves@redhat.com>
8556
8557 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8558 (cmd_bigqtbuffer_circular): ... this. Only handle
8559 'QTBuffer:circular:'.
8560 (handle_tracepoint_general_set): Adjust.
8561
8562 2012-02-16 Yao Qi <yao@codesourcery.com>
8563
8564 * inferiors.c: Move code to ...
8565 * dll.c: .... here. New.
8566 * server.h: Declare clear_dlls.
8567 * Makefile.in (SFILES): Add dll.c.
8568 (OBS): Add dll.o
8569 (dll.o): New rule.
8570
8571 2012-02-11 Yao Qi <yao@codesourcery.com>
8572
8573 * server.c: (handle_monitor_command): Add a new parameter
8574 `own_buf'.
8575 (handle_query): Update caller.
8576
8577 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8578
8579 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8580 * configure, config.in: Regenerate.
8581 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8582 is not defined.
8583
8584 2012-02-02 Pedro Alves <palves@redhat.com>
8585
8586 Try SIGKILL first, then PTRACE_KILL.
8587 * linux-low.c (linux_kill_one_lwp): New.
8588 (linux_kill_one_lwp): Rename to ...
8589 (kill_one_lwp_callback): ... this. Use the new
8590 linux_kill_one_lwp.
8591
8592 2012-02-02 Pedro Alves <palves@redhat.com>
8593
8594 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8595 inferior.
8596
8597 2012-01-27 Pedro Alves <palves@redhat.com>
8598
8599 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8600 (elf_64_file_p): Make static.
8601 (linux_pid_exe_is_elf_64_file): New.
8602 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8603 Delete declarations.
8604 (linux_pid_exe_is_elf_64_file): Declare.
8605 * linux-x86-low.c (x86_arch_setup): Use
8606 linux_pid_exe_is_elf_64_file.
8607
8608 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8609
8610 * linux-low.c (linux_wait_for_event_1): Rename to ...
8611 (linux_wait_for_event): ... here and merge it with former
8612 linux_wait_for_event - new variable wait_ptid, use it.
8613 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8614
8615 2012-01-23 Pedro Alves <palves@redhat.com>
8616
8617 * server.c (main): Avoid yet another case of infinite loop while
8618 detaching/killing after a longjmp.
8619
8620 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8621
8622 Code cleanup.
8623 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8624
8625 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8626
8627 * hostio.c (handle_readlink): New function.
8628 (handle_vFile): Call it to handle "vFile:readlink" packets.
8629
8630 2012-01-20 Pedro Alves <palves@redhat.com>
8631 Ulrich Weigand <ulrich.weigand@linaro.org>
8632
8633 * server.c (handle_v_requests): Only support vAttach and vRun to
8634 start multiple processes when in extended protocol mode.
8635
8636 2012-01-17 Pedro Alves <palves@redhat.com>
8637
8638 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8639 memalign plus mprotect to allocate the scratch buffer.
8640
8641 2012-01-13 Pedro Alves <palves@redhat.com>
8642
8643 * server.c (attach_inferior): Clear `cont_thread'.
8644
8645 2012-01-13 Pedro Alves <palves@redhat.com>
8646
8647 * server.c (main): Avoid infinite loop while detaching/killing
8648 after a longjmp.
8649
8650 2012-01-09 Doug Evans <dje@google.com>
8651
8652 * server.c (start_inferior): Set last_ptid in --wrapper case.
8653
8654 2012-01-06 Yao Qi <yao@codesourcery.com>
8655
8656 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8657 defined.
8658 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8659
8660 2012-01-04 Yao Qi <yao@codesourcery.com>
8661
8662 * tracepoint.c (cmd_qtdp): Print debug message
8663 for static tracepoint.
8664
8665 2012-01-04 Yao Qi <yao@codesourcery.com>
8666
8667 * tracepoint.c (trace_vdebug): Differentiate debug message
8668 between gdbserver and IPA.
8669
8670 2012-01-03 Yao Qi <yao@codesourcery.com>
8671
8672 * tracepoint.c (tracepoint_was_hit): Don't collect for
8673 static tracepoint.
8674
8675 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8676
8677 * terminal.h: Reformat copyright header.
8678
8679 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8680
8681 * server.c (gdbserver_version): Update copyright year.
8682 * gdbreplay.c (gdbreplay_version): Likewise.
8683
8684 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8685
8686 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8687
8688 Revert:
8689 2011-12-18 Hui Zhu <teawater@gmail.com>
8690 * linux-low.c (linux_create_inferior): Save return value to ret.
8691
8692 2011-12-18 Hui Zhu <teawater@gmail.com>
8693
8694 * linux-low.c (linux_create_inferior): Save return value to ret.
8695
8696 2011-12-16 Doug Evans <dje@google.com>
8697
8698 * linux-low.c (linux_create_inferior): If stdio connection,
8699 redirect stdin from /dev/null, stdout to stderr.
8700 * remote-utils.c (remote_is_stdio): New static global.
8701 (remote_connection_is_stdio): New function.
8702 (remote_prepare): Handle stdio connection.
8703 (remote_open): Ditto.
8704 (remote_close): Don't close stdin for stdio connections.
8705 (read_prim,write_prim): New functions. Replace all calls to
8706 read/write to these.
8707 * server.c (main): Watch for "-" argument. Move call to
8708 remote_prepare before start_inferior.
8709 * server.h (STDIO_CONNECTION_NAME): New macro.
8710 (remote_connection_is_stdio): Declare.
8711
8712 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8713 in debugging output.
8714
8715 2011-12-15 Yao Qi <yao@codesourcery.com>
8716
8717 * tracepoint.c: Include sys/syscall.h.
8718 (gdb_ust_thread): Remove preprocessor conditional.
8719
8720 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8721
8722 * linux-low.c (linux_detach_one_lwp): Call
8723 the_low_target.prepare_to_resume before detaching.
8724
8725 2011-12-14 Yao Qi <yao@codesourcery.com>
8726
8727 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8728 of write.
8729
8730 2011-12-14 Yao Qi <yao@codesourcery.com>
8731
8732 * i386-low.c (i386_low_stopped_data_address): Initialize local
8733 variable `control'.
8734
8735 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8736
8737 PR remote/13492
8738
8739 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8740 DR_CONTROL unless necessary. Extend comments.
8741 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8742 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8743
8744 2011-12-13 Yao Qi <yao@codesourcery.com>
8745
8746 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8747 macros.
8748 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8749
8750 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8751
8752 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8753 Print new debug message for such case.
8754
8755 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8756
8757 Fix overlapping memcpy.
8758 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8759 the read_inferior_memory transfer.
8760 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8761 write_inferior_memory transfer.
8762 (set_fast_tracepoint_jump): New variable buf. Use it for the
8763 read_inferior_memory and write_inferior_memory transfers.
8764 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8765 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8766 Use it for the write_inferior_memory transfer.
8767 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8768 buffers.
8769
8770 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8771
8772 * linux-low.c (fetch_register, store_register): Make code
8773 consistent, fix formatting.
8774
8775 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8776
8777 * linux-low.c (usr_store_inferior_registers): Factor out code
8778 to handle individual registers into...
8779 (store_register): ... this new function.
8780
8781 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8782
8783 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8784 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8785 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8786 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8787 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8788 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8789 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8790 (srv_xmlfiles): Add new XML files.
8791
8792 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8793 and <sys/uio.h>.
8794 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8795 (init_registers_s390_linux32v1): Add prototype.
8796 (init_registers_s390_linux32v2): Likewise.
8797 (init_registers_s390_linux64v1): Likewise.
8798 (init_registers_s390_linux64v2): Likewise.
8799 (init_registers_s390x_linux64v1): Likewise.
8800 (init_registers_s390x_linux64v2): Likewise.
8801 (s390_num_regs): Increment to 52.
8802 (s390_regmap): Add orig_r2 register.
8803 (s390_num_regs_3264): Increment to 68.
8804 (s390_regmap_3264): Add orig_r2 register.
8805 (s390_collect_ptrace_register): Handle orig_r2 register.
8806 (s390_supply_ptrace_register): Likewise.
8807 (s390_fill_last_break): New function.
8808 (s390_store_last_break): Likewise.
8809 (s390_fill_system_call): New function.
8810 (s390_store_system_call): Likewise.
8811 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8812 register sets.
8813 (s390_check_regset): New function.
8814 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8815 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8816 Update target_regsets for available register sets.
8817
8818 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8819 Jan Kratochvil <jan.kratochvil@redhat.com>
8820
8821 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8822 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8823 New.
8824 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8825 * linux-low.h (struct process_info_private): New member r_debug.
8826 * server.c (handle_qxfer_libraries): Call
8827 the_target->qxfer_libraries_svr4.
8828 (handle_qxfer_libraries_svr4): New function.
8829 (qxfer_packets): New entry "libraries-svr4".
8830 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8831 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8832 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8833 PACKET_qXfer_libraries_svr4.
8834
8835 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8836
8837 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8838 PSW address/mask between 8-byte and 16-byte formats.
8839 (s390_supply_ptrace_register): Likewise.
8840 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8841 basic addressing mode bit.
8842
8843 2011-11-24 Stan Shebs <stan@codesourcery.com>
8844
8845 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8846
8847 2011-11-17 Stan Shebs <stan@codesourcery.com>
8848
8849 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8850 (tracing_start_time): New global.
8851 (tracing_stop_time): New global.
8852 (tracing_user_name): New global.
8853 (tracing_notes): New global.
8854 (tracing_stop_note): New global.
8855 (cmd_qtstart): Set traceframe_usage, start_time.
8856 (stop_tracing): Set stop_time.
8857 (cmd_qtstatus): Report additional status.
8858 (cmd_qtp): New function.
8859 (handle_tracepoint_query): Call it.
8860 (cmd_qtnotes): New function.
8861 (handle_tracepoint_general_set): Call it.
8862 (get_timestamp): Rename from tsv_get_timestamp.
8863
8864 2011-11-14 Stan Shebs <stan@codesourcery.com>
8865 Kwok Cheung Yeung <kcy@codesourcery.com>
8866
8867 * linux-x86-low.c (small_jump_insn): New.
8868 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8869 trampoline and error message, build a trampoline and issue a small
8870 jump instruction to it.
8871 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8872 trampoline and error message.
8873 (x86_get_min_fast_tracepoint_insn_len): New.
8874 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8875 * linux-low.h (struct linux_target_ops): Add arguments to
8876 install_fast_tracepoint_jump_pad operation, add new operation.
8877 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8878 arguments.
8879 (linux_get_min_fast_tracepoint_insn_len): New function.
8880 (linux_target_op): Add new operation.
8881 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8882 (gdb_trampoline_buffer_end): Ditto.
8883 (gdb_trampoline_buffer_error): Ditto.
8884 (struct ipa_sym_addresses): Add fields for new IPA variables.
8885 (symbol_list): Add entries for new IPA variables.
8886 (struct tracepoint): Add fields to hold the address range of the
8887 trampoline used by the tracepoint.
8888 (trampoline_buffer_head): New static variable.
8889 (trampoline_buffer_tail): Ditto.
8890 (claim_trampoline_space): New function.
8891 (have_fast_tracepoint_trampoline_buffer): New function.
8892 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8893 structure.
8894 (install_fast_tracepoint): Ditto, also add error buffer argument.
8895 (cmd_qtminftpilen): New function.
8896 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8897 (fast_tracepoint_from_trampoline_address): New function.
8898 (fast_tracepoint_collecting): Handle trampoline as part of jump
8899 pad space.
8900 (set_trampoline_buffer_space): New function.
8901 (initialize_tracepoint): Initialize new IPA variables.
8902 * target.h (struct target_ops): Add arguments to
8903 install_fast_tracepoint_jump_pad operation, add new
8904 get_min_fast_tracepoint_insn_len operation.
8905 (target_get_min_fast_tracepoint_insn_len): New.
8906 (install_fast_tracepoint_jump_pad): Add arguments.
8907 * server.h (IPA_BUFSIZ): Define.
8908 * linux-i386-ipa.c: Include extra header files.
8909 (initialize_fast_tracepoint_trampoline_buffer): New function.
8910 (initialize_low_tracepoint): Call it.
8911 * server.h (set_trampoline_buffer_space): Declare.
8912 (claim_trampoline_space): Ditto.
8913 (have_fast_tracepoint_trampoline_buffer): Ditto.
8914
8915 2011-11-14 Yao Qi <yao@codesourcery.com>
8916
8917 * server.c (handle_query): Handle InstallInTrace for qSupported.
8918 * tracepoint.c (add_tracepoint): Sort list.
8919 (install_tracepoint, download_tracepoint): New.
8920 (cmd_qtdp): Call them to install and download tracepoints.
8921 (sort_tracepoints): Removed.
8922 (cmd_qtstart): Update.
8923
8924 2011-11-14 Yao Qi <yao@codesourcery.com>
8925
8926 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8927 * mem-break.h: Declare.
8928 * tracepoint.c (cmd_qtstart): Move some code to ...
8929 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8930 New.
8931 (download_tracepoints): Move some code to ...
8932 (download_tracepoint_1): ... here. New.
8933
8934 2011-11-08 Yao Qi <yao@codesourcery.com>
8935
8936 * remote-utils.c (relocate_instruction): A comment fix.
8937
8938 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8939
8940 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8941 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8942 dr_status_mirror and dr_control_mirror from debug_reg_state.
8943 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8944 (i386_initial_stuff): Remove use of deleted globals.
8945 (i386_get_thread_context, i386_set_thread_context,
8946 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8947 from debug_reg_state.
8948
8949 2011-11-05 Yao Qi <yao@codesourcery.com>
8950
8951 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8952 address as TPOINT's.
8953
8954 2011-11-02 Stan Shebs <stan@codesourcery.com>
8955
8956 * tracepoint.c (agent_mem_read_string): New function.
8957 (eval_agent_expr): Call it for tracenz.
8958 * server.c (handle_query): Report support for tracenz.
8959
8960 2011-11-02 Yao Qi <yao@codesourcery.com>
8961
8962 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8963
8964 2011-11-02 Yao Qi <yao@codesourcery.com>
8965
8966 * target.h: Fix a typo in comment.
8967
8968 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8969
8970 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8971 clobber the breakpoints' shadows with fast tracepoint jumps.
8972 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8973 * target.c (write_inferior_memory): Also pass MYADDR down to
8974 check_mem_write.
8975
8976 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8977
8978 * configure.ac: Check support for personality routine.
8979 * configure: Regenerate.
8980 * config.in: Likewise.
8981 * linux-low.c: Include <sys/personality.h>.
8982 Define ADDR_NO_RANDOMIZE if necessary.
8983 (linux_create_inferior): Disable address space randomization when
8984 forking inferior, if requested.
8985 (linux_supports_disable_randomization): New function.
8986 (linux_target_ops): Install it.
8987 * server.h (disable_randomization): Declare.
8988 * server.c (disable_randomization): New global variable.
8989 (handle_general_set): Handle QDisableRandomization.
8990 (handle_query): Likewise for qSupported.
8991 (main): Support --disable-randomization and --no-disable-randomization
8992 command line arguments.
8993 * target.h (struct target_ops): Add supports_disable_randomization.
8994 (target_supports_disable_randomization): New macro.
8995
8996 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8997
8998 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8999 ifdef check.
9000 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9001 [!PT_GETDSBT] (target_loadmap): New definition.
9002 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9003 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9004 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9005 and PT_GETDSBT to LINUX_LOADMAP.
9006 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9007 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9008
9009 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9010
9011 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9012 (arm_linux_hwbp_cap): New static variable.
9013 (arm_linux_get_hwbp_cap): Replace by ...
9014 (arm_linux_init_hwbp_cap): ... this new function.
9015 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9016 (arm_linux_get_hw_watchpoint_count): Likewise.
9017 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9018 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9019 (arm_prepare_to_resume): Use perror_with_name instead of error.
9020
9021 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9022
9023 * linux-arm-low.c: Include <signal.h>.
9024 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9025 (struct arm_linux_hwbp_cap): New data type.
9026 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9027 (struct arm_linux_hw_breakpoint): New data type.
9028 (MAX_BPTS, MAX_WPTS): Define.
9029 (struct arch_process_info, struct arch_lwp_info): New data types.
9030 (arm_linux_get_hwbp_cap): New function.
9031 (arm_linux_get_hw_breakpoint_count): Likewise.
9032 (arm_linux_get_hw_watchpoint_count): Likewise.
9033 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9034 (arm_hwbp_control_initialize): Likewise.
9035 (arm_hwbp_control_is_enabled): Likewise.
9036 (arm_hwbp_control_is_initialized): Likewise.
9037 (arm_hwbp_control_disable): Likewise.
9038 (arm_linux_hw_breakpoint_equal): Likewise.
9039 (arm_linux_hw_point_initialize): Likewise.
9040 (struct update_registers_data): New data structure.
9041 (update_registers_callback: New function.
9042 (arm_insert_point): Likewise.
9043 (arm_remove_point): Likewise.
9044 (arm_stopped_by_watchpoint): Likewise.
9045 (arm_stopped_data_address): Likewise.
9046 (arm_new_process): Likewise.
9047 (arm_new_thread): Likewise.
9048 (arm_prepare_to_resume): Likewise.
9049 (the_low_target): Register arm_insert_point, arm_remove_point,
9050 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9051 arm_new_thread, and arm_prepare_to_resume.
9052
9053 2011-09-15 Stan Shebs <stan@codesourcery.com>
9054
9055 * server.h (struct emit_ops): Add compare-goto fields.
9056 * tracepoint.c (gdb_agent_op_sizes): New table.
9057 (emit_eq_goto): New function.
9058 (emit_ne_goto): New function.
9059 (emit_lt_goto): New function.
9060 (emit_le_goto): New function.
9061 (emit_gt_goto): New function.
9062 (emit_ge_goto): New function.
9063 (is_goto_target): New function.
9064 (compile_bytecodes): Recognize special cases of compare-goto
9065 combinations and call specialized emitters for them.
9066 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9067 (amd64_emit_ne_goto): New function.
9068 (amd64_emit_lt_goto): New function.
9069 (amd64_emit_le_goto): New function.
9070 (amd64_emit_gt_goto): New function.
9071 (amd64_emit_ge_goto): New function.
9072 (amd64_emit_ops): Add the new functions.
9073 (i386_emit_eq_goto): New function.
9074 (i386_emit_ne_goto): New function.
9075 (i386_emit_lt_goto): New function.
9076 (i386_emit_le_goto): New function.
9077 (i386_emit_gt_goto): New function.
9078 (i386_emit_ge_goto): New function.
9079 (i386_emit_ops): Add the new functions.
9080
9081 2011-09-08 Stan Shebs <stan@codesourcery.com>
9082
9083 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9084 (i386_emit_epilogue): Restore %ebx.
9085
9086 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9087
9088 * server.c (step_thread): Remove definition.
9089 (process_serial_event): Don't handle Hs.
9090 * server.h (step_thread): Remove declaration.
9091 * target.c (set_desired_inferior): Remove use of step_thread.
9092
9093 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9094
9095 * linux-low.c: Include linux-procfs.h.
9096 (linux_attach_lwp_1): Update comments.
9097 (linux_attach): Scan for existing threads when attaching to a
9098 process that is the tgid.
9099 * Makefile.in: Update dependencies.
9100
9101 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9102
9103 * configure.srv: Add linux-procfs.o dependencies.
9104
9105 2011-08-14 Yao Qi <yao@codesourcery.com>
9106
9107 * target.h (struct target_ops): Fix indent.
9108 * win32-low.c (win32_target_ops): Fix comment.
9109
9110 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9111 Yao Qi <yao@codesourcery.com>
9112
9113 * Makefile.in (clean): Remove tic6x-*.c files.
9114 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9115 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9116 (tic6x-c64xp-linux.c): Likewise.
9117 * configure.srv: Add support for tic6x-*-uclinux.
9118 * linux-tic6x-low.c: New.
9119 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9120
9121 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9122 Yao Qi <yao@codesourcery.com>
9123
9124 * target.h (struct target_ops): Add read_loadmap.
9125 * linux-low.c (struct target_loadseg): New type.
9126 (struct target_loadmap): New type.
9127 (linux_read_loadmap): New function.
9128 (linux_target_ops): Add linux_read_loadmap.
9129 * server.c (handle_query): Support qXfer:fdpic:read packet.
9130 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9131 to NULL.
9132
9133 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9134
9135 * win32-low.c: Include <stdint.h>.
9136
9137 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9138
9139 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9140 to the inferior here.
9141 (i386_remove_aligned_watchpoint): Ditto.
9142 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9143 fit part of the watchpoint in the debug registers.
9144 (i386_update_inferior_debug_regs): New.
9145 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9146 registers, and only update the inferior on success.
9147 (i386_low_remove_watchpoint): Ditto.
9148
9149 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9150
9151 * linux-low.c (compare_ints, unique, list_threads, show_process,
9152 linux_core_of_thread): Delete.
9153 (linux_target_ops): Change linux_core_of_thread to
9154 linux_common_core_of_thread.
9155 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9156 * utils.c (malloc_failure): Change type of argument.
9157 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9158 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9159 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9160 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9161 (IPA_OBJS): Add common-utils-ipa.o.
9162 (ptid_h, linux_osdata_h): New macros.
9163 (server_h): Add common/common-utils.h, common/xml-utils.h,
9164 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9165 common/ptid.h.
9166 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9167 ptid.o, buffer.o): New rules.
9168 (linux-low.o): Add common/linux-osdata.h as a dependency.
9169 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9170 * configure.ac: Add AC_HEADER_DIRENT check.
9171 * config.in: Regenerate.
9172 * configure: Regenerate.
9173 * remote-utils.c (xml_escape_text): Delete.
9174 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9175 buffer_xml_printf): Move to common/buffer.c.
9176 * server.c (main): Remove call to initialize_inferiors.
9177 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9178 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9179 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9180 internal_error, gdb_assert, gdb_assert_fail): Delete.
9181 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9182 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9183 common/buffer.h.
9184 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9185 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9186 initialize_inferiors): Delete.
9187
9188 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9189
9190 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9191 symbol error.
9192
9193 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9194
9195 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9196 assertion.
9197 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9198
9199 2011-05-26 Yao Qi <yao@codesourcery.com>
9200
9201 * Makefile.in (thread-db.o): Track dependence to
9202 common/gdb_thread_db.h.
9203 * thread-db.c: include gdb_thread_db.h from right place.
9204
9205 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9206
9207 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9208 __FILE__ and __LINE__ to internal_error.
9209
9210 2011-05-13 Doug Evans <dje@google.com>
9211
9212 * thread-db.c (try_thread_db_load_from_sdir): New function.
9213 (try_thread_db_load_from_dir): New function.
9214 (thread_db_load_search): Handle $sdir, ignore $pdir.
9215 Remove trying of system directories if search of
9216 libthread-db-search-path fails, that is now done via $sdir.
9217
9218 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9219
9220 * server.c (handle_query): Add EnableDisableTracepoints to the list
9221 of supported features.
9222 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9223 tracepoints.
9224 (cmd_qtenable_disable): New.
9225 (cmd_qtstart): Install tracepoints even if disabled.
9226 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9227 receiving a QTEnable or QTDisable packet.
9228 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9229 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9230 tracepoints.
9231 (gdb_probe): Skip data collection if static tracepoint is disabled.
9232
9233 2011-05-10 Doug Evans <dje@google.com>
9234
9235 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9236
9237 2011-05-04 Doug Evans <dje@google.com>
9238
9239 * linux-low.c (linux_join): Skip process lookup.
9240 * spu-low.c (spu_join): Ditto.
9241 * server.c (join_inferiors_callback): Delete.
9242 (process_serial_event): For 'D' packet (detach) call join_inferior
9243 directly.
9244
9245 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9246
9247 * README: Don't mention xscale*-*-linux*.
9248 * configure.srv (xscale*-*-linux*): Don't handle target.
9249
9250 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9251
9252 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9253 casting pointers.
9254 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9255 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9256 (i386_emit_void_call_2): Likewise.
9257
9258 2011-04-26 Yao Qi <yao@codesourcery.com>
9259
9260 * linux-low.c: Move common macros to linux-ptrace.h.
9261 Include linux-ptrace.h.
9262 * Makefile.in (linux_ptrace_h): New.
9263 (linux-low.o): Depends on linux-ptrace.h.
9264
9265 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9266
9267 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9268 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9269 (remote_prepare): New function with most of the TCP code from ...
9270 (remote_open): ... here. Detect PORT here unconditionally. Move also
9271 setting transport_is_reliable.
9272 * server.c (run_once): New variable.
9273 (gdbserver_usage): Document it.
9274 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9275 the first run if RUN_ONCE.
9276 * server.h (run_once, remote_prepare): New declarations.
9277
9278 2011-04-19 Tom Tromey <tromey@redhat.com>
9279
9280 * win32-low.c (handle_load_dll): Remove duplicate "the".
9281
9282 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9283
9284 Remove support for old Cygwin 1.5 versions.
9285 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9286 function to avoid warning.
9287 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9288 warning.
9289
9290 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9291
9292 * gdbserver/server.h (Macro _): Define it if not available.
9293
9294 2011-03-14 Michael Snyder <msnyder@vmware.com>
9295
9296 * hostio.c (handle_close): Remove unnecessary null test.
9297
9298 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9299
9300 * Makefile.in (maintainer-clean realclean distclean): Remove
9301 "make ... subdir_do" command.
9302
9303 2011-03-10 Michael Snyder <msnyder@vmware.com>
9304
9305 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9306
9307 * server.c (handle_v_run): Free alloced buffer on early return.
9308
9309 2011-03-09 Yao Qi <yao@codesourcery.com>
9310
9311 Revert:
9312 2011-03-04 Yao Qi <yao@codesourcery.com>
9313
9314 * Makefile.in: Remove GNU make feature --directory.
9315
9316 2011-03-05 Yao Qi <yao@codesourcery.com>
9317
9318 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9319 (subdir_do): New make target. Copied from gdb/Makefile.
9320 (maintainer-clean, realclean, distclean, clean): Call corresponding
9321 make targets in common/Makefile.
9322
9323 2011-02-11 Yao Qi <yao@codesourcery.com>
9324
9325 * configure.ac: Call AC_PROG_RANLIB.
9326 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9327 * configure: Regenerate.
9328
9329 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9330
9331 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9332
9333 2011-03-06 Yao Qi <yao@codesourcery.com>
9334
9335 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9336
9337 2011-03-05 Yao Qi <yao@codesourcery.com>
9338
9339 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9340 (subdir_do): New make target. Copied from gdb/Makefile.
9341 (maintainer-clean, realclean, distclean, clean): Call corresponding
9342 make targets in common/Makefile.
9343
9344 2011-03-04 Yao Qi <yao@codesourcery.com>
9345
9346 * Makefile.in: Remove GNU make feature --directory.
9347
9348 2011-03-04 Michael Snyder <msnyder@vmware.com>
9349
9350 * server.c (queue_stop_reply): Call xmalloc not malloc.
9351
9352 2011-03-02 Michael Snyder <msnyder@vmware.com>
9353
9354 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9355
9356 2011-02-28 Michael Snyder <msnyder@vmware.com>
9357
9358 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9359 (cmd_qtframe): Ditto.
9360 (cmd_qtbuffer): Ditto.
9361 (cmd_bigqtbuffer): Ditto.
9362
9363 * utils.c (decimal2str): Initialize 'width' to nine, then
9364 don't mess with it.
9365
9366 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9367
9368 * hostio.c (require_data): Free *data, not data.
9369
9370 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9371
9372 * hostio.c (require_data): Use free, not xfree.
9373
9374 2011-02-27 Michael Snyder <msnyder@vmware.com>
9375
9376 * server.c (handle_query): Discard unused value.
9377
9378 * hostio.c (require_data): Free malloc memory before returning
9379 error.
9380
9381 2011-02-26 Michael Snyder <msnyder@vmware.com>
9382
9383 * linux-low.c (list_threads): Call closedir for dirent.
9384
9385 2011-02-27 Michael Snyder <msnyder@vmware.com>
9386
9387 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9388 a case statement falls through.
9389
9390 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9391
9392 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9393 in comparison.
9394
9395 2011-02-26 Michael Snyder <msnyder@vmware.com>
9396
9397 * utils.c (decimal2str): Eliminate dead code and dead param.
9398 (pulongest): Drop dead param from call to decimal2str.
9399 (plongest): Ditto.
9400
9401 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9402
9403 Revert the following patch (not approved yet):
9404 2011-02-21 Hui Zhu <teawater@gmail.com>
9405 * tracepoint.c (tp_printf): New function.
9406 (eval_agent_expr): Handle gdb_agent_op_printf.
9407
9408 2011-02-21 Hui Zhu <teawater@gmail.com>
9409
9410 * tracepoint.c (tp_printf): New function.
9411 (eval_agent_expr): Handle gdb_agent_op_printf.
9412
9413 2011-02-18 Tom Tromey <tromey@redhat.com>
9414
9415 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9416 (tracepoint.o): Likewise.
9417 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9418 (gdb_agent_op_names): Likewise.
9419
9420 2011-02-18 Tom Tromey <tromey@redhat.com>
9421
9422 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9423 gdb_agent_op_rot>: New constants.
9424 (gdb_agent_op_names): Add pick and roll.
9425 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9426 cases.
9427
9428 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9429
9430 * aclocal.m4: Regenerated with aclocal-1.11.1.
9431
9432 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9433
9434 * server.c (handle_qxfer_traceframe_info): New.
9435 (qxfer_packets): Register "traceframe-info".
9436 (handle_query): Report support for qXfer:traceframe-info:read+.
9437 * tracepoint.c (match_blocktype): New.
9438 (traceframe_find_block_type): Rename to ...
9439 (traceframe_walk_blocks): ... this. Add callback filter argument,
9440 and use it.
9441 (traceframe_find_block_type): New, reimplemented on top of
9442 traceframe_walk_blocks.
9443 (build_traceframe_info_xml): New.
9444 (traceframe_read_info): New.
9445 * server.h (traceframe_read_info): Declare.
9446
9447 2011-02-11 Yao Qi <yao@codesourcery.com>
9448
9449 * configure.ac: Call AC_PROG_RANLIB.
9450 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9451 * configure: Regenerate.
9452
9453 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9454
9455 * server.c (gdb_read_memory): Change return semantics to allow
9456 partial transfers.
9457 (handle_search_memory_1): Adjust.
9458 (process_serial_event) <'m' packet>: Handle partial transfers.
9459 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9460
9461 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9462
9463 * regcache.c (init_register_cache): Initialize
9464 regcache->register_status.
9465 (free_register_cache): Release regcache->register_status.
9466 (regcache_cpy): Copy register_status.
9467 (registers_to_string): Print 'x's for unavailable registers.
9468 (supply_register): Mark the register's status valid or
9469 unavailable, depending on whether a buffer was passed in or not.
9470 (supply_register_zeroed): New.
9471 (supply_regblock): Mark the registers' status valid or
9472 unavailable, depending on whether a buffer was passed in or not.
9473 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9474 (struct regcache): New `register_status' field.
9475 (supply_register_zeroed): Declare.
9476 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9477 supply_register_zeroed, rather than passing a NULL buffer to
9478 supply_register.
9479 * tracepoint.c (fetch_traceframe_registers): Update comment.
9480
9481 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9482
9483 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9484 buffer explicit.
9485
9486 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9487
9488 * server.h (decode_xfer_write): Change prototype.
9489 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9490 and don't extract the annex here.
9491 * server.c (decode_xfer_read): Remove `annex' parameter,
9492 and don't extract the annex here.
9493 (decode_xfer): New.
9494 (struct qxfer): New.
9495 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9496 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9497 (handle_qxfer_statictrace): New functions, abstracted out from
9498 handle_query, and made to use the struct qxfer interface.
9499 (handle_threads_qxfer_proper): Rename to ...
9500 (handle_qxfer_threads_proper): ... this.
9501 (handle_threads_qxfer): Rename to ...
9502 (handle_qxfer_threads): ... this. Adjust.
9503 (qxfer_packets): New array.
9504 (handle_qxfer): New function.
9505 (handle_query): Use handle_qxfer.
9506
9507 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9508
9509 * gdbreplay.c: Shorten lines of >= 80 columns.
9510 * linux-low.c: Ditto.
9511 * linux-ppc-low.c: Ditto.
9512 * linux-s390-low.c: Ditto.
9513 * linux-sparc-low.c: Ditto.
9514 * linux-x86-low.c: Ditto.
9515 * linux-xtensa-low.c: Ditto.
9516 * mem-break.c: Ditto.
9517 * nto-low.c: Ditto.
9518 * regcache.h: Ditto.
9519 * remote-utils.c: Ditto.
9520 * server.c: Ditto.
9521 * server.h: Ditto.
9522 * thread-db.c: Ditto.
9523 * tracepoint.c: Ditto.
9524 * utils.c: Ditto.
9525 * win32-low.h: Ditto.
9526
9527 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9528
9529 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9530 update.
9531
9532 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9533
9534 * server.c (gdbserver_version): Update copyright year in version
9535 output.
9536 * gdbreplay.c (gdbreplay_version): Ditto.
9537
9538 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9539
9540 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9541 * linux-bfin-low.c: New file.
9542 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9543 PT_DATA_ADDR for BFIN targets.
9544 * Makefile.in (SFILES): Add linux-bfin-low.c.
9545 (clean): Remove reg-bfin.c.
9546 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9547 * README: Mention supported Blackfin targets.
9548
9549 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9550
9551 * .gitignore: New file.
9552
9553 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9554
9555 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9556
9557 2010-10-22 Jie Zhang <jie@codesourcery.com>
9558
9559 * Makefile.in: Add FLAGS_TO_PASS variable.
9560 (install): Remove dependency of install-only and recursively
9561 invoke make for install-only.
9562
9563 2010-10-04 Doug Evans <dje@google.com>
9564
9565 * Makefile.in (uninstall): Use $(DESTDIR).
9566
9567 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9568
9569 PR gdb/11842
9570
9571 * linux-x86-low.c (compat_siginfo_from_siginfo)
9572 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9573 si_code is < 0. Check for si_code == SI_TIMER before checking for
9574 si_code < 0.
9575
9576 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9577
9578 * lynx-i386-low.c: New file.
9579 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9580
9581 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9582
9583 * lynx-low.c (ptrace_request_to_str): Remove handling for
9584 request values that have been removed in LynxOS 5.x.
9585
9586 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9587
9588 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9589 <ptrace.h>
9590
9591 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9592
9593 * configure.ac: Add --enable-inprocess-agent option.
9594 * configure: Rebuilt.
9595
9596 2010-09-06 Yao Qi <yao@codesourcery.com>
9597
9598 * linux-low.c (linux_kill): Remove unused variable.
9599 (linux_stabilize_threads): Likewise.
9600 * server.c (start_inferior): Likewise.
9601 (queue_stop_reply_callback): Likewise.
9602 * tracepoint.c (do_action_at_tracepoint): Likewise.
9603
9604 2010-09-06 Yao Qi <yao@codesourcery.com>
9605
9606 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9607 on return.
9608
9609 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9610
9611 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9612
9613 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9614
9615 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9616 "$(IPA_DEPFILES)".
9617
9618 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9619
9620 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9621 gdbserver/lynx-ppc-low.c: New files.
9622 * Makefile.in (lynx_low_h): New variable.
9623 (lynx-low.o, lynx-ppc-low.o): New rules.
9624 * configure.ac: On LynxOS, link with -lnetinet.
9625 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9626 * configure: regenerate.
9627
9628 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9629
9630 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9631 * configure.ac: Add check for vasprintf and vsnprintf.
9632 * configure, config.in: Regenerate.
9633 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9634
9635 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9636
9637 * gdbreplay.c: Move include of alloca.h up, next to include of
9638 malloc.h.
9639 * server.h: Add include of malloc.h.
9640 * mem-break.c: Remove include of malloc.h.
9641 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9642
9643 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9644
9645 * Makefile.in (memmem.o): Build with -Wno-error.
9646
9647 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9648
9649 * utils.c (xsnprintf): Make non-static.
9650 * server.h: Add xsnprintf declaration.
9651 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9652 replace calls to snprintf by calls to xsnprintf throughout.
9653
9654 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9655
9656 * configure.ac: Add configure check for alloca.
9657 * configure, config.in: Regenerate.
9658 * server.h: Include alloca.h if it exists.
9659 * gdbreplay.c: Include alloca.h if it exists.
9660
9661 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9662
9663 * linux-low.c (__SIGRTMIN): Define if not already defined.
9664 (linux_create_inferior): Check for __ANDROID__ rather than
9665 __SIGRTMIN.
9666 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9667 are already deferred.
9668 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9669 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9670 stopped and already has a pending signal to report.
9671 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9672 a pending signal to report or is moving out of a jump pad.
9673 (linux_init_signals): Check for __ANDROID__ rather than
9674 __SIGRTMIN.
9675
9676 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9677
9678 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9679 debug_threads check. Avoid a linear search when not doing debug
9680 output.
9681
9682 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9683
9684 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9685 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9686 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9687 (process_event): Change local fd's type to gdb_fildes_t.
9688 (create_file_handler): Adjust prototype.
9689 (delete_file_handler): Adjust prototype.
9690 (handle_file_event): Adjust prototype. Use pfildes.
9691 (create_file_event): Adjsut prototype.
9692 * remote-utils.c (remote_desc, listen_desc): Change type to
9693 gdb_fildes_t.
9694 * server.h: New gdb_fildes_t typedef.
9695 [USE_WIN32API]: Include winsock2.h.
9696 (delete_file_handler, add_file_handler): Adjust prototypes.
9697 (pfildes): Declare.
9698 * utils.c (pfildes): New.
9699
9700 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9701
9702 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9703 * configure: Regenerate.
9704
9705 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9706
9707 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9708 (linux_done_accessing_memory): ... this.
9709 (linux_target_ops): Adjust.
9710 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9711 * nto-low.c (nto_target_ops): Adjust comment.
9712 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9713 * spu-low.c (spu_target_ops): Adjust comment.
9714 * target.h (target_ops): Rename unprepare_to_access_memory field
9715 to done_accessing_memory.
9716 (unprepare_to_access_memory): Rename to ...
9717 (done_accessing_memory): ... this.
9718
9719 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9720
9721 * linux-low.c (linux_prepare_to_access_memory): New.
9722 (linux_unprepare_to_access_memory): New.
9723 (linux_target_ops): Install them.
9724 * server.c (read_memory): Rename to ...
9725 (gdb_read_memory): ... this. Use
9726 prepare_to_access_memory/prepare_to_access_memory.
9727 (write_memory): Rename to ...
9728 (gdb_write_memory): ... this. Use
9729 prepare_to_access_memory/prepare_to_access_memory.
9730 (handle_search_memory_1): Adjust.
9731 (process_serial_event): Adjust.
9732 * target.h (struct target_ops): New fields
9733 prepare_to_access_memory and unprepare_to_access_memory.
9734 (prepare_to_access_memory, unprepare_to_access_memory): New.
9735 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9736 prepare_to_access_memory/prepare_to_access_memory.
9737 * nto-low.c (nto_target_ops): Adjust.
9738 * spu-low.c (spu_target_ops): Adjust.
9739 * win32-low.c (win32_target_ops): Adjust.
9740
9741 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9742
9743 * Makefile.in (WARN_CFLAGS): Get it from configure.
9744 (WERROR_CFLAGS): New.
9745 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9746 * configure.ac: Introduce --enable-werror, which adds -Werror to
9747 the compiler command line. Enabled by default. Disable with
9748 --disable-werror. Add -Wdeclaration-after-statement
9749 Wpointer-arith and -Wformat-nonliteral to warning flags.
9750 * configure: Regenerate.
9751
9752 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9753
9754 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9755
9756 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9757
9758 * gdbreplay.c (remote_error): New.
9759 (gdbchar): New.
9760 (expect): Use gdbchar. Check for error reading from GDB.
9761 Clarify sync error output.
9762 (play): Check for errors writing to GDB.
9763 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9764 * remote-utils.c (getpkt): Check for errors writing to the remote
9765 descriptor.
9766
9767 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9768
9769 * linux-low.c (linux_wait_1): Move non-debugging code out of
9770 `debug_threads' control.
9771
9772 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9773
9774 * linux-low.c (linux_wait_1): Don't set last_status here.
9775 * server.c (push_event, queue_stop_reply_callback): Assert we're
9776 not pushing a TARGET_WAITKIND_IGNORE event.
9777 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9778 (myresume, handle_target_event): Set the thread's last_resume_kind
9779 and last_status from the target returned status.
9780
9781 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9782
9783 PR threads/10729
9784
9785 * linux-x86-low.c (update_debug_registers_callback): New.
9786 (i386_dr_low_set_addr): Use it.
9787 (i386_dr_low_get_addr): New.
9788 (i386_dr_low_set_control): Use update_debug_registers_callback.
9789 (i386_dr_low_get_control): New.
9790 (i386_dr_low_get_status): Adjust.
9791 * linux-low.c (linux_stop_lwp): New.
9792 * linux-low.h (linux_stop_lwp): Declare.
9793
9794 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9795 argument instead of a i386_debug_reg_state.
9796 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9797 a i386_debug_reg_state.
9798 (i386_insert_aligned_watchpoint): Adjust.
9799 (i386_remove_aligned_watchpoint): Adjust.
9800 (i386_low_stopped_data_address): Read the debug registers from the
9801 inferior instead of from the mirrors.
9802 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9803 (i386_dr_low_get_addr): Declare.
9804 (i386_dr_low_get_control): Declare.
9805 (i386_dr_low_get_status): Change prototype.
9806
9807 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9808 (i386_dr_low_get_addr): New.
9809 (i386_dr_low_get_control): New.
9810 (i386_dr_low_get_status): Adjust prototype. Return
9811 dr_status_mirror.
9812 (i386_initial_stuff): Clear dr_status_mirror and
9813 dr_control_mirror.
9814 (i386_get_thread_context): Adjust.
9815 (i386_set_thread_context): Adjust.
9816 (i386_thread_added): Adjust.
9817
9818 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9819
9820 * linux-low.h (linux_thread_area): Delete declaration.
9821
9822 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9823
9824 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9825 after its termination.
9826
9827 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9828
9829 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9830 (gdb_wants_all_stopped): Delete.
9831 (linux_wait_1): Don't call them.
9832 * server.c (handle_v_cont): Tag all threads as want-stopped.
9833 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9834 stopped as "client-wants-stopped".
9835
9836 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9837
9838 * Makefile.in (signals_h): New.
9839 (server_h): Depend on it.
9840 (server.o): Don't depend on $(signals_def).
9841 (signals.o): Depend on $(signals_def).
9842
9843 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9844
9845 * Makefile.in (signals_def): New.
9846 (server_h): Append include/gdb/signals.h and signals_def.
9847 (server.o): Append signals_def.
9848
9849 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9850
9851 * server.c (handle_target_event): Use target_signal_to_host for
9852 resume_info.sig initialization.
9853 * target.h (struct thread_resume) <sig>: New comment.
9854
9855 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9856
9857 * server.c (handle_query): strcpy() the returned string from paddress()
9858 instead of sprintf().
9859 * utils.c (paddress): Return phex_nz().
9860
9861 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9862
9863 * server.c (handle_v_cont): Call mourn_inferior if process
9864 just exited.
9865 (myresume): Likewise.
9866
9867 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9868
9869 Static tracepoints, and integration with UST.
9870
9871 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9872 * mem-break.c (uninsert_all_breakpoints)
9873 (reinsert_all_breakpoints): New.
9874 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9875 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9876 (gdb_agent_ust_loaded, helper_thread_id)
9877 (gdb_agent_helper_thread_id): New macros.
9878 (struct ipa_sym_addresses): Add addr_ust_loaded,
9879 addr_helper_thread_id, addr_cmd_buf.
9880 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9881 (in_process_agent_loaded_ust): New.
9882 (write_e_ust_not_loaded): New.
9883 (maybe_write_ipa_ust_not_loaded): New.
9884 (struct collect_static_trace_data_action): New.
9885 (enum tracepoint_type) <static_tracepoint>: New.
9886 (struct tracepoint) <handle>: Mention static tracepoints.
9887 (struct static_tracepoint_ctx): New.
9888 (CMD_BUF_SIZE): New.
9889 (add_tracepoint_action): Handle static tracepoint actions.
9890 (unprobe_marker_at): New.
9891 (clear_installed_tracepoints): Handle static tracepoints.
9892 (cmd_qtdp): Handle static tracepoints.
9893 (probe_marker_at): New.
9894 (cmd_qtstart): Handle static tracepoints.
9895 (response_tracepoint): Handle static tracepoints.
9896 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9897 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9898 (get_context_regcache): Handle static tracepoints.
9899 (do_action_at_tracepoint): Handle static tracepoint actions.
9900 (traceframe_find_block_type): Handle static trace data blocks.
9901 (traceframe_read_sdata): New.
9902 (download_tracepoints): Download static tracepoint actions.
9903 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9904 (GDB_PROBE_NAME): New.
9905 (ust_ops): New.
9906 (GET_UST_SYM): New.
9907 (USTF): New.
9908 (dlsym_ust): New.
9909 (ust_marker_to_static_tracepoint): New.
9910 (gdb_probe): New.
9911 (collect_ust_data_at_tracepoint): New.
9912 (gdb_ust_probe): New.
9913 (UNIX_PATH_MAX, SOCK_DIR): New.
9914 (gdb_ust_connect_sync_socket): New.
9915 (resume_thread, stop_thread): New.
9916 (run_inferior_command): New.
9917 (init_named_socket): New.
9918 (gdb_ust_socket_init): New.
9919 (cstr_to_hexstr): New.
9920 (next_st): New.
9921 (first_marker, next_marker): New.
9922 (response_ust_marker): New.
9923 (cmd_qtfstm, cmd_qtsstm): New.
9924 (unprobe_marker_at, probe_marker_at): New.
9925 (cmd_qtstmat, gdb_ust_thread): New.
9926 (gdb_ust_init): New.
9927 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9928 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9929 (ST_REGENTRY): New.
9930 (x86_64_st_collect_regmap): New.
9931 (X86_64_NUM_ST_COLLECT_GREGS): New.
9932 (AMD64_RIP_REGNUM): New.
9933 (supply_static_tracepoint_registers): New.
9934 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9935 (ST_REGENTRY): New.
9936 (i386_st_collect_regmap): New.
9937 (i386_NUM_ST_COLLECT_GREGS): New.
9938 (supply_static_tracepoint_registers): New.
9939 * server.c (handle_query): Handle qXfer:statictrace:read.
9940 <qSupported>: Report support for StaticTracepoints, and
9941 qXfer:statictrace:read features.
9942 * server.h (traceframe_read_sdata)
9943 (supply_static_tracepoint_registers): Declare.
9944 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9945 (unpack_varlen_hex): Include in IPA build.
9946 * Makefile.in (ustlibs, ustinc): New.
9947 (IPA_OBJS): Add remote-utils-ipa.o.
9948 ($(IPA_LIB)): Link -ldl and -lpthread.
9949 (UST_CFLAGS): New.
9950 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9951 * config.in, configure: Regenerate.
9952
9953 2010-06-20 Ian Lance Taylor <iant@google.com>
9954 Pedro Alves <pedro@codesourcery.com>
9955
9956 * linux-x86-low.c (always_true): Delete.
9957 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9958 trying to fool the compiler with always_true.
9959
9960 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9961
9962 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9963 conditions in gdbserver.
9964
9965 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9966
9967 * spu-low.c (spu_read_memory): Wrap around local store limit.
9968 (spu_write_memory): Likewise.
9969
9970 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9971
9972 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9973 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9974 LONGEST uses.
9975 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9976 uses.
9977 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9978 uses with LONGEST uses.
9979
9980 2010-06-14 Stan Shebs <stan@codesourcery.com>
9981 Pedro Alves <pedro@codesourcery.com>
9982
9983 Bytecode compiler.
9984
9985 * linux-x86-low.c: Include limits.h.
9986 (add_insns): New.
9987 (always_true): New.
9988 (EMIT_ASM): New.
9989 (EMIT_ASM32): New.
9990 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9991 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9992 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9993 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9994 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9995 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9996 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9997 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9998 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9999 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10000 (amd64_emit_void_call_2): New.
10001 (amd64_emit_ops): New.
10002 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10003 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10004 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10005 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10006 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10007 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10008 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10009 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10010 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10011 (i386_emit_stack_adjust, i386_emit_int_call_1)
10012 (i386_emit_void_call_2): New.
10013 (i386_emit_ops): New.
10014 (x86_emit_ops): New.
10015 (the_low_target): Install x86_emit_ops.
10016 * server.h (struct emit_ops): New.
10017 (get_raw_reg_func_addr): Declare.
10018 (current_insn_ptr, emit_error): Declare.
10019 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10020 (set_trace_state_variable_value): New defines.
10021 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10022 addr_get_trace_state_variable_value and
10023 addr_set_trace_state_variable_value.
10024 (symbol_list): New fields for get_raw_reg,
10025 get_trace_state_variable_value and set_trace_state_variable_value.
10026 (condfn): New typedef.
10027 (struct tracepoint): New field `compiled_cond'.
10028 (do_action_at_tracepoint): Clear compiled_cond.
10029 (get_trace_state_variable_value, set_trace_state_variable_value):
10030 Export in the IPA.
10031 (condition_true_at_tracepoint): If there's a compiled condition,
10032 run that.
10033 (current_insn_ptr, emit_error): New globals.
10034 (struct bytecode_address): New.
10035 (get_raw_reg_func_addr): New.
10036 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10037 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10038 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10039 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10040 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10041 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10042 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10043 (compile_tracepoint_condition, compile_bytecodes): New.
10044 * target.h (emit_ops): Forward declare.
10045 (struct target_ops): New field emit_ops.
10046 (target_emit_ops): New.
10047 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10048 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10049 * linux-low.c (linux_emit_ops): New.
10050 (linux_target_ops): Install it.
10051 * linux-low.h (struct linux_target_ops): New field emit_ops.
10052
10053 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10054
10055 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10056 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10057
10058 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10059 Stan Shebs <stan@codesourcery.com>
10060
10061 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10062 (all): Depend on $(extra_libraries).
10063 (install-only): Install the IPA.
10064 (IPA_OBJS, IPA_LIB): New.
10065 (clean): Remove the IPA lib.
10066 (IPAGENT_CFLAGS): New.
10067 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10068 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10069 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10070 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10071 * configure.ac: Check for atomic builtins support in the compiler.
10072 (IPA_DEPFILES, extra_libraries): Define.
10073 * configure.srv (ipa_obj): Add description.
10074 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10075 (i[34567]86-*-linux*): Set ipa_obj.
10076 (x86_64-*-linux*): Set ipa_obj.
10077 * linux-low.c (stabilizing_threads): New.
10078 (supports_fast_tracepoints): New.
10079 (linux_detach): Stabilize threads before detaching.
10080 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10081 the lwp is either not stabilizing, or is moving out of a jump pad.
10082 (linux_fast_tracepoint_collecting): New.
10083 (maybe_move_out_of_jump_pad): New.
10084 (enqueue_one_deferred_signal): New.
10085 (dequeue_one_deferred_signal): New.
10086 (linux_wait_for_event_1): If moving out of a jump pad, defer
10087 pending signals to later.
10088 (linux_stabilize_threads): New.
10089 (linux_wait_1): Check if threads need moving out of jump pads, and
10090 do it if so.
10091 (stuck_in_jump_pad_callback): New.
10092 (move_out_of_jump_pad_callback): New.
10093 (lwp_running): New.
10094 (linux_resume_one_lwp): Handle moving out of jump pads.
10095 (linux_set_resume_request): Dequeue deferred signals.
10096 (need_step_over_p): Also step over fast tracepoint jumps.
10097 (start_step_over): Also uninsert fast tracepoint jumps.
10098 (finish_step_over): Also reinsert fast tracepoint jumps.
10099 (linux_install_fast_tracepoint_jump): New.
10100 (linux_target_ops): Install linux_stabilize_threads and
10101 linux_install_fast_tracepoint_jump_pad.
10102 * linux-low.h (linux_target_ops) <get_thread_area,
10103 install_fast_tracepoint_jump_pad>: New fields.
10104 (struct lwp_info) <collecting_fast_tracepoint,
10105 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10106 (linux_get_thread_area): Declare.
10107 * linux-x86-low.c (jump_insn): New.
10108 (x86_get_thread_area): New.
10109 (append_insns): New.
10110 (push_opcode): New.
10111 (amd64_install_fast_tracepoint_jump_pad): New.
10112 (i386_install_fast_tracepoint_jump_pad): New.
10113 (x86_install_fast_tracepoint_jump_pad): New.
10114 (the_low_target): Install x86_get_thread_area and
10115 x86_install_fast_tracepoint_jump_pad.
10116 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10117 (struct fast_tracepoint_jump): New.
10118 (fast_tracepoint_jump_insn): New.
10119 (fast_tracepoint_jump_shadow): New.
10120 (find_fast_tracepoint_jump_at): New.
10121 (fast_tracepoint_jump_here): New.
10122 (delete_fast_tracepoint_jump): New.
10123 (set_fast_tracepoint_jump): New.
10124 (uninsert_fast_tracepoint_jumps_at): New.
10125 (reinsert_fast_tracepoint_jumps_at): New.
10126 (set_breakpoint_at): Use write_inferior_memory.
10127 (uninsert_raw_breakpoint): Use write_inferior_memory.
10128 (check_mem_read): Mask out fast tracepoint jumps.
10129 (check_mem_write): Mask out fast tracepoint jumps.
10130 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10131 (set_fast_tracepoint_jump): Declare.
10132 (delete_fast_tracepoint_jump)
10133 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10134 (reinsert_fast_tracepoint_jumps_at): Declare.
10135 * regcache.c: Don't compile many functions when building the
10136 in-process agent library.
10137 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10138 the register buffer in the heap.
10139 (free_register_cache): If the register buffer isn't owned by the
10140 regcache, don't free it.
10141 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10142 pre-existing register caches.
10143 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10144 type.
10145 (convert_ascii_to_int): : Constify `from' parameter type.
10146 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10147 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10148 the needed buffer in-place.
10149 (relocate_instruction): New.
10150 * server.c (handle_query) <qSymbols>: If the target supports
10151 tracepoints, give it a chance of looking up symbols. Report
10152 support for fast tracepoints.
10153 (handle_status): Stabilize threads.
10154 (process_serial_event): Adjust.
10155 * server.h (struct fast_tracepoint_jump): Forward declare.
10156 (struct process_info) <fast_tracepoint_jumps>: New field.
10157 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10158 (decode_X_packet, decode_M_packet): Adjust.
10159 (relocate_instruction): Declare.
10160 (in_process_agent_loaded): Declare.
10161 (tracepoint_look_up_symbols): Declare.
10162 (struct fast_tpoint_collect_status): Declare.
10163 (fast_tracepoint_collecting): Declare.
10164 (force_unlock_trace_buffer): Declare.
10165 (handle_tracepoint_bkpts): Declare.
10166 (initialize_low_tracepoint)
10167 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10168 * target.h (struct target_ops) <stabilize_threads,
10169 install_fast_tracepoint_jump_pad>: New fields.
10170 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10171 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10172 [HAVE_STDINT_H]: Include stdint.h.
10173 (trace_debug_1): Rename to ...
10174 (trace_vdebug): ... this.
10175 (trace_debug): Rename to ...
10176 (trace_debug_1): ... this. Add `level' parameter.
10177 (trace_debug): New.
10178 (ATTR_USED, ATTR_NOINLINE): New.
10179 (IP_AGENT_EXPORT): New.
10180 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10181 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10182 (about_to_request_buffer_space, trace_buffer_is_full)
10183 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10184 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10185 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10186 (traceframe_write_count, traceframes_created)
10187 (trace_state_variables)
10188 New renaming defines.
10189 (struct ipa_sym_addresses): New.
10190 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10191 (symbol_list): New.
10192 (ipa_sym_addrs): New.
10193 (all_tracepoint_symbols_looked_up): New.
10194 (in_process_agent_loaded): New.
10195 (write_e_ipa_not_loaded): New.
10196 (maybe_write_ipa_not_loaded): New.
10197 (tracepoint_look_up_symbols): New.
10198 (debug_threads) [IN_PROCESS_AGENT]: New.
10199 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10200 (UNKNOWN_SIDE_EFFECTS): New.
10201 (stop_tracing): New.
10202 (flush_trace_buffer): New.
10203 (stop_tracing_bkpt): New.
10204 (flush_trace_buffer_bkpt): New.
10205 (read_inferior_integer): New.
10206 (read_inferior_uinteger): New.
10207 (read_inferior_data_pointer): New.
10208 (write_inferior_data_pointer): New.
10209 (write_inferior_integer): New.
10210 (write_inferior_uinteger): New.
10211 (struct collect_static_trace_data_action): Delete.
10212 (enum tracepoint_type): New.
10213 (struct tracepoint) <type>: New field `type'.
10214 <actions_str, step_actions, step_actions_str>: Only include in
10215 GDBserver.
10216 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10217 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10218 (tracepoints): Use IP_AGENT_EXPORT.
10219 (last_tracepoint): Don't include in the IPA.
10220 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10221 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10222 (alloced_trace_state_variables): New.
10223 (trace_state_variables): Use IP_AGENT_EXPORT.
10224 (traceframe_t): Delete unused variable.
10225 (circular_trace_buffer): Don't include in the IPA.
10226 (trace_buffer_start): Delete.
10227 (struct trace_buffer_control): New.
10228 (trace_buffer_free): Delete.
10229 (struct ipa_trace_buffer_control): New.
10230 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10231 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10232 New.
10233 (trace_buffer_ctrl): New.
10234 (TRACE_BUFFER_CTRL_CURR): New.
10235 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10236 Reimplement as macros.
10237 (trace_buffer_wrap): Delete.
10238 (traceframe_write_count, traceframe_read_count)
10239 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10240 (struct tracepoint_hit_ctx) <type>: New field.
10241 (struct fast_tracepoint_ctx): New.
10242 (memory_barrier): New.
10243 (cmpxchg): New.
10244 (record_tracepoint_error): Update atomically in the IPA.
10245 (clear_inferior_trace_buffer): New.
10246 (about_to_request_buffer_space): New.
10247 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10248 updating the same buffer.
10249 (add_tracepoint): Default the tracepoint's type to trap
10250 tracepoint, and orig_size to -1.
10251 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10252 internal variables.
10253 (create_trace_state_variable): New parameter `gdb'. Handle it.
10254 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10255 (cmd_qtdp): Handle fast tracepoints.
10256 (cmd_qtdv): Adjust.
10257 (max_jump_pad_size): New.
10258 (gdb_jump_pad_head): New.
10259 (get_jump_space_head): New.
10260 (claim_jump_space): New.
10261 (sort_tracepoints): New.
10262 (MAX_JUMP_SIZE): New.
10263 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10264 IPA.
10265 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10266 support. Upload fast traceframes, and delete internal IPA
10267 breakpoints.
10268 (stop_tracing_handler): New.
10269 (flush_trace_buffer_handler): New.
10270 (cmd_qtstop): Upload fast tracepoints.
10271 (response_tracepoint): Handle fast tracepoints.
10272 (tracepoint_finished_step): Upload fast traceframes. Set the
10273 tracepoint hit context's tracepoint type.
10274 (handle_tracepoint_bkpts): New.
10275 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10276 type. Add comment about fast tracepoints.
10277 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10278 non-existing action_str field.
10279 (get_context_regcache): Handle fast tracepoints.
10280 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10281 to the regcache.
10282 (fast_tracepoint_from_jump_pad_address): New.
10283 (fast_tracepoint_from_ipa_tpoint_address): New.
10284 (collecting_t): New.
10285 (force_unlock_trace_buffer): New.
10286 (fast_tracepoint_collecting): New.
10287 (collecting): New.
10288 (gdb_collect): New.
10289 (write_inferior_data_ptr): New.
10290 (target_tp_heap): New.
10291 (target_malloc): New.
10292 (download_agent_expr): New.
10293 (UALIGN): New.
10294 (download_tracepoints): New.
10295 (download_trace_state_variables): New.
10296 (upload_fast_traceframes): New.
10297 (IPA_FIRST_TRACEFRAME): New.
10298 (IPA_NEXT_TRACEFRAME_1): New.
10299 (IPA_NEXT_TRACEFRAME): New.
10300 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10301 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10302 (gdb_jump_pad_buffer_end): New.
10303 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10304 (initialize_tracepoint): Adjust.
10305 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10306 buffer. Initialize the low module.
10307 * utils.c (PREFIX, TOOLNAME): New.
10308 (malloc_failure): Use PREFIX.
10309 (error): In the IPA, an error causes an exit.
10310 (fatal, warning): Use PREFIX.
10311 (internal_error): Use TOOLNAME.
10312 (NUMCELLS): Increase to 10.
10313 * configure, config.in: Regenerate.
10314
10315 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10316
10317 * server.c (handle_query) <qSupported>: Do two passes over the
10318 qSupported string to avoid nesting strtok.
10319
10320 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10321
10322 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10323 (CDEPS): New.
10324 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10325 -Wl,--dynamic-list.
10326 * configure: Regenerate.
10327 * proc-service.list: New.
10328
10329 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10330
10331 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10332 New comment.
10333
10334 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10335
10336 * gdbreplay.c (remote_open): Check error return from socket() call by
10337 its equality to -1 not by it being negative.
10338 * remote-utils.c (remote_open): Likewise.
10339
10340 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10341
10342 * config.h: Regenerate.
10343
10344 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10345
10346 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10347 doesn't provide PTRACE_GET_THREAD_AREA.
10348
10349 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10350
10351 * linux-m68k-low.c: Include <asm/ptrace.h>
10352 (ps_get_thread_area): Implement.
10353
10354 2010-05-03 Doug Evans <dje@google.com>
10355
10356 * event-loop.c (struct callback_event): New struct.
10357 (callback_list): New global.
10358 (append_callback_event, delete_callback_event): New functions.
10359 (process_callback): New function.
10360 (start_event_loop): Call it.
10361 * remote-utils.c (NOT_SCHEDULED): Define.
10362 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10363 moved out of readchar.
10364 (readchar): Rewrite. Call reschedule before returning.
10365 (reset_readchar): New function.
10366 (remote_close): Call it.
10367 (process_remaining, reschedule): New functions.
10368 * server.h (callback_handler_func): New typedef.
10369 (append_callback_event, delete_callback_event): Declare.
10370
10371 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10372
10373 * proc-service.c (ps_pglobal_lookup): Use
10374 thread_db_look_up_one_symbol.
10375 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10376 parameter. Use it instead of all_symbols_looked_up.
10377 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10378 field.
10379 (all_symbols_looked_up): Don't declare.
10380 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10381 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10382 field.
10383 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10384 Set all_symbols_looked_up here.
10385 (thread_db_look_up_one_symbol): New.
10386 (thread_db_get_tls_address): Adjust.
10387 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10388 thread_db object on the heap, and tentatively set it in the
10389 process structure.
10390 (thread_db_init): Don't set all_symbols_looked_up here.
10391 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10392
10393 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10394
10395 * linux-low.c (linux_kill, linux_detach): Adjust.
10396 (status_pending_p_callback): Remove redundant statement. Check
10397 for !TARGET_WAITIKIND_IGNORE, instead of
10398 TARGET_WAITKIND_STOPPED.
10399 (handle_tracepoints): Make sure LWP is locked. Adjust.
10400 (linux_wait_for_event_1): Adjust.
10401 (linux_cancel_breakpoints): New.
10402 (unsuspend_one_lwp): New.
10403 (unsuspend_all_lwps): New.
10404 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10405 (send_sigstop_callback): Change return type to int, add new
10406 `except' parameter and handle it.
10407 (suspend_and_send_sigstop_callback): New.
10408 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10409 pass them down. If SUSPEND, also increment the lwp's suspend
10410 count.
10411 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10412 (need_step_over_p): Don't consider suspended LWPs.
10413 (start_step_over): Adjust.
10414 (proceed_one_lwp): Change return type to int, add new `except'
10415 parameter and handle it.
10416 (unsuspend_and_proceed_one_lwp): New.
10417 (proceed_all_lwps): Use find_inferior instead of
10418 for_each_inferior.
10419 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10420 also decrement the suspend count of LWPs. Pass `except' down,
10421 instead of hacking its suspend count.
10422 (linux_pause_all): Add `freeze' parameter. Adjust.
10423 (linux_unpause_all): New.
10424 (linux_target_ops): Install linux_unpause_all.
10425 * server.c (handle_status): Adjust.
10426 * target.h (struct target_ops): New fields `unpause_all' and
10427 `cancel_breakpoints'. Add new parameter to `pause_all'.
10428 (pause_all): Add new `freeze' parameter.
10429 (unpause_all): New.
10430 (cancel_breakpoints): New.
10431 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10432 cancel breakpoints.
10433 (cmd_qtstart): Pause threads.
10434 (stop_tracing): Pause threads, and cancel breakpoints.
10435 * win32-low.c (win32_target_ops): Adjust.
10436
10437 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10438
10439 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10440 the inferior right away from here...
10441 (linux_wait_1): ... to here, and adjust to check the thread's
10442 last_resume_kind instead of the lwp's step or stop_expected flags.
10443
10444 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10445
10446 * README: Use consistent `GDB' and `GDBserver' spellings.
10447
10448 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10449
10450 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10451 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10452 (linux_detach_one_lwp): Assume the lwp is stopped.
10453 (any_thread_of): Delete.
10454 (linux_detach): Stop all lwps here. Don't blindly delete all
10455 breakpoints.
10456 (delete_lwp_callback): New.
10457 (linux_mourn): Delete all lwps of the process that is gone.
10458 (linux_wait_1): Don't delete the last lwp of the process here.
10459 * mem-break.h (mark_breakpoints_out): Declare.
10460 * mem-break.c (mark_breakpoints_out): New.
10461 (free_all_breakpoints): Use it.
10462 * server.c (handle_target_event): If the process is gone, mark
10463 breakpoints out.
10464 * thread-db.c (struct thread_db) <create_bp>: New field.
10465 (thread_db_enable_reporting): Fix prototype. Store a thread event
10466 breakpoint reference in the thread_db struct.
10467 (thread_db_load_search): Clear the thread_db object.
10468 (try_thread_db_load_1): Ditto.
10469 (switch_to_process): New.
10470 (disable_thread_event_reporting): Use it.
10471 (remove_thread_event_breakpoints): New.
10472 (thread_db_detach, thread_db_mourn): Use it.
10473
10474 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10475
10476 * linux-low.c (linux_enable_event_reporting): New.
10477 (linux_wait_for_event_1, handle_extended_wait): Use it.
10478
10479 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10480
10481 * linux-low.c (linux_kill_one_lwp, linux_kill)
10482 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10483 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10484 SIGSTOP even if the LWP is stopped.
10485 (send_sigstop_callback): New.
10486 (stop_all_lwps): Use send_sigstop_callback instead.
10487 (linux_resume_one_thread): Adjust.
10488 (proceed_one_lwp): Still proceed an LWP that the client has
10489 requested to stop, if we haven't reported it as stopped yet. Make
10490 sure that LWPs the client want stopped, have a pending SIGSTOP.
10491
10492 2010-04-26 Doug Evans <dje@google.com>
10493
10494 * server.c (handle_general_set): Make static.
10495
10496 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10497 Print received char after testing for error/eof instead of before.
10498 (input_interrupt): Tweak comment.
10499
10500 2010-04-23 Doug Evans <dje@google.com>
10501
10502 * server.c (start_inferior): Print inferior argv if --debug.
10503
10504 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10505
10506 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10507 * nto-x86-low.c: Include server.h
10508
10509 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10510
10511 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10512 be consistent with other sources of this directory.
10513 (init_registers_amd64): Correct name of source file of this function
10514 in the comment.
10515
10516 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10517
10518 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10519 64-bit executables.
10520
10521 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10522
10523 * win32-i386-low.c: Add 64-bit support.
10524 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10525 (init_registers_amd64): Declare.
10526 (mappings): Add 64-bit version of array.
10527 (init_windows_x86): New function.
10528 (the_low_target): Change init_arch field to init_windows_x86.
10529
10530 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10531
10532 * win32-low.c: Adapt to support also 64-bit architecture.
10533 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10534 (get_image_name): Use SIZE_T type for local variable `done'.
10535 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10536 (toolhelp_get_dll_name): Idem.
10537 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10538 Use uintptr_t typecast to avoid warning.
10539 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10540 (handle_exception): Use phex_nz to avoid warning.
10541 (win32_wait): Remove unused local variable `process'.
10542
10543 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10544
10545 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10546 `amd64-avx.o'.
10547
10548 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10549
10550 * configure.ac: Use `ws2_32' library for srv_mingw.
10551 * configure: Regenerate.
10552 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10553 * remote-utils.c: Likewise.
10554
10555 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10556
10557 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10558 if __x86_64__ is defined.
10559
10560 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10561
10562 * configure: Regenerate.
10563
10564 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10565
10566 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10567 * target.h (target_ops): New get_tib_address field.
10568 * win32-low.h (win32_thread_info): Add thread_local_base field.
10569 * win32-low.c (child_add_thread): Add tlb argument.
10570 Set thread_local_base field to TLB.
10571 (get_child_debug_event): Adapt to child_add_thread change.
10572 (win32_get_tib_address): New function.
10573 (win32_target_ops): Set get_tib_address field to
10574 win32_get_tib_address.
10575 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10576
10577 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10578
10579 * linux-low.c (linux_mourn): Also remove the process.
10580 * server.c (handle_target_event): Don't remove the process here.
10581 * nto-low.c (nto_mourn): New.
10582 (nto_target_ops): Install it.
10583 * spu-low.c (spu_mourn): New.
10584 (spu_target_ops): Install it.
10585 * win32-low.c (win32_mourn): New.
10586 (win32_target_ops): Install it.
10587
10588 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10589
10590 * server.h (buffer_xml_printf): Remove redundant `;'.
10591
10592 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10593
10594 * regcache.c (set_register_cache): Invalidate regcaches before
10595 changing the register cache layout.
10596 (regcache_invalidate_one): Allow a NULL regcache.
10597 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10598 regcaches before changing the register cache layout or the target
10599 regsets.
10600
10601 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10602
10603 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10604 variable warning on Linux/x86-64.
10605
10606 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10607
10608 GDBserver disconnected tracing support.
10609
10610 * linux-low.c (linux_remove_process): Delete.
10611 (add_lwp): Don't set last_resume_kind here.
10612 (linux_kill): Use `mourn'.
10613 (linux_detach): Use `thread_db_detach', and `mourn'.
10614 (linux_mourn): New.
10615 (linux_attach_lwp_1): Adjust comment.
10616 (linux_attach): last_resume_kind moved the thread_info; adjust.
10617 (status_pending_p_callback): Adjust.
10618 (linux_wait_for_event_1): Adjust.
10619 (count_events_callback, select_singlestep_lwp_callback)
10620 (select_event_lwp_callback, cancel_breakpoints_callback)
10621 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10622 (proceed_one_lwp): Adjust.
10623 (linux_async): Add debug output.
10624 (linux_thread_stopped): New.
10625 (linux_pause_all): New.
10626 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10627 linux_pause_all.
10628 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10629 (thread_db_free): Delete declaration.
10630 (thread_db_detach, thread_db_mourn): Declare.
10631 * thread-db.c (thread_db_init): Use thread_db_mourn.
10632 (thread_db_free): Delete, split in two.
10633 (disable_thread_event_reporting): New.
10634 (thread_db_detach): New.
10635 (thread_db_mourn): New.
10636
10637 * server.h (struct thread_info) <last_resume_kind>: New field.
10638 <attached>: Add comment.
10639 <gdb_detached>: New field.
10640 (handler_func): Change return type to int.
10641 (handle_serial_event, handle_target_event): Ditto.
10642 (gdb_connected): Declare.
10643 (tracing): Delete.
10644 (disconnected_tracing): Declare.
10645 (stop_tracing): Declare.
10646
10647 * server.c (handle_query) <qSupported>: Report support for
10648 disconnected tracing.
10649 (queue_stop_reply_callback): Account for running threads.
10650 (gdb_wants_thread_stopped): New.
10651 (gdb_wants_all_threads_stopped): New.
10652 (gdb_reattached_process): New.
10653 (handle_status): Clear the `gdb_detached' flag of all processes.
10654 In all-stop, stop all threads.
10655 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10656 (process_serial_event): If the remote connection breaks, or if an
10657 exit was forced with "monitor exit", force an event loop exit.
10658 Handle disconnected tracing on detach.
10659 (handle_serial_event): Adjust.
10660 (handle_target_event): If GDB isn't connected, forward events back
10661 to the inferior, unless the last process exited, in which case,
10662 exit gdbserver. Adjust interface.
10663
10664 * remote-utils.c (remote_open): Don't block in accept. Instead
10665 register an event loop source on the listen socket file
10666 descriptor. Refactor bits into ...
10667 (listen_desc): ... this new global.
10668 (gdb_connected): ... this new function.
10669 (enable_async_notification): ... this new function.
10670 (handle_accept_event): ... this new function.
10671 (remote_close): Clear remote_desc.
10672
10673 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10674
10675 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10676 New fields.
10677 (mourn_inferior): Define.
10678 (target_process_qsupported): Avoid the dangling else problem.
10679 (thread_stopped): Define.
10680 (pause_all): Define.
10681 (target_waitstatus_to_string): Declare.
10682 * target.c (target_waitstatus_to_string): New.
10683
10684 * tracepoint.c (tracing): Make extern.
10685 (disconnected_tracing): New.
10686 (stop_tracing): Make extern. Handle tracing stops due to GDB
10687 disconnecting.
10688 (cmd_qtdisconnected): New.
10689 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10690 (handle_tracepoint_general_set): Handle QTDisconnected.
10691
10692 * event-loop.c (event_handler_func): Change return type to int.
10693 (process_event): Bail out if the event handler wants the event
10694 loop to stop.
10695 (handle_file_event): Ditto.
10696 (start_event_loop): Bail out if the event handler wants the event
10697 loop to stop.
10698
10699 * nto-low.c (nto_target_ops): Adjust.
10700 * spu-low.c (spu_wait): Don't remove the process here.
10701 (spu_target_ops): Adjust.
10702 * win32-low.c (win32_wait): Don't remove the process here.
10703 (win32_target_ops): Adjust.
10704
10705 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10706
10707 * regcache.c (realloc_register_cache): Invalidate inferior's
10708 regcache before recreating it.
10709
10710 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10711
10712 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10713
10714 2010-04-09 Stan Shebs <stan@codesourcery.com>
10715 Pedro Alves <pedro@codesourcery.com>
10716
10717 * server.h (LONGEST): New.
10718 (struct thread_info) <while_stepping>: New field.
10719 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10720 Declare.
10721 (initialize_tracepoint, handle_tracepoint_general_set)
10722 (handle_tracepoint_query, tracepoint_finished_step)
10723 (tracepoint_was_hit, release_while_stepping_state_list):
10724 (current_traceframe): Declare.
10725 * server.c (handle_general_set): Handle tracepoint packets.
10726 (read_memory): New.
10727 (write_memory): New.
10728 (handle_search_memory_1): Use read_memory.
10729 (handle_query): Report support for conditional tracepoints, trace
10730 state variables, and tracepoint sources. Handle tracepoint
10731 queries.
10732 (main): Initialize the tracepoints module.
10733 (process_serial_event): Handle traceframe reads/writes.
10734
10735 * linux-low.c (handle_tracepoints): New.
10736 (linux_wait_1): Call it.
10737 (linux_resume_one_lwp): Handle while-stepping.
10738 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10739 (linux_target_ops): Install them.
10740 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10741 New field.
10742 * linux-x86-low.c (x86_supports_tracepoints): New.
10743 (the_low_target). Install it.
10744
10745 * mem-break.h (delete_breakpoint): Declare.
10746 * mem-break.c (delete_breakpoint): Make external.
10747
10748 * target.h (struct target_ops): Add `supports_tracepoints',
10749 `read_pc', and `write_pc' fields.
10750 (target_supports_tracepoints): Define.
10751 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10752 (phex_nz): New.
10753
10754 * regcache.h (struct regcache) <registers_owned>: New field.
10755 (init_register_cache, regcache_cpy): Declare.
10756 (regcache_read_pc, regcache_write_pc): Declare.
10757 (register_cache_size): Declare.
10758 (supply_regblock): Declare.
10759 * regcache.c (init_register_cache): New.
10760 (new_register_cache): Use it.
10761 (regcache_cpy): New.
10762 (register_cache_size): New.
10763 (supply_regblock): New.
10764 (regcache_read_pc, regcache_write_pc): New.
10765
10766 * tracepoint.c: New.
10767
10768 * Makefile.in (OBS): Add tracepoint.o.
10769 (tracepoint.o): New rule.
10770
10771 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10772
10773 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10774 (i386-mmx.o): New.
10775 (i386-mmx.c): Likewise.
10776 (i386-mmx-linux.o): Likewise.
10777 (i386-mmx-linux.c): Likewise.
10778
10779 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10780 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10781 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10782 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10783
10784 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10785 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10786 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10787
10788 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10789
10790 * Makefile.in (clean): Updated.
10791 (i386-avx.o): New.
10792 (i386-avx.c): Likewise.
10793 (i386-avx-linux.o): Likewise.
10794 (i386-avx-linux.c): Likewise.
10795 (amd64-avx.o): Likewise.
10796 (amd64-avx.c): Likewise.
10797 (amd64-avx-linux.o): Likewise.
10798 (amd64-avx-linux.c): Likewise.
10799
10800 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10801 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10802 (srv_amd64_regobj): Add amd64-avx.o.
10803 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10804 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10805 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10806 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10807 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10808 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10809 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10810
10811 * i387-fp.c: Include "i386-xstate.h".
10812 (i387_xsave): New.
10813 (i387_cache_to_xsave): Likewise.
10814 (i387_xsave_to_cache): Likewise.
10815 (x86_xcr0): Likewise.
10816
10817 * i387-fp.h (i387_cache_to_xsave): Likewise.
10818 (i387_xsave_to_cache): Likewise.
10819 (x86_xcr0): Likewise.
10820
10821 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10822 * linux-crisv32-low.c (target_regsets): Likewise.
10823 * linux-m68k-low.c (target_regsets): Likewise.
10824 * linux-mips-low.c (target_regsets): Likewise.
10825 * linux-ppc-low.c (target_regsets): Likewise.
10826 * linux-s390-low.c (target_regsets): Likewise.
10827 * linux-sh-low.c (target_regsets): Likewise.
10828 * linux-sparc-low.c (target_regsets): Likewise.
10829 * linux-xtensa-low.c (target_regsets): Likewise.
10830
10831 * linux-low.c: Include <sys/uio.h>.
10832 (regsets_fetch_inferior_registers): Support nt_type.
10833 (regsets_store_inferior_registers): Likewise.
10834 (linux_process_qsupported): New.
10835 (linux_target_ops): Add linux_process_qsupported.
10836
10837 * linux-low.h (regset_info): Add nt_type.
10838 (linux_target_ops): Add process_qsupported.
10839
10840 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10841 and <sys/uio.h>.
10842 (init_registers_i386_avx_linux): New.
10843 (init_registers_amd64_avx_linux): Likewise.
10844 (xmltarget_i386_linux_no_xml): Likewise.
10845 (xmltarget_amd64_linux_no_xml): Likewise.
10846 (PTRACE_GETREGSET): Likewise.
10847 (PTRACE_SETREGSET): Likewise.
10848 (x86_fill_xstateregset): Likewise.
10849 (x86_store_xstateregset): Likewise.
10850 (use_xml): Likewise.
10851 (x86_linux_update_xmltarget): Likewise.
10852 (x86_linux_process_qsupported): Likewise.
10853 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10854 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10855 init_registers_i386_linux here. Call
10856 x86_linux_update_xmltarget.
10857 (the_low_target): Add x86_linux_process_qsupported.
10858
10859 * server.c (handle_query): Call target_process_qsupported.
10860
10861 * target.h (target_ops): Add process_qsupported.
10862 (target_process_qsupported): New.
10863
10864 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10865
10866 * inferiors.c (add_thread): Set last_status kind to
10867 TARGET_WAITKIND_IGNORE.
10868 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10869 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10870 (linux_wait_1): Move `thread' local definition to block that uses
10871 it. Don't NULL initialize `event_child'.
10872 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10873 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10874 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10875
10876 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10877
10878 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10879 an extended waitstatus, or by a watchpoint.
10880 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10881 thread was stepping or has been stopped by a watchpoint.
10882
10883 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10884
10885 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10886 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10887 of another, then delete the previous, and validate all
10888 breakpoints.
10889 (validate_inserted_breakpoint): New.
10890 (delete_disabled_breakpoints): New.
10891 (validate_breakpoints): New.
10892 (check_mem_read): Validate breakpoints before trusting their
10893 shadow. Delete disabled breakpoints.
10894 (check_mem_write): Validate breakpoints before trusting they
10895 should be inserted. Delete disabled breakpoints.
10896 * mem-break.h (validate_breakpoints):
10897 * server.c (handle_query): Validate breakpoints when we see a
10898 qSymbol query.
10899
10900 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10901
10902 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10903 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10904 if we could tell there's a GDB breakpoint at stop_pc.
10905 (need_step_over_p): Don't do a step over if we find a GDB
10906 breakpoint at the resume PC.
10907
10908 * mem-break.c (struct raw_breakpoint): New.
10909 (enum bkpt_type): New type `gdb_breakpoint'.
10910 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10911 fields. New field `raw'.
10912 (find_raw_breakpoint_at): New.
10913 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10914 breakpoint instead.
10915 (set_breakpoint_at): Adjust.
10916 (delete_raw_breakpoint): New.
10917 (release_breakpoint): New.
10918 (delete_breakpoint): Rename to...
10919 (delete_breakpoint_1): ... this. Add proc parameter. Use
10920 release_breakpoint. Return ENOENT.
10921 (delete_breakpoint): Reimplement.
10922 (find_breakpoint_at): Delete.
10923 (find_gdb_breakpoint_at): New.
10924 (delete_breakpoint_at): Delete.
10925 (set_gdb_breakpoint_at): New.
10926 (delete_gdb_breakpoint_at): New.
10927 (gdb_breakpoint_here): New.
10928 (set_reinsert_breakpoint): Use release_breakpoint.
10929 (uninsert_breakpoint): Rename to ...
10930 (uninsert_raw_breakpoint): ... this.
10931 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10932 (reinsert_raw_breakpoint): Change parameter type to
10933 raw_breakpoint.
10934 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10935 instead.
10936 (check_breakpoints): Adjust. Use release_breakpoint.
10937 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10938 (breakpoint_inserted_here): Ditto.
10939 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10940 Don't trust the breakpoint's shadow if it is not inserted.
10941 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10942 (delete_all_breakpoints): Adjust.
10943 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10944 use delete_breakpoint_1.
10945
10946 * mem-break.h (breakpoints_supported): Delete declaration.
10947 (set_gdb_breakpoint_at): Declare.
10948 (gdb_breakpoint_here): Declare.
10949 (delete_breakpoint_at): Delete.
10950 (delete_gdb_breakpoint_at): Declare.
10951
10952 * server.h (struct raw_breakpoint): Forward declare.
10953 (struct process_info): New field `raw_breakpoints'.
10954
10955 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10956 breakpoints.
10957
10958 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10959
10960 * linux-low.c (status_pending_p_callback): Fix comment.
10961 (linux_wait_for_event_1): Move most of the internal breakpoint
10962 handling from here...
10963 (linux_wait_1): ... to here.
10964 (count_events_callback): New.
10965 (select_singlestep_lwp_callback): New.
10966 (select_event_lwp_callback): New.
10967 (cancel_breakpoints_callback): New.
10968 (select_event_lwp): New.
10969 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10970 priority to all LWPs that have had events that should be reported
10971 to the client. Cancel breakpoints when about to reporting the
10972 event to the client, not while stopping lwps. No longer cancel
10973 finished single-steps here.
10974 (cancel_finished_single_step): Delete.
10975 (cancel_finished_single_steps): Delete.
10976
10977 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10978
10979 * mem-break.c (enum bkpt_type): New.
10980 (struct breakpoint): New field `type'.
10981 (set_breakpoint_at): Change return type to struct breakpoint
10982 pointer. Set type to `other_breakpoint' by default.
10983 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10984 in the breakpoint list.
10985 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10986 (reinsert_breakpoint): Rename to ...
10987 (reinsert_raw_breakpoint): ... this.
10988 (reinsert_breakpoints_at): Adjust.
10989 * mem-break.h (struct breakpoint): Declare.
10990 (set_breakpoint_at): Change return type to struct breakpoint
10991 pointer.
10992
10993 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10994
10995 * server.c (handle_query): Assign, not compare.
10996
10997 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10998
10999 Teach linux gdbserver to step-over-breakpoints.
11000
11001 * linux-low.c (can_hardware_single_step): New.
11002 (supports_breakpoints): New.
11003 (handle_extended_wait): If stopping threads, read the stop pc of
11004 the new cloned LWP.
11005 (get_pc): New.
11006 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11007 low target doesn't support retrieving the PC.
11008 (add_lwp): Set last_resume_kind to resume_continue.
11009 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11010 (linux_attach): Don't clear stop_expected. Set the lwp's
11011 last_resume_kind to resume_stop.
11012 (linux_detach_one_lwp): Don't check for removed breakpoints.
11013 (check_removed_breakpoint): Delete.
11014 (status_pending_p): Rename to ...
11015 (status_pending_p_callback): ... this. Don't check for removed
11016 breakpoints. Don't consider threads that are stopped from GDB's
11017 perspective.
11018 (linux_wait_for_lwp): Always read the stop_pc here.
11019 (cancel_breakpoint): New.
11020 (step_over_bkpt): New global.
11021 (linux_wait_for_event_1): Implement stepping over breakpoints.
11022 (gdb_wants_lwp_stopped): New.
11023 (gdb_wants_all_stopped): New.
11024 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11025 single-step traps here. Store the thread's last reported target
11026 wait status.
11027 (send_sigstop): Don't clear stop_expected. Always set it,
11028 instead.
11029 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11030 (cancel_finished_single_step): New.
11031 (cancel_finished_single_steps): New.
11032 (wait_for_sigstop): Don't cancel finished single-step traps here.
11033 (linux_resume_one_lwp): Don't check for removed breakpoints.
11034 Don't set `step' on non-hardware step archs.
11035 (linux_set_resume_request): Ignore resume_stop requests if already
11036 stopping or stopped. Set the lwp's last_resume_kind.
11037 (resume_status_pending_p): Don't check for removed breakpoints.
11038 (need_step_over_p): New.
11039 (start_step_over): New.
11040 (finish_step_over): New.
11041 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11042 requests. Clear the thread's last reported target waitstatus.
11043 Don't use the `suspended' flag. Don't consider pending breakpoints.
11044 (linux_resume): Start a step-over if necessary.
11045 (proceed_one_lwp): New.
11046 (proceed_all_lwps): New.
11047 (unstop_all_lwps): New.
11048 * linux-low.h (struct lwp_info): Rewrite comment for the
11049 `suspended' flag. Add the `stop_pc' field. Delete the
11050 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11051 Add `'last_resume_kind' and `need_step_over' fields.
11052 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11053 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11054 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11055 (set_raw_breakpoint_at): New.
11056 (set_breakpoint_at): Rewrite to use it.
11057 (reinsert_breakpoint_handler): Delete.
11058 (set_reinsert_breakpoint): New.
11059 (reinsert_breakpoint_by_bp): Delete.
11060 (delete_reinsert_breakpoints): New.
11061 (uninsert_breakpoint): Rewrite.
11062 (uninsert_breakpoints_at): New.
11063 (reinsert_breakpoint): Rewrite.
11064 (reinsert_breakpoints_at): New.
11065 (check_breakpoints): Rewrite.
11066 (breakpoint_here): New.
11067 (breakpoint_inserted_here): New.
11068 (check_mem_read): Adjust.
11069 * mem-break.h (breakpoints_supported, breakpoint_here)
11070 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11071 (reinsert_breakpoint_by_bp): Delete declaration.
11072 (delete_reinsert_breakpoints): Declare.
11073 (reinsert_breakpoint): Delete declaration.
11074 (reinsert_breakpoints_at): Declare.
11075 (uninsert_breakpoint): Delete declaration.
11076 (uninsert_breakpoints_at): Declare.
11077 (check_breakpoints): Adjust prototype.
11078 * server.h: Adjust include order.
11079 (struct thread_info): Declare here. Add a `last_status' field.
11080
11081 2010-03-23 Michael Snyder <msnyder@vmware.com>
11082
11083 * server.c (crc32): New function.
11084 (handle_query): Add handling for 'qCRC:' request.
11085
11086 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11087
11088 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11089 lwp had been stopped by a watchpoint.
11090
11091 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11092
11093 * server.h (internal_error): Declare.
11094 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11095 * utils.c (internal_error): New function.
11096
11097 2010-03-15 Andreas Schwab <schwab@redhat.com>
11098
11099 * configure.srv: Fix typo setting srv_regobj.
11100
11101 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11102
11103 * linux-low.c (fetch_register): Avoid passing a non string literal
11104 format to `error'.
11105 (usr_store_inferior_registers): Ditto.
11106
11107 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11108
11109 * linux-low.c (linux_write_memory): Bail out early if peeking
11110 memory failed.
11111
11112 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11113
11114 * linux-low.h (struct lwp_info): New fields
11115 `stopped_by_watchpoint' and `stopped_data_address'.
11116 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11117 here, and cache them in the lwp object.
11118 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11119 directly.
11120 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11121 field.
11122 (linux_stopped_by_watchpoint): Rewrite.
11123 (linux_stopped_data_address): Rewrite.
11124
11125 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11126
11127 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11128 switching the current inferior, not before.
11129
11130 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11131
11132 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11133 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11134 i386-linux.c and amd64-linux.c.
11135 (reg-i386.o): Removed.
11136 (reg-i386.c): Likewise.
11137 (reg-i386-linux.o): Likewise.
11138 (reg-i386-linux.c): Likewise.
11139 (reg-x86-64.o): Likewise.
11140 (reg-x86-64.c): Likewise.
11141 (reg-x86-64-linux.o): Likewise.
11142 (reg-x86-64-linux.c): Likewise.
11143 (i386.o): New.
11144 (i386.c): Likewise.
11145 (i386-linux.o): Likewise.
11146 (i386-linux.c): Likewise.
11147 (amd64.o): Likewise.
11148 (amd64.c): Likewise.
11149 (amd64-linux.o): Likewise.
11150 (amd64-linux.c): Likewise.
11151
11152 * configure.srv (srv_i386_regobj): New.
11153 (srv_i386_linux_regobj): Likewise.
11154 (srv_amd64_regobj): Likewise.
11155 (srv_amd64_linux_regobj): Likewise.
11156 (srv_i386_32bit_xmlfiles): Likewise.
11157 (srv_i386_64bit_xmlfiles): Likewise.
11158 (srv_i386_xmlfiles): Likewise.
11159 (srv_amd64_xmlfiles): Likewise.
11160 (srv_i386_linux_xmlfiles): Likewise.
11161 (srv_amd64_linux_xmlfiles): Likewise.
11162 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11163 srv_xmlfiles to $srv_i386_xmlfiles.
11164 (i[34567]86-*-mingw32ce*): Likewise.
11165 (i[34567]86-*-mingw*): Likewise.
11166 (i[34567]86-*-nto*): Likewise.
11167 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11168 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11169 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11170 (x86_64-*-linux*): Likewise.
11171
11172 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11173 (init_registers_amd64_linux): New.
11174 (x86_arch_setup): Replace init_registers_x86_64_linux with
11175 init_registers_amd64_linux.
11176
11177 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11178
11179 * configure.ac: Check for libdl. If it is not available link against
11180 static libthread_db.
11181 * configure: Regenerate.
11182
11183 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11184
11185 PR9605
11186
11187 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11188 handing a read watchpoint.
11189 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11190
11191 2010-02-12 Doug Evans <dje@google.com>
11192
11193 * linux-low.c (linux_supports_tracefork_flag): Document.
11194 (linux_look_up_symbols): Add comment.
11195
11196 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11197
11198 * regcache.c (supply_register): Clear regcache if buf is NULL.
11199
11200 2010-02-02 Nicolas Roche <roche@sourceware.org>
11201 Joel Brobecker <brobecker@adacore.com>
11202
11203 * inferiors.c (find_inferior): Add function documentation.
11204 (unloaded_dll): Handle the case where the unloaded dll has not
11205 been previously registered in the dll list.
11206
11207 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11208
11209 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11210 (thumb2_breakpoint): New.
11211 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11212
11213 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11214
11215 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11216 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11217 breakpoints.
11218
11219 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11222
11223 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11224
11225 * linux-s390-low.c (s390_collect_ptrace_register)
11226 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11227
11228 2010-01-21 Doug Evans <dje@google.com>
11229
11230 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11231 (PTRACE_ARG4_TYPE): New macro.
11232 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11233 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11234 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11235 (usr_store_inferior_registers): Ditto.
11236 (linux_read_memory, linux_write_memory): Ditto.
11237 (linux_test_for_tracefork): Ditto.
11238
11239 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11240 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11241
11242 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11243
11244 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11245 target.
11246
11247 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11248
11249 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11250 prototype to take a regcache. Adjust.
11251
11252 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11253
11254 * regcache.h (struct thread_info): Forward declare.
11255 (struct regcache): New.
11256 (new_register_cache): Adjust prototype.
11257 (get_thread_regcache): Declare.
11258 (free_register_cache): Adjust prototype.
11259 (registers_to_string, registers_from_string): Ditto.
11260 (supply_register, supply_register_by_name, collect_register)
11261 (collect_register_as_string, collect_register_by_name): Ditto.
11262 * regcache.c (struct inferior_regcache_data): Delete.
11263 (get_regcache): Rename to ...
11264 (get_thread_regcache): ... this. Adjust. Switch inferior before
11265 fetching registers.
11266 (regcache_invalidate_one): Adjust.
11267 (regcache_invalidate): Fix prototype.
11268 (new_register_cache): Return the new register cache.
11269 (free_register_cache): Change prototype.
11270 (realloc_register_cache): Adjust.
11271 (registers_to_string): Change prototype to take a regcache. Adjust.
11272 (registers_from_string): Ditto.
11273 (register_data): Ditto.
11274 (supply_register): Ditto.
11275 (supply_register_by_name): Ditto.
11276 (collect_register): Ditto.
11277 (collect_register_as_string): Ditto.
11278 (collect_register_by_name): Ditto.
11279 * server.c (process_serial_event): Adjust.
11280 * linux-low.h (regset_fill_func, regset_store_func): Change
11281 prototype.
11282 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11283 Change prototype.
11284 * linux-low.c (get_stop_pc): Adjust.
11285 (check_removed_breakpoint): Adjust.
11286 (linux_wait_for_event): Adjust.
11287 (linux_resume_one_lwp): Adjust.
11288 (fetch_register): Add regcache parameter. Adjust.
11289 (usr_store_inferior_registers): Ditto.
11290 (regsets_fetch_inferior_registers): Ditto.
11291 (regsets_store_inferior_registers): Ditto.
11292 (linux_fetch_registers, linux_store_registers): Ditto.
11293 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11294 regcache. Adjust.
11295 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11296 Ditto.
11297 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11298 prototype to take a regcache.
11299 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11300 * remote-utils.c (convert_ascii_to_int, outreg)
11301 (prepare_resume_reply): Change prototype to take a regcache.
11302 Adjust.
11303 * target.h (struct target_ops) <fetch_registers, store_registers>:
11304 Change prototype to take a regcache.
11305 (fetch_inferior_registers, store_inferior_registers): Change
11306 prototype to take a regcache. Adjust.
11307 * proc-service.c (ps_lgetregs): Adjust.
11308 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11309 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11310 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11311 take a regcache. Adjust.
11312 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11313 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11314 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11315 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11316 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11317 (cris_cannot_fetch_register):
11318 (cris_breakpoint_at): Change prototype to take a regcache.
11319 Adjust.
11320 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11321 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11322 to take a regcache. Adjust.
11323 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11324 Adjust.
11325 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11326 take a regcache. Adjust.
11327 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11328 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11329 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11330 * linux-mips-low.c (mips_get_pc):
11331 (mips_set_pc): Change prototype to take a regcache. Adjust.
11332 (mips_reinsert_addr): Adjust.
11333 (mips_collect_register): Change prototype to take a regcache.
11334 Adjust.
11335 (mips_supply_register):
11336 (mips_collect_register_32bit, mips_supply_register_32bit)
11337 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11338 (mips_store_fpregset): Ditto.
11339 * linux-ppc-low.c (ppc_supply_ptrace_register)
11340 (ppc_supply_ptrace_register): Ditto.
11341 (parse_spufs_run): Adjust.
11342 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11343 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11344 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11345 take a regcache. Adjust.
11346 * linux-s390-low.c (s390_collect_ptrace_register)
11347 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11348 (s390_set_pc): Change prototype to take a regcache. Adjust.
11349 (s390_arch_setup): Adjust.
11350 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11351 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11352 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11353 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11354 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11355 regcache. Adjust.
11356 (sparc_breakpoint_at): Adjust.
11357 * linux-xtensa-low.c (xtensa_fill_gregset):
11358 (xtensa_store_gregset):
11359 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11360 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11361 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11362 prototype to take a regcache. Adjust.
11363 * win32-arm-low.c (arm_fetch_inferior_register)
11364 (arm_store_inferior_register): Change prototype to take a
11365 regcache. Adjust.
11366 * win32-i386-low.c (i386_fetch_inferior_register)
11367 (i386_store_inferior_register): Change prototype to take a
11368 regcache. Adjust.
11369 * win32-low.c (child_fetch_inferior_registers)
11370 (child_store_inferior_registers): Change prototype to take a
11371 regcache. Adjust.
11372 (win32_wait): Adjust.
11373 (win32_fetch_inferior_registers): Change prototype to take a
11374 regcache. Adjust.
11375 (win32_store_inferior_registers): Adjust.
11376 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11377 store_inferior_register>: Change prototype to take a regcache.
11378
11379 2010-01-20 Doug Evans <dje@google.com>
11380
11381 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11382 #ifdef.
11383 (linux_wait_for_event1, linux_init_signals): Ditto.
11384 (W_STOPCODE): Provide definition if missing.
11385
11386 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11387
11388 * linux-low.c (linux_core_of_thread): New.
11389 (compare_ints, show_process, list_threads): New.
11390 (linux_qxfer_osdata): Report threads and cores.
11391 (linux_target_op): Register linux_core_of_thread.
11392 * remote-utils.c (prepare_resume_reply): Report the core.
11393 (buffer_xml_printf): Support %d specifier.
11394 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11395 New.
11396 (handle_query): Handle qXfer:threads. Announce availability
11397 thereof.
11398 * target.h (struct target_ops): New field core_of_thread.
11399
11400 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11401
11402 * Makefile.in (clean): Remove new generated files.
11403 (reg-s390.o, reg-s390.c): Remove rules.
11404 (reg-s390x.o, reg-s390x.c): Likewise.
11405 (s390-linux32.o, s390-linux32.c): Add rules.
11406 (s390-linux64.o, s390-linux64.c): Likewise.
11407 (s390x-linux64.o, s390x-linux64.c): Likewise.
11408 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11409 * linux-s390-low.c: Include <elf.h>.
11410 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11411 (init_registers_s390): Remove prototype.
11412 (init_registers_s390x): Likewise.
11413 (init_registers_s390_linux32): Add prototype.
11414 (init_registers_s390_linux64): Likewise.
11415 (init_registers_s390x_linux64): Likewise.
11416 (s390_num_regs_3264): New define.
11417 (s390_regmap_3264): New global variable.
11418 (s390_cannot_fetch_register): Remove obsolete check.
11419 (s390_cannot_store_register): Likewise.
11420 (s390_collect_ptrace_register): Handle upper/lower register halves.
11421 (s390_supply_ptrace_register): Likewise.
11422 (s390_fill_gregset): Update to register number changes.
11423 (s390_get_hwcap): New routine.
11424 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11425 Install appropriate regmap and register set.
11426
11427 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11428
11429 * server.c (gdbserver_version): Update copyright year to 2010.
11430 * gdbreplay.c (gdbreplay_version): Likewise.
11431
11432 2009-12-28 Doug Evans <dje@google.com>
11433
11434 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11435 elf/external.h. Include <elf.h> instead but only if necessary.
11436
11437 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11438
11439 * linux-low.c (linux_remove_process): Remove `detaching'
11440 parameter. Don't release/detach from thread_db here.
11441 (linux_kill): Release/detach from thread_db here, ...
11442 (linux_detach): ... and here, before actually detaching.
11443 (linux_wait_1): ... and here, when a process exits.
11444 * thread-db.c (any_thread_of): New.
11445 (thread_db_free): Switch the current inferior to a thread of the
11446 passed in process.
11447
11448 2009-12-21 Doug Evans <dje@google.com>
11449
11450 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11451
11452 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11453 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11454 warning ifndef __NR_tkill. Move setting of errno there too.
11455 Delete unnecessary resetting of errno after syscall.
11456 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11457
11458 * configure.ac: Check for dladdr.
11459 * config.in: Regenerate.
11460 * configure: Regenerate.
11461 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11462 (try_thread_db_load): Update.
11463
11464 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11465
11466 2009-12-18 Doug Evans <dje@google.com>
11467
11468 * event-loop.c: Include unistd.h if it exists.
11469
11470 * linux-low.c (my_waitpid): Move definition away from being in
11471 between linux_tracefork_child/linux_test_for_tracefork.
11472
11473 * gdb_proc_service.h (psaddr_t): Fix type.
11474 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11475 signature to match glibc.
11476
11477 2009-12-16 Doug Evans <dje@google.com>
11478
11479 * linux-low.c (linux_read_memory): Fix argument to read.
11480
11481 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11482
11483 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11484 events, don't leave current_inferior pointing at null.
11485
11486 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11487
11488 * win32-low.c (LOG): Delete.
11489 (OUTMSG): Output to stderr.
11490 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11491 on compile time LOG macro.
11492 (win32_wait): Fix debug output.
11493
11494 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11495
11496 * win32-low.c (win32_add_one_solib): If the dll name is
11497 "ntdll.dll", prepend the system directory to the dll path.
11498
11499 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11500
11501 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11502
11503 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11504 Vladimir Prus <vladimir@codesourcery.com>
11505
11506 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11507 * configure.ac: Check for __mcoldfire__ and set
11508 gdb_cv_m68k_is_coldfire.
11509 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11510 reg-cf.o and reg-m68k.o.
11511 * configure: Regenerated.
11512
11513 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11514
11515 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11516 Pass it to thread_db_free.
11517 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11518 proper `detaching' argument to linux_remove_process.
11519 * linux-low.h (thread_db_free): Add `detaching' parameter.
11520 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11521 to thread_db_free.
11522 (thread_db_free): Add `detaching' parameter. Only
11523 call td_ta_clear_event if detaching from process.
11524
11525 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11526
11527 * thread-db.c (thread_db_free): Fix typo.
11528
11529 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11530
11531 PR gdb/10838
11532 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11533
11534 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11535
11536 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11537 with an i686 compiler.
11538 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11539 needed.
11540 * configure: Rebuilt.
11541
11542 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11543
11544 PR gdb/10783
11545
11546 * server.c (handle_search_memory_1): Correct read_addr initialization
11547 in loop for searching subsequent chunks.
11548
11549 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11550
11551 * configure.ac: New --with-libthread-db option.
11552 * thread-db.c: Allow direct dependence on libthread_db.
11553 (thread_db_free): Adjust.
11554 * config.in: Regenerate.
11555 * configure: Likewise.
11556
11557 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11558
11559 PR gdb/10757
11560 * thread-db.c (attach_thread): New function.
11561 (maybe_attach_thread): Return success/failure.
11562 (find_new_threads_callback): Adjust.
11563 (thread_db_find_new_threads): Loop until no new threads.
11564
11565 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11566
11567 * proc-service.c (ps_lgetregs): Formatting.
11568
11569 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11570
11571 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11572 * configure.ac: Adjust.
11573 * linux-low.h (struct process_info_private): Move members to struct
11574 thread_db.
11575 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11576 * linux-low.c (linux_remove_process): Adjust.
11577 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11578 * server.c (handle_query): Move code ...
11579 (handle_monitor_command): ... here. New function.
11580 * target.h (struct target_ops): New member.
11581 * thread-db.c (struct thread_db): New.
11582 (libthread_db_search_path): New variable.
11583 (thread_db_create_event, thread_db_enable_reporting)
11584 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11585 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11586 (try_thread_db_load_1, dladdr_to_soname): New functions.
11587 (try_thread_db_load, thread_db_load_search): New functions.
11588 (thread_db_init): Search for libthread_db.
11589 (thread_db_free): New function.
11590 (thread_db_handle_monitor_command): Likewise.
11591 * config.in: Regenerate.
11592 * configure: Regenerate.
11593
11594 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11595
11596 * spu-low.c (spu_kill): Wait for inferior to terminate.
11597 Call clear_inferiors.
11598 (spu_detach): Call clear_inferiors.
11599
11600 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11601
11602 * aclocal.m4: Regenerate.
11603 * config.in: Likewise.
11604 * configure: Likewise.
11605
11606 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11607
11608 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11609 (parse_spufs_run): New function.
11610 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11611 (ppc_breakpoint_at): Handle SPU breakpoints.
11612
11613 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11614
11615 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11616 (SPUFS_MAGIC): Define.
11617 (spu_enumerate_spu_ids): New function.
11618 (linux_qxfer_spu): New function.
11619 (linux_target_ops): Install linux_qxfer_spu.
11620
11621 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11622
11623 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11624 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11625 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11626 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11627 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11628 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11629 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11630 (init_registers_powerpc_cell32l): Add prototype.
11631 (init_registers_powerpc_cell64l): Likewise.
11632 (ppc_arch_setup): Detect Cell/B.E. architecture.
11633
11634 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11635
11636 * Makefile.in (datarootdir): New variable.
11637
11638 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * linux-low.c (linux_write_memory): Update debugging output.
11641 * Makefile.in (clean): Add new descriptions.
11642 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11643 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11644 * configure.srv: Add new files for arm*-*-linux*.
11645 * linux-arm-low.c: Add new declarations.
11646 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11647 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11648 (HWCAP_VFPv3D16): New.
11649 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11650 instead of __IWMMXT__.
11651 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11652 (arm_arch_setup): New.
11653 (target_regsets): Remove #ifdef. Add VFP regset.
11654 (the_low_target): Use arm_arch_setup.
11655
11656 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11659 the main thread again.
11660
11661 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11662
11663 Adding Neutrino gdbserver.
11664 * configure: Regenerated.
11665 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11666 * configure.srv (i[34567]86-*-nto*): New target.
11667 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11668 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11669 (nto_comctrl) [__QNX__]: New function.
11670 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11671
11672 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11673
11674 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11675 srv_tgtobj.
11676
11677 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11678 Pedro Alves <pedro@codesourcery.com>
11679
11680 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11681 don't support CONTEXT_EXTENDED_REGISTERS.
11682 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11683 (the_low_target): Install them.
11684 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11685 failing with ERROR_PIPE_NOT_CONNECTED.
11686
11687 2009-06-30 Doug Evans <dje@google.com>
11688 Pierre Muller <muller@ics.u-strasbg.fr>
11689
11690 Add h/w watchpoint support to x86-linux, win32-i386.
11691 * Makefile.in (SFILES): Add i386-low.c
11692 (i386_low_h): Define.
11693 (i386-low.o): Add dependencies.
11694 (linux-x86-low.o): Add i386-low.h dependency.
11695 (win32-i386-low.o): Ditto.
11696 * i386-low.c: New file.
11697 * i386-low.h: New file.
11698 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11699 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11700 * linux-low.c (linux_add_process): Initialize arch_private.
11701 (linux_remove_process): Free arch_private.
11702 (add_lwp): Initialize arch_private.
11703 (delete_lwp): Free arch_private.
11704 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11705 provided.
11706 * linux-low.h (process_info_private): New member arch_private.
11707 (lwp_info): New member arch_private.
11708 (linux_target_ops): New members new_process, new_thread,
11709 prepare_to_resume.
11710 (ptid_of): New macro.
11711 * linux-x86-low.c: Include stddef.h, i386-low.h.
11712 (arch_process_info): New struct.
11713 (arch_lwp_info): New struct.
11714 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11715 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11716 (i386_dr_low_get_status): New function.
11717 (x86_insert_point, x86_remove_point): New functions.
11718 (x86_stopped_by_watchpoint): New function.
11719 (x86_stopped_data_address): New function.
11720 (x86_linux_new_process, x86_linux_new_thread): New functions.
11721 (x86_linux_prepare_to_resume): New function.
11722 (the_low_target): Add entries for insert_point, remove_point,
11723 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11724 prepare_to_resume.
11725 * server.c (debug_hw_points): New global.
11726 (monitor_show_help): Document set debug-hw-points.
11727 (handle_query): Process "set debug-hw-points".
11728 * server.h (debug_hw_points): Declare.
11729 (paddress): Declare.
11730 * utils.c (NUMCELLS, CELLSIZE): New macros.
11731 (get_sell, xsnprintf, paddress): New functions.
11732 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11733 remove_point, stopped_by_watchpoint, stopped_data_address.
11734 * win32-i386-low.c: Include i386-low.h.
11735 (debug_reg_state): Replaces dr.
11736 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11737 (i386_dr_low_get_status): New function.
11738 (i386_insert_point, i386_remove_point): New functions.
11739 (i386_stopped_by_watchpoint): New function.
11740 (i386_stopped_data_address): New function.
11741 (i386_initial_stuff): Update.
11742 (get_thread_context,set_thread_context,i386_thread_added): Update.
11743 (the_low_target): Add entries for insert_point,
11744 remove_point, stopped_by_watchpoint, stopped_data_address.
11745 * win32-low.c (win32_insert_watchpoint): New function.
11746 (win32_remove_watchpoint): New function.
11747 (win32_stopped_by_watchpoint): New function.
11748 (win32_stopped_data_address): New function.
11749 (win32_target_ops): Add entries for insert_watchpoint,
11750 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11751 * win32-low.h (win32_target_ops): New members insert_point,
11752 remove_point, stopped_by_watchpoint, stopped_data_address.
11753
11754 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11755
11756 * server.c (process_serial_event): Re-return unsupported, not
11757 error, if the type isn't recognized. Re-allow supporting only
11758 insert or remove packets. Also call require_running for
11759 breakpoints. Add missing break statement to default case. Tidy.
11760 * target.h (struct target_ops): Rename insert_watchpoint to
11761 insert_point, and remove_watchpoint to remove_point.
11762
11763 * linux-low.h (struct linux_target_ops): Likewise.
11764 * linux-low.c (linux_insert_watchpoint): Rename to ...
11765 (linux_insert_point): ... this. Adjust.
11766 (linux_remove_watchpoint): Rename to ...
11767 (linux_remove_point): ... this. Adjust.
11768 (linux_target_ops): Adjust.
11769 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11770 (cris_insert_point): ... this.
11771 (cris_remove_watchpoint): Rename to ...
11772 (cris_remove_point): ... this.
11773 (the_low_target): Adjust.
11774
11775 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11776
11777 * server.c (handle_v_kill): Pass signal_pid to
11778 kill_inferior if multi_process is zero.
11779
11780 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11781
11782 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11783 * target.h (target_ops): Comment for *_watchpoint to make it clear
11784 the functions can get types '0' and '1'.
11785
11786 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11787
11788 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11789 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11790 * regcache.c (get_regcache): Likewise.
11791 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11792 * win32-low.c (child_fetch_inferior_registers): Remove check for
11793 regno 0.
11794
11795 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11796 Pedro Alves <pedro@codesourcery.com>
11797
11798 * target.h (struct target_ops) <supports_multi_process>: New
11799 callback.
11800 (target_supports_multi_process): New.
11801 * server.c (handle_query): Even if GDB reports support, only
11802 enable multi-process if the target also supports it. Report
11803 multi-process support only if the target backend supports it.
11804 * linux-low.c (linux_supports_multi_process): New function.
11805 (linux_target_ops): Install it as target_supports_multi_process
11806 callback.
11807
11808 2009-05-24 Doug Evans <dje@google.com>
11809
11810 Global renaming of find_thread_pid to find_thread_ptid.
11811 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11812 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11813 All callers updated.
11814
11815 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11816 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11817 directly.
11818
11819 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11820 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11821 (linux_resume_one_lwp): Ditto.
11822
11823 2009-05-23 Doug Evans <dje@google.com>
11824
11825 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11826 from struct inferior_list_entry * to struct lwp_info *.
11827 All callers updated.
11828
11829 2009-05-13 Doug Evans <dje@google.com>
11830
11831 * linux-x86-low.c: Don't include assert.h.
11832 (x86_siginfo_fixup): Use fatal, not assert.
11833 (x86_arch_setup): Fix comment.
11834
11835 2009-05-12 Doug Evans <dje@google.com>
11836
11837 Biarch support for i386/amd64 gdbserver.
11838 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11839 Add linux-x86-low.c.
11840 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11841 (linux-x86-low.o): Add.
11842 * linux-x86-64-low.c: Delete.
11843 * linux-i386-low.c: Delete.
11844 * linux-x86-low.c: New file.
11845 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11846 linux-x86-low.o.
11847 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11848 linux-x86-low.o.
11849 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11850 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11851 (linux_child_pid_to_exec_file): New function.
11852 (elf_64_header_p, elf_64_file_p): New functions.
11853 (siginfo_fixup): New function.
11854 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11855 give target a chance to convert layout.
11856 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11857 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11858
11859 2009-05-07 Doug Evans <dje@google.com>
11860
11861 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11862 (regsets_store_inferior_registers): Ditto.
11863
11864 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11865
11866 PR server/10048
11867
11868 * linux-low.c (must_set_ptrace_flags): Delete.
11869 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11870 of the global.
11871 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11872 `lwp->must_set_ptrace_flags' instead.
11873 (linux_wait_for_event_1): Set ptrace options here.
11874 (linux_wait_1): ... not here.
11875
11876 2009-04-30 Doug Evans <dje@google.com>
11877
11878 * inferiors.c (started_inferior_callback): New function.
11879 (attached_inferior_callback): New function.
11880 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11881 * server.c (print_started_pid, print_attached_pid): New functions.
11882 (detach_or_kill_for_exit): New function.
11883 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11884 * server.h (have_started_inferiors_p): Declare.
11885 (have_attached_inferiors_p): Declare.
11886
11887 * inferiors.c (remove_process): Fix memory leak, free process.
11888 * linux-low.c (linux_remove_process): New function.
11889 (linux_kill): Call it instead of remove_process.
11890 (linux_detach, linux_wait_1): Ditto.
11891
11892 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11893
11894 * configure.srv: Add x86 Windows CE target.
11895
11896 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11897
11898 * inferiors.c (get_thread_process): Make global.
11899 * server.h (get_thread_process): Add prototype.
11900 * thread-db.c (find_one_thread): Use get_thread_process
11901 instead of current_process.
11902 (thread_db_get_tls_address): Do not crash if called when
11903 thread layer is not yet initialized.
11904
11905 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11906
11907 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11908 * spu-low.c (current_tid): Rename to ...
11909 (current_ptid): ... this.
11910 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11911 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11912 ptid_get_lwp (current_ptid) instead of current_tid.
11913 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11914 instead of current_tid. Use find_process_pid to verify pid
11915 argument is valid. Pass proper argument to remove_process.
11916 (spu_thread_alive): Compare current_ptid instead of current_tid.
11917 (spu_resume): Likewise.
11918
11919 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11920
11921 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11922 variable.
11923
11924 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11925
11926 Implement the multiprocess extensions, and add linux multiprocess
11927 support.
11928
11929 * server.h (ULONGEST): Declare.
11930 (struct ptid, ptid_t): New.
11931 (minus_one_ptid, null_ptid): Declare.
11932 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11933 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11934 (struct inferior_list_entry): Change `id' type from unsigned from
11935 to ptid_t.
11936 (struct sym_cache, struct breakpoint, struct
11937 process_info_private): Forward declare.
11938 (struct process_info): Declare.
11939 (current_process): Declare.
11940 (all_processes): Declare.
11941 (initialize_inferiors): Declare.
11942 (add_thread): Adjust to use ptid_t.
11943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11944 (add_process, remove_process, find_thread_pid): Declare.
11945 (find_inferior_id): Adjust to use ptid_t.
11946 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11947 (multi_process): Declare.
11948 (push_event): Adjust to use ptid_t.
11949 (read_ptid, write_ptid): Declare.
11950 (prepare_resume_reply): Adjust to use ptid_t.
11951 (clear_symbol_cache): Declare.
11952 * inferiors.c (all_processes): New.
11953 (null_ptid, minus_one_ptid): New.
11954 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11955 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11956 (add_thread): Change unsigned long to ptid. Remove gdb_id
11957 parameter. Adjust.
11958 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11959 (gdb_id_to_thread): Rename to ...
11960 (find_thread_pid): ... this. Change unsigned long to ptid.
11961 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11962 (loaded_dll, pull_pid_from_list): Adjust.
11963 (add_process, remove_process, find_process_pid)
11964 (get_thread_process, current_process, initialize_inferiors): New.
11965 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11966 (struct target_waitstatus) <related_pid>: Ditto.
11967 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11968 return type to int.
11969 (struct target_ops) <join>: Add `pid' argument.
11970 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11971 (struct target_ops) <wait>: Add `ptid' field. Change return type
11972 to ptid.
11973 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11974 (mywait): Add `ptid' argument. Change return type to ptid_t.
11975 (target_pid_to_str): Declare.
11976 * target.c (set_desired_inferior): Adjust to use ptids.
11977 (mywait): Add new `ptid' argument. Adjust.
11978 (target_pid_to_str): New.
11979 * mem-break.h (free_all_breakpoints): Declare.
11980 * mem-break.c (breakpoints): Delelete.
11981 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11982 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11983 to use per-process breakpoint list.
11984 (free_all_breakpoints): New.
11985 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11986 (symbol_cache, all_symbols_looked_up): Delete.
11987 (hexchars): New.
11988 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11989 read_ptid): New.
11990 (prepare_resume_reply): Change ptid argument's type from unsigned
11991 long to ptid_t. Adjust. Implement W;process and X;process.
11992 (free_sym_cache, clear_symbol_cache): New.
11993 (look_up_one_symbol): Adjust to per-process symbol cache. *
11994 * server.c (cont_thread, general_thread, step_thread): Change type
11995 to ptid_t.
11996 (attached): Delete.
11997 (multi_process): New.
11998 (last_ptid): Change type to ptid_t.
11999 (struct vstop_notif) <ptid>: Change type to ptid_t.
12000 (queue_stop_reply, push_event): Change `ptid' argument's type to
12001 ptid_t.
12002 (discard_queued_stop_replies): Add `pid' argument.
12003 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12004 changes. Don't reference the `attached' global.
12005 (attach_inferior): Adjust to mywait interface changes.
12006 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12007 features. Handle and report "multiprocess+". Handle
12008 "qAttached:PID".
12009 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12010 changes.
12011 (handle_v_kill): New.
12012 (handle_v_stopped): Adjust to use target_pid_to_str.
12013 (handle_v_requests): Allow multiple attaches and runs when
12014 multiprocess extensions are in effect. Handle "vKill".
12015 (myresume): Adjust to use ptids.
12016 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12017 (handle_status): Adjust to discard_queued_stop_replies interface
12018 change.
12019 (first_thread_of, kill_inferior_callback)
12020 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12021 (main): Call initialize_inferiors. Adjust to use ptids, killing
12022 and detaching from all inferiors. Handle multiprocess packet
12023 variants.
12024 * linux-low.h: Include gdb_proc_service.h.
12025 (struct process_info_private): New.
12026 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12027 <lwpid_of>: Use ptid_get_lwp.
12028 (get_lwp_thread): Adjust.
12029 (struct lwp_info): Add `dead' member.
12030 (find_lwp_pid): Declare.
12031 * linux-low.c (thread_db_active): Delete.
12032 (new_inferior): Adjust comment.
12033 (inferior_pid): Delete.
12034 (linux_add_process): New.
12035 (handle_extended_wait): Adjust.
12036 (add_lwp): Change unsigned long to ptid.
12037 (linux_create_inferior): Add process to processes table. Adjust
12038 to use ptids. Don't set new_inferior here.
12039 (linux_attach_lwp): Rename to ...
12040 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12041 it. Adjust to use ptids.
12042 (linux_attach_lwp): New.
12043 (linux_attach): Add process to processes table. Don't set
12044 new_inferior here.
12045 (struct counter): New.
12046 (second_thread_of_pid_p, last_thread_of_process_p): New.
12047 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12048 multiple processes.
12049 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12050 processes. Remove process from process table.
12051 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12052 to multiple processes.
12053 (any_thread_of): New.
12054 (linux_detach): Add `pid' argument, and handle it. Remove process
12055 from processes table.
12056 (linux_join): Add `pid' argument. Handle it.
12057 (linux_thread_alive): Change unsighed long argument to ptid_t.
12058 Consider dead lwps as not being alive.
12059 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12060 threads we're not interested in.
12061 (same_lwp, find_lwp_pid): New.
12062 (linux_wait_for_lwp): Change `pid' argument's type from int to
12063 ptid_t. Adjust.
12064 (linux_wait_for_event): Rename to ...
12065 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12066 from int to ptid_t. Adjust.
12067 (linux_wait_for_event): New.
12068 (linux_wait_1): Add `ptid' argument. Change return type to
12069 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12070 that exit from the process table.
12071 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12072 Adjust.
12073 (mark_lwp_dead): New.
12074 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12075 stopping all threads, mark its main lwp as dead.
12076 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12077 ptids.
12078 (fetch_register, usr_store_inferior_registers)
12079 (regsets_fetch_inferior_registers)
12080 (regsets_store_inferior_registers, linux_read_memory)
12081 (linux_write_memory): Inline `inferior_pid'.
12082 (linux_look_up_symbols): Adjust to use per-process
12083 `thread_db_active'.
12084 (linux_request_interrupt): Adjust to use ptids.
12085 (linux_read_auxv): Inline `inferior_pid'.
12086 (initialize_low): Don't reference thread_db_active.
12087 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12088 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12089 (ps_getpid): Return the pid of the current inferior.
12090 * thread-db.c (proc_handle, thread_agent): Delete.
12091 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12092 per-process data.
12093 (find_one_thread): Change argument type to ptid_t. Adjust to
12094 per-process data.
12095 (maybe_attach_thread): Adjust to per-process data and ptids.
12096 (thread_db_find_new_threads): Ditto.
12097 (thread_db_init): Ditto.
12098 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12099 processes table. Adjust to use ptids.
12100 (spu_kill, spu_detach): Adjust interface. Remove process from
12101 processes table.
12102 (spu_join, spu_thread_alive): Adjust interface.
12103 (spu_wait): Adjust interface. Remove process from processes
12104 table. Adjust to use ptids.
12105 * win32-low.c (current_inferior_tid): Delete.
12106 (current_inferior_ptid): New.
12107 (debug_event_ptid): New.
12108 (thread_rec): Take a ptid. Adjust.
12109 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12110 (child_delete_thread): Ditto.
12111 (do_initial_child_stuff): Add `attached' argument. Add process to
12112 processes table.
12113 (child_fetch_inferior_registers, child_store_inferior_registers):
12114 Adjust.
12115 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12116 (win32_attach): Pass 1 to do_initial_child_stuff.
12117 (win32_kill): Adjust interface. Remove process from processes
12118 table.
12119 (win32_detach): Ditto.
12120 (win32_join): Adjust interface.
12121 (win32_thread_alive): Take a ptid.
12122 (win32_resume): Adjust to use ptids.
12123 (get_child_debug_event): Ditto.
12124 (win32_wait): Adjust interface. Remove exiting process from
12125 processes table.
12126
12127 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12128
12129 Non-stop mode support.
12130
12131 * server.h (non_stop): Declare.
12132 (gdb_client_data, handler_func): Declare.
12133 (delete_file_handler, add_file_handler, start_event_loop):
12134 Declare.
12135 (handle_serial_event, handle_target_event, push_event)
12136 (putpkt_notif): Declare.
12137 * target.h (enum resume_kind): New.
12138 (struct thread_resume): Replace `step' field by `kind' field.
12139 (TARGET_WNOHANG): Define.
12140 (struct target_ops) <wait>: Add `options' argument.
12141 <supports_non_stop, async, start_non_stop>: New fields.
12142 (target_supports_non_stop, target_async): New.
12143 (start_non_stop): Declare.
12144 (mywait): Add `options' argument.
12145 * target.c (mywait): Add `options' argument. Print child exit
12146 notifications here.
12147 (start_non_stop): New.
12148 * server.c (non_stop, own_buf, mem_buf): New globals.
12149 (struct vstop_notif): New.
12150 (notif_queue): New global.
12151 (queue_stop_reply, push_event, discard_queued_stop_replies)
12152 (send_next_stop_reply): New.
12153 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12154 interface changes.
12155 (attach_inferior): In non-stop mode, don't wait for the target
12156 here.
12157 (handle_general_set): Handle QNonStop.
12158 (handle_query): When handling qC, return the current general
12159 thread, instead of the first thread of the list.
12160 (handle_query): If the backend supports non-stop mode, include
12161 QNonStop+ in the qSupported query response.
12162 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12163 and non-stop mode.
12164 (handle_v_attach, handle_v_run): Handle non-stop mode.
12165 (handle_v_stopped): New.
12166 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12167 (myresume): Adjust to use resume_kind. Handle non-stop.
12168 (queue_stop_reply_callback): New.
12169 (handle_status): Handle non-stop mode.
12170 (main): Clear non_stop flag on reconnection. Use the event-loop.
12171 Refactor serial protocol handling from here ...
12172 (process_serial_event): ... to this new function. When GDB
12173 selects any thread, select one here. In non-stop mode, wait until
12174 GDB acks all pending events before exiting.
12175 (handle_serial_event, handle_target_event): New.
12176 * remote-utils.c (remote_open): Install remote_desc in the event
12177 loop.
12178 (remote_close): Remove remote_desc from the event loop.
12179 (putpkt_binary): Rename to...
12180 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12181 (putpkt_binary): New as wrapper around putpkt_binary_1.
12182 (putpkt_notif): New.
12183 (prepare_resume_reply): In non-stop mode, don't change the
12184 general_thread.
12185 * event-loop.c: New.
12186 * Makefile.in (OBJ): Add event-loop.o.
12187 (event-loop.o): New rule.
12188
12189 * linux-low.h (pid_of): Moved here.
12190 (lwpid_of): New.
12191 (get_lwp_thread): Use lwpid_of.
12192 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12193 * linux-low.c (pid_of): Delete.
12194 (inferior_pid): Use lwpid_of.
12195 (linux_event_pipe): New.
12196 (target_is_async_p): New.
12197 (delete_lwp): New.
12198 (handle_extended_wait): Use lwpid_of.
12199 (add_lwp): Don't set lwpid field.
12200 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12201 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12202 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12203 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12204 first. Adjust to linux_wait_for_event interface changes. Use
12205 lwpid_of.
12206 (linux_detach): Don't delete the main lwp here.
12207 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12208 (status_pending_p): Don't consider explicitly suspended lwps.
12209 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12210 pointer. Add OPTIONS argument. Change return type to int. Use
12211 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12212 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12213 pointer. Add status pointer argument. Return a pid instead of a
12214 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12215 changes. In non-stop mode, don't switch to a random thread.
12216 (linux_wait): Rename to...
12217 (linux_wait_1): ... this. Add target_options argument, and handle
12218 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12219 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12220 clean exit and signal exit code. Don't stop all threads in
12221 non-stop mode. In all-stop mode, only stop all threads when
12222 reporting a stop to GDB. Handle explicit thread stop requests.
12223 (async_file_flush, async_file_mark): New.
12224 (linux_wait): New.
12225 (send_sigstop): Use lwpid_of.
12226 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12227 interface changes. In non-stop mode, don't switch to a random
12228 thread.
12229 (linux_resume_one_lwp): Use lwpid_of.
12230 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12231 (linux_resume_one_thread): ... this. Handle resume_stop. In
12232 non-stop mode, don't look for pending flag in all threads.
12233 (resume_status_pending_p): Don't consider explicitly suspended
12234 threads.
12235 (my_waitpid): Reimplement. Emulate __WALL.
12236 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12237 Use lwpid_of.
12238 (sigchld_handler, linux_supports_non_stop, linux_async)
12239 (linux_start_non_stop): New.
12240 (linux_target_ops): Register linux_supports_non_stop, linux_async
12241 and linux_start_non_stop.
12242 (initialize_low): Install SIGCHLD handler.
12243 * thread-db.c (thread_db_create_event, find_one_thread)
12244 (thread_db_get_tls_address): Use lwpid_of.
12245 * win32-low.c (win32_detach): Adjust to use resume_kind.
12246 (win32_wait): Add `options' argument.
12247 * spu-low.c (spu_resume): Adjust to use resume_kind.
12248 (spu_wait): Add `options' argument.
12249
12250 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12251
12252 Decouple target code from remote protocol.
12253
12254 * target.h (enum target_waitkind): New.
12255 (struct target_waitstatus): New.
12256 (struct target_ops) <wait>: Return an unsigned long. Take a
12257 target_waitstatus pointer instead of a char pointer.
12258 (mywait): Likewise.
12259 * target.c (mywait): Change prototype to return an unsigned long.
12260 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12261 * server.h (thread_from_wait, old_thread_from_wait): Delete
12262 declarations.
12263 (prepare_resume_reply): Change prototype to take a
12264 target_waitstatus.
12265 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12266 (last_status, last_ptid): New.
12267 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12268 pid instead of a signal.
12269 (attach_inferior): Remove "status" and "signal" parameters.
12270 Adjust.
12271 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12272 not as an address.
12273 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12274 (handle_v_requests, myresume): Remove "status" and "signal"
12275 parameters. Adjust.
12276 (handle_status): New.
12277 (main): Delete local `status'. Adjust.
12278 * remote-utils.c: Include target.h.
12279 (prepare_resume_reply): Change prototype to take a
12280 target_waitstatus. Adjust.
12281
12282 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12283 interface.
12284 * spu-low.c (spu_wait): Adjust.
12285 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12286 Delete.
12287 (win32_wait): Adjust.
12288
12289 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12290
12291 * target.h (struct thread_resume): Delete leave_stopped member.
12292 (struct target_ops): Add a `n' argument to the `resume' callback.
12293 * server.c (start_inferior): Adjust.
12294 (handle_v_cont, myresume): Adjust.
12295 * linux-low.c (check_removed_breakpoint): Adjust to resume
12296 interface change, and to removed leave_stopped field.
12297 (resume_ptr): Delete.
12298 (struct thread_resume_array): New.
12299 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12300 resume interface change.
12301 (linux_continue_one_thread, linux_queue_one_thread)
12302 (resume_status_pending_p): Check if the resume field is NULL
12303 instead of checking the leave_stopped member.
12304 (linux_resume): Adjust to the target resume interface change.
12305 * spu-low.c (spu_resume): Adjust to the target resume interface
12306 change.
12307 * win32-low.c (win32_detach, win32_resume): Ditto.
12308
12309 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12310
12311 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12312 flag.
12313 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12314 pending.
12315 (linux_continue_one_thread): Only preserve the stepping flag if
12316 there's a pending breakpoint.
12317
12318 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12319
12320 * server.c (main): After the inferior having exited, call
12321 remote_close before exiting gdbserver.
12322
12323 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12324
12325 Fix size of FPSCR in Power 7 processors.
12326 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12327 (PPC_FEATURE_HAS_DFP): New #define.
12328 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12329 size of the FPSCR.
12330
12331 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12332
12333 * server.c (handle_query) Whitespace and formatting.
12334
12335 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12336
12337 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12338 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12339 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12340 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12341 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12342 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12343 Makefile.in, configure.ac: Fix whitespace throughout.
12344 * configure: Regenerate.
12345
12346 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12347
12348 * inferiors.c (find_inferior): Make it safe for the callback
12349 function to delete the currently iterated inferior.
12350
12351 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12352
12353 * Makefile.in (linuw_low_h): Move higher.
12354 (thread-db.o): Depend on $(linux_low_h).
12355
12356 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12357
12358 Rename "process" to "lwp" throughout.
12359
12360 * linux-low.c (all_processes): Rename to...
12361 (all_lwps): ... this.
12362 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12363 (add_process): Rename to ...
12364 (add_lwp): ... this. Adjust.
12365 (linux_create_inferior): Adjust.
12366 (linux_attach_lwp): Adjust.
12367 (linux_attach): Adjust.
12368 (linux_kill_one_process): Rename to ...
12369 (linux_kill_one_lwp): ... this. Adjust.
12370 (linux_kill): Adjust.
12371 (linux_detach_one_process): Rename to ...
12372 (linux_detach_one_lwp): ... this. Adjust.
12373 (linux_detach): Adjust.
12374 (check_removed_breakpoint): Adjust.
12375 (status_pending_p): Adjust.
12376 (linux_wait_for_process): Rename to ...
12377 (linux_wait_for_lwp): ... this. Adjust.
12378 (linux_wait_for_event): Adjust.
12379 (send_sigstop): Adjust.
12380 (wait_for_sigstop): Adjust.
12381 (stop_all_processes): Rename to ...
12382 (stop_all_lwps): ... this.
12383 (linux_resume_one_process): Rename to ...
12384 (linux_resume_one_lwp): ... this. Adjust.
12385 (linux_set_resume_request, linux_continue_one_thread)
12386 (linux_queue_one_thread, resume_status_pending_p)
12387 (usr_store_inferior_registers, regsets_store_inferior_registers)
12388 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12389 Adjust.
12390 * linux-low.h (get_process): Rename to ...
12391 (get_lwp): ... this. Adjust.
12392 (get_thread_process): Rename to ...
12393 (get_thread_lwp): ... this. Adjust.
12394 (get_process_thread): Rename to ...
12395 (get_lwp_thread): ... this. Adjust.
12396 (struct process_info): Rename to ...
12397 (struct lwp_info): ... this.
12398 (all_processes): Rename to ...
12399 (all_lwps): ... this.
12400 * proc-service.c (ps_lgetregs): Adjust.
12401 * thread-db.c (thread_db_create_event, find_one_thread)
12402 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12403
12404 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12405
12406 * server.c (handle_query): Handle "qAttached".
12407
12408 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12409
12410 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12411 GPLv3, update license URL.
12412
12413 2009-03-01 Doug Evans <dje@google.com>
12414
12415 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12416 (server_h): Add gdb_signals.h.
12417 (signals.o): Update.
12418 * server.h (target_signal_from_host,target_signal_to_host_p)
12419 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12420
12421 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12422
12423 * remote-utils.c (getpkt): Also generate remote-debug
12424 information if noack_mode is set.
12425
12426 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12427
12428 * server.c (handle_query): Report qXfer:siginfo:read and
12429 qXfer:siginfo:write as supported and handle them.
12430 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12431 * linux-low.c (linux_xfer_siginfo): New.
12432 (linux_target_ops): Set it.
12433
12434 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12435
12436 * server.c (gdbserver_usage): Mention --remote-debug.
12437 (main): Accept '--remote-debug' switch.
12438
12439 2009-01-18 Doug Evans <dje@google.com>
12440
12441 * regcache.c (new_register_cache): No need to check result of xcalloc.
12442 * server.c (handle_search_memory): Back out calls to xmalloc,
12443 result is checked and error is returned to user upon failure.
12444 (handle_query): Ditto. Add more checks for result of malloc.
12445 (handle_v_cont): Check result of malloc, report error back to
12446 user upon failure.
12447 (handle_v_run): Ditto. Call freeargv.
12448 * server.h (freeargv): Declare.
12449 * utils.c (freeargv): New fn.
12450
12451 2009-01-15 Doug Evans <dje@google.com>
12452
12453 * gdbreplay.c (perror_with_name): Make arg const char *.
12454 * server.h (target_signal_to_name): Make return type const char *.
12455 * thread-db.c (thread_db_err_str): Make return type const char *.
12456 * utils.c (perror_with_name): Make arg const char *.
12457
12458 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12459
12460 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12461 when handling a EXIT_PROCESS_DEBUG_EVENT.
12462
12463 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12464
12465 * gdbreplay.c (gdbreplay_version): Update copyright year.
12466 * server.c (gdbserver_version): Likewise.
12467
12468 2009-01-05 Doug Evans <dje@google.com>
12469
12470 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12471 (handle_extended_wait): Improve comment.
12472
12473 2008-12-13 Doug Evans <dje@google.com>
12474
12475 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12476 * server.h (ATTR_MALLOC): New macro.
12477 (xmalloc,xcalloc,xstrdup): Declare.
12478 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12479 * inferiors.c: Ditto.
12480 * linux-low.c: Ditto.
12481 * mem-break.c: Ditto.
12482 * regcache.c: Ditto.
12483 * remote-utils.c: Ditto.
12484 * server.c: Ditto.
12485 * target.c: Ditto.
12486 * win32-low.c: Ditto.
12487
12488 2008-12-12 Doug Evans <dje@google.com>
12489
12490 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12491 in debugging printf.
12492
12493 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12494
12495 2008-12-09 Doug Evans <dje@google.com>
12496
12497 * linux-low.h (struct process_info): Delete member tid, unused.
12498 * thread-db.c (find_one_thread): Update.
12499 (maybe_attach_thread): Update.
12500
12501 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12502
12503 * target.h (struct target_ops): Add qxfer_osdata member.
12504 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12505 and dirent.h.
12506 (linux_qxfer_osdata): New functions.
12507 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12508 callback.
12509 * server.c (handle_query): Handle "qXfer:osdata:read:".
12510 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12511 (buffer_xml_printf): New functions.
12512 * server.h (struct buffer): New.
12513 (buffer_grow_str, buffer_grow_str0): New macros.
12514 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12515 (buffer_xml_printf): Declare.
12516
12517 2008-11-24 Doug Evans <dje@google.com>
12518
12519 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12520
12521 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * server.c (handle_v_run): Always use the supplied argument list.
12524
12525 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12526
12527 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12528 (xtensa_regmap_table): Add entry for scompare1.
12529
12530 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12531
12532 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12533 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12534 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12535 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12536 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12537 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12538 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12539 XML target descriptions.
12540 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12541 when inferior is running on an ISA 2.05 or later processor. Add
12542 special case to return offset for full 64-bit slot of FPSCR when
12543 in 32-bits.
12544
12545 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12546
12547 * Makefile.in (SFILES, clean): Added sparc64 files.
12548 (reg-sparc64.o, reg-sparc64.c): New.
12549 * configure.srv (sparc*-*-linux*): New configuration.
12550 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12551 syscall arguments for SPARC.
12552 (regsets_store_inferior_registers): Likewise.
12553 * linux-sparc-low.c: New file.
12554
12555 2008-10-21 Doug Evans <dje@google.com>
12556
12557 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12558 (READLINE_DIR,READLINE_DEP): Delete.
12559 (INTERNAL_CFLAGS): Update.
12560 (LINTFLAGS): Update.
12561
12562 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12563
12564 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12565 whole argv from the last run, not just argv[0].
12566
12567 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12568
12569 * regcache.c (new_register_cache): Return NULL if the register
12570 cache size isn't known yet.
12571 (free_register_cache): Avoid dereferencing a NULL regcache.
12572
12573 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12574
12575 * configure.srv: Merge MIPS and MIPS64.
12576
12577 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12578
12579 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12580
12581 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12582
12583 * Makefile.in: Add required vsx dependencies.
12584
12585 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12586 Declare init_registers_powerpc_vsx32l.
12587 Declare init_registers_powerpc_vsx64l.
12588 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12589 (ppc_arch_setup): Check for VSX in hwcap.
12590 (ppc_fill_vsxregset): New function.
12591 (ppc_store_vsxregset): New function.
12592 Add new VSX entry in regset_info target_regsets.
12593
12594 * configure.srv: Add new VSX dependencies.
12595
12596 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12597
12598 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12599 (remote_open): Set or clear transport_is_reliable.
12600 (putpkt_binary): Don't expect acks in noack mode.
12601 (getpkt): Don't send ack/nac in noack mode.
12602 * server.c (handle_general_set): Handle QStartNoAckMode.
12603 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12604 qSupported.
12605 (main): Reset noack_mode on every connection.
12606 * server.h (noack_mode): Declare.
12607
12608 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12609
12610 * Makefile.in (GDBREPLAY_OBS): New variable.
12611 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12612
12613 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12614 Daniel Jacobowitz <dan@codesourcery.com>
12615
12616 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12617 (usr_store_inferior_registers): Likewise.
12618 (regsets_store_inferior_registers): Likewise.
12619
12620 2008-07-31 Rolf Jansen <rj@surtec.com>
12621 Pedro Alves <pedro@codesourcery.com>
12622
12623 * configure.ac: Check for memmem declaration.
12624 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12625 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12626 (disable_packet_qfThreadInfo): Unconditionally compile.
12627 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12628 * configure, config.in: Regenerate.
12629
12630 2008-07-28 Doug Kwan <dougkwan@google.com>
12631
12632 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12633 (linux_write_memory): Remove declaration of errno.
12634
12635 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12636
12637 * linux-low.c (handle_extended_wait): Do not use "status"
12638 variable uninitialized.
12639
12640 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12641
12642 * server.c (handle_v_attach): Inhibit reporting dll changes.
12643
12644 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12645
12646 * remote-utils.c (prepare_resume_reply): If requested, don't
12647 output "thread:TID" in the T stop reply.
12648
12649 * server.c (disable_packet_vCont, disable_packet_Tthread)
12650 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12651 (handle_query): If requested, disable support for qC, qfThreadInfo
12652 and qsThreadInfo.
12653 (handle_v_requests): If requested, disable support for vCont.
12654 (gdbserver_show_disableable): New.
12655 (main): Handle --disable-packet and --disable-packet=LIST.
12656
12657 * server.h (disable_packet_vCont, disable_packet_Tthread)
12658 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12659
12660 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12661
12662 * server.c (gdbserver_usage): Mention --version.
12663
12664 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12665
12666 * Makefile.in (gdbreplay.o): New rule.
12667
12668 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12669
12670 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12671 message, not gdbserver.
12672
12673 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12674 Nathan Sidwell <nathan@codesourcery.com>
12675 Joseph Myers <joseph@codesourcery.com>
12676
12677 * acinclude.m4: Include ../../config/acx.m4.
12678 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12679 * configure, config.in: Regenerate.
12680 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12681 * server.c (gdbserver_version): Print PKGVERSION.
12682 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12683 (main): Adjust gdbserver_usage calls.
12684 * gdbreplay.c (version, host_name): Add declarations.
12685 (gdbreplay_version, gdbreplay_usage): New.
12686 (main): Accept --version and --help options.
12687
12688 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12689
12690 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12691 (arm_breakpoint_at): Handle Thumb.
12692 (the_low_target): Add comment.
12693
12694 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12695
12696 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12697
12698 2008-05-09 Doug Evans <dje@google.com>
12699
12700 * server.h (decode_search_memory_packet): Declare.
12701 * remote-utils.c (decode_search_memory_packet): New fn.
12702 * server.c (handle_search_memory_1): New fn.
12703 (handle_search_memory): New fn.
12704 (handle_query): Process qSearch:memory packets.
12705
12706 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12707
12708 * regcache.c (registers_length): Remove.
12709 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12710 full register packet.
12711 * regcache.h (registers_length): Remove prototype.
12712 * server.h (PBUFSIZ): Define to 16384.
12713
12714 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12715
12716 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12717 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12718 powerpc-64l.o, and powerpc-altivec64l.o.
12719 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12720 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12721 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12722 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12723 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12724 to srv_xmlfiles.
12725
12726 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12727 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12728 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12729 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12730 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12731 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12732 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12733 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12734 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12735 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12736 (clean): Update.
12737
12738 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12739 (init_registers_powerpc_32l): ... this new prototype.
12740 (init_registers_powerpc_32): Remove, replace by ...
12741 (init_registers_powerpc_altivec32l): ... this new prototype.
12742 (init_registers_powerpc_e500): Remove, replace by ...
12743 (init_registers_powerpc_e500l): ... this new prototype.
12744 (init_registers_ppc64): Remove, replace by ...
12745 (init_registers_powerpc_64l): ... this new prototype.
12746 (init_registers_powerpc_64): Remove, replace by ...
12747 (init_registers_powerpc_altivec64l): ... this new prototype.
12748 (ppc_num_regs): Set to 73.
12749 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12750 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12751 (ppc_cannot_store_register): Handle orig_r3 and trap.
12752 (ppc_arch_setup): Update init_registers_... calls.
12753 (ppc_fill_gregset): Handle orig_r3 and trap.
12754
12755 * inferiors.c (clear_inferiors): Reset current_inferior.
12756
12757 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12758
12759 * acinclude.m4: Add override.m4.
12760 * configure: Regenerate.
12761
12762 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12763
12764 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12765 initial call to init_register_ppc64.
12766
12767 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12768
12769 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12770 single powerpc*-*-linux* case.
12771 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12772
12773 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12774
12775 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12776 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12777 from reg_xmlfiles.
12778 * linux-ppc-low.c: Include <elf.h>.
12779 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12780 (ppc_hwcap): New global variable.
12781 (ppc_regmap): Remove __SPE__ #ifdef sections.
12782 (ppc_regmap_e500): New global variable.
12783 (ppc_cannot_store_register): Update __SPE__ special case.
12784 (ppc_get_hwcap): New function.
12785 (ppc_arch_setup): Use it to determine whether inferior supports
12786 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12787 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12788 Do not access registers if target does not support AltiVec.
12789 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12790 Do not access registers if target does not support SPE.
12791 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12792
12793 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12794
12795 * linux-low.c (disabled_regsets, num_regsets): New.
12796 (use_regsets_p): Delete.
12797 (linux_wait_for_process): Clear disabled_regsets.
12798 (regsets_fetch_inferior_registers): Check and set it.
12799 (regsets_store_inferior_registers): Likewise.
12800 (linux_fetch_registers, linux_store_registers): Do not use
12801 use_regsets_p.
12802 (initialize_low): Allocate disabled_regsets.
12803
12804 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12805
12806 * Makefile.in (LIBOBJS): New.
12807 (OBS): Use LIBOBJS.
12808 (memmem.o): New rule.
12809 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12810 * configure: Regenerated.
12811
12812 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12813
12814 * server.c (handle_query): Never return "unsupported" for
12815 qXfer:features:read queries.
12816
12817 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12818
12819 * server.c (get_features_xml): Fix inverted condition.
12820 (handle_query): Always support qXfer:feature:read.
12821
12822 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12823
12824 * server.c (wrapper_argv): New.
12825 (start_inferior): Handle wrapper_argv. If set, expect an extra
12826 trap.
12827 (gdbserver_usage): Document --wrapper.
12828 (main): Parse --wrapper.
12829
12830 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12833 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12834 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12835 (ppc_set_pc): Likewise.
12836 (ppc_arch_setup): New function.
12837 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12838 of collect_register.
12839 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12840
12841 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12842
12843 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12844 instead of linux-ppc64-low.o.
12845 * linux-ppc64-low.c: Remove file.
12846 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12847 (linux-ppc64-low.o): Remove rule.
12848
12849 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12850 (init_registers_powerpc_64): Likewise.
12851 (ppc_regmap): Conditionally define depending on __powerpc64__.
12852 (ppc_cannot_store_register): Do not special-case "fpscr" when
12853 compiled on __powerpc64__.
12854 (ppc_collect_ptrace_register): New function.
12855 (ppc_supply_ptrace_register): New function.
12856 (ppc_breakpoint): Change type to "unsigned int".
12857 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12858 (the_low_target): Conditionally provide initializers for the
12859 arch_setup member depending on __powerpc64__. Install
12860 collect_ptrace_register and supply_ptrace_register members.
12861
12862 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12863
12864 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12865 * server.c (gdbserver_xmltarget): Define.
12866 (get_features_xml): Use it to replace "target.xml" and arch_string.
12867
12868 * configure.srv: Remove srv_xmltarget. Add XML files that were
12869 mentioned there to srv_xmlfiles instead. Remove conditional tests
12870 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12871 srv_xmlfiles and srv_regobj to include all possible choices.
12872 * configure.ac (srv_xmltarget): Remove.
12873 (srv_xmlfiles): Do not add "target.xml".
12874 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12875 checks for supplementary target information.
12876 * configure: Regenerate.
12877 * Makefile.in (XML_TARGET): Remove.
12878 (target.xml): Remove rule.
12879 (clean): Do not clean up target.xml.
12880 (.PRECIOUS): Do not mention target.xml.
12881
12882 * target.h (struct target_ops): Remove arch_string member.
12883 * linux-low.c (linux_arch_string): Remove.
12884 (linux_target_ops): Remove arch_string initializer.
12885 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12886 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12887 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12888 * spu-low.c (spu_arch_string): Remove.
12889 (spu_target_ops): Remove arch_string initializer.
12890 * win32-low.c (win32_arch_string): Remove.
12891 (win32_target_ops): Remove arch_string initializer.
12892 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12893 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12894 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12895
12896 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12897
12898 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12899 by collect_ptrace_register and supply_ptrace_register hooks.
12900 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12901 instead of checking for the_low_target.left_pad_xfer.
12902 (usr_store_inferior_registers): Use collect_ptrace_register callback
12903 instead of checking for the_low_target.left_pad_xfer.
12904
12905 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12906 (s390_supply_ptrace_register): Likewise.
12907 (s390_fill_gregset): Call s390_collect_ptrace_register.
12908 (the_low_target): Update.
12909
12910 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12911 (ppc_supply_ptrace_register): Likewise.
12912 (the_low_target): Update.
12913
12914 * linux-i386-low.c (the_low_target): Update.
12915 * linux-x86-64-low.c (the_low_target): Update.
12916
12917 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12918
12919 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12920 reg-s390.o and reg-s390x.o.
12921
12922 * linux-low.c (new_inferior): New global variable.
12923 (linux_create_inferior, linux_attach): Set it.
12924 (linux_wait_for_process): Call the_low_target.arch_setup after the
12925 target has stopped for the first time.
12926 (initialize_low): Do not call the_low_target.arch_setup.
12927
12928 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12929 (s390_set_pc): Likewise.
12930 (s390_arch_setup): New function.
12931 (the_low_target): Use s390_arch_setup as arch_setup routine.
12932
12933 * regcache.c (realloc_register_cache): New function.
12934 (set_register_cache): Call it for each existing regcache.
12935
12936 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12937
12938 * server.h (init_registers): Remove prototype.
12939
12940 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12941 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12942 instead of init_registers ().
12943 * linux-arm-low.c (init_registers_arm): Add prototype.
12944 (init_registers_arm_with_iwmmxt): Likewise.
12945 (the_low_target): Add initializer for arch_setup field.
12946 * linux-cris-low.c (init_registers_cris): Add prototype.
12947 (the_low_target): Add initializer for arch_setup field.
12948 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12949 (the_low_target): Add initializer for arch_setup field.
12950 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12951 (the_low_target): Add initializer for arch_setup field.
12952 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12953 (the_low_target): Add initializer for arch_setup field.
12954 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12955 (the_low_target): Add initializer for arch_setup field.
12956 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12957 (the_low_target): Add initializer for arch_setup field.
12958 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12959 (init_registers_mips64_linux): Likewise.
12960 (the_low_target): Add initializer for arch_setup field.
12961 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12962 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12963 (the_low_target): Add initializer for arch_setup field.
12964 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12965 (init_registers_powerpc_64): Likewise.
12966 (the_low_target): Add initializer for arch_setup field.
12967 * linux-s390-low.c (init_registers_s390): Add prototype.
12968 (init_registers_s390x): Likewise.
12969 (the_low_target): Add initializer for arch_setup field.
12970 * linux-sh-low.c (init_registers_sh): Add prototype.
12971 (the_low_target): Add initializer for arch_setup field.
12972 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12973 (the_low_target): Add initializer for arch_setup field.
12974 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12975 (the_low_target): Add initializer for arch_setup field.
12976
12977 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12978 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12979 instead of init_registers ().
12980 * win32-arm-low.c (init_registers_arm): Add prototype.
12981 (the_low_target): Add initializer for arch_setup field.
12982 * win32-i386-low.c (init_registers_i386): Add prototype.
12983 (the_low_target): Add initializer for arch_setup field.
12984
12985 * spu-low.c (init_registers_spu): Add prototype.
12986 (initialize_low): Call initialie_registers_spu () instead of
12987 initialize_registers ().
12988
12989 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12990
12991 * server.c (handle_v_requests): When handling the vRun and vAttach
12992 packets, if already debugging a process, don't kill it. Return an
12993 error instead.
12994
12995 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12996
12997 * server.c (handle_query): Correct length check.
12998
12999 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13000
13001 * win32-low.c (do_initial_child_stuff): Add process handle
13002 parameter. Set current_process_handle and current_process_id from the
13003 parameters. Clear globals.
13004 (win32_create_inferior): Don't set current_process_handle and
13005 current_process_id here. Instead pass them on the call to
13006 do_initial_child_stuff.
13007 (win32_attach): Likewise.
13008 (win32_clear_inferiors): New.
13009 (win32_kill): Don't close the current process handle or the
13010 current thread handle here. Instead call win32_clear_inferiors.
13011 (win32_detach): Don't open a new handle to the process. Call
13012 win32_clear_inferiors.
13013 (win32_join): Don't rely on current_process_handle; open a new
13014 handle using the process id.
13015 (win32_wait): Call win32_clear_inferiors when the inferior process
13016 has exited.
13017
13018 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13019
13020 * server.c (monitor_show_help): Add "exit".
13021
13022 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13023
13024 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13025 (clean): Add reg-xtensa.c.
13026 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13027 * configure.srv (xtensa*-*-linux*) New target.
13028 * linux-xtensa-low.c: New.
13029 * xtensa-xtregs.c: New.
13030
13031 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13032
13033 * hostio.c: Don't include errno.h.
13034 (errno_to_fileio_errno): Move to hostio-errno.
13035 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13036 error number outputting to the target->hostio_last_error callback.
13037 (hostio_packet_error): Use FILEIO_EINVAL directly.
13038 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13039 calls to hostio_error.
13040 * hostio-errno.c: New.
13041 * server.h (hostio_last_error_from_errno): Declare.
13042 * target.h (target_ops): Add hostio_last_error member.
13043 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13044 as hostio_last_error handler.
13045 * spu-low.c (spu_target_ops): Likewise.
13046 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13047 (wince_hostio_last_error): New functions.
13048 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13049 as hostio_last_error handler.
13050 (win32_target_ops) [!_WIN32_WCE]: Register
13051 hostio_last_error_from_errno as hostio_last_error handler.
13052 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13053 (hostio-errno.o): New rule.
13054 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13055 * configure.srv (srv_hostio_err_objs): New variable. Default to
13056 hostio-errno.o.
13057 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13058 * configure: Regenerate.
13059
13060 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13061
13062 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13063 (linux_kill, linux_detach): Clean up the process list.
13064 * remote-utils.c (remote_open): Improve port number parsing.
13065 (putpkt_binary, input_interrupt): Only send interrupts if the target
13066 is running.
13067 * server.c (extended_protocol): Make static.
13068 (attached): Define earlier.
13069 (exit_requested, response_needed, program_argv): New variables.
13070 (target_running): New.
13071 (start_inferior): Clear attached here.
13072 (attach_inferior): Set attached here.
13073 (require_running): Define.
13074 (handle_query): Use require_running and target_running. Implement
13075 "monitor exit".
13076 (handle_v_attach, handle_v_run): New.
13077 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13078 (gdbserver_usage): Update.
13079 (main): Redo argument parsing. Handle --debug and --multi. Handle
13080 --attach along with other options or after the port. Save
13081 program_argv. Support no initial program. Resynchronize
13082 communication with GDB after an error. Handle "monitor exit".
13083 Use require_running and target_running. Always allow the extended
13084 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13085 restart in extended mode.
13086 * README: Refer to the GDB manual. Update --attach usage.
13087
13088 2007-12-20 Andreas Schwab <schwab@suse.de>
13089
13090 * linux-low.c (STACK_SIZE): Define.
13091 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13092 (linux_test_for_tracefork): Likewise.
13093
13094 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13095
13096 * linux-low.c (linux_wait_for_event): Update messages. Do not
13097 reinsert auto-delete breakpoints.
13098 * mem-break.c (struct breakpoint): Change return type of handler to
13099 int.
13100 (set_breakpoint_at): Update handler type.
13101 (reinsert_breakpoint_handler): Return 1 instead of calling
13102 delete_breakpoint.
13103 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13104 setting a new one.
13105 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13106 * mem-break.h (set_breakpoint_at): Update handler type.
13107 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13108 * win32-low.c (auto_delete_breakpoint): New.
13109 (get_child_debug_event): Use it.
13110
13111 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * configure.ac: Check for pread and pwrite.
13114 * hostio.c (handle_pread): Fall back to lseek and read.
13115 (handle_pwrite): Fall back to lseek and write.
13116 * config.in, configure: Regenerated.
13117
13118 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13119
13120 * server.c (myresume): Add own_buf argument.
13121 (main): Update calls.
13122
13123 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13124
13125 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13126 * remote-utils.c (remote_open): Do not call disable_async_io.
13127 (block_async_io): Delete.
13128 (unblock_async_io): Make static.
13129 (initialize_async_io): New.
13130 * server.c (handle_v_cont): Handle async I/O here.
13131 (myresume): Likewise. Move other common resume tasks here...
13132 (main): ... from here. Call initialize_async_io. Disable async
13133 I/O before the main loop.
13134 * server.h (initialize_async_io): Declare.
13135 (block_async_io, unblock_async_io): Delete prototypes.
13136 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13137
13138 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13139
13140 * remote-utils.c (readchar): Allow binary data in received messages.
13141
13142 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13143
13144 * win32-low.c (attaching): New global.
13145 (win32_create_inferior): Clear the `attaching' global.
13146 (win32_attach): Set the `attaching' global.
13147 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13148 attaching. Only set a breakpoint at the entry point if not
13149 attaching.
13150
13151 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13152
13153 * server.c (main): Don't report dll events on the initial
13154 connection on attaches.
13155
13156 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13157
13158 * server.c (main): Relax numerical bases supported for the pid of
13159 the --attach command line argument.
13160
13161 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13162
13163 * win32-low.c (win32_attach): Call OpenProcess before
13164 DebugActiveProcess, not after. Add last error output to error
13165 call.
13166
13167 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13168
13169 * win32-low.c (win32_get_thread_context)
13170 (win32_set_thread_context): New functions.
13171 (thread_rec): Use win32_get_thread_context.
13172 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13173 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13174 field.
13175
13176 2007-12-03 Leo Zayas
13177 Pedro Alves <pedro_alves@portugalmail.pt>
13178
13179 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13180 global variables.
13181 (child_add_thread): Minor cleanup.
13182 (child_continue): Resume artificially suspended threads before
13183 calling ContinueDebugEvent.
13184 (suspend_one_thread): New.
13185 (fake_breakpoint_event): New.
13186 (get_child_debug_event): Change return type to int. Check here if
13187 gdb sent an interrupt request. If a soft interrupt was requested,
13188 fake a breakpoint event. Return 0 if there is no event to handle,
13189 and 1 otherwise.
13190 (win32_wait): Don't check here if gdb sent an interrupt request.
13191 Ensure there is a valid event to handle.
13192 (win32_request_interrupt): Add soft interruption method as last
13193 resort.
13194
13195 2007-12-03 Leo Zayas
13196 Pedro Alves <pedro_alves@portugalmail.pt>
13197
13198 * win32-low.h (win32_thread_info): Add descriptions to the
13199 structure members. Replace `suspend_count' counter by a
13200 `suspended' flag.
13201 * win32-low.c (thread_rec): Update condition of when to get the
13202 context from the inferior. Rely on ContextFlags being set if it
13203 has already been retrieved. Only suspend the inferior thread if
13204 we haven't already. Warn if that fails.
13205 (continue_one_thread): s/suspend_count/suspended/. Only call
13206 ResumeThread once. Warn if that fails.
13207
13208 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13209
13210 * win32-low.c (win32_wait): Don't read from the inferior when it
13211 has already exited.
13212
13213 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13214
13215 * Makefile.in (win32_low_h): New variable.
13216 (win32-low.o): Add dependency on $(win32_low_h).
13217 (win32-arm-low.o, win32-i386-low.o): New rules.
13218
13219 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13220
13221 * hostio.c: Correct copyright year.
13222
13223 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13224
13225 * Makefile.in (OBS): Add hostio.o.
13226 (hostio.o): New rule.
13227 * server.h (handle_vFile): Declare.
13228 * hostio.c: New file.
13229 * server.c (handle_v_requests): Take packet_len and new_packet_len
13230 for binary packets. Call handle_vFile.
13231 (main): Update call to handle_v_requests.
13232
13233 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * linux-low.c: Include <sched.h>.
13236
13237 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13238
13239 * linux-low.c (linux_tracefork_grandchild): New.
13240 (linux_tracefork_child): Use clone.
13241 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13242
13243 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13244
13245 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13246
13247 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13248
13249 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13250
13251 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13252
13253 * inferiors.c (change_inferior_id): Delete.
13254 (add_pid_to_list, pull_pid_from_list): New.
13255 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13256 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13257 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13258 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13259 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13260 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13261 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13262 (using_threads): Always set to 1.
13263 (handle_extended_wait): New.
13264 (add_process): Do not set TID.
13265 (linux_create_inferior): Set must_set_ptrace_flags.
13266 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13267 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13268 (linux_thread_alive): Rename TID argument to LWPID.
13269 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13270 (linux_wait_for_event): Do not use TID or check using_threads. Update
13271 call to dead_thread_notify. Call handle_extended_wait.
13272 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13273 (send_sigstop): Delete sigstop_sent.
13274 (wait_for_sigstop): Avoid TID.
13275 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13276 (linux_test_for_tracefork): New.
13277 (linux_lookup_signals): Use thread_db_active and
13278 linux_supports_tracefork_flag.
13279 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13280 * linux-low.h (get_process_thread): Avoid TID.
13281 (struct process_ifo): Move thread_known and tid to the end. Remove
13282 sigstop_sent.
13283 (linux_attach_lwp, thread_db_init): Update prototypes.
13284 * server.h (change_inferior_id): Delete prototype.
13285 (add_pid_to_list, pull_pid_from_list): New prototypes.
13286 * thread-db.c (thread_db_use_events): New.
13287 (find_first_thread): Rename to...
13288 (find_one_thread): ...this. Update callers and messages. Do not
13289 call fatal. Check thread_db_use_events. Do not call
13290 change_inferior_id or new_thread_notify.
13291 (maybe_attach_thread): Update. Do not call new_thread_notify.
13292 (thread_db_init): Set thread_db_use_events. Check use_events.
13293 * utils.c (fatal, warning): Correct message prefix.
13294
13295 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13296
13297 * Makefile.in (clean): Remove new files.
13298 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13299 (powerpc-64.o, powerpc-64.c): New rules.
13300 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13301 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13302 with SPE.
13303 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13304 SPE targets.
13305 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13306 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13307 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13308 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13309 (target_regsets): Add AltiVec and SPE register sets.
13310 * configure.ac: Check for AltiVec and SPE.
13311 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13312 (ppc_fill_vrregset, ppc_store_vrregset): New.
13313 (target_regsets): Add AltiVec register set.
13314 * configure: Regenerated.
13315
13316 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13317
13318 * linux-low.c (O_LARGEFILE): Define.
13319 (linux_read_memory): Use /proc/PID/mem.
13320 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13321 * configure, config.in: Regenerated.
13322
13323 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13324
13325 * linux-low.c (linux_wait_for_event): Do not pass signals while
13326 single-stepping.
13327
13328 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13329
13330 * win32-low.c (create_process): New.
13331 (win32_create_inferior): Use create_process instead of
13332 CreateProcess. If create_process failed retry appending an ".exe"
13333 suffix. Store the GetLastError result immediatelly after
13334 create_process calls and use it on the call to error.
13335
13336 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13337
13338 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13339
13340 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13341
13342 * configure.ac: Switch license to GPLv3.
13343
13344 2007-08-01 Michael Snyder <msnyder@access-company.com>
13345
13346 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13347
13348 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13349
13350 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13351 typedef.
13352 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13353 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13354 CloseToolhelp32Snapshot.
13355 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13356 CloseToolhelp32Snapshot.
13357
13358 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13359
13360 * server.c (main): Check for inferior exit before main loop.
13361
13362 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13363
13364 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13365 instead of on tmp_desc.
13366
13367 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13368 Daniel Jacobowitz <dan@codesourcery.com>
13369
13370 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13371 (add_thread): Minor cleanups.
13372 (clear_inferiors): Move lower in the file. Clear the DLL
13373 list.
13374 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13375 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13376 (xml_escape_text): New.
13377 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13378 for qSupported.
13379 (handle_v_cont): Report errors.
13380 (gdbserver_version): Update.
13381 (main): Correct size of own_buf. Do not report initial DLL events.
13382 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13383 (unloaded_dll, xml_escape_text): New.
13384 * win32-low.c (enum target_waitkind): Update comments.
13385 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13386 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13387 (win32_EnumProcessModules, win32_GetModuleInformation)
13388 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13389 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13390 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13391 (win32_Module32First, win32_Module32Next, load_toolhelp)
13392 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13393 (get_child_debug_event): Handle DLL events.
13394 (win32_wait): Likewise.
13395
13396 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13399 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13400
13401 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13402
13403 * win32-low.c (handle_output_debug_string): Ignore event if not
13404 waiting.
13405
13406 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13407
13408 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13409
13410 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13411
13412 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13413
13414 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13415
13416 * inferiors.c (change_inferior_id): Add comment.
13417 * linux-low.c (check_removed_breakpoint): Add an early
13418 prototype. Improve debug output.
13419 (linux_attach): Doc update.
13420 (linux_detach_one_process, linux_detach): Clean up before releasing
13421 each process.
13422 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13423 * linux-low.h (struct process_info): Doc improvement.
13424 * mem-break.c (delete_all_breakpoints): New.
13425 * mem-break.h (delete_all_breakpoints): New prototype.
13426 * thread-db.c (find_first_thread): New.
13427 (thread_db_create_event): Call it instead of
13428 thread_db_find_new_threads. Clean up unused variables.
13429 (maybe_attach_thread): Remove first thread handling.
13430 (thread_db_find_new_threads): Use find_first_thread.
13431 (thread_db_get_tls_address): Likewise.
13432
13433 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13434
13435 * thread-db.c (thread_db_find_new_threads): Add prototype.
13436 (thread_db_create_event): Check for the main thread before adding
13437 a new thread.
13438 (maybe_attach_thread): Only enable event reporting if TID == 0.
13439 (thread_db_get_tls_address): Check for new threads.
13440
13441 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13442
13443 * linux-low.c (linux_create_inferior): Try execv before execvp.
13444 * spu-low.c (spu_create_inferior): Likewise.
13445
13446 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13447
13448 * linux-low.c (linux_create_inferior): Change execv to execvp.
13449 * spu-low.c (spu_create_inferior): Likewies.
13450
13451 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13452
13453 * Makefile.in (clean): Clean new files instead of deleted ones.
13454 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13455 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13456 rules.
13457 * configure.srv: Specify XML files and new regformats for MIPS and
13458 MIPS64 GNU/Linux.
13459 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13460 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13461 an entry for the restart register.
13462 (mips_cannot_fetch_register, mips_cannot_store_register)
13463 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13464 register names to match the XML descriptions.
13465 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13466 restart register instead of $0.
13467
13468 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13469 Markus Deuling <deuling@de.ibm.com>
13470
13471 * remote-utils.c (decode_xfer_write): New function.
13472 * server.h (decode_xfer_write): Add prototype.
13473 * server.c (handle_query): Add PACKET_LEN argument. Support
13474 qXfer:spu:read and qXfer:spu:write packets.
13475 (main): Pass packet_len to handle_query.
13476 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13477 * target.h (target_ops): Add qxfer_spu.
13478
13479 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13480
13481 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13482 accessing non-seekable spufs files.
13483
13484 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13485
13486 * server.c (handle_query): Add reply for qC packet.
13487
13488 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13489 Leo Zayas <lerele@champenstudios@com>
13490
13491 * server.h (check_remote_input_interrupt_request): New function.
13492 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13493 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13494 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13495 (check_remote_input_interrupt_request): New function.
13496 * server.h (check_remote_input_interrupt_request): Declare.
13497 * win32-low.c (winapi_DebugBreakProcess,
13498 winapi_GenerateConsoleCtrlEvent): New typedefs.
13499 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13500 to 250 ms.
13501 (win32_wait): Check for remote interrupt request
13502 with check_remote_input_interrupt_request.
13503 (win32_request_interrupt): New function.
13504 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13505
13506 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13507
13508 * win32-low.c (debug_registers_changed,
13509 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13510 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13511 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13512 (thread_rec): Get context using the low target.
13513 (child_add_thread): Call thread_added on the low target,
13514 which does the same thing.
13515 (regptr): Delete.
13516 (do_initial_child_stuff): Remove debug registers references.
13517 Set context using the low target. Resume threads after
13518 setting the contexts.
13519 (child_continue): Remove dead variable. Remove debug
13520 registers references.
13521 (child_fetch_inferior_registers): Go through the low target.
13522 (do_child_store_inferior_registers): Remove.
13523 (child_store_inferior_registers): Go through the low target.
13524 (win32_resume): Remove debug registers references.
13525 Set context using the low target.
13526 (handle_exception): Change return type to void. Don't record
13527 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13528 first chance exception.
13529 (get_child_debug_event): Change return type to void. Remove
13530 goto loop. Always return after waiting for debug event.
13531 (win32_wait): Convert to switch statement. Handle spurious
13532 events.
13533
13534 * win32-i386-low.c (debug_registers_changed,
13535 debug_registers_used): New.
13536 (initial_stuff): Rename to ...
13537 (i386_initial_stuff): ... this. Clear debug registers
13538 state variables.
13539 (store_debug_registers): Delete.
13540 (i386_get_thread_context): New.
13541 (load_debug_registers): Delete.
13542 (i386_set_thread_context): New.
13543 (i386_thread_added): New.
13544 (single_step): Rename to ...
13545 (i386_single_step): ... this.
13546 (do_fetch_inferior_registers): Rename to ...
13547 (i386_fetch_inferior_register): ... this.
13548 (i386_store_inferior_register): New.
13549 (the_low_target): Adapt to new interface.
13550
13551 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13552 (arm_get_thread_context): New.
13553 (arm_set_thread_context): New.
13554 (regptr): New.
13555 (do_fetch_inferior_registers): Rename to ...
13556 (arm_fetch_inferior_register): ... this.
13557 (arm_store_inferior_register): New.
13558 (arm_wince_breakpoint): Reimplement as unsigned long.
13559 (arm_wince_breakpoint_len): Define.
13560 (the_low_target): Adapt to new interface.
13561
13562 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13563 load_debug_registers. Add get_thread_context, set_thread_context,
13564 thread_added and store_inferior_register. Rename
13565 fetch_inferior_registers to fetch_inferior_register.
13566 (regptr): Remove declaration.
13567
13568 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13569
13570 * linux-low.c (linux_detach): Change return type to int. Return 0.
13571 * spu-low.c (spu_detach): Likewise.
13572
13573 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13574
13575 * target.h (target_ops): Change return type of detach to int.
13576 Add join.
13577 (join_inferior): New.
13578 * server.c (main): Don't skip detach support on mingw32.
13579 If the inferior doesn't support detaching return error.
13580 Call join_inferior instead of using waitpid.
13581 * linux-low.c (linux_join): New.
13582 (linux_target_op): Add linux_join.
13583 * spu-low.c (spu_join): New.
13584 (spu_target_ops): Add spu_join.
13585 * win32-low.c (win32_detach): Adapt to new interface.
13586 Reopen current_process_handle before detaching. Issue a child
13587 resume before detaching.
13588 (win32_join): New.
13589 (win32_target_op): Add win32_join.
13590
13591 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13592
13593 * win32-low.c (win32-attach): Fix return value.
13594 * target.h (target_ops): Describe ATTACH return values.
13595
13596 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13597
13598 * win32-low.c (GETPROCADDRESS): Define.
13599 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13600 (winapi_DebugSetProcessKillOnExit): Likewise.
13601 (win32_create_inferior): Force usage of ansi CreateProcessA.
13602 (win32_attach): Use GETPROCADDRESS.
13603 (win32_detach): Likewise.
13604
13605 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13606
13607 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13608
13609 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13610
13611 * win32-low.c: Commit leftover changes from 2007-03-29.
13612
13613 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13614
13615 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13616 fields short instead of int. Add explicit padding.
13617 (i387_cache_to_fsave): Remove unnecessary casts.
13618 (i387_fsave_to_cache): Doc fix.
13619 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13620
13621 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13622
13623 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13624 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13625
13626 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13627
13628 * configure.srv (arm*-*-mingw32ce*): Move near the other
13629 arm targets.
13630
13631 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13632
13633 * configure.ac: Add errno checking.
13634 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13635 sys/file.h and malloc.h.
13636 (AC_CHECK_DECLS): Add perror.
13637 (srv_mingwce): Handle.
13638 * configure.srv (i[34567]86-*-cygwin*): Add
13639 win32-i386-low.o to srv_tgtobj.
13640 (i[34567]86-*-mingw*): Likewise.
13641 (arm*-*-mingw32ce*): Add case.
13642 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13643 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13644 [__MINGW32CE__] (strerror): New function.
13645 [__MINGW32CE__] (errno): Define to GetLastError.
13646 [__MINGW32CE__] (COUNTOF): New macro.
13647 (remote_open): Remove extra close call.
13648 * mem-break.c (delete_breakpoint_at): New function.
13649 * mem-break.h (delete_breakpoint_at): Declare.
13650 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13651 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13652 [USE_WIN32API] (read, write): Add char* casts.
13653 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13654 * server.h: Include wincecompat.h on Windows CE.
13655 [HAVE_ERRNO_H]: Check.
13656 (perror): Declare if not declared.
13657 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13658 (perror_with_name): Remove errno declaration.
13659 * wincecompat.h: New.
13660 * wincecompat.c: New.
13661 * win32-low.h: New.
13662 * win32-arm-low.c: New.
13663 * win32-i386-low.c: New.
13664 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13665 (OUTMSG2): Make it safe.
13666 (_T): New macro.
13667 (COUNTOF): New macro.
13668 (NUM_REGS): Get it from the low target.
13669 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13670 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13671 (thread_rec): Let low target handle debug registers.
13672 (child_add_thread): Likewise.
13673 (child_init_thread_list): Likewise.
13674 (continue_one_thread): Likewise.
13675 (regptr): New.
13676 (do_child_fetch_inferior_registers): Move to ...
13677 * win32-i386-low.c: ... here, and rename to ...
13678 (do_fetch_inferior_registers): ... this.
13679 * win32-low.c (child_fetch_inferior_registers):
13680 Go through the low target.
13681 (do_child_store_inferior_registers): Use regptr.
13682 (strwinerror): New function.
13683 (win32_create_inferior): Handle Windows CE.
13684 Use strwinerror instead of strerror on Windows error
13685 codes. Add program to the error output.
13686 Don't close the main thread handle on Windows CE.
13687 (win32_attach): Use coredll.dll on Windows CE.
13688 (win32_kill): Close current process and current
13689 thread handles.
13690 (win32_detach): Use coredll.dll on Windows CE.
13691 (win32_resume): Let low target handle debug registers, and
13692 step request.
13693 (handle_exception): Add/Remove initial breakpoint. Avoid
13694 non-existant WSTOPSIG on Windows CE.
13695 (win32_read_inferior_memory): Cast to remove warning.
13696 (win32_arch_string): Go through the low target.
13697 (initialize_low): Call set_breakpoint_data with the low
13698 target's breakpoint.
13699 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13700 FOP_REGNUM, mappings): Move to ...
13701 * win32-i386-low.c: ... here.
13702 * win32-low.c (win32_thread_info): Move to ...
13703 * win32-low.h: ... here.
13704 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13705 win32-arm-low.c and wincecompat.c.
13706 (all:): Add $EXEEXT.
13707 (install-only:): Likewise.
13708 (gdbserver:): Likewise.
13709 (gdbreplay:): Likewise.
13710 * config.in: Regenerate.
13711 * configure: Regenerate.
13712
13713 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * win32-low.c: Rename typedef thread_info to
13716 win32_thread_info throughout.
13717
13718 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13719
13720 * win32-i386-low.c: Rename to ...
13721 * win32-low.c: ... this.
13722 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13723 * Makefile.in: Likewise.
13724
13725 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13726
13727 * remote-utils.c (monitor_output): Constify msg parameter.
13728 * server.h (monitor_output): Likewise.
13729 * win32-i386-low.c (handle_output_debug_string): New.
13730 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13731 handle_output_debug_string.
13732 (get_child_debug_event): Likewise.
13733
13734 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13735
13736 * server.c (main): Correct strtoul check.
13737
13738 2007-03-27 Jon Ringle <jon@ringle.org>
13739
13740 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13741
13742 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13743
13744 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13745
13746 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * terminal.h: Check HAVE_SGTTY_H.
13749
13750 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13751
13752 * remote-utils.c (remote_open): Print out the assigned port number.
13753
13754 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13755
13756 * remote-utils.c (monitor_output): New function.
13757 * server.c (debug_threads): Define here.
13758 (monitor_show_help): New function.
13759 (handle_query): Handle qRcmd.
13760 (main): Do not handle 'd' packet.
13761 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13762 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13763 of debug_threads.
13764
13765 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13766
13767 * Makefile.in (EXEEXT): New.
13768 (clean): Use $(EXEEXT).
13769
13770 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13771
13772 * target.h (target_ops): Rename send_signal to request_interrupt,
13773 and remove enum target_signal parameter.
13774 * linux-low.c (linux_request_interrupt): Rename from
13775 linux_send_signal, and always send SIGINT.
13776 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13777 and always send SIGINT.
13778 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13779 of send_signal.
13780 (input_interrupt): Likewise.
13781
13782 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13783
13784 * server.c (get_features_xml): Check if target implemented
13785 arch_string.
13786 * win32-i386-low.c (win32_arch_string): New.
13787 (win32_target_ops): Add win32_arch_string as arch_string member.
13788
13789 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13790
13791 * spu-low.c (spu_arch_string): New.
13792 (spu_target_ops): Add spu_arch_string.
13793
13794 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13795
13796 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13797 * configure.ac: Do not check for terminal.h.
13798 * configure, config.in: Regenerated.
13799
13800 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13801
13802 * Makefile.in (OBS): Add $(XML_BUILTIN).
13803 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13804 (clean): Update.
13805 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13806 (arm-with-iwmmxt.c): New.
13807 * config.in, configure: Regenerate.
13808 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13809 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13810 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13811 (arm*-*-linux*): Add iWMMXt and regset support.
13812 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13813 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13814 (arm_store_wmmxregset, target_regsets): New.
13815 * server.c (get_features_xml): Take annex argument. Check builtin
13816 XML documents.
13817 (handle_query): Handle multiple annexes.
13818
13819 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13820
13821 * remote-utils.c [USE_WIN32API] (read, write): Define.
13822 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13823 write.
13824
13825 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13826
13827 * linux-i386-low.c (the_low_target): Set arch_string.
13828 * linux-x86-64-low.c (the_low_target): Likewise.
13829 * linux-low.c (linux_arch_string): New.
13830 (linux_target_ops): Add it.
13831 * linux-low.h (struct linux_target_ops): Add arch_string.
13832 * server.c (write_qxfer_response): Use const void * for DATA.
13833 (get_features_xml): New.
13834 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13835 * target.h (struct target_ops): Add arch_string method.
13836
13837 2007-01-03 Denis Pilat <denis.pilat@st.com>
13838 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * linux-low.c (linux_kill): Handle being called with no threads.
13841 * win32-i386-low.c (win32_kill): Likewise.
13842 (get_child_debug_event): Clear current_process_handle.
13843
13844 2006-12-30 Denis PILAT <denis.pilat@st.com>
13845 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * remote-utils.c (remote_open): Check the type of specified
13848 serial port devices before opening them.
13849 * server.c (main): Kill the inferior if an error occurs during
13850 the first remote_open.
13851
13852 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13853
13854 * README: Update supported targets.
13855
13856 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * Makefile.in (clean): Remove reg-mips64.c.
13859 (reg-mips64.c, reg-mips64.o): New rules.
13860 * configure.srv: Handle mips64. Include regset support for mips.
13861 * linux-mips-low.c (union mips_register): New.
13862 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13863 (mips_breakpoint, mips_breakpoint_at): Use int.
13864 (mips_collect_register, mips_supply_register)
13865 (mips_collect_register_32bit, mips_supply_register_32bit)
13866 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13867 (mips_store_fpregset, target_regsets): New.
13868 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13869
13870 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13871
13872 * configure.srv: Add target "spu*-*-*".
13873 * Makefile.in (clean): Remove reg-spu.c.
13874 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13875 * spu-low.c: New file.
13876
13877 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13878
13879 * configure.ac: Correct td_thr_tls_get_addr test.
13880 * configure: Regenerated.
13881
13882 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * linux-low.c (linux_wait_for_event): Reformat. Use the
13885 pass_signals array.
13886 * remote-utils.c (decode_address_to_semicolon): New.
13887 * server.c (pass_signals, handle_general_set): New.
13888 (handle_query): Mention QPassSignals for qSupported.
13889 (main): Call handle_general_set.
13890 * server.h (pass_signals, decode_address_to_semicolon): New.
13891
13892 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * server.c (handle_query): Correct error handling for read_auxv.
13895
13896 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13897
13898 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13899 and srv_linux_thread_db to yes.
13900 * linux-s390-low.c (s390_fill_gregset): New function.
13901 (target_regsets): Define data structure.
13902
13903 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13904
13905 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13906 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13907 * config.in, configure: Regenerated.
13908 * inferiors.c (gdb_id_to_thread): New function.
13909 (gdb_id_to_thread_id): Use it.
13910 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13911 * linux-low.h (struct process_info): Add th member.
13912 (thread_db_get_tls_address): New prototype.
13913 * remote-utils.c (decode_address): Make non-static.
13914 * server.c (handle_query): Handle qGetTLSAddr.
13915 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13916 * target.h (struct target_ops): Add get_tls_address.
13917 * thread-db.c (maybe_attach_thread): Save the thread handle.
13918 (thread_db_get_tls_address): New.
13919
13920 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13923 (linux_resume_one_process): Take a siginfo_t *. Update all
13924 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13925 (struct pending_signals): Add a siginfo_t.
13926 (linux_wait_for_process): Always set last_status.
13927 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13928 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13929 * linux-low.h (struct process_info): Add last_status.
13930
13931 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13932
13933 * remote-utils.c (try_rle): New function.
13934 (putpkt_binary): Use it.
13935
13936 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13939 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13940 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13941 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13942 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13943 point registers.
13944
13945 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13946
13947 * server.c (terminal_fd): New variable.
13948 (old_foreground_pgrp): Likewise.
13949 (restore_old_foreground_pgrp): New function.
13950 (start_inferior): Record the terminal file descriptor in terminal_fd
13951 and its original foreground group in old_foreground_pgrp. Register
13952 restore_old_foreground_pgrp with atexit().
13953
13954 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13955
13956 * server.c (handle_query): Correct qPart to qXfer.
13957
13958 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13959
13960 * configure.ac: Check for more headers which are missing on
13961 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13962 * configure.srv: Add Cygwin and mingw32.
13963 * remote-utils.c: Don't include headers unconditionally which
13964 are missing on mingw32. Include <winsock.h> for mingw32.
13965 (remote_open): Adjust for mingw32 support. Flush
13966 standard error after writing to it.
13967 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13968 (unblock_async_io, enable_async_io, disable_async_io)
13969 (readchar, getpkt): Update for Winsock support.
13970 (prepare_resume_reply): Expect a protocol signal number.
13971 * server.c: Disable <sys/wait.h> on mingw32.
13972 (start_inferior): Adjust for mingw32 support. Flush
13973 standard error after writing to it.
13974 (attach_inferior): Likewise. Use protocol signal
13975 numbers.
13976 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13977 and names.
13978 * win32-i386-low.c: New file.
13979 * Makefile.in (XM_CLIBS): Set.
13980 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13981 (win32-i386-low.o): New dependency rule.
13982 * linux-low.c (linux_wait): Use target signal numbers.
13983 * target.h (struct target_ops): Doc fix.
13984 * server.h (target_signal_to_name): New prototype.
13985 * gdbreplay.c: Don't include headers unconditionally which
13986 are missing on mingw32. Include <winsock.h> for mingw32.
13987 (remote_close, remote_open): Adjust for Winsock support.
13988 * configure, config.in: Regenerated.
13989
13990 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * server.c (decode_xfer_read, write_qxfer_response): New.
13993 (handle_query): Take a packet length argument. Handle
13994 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13995 the qSupported response.
13996 (main): Update call to handle_query.
13997
13998 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13999
14000 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14001 (putpkt_binary): Renamed from putpkt and adjusted for binary
14002 data.
14003 (putpkt): New wrapper for putpkt_binary.
14004 (readchar): Don't mask off the high bit.
14005 (decode_X_packet): New function.
14006 * server.c (main): Call putpkt_binary if a handler sets the packet
14007 length. Save the length of the incoming packet. Handle 'X'.
14008 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14009
14010 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14011
14012 * server.c (handle_query): Handle qSupported.
14013
14014 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14015
14016 * remote-utils.c (all_symbols_looked_up): New variable.
14017 (look_up_one_symbol): Check it.
14018 * server.h (look_up_one_symbol): New declaration.
14019 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14020
14021 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14022
14023 * Makefile.in (linux-arm-low.o): Update dependencies.
14024 * linux-arm-low.c: Include "gdb_proc_service.h".
14025 (PTRACE_GET_THREAD_AREA): Define.
14026 (ps_get_thread_area): New function.
14027
14028 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14029
14030 * configure.srv (m68k*-*-uclinux*): New target.
14031 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14032 (linux_resume_one_process): Remove extraneous cast.
14033 (linux_read_offsets): New.
14034 (linux_target_op): Add linux_read_offsets on mmuless systems.
14035 * server.c (handle_query): Add qOffsets logic.
14036 * target.h (struct target_ops): Add read_offsets.
14037
14038 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14039
14040 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14041 (PTRACE_GET_THREAD_AREA): Define.
14042 (ps_get_thread_area): New function.
14043 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14044 (linux-x86-64-low.o): Update.
14045
14046 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14047
14048 * configure.ac: Remove checks for prfpregset_t.
14049 * gdb_proc_service.h: New file.
14050 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14051 new "gdb_proc_service.h".
14052 * proc-service.c: Likewise.
14053 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14054 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14055 * Makefile.in (gdb_proc_service_h): Updated.
14056 * configure, config.in: Regenerated.
14057
14058 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14059
14060 * remote-utils.c (prepare_resume_reply): Move declaration
14061 of gdb_id_from_wait to the top of the block.
14062
14063 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14064
14065 * linux-low.c (regsets_store_inferior_registers): Read the regset
14066 from the target before filling it.
14067
14068 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14069
14070 * server.c (attach_inferior): Return SIGTRAP for a successful
14071 attach.
14072
14073 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14074
14075 * Makefile.in (OBS): Add version.o.
14076 (STAGESTUFF): Delete.
14077 (version.o): Add dependencies.
14078 (version.c): Replace rule.
14079 (clean): Remove version.c.
14080 * server.c (gdbserver_version): New.
14081 (gdbserver_usage): Use printf.
14082 (main): Handle --version and --help.
14083 * server.h (version, host_name): Add declarations.
14084
14085 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14086
14087 * linux-arm-low.c:
14088 * linux-arm-low.c:
14089 * inferiors.c:
14090 * i387-fp.h:
14091 * i387-fp.c:
14092 * gdbreplay.c:
14093 * regcache.c:
14094 * proc-service.c:
14095 * mem-break.h:
14096 * mem-break.c:
14097 * linux-x86-64-low.c:
14098 * linux-sh-low.c:
14099 * linux-s390-low.c:
14100 * linux-ppc64-low.c:
14101 * linux-ppc-low.c:
14102 * linux-mips-low.c:
14103 * linux-m68k-low.c:
14104 * linux-m32r-low.c:
14105 * linux-low.h:
14106 * linux-low.c:
14107 * linux-ia64-low.c:
14108 * linux-i386-low.c:
14109 * linux-crisv32-low.c:
14110 * thread-db.c:
14111 * terminal.h:
14112 * target.h:
14113 * target.c:
14114 * server.h:
14115 * server.c:
14116 * remote-utils.c:
14117 * regcache.h:
14118 * utils.c:
14119 * Makefile.in:
14120 * configure.ac:
14121 * gdbserver.1: Add (C) after Copyright. Update the FSF
14122 address.
14123
14124 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14127 (arm_breakpoint_at): Recognize both breakpoints.
14128 (the_low_target): Use the correct breakpoint instruction.
14129
14130 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14131
14132 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14133 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14134 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14135 (the_low_target): Update.
14136
14137 2005-10-25 Andreas Schwab <schwab@suse.de>
14138
14139 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14140
14141 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14142 (ia64_num_regs): Reduce to 462.
14143
14144 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14145
14146 * acinclude.m4: Correct quoting.
14147 * aclocal.m4: Regenerated.
14148
14149 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14150 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14151 (thread_db_init): Call thread_db_err_str.
14152 * configure.ac: Check for TD_VERSION.
14153 * config.in, configure: Regenerated.
14154
14155 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14156
14157 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14158
14159 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14162 is not available. Define HAVE_PTRACE_GETREGS if it is.
14163 * config.in, configure: Regenerated.
14164 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14165 * linux-i386-low.c, linux-m68k-low.c: Update to use
14166 HAVE_PTRACE_GETREGS.
14167 * linux-low.c (regsets_fetch_inferior_registers)
14168 (regsets_store_inferior_registers): Only return 0 if we processed
14169 GENERAL_REGS.
14170 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14171 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14172
14173 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * inferiors.c (struct thread_info): Add gdb_id.
14176 (add_thread): Add gdb_id argument.
14177 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14178 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14179 calls to add_thread.
14180 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14181 * server.c (handle_query): Use thread_to_gdb_id.
14182 (handle_v_cont, main): Use gdb_id_to_thread_id.
14183 * server.h (add_thread): Update prototype.
14184 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14185 prototypes.
14186
14187 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14190 left-padded registers.
14191 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14192 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14193
14194 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14195
14196 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14197 * configure: Regenerate.
14198 * config.in: Regenerate.
14199 * server.h (NEED_DECLARATION_STRERROR):
14200 Replace with !HAVE_DECL_STRERROR.
14201
14202 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * linux-low.c (linux_wait, linux_send_signal): Don't test
14205 an unsigned long variable for > 0 if it could be MAX_ULONG.
14206 * server.c (myresume): Likewise.
14207 * target.c (set_desired_inferior): Likewise.
14208
14209 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14210
14211 * configure.ac: Simplify and improve check for socklen_t.
14212 * configure, config.in: Regenerate.
14213
14214 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14215
14216 * acconfig.h: Remove.
14217 * configure.ac: Add a test for socklen_t. Use three-argument
14218 AC_DEFINE throughout.
14219 * config.in: Regenerated using autoheader 2.59.
14220 * configure: Regenerated.
14221
14222 * gdbreplay.c (socklen_t): Provide a default.
14223 (remote_open): Use socklen_t.
14224 * remote-utils.c (socklen_t): Provide a default.
14225 (remote_open): Use socklen_t.
14226 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14227 unsigned char.
14228
14229 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14230 char for buffers.
14231 * linux-low.c (linux_read_memory, linux_write_memory)
14232 (linux_read_auxv): Likewise.
14233 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14234 (check_mem_write): Likewise.
14235 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14236 Likewise.
14237 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14238 (registers_from_string, register_data): Likewise.
14239 * server.c (handle_query, main): Likewise.
14240 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14241 (decode_M_packet): Likewise.
14242 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14243 * target.h (struct target_ops): Update read_memory, write_memory,
14244 and read_auxv.
14245 (read_inferior_memory, write_inferior_memory): Update.
14246 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14247 to unsigned char *.
14248 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14249 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14250 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14251 linux-s390-low.c, linux-sh-low.c: Update for changes in
14252 read_inferior_memory and the_low_target->breakpoint.
14253
14254 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14255
14256 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14257 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14258 * configure.srv: Add powerpc64-*-linux*.
14259 * linux-ppc64-low.c: New file.
14260
14261 2005-05-23 Orjan Friberg <orjanf@axis.com>
14262
14263 * linux-cris-low.c: New file with support for CRIS.
14264 * linux-crisv32-low.c: Ditto for CRISv32.
14265 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14266 (clean): Add reg-cris.c and reg-crisv32.c.
14267 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14268 reg-crisv32.o, and reg-crisv32.c to make rules.
14269 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14270 recognized targets.
14271
14272 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14273
14274 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14275 of sizeof (PTRACE_XFER_TYPE).
14276 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14277
14278 2005-05-12 Orjan Friberg <orjanf@axis.com>
14279
14280 * target.h (struct target_ops): Add insert_watchpoint,
14281 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14282 pointers for hardware watchpoint support.
14283 * linux-low.h (struct linux_target_ops): Ditto.
14284 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14285 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14286 to linux_target_ops.
14287 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14288 reply packet.
14289 * server.c (main): Recognize 'Z' and 'z' packets.
14290
14291 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14292
14293 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14294 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14295 (the_low_target): Add new members.
14296
14297 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14298
14299 * proc-service.c (ps_lgetregs): Search all_processes instead of
14300 all_threads.
14301
14302 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14303
14304 * server.c (start_inferior): Change return type to int.
14305 (attach_inferior): Change sigptr to int *.
14306 (handle_v_cont, handle_v_requests): Change signal to int *.
14307 (main): Change signal to int.
14308
14309 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14310
14311 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14312 * configure.srv: Add m32r*-*-linux*.
14313 * linux-m32r-low.c: New file.
14314
14315 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14318
14319 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14322 Take unsigned long arguments for PIDs.
14323 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14324 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14325 (wait_for_sigstop, linux_resume_one_process)
14326 (regsets_fetch_inferior_registers, linux_send_signal)
14327 (linux_read_auxv): Likewise. Update the types of variables holding
14328 PIDs. Update format string specifiers.
14329 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14330 * remote-utils.c (prepare_resume_reply): Likewise.
14331 * server.c (cont_thread, general_thread, step_thread)
14332 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14333 unsigned long.
14334 (handle_query): Update format specifiers.
14335 (handle_v_cont, main): Use strtoul for thread IDs.
14336 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14337 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14338 (general_thread, step_thread, thread_from_wait)
14339 (old_thread_from_wait): Update.
14340 * target.h (struct thread_resume): Use unsigned long for THREAD.
14341 (struct target_ops): Use unsigned long for arguments to attach and
14342 thread_alive.
14343
14344 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * acinclude.m4: Include bfd/bfd.m4 directly.
14347 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14348 <agriffis@toolchain.org>.
14349 * aclocal.m4, configure: Regenerated.
14350
14351 2005-01-07 Andrew Cagney <cagney@gnu.org>
14352
14353 * configure.ac: Rename configure.in, require autoconf 2.59.
14354 * configure: Re-generate.
14355
14356 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14357
14358 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14359 LIBS when finished.
14360 * aclocal.m4: Regenerated.
14361 * configure: Regenerated.
14362
14363 2004-11-21 Andreas Schwab <schwab@suse.de>
14364
14365 * linux-m68k-low.c (m68k_num_gregs): Define.
14366 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14367 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14368 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14369 (m68k_breakpoint_at): New. Add to the_low_target.
14370
14371 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14372 srv_linux_thread_db to yes.
14373
14374 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14375
14376 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14377 (ARCH_SET_FS): Likewise.
14378 (ARCH_GET_FS): Likewise.
14379 (ARCH_GET_GS): Likewise.
14380
14381 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14382
14383 * linux-i386-low.c (ps_get_thread_area): New.
14384 * linux-x86-64-low.c (ps_get_thread_area): New.
14385 * linux-low.c: Include <sys/syscall.h>.
14386 (linux_kill_one_process): Don't kill the first thread here.
14387 (linux_kill): Kill the first thread here.
14388 (kill_lwp): New function.
14389 (send_sigstop, linux_send_signal): Use it.
14390 * proc-service.c: Clean up #ifdefs.
14391 (fpregset_info): Delete.
14392 (ps_lgetregs): Update and enable implementation.
14393 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14394 implementations.
14395 * remote-utils.c (struct sym_cache, symbol_cache): New.
14396 (input_interrupt): Print a clearer message.
14397 (async_io_enabled): New variable.
14398 (enable_async_io, disable_async_io): Use it. Update comments.
14399 (look_up_one_symbol): Use the symbol cache.
14400 * thread-db.c (thread_db_look_up_symbols): New function.
14401 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14402
14403 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14404
14405 * configure.in: Test for -rdynamic.
14406 * configure: Regenerated.
14407 * Makefile (INTERNAL_LDFLAGS): New.
14408 (gdbserver, gdbreplay): Use it.
14409
14410 2004-09-02 Andrew Cagney <cagney@gnu.org>
14411
14412 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14413
14414 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14415
14416 * linux-low.c (linux_wait): Clear all_processes list also.
14417
14418 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14419
14420 * linux-low.c: Include <errno.h>. Remove extern declaration of
14421 errno.
14422
14423 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14424
14425 * gdbreplay.c, server.h, utils.c: Update copyright years.
14426
14427 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14428
14429 * server.c (main): Print child status or termination signal from
14430 variable 'signal', not 'sig'.
14431
14432 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14433
14434 * linux-low.c (linux_read_memory): Change return type to
14435 int. Check for and return error from ptrace().
14436 * target.c (read_inferior_memory): Change return type to int. Pass
14437 back return status from the_target->read_memory().
14438 * target.h (struct target_ops): Adapt *read_memory() prototype.
14439 Update comment.
14440 (read_inferior_memory): Adapt prototype.
14441 * server.c (main): Return an error packet if
14442 read_inferior_memory() returns an error.
14443
14444 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14445
14446 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14447 Unify with other clean targets.
14448
14449 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * server.c (handle_v_cont): Call set_desired_inferior.
14452
14453 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14454
14455 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14456
14457 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14458
14459 * linux-low.c (linux_wait): Unblock async I/O.
14460 (linux_resume): Block and enable async I/O.
14461 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14462 * server.h (block_async_io, unblock_async_io): Add prototypes.
14463
14464 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14465
14466 * remote-utils.c (remote_open): Print a status notice after
14467 opening a TCP port.
14468 * server.c (attach_inferior): Print a status notice after
14469 attaching.
14470
14471 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14472
14473 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14474
14475 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14476
14477 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14478 error packet.
14479 * server.c, target.h: Update copyright years.
14480
14481 2004-02-25 Roland McGrath <roland@redhat.com>
14482
14483 * target.h (struct target_ops): New member `read_auxv'.
14484 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14485 * linux-low.c (linux_read_auxv): New function.
14486 (linux_target_ops): Initialize `read_auxv' member to that.
14487
14488 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14489
14490 Committed by Jim Blandy <jimb@redhat.com>.
14491
14492 * linux-s390-low.c (s390_num_regs): Update.
14493 (s390_regmap): Remove control registers. Use __s390x__ predefine
14494 instead of GPR_SIZE to distiguish s390 and s390x targets.
14495
14496 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c: Update copyright year.
14499 (check_removed_breakpoint): Clear pending_is_breakpoint.
14500 (linux_set_resume_request, linux_queue_one_thread)
14501 (resume_status_pending_p): New functions.
14502 (linux_continue_one_thread): Use process->resume.
14503 (linux_resume): Only resume threads if there are no pending events.
14504 * linux-low.h (struct process_info): Add resume request
14505 pointer.
14506
14507 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14508
14509 * regcache.c (new_register_cache): Clear the allocated register
14510 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14511
14512 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14513
14514 * linux-low.c (linux_resume): Take a struct thread_resume *
14515 argument.
14516 (linux_wait): Update call.
14517 (resume_ptr): New static variable.
14518 (linux_continue_one_thread): Renamed from
14519 linux_continue_one_process. Use resume_ptr.
14520 (linux_resume): Use linux_continue_one_thread.
14521 * server.c (handle_v_cont, handle_v_requests): New functions.
14522 (myresume): New function.
14523 (main): Handle 'v' case.
14524 * target.h (struct thread_resume): New type.
14525 (struct target_ops): Change argument of "resume" to struct
14526 thread_resume *.
14527 (myresume): Delete macro.
14528
14529 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14530
14531 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14532 (uninstall): Support DESTDIR.
14533
14534 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14535
14536 * configure.srv: Add xscale*linux copy of arm*linux entry.
14537
14538 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14539
14540 * linux-arm-low.c (arm_reinsert_addr): New function.
14541 (the_low_target): Add arm_reinsert_addr.
14542
14543 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14544
14545 * mem-break.c: Remove whitespace at end of file.
14546
14547 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14548
14549 * configure.in: Check whether we need to prototype strerror.
14550 * server.h: Optionally prototype strerror.
14551 * gdbreplay.c (perror_with_name): Use strerror.
14552 * linux-low.c (linux_attach_lwp): Use strerror.
14553 * utils.c (perror_with_name): Use strerror.
14554 * config.in, configure: Regenerated.
14555
14556 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14557
14558 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14559 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14560
14561 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14562
14563 * Makefile.in (SFILES): Update.
14564 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14565 low-sun3.c: Remove files.
14566
14567 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14568
14569 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14570 (linux_detach_one_process, linux_detach): New functions.
14571 (linux_target_ops): Add linux_detach.
14572 * server.c (main): Handle 'D' packet.
14573 * target.h (struct target_ops): Add "detach" member.
14574 (detach_inferior): Define.
14575
14576 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14577
14578 From Kelley Cook <kelleycook@wideopenwest.com>:
14579 * configure.srv: Accept i[34567]86 variants.
14580
14581 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14582
14583 * linux-low.c (linux_wait_for_event): Correct comment typos.
14584 (linux_resume_one_process): Call check_removed_breakpoint.
14585 (linux_send_signal): New function.
14586 (linux_target_ops): Add linux_send_signal.
14587 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14588 of kill.
14589 * target.h (struct target_ops): Add send_signal.
14590
14591 2003-05-29 Jim Blandy <jimb@redhat.com>
14592
14593 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14594 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14595 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14596 away part of the register's value.
14597
14598 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14599
14600 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14601 (linux_wait_for_event, linux_init_signals): Likewise.
14602
14603 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14604
14605 * configure.in: Check for stdlib.h.
14606 * configure: Regenerated.
14607 * config.in: Regenerated.
14608
14609 2003-01-04 Andreas Schwab <schwab@suse.de>
14610
14611 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14612
14613 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14614
14615 * Makefile.in: Remove obsolete code.
14616
14617 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14618
14619 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14620 defined(PT_FPR0_HI).
14621
14622 2002-11-17 Stuart Hughes <seh@zee2.com>
14623
14624 * linux-arm-low.c (arm_num_regs): Increase.
14625 (arm_regmap): Include status register.
14626
14627 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14628
14629 * linux-low.c (register_addr): Remove incorrect -1 check.
14630
14631 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14632
14633 * linux-low.c (linux_create_inferior): Call setpgid. Return
14634 the new PID.
14635 (unstopped_p, linux_signal_pid): Remove.
14636 (linux_target_ops): Remove linux_signal_pid.
14637 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14638 global instead of target method.
14639 * target.h (struct target_ops): Remove signal_pid. Update comment
14640 for create_inferior.
14641 * server.c (signal_pid): New variable.
14642 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14643 gdbserver. Set the child to be the foreground process group.
14644 (attach_inferior): Set signal_pid.
14645
14646 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14647
14648 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14649
14650 2002-08-20 Jim Blandy <jimb@redhat.com>
14651
14652 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14653 default for this.
14654
14655 2002-08-01 Andrew Cagney <cagney@redhat.com>
14656
14657 * Makefile.in: Make chill references obsolete.
14658
14659 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14660
14661 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14662 * configure: Regenerate.
14663 * config.in: Regenerate.
14664
14665 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14666
14667 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14668 (perror_with_name, remote_close, remote_open, expect, play): Static.
14669
14670 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14671
14672 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14673 byte offsets instead of an array of indexes.
14674 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14675
14676 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14677
14678 * regcache.c: Add comment.
14679
14680 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14681
14682 * thread-db.c: New file.
14683 * proc-service.c: New file.
14684 * acinclude.m4: New file.
14685 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14686 proc-service.o, and thread-db.o.
14687 (linux-low.o): Add USE_THREAD_DB.
14688 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14689 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14690 * aclocal.m4: Regenerated.
14691 * config.in: Regenerated.
14692 * configure: Regenerated.
14693 * configure.in: Check for proc_service.h, sys/procfs.h,
14694 thread_db.h, and linux/elf.h headrs.
14695 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14696 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14697 Check for -lthread_db and thread support.
14698 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14699 PowerPC, and SuperH.
14700 * i387-fp.c: Constify arguments.
14701 * i387-fp.h: Likewise.
14702 * inferiors.c: (struct thread_info): Renamed from
14703 `struct inferior_info'. Remove PID member. Use generic inferior
14704 list header. All uses updated.
14705 (inferiors, signal_pid): Removed.
14706 (all_threads): New variable.
14707 (get_thread): Define.
14708 (add_inferior_to_list): New function.
14709 (for_each_inferior): New function.
14710 (change_inferior_id): New function.
14711 (add_inferior): Removed.
14712 (remove_inferior): New function.
14713 (add_thread): New function.
14714 (free_one_thread): New function.
14715 (remove_thread): New function.
14716 (clear_inferiors): Use for_each_inferior and free_one_thread.
14717 (find_inferior): New function.
14718 (find_inferior_id): New function.
14719 (inferior_target_data): Update argument type.
14720 (set_inferior_target_data): Likewise.
14721 (inferior_regcache_data): Likewise.
14722 (set_inferior_regcache_data): Likewise.
14723 * linux-low.c (linux_bp_reinsert): Remove.
14724 (all_processes, stopping_threads, using_thrads)
14725 (struct pending_signals, debug_threads, pid_of): New.
14726 (inferior_pid): Replace with macro.
14727 (struct inferior_linux_data): Remove.
14728 (get_stop_pc, add_process): New functions.
14729 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14730 Use add_process and add_thread.
14731 (linux_attach_lwp): New function, based on old linux_attach. Use
14732 add_process and add_thread. Set stop_expected for new threads.
14733 (linux_attach): New function.
14734 (linux_kill_one_process): New function.
14735 (linux_kill): Kill all LWPs.
14736 (linux_thread_alive): Use find_inferior_id.
14737 (check_removed_breakpoints, status_pending_p): New functions.
14738 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14739 Update. Use WNOHANG. Wait for cloned processes also. Update process
14740 struct for the found process.
14741 (linux_wait_for_event): New function.
14742 (linux_wait): Use it. Support LWPs.
14743 (send_sigstop, wait_for_sigstop, stop_all_processes)
14744 (linux_resume_one_process, linux_continue_one_process): New functions.
14745 (linux_resume): Support LWPs.
14746 (REGISTER_RAW_SIZE): Remove.
14747 (fetch_register): Use register_size instead. Call supply_register.
14748 (usr_store_inferior_registers): Likewise. Call collect_register.
14749 Fix recursive case.
14750 (regsets_fetch_inferior_registers): Improve error message.
14751 (regsets_store_inferior_registers): Add debugging.
14752 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14753 (unstopped_p, linux_signal_pid): New functions.
14754 (linux_target_ops): Add linux_signal_pid.
14755 (linux_init_signals): New function.
14756 (initialize_low): Call it. Initialize using_threads.
14757 * regcache.c (inferior_regcache_data): Add valid
14758 flag.
14759 (get_regcache): Fetch registers lazily. Add fetch argument
14760 and update all callers.
14761 (regcache_invalidate_one, regcache_invalidate): New
14762 functions.
14763 (new_register_cache): Renamed from create_register_cache.
14764 Return the new regcache.
14765 (free_register_cache): Change argument to a void *.
14766 (registers_to_string, registers_from_string): Call get_regcache
14767 with fetch flag set.
14768 (register_data): Make static. Pass fetch flag to get_regcache.
14769 (supply_register): Call get_regcache with fetch flag clear.
14770 (collect_register): Call get_regcache with fetch flag set.
14771 (collect_register_as_string): New function.
14772 * regcache.h: Update.
14773 * remote-utils.c (putpkt): Flush after debug output and use
14774 stderr.
14775 Handle input interrupts while waiting for an ACK.
14776 (input_interrupt): Use signal_pid method.
14777 (getpkt): Flush after debug output and use stderr.
14778 (outreg): Use collect_register_as_string.
14779 (new_thread_notify, dead_thread_notify): New functions.
14780 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14781 and general_thread.
14782 (look_up_one_symbol): Flush after debug output.
14783 * server.c (step_thread, server_waiting): New variables.
14784 (start_inferior): Don't use signal_pid. Update call to mywait.
14785 (attach_inferior): Update call to mywait.
14786 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14787 (main): Don't fetch/store registers explicitly. Use
14788 set_desired_inferior. Support proposed ``Hs'' packet. Update
14789 calls to mywait.
14790 * server.h: Update.
14791 (struct inferior_list, struct_inferior_list_entry): New.
14792 * target.c (set_desired_inferior): New.
14793 (write_inferior_memory): Constify.
14794 (mywait): New function.
14795 * target.h: Update.
14796 (struct target_ops): New signal_pid method.
14797 (mywait): Removed macro, added prototype.
14798
14799 * linux-low.h (regset_func): Removed.
14800 (regset_fill_func, regset_store_func): New.
14801 (enum regset_type): New.
14802 (struct regset_info): Add type field. Use new operation types.
14803 (struct linux_target_ops): stop_pc renamed to get_pc.
14804 Add decr_pc_after_break and breakpoint_at.
14805 (get_process, get_thread_proess, get_process_thread)
14806 (strut process_info, all_processes, linux_attach_lwp)
14807 (thread_db_init): New.
14808
14809 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14810 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14811 (the_low_target): Add new members.
14812 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14813 (i386_store_fpxregset): Constify.
14814 (target_regsets): Add new kind identifier.
14815 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14816 (i386_set_pc): Add debugging.
14817 (i386_breakpoint_at): New function.
14818 (the_low_target): Add new members.
14819 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14820 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14821 (mips_breakpoint_at): New.
14822 (the_low_target): Add new members.
14823 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14824 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14825 (the_low_target): Add new members.
14826 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14827 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14828 (the_low_target): Add new members.
14829 * linux-x86-64-low.c (target_regsets): Add new kind
14830 identifier.
14831
14832 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14833
14834 From Martin Pool <mbp@samba.org>:
14835 * server.c (gdbserver_usage): New function.
14836 (main): Call it.
14837
14838 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14839
14840 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14841 stop_at -> stop_pc.
14842
14843 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14844
14845 * Makefile.in: Remove obsolete code.
14846
14847 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14848
14849 * linux-low.c (regsets_fetch_inferior_registers),
14850 (regsets_store_inferior_registers): Removed cast to int from
14851 ptrace() calls.
14852 * regcache.h: Added declaration of struct inferior_info.
14853
14854 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14855
14856 * inferiors.c (struct inferior_info): Add regcache_data.
14857 (add_inferior): Call create_register_cache.
14858 (clear_inferiors): Call free_register_cache.
14859 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14860 * regcache.c (struct inferior_regcache_data): New.
14861 (registers): Remove.
14862 (get_regcache): New function.
14863 (create_register_cache, free_register_cache): New functions.
14864 (set_register_cache): Don't initialize the register cache here.
14865 (registers_to_string, registers_from_string, register_data): Call
14866 get_regcache.
14867 * regcache.h: Add prototypes.
14868 * server.h: Likewise.
14869
14870 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14871
14872 * mem-break.c: New file.
14873 * mem-break.h: New file.
14874 * Makefile.in: Add mem-break.o rule; update server.h
14875 dependencies.
14876 * inferiors.c (struct inferior_info): Add target_data
14877 member.
14878 (clear_inferiors): Free target_data member if set.
14879 (inferior_target_data, set_inferior_target_data): New functions.
14880 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14881 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14882 * linux-low.c (linux_bp_reinsert): New variable.
14883 (struct inferior_linux_data): New.
14884 (linux_create_inferior): Use set_inferior_target_data.
14885 (linux_attach): Likewise. Call add_inferior.
14886 (linux_wait_for_one_inferior): New function.
14887 (linux_wait): Call it.
14888 (linux_write_memory): Add const.
14889 (initialize_low): Call set_breakpoint_data.
14890 * linux-low.h (struct linux_target_ops): Add breakpoint
14891 handling members.
14892 * server.c (attach_inferior): Remove extra add_inferior
14893 call.
14894 * server.h: Include mem-break.h. Update inferior.c
14895 prototypes.
14896 * target.c (read_inferior_memory)
14897 (write_inferior_memory): New functions.
14898 * target.h (read_inferior_memory)
14899 (write_inferior_memory): Change macros to prototypes.
14900 (struct target_ops): Update comments. Add const to write_memory
14901 definition.
14902
14903 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14904
14905 * linux-low.c (usr_store_inferior_registers): Support
14906 registers which are allowed to fail to store.
14907 * linux-low.h (linux_target_ops): Likewise.
14908 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14909 (ppc_cannot_store_register): FPSCR may not be storable.
14910
14911 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14912
14913 * server.h: Include <string.h> if HAVE_STRING_H.
14914 * ChangeLog: Correct paths in last ChangeLog entry.
14915
14916 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14917
14918 * linux-low.h: Remove obsolete prototypes.
14919 (struct linux_target_ops): New.
14920 (extern the_low_target): New.
14921 * linux-low.c (num_regs, regmap): Remove declarations.
14922 (register_addr): Use the_low_target explicitly.
14923 (fetch_register): Likewise.
14924 (usr_fetch_inferior_registers): Likewise.
14925 (usr_store_inferior_registers): Likewise.
14926 * linux-arm-low.c (num_regs): Remove.
14927 (arm_num_regs): Define.
14928 (arm_regmap): Renamed from regmap, made static.
14929 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14930 made static.
14931 (arm_cannot_store_register): Renamed from cannot_store_register,
14932 made static.
14933 (the_low_target): New.
14934 * linux-i386-low.c (num_regs): Remove.
14935 (i386_num_regs): Define.
14936 (i386_regmap): Renamed from regmap, made static.
14937 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14938 made static.
14939 (i386_cannot_store_register): Renamed from cannot_store_register,
14940 made static.
14941 (the_low_target): New.
14942 * linux-ia64-low.c (num_regs): Remove.
14943 (ia64_num_regs): Define.
14944 (ia64_regmap): Renamed from regmap, made static.
14945 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14946 made static.
14947 (ia64_cannot_store_register): Renamed from cannot_store_register,
14948 made static.
14949 (the_low_target): New.
14950 * linux-m68k-low.c (num_regs): Remove.
14951 (m68k_num_regs): Define.
14952 (m68k_regmap): Renamed from regmap, made static.
14953 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14954 made static.
14955 (m68k_cannot_store_register): Renamed from cannot_store_register,
14956 made static.
14957 (the_low_target): New.
14958 * linux-mips-low.c (num_regs): Remove.
14959 (mips_num_regs): Define.
14960 (mips_regmap): Renamed from regmap, made static.
14961 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14962 made static.
14963 (mips_cannot_store_register): Renamed from cannot_store_register,
14964 made static.
14965 (the_low_target): New.
14966 * linux-ppc-low.c (num_regs): Remove.
14967 (ppc_num_regs): Define.
14968 (ppc_regmap): Renamed from regmap, made static.
14969 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14970 made static.
14971 (ppc_cannot_store_register): Renamed from cannot_store_register,
14972 made static.
14973 (the_low_target): New.
14974 * linux-s390-low.c (num_regs): Remove.
14975 (s390_num_regs): Define.
14976 (s390_regmap): Renamed from regmap, made static.
14977 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14978 made static.
14979 (s390_cannot_store_register): Renamed from cannot_store_register,
14980 made static.
14981 (the_low_target): New.
14982 * linux-sh-low.c (num_regs): Remove.
14983 (sh_num_regs): Define.
14984 (sh_regmap): Renamed from regmap, made static.
14985 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14986 made static.
14987 (sh_cannot_store_register): Renamed from cannot_store_register,
14988 made static.
14989 (the_low_target): New.
14990 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14991 (the_low_target): New.
14992
14993 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14994
14995 * Makefile.in: Add stamp-h target.
14996 * configure.in: Create stamp-h.
14997 * configure: Regenerated.
14998
14999 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15000
15001 * inferiors.c: New file.
15002 * target.c: New file.
15003 * target.h: New file.
15004 * Makefile.in: Add target.o and inferiors.o. Update
15005 dependencies.
15006 * linux-low.c (inferior_pid): New static variable,
15007 moved from server.c.
15008 (linux_create_inferior): Renamed from create_inferior.
15009 Call add_inferior. Return 0 on success instead of a PID.
15010 (linux_attach): Renamed from myattach.
15011 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15012 (linux_thread_alive): Renamed from mythread_alive.
15013 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15014 child dies.
15015 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15016 (regsets_store_inferior_registers): Correct error message.
15017 Add missing ``return 0''.
15018 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15019 (linux_store_registers): Renamed from store_inferior_registers.
15020 (linux_read_memory): Renamed from read_inferior_memory.
15021 (linux_write_memory): Renamed from write_inferior_memory.
15022 (linux_target_ops): New structure.
15023 (initialize_low): Call set_target_ops ().
15024 * remote-utils.c (unhexify): New function.
15025 (hexify): New function.
15026 (input_interrupt): Send signals to ``signal_pid''.
15027 * server.c (inferior_pid): Remove.
15028 (start_inferior): Update create_inferior call.
15029 (attach_inferior): Call add_inferior.
15030 (handle_query): New function.
15031 (main): Call handle_query for `q' packets.
15032 * server.h: Include "target.h". Remove obsolete prototypes.
15033 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15034
15035 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15036
15037 * Makefile.in: Add WARN_CFLAGS. Update configury
15038 dependencies.
15039 * configure.in: Check for <string.h>
15040 * configure: Regenerate.
15041 * config.in: Regenerate.
15042 * gdbreplay.c: Include needed system headers.
15043 (remote_open): Remove strchr prototype.
15044 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15045 * regcache.c (supply_register): Change buf argument to const void *.
15046 (supply_register_by_name): Likewise.
15047 (collect_register): Change buf argument to void *.
15048 (collect_register_by_name): Likewise.
15049 * regcache.h: Add missing prototypes.
15050 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15051 * server.c (handle_query): New function.
15052 (attached): New static variable, moved out of main.
15053 (main): Quiet longjmp clobber warnings.
15054 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15055 * utils.c (error): Remove NORETURN.
15056 (fatal): Likewise.
This page took 0.360221 seconds and 4 git commands to generate.