gdbserver/Makefile.in: Sort IPA_OBJS
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2
3 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4
5 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * linux-low.c (linux_create_inferior): Adjust code to access the
8 environment information via 'gdb_environ' class.
9 * lynx-low.c (lynx_create_inferior): Likewise.
10 * server.c (our_environ): Make it an instance of 'gdb_environ'.
11 (get_environ): Return a pointer to 'our_environ'.
12 (captured_main): Initialize 'our_environ'.
13 * server.h (get_environ): Adjust prototype.
14 * spu-low.c (spu_create_inferior): Adjust code to access the
15 environment information via 'gdb_environ' class.
16
17 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
18
19 * linux-low.c (linux_read_memory, linux_write_memory): Remove
20 usage of "register" keyword.
21
22 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
23
24 * configure: Re-generate.
25
26 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
27
28 * configure: Re-generate.
29
30 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
31
32 * Makefile.in (COMPILE.pre): Add "-x c++".
33
34 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
35
36 * fork-child.c: Conditionally include <signal.h>.
37
38 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
39
40 * server.c (handle_general_set): Handle new packet
41 "QStartupWithShell".
42 (handle_query): Add "QStartupWithShell" to the list of supported
43 packets.
44 (gdbserver_usage): Add help text explaining the
45 new "--startup-with-shell" and "--no-startup-with-shell" CLI
46 options.
47 (captured_main): Recognize and act upon the presence of the new
48 CLI options.
49
50 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
51 Pedro Alves <palves@redhat.com>
52
53 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
54 * configure: Regenerate.
55 * configure.srv (srv_linux_obj): Add "fork-child.o" and
56 "fork-inferior.o".
57 (i[34567]86-*-lynxos*): Likewise.
58 (spu*-*-*): Likewise.
59 * fork-child.c: New file.
60 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
61 and "environ.h".
62 (linux_ptrace_fun): New function.
63 (linux_create_inferior): Adjust function prototype to reflect
64 change on "target.h". Adjust function code to use
65 "fork_inferior".
66 (linux_request_interrupt): Delete "signal_pid".
67 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
68 (lynx_ptrace_fun): New function.
69 (lynx_create_inferior): Adjust function prototype to reflect
70 change on "target.h". Adjust function code to use
71 "fork_inferior".
72 * nto-low.c (nto_create_inferior): Adjust function prototype and
73 code to reflect change on "target.h". Update comments.
74 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
75 "common-terminal.h" and "environ.h".
76 (terminal_fd): Moved to fork-child.c.
77 (old_foreground_pgrp): Likewise.
78 (restore_old_foreground_pgrp): Likewise.
79 (last_status): Make it global.
80 (last_ptid): Likewise.
81 (our_environ): New variable.
82 (startup_with_shell): Likewise.
83 (program_name): Likewise.
84 (program_argv): Rename to...
85 (program_args): ...this.
86 (wrapper_argv): New variable.
87 (start_inferior): Delete function.
88 (get_exec_wrapper): New function.
89 (get_exec_file): Likewise.
90 (get_environ): Likewise.
91 (prefork_hook): Likewise.
92 (post_fork_inferior): Likewise.
93 (postfork_hook): Likewise.
94 (postfork_child_hook): Likewise.
95 (handle_v_run): Update code to deal with arguments coming from the
96 remote host. Update calls from "start_inferior" to
97 "create_inferior".
98 (captured_main): Likewise. Initialize environment variable. Call
99 "have_job_control".
100 * server.h (post_fork_inferior): New prototype.
101 (get_environ): Likewise.
102 (last_status): Declare.
103 (last_ptid): Likewise.
104 (signal_pid): Likewise.
105 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
106 (spu_ptrace_fun): New function.
107 (spu_create_inferior): Adjust function prototype to reflect change
108 on "target.h". Adjust function code to use "fork_inferior".
109 * target.c (target_terminal_init): New function.
110 (target_terminal_inferior): Likewise.
111 (target_terminal_ours): Likewise.
112 * target.h: Include <vector>.
113 (struct target_ops) <create_inferior>: Update prototype.
114 (create_inferior): Update macro.
115 * utils.c (gdb_flush_out_err): New function.
116 * win32-low.c (win32_create_inferior): Adjust function prototype
117 and code to reflect change on "target.h".
118
119 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
120
121 * inferiors.c (switch_to_thread): New function.
122
123 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
124
125 * Makefile.in (SFILE): Add "common/job-control.c".
126 (OBS): Add "job-control.o".
127
128 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
129
130 * Makefile: Remove "@host_makefile_frag@".
131
132 2017-05-05 Pedro Alves <palves@redhat.com>
133
134 * configure: Regenerate.
135
136 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
137
138 * configure: Regenerate.
139
140 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
141
142 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
143 software_single_step change of return type to
144 std::vector<CORE_ADDR>.
145 * linux-low.c (install_software_single_step_breakpoints):
146 Likewise.
147 * linux-low.h (install_software_single_step_breakpoints):
148 Likewise.
149
150 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
151
152 * remote-utils.c: Include "gdb_termios.h" instead of
153 "terminal.h".
154 * terminal.h: Delete file.
155
156 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
157
158 * server.c: Include <vector>.
159 <program_argv, wrapper_argv>: Convert to std::vector.
160 (start_inferior): Rewrite function to use C++.
161 (handle_v_run): Likewise. Update code that calculates the argv
162 based on the vRun packet; use C++.
163 (captured_main): Likewise.
164
165 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
166
167 * server.c (handle_v_cont): Initialize thread_resume::thread
168 with null_ptid.
169
170 2017-04-05 Pedro Alves <palves@redhat.com>
171
172 * configure: Regenerate.
173
174 2017-04-05 Pedro Alves <palves@redhat.com>
175
176 * gdbreplay.c (sync_error): Constify.
177 * linux-x86-low.c (push_opcode): Constify.
178
179 2017-04-05 Pedro Alves <palves@redhat.com>
180
181 * win32-low.c (get_child_debug_event)
182 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
183 Report TARGET_WAITKIND_SPURIOUS instead.
184
185 2017-04-05 Pedro Alves <palves@redhat.com>
186
187 * remote-utils.c (remote_prepare, remote_open): Constify.
188 * remote-utils.h (remote_prepare, remote_open): Constify.
189 * server.c (captured_main): Constify 'port' handling.
190
191 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
192
193 * Makefile.in (clean): Clear .deps.
194
195 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * .gitignore: Remove generated files, replace with wildcard.
198 * (clean): Replace removal of generated files with wildcard.
199 (version.c): Replace with...
200 (version-generated.c): ...this.
201 (xml-builtin.c): Replace with...
202 (xml-builtin-generated.c): ...this.
203 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
204 (%.c: *regformats*): Replace with...
205 (%-generated.c: *regformats*): ...this.
206
207 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
208
209 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
210 (xtensa_fill_gregset): Call collect_register_by_name for
211 threadptr register.
212 (xtensa_store_gregset): Call supply_register_by_name for
213 threadptr register.
214
215 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
216
217 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
218 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
219 (xtensa_store_gregset): Call supply_register for all registers in
220 a0_regnum..a0_regnum + C0_NREGS range.
221
222 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
225 (ax-ipa.o: ax.c): Remove.
226 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
227 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
228 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
229 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
230 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
231
232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
233
234 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
235 (print-utils-ipa.o: ../common/print-utils.c): Remove.
236 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
237 (errors-ipa.o: ../common/errors.c): Remove.
238 (format-ipa.o: ../common/format.c): Remove.
239 (common-utils-ipa.o: ../common/common-utils.c): Remove.
240
241 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
242
243 * Makefile.in (%-ipa.o: %.c): New rule.
244 (tracepoint-ipa.o: tracepoint.c): Remove.
245 (utils-ipa.o: utils.c): Remove.
246 (remote-utils-ipa.o: remote-utils.c): Remove.
247 (regcache-ipa.o: regcache.c): Remove.
248 (i386-linux-ipa.o: i386-linux.c): Remove.
249 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
250 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
251 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
252 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
253 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
254 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
255 (amd64-linux-ipa.o: amd64-linux.c): Remove.
256 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
257 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
258 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
259 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
260 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
261 (aarch64-ipa.o: aarch64.c): Remove.
262 (s390-linux32-ipa.o: s390-linux32.c): Remove.
263 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
264 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
265 (s390-linux64-ipa.o: s390-linux64.c): Remove.
266 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
267 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
268 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
269 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
270 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
271 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
272 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
273 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
274 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
275 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
276 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
277 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
278 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
279 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
280 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
281 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
282 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
283 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
284 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
285 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
286 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
287 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
288 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
289 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
290 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
291 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
292 (tdesc-ipa.o: tdesc.c): Remove.
293 (x32-linux-ipa.o: x32-linux.c): Remove.
294 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
295 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
296
297 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
298
299 * Makefile.in (%.o: ../arch/%.c): New rule.
300 (arm.o: ../arch/arm.c): Remove.
301 (arm-linux.o: ../arch/arm-linux.c): Remove.
302 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
303 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
304
305 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
306
307 * Makefile.in (%.o: ../nat/%.c): New rule.
308 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
309 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
310 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
311 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
312 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
313 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
314 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
315 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
316 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
317 (linux-personality.o: ../nat/linux-personality.c): Remove.
318 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
319 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
320 (x86-linux.o: ../nat/x86-linux.c): Remove.
321 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
322 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
323
324 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * Makefile.in (%.o: ../common/%.c): New rule.
327 (signals.o: ../common/signals.c): Remove.
328 (print-utils.o: ../common/print-utils.c): Remove.
329 (rsp-low.o: ../common/rsp-low.c): Remove.
330 (common-utils.o: ../common/common-utils.c): Remove.
331 (posix-strerror.o: ../common/posix-strerror.c): Remove.
332 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
333 (vec.o: ../common/vec.c): Remove.
334 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
335 (xml-utils.o: ../common/xml-utils.c): Remove.
336 (ptid.o: ../common/ptid.c): Remove.
337 (buffer.o: ../common/buffer.c): Remove.
338 (format.o: ../common/format.c): Remove.
339 (filestuff.o: ../common/filestuff.c): Remove.
340 (agent.o: ../common/agent.c): Remove.
341 (errors.o: ../common/errors.c): Remove.
342 (environ.o: ../common/environ.c): Remove.
343 (common-debug.o: ../common/common-debug.c): Remove.
344 (cleanups.o: ../common/cleanups.c): Remove.
345 (common-exceptions.o: ../common/common-exceptions.c): Remove.
346 (fileio.o: ../common/fileio.c): Remove.
347 (common-regcache.o: ../common/common-regcache.c): Remove.
348 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
349 (new-op.o: ../common/new-op.c): Remove.
350 (btrace-common.o: ../common/btrace-common.c): Remove.
351
352 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
353
354 * Makefile.in (%.o: ../target/%.c): New rule.
355 (waitstatus.o: ../target/waitstatus.c): Remove.
356
357 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * Makefile.in
360 (%.c: ../regformats/%.dat,
361 (%.c: ../regformats/arm/%.dat,
362 (%.c: ../regformats/i386/%.dat,
363 (%.c: ../regformats/rs6000/%.dat): New rules.
364 (aarch64.c): Remove.
365 (reg-arm.c): Remove.
366 (arm-with-iwmmxt.c): Remove.
367 (arm-with-vfpv2.c): Remove.
368 (arm-with-vfpv3.c): Remove.
369 (arm-with-neon.c): Remove.
370 (reg-bfin.c): Remove.
371 (reg-cris.c): Remove.
372 (reg-crisv32.c): Remove.
373 (i386.c): Remove.
374 (i386-linux.c): Remove.
375 (i386-avx.c): Remove.
376 (i386-avx-linux.c): Remove.
377 (i386-avx-avx512.c): Remove.
378 (i386-avx-avx512-linux.c): Remove.
379 (i386-mpx.c): Remove.
380 (i386-mpx-linux.c): Remove.
381 (i386-avx-mpx-avx512-pku.c): Remove.
382 (i386-avx-mpx-avx512-pku-linux.c): Remove.
383 (i386-avx-mpx.c): Remove.
384 (i386-avx-mpx-linux.c): Remove.
385 (i386-mmx.c): Remove.
386 (i386-mmx-linux.c): Remove.
387 (reg-ia64.c): Remove.
388 (reg-m32r.c): Remove.
389 (reg-m68k.c): Remove.
390 (reg-cf.c): Remove.
391 (mips-linux.c): Remove.
392 (mips-dsp-linux.c): Remove.
393 (mips64-linux.c): Remove.
394 (mips64-dsp-linux.c): Remove.
395 (nios2-linux.c): Remove.
396 (powerpc-32.c): Remove.
397 (powerpc-32l.c): Remove.
398 (powerpc-altivec32l.c): Remove.
399 (powerpc-cell32l.c): Remove.
400 (powerpc-vsx32l.c): Remove.
401 (powerpc-isa205-32l.c): Remove.
402 (powerpc-isa205-altivec32l.c): Remove.
403 (powerpc-isa205-vsx32l.c): Remove.
404 (powerpc-e500l.c): Remove.
405 (powerpc-64l.c): Remove.
406 (powerpc-altivec64l.c): Remove.
407 (powerpc-cell64l.c): Remove.
408 (powerpc-vsx64l.c): Remove.
409 (powerpc-isa205-64l.c): Remove.
410 (powerpc-isa205-altivec64l.c): Remove.
411 (powerpc-isa205-vsx64l.c): Remove.
412 (s390-linux32.c): Remove.
413 (s390-linux32v1.c): Remove.
414 (s390-linux32v2.c): Remove.
415 (s390-linux64.c): Remove.
416 (s390-linux64v1.c): Remove.
417 (s390-linux64v2.c): Remove.
418 (s390-te-linux64.c): Remove.
419 (s390-vx-linux64.c): Remove.
420 (s390-tevx-linux64.c): Remove.
421 (s390x-linux64.c): Remove.
422 (s390x-linux64v1.c): Remove.
423 (s390x-linux64v2.c): Remove.
424 (s390x-te-linux64.c): Remove.
425 (s390x-vx-linux64.c): Remove.
426 (s390x-tevx-linux64.c): Remove.
427 (tic6x-c64xp-linux.c): Remove.
428 (tic6x-c64x-linux.c): Remove.
429 (tic6x-c62x-linux.c): Remove.
430 (reg-sh.c): Remove.
431 (reg-sparc64.c): Remove.
432 (reg-spu.c): Remove.
433 (amd64.c): Remove.
434 (amd64-linux.c): Remove.
435 (amd64-avx.c): Remove.
436 (amd64-avx-linux.c): Remove.
437 (amd64-avx-avx512.c): Remove.
438 (amd64-avx-avx512-linux.c): Remove.
439 (amd64-mpx.c): Remove.
440 (amd64-mpx-linux.c): Remove.
441 (amd64-avx-mpx-avx512-pku.c): Remove.
442 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
443 (amd64-avx-mpx.c): Remove.
444 (amd64-avx-mpx-linux.c): Remove.
445 (x32.c): Remove.
446 (x32-linux.c): Remove.
447 (x32-avx.c): Remove.
448 (x32-avx-linux.c): Remove.
449 (x32-avx-avx512.c): Remove.
450 (x32-avx-avx512-linux.c): Remove.
451 (reg-xtensa.c): Remove.
452 (reg-tilegx.c): Remove.
453 (reg-tilegx32.c): Remove.
454
455 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
456
457 * Makefile.in (SFILES): Add "common/environ.c".
458 (OBJS): Add "common/environ.h".
459
460 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
461
462 * configure.ac: Check if the fs_base and gs_base members of
463 `struct user_regs_struct' exist.
464 * config.in: Regenerated.
465 * configure: Likewise.
466
467 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
468
469 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
470 target_read_memory.
471 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
472 (get_next_pcs_syscall_next_pc): Likewise.
473
474 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
475
476 * win32-i386-low.c: Fix incorrect reference to a couple source files.
477 * nto-x86-low.c: Likewise.
478
479 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
480
481 * Makefile.in: Include disable-implicit-rules.mk.
482
483 2016-11-23 Pedro Alves <palves@redhat.com>
484
485 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
486 (debug_vprintf): Use std::chrono::steady_clock instead of
487 gettimeofday. Use '.' instead of ':'.
488 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
489 (get_timestamp): Use std::chrono::steady_clock instead of
490 gettimeofday.
491
492 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
493
494 * Makefile.in: Fix whitespace formatting.
495
496 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
497
498 * Makefile.in (SFILES, OBS): Flatten list and order
499 alphabetically.
500
501 2016-11-23 Pedro Alves <palves@redhat.com>
502
503 * event-loop.c (handle_file_event): Use warning.
504 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
505 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
506 Use warning.
507
508 2016-11-23 Pedro Alves <palves@redhat.com>
509
510 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
511 output.
512 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
513 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
514 debug_printf and debug_flush for debug output.
515 * server.c (handle_general_set): Likewise.
516 * thread-db.c (try_thread_db_load): Use debug_printf for debug
517 output.
518
519 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
520
521 * Makefile.in (.c.o): Replace rule with ...
522 (%.o: %.c): ... this one.
523
524 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
525
526 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
527 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
528 make.
529 * configure.ac: Remove checks for the make program.
530 * configure: Re-generate.
531
532 2016-10-28 Pedro Alves <palves@redhat.com>
533
534 * Makefile.in (CXX_DIALECT): Get from configure.
535 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
536 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
537 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
538 * config.in: Regenerate.
539 * configure: Regenerate.
540
541 2016-10-27 Yao Qi <yao.qi@linaro.org>
542
543 * linux-low.c (linux_supports_range_stepping): Return true if
544 can_software_single_step return true.
545
546 2016-10-27 Yao Qi <yao.qi@linaro.org>
547
548 * inferiors.c (find_inferior_in_random): New function.
549 * inferiors.h (find_inferior_in_random): Declare.
550 * linux-low.c (linux_wait_for_event_filtered): Call
551 find_inferior_in_random instead of find_inferior.
552
553 2016-10-27 Yao Qi <yao.qi@linaro.org>
554
555 * linux-low.c (linux_wait_1): If single-step breakpoints are
556 inserted, remove them.
557
558 2016-10-26 Pedro Alves <palves@redhat.com>
559
560 * linux-low.c (handle_extended_wait): Link parent/child fork
561 threads.
562 (linux_wait_1): Unlink them.
563 (linux_set_resume_request): Ignore resume requests for
564 already-resumed and unhandled fork child threads.
565 * linux-low.h (struct lwp_info) <fork_relative>: New field.
566 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
567 New functions.
568 (handle_v_requests) <vCont>: Don't call require_running.
569 * server.h (in_queued_stop_replies): New declaration.
570
571 2016-10-24 Yao Qi <yao.qi@linaro.org>
572
573 PR server/20733
574 * linux-aarch64-low.c (append_insns): Cast the return value to
575 'uint32_t *'.
576
577 2016-10-10 Yao Qi <yao.qi@linaro.org>
578
579 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
580
581 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
582
583 * target.c (target_supports_multi_process): New function, moved
584 from...
585 * target.h (target_supports_multi_process): ... here. Remove
586 macro.
587
588 2016-10-05 Tom Tromey <tom@tromey.com>
589
590 PR remote/20655:
591 * tracepoint.c (handle_tracepoint_bkpts): Check
592 ipa_error_tracepoint, not ipa_stopping_tracepoint.
593
594 2016-10-05 Yao Qi <yao.qi@linaro.org>
595
596 * configure.srv: Update the path of arm-*.xml files.
597
598 2016-10-05 Terry Guo <terry.guo@arm.com>
599 Yao Qi <yao.qi@linaro.org>
600
601 * Makefile.in: Adjust the path of rules.
602 * configure.srv: Update the path of xml files.
603 * regformats/arm-with-iwmmxt.dat: Regenerated.
604 * regformats/arm-with-neon.dat: Likewise.
605 * regformats/arm-with-vfpv2.dat: Likewise.
606 * regformats/arm-with-vfpv3.dat Likewise.
607
608 2016-09-30 Yao Qi <yao.qi@linaro.org>
609
610 PR gdbserver/20627
611 * target.c (target_stop_and_wait): Don't call
612 target_continue_no_signal, use resume_stop instead.
613
614 2016-09-26 Yao Qi <yao.qi@linaro.org>
615
616 * linux-low.c (linux_wait_1): Call debug_exit.
617
618 2016-09-23 Pedro Alves <palves@redhat.com>
619
620 * Makefile.in (SFILES): Add common/new-op.c.
621 (OBS): Add common/new-op.o.
622 (new-op.o): New rule.
623
624 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
625
626 * .gitinore: Ignore more files.
627
628 2016-09-21 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
631 23.
632
633 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
634
635 * server.c (start_inferior): Call target_mourn_inferior instead of
636 mourn_inferior; pass ptid_t argument to it.
637 (resume): Likewise.
638 (handle_target_event): Likewise.
639 * target.c (target_mourn_inferior): New function.
640 * target.h (mourn_inferior): Delete macro.
641
642 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
643
644 * linux-low.c (lwp_is_stepping): New function.
645
646 2016-09-06 Carl Love <cel@us.ibm.com>
647
648 * server.c (start_inferior): Fixed comment, requested comment change
649 didn't get updated correctly. Removed reference to ptrace () call as
650 it is only true on Linux systems.
651
652 2016-09-06 Carl Love <cel@us.ibm.com>
653
654 * server.c (start_inferior): Do not call
655 function target_post_create_inferior () if the
656 inferior process has already exited.
657
658 2016-09-05 Pedro Alves <palves@redhat.com>
659
660 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
661 (COMPILE.pre, CC_LD): Use CXX directly.
662 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
663 * acinclude.m4: Don't include build-with-cxx.m4.
664 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
665 * configure: Regenerate.
666
667 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
668
669 PR gdb/19495
670 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
671 call writing data to own_buf.
672
673 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
674
675 * target.c (mywait): Call target_wait instead of
676 the_target->wait.
677 (target_wait): New function.
678
679 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
680
681 * server.c (start_inferior): New variable 'ptid'. Replace calls
682 to the_target->resume by target_continue{,_no_signal}, depending
683 on the case.
684 * target.c (target_stop_and_wait): Call target_continue_no_signal
685 instead of the_target->resume.
686 (target_continue): New function.
687
688 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
689
690 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
691
692 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
693
694 PR server/20491
695 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
696 ps_prochandle.
697 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
698 * linux-arm-low.c (ps_get_thread_area): Likewise.
699 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
700 * linux-m68k-low.c (ps_get_thread_area): Likewise.
701 * linux-mips-low.c (ps_get_thread_area): Likewise.
702 * linux-nios2-low.c (ps_get_thread_area): Likewise.
703 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
704 * linux-x86-low.c (ps_get_thread_area): Likewise.
705 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
706
707 2016-08-19 Pedro Alves <palves@redhat.com>
708
709 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
710
711 2016-08-19 Pedro Alves <palves@redhat.com>
712
713 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
714 comment. Use memcpy instead of casting through unsigned long.
715
716 2016-08-19 Pedro Alves <palves@redhat.com>
717
718 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
719 allocating around 0x80000000.
720
721 2016-08-19 Pedro Alves <palves@redhat.com>
722
723 PR gdb/20415
724 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
725 (x32-avx512-linux-ipa.o): New rules.
726 * configure.ac (x86_64-*-linux*): New x32 check.
727 * configure.srv (ipa_x32_linux_regobj): New.
728 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
729 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
730 descriptions.
731 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
732 descriptions.
733 * configure: Regenerate.
734
735 2016-08-09 Pedro Alves <palves@redhat.com>
736
737 PR gdb/18653
738 * Makefile.in (OBS): Add signals-state-save-restore.o.
739 (signals-state-save-restore.o): New rule.
740 * config.in: Regenerate.
741 * configure: Regenerate.
742 * linux-low.c: Include "signals-state-save-restore.h".
743 (linux_create_inferior): Call
744 restore_original_signals_state.
745 * server.c: Include "dispositions-save-restore.h".
746 (captured_main): Call save_original_signals_state.
747
748 2016-08-05 Pedro Alves <palves@redhat.com>
749
750 * configure: Regenerate.
751
752 2016-08-04 Yao Qi <yao.qi@linaro.org>
753
754 * linux-low.c (regsets_fetch_inferior_registers): Check
755 errno is ESRCH or not.
756
757 2016-08-02 Yao Qi <yao.qi@linaro.org>
758
759 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
760 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
761 (thread_db_load_search): Update.
762 (try_thread_db_load_1): Don't look for td_ta_event_addr,
763 td_ta_set_event and td_ta_event_getmsg.
764
765 2016-07-26 Pedro Alves <palves@redhat.com>
766
767 PR server/20414
768 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
769 of unsigned long for 64-bit registers and use uint32_t instead of
770 unsigned int for 32-bit registers.
771
772 2016-07-26 Pedro Alves <palves@redhat.com>
773
774 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
775 to 'ptrace'.
776
777 2016-07-21 Tom Tromey <tom@tromey.com>
778
779 * configure: Rebuild.
780
781 2016-07-21 Yao Qi <yao.qi@linaro.org>
782
783 * mem-break.c (find_gdb_breakpoint): Cast bp to
784 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
785
786 2016-07-21 Yao Qi <yao.qi@linaro.org>
787
788 * server.c (handle_v_requests): Support s and S actions
789 if target_supports_software_single_step return true.
790
791 2016-07-21 Yao Qi <yao.qi@linaro.org>
792
793 * linux-low.c (resume_stopped_resumed_lwps): If resume request
794 is resume_step, call maybe_hw_step.
795 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
796 and unstop them.
797 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
798 breakpoints or not.
799 (proceed_one_lwp): If resume request is resume_step, install
800 reinsert breakpoints and call maybe_hw_step.
801
802 2016-07-21 Yao Qi <yao.qi@linaro.org>
803
804 * linux-low.c (proceed_one_lwp): Declare.
805 (linux_resume_one_thread): Remove local variable 'step'.
806 Lift code enqueue signal. Call proceed_one_lwp instead of
807 linux_resume_one_lwp.
808
809 2016-07-21 Yao Qi <yao.qi@linaro.org>
810
811 * linux-low.c (linux_resume_one_thread): Call
812 enqueue_pending_signal.
813
814 2016-07-21 Yao Qi <yao.qi@linaro.org>
815
816 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
817 * inferiors.c (do_restore_current_thread_cleanup): New function.
818 (make_cleanup_restore_current_thread): Likewise.
819 * linux-low.c (install_software_single_step_breakpoints): Call
820 make_cleanup_restore_current_thread. Switch current_thread to
821 thread.
822
823 2016-07-21 Yao Qi <yao.qi@linaro.org>
824
825 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
826 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
827 (clone_one_breakpoint): Likewise.
828 (delete_reinsert_breakpoints): Change parameter to thread.
829 Callers updated.
830 (has_reinsert_breakpoints): Likewise.
831 (uninsert_reinsert_breakpoints): Likewise.
832 (reinsert_reinsert_breakpoints): Likewise.
833 * mem-break.h (set_reinsert_breakpoint): Update declaration.
834 (delete_reinsert_breakpoints): Likewise.
835 (reinsert_reinsert_breakpoints): Likewise.
836 (uninsert_reinsert_breakpoints): Likewise.
837 (has_reinsert_breakpoints): Likewise.
838
839 2016-07-21 Yao Qi <yao.qi@linaro.org>
840
841 * inferiors.c (get_thread_process): Make parameter const.
842 * inferiors.h (get_thread_process): Update declaration.
843 * mem-break.c (clone_all_breakpoints): Remove all parameters.
844 Add new parameters child_thread and parent_thread. Callers
845 updated.
846 * mem-break.h (clone_all_breakpoints): Update declaration.
847
848 2016-07-21 Yao Qi <yao.qi@linaro.org>
849
850 * mem-break.c (struct breakpoint) <cond_list>: Remove.
851 <command_list, handler>: Remove.
852 (struct gdb_breakpoint): New.
853 (struct other_breakpoint): New.
854 (struct reinsert_breakpoint): New.
855 (is_gdb_breakpoint): New function.
856 (any_persistent_commands): Update command_list if
857 is_gdb_breakpoint returns true.
858 (set_breakpoint): Create breakpoints according to their types.
859 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
860 (set_gdb_breakpoint_1): Likewise.
861 (set_gdb_breakpoint): Likewise.
862 (clear_breakpoint_conditions): Change parameter type to
863 'struct gdb_breakpoint *'.
864 (clear_breakpoint_commands): Likewise.
865 (clear_breakpoint_conditions_and_commands): Likewise.
866 (add_condition_to_breakpoint): Likewise.
867 (add_breakpoint_condition): Likewise.
868 (add_commands_to_breakpoint): Likewise.
869 (check_breakpoints): Check other_breakpoint.
870 (clone_one_breakpoint): Clone breakpopint according to its type.
871 * mem-break.h (struct gdb_breakpoint): Declare.
872 (set_gdb_breakpoint): Update declaration.
873 (clear_breakpoint_conditions_and_commands): Likewise.
874 (add_breakpoint_condition): Likewise.
875 (add_breakpoint_commands): Likewise.
876 * server.c (process_point_options): Change parameter type to
877 'struct gdb_breakpoint *'.
878
879 2016-07-21 Yao Qi <yao.qi@linaro.org>
880
881 * mem-break.c (set_breakpoint_at): Rename it to ...
882 (set_breakpoint_type_at): ... it.
883 (set_breakpoint_at): Call set_breakpoint_type_at.
884 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
885 * mem-break.h (set_breakpoint_at): Update comments.
886
887 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
888
889 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
890 to buf parameter.
891 (nios2_store_gregset): Likewise.
892
893 2016-07-01 Pedro Alves <palves@redhat.com>
894 Antoine Tremblay <antoine.tremblay@ericsson.com>
895
896 * linux-low.c: Change interface to take the target lwp_info
897 pointer directly and return void. Handle detaching from a zombie
898 thread.
899 (linux_detach_lwp_callback): New function.
900 (linux_detach): Detach from the leader thread after detaching from
901 the clone threads.
902
903 2016-06-28 Yao Qi <yao.qi@linaro.org>
904
905 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
906 for variable new_offset.
907 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
908 (aarch64_ftrace_insn_reloc_cb): Likewise.
909 (aarch64_ftrace_insn_reloc_tb): Likewise.
910 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
911 PRIx64 instead of PRIx32.
912
913 2016-06-28 Yao Qi <yao.qi@linaro.org>
914
915 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
916 (the_low_target): Install arm_get_syscall_trapinfo.
917
918 2016-06-28 Yao Qi <yao.qi@linaro.org>
919
920 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
921 function.
922 (the_low_target): Install aarch64_get_syscall_trapinfo.
923
924 2016-06-28 Yao Qi <yao.qi@linaro.org>
925
926 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
927 Callers updated.
928 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
929 Remove parameter sysno.
930 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
931 sysret.
932
933 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
934
935 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
936 (s390_emit_ne_goto): Likewise.
937 (s390_emit_lt_goto): Likewise.
938 (s390_emit_le_goto): Likewise.
939 (s390_emit_gt_goto): Likewise.
940 (s390_emit_ge_goto): Likewise.
941 (s390x_emit_eq_goto): Likewise.
942 (s390x_emit_ne_goto): Likewise.
943 (s390x_emit_lt_goto): Likewise.
944 (s390x_emit_le_goto): Likewise.
945 (s390x_emit_gt_goto): Likewise.
946 (s390x_emit_ge_goto): Likewise.
947 (s390_emit_ops_impl): Mark variable static.
948 (s390x_emit_ops): Likewise.
949
950 2016-06-17 Yao Qi <yao.qi@linaro.org>
951
952 * linux-low.c (handle_extended_wait): Call
953 uninsert_reinsert_breakpoints for the parent process. Remove
954 reinsert breakpoints from the child process. Reinsert them to
955 the parent process when vfork is done.
956 * mem-break.c (uninsert_reinsert_breakpoints): New function.
957 (reinsert_reinsert_breakpoints): New function.
958 * mem-break.h (uninsert_reinsert_breakpoints): Declare
959 (reinsert_reinsert_breakpoints): Declare.
960
961 2016-06-17 Yao Qi <yao.qi@linaro.org>
962
963 * linux-low.c (handle_extended_wait): If the parent is doing
964 step-over, remove the reinsert breakpoints from the forked child.
965
966 2016-06-17 Yao Qi <yao.qi@linaro.org>
967
968 * linux-low.c (unsuspend_all_lwps): Declare.
969 (linux_low_filter_event): If thread exited, call finish_step_over.
970 If step-over is finished, unsuspend other threads.
971
972 2016-06-17 Yao Qi <yao.qi@linaro.org>
973
974 * linux-low.c (linux_resume_one_lwp_throw): Assert
975 has_reinsert_breakpoints returns false.
976 * mem-break.c (delete_disabled_breakpoints): Assert
977 bp type isn't reinsert_breakpoint.
978
979 2016-06-17 Yao Qi <yao.qi@linaro.org>
980
981 * linux-low.c (maybe_hw_step): New function.
982 (linux_resume_one_lwp_throw): Call maybe_hw_step.
983 (finish_step_over): Switch current_thread to lwp temporarily,
984 and assert has_reinsert_breakpoints returns true.
985 (proceed_one_lwp): Call maybe_hw_step.
986 * mem-break.c (has_reinsert_breakpoints): New function.
987 * mem-break.h (has_reinsert_breakpoints): Declare.
988
989 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
990
991 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
992
993 2016-05-17 Yao Qi <yao.qi@linaro.org>
994
995 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
996 instead of find_inferior.
997
998 2016-05-05 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1001 Initialize res to zero.
1002
1003 2016-05-05 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1006 to uint32_t.
1007
1008 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1009
1010 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1011 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1012 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1013
1014 2016-04-28 Par Olsson <par.olsson@windriver.com>
1015 Simon Marchi <simon.marchi@ericsson.com>
1016
1017 * tracepoint.c (write_inferior_int8): New function.
1018 (cmd_qtenable_disable): Write enable flag using
1019 write_inferior_int8.
1020
1021 2016-04-25 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1024 (need_step_over_p): Return zero if the LWP has pending signals
1025 can be delivered on software single step target.
1026
1027 2016-04-25 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1030 return instead of error.
1031
1032 2016-04-22 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1035 to 23.
1036
1037 2016-04-22 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1040 signal when stepping over breakpoint with software single
1041 step.
1042
1043 2016-04-21 Pedro Alves <palves@redhat.com>
1044
1045 * linux-s390-low.c (s390_collect_ptrace_register)
1046 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1047 add casts.
1048 (s390_check_regset): Use void * instead of gdb_byte *.
1049
1050 2016-04-20 Pedro Alves <palves@redhat.com>
1051
1052 * configure: Renegerate.
1053
1054 2016-04-20 Yao Qi <yao.qi@linaro.org>
1055
1056 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1057 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1058 number 16.
1059 (arm_store_gregset): Likewise.
1060
1061 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1062
1063 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1064 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1065 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1066 (amd64-avx-mpx-linux.c): New rules.
1067 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1068 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1069 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1070 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1071 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1072 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1073 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1074 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1075 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1076 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1077 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1078 * linux-x86-low.c (x86_linux_read_description): Add case for
1079 X86_XSTATE_AVX_MPX_MASK.
1080 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1081 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1082 init_registers_i386_avx_mpx_linux.
1083 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1084 (initialize_low_tracepoint): Call
1085 init_registers_i386_avx_mpx_linux.
1086 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1087 (initialize_low_tracepoint): Call
1088 init_registers_amd64_avx_mpx_linux.
1089 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1090 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1091 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1092 declarations.
1093
1094 2016-04-18 Pedro Alves <palves@redhat.com>
1095
1096 * configure: Regenerate.
1097
1098 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1099
1100 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1101 (aarch64_emit_sub): Likewise.
1102
1103 2016-04-12 Pedro Alves <palves@redhat.com>
1104
1105 * utils.c (prepare_to_throw_exception): Delete.
1106
1107 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1110
1111 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1112
1113 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1114
1115 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1116
1117 * linux-aarch64-ipa.c: Add <elf.h> include.
1118 * linux-ppc-ipa.c: Add <elf.h> include.
1119 * linux-s390-ipa.c: Add <elf.h> include.
1120
1121 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1122
1123 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1124 (get_raw_reg_ptr): Likewise.
1125 (get_trace_state_variable_value_ptr): Likewise.
1126 (set_trace_state_variable_value_ptr): Likewise.
1127 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1128 char *.
1129
1130 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1131 Marcin Kościelnicki <koriakin@0x04.net>
1132
1133 PR/17221
1134 * linux-ppc-low.c (emit_insns): New function.
1135 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1136 (ppc_emit_prologue): New function.
1137 (ppc_emit_epilogue): New function.
1138 (ppc_emit_add): New function.
1139 (ppc_emit_sub): New function.
1140 (ppc_emit_mul): New function.
1141 (ppc_emit_lsh): New function.
1142 (ppc_emit_rsh_signed): New function.
1143 (ppc_emit_rsh_unsigned): New function.
1144 (ppc_emit_ext): New function.
1145 (ppc_emit_zero_ext): New function.
1146 (ppc_emit_log_not): New function.
1147 (ppc_emit_bit_and): New function.
1148 (ppc_emit_bit_or): New function.
1149 (ppc_emit_bit_xor): New function.
1150 (ppc_emit_bit_not): New function.
1151 (ppc_emit_equal): New function.
1152 (ppc_emit_less_signed): New function.
1153 (ppc_emit_less_unsigned): New function.
1154 (ppc_emit_ref): New function.
1155 (ppc_emit_const): New function.
1156 (ppc_emit_reg): New function.
1157 (ppc_emit_pop): New function.
1158 (ppc_emit_stack_flush): New function.
1159 (ppc_emit_swap): New function.
1160 (ppc_emit_stack_adjust): New function.
1161 (ppc_emit_call): New function.
1162 (ppc_emit_int_call_1): New function.
1163 (ppc_emit_void_call_2): New function.
1164 (ppc_emit_if_goto): New function.
1165 (ppc_emit_goto): New function.
1166 (ppc_emit_eq_goto): New function.
1167 (ppc_emit_ne_goto): New function.
1168 (ppc_emit_lt_goto): New function.
1169 (ppc_emit_le_goto): New function.
1170 (ppc_emit_gt_goto): New function.
1171 (ppc_emit_ge_goto): New function.
1172 (ppc_write_goto_address): New function.
1173 (ppc_emit_ops_impl): New static variable.
1174 (ppc64v1_emit_prologue): New function.
1175 (ppc64v2_emit_prologue): New function.
1176 (ppc64_emit_epilogue): New function.
1177 (ppc64_emit_add): New function.
1178 (ppc64_emit_sub): New function.
1179 (ppc64_emit_mul): New function.
1180 (ppc64_emit_lsh): New function.
1181 (ppc64_emit_rsh_signed): New function.
1182 (ppc64_emit_rsh_unsigned): New function.
1183 (ppc64_emit_ext): New function.
1184 (ppc64_emit_zero_ext): New function.
1185 (ppc64_emit_log_not): New function.
1186 (ppc64_emit_bit_and): New function.
1187 (ppc64_emit_bit_or): New function.
1188 (ppc64_emit_bit_xor): New function.
1189 (ppc64_emit_bit_not): New function.
1190 (ppc64_emit_equal): New function.
1191 (ppc64_emit_less_signed): New function.
1192 (ppc64_emit_less_unsigned): New function.
1193 (ppc64_emit_ref): New function.
1194 (ppc64_emit_const): New function.
1195 (ppc64v1_emit_reg): New function.
1196 (ppc64v2_emit_reg): New function.
1197 (ppc64_emit_pop): New function.
1198 (ppc64_emit_stack_flush): New function.
1199 (ppc64_emit_swap): New function.
1200 (ppc64v1_emit_call): New function.
1201 (ppc64v2_emit_call): New function.
1202 (ppc64v1_emit_int_call_1): New function.
1203 (ppc64v2_emit_int_call_1): New function.
1204 (ppc64v1_emit_void_call_2): New function.
1205 (ppc64v2_emit_void_call_2): New function.
1206 (ppc64_emit_if_goto): New function.
1207 (ppc64_emit_eq_goto): New function.
1208 (ppc64_emit_ne_goto): New function.
1209 (ppc64_emit_lt_goto): New function.
1210 (ppc64_emit_le_goto): New function.
1211 (ppc64_emit_gt_goto): New function.
1212 (ppc64_emit_ge_goto): New function.
1213 (ppc64v1_emit_ops_impl): New static variable.
1214 (ppc64v2_emit_ops_impl): New static variable.
1215 (ppc_emit_ops): New function.
1216 (linux_low_target): Wire in ppc_emit_ops.
1217
1218 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1219 Marcin Kościelnicki <koriakin@0x04.net>
1220
1221 PR/17221
1222 * Makefile.in: Add powerpc-*-ipa.o
1223 * configure.srv: Add ipa_obj for powerpc*-linux.
1224 * linux-ppc-ipa.c: New file.
1225 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1226 includes.
1227 (PPC_FIELD): New macro.
1228 (PPC_SEXT): New macro.
1229 (PPC_OP6): New macro.
1230 (PPC_BO): New macro.
1231 (PPC_LI): New macro.
1232 (PPC_BD): New macro.
1233 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1234 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1235 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1236 (ppc_get_thread_area): New function.
1237 (is_elfv2_inferior): New function.
1238 (gen_ds_form): New function.
1239 (GEN_STD): New macro.
1240 (GEN_STDU): New macro.
1241 (GEN_LD): New macro.
1242 (GEN_LDU): New macro.
1243 (gen_d_form): New function.
1244 (GEN_ADDI): New macro.
1245 (GEN_ADDIS): New macro.
1246 (GEN_LI): New macro.
1247 (GEN_LIS): New macro.
1248 (GEN_ORI): New macro.
1249 (GEN_ORIS): New macro.
1250 (GEN_LWZ): New macro.
1251 (GEN_STW): New macro.
1252 (GEN_STWU): New macro.
1253 (gen_xfx_form): New function.
1254 (GEN_MFSPR): New macro.
1255 (GEN_MTSPR): New macro.
1256 (GEN_MFCR): New macro.
1257 (GEN_MTCR): New macro.
1258 (GEN_SYNC): New macro.
1259 (GEN_LWSYNC): New macro.
1260 (gen_x_form): New function.
1261 (GEN_OR): New macro.
1262 (GEN_MR): New macro.
1263 (GEN_LWARX): New macro.
1264 (GEN_STWCX): New macro.
1265 (GEN_CMPW): New macro.
1266 (gen_md_form): New function.
1267 (GEN_RLDICL): New macro.
1268 (GEN_RLDICR): New macro.
1269 (gen_i_form): New function.
1270 (GEN_B): New macro.
1271 (GEN_BL): New macro.
1272 (gen_b_form): New function.
1273 (GEN_BNE): New macro.
1274 (GEN_LOAD): New macro.
1275 (GEN_STORE): New macro.
1276 (gen_limm): New function.
1277 (gen_atomic_xchg): New function.
1278 (gen_call): New function.
1279 (ppc_relocate_instruction): New function.
1280 (ppc_install_fast_tracepoint_jump_pad): New function.
1281 (ppc_get_min_fast_tracepoint_insn_len): New function.
1282 (ppc_get_ipa_tdesc_idx): New function.
1283 (the_low_target): Wire in the new functions.
1284 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1285 tdescs.
1286 * linux-ppc-tdesc.h: New file.
1287
1288 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1289
1290 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1291 (alloc_jump_pad_buffer): New function.
1292 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1293 (alloc_jump_pad_buffer): New function.
1294 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1295 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1296 (alloc_jump_pad_buffer): New function.
1297 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1298 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1299 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1300 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1301
1302 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1303
1304 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1305 * linux-amd64-ipa.c: Likewise.
1306 * linux-i386-ipa.c: Likewise.
1307 * linux-s390-ipa.c: Likewise.
1308 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1309 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1310 set_trace_state_variable_value_ptr.
1311 (struct ipa_sym_addresses): Likewise.
1312 (symbol_list): Likewise.
1313 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1314 accessing gdb_collect directly.
1315 (gdb_collect_ptr_type): New typedef.
1316 (get_raw_reg_ptr_type): New typedef.
1317 (get_trace_state_variable_value_ptr_type): New typedef.
1318 (set_trace_state_variable_value_ptr_type): New typedef.
1319 (gdb_collect_ptr): New global.
1320 (get_raw_reg_ptr): New global.
1321 (get_trace_state_variable_value_ptr): New global.
1322 (set_trace_state_variable_value_ptr): New global.
1323 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1324 accessing get_raw_reg directly.
1325 (get_get_tsv_func_addr): Likewise for
1326 get_trace_state_variable_value_ptr.
1327 (get_set_tsv_func_addr): Likewise for
1328 set_trace_state_variable_value_ptr.
1329 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1330
1331 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1332
1333 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1334
1335 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1336
1337 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1338 packets.
1339 (relocate_instruction): Remove own_buf.
1340 * server.c (own_buf): Make global.
1341 (handle_v_requests): Make global.
1342 * server.h (own_buf): New declaration.
1343 (handle_v_requests): New prototype.
1344
1345 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1346
1347 PR 18377
1348 * linux-s390-low.c (add_insns): New function.
1349 (s390_emit_prologue): New function.
1350 (s390_emit_epilogue): New function.
1351 (s390_emit_add): New function.
1352 (s390_emit_sub): New function.
1353 (s390_emit_mul): New function.
1354 (s390_emit_lsh): New function.
1355 (s390_emit_rsh_signed): New function.
1356 (s390_emit_rsh_unsigned): New function.
1357 (s390_emit_ext): New function.
1358 (s390_emit_log_not): New function.
1359 (s390_emit_bit_and): New function.
1360 (s390_emit_bit_or): New function.
1361 (s390_emit_bit_xor): New function.
1362 (s390_emit_bit_not): New function.
1363 (s390_emit_equal): New function.
1364 (s390_emit_less_signed): New function.
1365 (s390_emit_less_unsigned): New function.
1366 (s390_emit_ref): New function.
1367 (s390_emit_if_goto): New function.
1368 (s390_emit_goto): New function.
1369 (s390_write_goto_address): New function.
1370 (s390_emit_litpool): New function.
1371 (s390_emit_const): New function.
1372 (s390_emit_call): New function.
1373 (s390_emit_reg): New function.
1374 (s390_emit_pop): New function.
1375 (s390_emit_stack_flush): New function.
1376 (s390_emit_zero_ext): New function.
1377 (s390_emit_swap): New function.
1378 (s390_emit_stack_adjust): New function.
1379 (s390_emit_set_r2): New function.
1380 (s390_emit_int_call_1): New function.
1381 (s390_emit_void_call_2): New function.
1382 (s390_emit_eq_goto): New function.
1383 (s390_emit_ne_goto): New function.
1384 (s390_emit_lt_goto): New function.
1385 (s390_emit_le_goto): New function.
1386 (s390_emit_gt_goto): New function.
1387 (s390_emit_ge_goto): New function.
1388 (s390x_emit_prologue): New function.
1389 (s390x_emit_epilogue): New function.
1390 (s390x_emit_add): New function.
1391 (s390x_emit_sub): New function.
1392 (s390x_emit_mul): New function.
1393 (s390x_emit_lsh): New function.
1394 (s390x_emit_rsh_signed): New function.
1395 (s390x_emit_rsh_unsigned): New function.
1396 (s390x_emit_ext): New function.
1397 (s390x_emit_log_not): New function.
1398 (s390x_emit_bit_and): New function.
1399 (s390x_emit_bit_or): New function.
1400 (s390x_emit_bit_xor): New function.
1401 (s390x_emit_bit_not): New function.
1402 (s390x_emit_equal): New function.
1403 (s390x_emit_less_signed): New function.
1404 (s390x_emit_less_unsigned): New function.
1405 (s390x_emit_ref): New function.
1406 (s390x_emit_if_goto): New function.
1407 (s390x_emit_const): New function.
1408 (s390x_emit_call): New function.
1409 (s390x_emit_reg): New function.
1410 (s390x_emit_pop): New function.
1411 (s390x_emit_stack_flush): New function.
1412 (s390x_emit_zero_ext): New function.
1413 (s390x_emit_swap): New function.
1414 (s390x_emit_stack_adjust): New function.
1415 (s390x_emit_int_call_1): New function.
1416 (s390x_emit_void_call_2): New function.
1417 (s390x_emit_eq_goto): New function.
1418 (s390x_emit_ne_goto): New function.
1419 (s390x_emit_lt_goto): New function.
1420 (s390x_emit_le_goto): New function.
1421 (s390x_emit_gt_goto): New function.
1422 (s390x_emit_ge_goto): New function.
1423 (s390_emit_ops): New function.
1424 (struct linux_target_ops): Fill in emit_ops hook.
1425
1426 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1427
1428 PR 18377
1429 * Makefile.in: Add s390 IPA files.
1430 * configure.srv: Build IPA for s390.
1431 * linux-s390-ipa.c: New file.
1432 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1433 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1434 (tdesc_s390_linux32): Likewise.
1435 (init_registers_s390_linux32v1): Likewise.
1436 (tdesc_s390_linux32v1): Likewise.
1437 (init_registers_s390_linux32v2): Likewise.
1438 (tdesc_s390_linux32v2): Likewise.
1439 (init_registers_s390_linux64): Likewise.
1440 (tdesc_s390_linux64): Likewise.
1441 (init_registers_s390_linux64v1): Likewise.
1442 (tdesc_s390_linux64v1): Likewise.
1443 (init_registers_s390_linux64v2): Likewise.
1444 (tdesc_s390_linux64v2): Likewise.
1445 (init_registers_s390_te_linux64): Likewise.
1446 (tdesc_s390_te_linux64): Likewise.
1447 (init_registers_s390_vx_linux64): Likewise.
1448 (tdesc_s390_vx_linux64): Likewise.
1449 (init_registers_s390_tevx_linux64): Likewise.
1450 (tdesc_s390_tevx_linux64): Likewise.
1451 (init_registers_s390x_linux64): Likewise.
1452 (tdesc_s390x_linux64): Likewise.
1453 (init_registers_s390x_linux64v1): Likewise.
1454 (tdesc_s390x_linux64v1): Likewise.
1455 (init_registers_s390x_linux64v2): Likewise.
1456 (tdesc_s390x_linux64v2): Likewise.
1457 (init_registers_s390x_te_linux64): Likewise.
1458 (tdesc_s390x_te_linux64): Likewise.
1459 (init_registers_s390x_vx_linux64): Likewise.
1460 (tdesc_s390x_vx_linux64): Likewise.
1461 (init_registers_s390x_tevx_linux64): Likewise.
1462 (tdesc_s390x_tevx_linux64): Likewise.
1463 (have_hwcap_s390_vx): New static variable.
1464 (s390_arch_setup): Fill have_hwcap_s390_vx.
1465 (s390_get_thread_area): New function.
1466 (s390_ft_entry_gpr_esa): New const.
1467 (s390_ft_entry_gpr_zarch): New const.
1468 (s390_ft_entry_misc): New const.
1469 (s390_ft_entry_fr): New const.
1470 (s390_ft_entry_vr): New const.
1471 (s390_ft_main_31): New const.
1472 (s390_ft_main_64): New const.
1473 (s390_ft_exit_fr): New const.
1474 (s390_ft_exit_vr): New const.
1475 (s390_ft_exit_misc): New const.
1476 (s390_ft_exit_gpr_esa): New const.
1477 (s390_ft_exit_gpr_zarch): New const.
1478 (append_insns): New function.
1479 (s390_relocate_instruction): New function.
1480 (s390_install_fast_tracepoint_jump_pad): New function.
1481 (s390_get_min_fast_tracepoint_insn_len): New function.
1482 (s390_get_ipa_tdesc_idx): New function.
1483 (struct linux_target_ops): Wire in the above functions.
1484 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1485 * linux-s390-tdesc.h: New file.
1486
1487 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1488
1489 * linux-s390-low.c (s390_supports_tracepoints): New function.
1490 (struct linux_target_ops): Fill supports_tracepoints hook.
1491
1492 2016-03-18 Yao Qi <yao.qi@linaro.org>
1493
1494 * linux-low.c (lwp_signal_can_be_delivered): New function.
1495 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1496
1497 2016-03-18 Yao Qi <yao.qi@linaro.org>
1498
1499 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1500 0 if signal is enqueued. Remove 'signal' from one debugging
1501 message. Move one debugging message to some lines below.
1502 Remove code setting 'signal' to 0.
1503
1504 2016-03-18 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-low.c (linux_low_filter_event): Remove redundant
1507 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1508
1509 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1512 (struct linux_target_ops): Wire in the above.
1513
1514 2016-03-03 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-low.c: Update comments to start_step_over.
1517
1518 2016-03-03 Yao Qi <yao.qi@linaro.org>
1519
1520 PR server/19736
1521 * linux-low.c (handle_extended_wait): Set child suspended
1522 if event_lwp->bp_reinsert isn't zero.
1523
1524 2016-03-02 Yao Qi <yao.qi@linaro.org>
1525
1526 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1527 enqueue_pending_signal.
1528
1529 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1530
1531 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1532 is actually loaded.
1533
1534 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1535
1536 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1537 (s390_regmap_3264) [!__s390x__]: New global.
1538 (s390_collect_ptrace_register): Skip map entries containing -1.
1539 (s390_supply_ptrace_register): Ditto.
1540 (s390_fill_gprs_high): New function.
1541 (s390_store_gprs_high): New function.
1542 (s390_regsets): Add NT_S390_HIGH_GPRS.
1543 (s390_get_hwcap): Enable on 31-bit.
1544 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1545 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1546 Detect NT_S390_HIGH_GPRS.
1547 (s390_usrregs_info_3264): Enable on 31-bit.
1548 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1549 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1550
1551 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1552
1553 PR gdb/13808
1554 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1555 * configure.srv: Ditto.
1556 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1557 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1558 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1559 (init_registers_amd64_linux): Remove prototype.
1560 (tdesc_amd64_linux): Remove declaration.
1561 (get_ipa_tdesc): New function.
1562 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1563 initialize remaining tdescs.
1564 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1565 (init_registers_i386_linux): Remove prototype.
1566 (tdesc_i386_linux): Remove declaration.
1567 (get_ipa_tdesc): New function.
1568 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1569 initialize remaining tdescs.
1570 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1571 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1572 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1573 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1574 (x86_get_ipa_tdesc_idx): New function.
1575 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1576 * linux-x86-tdesc.h: New file.
1577 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1578 (target_get_ipa_tdesc_idx): New macro.
1579 * tracepoint.c (ipa_tdesc_idx): New macro.
1580 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1581 (symbol_list): Add ipa_tdesc_idx.
1582 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1583 (ipa_tdesc): Remove.
1584 (ipa_tdesc_idx): New variable.
1585 (get_context_regcache): Use get_ipa_tdesc.
1586 (gdb_collect): Ditto.
1587 (gdb_probe): Ditto.
1588 * tracepoint.h (get_ipa_tdesc): New prototype.
1589 (ipa_tdesc): Remove.
1590
1591 2016-02-24 Pedro Alves <palves@redhat.com>
1592
1593 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1594 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1595 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1596 Factor out common code between the USE_SIGTRAP_SIGINFO and
1597 !USE_SIGTRAP_SIGINFO blocks.
1598 (linux_low_filter_event): Call save_stop_reason instead of
1599 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1600 Update comments.
1601 (linux_wait_1): Update comments.
1602
1603 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1604
1605 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1606 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1607 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1608 ppc_insert_point, ppc_remove_point.
1609
1610 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1611
1612 * linux-s390-low.c (s390_supports_z_point_type): New function.
1613 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1614
1615 2016-02-16 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1618 PC. Get pc from regcache_read_pc.
1619
1620 2016-02-12 Yao Qi <yao.qi@linaro.org>
1621
1622 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1623 or linux_get_pc_32bit.
1624 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1625
1626 2016-02-12 Yao Qi <yao.qi@linaro.org>
1627
1628 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1629 arm_linux_get_next_pcs_fixup.
1630
1631 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1632
1633 * tracepoint.c (x_tracepoint_action_download): Change
1634 write_inferior_data_ptr to write_inferior_data_pointer.
1635 (cmd_qtstart): Likewise.
1636 (write_inferior_data_ptr): Remove.
1637 (download_agent_expr): Change write_inferior_data_ptr to
1638 write_inferior_data_pointer.
1639 (download_tracepoint_1): Likewise.
1640 (download_tracepoint): Likewise.
1641 (download_trace_state_variables): Likewise.
1642
1643 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1644 Marcin Kościelnicki <koriakin@0x04.net>
1645
1646 * tracepoint.c (struct tracepoint_action_ops): Remove.
1647 (struct tracepoint_action): Remove ops.
1648 (m_tracepoint_action_download, r_tracepoint_action_download)
1649 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1650 size and offset accordingly.
1651 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1652 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1653 (tracepoint_action_send, tracepoint_action_download): New functions.
1654 Helpers for trace action handlers.
1655 (add_tracepoint_action): Remove setup actions ops.
1656 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1657
1658 2016-02-10 Yao Qi <yao.qi@linaro.org>
1659
1660 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1661
1662 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1663
1664 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1665 to AC_OUTPUT.
1666 * configure: Regenerate.
1667
1668 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1669
1670 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1671 void * to gdb_byte *.
1672 * linux-low.c (siginfo_fixup): Likewise.
1673 (linux_xfer_siginfo): Likewise.
1674 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1675 Likewise.
1676 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1677
1678 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1679
1680 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1681 to srv_tgtobj.
1682 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1683 to srv_tgtobj.
1684 * linux-x86-low.c [__x86_64__]: Include
1685 "nat/amd64-linux-siginfo.h".
1686 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1687 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1688 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1689 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1690 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1691 (cpt_si_fd, si_timerid, si_overrun): Move from
1692 nat/amd64-linux-siginfo.c.
1693 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1694
1695 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * server.c (skip_to_semicolon): Remove.
1698 (process_point_options): Use strchrnul instead of
1699 skip_to_semicolon.
1700
1701 2016-01-26 Yao Qi <yao.qi@linaro.org>
1702
1703 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1704 * linux-low.c (install_software_single_step_breakpoints): Don't
1705 call regcache_read_pc.
1706 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1707 argument pc.
1708
1709 2016-01-26 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-low.c (install_software_single_step_breakpoints): Call
1712 regcache_read_pc instead of get_pc.
1713
1714 2016-01-26 Yao Qi <yao.qi@linaro.org>
1715
1716 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1717 (unblock_async_io): Rename to ...
1718 (block_unblock_async_io): ... it. New function.
1719 (enable_async_io): Don't install SIGIO handler. Unblock it
1720 instead.
1721 (disable_async_io): Don't ignore SIGIO. Block it instead.
1722 (initialize_async_io): Install SIGIO handler. Don't call
1723 unblock_async_io.
1724
1725 2016-01-26 Yao Qi <yao.qi@linaro.org>
1726
1727 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1728 first character is '\003', call *the_target->request_interrupt.
1729
1730 2016-01-25 Yao Qi <yao.qi@linaro.org>
1731
1732 * remote-utils.c (new_thread_notify): Remove.
1733 (dead_thread_notify): Likewise.
1734 * remote-utils.h (new_thread_notify): Remove declaration.
1735 (dead_thread_notify): Likewise.
1736
1737 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1738
1739 * gdb.trace/pending.exp: Fix expected message on continue.
1740
1741 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1742
1743 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1744 it works properly on big-endian machines where sizeof (CORE_ADDR)
1745 != sizeof (void *).
1746
1747 2016-01-21 Pedro Alves <palves@redhat.com>
1748
1749 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1750 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1751 * configure: Regenerate.
1752
1753 2016-01-21 Yao Qi <yao.qi@linaro.org>
1754
1755 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1756 is_thumb and set it according to CPSR saved on the stack.
1757 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1758 arm_sigreturn_next_pc.
1759
1760 2016-01-18 Yao Qi <yao.qi@linaro.org>
1761
1762 * linux-low.c (linux_set_pc_64bit): New function.
1763 (linux_get_pc_64bit): New function.
1764 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1765 Declare.
1766 * linux-sparc-low.c (debug_threads): Remove declaration.
1767 (sparc_get_pc): Remove.
1768 (the_low_target): Use linux_get_pc_64bit instead of
1769 sparc_get_pc.
1770 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1771 (the_low_target): Use linux_get_pc_64bit and
1772 linux_set_pc_64bit.
1773
1774 2016-01-18 Yao Qi <yao.qi@linaro.org>
1775
1776 * linux-arm-low.c (debug_threads): Remove declaration.
1777 (arm_get_pc, arm_set_pc): Remove.
1778 (the_low_target): Use linux_get_pc_32bit and
1779 linux_set_pc_32bit.
1780 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1781 (the_low_target): Use linux_get_pc_32bit and
1782 linux_set_pc_32bit.
1783 * linux-cris-low.c (debug_threads): Remove declaration.
1784 (cris_get_pc, cris_set_pc,): Remove.
1785 (the_low_target): Use linux_get_pc_32bit and
1786 linux_set_pc_32bit.
1787 * linux-crisv32-low.c (debug_threads): Remove declaration.
1788 (cris_get_pc, cris_set_pc): Remove.
1789 (the_low_target): Use linux_get_pc_32bit and
1790 linux_set_pc_32bit.
1791 * linux-low.c: Include inttypes.h.
1792 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1793 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1794 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1795 (the_low_target): Use linux_get_pc_32bit and
1796 linux_set_pc_32bit.
1797 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1798 (the_low_target): Use linux_get_pc_32bit and
1799 linux_set_pc_32bit.
1800 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1801 (the_low_target): Use linux_get_pc_32bit and
1802 linux_set_pc_32bit.
1803 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1804 (the_low_target): Use linux_get_pc_32bit and
1805 linux_set_pc_32bit.
1806 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1807 (the_low_target): Use linux_get_pc_32bit and
1808 linux_set_pc_32bit.
1809
1810 2016-01-18 Gary Benson <gbenson@redhat.com>
1811
1812 * configure.ac (AC_FUNC_FORK): New check.
1813 * config.in: Regenerate.
1814 * configure: Likewise.
1815
1816 2016-01-14 Yao Qi <yao.qi@linaro.org>
1817
1818 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1819 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1820 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1821 arm_get_next_pcs_ctor.
1822
1823 2016-01-12 Josh Stone <jistone@redhat.com>
1824 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1825
1826 * inferiors.h: Include "gdb_vecs.h".
1827 (struct process_info): Add syscalls_to_catch.
1828 * inferiors.c (remove_process): Free syscalls_to_catch.
1829 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1830 syscall_return stops.
1831 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1832 * server.c (handle_general_set): Handle QCatchSyscalls.
1833 (handle_query): Report support for QCatchSyscalls.
1834 * target.h (struct target_ops): Add supports_catch_syscall.
1835 (target_supports_catch_syscall): New macro.
1836 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1837 (struct lwp_info): Add syscall_state.
1838 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1839 Maintain syscall_state and syscalls_to_catch across exec.
1840 (get_syscall_trapinfo): New function, proxy to the_low_target.
1841 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1842 (linux_low_filter_event): Toggle syscall_state entry/return for
1843 syscall traps, and set it ignored for all others.
1844 (gdb_catching_syscalls_p): New function.
1845 (gdb_catch_this_syscall_p): New function.
1846 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1847 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1848 (linux_supports_catch_syscall): New function.
1849 (linux_target_ops): Install it.
1850 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1851 (the_low_target): Install it.
1852
1853 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1854
1855 * acinclude.m4: Include new ../warning.m4 file.
1856 * configure: Regenerated.
1857 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1858
1859 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1860
1861 * ax.c (is_goto_target): Mark static.
1862 * linux-low.c (register_addr): Likewise.
1863 (linux_fetch_registers, linux_store_registers): Likewise.
1864 * mem-break.c (any_persistent_commands): Fix old prototype.
1865 (add_commands_to_breakpoint): Mark static.
1866 * regcache.c (find_register_by_name): Delete unused func.
1867 * remote-utils.c (hex_or_minus_one): Mark static.
1868 * server.c (monitor_show_help): Mark static.
1869 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1870 handle_v_requests): Likewise.
1871
1872 2016-01-12 Pedro Alves <palves@redhat.com>
1873
1874 Remove use of the registered trademark symbol throughout.
1875
1876 2016-01-08 Yao Qi <yao.qi@linaro.org>
1877
1878 * remote-utils.c (getpkt): If c is '\003', call target hook
1879 request_interrupt.
1880
1881 2016-01-06 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1884 linux-aarch32-low.c.
1885 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1886 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1887 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1888 (thumb2_breakpoint): Declare.
1889 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1890 linux-aarch32-low.h.
1891 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1892 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1893 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1894
1895 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1896
1897 * gdbreplay.c (gdbreplay_version): Change copyright year in
1898 version message.
1899 * server.c (gdbserver_version): Likewise.
1900
1901 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1902
1903 * server.c (crc32_table): Delete.
1904 (crc32): Use libiberty's xcrc32 function.
1905
1906 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1907
1908 * lynx-low.c (lynx_delete_thread_callback): New function.
1909 (lynx_mourn): Properly delete our process and all of its
1910 threads. Remove call to clear_inferiors.
1911
1912 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1913
1914 * target.c (thread_search_callback): Add check that
1915 the thread_stopped target callback is not NULL before
1916 calling it.
1917
1918 2015-12-21 Yao Qi <yao.qi@linaro.org>
1919
1920 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1921 arm breakpoint.
1922
1923 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1924
1925 * server.c (handle_query): Call target_supports_software_single_step.
1926
1927 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1928
1929 * linux-low.c (single_step): New function.
1930 (linux_resume_one_lwp_throw): Call single_step.
1931 (start_step_over): Likewise.
1932
1933 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1934
1935 * Makefile.in (SFILES): Append arch/arm-linux.c,
1936 arch/arm-get-next-pcs.c.
1937 (arm-linux.o): New rule.
1938 (arm-get-next-pcs.o): New rule.
1939 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1940 arm-linux.o.
1941 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1942 to linux-aarch32-low.c.
1943 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1944 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1945 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1946 (thumb2_breakpoint_len): Likewise.
1947 (arm_is_thumb_mode): Make non-static.
1948 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1949 from linux-aarch32-low.c.
1950 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1951 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1952 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1953 (thumb2_breakpoint_len): Likewise.
1954 (arm_is_thumb_mode): New declaration.
1955 * linux-arm-low.c: Include arch/arm-linux.h
1956 aarch/arm-get-next-pcs.h, sys/syscall.h.
1957 (get_next_pcs_ops): New struct.
1958 (get_next_pcs_addr_bits_remove): New function.
1959 (get_next_pcs_is_thumb): New function.
1960 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1961 (arm_sigreturn_next_pc): Likewise.
1962 (get_next_pcs_syscall_next_pc): Likewise.
1963 (arm_gdbserver_get_next_pcs): Likewise.
1964 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1965 Initialize.
1966 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1967 * server.h: Include gdb_vecs.h.
1968
1969 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1970
1971 * Makefile.in (SFILES): Append common/common-regcache.c.
1972 (OBS): Append common-regcache.o.
1973 (common-regcache.o): New rule.
1974 * regcache.c (init_register_cache): Initialize cache to
1975 REG_UNAVAILABLE.
1976 (regcache_raw_read_unsigned): New function.
1977 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1978 register_status enum.
1979
1980 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1981
1982 * linux-aarch64-low.c (the_low_targets): Rename
1983 breakpoint_reinsert_addr to get_next_pcs.
1984 * linux-arm-low.c (the_low_targets): Likewise.
1985 * linux-bfin-low.c (the_low_targets): Likewise.
1986 * linux-cris-low.c (the_low_targets): Likewise.
1987 * linux-crisv32-low.c (the_low_targets): Likewise.
1988 * linux-low.c (can_software_single_step): Likewise.
1989 (install_software_single_step_breakpoints): New function.
1990 (start_step_over): Use install_software_single_step_breakpoints.
1991 * linux-low.h: New CORE_ADDR vector.
1992 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1993 get_next_pcs.
1994 * linux-mips-low.c (the_low_targets): Likewise.
1995 * linux-nios2-low.c (the_low_targets): Likewise.
1996 * linux-sparc-low.c (the_low_targets): Likewise.
1997
1998 2015-12-17 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (linux_kill_one_lwp): Remove references to
2001 LinuxThreads.
2002 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2003 to 'kill'.
2004 (linux_init_signals): Delete.
2005 (initialize_low): Adjust.
2006 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2007
2008 2015-12-16 Pedro Alves <palves@redhat.com>
2009
2010 * configure.ac (compiler warning flags): When testing a
2011 -Wno-foo option, check whether -Wfoo works instead.
2012 * configure: Regenerate.
2013
2014 2015-12-11 Don Breazeal <donb@codesourcery.com>
2015
2016 * server.c (process_serial_event): Don't exit from gdbserver
2017 in remote mode if there are still active inferiors.
2018
2019 2015-12-11 Yao Qi <yao.qi@linaro.org>
2020
2021 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2022 arm_breakpoint_at if the process is 32-bit.
2023
2024 2015-12-11 Yao Qi <yao.qi@linaro.org>
2025
2026 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2027 arm breakpoint.
2028
2029 2015-12-07 Yao Qi <yao.qi@linaro.org>
2030
2031 * configure.srv: Append arm.o to srv_tgtobj for
2032 aarch64*-*-linux* target.
2033 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2034 from linux-arm-low.c.
2035 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2036 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2037 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2038 (thumb2_breakpoint_len): Likewise.
2039 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2040 (arm_breakpoint_kinds): Likewise.
2041 (arm_breakpoint_kind_from_pc): Likewise.
2042 (arm_sw_breakpoint_from_kind): Likewise.
2043 (arm_breakpoint_kind_from_current_state): Likewise.
2044 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2045 (arm_sw_breakpoint_from_kind): Declare.
2046 (arm_breakpoint_kind_from_current_state): Declare.
2047 (arm_breakpoint_at): Declare.
2048 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2049 arm_sw_breakpoint_from_kind if process is 32-bit.
2050 (aarch64_breakpoint_kind_from_pc): New function.
2051 (aarch64_breakpoint_kind_from_current_state): New function.
2052 (the_low_target): Initialize fields breakpoint_kind_from_pc
2053 and breakpoint_kind_from_current_state.
2054 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2055 linux-aarch32-low.c.
2056 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2057 (arm_breakpoint, arm_breakpoint_len): Likewise.
2058 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2059 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2060 (arm_is_thumb_mode): Likewise.
2061 (arm_breakpoint_at): Likewise.
2062 (arm_breakpoint_kind_from_pc): Likewise.
2063 (arm_sw_breakpoint_from_kind): Likewise.
2064 (arm_breakpoint_kind_from_current_state): Likewise.
2065
2066 Revert:
2067 2015-08-04 Yao Qi <yao.qi@linaro.org>
2068
2069 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2070 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2071 * server.c (extended_protocol): Remove "static".
2072 * server.h (extended_protocol): Declare it.
2073
2074 2015-12-04 Josh Stone <jistone@redhat.com>
2075
2076 * target.h (struct target_ops) <arch_setup>: Rename to ...
2077 (struct target_ops) <post_create_inferior>: ... this.
2078 (target_arch_setup): Rename to ...
2079 (target_post_create_inferior): ... this, calling post_create_inferior.
2080 * server.c (start_inferior): Update target_arch_setup calls to
2081 target_post_create_inferior.
2082 * linux-low.c (linux_low_ptrace_options): Forward declare.
2083 (linux_arch_setup): Update its comment for general use.
2084 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2085 (struct linux_target_ops): Use linux_post_create_inferior.
2086 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2087 to post_create_inferior.
2088 * nto-low.c (struct nto_target_ops): Likewise.
2089 * spu-low.c (struct spu_target_ops): Likewise.
2090 * win32-low.c (struct win32_target_ops): Likewise.
2091
2092 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2093
2094 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2095
2096 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2097
2098 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2099 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2100 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2101 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2102 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2103 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2104 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2105 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2106 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2107 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2108 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2109 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2110
2111 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2112
2113 * linux-low.c (linux_look_up_symbols): Don't call
2114 linux_supports_traceclone.
2115 * linux-low.h (thread_db_init): Remove use_events argument.
2116 * thread-db.c (thread_db_use_event): Remove global variable.
2117 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2118 (struct thread_db) <td_create_bp>: Remove field.
2119 (thread_db_create_event): Remove function.
2120 (thread_db_enable_reporting): Likewise.
2121 (find_one_thread): Don't check for thread_db_use_events.
2122 (attach_thread): Likewise.
2123 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2124 (try_thread_db_load_1): Don't check for thread_db_use_events.
2125 (thread_db_init): Remove use_events argument and thread events
2126 handling.
2127 (remove_thread_event_breakpoints): Remove function.
2128 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2129
2130 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2131
2132 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2133 New function.
2134 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2135 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2136 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2137 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2138 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2139 Initialize.
2140 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2141 New function.
2142 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2143 * linux-low.c (can_hardware_single_step): Use
2144 supports_hardware_single_step.
2145 (can_software_single_step): New function.
2146 (start_step_over): Call can_software_single_step.
2147 (linux_supports_hardware_single_step): New function.
2148 (struct target_ops) <supports_software_single_step>: Initialize.
2149 * linux-low.h (struct linux_target_ops)
2150 <supports_hardware_single_step>: Initialize.
2151 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2153 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2154 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2155 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2156 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2157 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2158 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2159 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2160 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2161 Initialize.
2162 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2163 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2164 Initialize.
2165 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2167 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2168 New function.
2169 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2170 * target.h (struct target_ops): <supports_software_single_step>:
2171 New field.
2172 (target_supports_software_single_step): New macro.
2173
2174 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2175
2176 * linux-low.c (linux_wait_1): Fix pc advance condition.
2177 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2178 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2179
2180 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2181
2182 * linux-arm-low.c (arm_is_thumb_mode): New function.
2183 (arm_breakpoint_at): Use arm_is_thumb_mode.
2184 (arm_breakpoint_kind_from_current_state): New function.
2185 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2186 Initialize.
2187 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2188 (linux_breakpoint_kind_from_current_state): New function.
2189 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2190 * linux-low.h (struct linux_target_ops)
2191 <breakpoint_kind_from_current_state>: New field.
2192 * target.h (struct target_ops): Likewise.
2193 (target_breakpoint_kind_from_current_state): New macro.
2194
2195 2015-11-30 Pedro Alves <palves@redhat.com>
2196
2197 * linux-low.c (linux_resume): Wake up the event loop before
2198 returning.
2199
2200 2015-11-30 Pedro Alves <palves@redhat.com>
2201
2202 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2203 check.
2204 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2205 to -1.
2206 * target.c (struct thread_search): New structure.
2207 (thread_search_callback): New function.
2208 (prev_general_thread): New global.
2209 (prepare_to_access_memory, done_accessing_memory): New functions.
2210 * target.h (prepare_to_access_memory, done_accessing_memory):
2211 Replace macros with function declarations.
2212
2213 2015-11-30 Pedro Alves <palves@redhat.com>
2214
2215 PR 14618
2216 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2217 report TARGET_WAITKIND_NO_RESUMED.
2218 * remote-utils.c (prepare_resume_reply): Handle
2219 TARGET_WAITKIND_NO_RESUMED.
2220 * server.c (report_no_resumed): New global.
2221 (handle_query) <qSupported>: Handle "no-resumed+". Report
2222 "no-resumed+" support.
2223 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2224 return error if the client doesn't support no-resumed events.
2225 (push_stop_notification): New function.
2226 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2227 events if the client supports them.
2228
2229 2015-11-30 Pedro Alves <palves@redhat.com>
2230
2231 * linux-low.c (thread_still_has_status_pending_p): Don't check
2232 vCont;t here.
2233 (lwp_resumed): New function.
2234 (status_pending_p_callback): Return early if the LWP is not
2235 supposed to be resumed.
2236
2237 2015-11-30 Pedro Alves <palves@redhat.com>
2238
2239 * linux-low.c (handle_extended_wait): Assert that the LWP's
2240 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2241 thread create events, leave the new child's status pending.
2242 (linux_low_filter_event): If GDB wants to hear about thread exit
2243 events, leave the LWP marked dead and don't delete it.
2244 (linux_wait_for_event_filtered): Don't check for thread exit.
2245 (filter_exit_event): New function.
2246 (linux_wait_1): Use it, when returning an exit event.
2247 (linux_resume_one_lwp_throw): Assert that the LWP's
2248 waitstatus is TARGET_WAITKIND_IGNORE.
2249 * remote-utils.c (prepare_resume_reply): Handle
2250 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2251 * server.c (report_thread_events): New global.
2252 (handle_general_set): Handle QThreadEvents.
2253 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2254 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2255 TARGET_WAITKIND_THREAD_EXITED.
2256 * server.h (report_thread_events): Declare.
2257
2258 2015-11-30 Pedro Alves <palves@redhat.com>
2259
2260 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2261 the thread's last_resume_kind was resume_stop.
2262
2263 2015-11-30 Pedro Alves <palves@redhat.com>
2264
2265 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2266 before returning.
2267
2268 2015-11-30 Pedro Alves <palves@redhat.com>
2269
2270 * server.c (handle_v_requests): Handle vCtrlC.
2271
2272 2015-11-30 Pedro Alves <palves@redhat.com>
2273
2274 * gdbthread.h (find_any_thread_of_pid): Declare.
2275 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2276 functions.
2277 * server.c (handle_query): If current_thread is NULL, look for
2278 another thread of the selected process.
2279
2280 2015-11-26 Daniel Colascione <dancol@dancol.org>
2281 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2284 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2285 name in reply.
2286 * target.h (struct target_ops) <thread_name>: New field.
2287 (target_thread_name): New macro.
2288
2289 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2290
2291 * regcache.h (regcache_invalidate_pid): Add declaration.
2292 * regcache.c (regcache_invalidate_pid): New function, extracted
2293 from regcache_invalidate.
2294 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2295 Add trivial documentation comment.
2296 * lynx-low.c: Use regcache_invalidate_pid instead of
2297 regcache_invalidate.
2298
2299 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2300
2301 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2302 and Elf64_auxv_t if the target is Android.
2303
2304 2015-11-22 Doug Evans <xdje42@gmail.com>
2305
2306 * target.h: #include <sys/types.h>.
2307
2308 2015-11-19 Pedro Alves <palves@redhat.com>
2309
2310 * linux-low.c (linux_process_qsupported): Change prototype.
2311 Adjust.
2312 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2313 Change prototype.
2314 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2315 and adjust to loop over all features.
2316 * server.c (handle_query) <qSupported>: Adjust to call
2317 target_process_qsupported once, passing it a vector of unprocessed
2318 features.
2319 * target.h (struct target_ops) <process_qsupported>: Change
2320 prototype.
2321 (target_process_qsupported): Adjust.
2322
2323 2015-11-19 Pedro Alves <palves@redhat.com>
2324
2325 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2326 mode.
2327 * configure: Regenerate.
2328
2329 2015-11-19 Pedro Alves <palves@redhat.com>
2330
2331 * configure: Regenerate.
2332
2333 2015-11-19 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2336 type to uint32_t.
2337
2338 2015-11-19 Yao Qi <yao.qi@linaro.org>
2339
2340 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2341 (struct aarch64_operand): Move enum out.
2342
2343 2015-11-19 Yao Qi <yao.qi@linaro.org>
2344
2345 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2346 struct user_fpsimd_state *.
2347 (aarch64_store_fpregset): Likewise.
2348
2349 2015-11-19 Yao Qi <yao.qi@linaro.org>
2350
2351 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2352 struct user_pt_regs *.
2353 (aarch64_store_gregset): Likewise.
2354
2355 2015-11-18 Pedro Alves <palves@redhat.com>
2356
2357 * Makefile.in (all_object_files): Add $IPA_OBJS.
2358
2359 2015-11-17 Pedro Alves <palves@redhat.com>
2360
2361 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2362 GDB_SIGNAL_0 and gdb_signal_to_string.
2363
2364 2015-11-17 Pedro Alves <palves@redhat.com>
2365
2366 * win32-low.c (handle_output_debug_string): Remove parameter.
2367 (win32_kill): Remove our_status local and adjust call to
2368 handle_output_debug_string.
2369 (get_child_debug_event): Adjust call to
2370 handle_output_debug_string.
2371
2372 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2373
2374 * linux-mips-low.c (mips_fill_gregset): Add cast.
2375 (mips_store_gregset): Likewise.
2376 (mips_fill_fpregset): Likewise.
2377 (mips_store_fpregset): Likewise.
2378
2379 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2380
2381 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2382 priv.
2383
2384 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2385
2386 * linux-mips-low.c (mips_linux_new_thread): Change type of
2387 watch_type to enum target_hw_bp_type.
2388
2389 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2390
2391 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2392 Change return type to arm_hwbp_type.
2393
2394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2395
2396 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2397 (arm_store_gregset): Likewise.
2398 * linux-arm-low.c (arm_get_hwcap): Likewise.
2399 (arm_read_description): Likewise.
2400
2401 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2402
2403 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2404
2405 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2406
2407 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2408 (ppc_fill_vsxregset): Likewise.
2409 (ppc_store_vsxregset): Likewise.
2410 (ppc_fill_vrregset): Likewise.
2411 (ppc_store_vrregset): Likewise.
2412 (ppc_fill_evrregset): Likewise.
2413 (ppc_store_evrregset): Likewise.
2414
2415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2416
2417 * linux-ppc-low.c (ppc_usrregs_info): Remove
2418 forward-declaration.
2419 (ppc_arch_setup): Move lower in file.
2420
2421 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2422
2423 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2424 (ps_pdwrite): Likewise.
2425
2426 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2427
2428 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2429 to after assert checks.
2430
2431 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * proc-service.c (ps_pdread): Add/adjust casts.
2434 (ps_pdwrite): Add/adjust casts.
2435
2436 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2437
2438 * server.c (handle_search_memory_1): Cast return value of
2439 memmem.
2440
2441 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2442
2443 * server.c (write_qxfer_response): Change type of data to
2444 gdb_byte *.
2445
2446 2015-10-29 Pedro Alves <palves@redhat.com>
2447
2448 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2449
2450 2015-10-29 Pedro Alves <palves@redhat.com>
2451
2452 * tracepoint.c (clear_installed_tracepoints): Add casts.
2453
2454 2015-10-29 Pedro Alves <palves@redhat.com>
2455
2456 * server.c (handle_v_cont, process_serial_event): Add enum
2457 gdb_signal casts to signal parsing code.
2458
2459 2015-10-29 Pedro Alves <palves@redhat.com>
2460
2461 * linux-low.h (NULL_REGSET): Define.
2462 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2463 * linux-arm-low.c (arm_regsets): Likewise.
2464 * linux-crisv32-low.c (cris_regsets): Likewise.
2465 * linux-m68k-low.c (m68k_regsets): Likewise.
2466 * linux-mips-low.c (mips_regsets): Likewise.
2467 * linux-nios2-low.c (nios2_regsets): Likewise.
2468 * linux-ppc-low.c (ppc_regsets): Likewise.
2469 * linux-s390-low.c (s390_regsets): Likewise.
2470 * linux-sh-low.c (sh_regsets): Likewise.
2471 * linux-sparc-low.c (sparc_regsets): Likewise.
2472 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2473 * linux-tile-low.c (tile_regsets): Likewise.
2474 * linux-x86-low.c (x86_regsets): Likewise.
2475 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2476
2477 2015-10-29 Pedro Alves <palves@redhat.com>
2478
2479 * linux-low.h (NULL_REGSET): Define.
2480 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2481 * linux-arm-low.c (arm_regsets): Likewise.
2482 * linux-crisv32-low.c (cris_regsets): Likewise.
2483 * linux-m68k-low.c (m68k_regsets): Likewise.
2484 * linux-mips-low.c (mips_regsets): Likewise.
2485 * linux-nios2-low.c (nios2_regsets): Likewise.
2486 * linux-ppc-low.c (ppc_regsets): Likewise.
2487 * linux-s390-low.c (s390_regsets): Likewise.
2488 * linux-sh-low.c (sh_regsets): Likewise.
2489 * linux-sparc-low.c (sparc_regsets): Likewise.
2490 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2491 * linux-tile-low.c (tile_regsets): Likewise.
2492 * linux-x86-low.c (x86_regsets): Likewise.
2493 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2494
2495 2015-10-26 Doug Evans <dje@google.com>
2496
2497 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2498
2499 2015-10-26 Doug Evans <dje@google.com>
2500
2501 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2502
2503 2015-10-26 Doug Evans <dje@google.com>
2504
2505 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2506 for debug_printf.
2507 (attach_thread, find_new_threads_callback): Ditto.
2508
2509 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * mem-break.h (set_breakpoint_data): Remove.
2512
2513 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2514
2515 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2516 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2517 (initialize_low): Remove set_breakpoint_data call.
2518 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2519 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2520 (initialize_low): Remove set_breakpoint_data call.
2521 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2522 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2523 (initialize_low): Remove set_breakpoint_data call.
2524
2525 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2526
2527 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2528 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2529 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2530 * target.h (target_breakpoint_kind_from_pc): New macro.
2531
2532 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2533
2534 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2535 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2536 the default breakpoint kind.
2537
2538 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2539
2540 * linux-arm-low.c (arm_supports_z_point_type): Add software
2541 breakpoint support.
2542
2543 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2544
2545 * linux-arm-low.c: Refactor breakpoint definitions.
2546 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2547 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2548
2549 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2550
2551 * Makefile.in: Add arm.c/o.
2552 * configure.srv: Likewise.
2553 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2554 (arm_breakpoint_kind_from_pc): New function.
2555 (arm_sw_breakpoint_from_kind): Return proper kind.
2556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2557
2558 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2559
2560 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2561 removal.
2562 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2563 (struct raw_breakpoint) <size>: Remove.
2564 (struct raw_breakpoint) <kind>: Add.
2565 (bp_size): New function.
2566 (bp_opcode): Likewise.
2567 (find_raw_breakpoint_at): Adjust for kind.
2568 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2569 (remove_memory_breakpoint): Adjust for kind call bp_size.
2570 (set_raw_breakpoint_at): Adjust for kind.
2571 (set_breakpoint): Likewise.
2572 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2573 (delete_raw_breakpoint): Adjust for kind.
2574 (delete_breakpoint): Likewise.
2575 (find_gdb_breakpoint): Likewise.
2576 (set_gdb_breakpoint_1): Likewise.
2577 (set_gdb_breakpoint): Likewise.
2578 (delete_gdb_breakpoint_1): Likewise.
2579 (delete_gdb_breakpoint): Likewise.
2580 (uninsert_raw_breakpoint): Likewise.
2581 (reinsert_raw_breakpoint): Likewise.
2582 (set_breakpoint_data): Remove.
2583 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2584 (check_mem_read): Adjust for kind call bp_size.
2585 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2586 (clone_one_breakpoint): Adjust for kind.
2587 * mem-break.h (set_gdb_breakpoint): Likewise.
2588 (delete_gdb_breakpoint): Likewise.
2589 * server.c (process_serial_event): Likewise.
2590
2591 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2592
2593 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2594 (struct linux_target_ops) <breakpoint>: Remove.
2595 (struct linux_target_ops) <breakpoint_len>: Remove.
2596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2598 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2599 (arm_sw_breakpoint_from_kind): New function.
2600 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2601 (struct linux_target_ops) <breakpoint>: Remove.
2602 (struct linux_target_ops) <breakpoint_len>: Remove.
2603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2605 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2606 (struct linux_target_ops) <breakpoint>: Remove.
2607 (struct linux_target_ops) <breakpoint_len>: Remove.
2608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2610 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2611 (struct linux_target_ops) <breakpoint>: Remove.
2612 (struct linux_target_ops) <breakpoint_len>: Remove.
2613 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2614 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2615 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2616 and sw_breakpoint_from_kind to increment the pc.
2617 (linux_breakpoint_kind_from_pc): New function.
2618 (linux_sw_breakpoint_from_kind): New function.
2619 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2620 (initialize_low): Call breakpoint_kind_from_pc and
2621 sw_breakpoint_from_kind to replace breakpoint_data/len.
2622 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2623 New field.
2624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2625 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2626 (struct linux_target_ops) <breakpoint>: Remove.
2627 (struct linux_target_ops) <breakpoint_len>: Remove.
2628 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2629 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2630 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2631 (struct linux_target_ops) <breakpoint>: Remove.
2632 (struct linux_target_ops) <breakpoint_len>: Remove.
2633 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2635 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2636 (struct linux_target_ops) <breakpoint>: Remove.
2637 (struct linux_target_ops) <breakpoint_len>: Remove.
2638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2640 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2641 (struct linux_target_ops) <breakpoint>: Remove.
2642 (struct linux_target_ops) <breakpoint_len>: Remove.
2643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2645 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2646 (struct linux_target_ops) <breakpoint>: Remove.
2647 (struct linux_target_ops) <breakpoint_len>: Remove.
2648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2650 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2651 (struct linux_target_ops) <breakpoint>: Remove.
2652 (struct linux_target_ops) <breakpoint_len>: Remove.
2653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2655 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2656 (struct linux_target_ops) <breakpoint>: Remove.
2657 (struct linux_target_ops) <breakpoint_len>: Remove.
2658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2660 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2661 (struct linux_target_ops) <breakpoint>: Remove.
2662 (struct linux_target_ops) <breakpoint_len>: Remove.
2663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2665 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2666 (struct linux_target_ops) <breakpoint>: Remove.
2667 (struct linux_target_ops) <breakpoint_len>: Remove.
2668 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2669 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2670 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2671 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2672 (struct linux_target_ops) <breakpoint>: Remove.
2673 (struct linux_target_ops) <breakpoint_len>: Remove.
2674 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2675 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2676 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2677 (struct linux_target_ops) <breakpoint>: Remove.
2678 (struct linux_target_ops) <breakpoint_len>: Remove.
2679 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2680 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2681
2682 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2683
2684 * linux-cris-low.c (cris_get_pc): Remove void arg.
2685
2686 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2687
2688 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2689 variable name.
2690
2691 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2692
2693 * inferiors.c (thread_pid_matches_callback): New function.
2694 (find_thread_process): New function.
2695 (remove_thread): Reset current_thread.
2696 (remove_process): Assert threads have been removed first.
2697
2698 2015-10-15 Yao Qi <yao.qi@linaro.org>
2699
2700 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2701 if it is 3.
2702 (aarch64_remove_point): Likewise.
2703 * regcache.c (regcache_register_size): New function.
2704
2705 2015-10-12 Yao Qi <yao.qi@linaro.org>
2706
2707 * linux-aarch64-low.c: Update all callers as emit_load_store
2708 is renamed to aarch64_emit_load_store.
2709
2710 2015-10-12 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-aarch64-low.c: Update all callers of function renaming
2713 from emit_insn to aarch64_emit_insn.
2714
2715 2015-10-12 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2718 arch/aarch64-insn.h.
2719 (struct aarch64_memory_operand): Likewise.
2720 (ENCODE): Likewise.
2721 (emit_insn): Move to arch/aarch64-insn.c.
2722 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2723 (emit_load_store): Move to arch/aarch64-insn.c.
2724 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2725 (can_encode_int32): Remove.
2726
2727 2015-10-12 Yao Qi <yao.qi@linaro.org>
2728
2729 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2730 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2731 (aarch64_relocate_instruction): Likewise.
2732 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2733 (struct aarch64_insn_visitor): Likewise.
2734
2735 2015-10-12 Yao Qi <yao.qi@linaro.org>
2736
2737 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2738 (struct aarch64_insn_visitor): New.
2739 (struct aarch64_insn_relocation_data): New.
2740 (aarch64_ftrace_insn_reloc_b): New function.
2741 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2742 (aarch64_ftrace_insn_reloc_cb): Likewise.
2743 (aarch64_ftrace_insn_reloc_tb): Likewise.
2744 (aarch64_ftrace_insn_reloc_adr): Likewise.
2745 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2746 (aarch64_ftrace_insn_reloc_others): Likewise.
2747 (visitor): New.
2748 (aarch64_relocate_instruction): Use visitor.
2749
2750 2015-10-12 Yao Qi <yao.qi@linaro.org>
2751
2752 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2753 int. Add argument buf.
2754 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2755 aarch64_relocate_instruction.
2756
2757 2015-10-12 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2760 argument insn. Remove local variable insn. Don't call
2761 target_read_uint32.
2762 (aarch64_install_fast_tracepoint_jump_pad): Call
2763 target_read_uint32.
2764
2765 2015-09-30 Yao Qi <yao.qi@linaro.org>
2766
2767 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2768 (emit_load_store_pair): Likewise.
2769
2770 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2771
2772 * dll.c (match_dll): Add cast(s).
2773 (unloaded_dll): Likewise.
2774 * linux-low.c (second_thread_of_pid_p): Likewise.
2775 (delete_lwp_callback): Likewise.
2776 (count_events_callback): Likewise.
2777 (select_event_lwp_callback): Likewise.
2778 (linux_set_resume_request): Likewise.
2779 * server.c (accumulate_file_name_length): Likewise.
2780 (emit_dll_description): Likewise.
2781 (handle_qxfer_threads_worker): Likewise.
2782 (visit_actioned_threads): Likewise.
2783 * thread-db.c (any_thread_of): Likewise.
2784 * tracepoint.c (same_process_p): Likewise.
2785 (match_blocktype): Likewise.
2786 (build_traceframe_info_xml): Likewise.
2787
2788 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2791 assignment.
2792 (gdb_unparse_agent_expr): Likewise.
2793 * hostio.c (require_data): Likewise.
2794 (handle_pread): Likewise.
2795 * linux-low.c (disable_regset): Likewise.
2796 (fetch_register): Likewise.
2797 (store_register): Likewise.
2798 (get_dynamic): Likewise.
2799 (linux_qxfer_libraries_svr4): Likewise.
2800 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2801 (set_fast_tracepoint_jump): Likewise.
2802 (uninsert_fast_tracepoint_jumps_at): Likewise.
2803 (reinsert_fast_tracepoint_jumps_at): Likewise.
2804 (validate_inserted_breakpoint): Likewise.
2805 (clone_agent_expr): Likewise.
2806 * regcache.c (init_register_cache): Likewise.
2807 * remote-utils.c (putpkt_binary_1): Likewise.
2808 (decode_M_packet): Likewise.
2809 (decode_X_packet): Likewise.
2810 (look_up_one_symbol): Likewise.
2811 (relocate_instruction): Likewise.
2812 (monitor_output): Likewise.
2813 * server.c (handle_search_memory): Likewise.
2814 (handle_qxfer_exec_file): Likewise.
2815 (handle_qxfer_libraries): Likewise.
2816 (handle_qxfer): Likewise.
2817 (handle_query): Likewise.
2818 (handle_v_cont): Likewise.
2819 (handle_v_run): Likewise.
2820 (captured_main): Likewise.
2821 * target.c (write_inferior_memory): Likewise.
2822 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2823 * tracepoint.c (init_trace_buffer): Likewise.
2824 (add_tracepoint_action): Likewise.
2825 (add_traceframe): Likewise.
2826 (add_traceframe_block): Likewise.
2827 (cmd_qtdpsrc): Likewise.
2828 (cmd_qtdv): Likewise.
2829 (cmd_qtstatus): Likewise.
2830 (response_source): Likewise.
2831 (response_tsv): Likewise.
2832 (cmd_qtnotes): Likewise.
2833 (gdb_collect): Likewise.
2834 (initialize_tracepoint): Likewise.
2835
2836 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2837
2838 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2839 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2840 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2841 <NOP>: New.
2842 (enum aarch64_condition_codes): New enum.
2843 (w0): New static global.
2844 (fp): Likewise.
2845 (lr): Likewise.
2846 (struct aarch64_memory_operand) <type>: New
2847 MEMORY_OPERAND_POSTINDEX type.
2848 (postindex_memory_operand): New helper function.
2849 (emit_ret): New function.
2850 (emit_load_store_pair): New function, factored out of emit_stp
2851 with support for MEMORY_OPERAND_POSTINDEX.
2852 (emit_stp): Rewrite using emit_load_store_pair.
2853 (emit_ldp): New function.
2854 (emit_load_store): Likewise.
2855 (emit_ldr): Mention post-index instruction in comment.
2856 (emit_ldrh): New function.
2857 (emit_ldrb): New function.
2858 (emit_ldrsw): Mention post-index instruction in comment.
2859 (emit_str): Likewise.
2860 (emit_subs): New function.
2861 (emit_cmp): Likewise.
2862 (emit_and): Likewise.
2863 (emit_orr): Likewise.
2864 (emit_orn): Likewise.
2865 (emit_eor): Likewise.
2866 (emit_mvn): Likewise.
2867 (emit_lslv): Likewise.
2868 (emit_lsrv): Likewise.
2869 (emit_asrv): Likewise.
2870 (emit_mul): Likewise.
2871 (emit_sbfm): Likewise.
2872 (emit_sbfx): Likewise.
2873 (emit_ubfm): Likewise.
2874 (emit_ubfx): Likewise.
2875 (emit_csinc): Likewise.
2876 (emit_cset): Likewise.
2877 (emit_nop): Likewise.
2878 (emit_ops_insns): New helper function.
2879 (emit_pop): Likewise.
2880 (emit_push): Likewise.
2881 (aarch64_emit_prologue): New function.
2882 (aarch64_emit_epilogue): Likewise.
2883 (aarch64_emit_add): Likewise.
2884 (aarch64_emit_sub): Likewise.
2885 (aarch64_emit_mul): Likewise.
2886 (aarch64_emit_lsh): Likewise.
2887 (aarch64_emit_rsh_signed): Likewise.
2888 (aarch64_emit_rsh_unsigned): Likewise.
2889 (aarch64_emit_ext): Likewise.
2890 (aarch64_emit_log_not): Likewise.
2891 (aarch64_emit_bit_and): Likewise.
2892 (aarch64_emit_bit_or): Likewise.
2893 (aarch64_emit_bit_xor): Likewise.
2894 (aarch64_emit_bit_not): Likewise.
2895 (aarch64_emit_equal): Likewise.
2896 (aarch64_emit_less_signed): Likewise.
2897 (aarch64_emit_less_unsigned): Likewise.
2898 (aarch64_emit_ref): Likewise.
2899 (aarch64_emit_if_goto): Likewise.
2900 (aarch64_emit_goto): Likewise.
2901 (aarch64_write_goto_address): Likewise.
2902 (aarch64_emit_const): Likewise.
2903 (aarch64_emit_call): Likewise.
2904 (aarch64_emit_reg): Likewise.
2905 (aarch64_emit_pop): Likewise.
2906 (aarch64_emit_stack_flush): Likewise.
2907 (aarch64_emit_zero_ext): Likewise.
2908 (aarch64_emit_swap): Likewise.
2909 (aarch64_emit_stack_adjust): Likewise.
2910 (aarch64_emit_int_call_1): Likewise.
2911 (aarch64_emit_void_call_2): Likewise.
2912 (aarch64_emit_eq_goto): Likewise.
2913 (aarch64_emit_ne_goto): Likewise.
2914 (aarch64_emit_lt_goto): Likewise.
2915 (aarch64_emit_le_goto): Likewise.
2916 (aarch64_emit_gt_goto): Likewise.
2917 (aarch64_emit_ge_got): Likewise.
2918 (aarch64_emit_ops_impl): New static global variable.
2919 (aarch64_emit_ops): New target function, return
2920 &aarch64_emit_ops_impl.
2921 (struct linux_target_ops): Install it.
2922
2923 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2924
2925 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2926 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2927 aarch64-ipa.o.
2928 * linux-aarch64-ipa.c: New file.
2929 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2930 and endian.h.
2931 (aarch64_get_thread_area): New target method.
2932 (extract_signed_bitfield): New helper function.
2933 (aarch64_decode_ldr_literal): New function.
2934 (enum aarch64_opcodes): New enum.
2935 (struct aarch64_register): New struct.
2936 (struct aarch64_operand): New struct.
2937 (x0): New static global.
2938 (x1): Likewise.
2939 (x2): Likewise.
2940 (x3): Likewise.
2941 (x4): Likewise.
2942 (w2): Likewise.
2943 (ip0): Likewise.
2944 (sp): Likewise.
2945 (xzr): Likewise.
2946 (aarch64_register): New helper function.
2947 (register_operand): Likewise.
2948 (immediate_operand): Likewise.
2949 (struct aarch64_memory_operand): New struct.
2950 (offset_memory_operand): New helper function.
2951 (preindex_memory_operand): Likewise.
2952 (enum aarch64_system_control_registers): New enum.
2953 (ENCODE): New macro.
2954 (emit_insn): New helper function.
2955 (emit_b): New function.
2956 (emit_bcond): Likewise.
2957 (emit_cb): Likewise.
2958 (emit_tb): Likewise.
2959 (emit_blr): Likewise.
2960 (emit_stp): Likewise.
2961 (emit_ldp_q_offset): Likewise.
2962 (emit_stp_q_offset): Likewise.
2963 (emit_load_store): Likewise.
2964 (emit_ldr): Likewise.
2965 (emit_ldrsw): Likewise.
2966 (emit_str): Likewise.
2967 (emit_ldaxr): Likewise.
2968 (emit_stxr): Likewise.
2969 (emit_stlr): Likewise.
2970 (emit_data_processing_reg): Likewise.
2971 (emit_data_processing): Likewise.
2972 (emit_add): Likewise.
2973 (emit_sub): Likewise.
2974 (emit_mov): Likewise.
2975 (emit_movk): Likewise.
2976 (emit_mov_addr): Likewise.
2977 (emit_mrs): Likewise.
2978 (emit_msr): Likewise.
2979 (emit_sevl): Likewise.
2980 (emit_wfe): Likewise.
2981 (append_insns): Likewise.
2982 (can_encode_int32_in): New helper function.
2983 (aarch64_relocate_instruction): New function.
2984 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2985 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2986 (struct linux_target_ops): Install aarch64_get_thread_area,
2987 aarch64_install_fast_tracepoint_jump_pad and
2988 aarch64_get_min_fast_tracepoint_insn_len.
2989
2990 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2991
2992 * Makefile.in (aarch64-insn.o): New rule.
2993 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2994
2995 2015-09-21 Yao Qi <yao.qi@linaro.org>
2996
2997 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2998
2999 2015-09-21 Yao Qi <yao.qi@linaro.org>
3000
3001 * tracepoint.c (max_jump_pad_size): Remove.
3002
3003 2015-09-18 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-aarch64-low.c: Don't include sys/uio.h.
3006 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3007
3008 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3009
3010 * tracepoint.c (eval_result_type): Change prototype.
3011 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3012
3013 2015-09-15 Pedro Alves <palves@redhat.com>
3014
3015 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3016 Check whether to report exec events instead of checking whether
3017 multiprocess is enabled.
3018
3019 2015-09-15 Pedro Alves <palves@redhat.com>
3020
3021 PR remote/18965
3022 * remote-utils.c (prepare_resume_reply): Merge
3023 TARGET_WAITKIND_VFORK_DONE switch case with the
3024 TARGET_WAITKIND_FORKED case.
3025
3026 2015-09-15 Yao Qi <yao.qi@linaro.org>
3027
3028 * server.c (handle_query): Check string comparison using
3029 "else if" instead of "if".
3030
3031 2015-09-15 Yao Qi <yao.qi@linaro.org>
3032
3033 * server.c (vCont_supported): New global variable.
3034 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3035 matches. Append ";vContSupported+" to own_buf.
3036 (handle_v_requests): Append ";s;S" to own_buf if target supports
3037 hardware single step or vCont_supported is false.
3038 (capture_main): Set vCont_supported to zero.
3039
3040 2015-09-15 Yao Qi <yao.qi@linaro.org>
3041
3042 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3043 it to ...
3044 (linux_supports_hardware_single_step): ... New function.
3045 (linux_target_ops): Update.
3046 * lynx-low.c (lynx_target_ops): Set field
3047 supports_hardware_single_step to target_can_do_hardware_single_step.
3048 * nto-low.c (nto_target_ops): Likewise.
3049 * spu-low.c (spu_target_ops): Likewise.
3050 * win32-low.c (win32_target_ops): Likewise.
3051 * target.c (target_can_do_hardware_single_step): New function.
3052 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3053 Remove. <supports_hardware_single_step>: New field.
3054 (target_supports_conditional_breakpoints): Remove.
3055 (target_supports_hardware_single_step): New macro.
3056 (target_can_do_hardware_single_step): Declare.
3057 * server.c (handle_query): Use target_supports_hardware_single_step
3058 instead of target_supports_conditional_breakpoints.
3059
3060 2015-09-15 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3063 function.
3064 (struct linux_target_ops the_low_target): Install
3065 aarch64_linux_siginfo_fixup.
3066
3067 2015-09-11 Don Breazeal <donb@codesourcery.com>
3068 Luis Machado <lgustavo@codesourcery.com>
3069
3070 * linux-low.c (linux_mourn): Static declaration.
3071 (linux_arch_setup): Move in front of
3072 handle_extended_wait.
3073 (linux_arch_setup_thread): New function.
3074 (handle_extended_wait): Handle exec events. Call
3075 linux_arch_setup_thread. Make event_lwp argument a
3076 pointer-to-a-pointer.
3077 (check_zombie_leaders): Do not check stopped threads.
3078 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3079 (linux_low_filter_event): Add lwp and thread for exec'ing
3080 non-leader thread if leader thread has been deleted.
3081 Refactor code into linux_arch_setup_thread and call it.
3082 Pass child lwp pointer by reference to handle_extended_wait.
3083 (linux_wait_for_event_filtered): Update comment.
3084 (linux_wait_1): Prevent clobbering exec event status.
3085 (linux_supports_exec_events): New function.
3086 (linux_target_ops) <supports_exec_events>: Initialize new member.
3087 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3088 new member.
3089 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3090 * server.c (report_exec_events): New global variable.
3091 (handle_query): Handle qSupported query for exec-events feature.
3092 (captured_main): Initialize report_exec_events.
3093 * server.h (report_exec_events): Declare new global variable.
3094 * target.h (struct target_ops) <supports_exec_events>: New
3095 member.
3096 (target_supports_exec_events): New macro.
3097 * win32-low.c (win32_target_ops) <supports_exec_events>:
3098 Initialize new member.
3099
3100 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3101
3102 * linux-low.c (linux_low_enable_btrace): Remove.
3103 (linux_target_ops): Replace linux_low_enable_btrace with
3104 linux_enable_btrace.
3105
3106 2015-09-03 Yao Qi <yao.qi@linaro.org>
3107
3108 * linux-aarch64-low.c (aarch64_insert_point): Call
3109 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3110 returns true.
3111
3112 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3113
3114 * linux-low.c (check_stopped_by_breakpoint): Use
3115 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3116
3117 2015-08-27 Pedro Alves <palves@redhat.com>
3118
3119 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3120
3121 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3122
3123 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3124 the XNEW-family equivalent.
3125 (compile_bytecodes): Likewise.
3126 * dll.c (loaded_dll): Likewise.
3127 * event-loop.c (append_callback_event): Likewise.
3128 (create_file_handler): Likewise.
3129 (create_file_event): Likewise.
3130 * hostio.c (handle_open): Likewise.
3131 * inferiors.c (add_thread): Likewise.
3132 (add_process): Likewise.
3133 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3134 * linux-arm-low.c (arm_new_process): Likewise.
3135 (arm_new_thread): Likewise.
3136 * linux-low.c (add_to_pid_list): Likewise.
3137 (linux_add_process): Likewise.
3138 (handle_extended_wait): Likewise.
3139 (add_lwp): Likewise.
3140 (enqueue_one_deferred_signal): Likewise.
3141 (enqueue_pending_signal): Likewise.
3142 (linux_resume_one_lwp_throw): Likewise.
3143 (linux_resume_one_thread): Likewise.
3144 (linux_read_memory): Likewise.
3145 (linux_write_memory): Likewise.
3146 * linux-mips-low.c (mips_linux_new_process): Likewise.
3147 (mips_linux_new_thread): Likewise.
3148 (mips_add_watchpoint): Likewise.
3149 * linux-x86-low.c (initialize_low_arch): Likewise.
3150 * lynx-low.c (lynx_add_process): Likewise.
3151 * mem-break.c (set_raw_breakpoint_at): Likewise.
3152 (set_breakpoint): Likewise.
3153 (add_condition_to_breakpoint): Likewise.
3154 (add_commands_to_breakpoint): Likewise.
3155 (clone_agent_expr): Likewise.
3156 (clone_one_breakpoint): Likewise.
3157 * regcache.c (new_register_cache): Likewise.
3158 * remote-utils.c (look_up_one_symbol): Likewise.
3159 * server.c (queue_stop_reply): Likewise.
3160 (start_inferior): Likewise.
3161 (queue_stop_reply_callback): Likewise.
3162 (handle_target_event): Likewise.
3163 * spu-low.c (fetch_ppc_memory): Likewise.
3164 (store_ppc_memory): Likewise.
3165 * target.c (set_target_ops): Likewise.
3166 * thread-db.c (thread_db_load_search): Likewise.
3167 (try_thread_db_load_1): Likewise.
3168 * tracepoint.c (add_tracepoint): Likewise.
3169 (add_tracepoint_action): Likewise.
3170 (create_trace_state_variable): Likewise.
3171 (cmd_qtdpsrc): Likewise.
3172 (cmd_qtro): Likewise.
3173 (add_while_stepping_state): Likewise.
3174 * win32-low.c (child_add_thread): Likewise.
3175 (get_image_name): Likewise.
3176
3177 2015-08-25 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3180
3181 2015-08-25 Yao Qi <yao.qi@linaro.org>
3182
3183 * Makefile.in (aarch64-linux.o): New rule.
3184 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3185 srv_tgtobj.
3186 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3187 (aarch64_init_debug_reg_state): Make it extern.
3188 (aarch64_linux_prepare_to_resume): Remove.
3189
3190 2015-08-25 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3193 lwp_arch_private_info and ptid_of_lwp.
3194
3195 2015-08-25 Yao Qi <yao.qi@linaro.org>
3196
3197 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3198 Find proc_info by find_process_pid. All callers updated.
3199
3200 2015-08-25 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3203 Remove.
3204 (debug_reg_change_callback): Remove.
3205 (aarch64_notify_debug_reg_change): Remove.
3206
3207 2015-08-25 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3210 Call current_lwp_ptid.
3211
3212 2015-08-25 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-aarch64-low.c (debug_reg_change_callback): Use
3215 debug_printf.
3216
3217 2015-08-25 Yao Qi <yao.qi@linaro.org>
3218
3219 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3220
3221 2015-08-25 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3224
3225 2015-08-25 Yao Qi <yao.qi@linaro.org>
3226
3227 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3228 the code.
3229
3230 2015-08-25 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3233 Remove.
3234 (debug_reg_change_callback): Remove argument entry and add argument
3235 lwp. Remove local variable thread. Don't print thread id in the
3236 debugging output. Don't check whether pid of thread equals to pid.
3237 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3238 iterate_over_lwps instead find_inferior.
3239
3240 2015-08-24 Pedro Alves <palves@redhat.com>
3241
3242 * inferiors.c (get_first_process): New function.
3243 * inferiors.h (get_first_process): New declaration.
3244 * remote-utils.c (read_ptid): Default to the first process in the
3245 list, instead of to the current thread's process.
3246
3247 2015-08-24 Pedro Alves <palves@redhat.com>
3248
3249 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3250 * event-loop.c: Likewise.
3251 * remote-utils.c: Likewise.
3252 * tracepoint.c: Likewise.
3253
3254 2015-08-24 Pedro Alves <palves@redhat.com>
3255
3256 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3257 ptid_get_lwp.
3258
3259 2015-08-21 Pedro Alves <palves@redhat.com>
3260
3261 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3262 instead of literal 1.
3263
3264 2015-08-21 Pedro Alves <palves@redhat.com>
3265
3266 * tdesc.c (default_description): Explicitly zero-initialize.
3267
3268 2015-08-21 Pedro Alves <palves@redhat.com>
3269
3270 PR gdb/18749
3271 * inferiors.c (remove_thread): Discard any pending stop reply for
3272 this thread.
3273 * server.c (remove_all_on_match_pid): Rename to ...
3274 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3275 instead of a pid.
3276 (discard_queued_stop_replies): Change parameter to a ptid. Now
3277 extern.
3278 (handle_v_kill, kill_inferior_callback, captured_main)
3279 (process_serial_event): Adjust.
3280 * server.h (discard_queued_stop_replies): Declare.
3281
3282 2015-08-21 Pedro Alves <palves@redhat.com>
3283
3284 * linux-low.c (wait_for_sigstop): Always switch to no thread
3285 selected if the previously current thread dies.
3286 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3287 process instead of the current thread's.
3288 * remote-utils.c (input_interrupt): Don't check if there's no
3289 current thread.
3290 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3291 current thread to the general thread fails, error out.
3292 (handle_qxfer_auxv, handle_qxfer_libraries)
3293 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3294 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3295 (handle_query): Check if there's a thread selected instead of
3296 checking whether there's any thread in the thread list.
3297 (handle_qxfer_threads, handle_qxfer_btrace)
3298 (handle_qxfer_btrace_conf): Don't error out early if there's no
3299 thread in the thread list.
3300 (handle_v_cont, myresume): Don't set the current thread to the
3301 continue thread.
3302 (process_serial_event) <Hg handling>: Also set thread_id if the
3303 previous general thread is still alive.
3304 (process_serial_event) <g/G handling>: If setting the current
3305 thread to the general thread fails, error out.
3306 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3307 thread's lwp instead of the current thread's.
3308 * target.c (set_desired_thread): If the desired thread was not
3309 found, leave the current thread pointing to NULL. Return an int
3310 (boolean) indicating success.
3311 * target.h (set_desired_thread): Change return type to int.
3312
3313 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3314
3315 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3316 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3317 #includes.
3318 (ps_get_thread_area): New function.
3319
3320 2015-08-19 Gary Benson <gbenson@redhat.com>
3321
3322 * hostio.c (handle_pread): Do not attempt to read more data
3323 than hostio_reply_with_data can fit in a packet.
3324
3325 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3326
3327 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3328
3329 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3330
3331 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3332
3333 2015-08-06 Pedro Alves <palves@redhat.com>
3334
3335 * tracepoint.c (expr_eval_result): Now an int.
3336
3337 2015-08-06 Pedro Alves <palves@redhat.com>
3338
3339 * gdbthread.h (struct regcache): Forward declare.
3340 (struct thread_info) <regcache_data>: Now a struct regcache
3341 pointer.
3342 * inferiors.c (inferior_regcache_data)
3343 (set_inferior_regcache_data): Now work with struct regcache
3344 pointers.
3345 * inferiors.h (struct regcache): Forward declare.
3346 (inferior_regcache_data, set_inferior_regcache_data): Now work
3347 with struct regcache pointers.
3348 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3349 (free_register_cache_thread): Remove struct regcache pointer
3350 casts.
3351
3352 2015-08-06 Pedro Alves <palves@redhat.com>
3353
3354 * server.c (captured_main): On error, print the exception message
3355 to stderr, and if run_once is set, throw a quit.
3356
3357 2015-08-06 Pedro Alves <palves@redhat.com>
3358
3359 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3360 the current thread.
3361
3362 2015-08-06 Pedro Alves <palves@redhat.com>
3363
3364 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3365 reading beyond the passed in buffer length.
3366
3367 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3368
3369 * tracepoint.c (symbol_list) <required>: Remove.
3370
3371 2015-08-06 Pedro Alves <palves@redhat.com>
3372
3373 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3374 count if stopping and suspending threads.
3375 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3376 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3377 (linux_detach): Complete an ongoing step-over.
3378 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3379 throughout.
3380 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3381 (linux_wait_1): If passing a signal to the inferior after
3382 finishing a step-over, unsuspend and re-resume all lwps. If we
3383 see a single-step event but the thread should be continuing, don't
3384 pass the trap to gdb.
3385 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3386 internal_error instead of gdb_assert.
3387 (enqueue_pending_signal): New function.
3388 (check_ptrace_stopped_lwp_gone): Add debug output.
3389 (start_step_over): Use internal_error instead of gdb_assert.
3390 (complete_ongoing_step_over): New function.
3391 (linux_resume_one_thread): Don't resume a suspended thread.
3392 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3393 it stepping.
3394
3395 2015-08-06 Pedro Alves <palves@redhat.com>
3396
3397 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3398 (linux_thread_alive): Use lwp_is_marked_dead.
3399 (extended_event_reported): Delete.
3400 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3401 instead of extended_event_reported.
3402 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3403 as well.
3404 (lwp_is_marked_dead): New function.
3405 (lwp_running): Use lwp_is_marked_dead.
3406 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3407 comment.
3408
3409 2015-08-06 Pedro Alves <palves@redhat.com>
3410
3411 * linux-low.c (linux_wait_1): Move fork event output out of the
3412 !report_to_gdb check. Pass event_child->waitstatus to
3413 target_waitstatus_to_string instead of ourstatus.
3414
3415 2015-08-04 Yao Qi <yao.qi@linaro.org>
3416
3417 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3418 if current_thread is 32 bit.
3419
3420 2015-08-04 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3423 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3424 * server.c (extended_protocol): Remove "static".
3425 * server.h (extended_protocol): Declare it.
3426
3427 2015-08-04 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3430 both aarch64 and aarch32.
3431 (aarch64_set_pc): Likewise.
3432
3433 2015-08-04 Yao Qi <yao.qi@linaro.org>
3434
3435 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3436 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3437 arm-with-neon.xml to srv_xmlfiles.
3438 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3439 (is_64bit_tdesc): New function.
3440 (aarch64_linux_read_description): New function.
3441 (aarch64_arch_setup): Call aarch64_linux_read_description.
3442 (regs_info): Rename to regs_info_aarch64.
3443 (aarch64_regs_info): Return right regs_info.
3444 (initialize_low_arch): Call initialize_low_arch_aarch32.
3445
3446 2015-08-04 Yao Qi <yao.qi@linaro.org>
3447
3448 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3449 * linux-aarch32-low.c: New file.
3450 * linux-aarch32-low.h: New file.
3451 * linux-arm-low.c (arm_fill_gregset): Move it to
3452 linux-aarch32-low.c.
3453 (arm_store_gregset): Likewise.
3454 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3455 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3456 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3457 (regs_info): Rename to regs_info_arm.
3458 (arm_regs_info): Return regs_info_aarch32 if
3459 have_ptrace_getregset is 1 and target description is
3460 arm_with_neon or arm_with_vfpv3.
3461 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3462 Call initialize_low_arch_aarch32 instead.
3463
3464 2015-08-04 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3467 * linux-low.c: ... here.
3468 * linux-low.h (have_ptrace_getregset): Declare it.
3469
3470 2015-08-04 Pedro Alves <palves@redhat.com>
3471
3472 * thread-db.c (struct thread_db): Use new typedefs.
3473 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3474 CHK calls.
3475 (disable_thread_event_reporting): Cast result of dlsym to
3476 destination function pointer type.
3477 (thread_db_mourn): Use td_ta_delete_ftype.
3478
3479 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3480
3481 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3482 arch variant.
3483 (CDX_BREAKPOINT): Define for R2.
3484 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3485 (the_low_target): Add comments.
3486
3487 2015-07-30 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-arm-low.c (arm_hwcap): Remove it.
3490 (arm_read_description): New local variable arm_hwcap. Don't
3491 set arm_hwcap to zero.
3492
3493 2015-07-30 Yao Qi <yao.qi@linaro.org>
3494
3495 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3496 Use regcache->tdesc instead.
3497 (arm_store_wmmxregset): Likewise.
3498 (arm_fill_vfpregset): Likewise.
3499 (arm_store_vfpregset): Likewise.
3500
3501 2015-07-30 Yao Qi <yao.qi@linaro.org>
3502
3503 * linux-arm-low.c: Include arch/arm.h.
3504 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3505 (arm_store_gregset): Likewise.
3506
3507 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3508
3509 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3510 ptrace's 4th parameter.
3511
3512 2015-07-27 Yao Qi <yao.qi@linaro.org>
3513
3514 * configure.srv (case aarch64*-*-linux*): Don't set
3515 srv_linux_usrregs.
3516
3517 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3518
3519 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3520 sys/ptrace.h.
3521 * linux-arm-low.c: Likewise.
3522 * linux-cris-low.c: Likewise.
3523 * linux-crisv32-low.c: Likewise.
3524 * linux-low.c: Likewise.
3525 * linux-m68k-low.c: Likewise.
3526 * linux-mips-low.c: Likewise.
3527 * linux-nios2-low.c: Likewise.
3528 * linux-s390-low.c: Likewise.
3529 * linux-sparc-low.c: Likewise.
3530 * linux-tic6x-low.c: Likewise.
3531 * linux-tile-low.c: Likewise.
3532 * linux-x86-low.c: Likewise.
3533
3534 2015-07-24 Pedro Alves <palves@redhat.com>
3535
3536 * config.in: Regenerate.
3537 * configure: Regenerate.
3538
3539 2015-07-24 Pedro Alves <palves@redhat.com>
3540
3541 * acinclude.m4: Include ../ptrace.m4.
3542 * configure.ac: Call GDB_AC_PTRACE.
3543 * config.in, configure: Regenerate.
3544
3545 2015-07-24 Yao Qi <yao.qi@linaro.org>
3546
3547 * linux-low.c (linux_create_inferior): Remove setting to
3548 proc->priv->new_inferior.
3549 (linux_attach): Likewise.
3550 (linux_low_filter_event): Likewise.
3551 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3552
3553 2015-07-24 Yao Qi <yao.qi@linaro.org>
3554
3555 * linux-low.c (linux_arch_setup): New function.
3556 (linux_low_filter_event): If proc->tdesc is NULL and
3557 proc->attached is true, call the_low_target.arch_setup.
3558 Otherwise, keep status pending, and return.
3559 (linux_resume_one_lwp_throw): Don't call get_pc if
3560 thread->while_stepping isn't NULL. Don't call
3561 get_thread_regcache if proc->tdesc is NULL.
3562 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3563 (linux_target_ops): Install arch_setup.
3564 * server.c (start_inferior): Call the_target->arch_setup.
3565 * target.h (struct target_ops) <arch_setup>: New field.
3566 (target_arch_setup): New marco.
3567 * lynx-low.c (lynx_target_ops): Update.
3568 * nto-low.c (nto_target_ops): Update.
3569 * spu-low.c (spu_target_ops): Update.
3570 * win32-low.c (win32_target_ops): Update.
3571
3572 2015-07-24 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-low.c (linux_add_process): Don't set
3575 proc->priv->new_inferior.
3576 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3577 (linux_attach): Likewise.
3578
3579 2015-07-24 Yao Qi <yao.qi@linaro.org>
3580
3581 * server.c (start_inferior): Code refactor.
3582
3583 2015-07-24 Yao Qi <yao.qi@linaro.org>
3584
3585 * server.c (process_serial_event): Set general_thread.
3586
3587 2015-07-21 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3590 aarch64_linux_get_debug_reg_capacity.
3591
3592 2015-07-17 Yao Qi <yao.qi@linaro.org>
3593
3594 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3595 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3596 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3597 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3598 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3599 (AARCH64_HWP_ALIGNMENT): Likewise.
3600 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3601 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3602 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3603 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3604 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3605 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3606 (struct aarch64_debug_reg_state): Likewise.
3607 (struct arch_lwp_info): Likewise.
3608 (aarch64_align_watchpoint): Likewise.
3609 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3610 (aarch64_watchpoint_length): Likewise.
3611 (aarch64_point_encode_ctrl_reg): Likewise
3612 (aarch64_point_is_aligned): Likewise.
3613 (aarch64_align_watchpoint): Likewise.
3614 (aarch64_linux_set_debug_regs):
3615 (aarch64_dr_state_insert_one_point): Likewise.
3616 (aarch64_dr_state_remove_one_point): Likewise.
3617 (aarch64_handle_breakpoint): Likewise.
3618 (aarch64_handle_aligned_watchpoint): Likewise.
3619 (aarch64_handle_unaligned_watchpoint): Likewise.
3620 (aarch64_handle_watchpoint): Likewise.
3621
3622 2015-07-17 Yao Qi <yao.qi@linaro.org>
3623
3624 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3625 and don't aarch64_get_debug_reg_state. All callers update.
3626 (aarch64_handle_aligned_watchpoint): Likewise.
3627 (aarch64_handle_unaligned_watchpoint): Likewise.
3628 (aarch64_handle_watchpoint): Likewise.
3629 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3630 (aarch64_remove_point): Likewise.
3631
3632 2015-07-17 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3635 debug_printf.
3636 (aarch64_handle_unaligned_watchpoint): Likewise.
3637
3638 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3639
3640 Revert the previous 3 commits:
3641 Move gdb_regex* to common/
3642 Move linux_find_memory_regions_full & co.
3643 gdbserver build-id attribute generator
3644
3645 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3646 Jan Kratochvil <jan.kratochvil@redhat.com>
3647
3648 gdbserver build-id attribute generator.
3649 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3650 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3651 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3652 (find_phdr): New.
3653 (get_dynamic): Use find_pdhr to traverse program headers.
3654 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3655 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3656 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3657 (get_hex_build_id): New.
3658 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3659 to reply XML document.
3660
3661 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3662 Jan Kratochvil <jan.kratochvil@redhat.com>
3663
3664 * target.c: Include target/target-utils.h and fcntl.h.
3665 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3666 (target_fileio_read_stralloc): New functions.
3667
3668 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3669
3670 * Makefile.in (OBS): Add gdb_regex.o.
3671 (gdb_regex.o): New.
3672 * config.in: Rebuilt.
3673 * configure: Rebuilt.
3674
3675 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3676 Jan Kratochvil <jan.kratochvil@redhat.com>
3677
3678 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3679 * Makefile.in (OBS): Add target-utils.o.
3680 (linux-maps.o, target-utils.o): New.
3681 * configure.srv (srv_linux_obj): Add linux-maps.o.
3682
3683 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3684
3685 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3686 function, return 1.
3687 (the_low_target): Install it.
3688
3689 2015-07-14 Pedro Alves <palves@redhat.com>
3690
3691 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3692 Instead, ignore ECHILD, and throw an error for other errnos.
3693
3694 2015-07-10 Pedro Alves <palves@redhat.com>
3695
3696 * event-loop.c (struct callback_event) <data>: Change type to
3697 gdb_client_data instance instead of gdb_client_data pointer.
3698 (append_callback_event): Adjust.
3699
3700 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3701
3702 * linux-aarch64-low.c: Add comments for each linux_target_ops
3703 method. Remove comments already covered in target_ops and
3704 linux_target_ops definitions.
3705 (the_low_target): Add comments for each unimplemented method.
3706
3707 2015-07-09 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-aarch64-low.c (aarch64_regmap): Remove.
3710 (aarch64_usrregs_info): Remove.
3711 (regs_info): Set field usrregs to NULL.
3712
3713 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3714
3715 * linux-low.c: Include "rsp-low.h"
3716 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3717 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3718 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3719 (handle_btrace_enable_pt): New.
3720 (handle_btrace_general_set): Support "pt".
3721 (handle_btrace_conf_general_set): Support "pt:size".
3722
3723 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3724
3725 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3726 Z_PACKET_SW_BP.
3727
3728 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3729
3730 * linux-aarch64-low.c: Remove comment about endianness.
3731 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3732 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3733 memcmp.
3734
3735 2015-06-24 Gary Benson <gbenson@redhat.com>
3736
3737 * linux-i386-ipa.c (stdint.h): Do not include.
3738 * lynx-i386-low.c (stdint.h): Likewise.
3739 * lynx-ppc-low.c (stdint.h): Likewise.
3740 * mem-break.c (stdint.h): Likewise.
3741 * thread-db.c (stdint.h): Likewise.
3742 * tracepoint.c (stdint.h): Likewise.
3743 * win32-low.c (stdint.h): Likewise.
3744
3745 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3746
3747 * server.c (write_qxfer_response): Update call to
3748 remote_escape_output.
3749
3750 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3751 Jan Kratochvil <jan.kratochvil@redhat.com>
3752
3753 Merge multiple hex conversions.
3754 * gdbreplay.c (tohex): Rename to 'fromhex'.
3755 (logchar): Use fromhex.
3756
3757 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3758
3759 * server.c (handle_qxfer_libraries): Set `version' attribute for
3760 <library-list>.
3761
3762 2015-06-10 Gary Benson <gbenson@redhat.com>
3763
3764 * target.h (struct target_ops) <multifs_open>: New field.
3765 <multifs_unlink>: Likewise.
3766 <multifs_readlink>: Likewise.
3767 * linux-low.c (nat/linux-namespaces.h): New include.
3768 (linux_target_ops): Initialize the_target->multifs_open,
3769 the_target->multifs_unlink and the_target->multifs_readlink.
3770 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3771 * hostio.c (hostio_fs_pid): New static variable.
3772 (hostio_handle_new_gdb_connection): New function.
3773 (handle_setfs): Likewise.
3774 (handle_open): Use the_target->multifs_open as appropriate.
3775 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3776 (handle_readlink): Use the_target->multifs_readlink as
3777 appropriate.
3778 (handle_vFile): Handle vFile:setfs packets.
3779 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3780 after target_handle_new_gdb_connection.
3781
3782 2015-06-10 Gary Benson <gbenson@redhat.com>
3783
3784 * configure.ac (AC_CHECK_FUNCS): Add setns.
3785 * config.in: Regenerate.
3786 * configure: Likewise.
3787 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3788 (linux-namespaces.o): New rule.
3789 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3790
3791 2015-06-09 Gary Benson <gbenson@redhat.com>
3792
3793 * hostio.c (handle_open): Process mode argument with
3794 fileio_to_host_mode.
3795
3796 2015-06-01 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3799 * linux-x86-low.c: Likewise.
3800
3801 2015-05-28 Don Breazeal <donb@codesourcery.com>
3802
3803 * linux-low.c (handle_extended_wait): Initialize
3804 thread_info.last_resume_kind for new fork children.
3805
3806 2015-05-15 Pedro Alves <palves@redhat.com>
3807
3808 * target.h (target_handle_new_gdb_connection): Rewrite using if
3809 wrapped in do/while.
3810
3811 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3812
3813 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3814 * configure, config.in: Regenerate.
3815 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3816 Declare typedef.
3817
3818 2015-05-12 Don Breazeal <donb@codesourcery.com>
3819
3820 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3821 PTRACE_EVENT_VFORK_DONE.
3822 (linux_low_ptrace_options, extended_event_reported): Add vfork
3823 events.
3824 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3825 and "vforkdone" for RSP 'T' Stop Reply Packet.
3826 * server.h (report_vfork_events): Declare
3827 global variable.
3828
3829 2015-05-12 Don Breazeal <donb@codesourcery.com>
3830
3831 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3832 (the_low_target) <new_fork>: Initialize new member.
3833 * linux-arm-low.c (arm_new_fork): New function.
3834 (the_low_target) <new_fork>: Initialize new member.
3835 * linux-low.c (handle_extended_wait): Call new target function
3836 new_fork.
3837 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3838 * linux-mips-low.c (mips_add_watchpoint): New function
3839 extracted from mips_insert_point.
3840 (the_low_target) <new_fork>: Initialize new member.
3841 (mips_linux_new_fork): New function.
3842 (mips_insert_point): Call mips_add_watchpoint.
3843 * linux-x86-low.c (x86_linux_new_fork): New function.
3844 (the_low_target) <new_fork>: Initialize new member.
3845
3846 2015-05-12 Don Breazeal <donb@codesourcery.com>
3847
3848 * linux-low.c (handle_extended_wait): Implement return value,
3849 rename argument 'event_child' to 'event_lwp', handle
3850 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3851 (linux_low_ptrace_options): New function.
3852 (linux_low_filter_event): Call linux_low_ptrace_options,
3853 use different argument fo linux_enable_event_reporting,
3854 use return value from handle_extended_wait.
3855 (extended_event_reported): New function.
3856 (linux_wait_1): Call extended_event_reported and set
3857 status to report fork events.
3858 (linux_write_memory): Add pid to debug message.
3859 (reset_lwp_ptrace_options_callback): New function.
3860 (linux_handle_new_gdb_connection): New function.
3861 (linux_target_ops): Initialize new structure member.
3862 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3863 * lynx-low.c: Initialize new structure member.
3864 * remote-utils.c (prepare_resume_reply): Implement stop reason
3865 "fork" for "T" stop message.
3866 * server.c (handle_query): Call handle_new_gdb_connection.
3867 * server.h (report_fork_events): Declare global flag.
3868 * target.h (struct target_ops) <handle_new_gdb_connection>:
3869 New member.
3870 (target_handle_new_gdb_connection): New macro.
3871 * win32-low.c: Initialize new structure member.
3872
3873 2015-05-12 Don Breazeal <donb@codesourcery.com>
3874
3875 * mem-break.c (APPEND_TO_LIST): Define macro.
3876 (clone_agent_expr): New function.
3877 (clone_one_breakpoint): New function.
3878 (clone_all_breakpoints): New function.
3879 * mem-break.h: Declare new functions.
3880
3881 2015-05-12 Don Breazeal <donb@codesourcery.com>
3882
3883 * linux-low.c (linux_supports_fork_events): New function.
3884 (linux_supports_vfork_events): New function.
3885 (linux_target_ops): Initialize new structure members.
3886 (initialize_low): Call linux_check_ptrace_features.
3887 * lynx-low.c (lynx_target_ops): Initialize new structure
3888 members.
3889 * server.c (report_fork_events, report_vfork_events):
3890 New global flags.
3891 (handle_query): Add new features to qSupported packet and
3892 response.
3893 (captured_main): Initialize new global variables.
3894 * target.h (struct target_ops) <supports_fork_events>:
3895 New member.
3896 <supports_vfork_events>: New member.
3897 (target_supports_fork_events): New macro.
3898 (target_supports_vfork_events): New macro.
3899 * win32-low.c (win32_target_ops): Initialize new structure
3900 members.
3901
3902 2015-05-12 Gary Benson <gbenson@redhat.com>
3903
3904 * server.c (handle_qxfer_exec_file): Use current process
3905 if annex is empty.
3906
3907 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3908
3909 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3910 Remove HAVE_PTRACE_GETREGS conditionals.
3911 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3912 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3913
3914 2015-05-08 Yao Qi <yao.qi@linaro.org>
3915
3916 * linux-low.c (linux_supports_conditional_breakpoints): New
3917 function.
3918 (linux_target_ops): Install new target method.
3919 * lynx-low.c (lynx_target_ops): Install NULL hook for
3920 supports_conditional_breakpoints.
3921 * nto-low.c (nto_target_ops): Likewise.
3922 * spu-low.c (spu_target_ops): Likewise.
3923 * win32-low.c (win32_target_ops): Likewise.
3924 * server.c (handle_query): Check
3925 target_supports_conditional_breakpoints.
3926 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3927 New field.
3928 (target_supports_conditional_breakpoints): New macro.
3929
3930 2015-05-06 Pedro Alves <palves@redhat.com>
3931
3932 PR server/18081
3933 * server.c (start_inferior): If the process exits, mourn it.
3934
3935 2015-04-21 Gary Benson <gbenson@redhat.com>
3936
3937 * hostio.c (fileio_open_flags_to_host): Factored out to
3938 fileio_to_host_openflags in common/fileio.c. Single use
3939 updated.
3940
3941 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3942
3943 * linux-xtensa-low.c (xtensa_fill_gregset)
3944 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3945 XCHAL_HAVE_LOOP.
3946
3947 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3948
3949 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3950 (regs_info): Replace usrregs pointer with NULL.
3951
3952 2015-04-17 Gary Benson <gbenson@redhat.com>
3953
3954 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3955 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3956 * server.c (handle_qxfer_exec_file): New function.
3957 (qxfer_packets): Add exec-file entry.
3958 (handle_query): Report qXfer:exec-file:read as supported packet.
3959
3960 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3961
3962 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3963
3964 2015-04-09 Gary Benson <gbenson@redhat.com>
3965
3966 * hostio-errno.c (errno_to_fileio_error): Remove function.
3967 Update caller to use remote_fileio_to_fio_error.
3968
3969 2015-04-09 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-low.c (linux_insert_point): Call
3972 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3973 (linux_remove_point): Call remove_memory_breakpoint if type is
3974 raw_bkpt_type_sw.
3975 * linux-x86-low.c (x86_insert_point): Don't call
3976 insert_memory_breakpoint.
3977 (x86_remove_point): Don't call remove_memory_breakpoint.
3978
3979 2015-04-01 Pedro Alves <palves@redhat.com>
3980 Cleber Rosa <crosa@redhat.com>
3981
3982 * server.c (gdbserver_usage): Reorganize and extend the usage
3983 message.
3984
3985 2015-03-24 Pedro Alves <palves@redhat.com>
3986
3987 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3988 output. Also dump TRAP_TRACE.
3989 (linux_low_filter_event): In debug output, distinguish a
3990 resume_stop SIGSTOP from a delayed SIGSTOP.
3991
3992 2015-03-24 Gary Benson <gbenson@redhat.com>
3993
3994 * linux-x86-low.c (x86_linux_new_thread): Moved to
3995 nat/x86-linux.c.
3996 (x86_linux_prepare_to_resume): Likewise.
3997
3998 2015-03-24 Gary Benson <gbenson@redhat.com>
3999
4000 * Makefile.in (x86-linux-dregs.o): New rule.
4001 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4002 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4003 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4004 (x86_linux_dr_get): Likewise.
4005 (x86_linux_dr_set): Likewise.
4006 (update_debug_registers_callback): Likewise.
4007 (x86_linux_dr_set_addr): Likewise.
4008 (x86_linux_dr_get_addr): Likewise.
4009 (x86_linux_dr_set_control): Likewise.
4010 (x86_linux_dr_get_control): Likewise.
4011 (x86_linux_dr_get_status): Likewise.
4012 (x86_linux_update_debug_registers): Likewise.
4013
4014 2015-03-24 Gary Benson <gbenson@redhat.com>
4015
4016 * linux-x86-low.c (x86_linux_update_debug_registers):
4017 New function, factored out from...
4018 (x86_linux_prepare_to_resume): ...this.
4019
4020 2015-03-24 Gary Benson <gbenson@redhat.com>
4021
4022 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4023 (x86_linux_dr_set): Likewise.
4024 (update_debug_registers_callback): Likewise.
4025 (x86_linux_dr_set_addr): Likewise.
4026 (x86_linux_dr_get_addr): Likewise.
4027 (x86_linux_dr_set_control): Likewise.
4028 (x86_linux_dr_get_control): Likewise.
4029 (x86_linux_dr_get_status): Likewise.
4030 (x86_linux_prepare_to_resume): Likewise.
4031
4032 2015-03-24 Gary Benson <gbenson@redhat.com>
4033
4034 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4035 Use perror_with_name. Pass string through gettext.
4036 (x86_linux_dr_set): Likewise.
4037
4038 2015-03-24 Gary Benson <gbenson@redhat.com>
4039
4040 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4041 (x86_linux_dr_set_addr): ...this.
4042 (x86_dr_low_get_addr): Rename to...
4043 (x86_linux_dr_get_addr): ...this.
4044 (x86_dr_low_set_control): Rename to...
4045 (x86_linux_dr_set_control): ...this.
4046 (x86_dr_low_get_control): Rename to...
4047 (x86_linux_dr_get_control): ...this.
4048 (x86_dr_low_get_status): Rename to...
4049 (x86_linux_dr_get_status): ...this.
4050 (x86_dr_low): Update with new function names.
4051
4052 2015-03-24 Gary Benson <gbenson@redhat.com>
4053
4054 * Makefile.in (x86-linux.o): New rule.
4055 * configure.srv: Add x86-linux.o to relevant targets.
4056 * linux-low.c (lwp_set_arch_private_info): New function.
4057 (lwp_arch_private_info): Likewise.
4058 * linux-x86-low.c: Include nat/x86-linux.h.
4059 (arch_lwp_info): Removed structure.
4060 (update_debug_registers_callback):
4061 Use lwp_set_debug_registers_changed.
4062 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4063 and lwp_set_debug_registers_changed.
4064 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4065
4066 2015-03-24 Gary Benson <gbenson@redhat.com>
4067
4068 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4069 * linux-arm-low.c (arm_new_thread): Likewise.
4070 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4071 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4072 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4073 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4074
4075 2015-03-24 Gary Benson <gbenson@redhat.com>
4076
4077 * linux-low.c (ptid_of_lwp): New function.
4078 (lwp_is_stopped): Likewise.
4079 (lwp_stop_reason): Likewise.
4080 * linux-x86-low.c (update_debug_registers_callback):
4081 Use lwp_is_stopped.
4082 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4083 lwp_stop_reason.
4084
4085 2015-03-24 Gary Benson <gbenson@redhat.com>
4086
4087 * linux-low.h (linux_stop_lwp): Remove declaration.
4088
4089 2015-03-24 Gary Benson <gbenson@redhat.com>
4090
4091 * linux-low.h: Include nat/linux-nat.h.
4092 * linux-low.c (iterate_over_lwps_args): New structure.
4093 (iterate_over_lwps_filter): New function.
4094 (iterate_over_lwps): Likewise.
4095 * linux-x86-low.c (update_debug_registers_callback):
4096 Update signature to what iterate_over_lwps expects.
4097 Remove PID check that iterate_over_lwps now performs.
4098 (x86_dr_low_set_addr): Use iterate_over_lwps.
4099 (x86_dr_low_set_control): Likewise.
4100
4101 2015-03-24 Gary Benson <gbenson@redhat.com>
4102
4103 * linux-x86-low.c (x86_debug_reg_state): New function.
4104 (x86_linux_prepare_to_resume): Use the above.
4105
4106 2015-03-24 Gary Benson <gbenson@redhat.com>
4107
4108 * linux-low.c (current_lwp_ptid): New function.
4109 * linux-x86-low.c: Include nat/linux-nat.h.
4110 (x86_dr_low_get_addr): Use current_lwp_ptid.
4111 (x86_dr_low_get_control): Likewise.
4112 (x86_dr_low_get_status): Likewise.
4113
4114 2015-03-20 Pedro Alves <palves@redhat.com>
4115
4116 * tracepoint.c (cmd_qtstatus): Make "str" const.
4117
4118 2015-03-20 Pedro Alves <palves@redhat.com>
4119
4120 * server.c (handle_general_set): Make "req_str" const.
4121
4122 2015-03-19 Pedro Alves <palves@redhat.com>
4123
4124 * linux-low.c (linux_resume_one_lwp): Rename to ...
4125 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4126 instead call perror_with_name.
4127 (check_ptrace_stopped_lwp_gone): New function.
4128 (linux_resume_one_lwp): Reimplement as wrapper around
4129 linux_resume_one_lwp_throw that swallows errors if the LWP is
4130 gone.
4131
4132 2015-03-19 Pedro Alves <palves@redhat.com>
4133
4134 * linux-low.c (count_events_callback, select_event_lwp_callback):
4135 No longer check whether the thread has resume_stop as last resume
4136 kind.
4137
4138 2015-03-19 Pedro Alves <palves@redhat.com>
4139
4140 * linux-low.c (count_events_callback, select_event_lwp_callback):
4141 Use the lwp's status_pending_p field, not the thread's.
4142
4143 2015-03-19 Pedro Alves <palves@redhat.com>
4144
4145 * linux-low.c (select_event_lwp_callback): Update comments to
4146 no longer mention SIGTRAP.
4147
4148 2015-03-18 Gary Benson <gbenson@redhat.com>
4149
4150 * server.c (handle_query): Do not report vFile:fstat as supported.
4151
4152 2015-03-11 Gary Benson <gbenson@redhat.com>
4153
4154 * hostio.c (sys/types.h): New include.
4155 (sys/stat.h): Likewise.
4156 (common-remote-fileio.h): Likewise.
4157 (handle_fstat): New function.
4158 (handle_vFile): Handle vFile:fstat packets.
4159
4160 2015-03-11 Gary Benson <gbenson@redhat.com>
4161
4162 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4163 struct stat.st_blocks and struct stat.st_blksize.
4164 * configure: Regenerate.
4165 * config.in: Likewise.
4166 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4167 (OBS): Add common-remote-fileio.o.
4168 (common-remote-fileio.o): New rule.
4169
4170 2015-03-09 Pedro Alves <palves@redhat.com>
4171
4172 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4173 'struct sockaddr' pointer in 'accept' call.
4174
4175 2015-03-09 Pedro Alves <palves@redhat.com>
4176
4177 Revert:
4178 2015-03-07 Pedro Alves <palves@redhat.com>
4179 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4180 or <winsock2.h> here. Instead include "gdb_socket.h".
4181 (remote_open): Use union gdb_sockaddr_u.
4182 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4183 or <winsock2.h> here. Instead include "gdb_socket.h".
4184 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4185 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4186 or <sys/un.h>.
4187 (init_named_socket, gdb_agent_helper_thread): Use union
4188 gdb_sockaddr_u.
4189
4190 2015-03-07 Pedro Alves <palves@redhat.com>
4191
4192 * configure.ac (build_warnings): Move
4193 -Wdeclaration-after-statement to the C-specific set.
4194 * configure: Regenerate.
4195
4196 2015-03-07 Pedro Alves <palves@redhat.com>
4197
4198 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4199 or <winsock2.h> here. Instead include "gdb_socket.h".
4200 (remote_open): Use union gdb_sockaddr_u.
4201 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4202 or <winsock2.h> here. Instead include "gdb_socket.h".
4203 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4204 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4205 or <sys/un.h>.
4206 (init_named_socket, gdb_agent_helper_thread): Use union
4207 gdb_sockaddr_u.
4208
4209 2015-03-07 Pedro Alves <palves@redhat.com>
4210
4211 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4212 instead.
4213
4214 2015-03-06 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-aarch64-low.c (aarch64_insert_point): Use
4217 show_debug_regs as a boolean.
4218 (aarch64_remove_point): Likewise.
4219
4220 2015-03-05 Pedro Alves <palves@redhat.com>
4221
4222 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4223 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4224 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4225 * nto-low.c (nto_target_ops): Likewise.
4226 * spu-low.c (spu_target_ops): Likewise.
4227 * win32-low.c (win32_target_ops): Likewise.
4228
4229 2015-03-04 Pedro Alves <palves@redhat.com>
4230
4231 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4232 Decide whether a breakpoint triggered based on the SIGTRAP's
4233 siginfo.si_code.
4234 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4235 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4236 (linux_low_filter_event): Check for breakpoints before checking
4237 watchpoints.
4238 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4239 siginfo.si_code.
4240 (linux_stopped_by_sw_breakpoint)
4241 (linux_supports_stopped_by_sw_breakpoint)
4242 (linux_stopped_by_hw_breakpoint)
4243 (linux_supports_stopped_by_hw_breakpoint): New functions.
4244 (linux_target_ops): Install new target methods.
4245
4246 2015-03-04 Pedro Alves <palves@redhat.com>
4247
4248 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4249 * server.c (swbreak_feature, hwbreak_feature): New globals.
4250 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4251 (captured_main): Clear swbreak_feature and hwbreak_feature.
4252 * server.h (swbreak_feature, hwbreak_feature): Declare.
4253 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4254 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4255 supports_stopped_by_hw_breakpoint>: New fields.
4256 (target_supports_stopped_by_sw_breakpoint)
4257 (target_stopped_by_sw_breakpoint)
4258 (target_supports_stopped_by_hw_breakpoint)
4259 (target_stopped_by_hw_breakpoint): Declare.
4260
4261 2015-03-04 Pedro Alves <palves@redhat.com>
4262
4263 enum lwp_stop_reason -> enum target_stop_reason
4264 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4265 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4266 (linux_wait_1, stuck_in_jump_pad_callback)
4267 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4268 (linux_stopped_by_watchpoint):
4269 * linux-low.h (enum lwp_stop_reason): Delete.
4270 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4271 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4272
4273 2015-03-04 Yao Qi <yao.qi@linaro.org>
4274
4275 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4276
4277 2015-03-03 Gary Benson <gbenson@redhat.com>
4278
4279 * hostio.c (handle_vFile): Fix prefix lengths.
4280
4281 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4282
4283 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4284 ptr_bits.
4285
4286 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4287
4288 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4289 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4290 (clean): Add "rm -f" for above C files.
4291 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4292 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4293 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4294 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4295 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4296 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4297 (init_registers_s390x_vx_linux64)
4298 (init_registers_s390x_tevx_linux64)
4299 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4300 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4301 declarations.
4302 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4303 (s390_store_vxrs_high): New functions.
4304 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4305 NT_S390_VXRS_HIGH.
4306 (s390_arch_setup): Add logic for selecting one of the new target
4307 descriptions. Activate the new vector regsets if applicable.
4308 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4309 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4310 and init_registers_s390x_tevx_linux64.
4311
4312 2015-03-01 Pedro Alves <palves@redhat.com>
4313
4314 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4315 parameter.
4316
4317 2015-02-27 Pedro Alves <palves@redhat.com>
4318
4319 * linux-x86-low.c (u_debugreg_offset): New function.
4320 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4321
4322 2015-02-27 Pedro Alves <palves@redhat.com>
4323
4324 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4325 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4326 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4327 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4328 (ps_lsetfpregs, ps_getpid)
4329 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4330 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4331 (ps_lsetxregs, ps_plog): Declare.
4332
4333 2015-02-27 Pedro Alves <palves@redhat.com>
4334
4335 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4336 IP_AGENT_EXPORT_FUNC.
4337 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4338 IP_AGENT_EXPORT_FUNC.
4339 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4340 (IP_AGENT_EXPORT): Delete.
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, collecting, gdb_collect)
4344 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4345 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4346 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4347 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4348 (traceframe_read_count, traceframe_write_count)
4349 (traceframes_created, trace_state_variables, get_raw_reg)
4350 (get_trace_state_variable_value, set_trace_state_variable_value)
4351 (ust_loaded, helper_thread_id, cmd_buf): Use
4352 IPA_SYM_EXPORTED_NAME.
4353 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4354 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4355 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4356 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4357 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4358 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4359 EXTERN_C_PUSH/EXTERN_C_POP.
4360 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4361 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4362 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4363 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4364 (traceframe_write_count, traceframe_read_count)
4365 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4366 (about_to_request_buffer_space, get_trace_state_variable_value)
4367 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4368 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4369 EXTERN_C_PUSH/EXTERN_C_POP.
4370 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4371 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4372 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4373 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4374 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4375 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4376 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4377 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4378 Define.
4379 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4380 (IP_AGENT_EXPORT_VAR_DECL): Define.
4381 (tracing): Declare.
4382 (gdb_agent_get_raw_reg): Declare.
4383
4384 2015-02-27 Tom Tromey <tromey@redhat.com>
4385 Pedro Alves <palves@redhat.com>
4386
4387 Rename symbols whose names are reserved C++ keywords throughout.
4388
4389 2015-02-27 Pedro Alves <palves@redhat.com>
4390
4391 * Makefile.in (COMPILER): New, get it from autoconf.
4392 (CXX): Get from autoconf instead.
4393 (COMPILE.pre): Use COMPILER.
4394 (CC-LD): Rename to ...
4395 (CC_LD): ... this. Use COMPILER.
4396 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4397 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4398 * acinclude.m4: Include build-with-cxx.m4.
4399 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4400 Disable -Werror by default if building in C++ mode.
4401 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4402 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4403 the C++ compiler. Save/restore CXXFLAGS too.
4404 * configure: Regenerate.
4405
4406 2015-02-27 Pedro Alves <palves@redhat.com>
4407
4408 * acinclude.m4: Include libiberty.m4.
4409 * configure.ac: Call libiberty_INIT.
4410 * config.in, configure: Regenerate.
4411
4412 2015-02-26 Pedro Alves <palves@redhat.com>
4413
4414 * linux-low.c (linux_wait_1): When incrementing the PC past a
4415 program breakpoint always use the_low_target.breakpoint_len as
4416 increment, rather than the maximum between that and
4417 the_low_target.decr_pc_after_break.
4418
4419 2015-02-23 Pedro Alves <palves@redhat.com>
4420
4421 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4422 thread was doing a step-over; always adjust the PC if
4423 we stepped over a permanent breakpoint.
4424 (linux_wait_1): If we stepped over breakpoint that was on top of a
4425 permanent breakpoint, manually advance the PC past it.
4426
4427 2015-02-23 Pedro Alves <palves@redhat.com>
4428
4429 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4430 modes.
4431 (x86_fill_gregset, x86_store_gregset): Use it when handling
4432 $orig_eax.
4433
4434 2015-02-20 Pedro Alves <palves@redhat.com>
4435
4436 * thread-db.c: Include "nat/linux-procfs.h".
4437 (thread_db_init): Skip listing new threads if the kernel supports
4438 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4439
4440 2015-02-20 Pedro Alves <palves@redhat.com>
4441
4442 * linux-low.c (status_pending_p_callback): Use ptid_match.
4443
4444 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4445
4446 PR breakpoints/16812
4447 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4448 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4449 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4450
4451 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4452
4453 PR breakpoints/15956
4454 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4455
4456 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4457
4458 * linux-low.c (linux_low_btrace_conf): Print size.
4459 * server.c (handle_btrace_conf_general_set): New.
4460 (hanle_general_set): Call handle_btrace_conf_general_set.
4461 (handle_query): Report Qbtrace-conf:bts:size as supported.
4462
4463 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4464
4465 * linux-low.c (linux_low_enable_btrace): Update parameters.
4466 (linux_low_btrace_conf): New.
4467 (linux_target_ops)<to_btrace_conf>: Initialize.
4468 * server.c (current_btrace_conf): New.
4469 (handle_btrace_enable): Rename to ...
4470 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4471 to target_enable_btrace. Update comment. Update users.
4472 (handle_qxfer_btrace_conf): New.
4473 (qxfer_packets): Add btrace-conf entry.
4474 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4475 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4476 (target_ops)<read_btrace_conf>: New.
4477 (target_enable_btrace): Update parameters.
4478 (target_read_btrace_conf): New.
4479
4480 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4481
4482 * server.c (handle_btrace_general_set): Remove call to
4483 target_supports_btrace.
4484 (supported_btrace_packets): New.
4485 (handle_query): Call supported_btrace_packets.
4486 * target.h: include btrace-common.h.
4487 (btrace_target_info): Removed.
4488 (supports_btrace, target_supports_btrace): Update parameters.
4489
4490 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4491
4492 * Makefile.in (SFILES): Add common/btrace-common.c.
4493 (OBS): Add common/btrace-common.o.
4494 (btrace-common.o): Add build rules.
4495 * linux-low: Include btrace-common.h.
4496 (linux_low_read_btrace): Use struct btrace_data. Call
4497 btrace_data_init and btrace_data_fini.
4498
4499 2015-02-06 Pedro Alves <palves@redhat.com>
4500
4501 * thread-db.c (find_new_threads_callback): Add debug output.
4502
4503 2015-02-04 Pedro Alves <palves@redhat.com>
4504
4505 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4506 (resume_stopped_resumed_lwps): New function.
4507 (linux_wait_for_event_filtered): Use it.
4508
4509 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4510
4511 * Makefile.in (SFILES): Add linux-personality.c.
4512 (linux-personality.o): New rule.
4513 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4514 list of objects to be built.
4515 * linux-low.c: Include nat/linux-personality.h.
4516 (linux_create_inferior): Remove code to disable address space
4517 randomization (moved to ../nat/linux-personality.c). Create
4518 cleanup to disable address space randomization.
4519
4520 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4521
4522 * Makefile.in (posix-strerror.o): New rule.
4523 (mingw-strerror.o): Likewise.
4524 * configure: Regenerated.
4525 * configure.ac: Source file ../common/common.host. Initialize new
4526 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4527
4528 2015-01-14 Yao Qi <yao@codesourcery.com>
4529
4530 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4531 (ppc-linux.o): New rule.
4532 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4533 * configure.ac: AC_CHECK_FUNCS(getauxval).
4534 * config.in: Re-generated.
4535 * configure: Re-generated.
4536 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4537 ppc64_64bit_inferior_p
4538
4539 2015-01-14 Yao Qi <yao@codesourcery.com>
4540
4541 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4542 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4543 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4544 (PT_ORIG_R3, PT_TRAP): Likewise.
4545 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4546 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4547 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4548
4549 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4550
4551 * i387-fp.c (i387_cache_to_xsave): In look over
4552 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4553 zmmh_low_space field by use of zmmh_high_space.
4554
4555 2015-01-09 Pedro Alves <palves@redhat.com>
4556
4557 * linux-low.c (step_over_bkpt): Move higher up in the file.
4558 (handle_extended_wait): Don't store the stop_pc here.
4559 (get_stop_pc): Adjust comments and rename to ...
4560 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4561 stopped for a software breakpoint or hardware breakpoint.
4562 (thread_still_has_status_pending_p): New function.
4563 (status_pending_p_callback): Use
4564 thread_still_has_status_pending_p. If the event is no longer
4565 interesting, resume the LWP.
4566 (handle_tracepoints): Add assert.
4567 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4568 (wstatus_maybe_breakpoint): New function.
4569 (cancel_breakpoint): Delete function.
4570 (check_stopped_by_watchpoint): New function, factored out from
4571 linux_low_filter_event.
4572 (lp_status_maybe_breakpoint): Delete function.
4573 (linux_low_filter_event): Remove filter_ptid argument.
4574 Leave thread group exits pending here. Store the LWP's stop PC.
4575 Always leave events pending.
4576 (linux_wait_for_event_filtered): Pull all events out of the
4577 kernel, and leave them all pending.
4578 (count_events_callback, select_event_lwp_callback): Consider all
4579 events.
4580 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4581 (select_event_lwp): Only give preference to the stepping LWP in
4582 all-stop mode. Adjust comments.
4583 (ignore_event): New function.
4584 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4585 references to cancel_breakpoints. Adjust to renames. Also give
4586 equal priority to all LWPs that have had events in non-stop mode.
4587 If reporting a software breakpoint event, unadjust the LWP's PC.
4588 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4589 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4590 Adjust.
4591 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4592 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4593 (linux_stopped_by_watchpoint): Adjust.
4594 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4595 * linux-low.h (enum lwp_stop_reason): New.
4596 (struct lwp_info) <stop_pc>: Adjust comment.
4597 <stopped_by_watchpoint>: Delete field.
4598 <stop_reason>: New field.
4599 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4600 * mem-break.c (software_breakpoint_inserted_here)
4601 (hardware_breakpoint_inserted_here): New function.
4602 * mem-break.h (software_breakpoint_inserted_here)
4603 (hardware_breakpoint_inserted_here): Declare.
4604 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4605 (cancel_breakpoints): Delete.
4606 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4607 (upload_fast_traceframes): Remove references to
4608 cancel_breakpoints.
4609
4610 2015-01-09 Pedro Alves <palves@redhat.com>
4611
4612 * thread-db.c (find_new_threads_callback): Ignore thread if the
4613 kernel thread ID is -1.
4614
4615 2015-01-09 Pedro Alves <palves@redhat.com>
4616
4617 * linux-low.c (linux_attach_fail_reason_string): Move to
4618 nat/linux-ptrace.c, and rename.
4619 (linux_attach_lwp): Update comment.
4620 (attach_proc_task_lwp_callback): New function.
4621 (linux_attach): Adjust to rename and use
4622 linux_proc_attach_tgid_threads.
4623 (linux_attach_fail_reason_string): Delete declaration.
4624
4625 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4626
4627 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4628 * server.c (gdbserver_version): Likewise.
4629
4630 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4631
4632 * remote-utils.c: Include ctype.h.
4633 (input_interrupt): Explicitly handle the case when the char
4634 received is the NUL byte. Improve the printing of non-ASCII
4635 characters.
4636
4637 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4638
4639 * linux-low.c (linux_low_filter_event): Update call to
4640 linux_enable_event_reporting following the addition of
4641 a new parameter to that function.
4642
4643 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4644
4645 PR server/17457
4646 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4647 (AARCH64_FPCR_REGNO): Likewise.
4648 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4649 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4650 (aarch64_store_fpregset): Likewise.
4651
4652 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4653
4654 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4655 Remove FIXME comment about assumption about N.
4656
4657 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4658
4659 * configure.ac: If large-file support is disabled in GDBserver,
4660 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4661 * configure: Regenerate.
4662
4663 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4664
4665 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4666 warning upon ENODATA from ptrace.
4667 * linux-s390-low.c (s390_store_tdb): New.
4668 (s390_regsets): Add regset for NT_S390_TDB.
4669
4670 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4671
4672 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4673 without a fill_function.
4674 * linux-s390-low.c (s390_fill_last_break): Remove.
4675 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4676 (s390_arch_setup): Use regset's size instead of fill_function for
4677 loop end condition.
4678
4679 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4680
4681 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4682 the regset's store function when ptrace returned an error.
4683 * regcache.c (get_thread_regcache): Invalidate register cache
4684 before fetching inferior's registers.
4685
4686 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4687
4688 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4689 while-loop as for-loop.
4690 (regsets_store_inferior_registers): Likewise.
4691
4692 2014-11-28 Yao Qi <yao@codesourcery.com>
4693
4694 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4695 * config.in, configure: Re-generate.
4696 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4697 is defined.
4698
4699 2014-11-21 Yao Qi <yao@codesourcery.com>
4700
4701 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4702 (AC_CHECK_HEADERS): Remove malloc.h.
4703 * configure: Re-generated.
4704 * config.in: Re-generated.
4705 * server.h: Don't include alloca.h and malloc.h.
4706 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4707 Don't include malloc.h.
4708
4709 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4710
4711 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4712 corresponding ERRNO check in same block.
4713
4714 2014-11-12 Pedro Alves <palves@redhat.com>
4715
4716 * server.c (cont_thread): Update comment.
4717 (start_inferior, attach_inferior): No longer clear cont_thread.
4718 (handle_v_cont): No longer set cont_thread.
4719 (captured_main): Clear cont_thread each time a GDB connects.
4720
4721 2014-11-12 Pedro Alves <palves@redhat.com>
4722
4723 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4724 thread, and don't resume all threads if the Hc thread has exited.
4725
4726 2014-11-12 Pedro Alves <palves@redhat.com>
4727
4728 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4729 the process group instead of to a specific LWP.
4730
4731 2014-10-15 Pedro Alves <palves@redhat.com>
4732
4733 PR server/17487
4734 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4735 parameter.
4736 (arm_set_thread_context): Delete.
4737 (the_low_target): Adjust.
4738 * win32-i386-low.c (debug_registers_changed)
4739 (debug_registers_used): Delete.
4740 (update_debug_registers_callback): New function.
4741 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4742 needing to update their debug registers.
4743 (win32_get_current_dr): New function.
4744 (x86_dr_low_get_addr, x86_dr_low_get_control)
4745 (x86_dr_low_get_status): Fetch the debug register from the thread
4746 record's context.
4747 (i386_initial_stuff): Adjust.
4748 (i386_get_thread_context): Remove current_event parameter. Don't
4749 clear debug_registers_changed nor copy DR values to
4750 debug_reg_state.
4751 (i386_set_thread_context): Delete.
4752 (i386_prepare_to_resume): New function.
4753 (i386_thread_added): Mark the thread as needing to update irs
4754 debug registers.
4755 (the_low_target): Remove i386_set_thread_context and install
4756 i386_prepare_to_resume.
4757 * win32-low.c (win32_get_thread_context): Adjust.
4758 (win32_set_thread_context): Use SetThreadContext
4759 directly.
4760 (win32_prepare_to_resume): New function.
4761 (win32_require_context): New function, factored out from ...
4762 (thread_rec): ... this.
4763 (continue_one_thread): Call win32_prepare_to_resume on each thread
4764 we're about to continue.
4765 (win32_resume): Call win32_prepare_to_resume on the event thread.
4766 * win32-low.h (struct win32_thread_info)
4767 <debug_registers_changed>: New field.
4768 (struct win32_target_ops): Change prototype of set_thread_context,
4769 delete set_thread_context and add prepare_to_resume.
4770 (win32_require_context): New declaration.
4771
4772 2014-10-08 Gary Benson <gbenson@redhat.com>
4773
4774 * server.h: Do not include common-exceptions.h.
4775
4776 2014-10-08 Gary Benson <gbenson@redhat.com>
4777
4778 * server.h: Do not include cleanups.h.
4779
4780 2014-09-30 James Hogan <james.hogan@imgtec.com>
4781
4782 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4783 mips64-dsp-linux.c.
4784
4785 2014-09-23 Yao Qi <yao@codesourcery.com>
4786
4787 * linux-low.c (lp_status_maybe_breakpoint): New function.
4788 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4789 (count_events_callback): Likewise.
4790 (select_event_lwp_callback): Likewise.
4791 (cancel_breakpoints_callback): Likewise.
4792
4793 2014-09-19 Don Breazeal <donb@codesourcery.com>
4794
4795 * linux-low.c (handle_extended_wait): Call
4796 linux_ptrace_get_extended_event.
4797 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4798 linux_is_extended_waitstatus.
4799
4800 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4801
4802 * Makefile.in (CPPFLAGS): Define.
4803 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4804 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4805
4806 2014-09-16 Gary Benson <gbenson@redhat.com>
4807
4808 * inferiors.h (current_inferior): Renamed as...
4809 (current_thread): New variable. All uses updated.
4810 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4811 (maybe_move_out_of_jump_pad): Likewise.
4812 (cancel_breakpoint): Likewise.
4813 (linux_low_filter_event): Likewise.
4814 (wait_for_sigstop): Likewise.
4815 (linux_resume_one_lwp): Likewise.
4816 (need_step_over_p): Likewise.
4817 (start_step_over): Likewise.
4818 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4819 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4820 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4821 and save_inferior as saved_thread.
4822 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4823 saved_thread.
4824 (regcache_invalidate_thread): Likewise.
4825 * remote-utils.c (prepare_resume_reply): Likewise.
4826 * thread-db.c (thread_db_get_tls_address): Likewise.
4827 (disable_thread_event_reporting): Likewise.
4828 (remove_thread_event_breakpoints): Likewise.
4829 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4830 as saved_thread.
4831 * target.h (set_desired_inferior): Renamed as...
4832 (set_desired_thread): New declaration. All uses updated.
4833 * server.c (myresume): Updated comment to reference thread instead
4834 of inferior.
4835 (handle_serial_event): Likewise.
4836 (handle_target_event): Likewise.
4837
4838 2014-09-12 Tom Tromey <tromey@redhat.com>
4839 Gary Benson <gbenson@redhat.com>
4840
4841 * regcache.h: Include common-regcache.h.
4842 (regcache_read_pc): Don't declare.
4843 * regcache.c (get_thread_regcache_for_ptid): New function.
4844
4845 2014-09-11 Tom Tromey <tromey@redhat.com>
4846 Gary Benson <gbenson@redhat.com>
4847
4848 * symbol.c: New file.
4849 * Makefile.in (SFILES): Add symbol.c.
4850 (OBS): Add symbol.o.
4851
4852 2014-09-11 Gary Benson <gbenson@redhat.com>
4853
4854 * target.c (target_stop_ptid, target_continue_ptid): New
4855 functions.
4856
4857 2014-09-11 Tom Tromey <tromey@redhat.com>
4858 Gary Benson <gbenson@redhat.com>
4859
4860 * target.h: Include target/target.h.
4861 * target.c (target_read_memory, target_read_uint32)
4862 (target_write_memory): New functions.
4863
4864 2014-09-11 Gary Benson <gbenson@redhat.com>
4865
4866 * server.h (debug_hw_points): Don't declare.
4867 * server.c (debug_hw_points): Don't define. Replace all uses
4868 with show_debug_regs.
4869 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4870 all uses with show_debug_regs.
4871
4872 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4873
4874 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4875 endianness into account.
4876 (ppc_supply_ptrace_register): Likewise.
4877
4878 2014-09-03 James Hogan <james.hogan@imgtec.com>
4879
4880 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4881 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4882
4883 2014-09-03 Gary Benson <gbenson@redhat.com>
4884
4885 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4886 ALL_DEBUG_ADDRESS_REGISTERS.
4887
4888 2014-09-02 Gary Benson <gbenson@redhat.com>
4889
4890 * i386-low.h: Renamed as...
4891 * x86-low.h: New file. All type, function and variable name
4892 prefixes changed from "i386_" to "x86_". All references updated.
4893 * i386-low.c: Renamed as...
4894 * x86-low.c: New file. All type, function and variable name
4895 prefixes changed from "i386_" to "x86_". All references updated.
4896
4897 2014-09-02 Gary Benson <gbenson@redhat.com>
4898
4899 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4900 (x86_linux_new_thread): Likewise.
4901
4902 2014-08-29 Gary Benson <gbenson@redhat.com>
4903
4904 * server.h (setjmp.h): Do not include.
4905 (toplevel): Do not declare.
4906 (common-exceptions.h): Include.
4907 (cleanups.h): Likewise.
4908 * server.c (toplevel): Do not define.
4909 (exit_code): New static global.
4910 (detach_or_kill_for_exit_cleanup): New function.
4911 (main): New function. Original main renamed to...
4912 (captured_main): New function.
4913 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4914
4915 2014-08-29 Gary Benson <gbenson@redhat.com>
4916
4917 * Makefile.in (SFILES): Add common/common-exceptions.c.
4918 (OBS): Add common-exceptions.o.
4919 (common-exceptions.o): New rule.
4920 * utils.c (prepare_to_throw_exception): New function.
4921
4922 2014-08-29 Gary Benson <gbenson@redhat.com>
4923
4924 * config.in: Regenerate.
4925 * configure: Likewise.
4926
4927 2014-08-29 Gary Benson <gbenson@redhat.com>
4928
4929 * Makefile.in (SFILES): Add common/cleanups.c.
4930 (OBS): cleanups.o.
4931 (cleanups.o): New rule.
4932
4933 2014-08-29 Gary Benson <gbenson@redhat.com>
4934
4935 * utils.c (internal_vwarning): New function.
4936
4937 2014-08-28 Gary Benson <gbenson@redhat.com>
4938
4939 * utils.h (fatal): Remove declaration.
4940 * utils.c (fatal): Remove function.
4941
4942 2014-08-28 Gary Benson <gbenson@redhat.com>
4943
4944 * tracepoint.c (gdb_agent_init): Replace fatal with
4945 perror_with_name.
4946 (initialize_tracepoint): Likewise.
4947
4948 2014-08-28 Gary Benson <gbenson@redhat.com>
4949
4950 * remote-utils.c (remote_prepare): Replace fatal with error.
4951
4952 2014-08-28 Gary Benson <gbenson@redhat.com>
4953
4954 * linux-low.c (linux_async): Replace fatal with warning.
4955 Tidy up and return.
4956 (linux_start_non_stop): Return -1 if linux_async failed.
4957
4958 2014-08-28 Gary Benson <gbenson@redhat.com>
4959
4960 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4961 gdb_assert.
4962 (i386_dr_low_get_addr): Remove vague comment.
4963 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4964 gdb_assert.
4965
4966 2014-08-28 Gary Benson <gbenson@redhat.com>
4967
4968 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4969 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4970 internal_error.
4971 (linux_resume_one_lwp): Likewise.
4972 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4973 gdb_assert.
4974 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4975 with internal_error.
4976 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4977 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4978 (find_register_by_name): Replace fatal with internal_error.
4979 (find_regno): Likewise.
4980 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4981 * thread-db.c (thread_db_create_event): Likewise.
4982 (thread_db_load_search): Likewise.
4983 (try_thread_db_load_1): Likewise.
4984 * tracepoint.c (get_jump_space_head): Replace fatal with
4985 internal_error.
4986 (claim_trampoline_space): Likewise.
4987 (have_fast_tracepoint_trampoline_buffer): Likewise.
4988 (cmd_qtstart): Likewise.
4989 (stop_tracing): Likewise.
4990 (fast_tracepoint_collecting): Likewise.
4991 (target_malloc): Likewise.
4992 (download_tracepoint): Likewise.
4993 (download_trace_state_variables): Replace check with gdb_assert.
4994 (upload_fast_traceframes): Replace fatal with internal_error.
4995
4996 2014-08-19 Tom Tromey <tromey@redhat.com>
4997 Gary Benson <gbenson@redhat.com>
4998
4999 * Makefile.in (SFILES): Add common/common-debug.c.
5000 (OBS): Add common-debug.o.
5001 (common-debug.o): New rule.
5002 * debug.h (debug_printf): Don't declare.
5003 * debug.c (debug_printf): Renamed and rewritten as...
5004 (debug_vprintf): New function.
5005
5006 2014-08-19 Gary Benson <gbenson@redhat.com>
5007
5008 * utils.h: Do not include print-utils.h.
5009
5010 2014-08-19 Tom Tromey <tromey@redhat.com>
5011 Gary Benson <gbenson@redhat.com>
5012
5013 * server.h: Add static assertion.
5014 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5015
5016 2014-08-19 Tom Tromey <tromey@redhat.com>
5017 Gary Benson <gbenson@redhat.com>
5018
5019 * Makefile.in (SFILES): Add common/errors.c.
5020 (OBS): Add errors.o.
5021 (IPA_OBS): Add errors-ipa.o.
5022 (errors.o): New rule.
5023 (errors-ipa.o): Likewise.
5024 * utils.h (perror_with_name, error, warning): Don't declare.
5025 * utils.c (warning): Renamed and rewritten as...
5026 (vwarning): New function.
5027 (error): Renamed and rewritten as...
5028 (verror): New function.
5029 (internal_error): Renamed and rewritten as...
5030 (internal_verror): New function.
5031
5032 2014-08-07 Gary Benson <gbenson@redhat.com>
5033
5034 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5035 * configure: Regenerate.
5036 * config.in: Likewise.
5037 * server.h: Do not include errno.h.
5038 * event-loop.c: Likewise.
5039 * hostio-errno.c: Likewise.
5040 * linux-low.c: Likewise.
5041 * remote-utils.c: Likewise.
5042 * spu-low.c: Likewise.
5043 * utils.c: Likewise.
5044 * gdbreplay.c: Unconditionally include errno.h.
5045
5046 2014-08-07 Gary Benson <gbenson@redhat.com>
5047
5048 * server.h: Do not include string.h.
5049 * event-loop.c: Likewise.
5050 * linux-low.c: Likewise.
5051 * regcache.c: Likewise.
5052 * remote-utils.c: Likewise.
5053 * spu-low.c: Likewise.
5054 * utils.c: Likewise.
5055
5056 2014-08-07 Gary Benson <gbenson@redhat.com>
5057
5058 * server.h: Do not include gdb_assert.h.
5059
5060 2014-08-07 Gary Benson <gbenson@redhat.com>
5061
5062 * server.h: Do not include common-utils.h.
5063
5064 2014-08-07 Gary Benson <gbenson@redhat.com>
5065
5066 * server.h: Do not include ptid.h.
5067 * notif.h: Likewise.
5068
5069 2014-08-07 Gary Benson <gbenson@redhat.com>
5070
5071 * server.h: Do not include gdb_locale.h.
5072
5073 2014-08-07 Gary Benson <gbenson@redhat.com>
5074
5075 * server.h: Do not include gdb/signals.h.
5076 * win32-low.c: Likewise.
5077
5078 2014-08-07 Gary Benson <gbenson@redhat.com>
5079
5080 * server.h: Do not include pathmax.h.
5081
5082 2014-08-07 Gary Benson <gbenson@redhat.com>
5083
5084 * server.h: Do not include libiberty.h.
5085 * linux-bfin-low.c: Likewise.
5086
5087 2014-08-07 Gary Benson <gbenson@redhat.com>
5088
5089 * server.h: Do not include ansidecl.h.
5090
5091 2014-08-07 Gary Benson <gbenson@redhat.com>
5092
5093 * linux-x86-low.c: Do not include stddef.h.
5094 * lynx-ppc-low.c: Likewise.
5095 * tracepoint.c: Likewise.
5096
5097 2014-08-07 Gary Benson <gbenson@redhat.com>
5098
5099 * server.h: Do not include stdarg.h.
5100 * nto-low.c: Likewise.
5101
5102 2014-08-07 Gary Benson <gbenson@redhat.com>
5103
5104 * server.h: Do not include stdlib.h.
5105 * inferiors.c: Likewise.
5106 * linux-low.c: Likewise.
5107 * regcache.c: Likewise.
5108 * spu-low.c: Likewise.
5109 * tracepoint.c: Likewise.
5110 * utils.c: Likewise.
5111
5112 2014-08-07 Gary Benson <gbenson@redhat.com>
5113
5114 * server.h: Do not include stdio.h.
5115 * linux-low.c: Likewise.
5116 * remote-utils.c: Likewise.
5117 * spu-low.c: Likewise.
5118 * utils.c: Likewise.
5119 * wincecompat.c: Likewise.
5120
5121 2014-08-06 Gary Benson <gbenson@redhat.com>
5122
5123 * regcache.c (init_register_cache): Move conditionals inside if.
5124
5125 2014-08-06 Gary Benson <gbenson@redhat.com>
5126
5127 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5128
5129 2014-07-31 Gary Benson <gbenson@redhat.com>
5130
5131 * ax.h: Do not include server.h.
5132 * gdbthread.h: Likewise.
5133 * lynx-low.h: Likewise.
5134 * notif.h: Likewise.
5135
5136 2014-07-30 Gary Benson <gbenson@redhat.com>
5137
5138 * server.h: Include common-defs.h.
5139 Do not include config.h or build-gnulib-gdbserver/config.h.
5140
5141 2014-07-30 Gary Benson <gbenson@redhat.com>
5142
5143 * hostio-errno.c: Move server.h to top of includes list.
5144 * inferiors.c: Likewise.
5145 * linux-x86-low.c: Likewise.
5146 * notif.c: Include server.h.
5147
5148 2014-07-24 Tom Tromey <tromey@redhat.com>
5149 Gary Benson <gbenson@redhat.com>
5150
5151 * server.h (CORE_ADDR): Now unsigned.
5152
5153 2014-07-16 Pedro Alves <palves@redhat.com>
5154
5155 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5156
5157 2014-07-15 Pedro Alves <palves@redhat.com>
5158
5159 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5160 copy.
5161
5162 2014-07-11 Pedro Alves <palves@redhat.com>
5163
5164 * linux-low.c (kill_wait_lwp): New function, based on
5165 kill_one_lwp_callback, but use my_waitpid directly.
5166 (kill_one_lwp_callback, linux_kill): Use it.
5167
5168 2014-06-23 Pedro Alves <palves@redhat.com>
5169
5170 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5171 before setting DR0..DR3.
5172
5173 2014-06-20 Gary Benson <gbenson@redhat.com>
5174
5175 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5176 * configure: Regenerated.
5177 * config.in: Likewise.
5178
5179 2014-06-20 Gary Benson <gbenson@redhat.com>
5180
5181 * Makefile.in (SFILES): Update locations for files moved
5182 from common to nat.
5183 (object file files): Reordered.
5184
5185 2014-06-20 Gary Benson <gbenson@redhat.com>
5186
5187 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5188 (i386_dr_low_set_addr): Likewise.
5189 (i386_dr_low_get_addr): Likewise.
5190 (i386_dr_low_can_set_control): Likewise.
5191 (i386_dr_low_set_control): Likewise.
5192 (i386_dr_low_get_control): Likewise.
5193 (i386_dr_low_get_status): Likewise.
5194 (i386_get_debug_register_length): Likewise.
5195 * linux-x86-low.c (i386_dr_low_set_addr):
5196 Changed signature. Made static.
5197 (i386_dr_low_get_addr): Likewise.
5198 (i386_dr_low_set_control): Likewise.
5199 (i386_dr_low_get_control): Likewise.
5200 (i386_dr_low_get_status): Likewise.
5201 (i386_dr_low): New global variable.
5202 * win32-i386-low.c (i386_dr_low_set_addr):
5203 Changed signature. Made static.
5204 (i386_dr_low_get_addr): Likewise.
5205 (i386_dr_low_set_control): Likewise.
5206 (i386_dr_low_get_control): Likewise.
5207 (i386_dr_low_get_status): Likewise.
5208 (i386_dr_low): New global variable.
5209
5210 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5211
5212 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5213 * Makefile.in (AR, AR_FLAGS): Define.
5214 * configure: Regenerate.
5215
5216 2014-06-19 Gary Benson <gbenson@redhat.com>
5217
5218 * Makefile.in (i386-dregs.o): New rule.
5219 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5220 * i386-low.c (target.h): Remove include.
5221 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5222 (DR_CONTROL_SHIFT): Likewise.
5223 (DR_CONTROL_SIZE): Likewise.
5224 (DR_RW_EXECUTE): Likewise.
5225 (DR_RW_WRITE): Likewise.
5226 (DR_RW_READ): Likewise.
5227 (DR_RW_IORW): Likewise.
5228 (DR_LEN_1): Likewise.
5229 (DR_LEN_2): Likewise.
5230 (DR_LEN_4): Likewise.
5231 (DR_LEN_8): Likewise.
5232 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5233 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5234 (DR_ENABLE_SIZE): Likewise.
5235 (DR_LOCAL_SLOWDOWN): Likewise.
5236 (DR_GLOBAL_SLOWDOWN): Likewise.
5237 (DR_CONTROL_RESERVED): Likewise.
5238 (I386_DR_CONTROL_MASK): Likewise.
5239 (I386_DR_VACANT): Likewise.
5240 (I386_DR_LOCAL_ENABLE): Likewise.
5241 (I386_DR_GLOBAL_ENABLE): Likewise.
5242 (I386_DR_DISABLE): Likewise.
5243 (I386_DR_SET_RW_LEN): Likewise.
5244 (I386_DR_GET_RW_LEN): Likewise.
5245 (I386_DR_WATCH_HIT): Likewise.
5246 (i386_wp_op_t): Likewise.
5247 (i386_show_dr): Likewise.
5248 (i386_length_and_rw_bits): Likewise.
5249 (i386_insert_aligned_watchpoint): Likewise.
5250 (i386_remove_aligned_watchpoint): Likewise.
5251 (i386_handle_nonaligned_watchpoint): Likewise.
5252 i386_update_inferior_debug_regs(): Likewise.
5253 (i386_dr_insert_watchpoint): Likewise.
5254 (i386_dr_remove_watchpoint): Likewise.
5255 (i386_dr_region_ok_for_watchpoint): Likewise.
5256 (i386_dr_stopped_data_address): Likewise.
5257 (i386_dr_stopped_by_watchpoint): Likewise.
5258
5259 2014-06-19 Gary Benson <gbenson@redhat.com>
5260
5261 * i386-low.c (i386_dr_show): Renamed to
5262 i386_show_dr and made static. All uses updated.
5263 (i386_dr_length_and_rw_bits): Renamed to
5264 i386_length_and_rw_bits and made static.
5265 All uses updated.
5266 (i386_dr_insert_aligned_watchpoint): Renamed to
5267 i386_insert_aligned_watchpoint and made static.
5268 All uses updated.
5269 (i386_dr_remove_aligned_watchpoint): Renamed to
5270 i386_remove_aligned_watchpoint and made static.
5271 All uses updated.
5272 (i386_dr_update_inferior_debug_regs): Renamed to
5273 i386_update_inferior_debug_regs and made static.
5274 All uses updated.
5275
5276 2014-06-18 Gary Benson <gbenson@redhat.com>
5277
5278 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5279 (i386_dr_low_can_set_control): Likewise.
5280 (i386_get_debug_register_length): Likewise.
5281 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5282 (i386_dr_low_can_set_control): Likewise.
5283 (i386_get_debug_register_length): Likewise.
5284
5285 2014-06-17 Gary Benson <gbenson@redhat.com>
5286
5287 * i386-low.h (i386-dregs.h): New include.
5288 (DR_FIRSTADDR): Now in i386-dregs.h.
5289 (DR_LASTADDR): Likewise.
5290 (DR_NADDR): Likewise.
5291 (DR_STATUS): Likewise.
5292 (DR_CONTROL): Likewise.
5293 (i386_debug_reg_state): Likewise.
5294 (i386_dr_insert_watchpoint): Likewise.
5295 (i386_dr_remove_watchpoint): Likewise.
5296 (i386_dr_region_ok_for_watchpoint): Likewise.
5297 (i386_dr_stopped_data_address): Likewise.
5298 (i386_dr_stopped_by_watchpoint): Likewise.
5299 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5300
5301 2014-06-18 Gary Benson <gbenson@redhat.com>
5302
5303 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5304 i386_dr_insert_watchpoint.
5305 (i386_low_remove_watchpoint): Renamed to
5306 i386_dr_remove_watchpoint.
5307 (i386_low_region_ok_for_watchpoint): Renamed to
5308 i386_dr_region_ok_for_watchpoint.
5309 (i386_low_stopped_data_address): Renamed to
5310 i386_dr_stopped_data_address.
5311 (i386_low_stopped_by_watchpoint): Renamed to
5312 i386_dr_stopped_by_watchpoint.
5313 * i386-low.c (i386_show_dr): Renamed to
5314 i386_dr_show and made nonstatic. All uses updated.
5315 (i386_length_and_rw_bits): Renamed to
5316 i386_dr_length_and_rw_bits and made nonstatic.
5317 All uses updated.
5318 (i386_insert_aligned_watchpoint): Renamed to
5319 i386_dr_insert_aligned_watchpoint and made nonstatic.
5320 All uses updated.
5321 (i386_remove_aligned_watchpoint): Renamed to
5322 i386_dr_remove_aligned_watchpoint and made nonstatic.
5323 All uses updated.
5324 (i386_update_inferior_debug_regs): Renamed to
5325 i386_dr_update_inferior_debug_regs and made nonstatic.
5326 All uses updated.
5327 (i386_low_insert_watchpoint): Renamed to
5328 i386_dr_insert_watchpoint. All uses updated.
5329 (i386_low_remove_watchpoint): Renamed to
5330 i386_dr_remove_watchpoint. All uses updated.
5331 (i386_low_region_ok_for_watchpoint): Renamed to
5332 i386_dr_region_ok_for_watchpoint. All uses updated.
5333 (i386_low_stopped_data_address): Renamed to
5334 i386_dr_stopped_data_address. All uses updated.
5335 (i386_low_stopped_by_watchpoint): Renamed to
5336 i386_dr_stopped_by_watchpoint. All uses updated.
5337
5338 2014-06-18 Gary Benson <gbenson@redhat.com>
5339
5340 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5341 (i386_dr_low_can_set_control): Likewise.
5342 (i386_insert_aligned_watchpoint): New check.
5343
5344 2014-06-18 Gary Benson <gbenson@redhat.com>
5345
5346 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5347 Renamed to state.
5348
5349 2014-06-18 Gary Benson <gbenson@redhat.com>
5350
5351 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5352 instead of fatal and error.
5353 (i386_handle_nonaligned_watchpoint): Likewise.
5354
5355 2014-06-18 Gary Benson <gbenson@redhat.com>
5356
5357 * i386-low.c (i386_get_debug_register_length): New macro.
5358 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5359 (i386_show_dr): Use debug_printf instead of fprintf. Use
5360 phex to format values.
5361
5362 2014-06-18 Gary Benson <gbenson@redhat.com>
5363
5364 * i386-low.h: Comment changes.
5365 * i386-low.c: Likewise.
5366
5367 2014-06-18 Gary Benson <gbenson@redhat.com>
5368
5369 * i386-low.c: Whitespace changes.
5370
5371 2014-06-12 Tom Tromey <tromey@redhat.com>
5372
5373 * utils.c (freeargv): Remove.
5374
5375 2014-06-12 Tom Tromey <tromey@redhat.com>
5376
5377 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5378 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5379 (parse_debug_format_options): Likewise.
5380 (gdbserver_usage): Likewise.
5381 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5382 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5383 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5384 against libiberty.
5385 ($(LIBGNU)): Depend on libiberty.
5386 (all-lib): Recurse into all subdirs.
5387 (install-only): Invoke "install" target in subdirs.
5388 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5389 targets.
5390 * configure: Rebuild.
5391 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5392 for vasprintf, vsnprintf, or gettimeofday.
5393 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5394 srv_tgtobj.
5395
5396 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5397
5398 * development.sh: Delete.
5399 * Makefile.in (config.status): Adjust dependency on development.sh.
5400 * configure.ac: Adjust development.sh source call.
5401 * configure: Regenerate.
5402
5403 2014-06-02 Pedro Alves <palves@redhat.com>
5404
5405 * ax.c (gdb_free_agent_expr): New function.
5406 * ax.h (gdb_free_agent_expr): New declaration.
5407 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5408 list.
5409 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5410 static.
5411 (clear_breakpoint_conditions_and_commands): New function.
5412 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5413 (clear_breakpoint_conditions_and_commands): New declaration.
5414
5415 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5416
5417 * linux-aarch64-low.c (asm/ptrace.h): Include.
5418
5419 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5420
5421 Fix TLS access for -static -pthread.
5422 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5423 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5424 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5425
5426 2014-05-20 Pedro Alves <palves@redhat.com>
5427
5428 * linux-aarch64-low.c (aarch64_insert_point)
5429 (aarch64_remove_point): No longer check whether the type is
5430 supported here. Adjust to new interface.
5431 (the_low_target): Install aarch64_supports_z_point_type as
5432 supports_z_point_type method.
5433 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5434 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5435 instead of a Z packet char. Adjust.
5436 (arm_supports_z_point_type): New function.
5437 (arm_insert_point, arm_remove_point): Adjust to new interface.
5438 (the_low_target): Install arm_supports_z_point_type.
5439 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5440 (cris_insert_point, cris_remove_point): Adjust to new interface.
5441 Don't check whether the type is supported here.
5442 (the_low_target): Install cris_supports_z_point_type.
5443 * linux-low.c (linux_supports_z_point_type): New function.
5444 (linux_insert_point, linux_remove_point): Adjust to new interface.
5445 * linux-low.h (struct linux_target_ops) <insert_point,
5446 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5447 raw_breakpoint pointer parameter.
5448 <supports_z_point_type>: New method.
5449 * linux-mips-low.c (mips_supports_z_point_type): New function.
5450 (mips_insert_point, mips_remove_point): Adjust to new interface.
5451 Use mips_supports_z_point_type.
5452 (the_low_target): Install mips_supports_z_point_type.
5453 * linux-ppc-low.c (the_low_target): Install NULL as
5454 supports_z_point_type method.
5455 * linux-s390-low.c (the_low_target): Install NULL as
5456 supports_z_point_type method.
5457 * linux-sparc-low.c (the_low_target): Install NULL as
5458 supports_z_point_type method.
5459 * linux-x86-low.c (x86_supports_z_point_type): New function.
5460 (x86_insert_point): Adjust to new insert_point interface. Use
5461 insert_memory_breakpoint. Adjust to new
5462 i386_low_insert_watchpoint interface.
5463 (x86_remove_point): Adjust to remove_point interface. Use
5464 remove_memory_breakpoint. Adjust to new
5465 i386_low_remove_watchpoint interface.
5466 (the_low_target): Install x86_supports_z_point_type.
5467 * lynx-low.c (lynx_target_ops): Install NULL as
5468 supports_z_point_type callback.
5469 * nto-low.c (nto_supports_z_point_type): New.
5470 (nto_insert_point, nto_remove_point): Adjust to new interface.
5471 (nto_target_ops): Install nto_supports_z_point_type.
5472 * mem-break.c: Adjust intro comment.
5473 (struct raw_breakpoint) <raw_type, size>: New fields.
5474 <inserted>: Update comment.
5475 <shlib_disabled>: Delete field.
5476 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5477 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5478 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5479 (raw_bkpt_type_to_target_hw_bp_type): New function.
5480 (find_enabled_raw_code_breakpoint_at): New function.
5481 (find_raw_breakpoint_at): New type and size parameters. Use them.
5482 (insert_memory_breakpoint): New function, based off
5483 set_raw_breakpoint_at.
5484 (remove_memory_breakpoint): New function.
5485 (set_raw_breakpoint_at): Reimplement.
5486 (set_breakpoint): New, based on set_breakpoint_at.
5487 (set_breakpoint_at): Reimplement.
5488 (delete_raw_breakpoint): Go through the_target->remove_point
5489 instead of assuming memory breakpoints.
5490 (find_gdb_breakpoint_at): Delete.
5491 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5492 (find_gdb_breakpoint): New function.
5493 (set_gdb_breakpoint_at): Delete.
5494 (z_type_supported): New function.
5495 (set_gdb_breakpoint_1): New function, loosely based off
5496 set_gdb_breakpoint_at.
5497 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5498 (delete_gdb_breakpoint_at): Delete.
5499 (delete_gdb_breakpoint_1): New function, loosely based off
5500 delete_gdb_breakpoint_at.
5501 (delete_gdb_breakpoint): New function.
5502 (clear_gdb_breakpoint_conditions): Rename to ...
5503 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5504 breakpoint.
5505 (add_condition_to_breakpoint): Make static.
5506 (add_breakpoint_condition): Take a struct breakpoint pointer
5507 instead of an address. Adjust.
5508 (gdb_condition_true_at_breakpoint): Rename to ...
5509 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5510 z_type parameter.
5511 (gdb_condition_true_at_breakpoint): Reimplement.
5512 (add_breakpoint_commands): Take a struct breakpoint pointer
5513 instead of an address. Adjust.
5514 (gdb_no_commands_at_breakpoint): Rename to ...
5515 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5516 parameter. Return true if no breakpoint was found. Change debug
5517 output.
5518 (gdb_no_commands_at_breakpoint): Reimplement.
5519 (run_breakpoint_commands): Rename to ...
5520 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5521 and change return type to boolean.
5522 (run_breakpoint_commands): New function.
5523 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5524 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5525 breakpoint. Go through the_target->remove_point instead of
5526 assuming memory breakpoint.
5527 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5528 software and hardware breakpoints.
5529 (reinsert_raw_breakpoint): Go through the_target->insert_point
5530 instead of assuming memory breakpoint.
5531 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5532 software and hardware breakpoints.
5533 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5534 Check both software and hardware breakpoints.
5535 (validate_inserted_breakpoint): Assert the breakpoint is a
5536 software breakpoint. Set the inserted flag to -1 instead of
5537 setting shlib_disabled.
5538 (delete_disabled_breakpoints): Adjust.
5539 (validate_breakpoints): Only validate software breakpoints.
5540 Adjust to inserted flag change.
5541 (check_mem_read, check_mem_write): Skip breakpoint types other
5542 than software breakpoints. Adjust to inserted flag change.
5543 * mem-break.h (enum raw_bkpt_type): New enum.
5544 (raw_breakpoint, struct process_info): Forward declare.
5545 (Z_packet_to_target_hw_bp_type): Delete declaration.
5546 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5547 (set_gdb_breakpoint, delete_gdb_breakpoint)
5548 (clear_breakpoint_conditions): New declarations.
5549 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5550 (breakpoint_inserted_here): Update comment.
5551 (add_breakpoint_condition, add_breakpoint_commands): Replace
5552 address parameter with a breakpoint pointer parameter.
5553 (gdb_breakpoint_here): Update comment.
5554 (delete_gdb_breakpoint_at): Delete.
5555 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5556 * server.c (process_point_options): Take a struct breakpoint
5557 pointer instead of an address. Adjust.
5558 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5559 delete_gdb_breakpoint.
5560 * spu-low.c (spu_target_ops): Install NULL as
5561 supports_z_point_type method.
5562 * target.h: Include mem-break.h.
5563 (struct target_ops) <prepare_to_access_memory>: Update comment.
5564 <supports_z_point_type>: New field.
5565 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5566 instead of a char. Also take a raw breakpoint pointer.
5567 * win32-arm-low.c (the_low_target): Install NULL as
5568 supports_z_point_type.
5569 * win32-i386-low.c (i386_supports_z_point_type): New function.
5570 (i386_insert_point, i386_remove_point): Adjust to new interface.
5571 (the_low_target): Install i386_supports_z_point_type.
5572 * win32-low.c (win32_supports_z_point_type): New function.
5573 (win32_insert_point, win32_remove_point): Adjust to new interface.
5574 (win32_target_ops): Install win32_supports_z_point_type.
5575 * win32-low.h (struct win32_target_ops):
5576 <supports_z_point_type>: New method.
5577 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5578 instead of a char. Also take a raw breakpoint pointer.
5579
5580 2014-05-20 Pedro Alves <palves@redhat.com>
5581
5582 * mem-break.h: Include break-common.h.
5583 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5584 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5585 (Z_packet_to_target_hw_bp_type): New declaration.
5586 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5587 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5588 (Z_PACKET_ACCESS_WP): Delete macros.
5589 (Z_packet_to_hw_type): Delete function.
5590 * i386-low.h: Don't include break-common.h here.
5591 (Z_packet_to_hw_type): Delete declaration.
5592 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5593 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5594 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5595 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5596 * linux-aarch64-low.c: Don't include break-common.h here.
5597 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5598 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5599 (Z_packet_to_target_hw_bp_type): Delete function.
5600 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5601 function.
5602 (mips_insert_point, mips_remove_point): Use
5603 Z_packet_to_target_hw_bp_type.
5604
5605 2014-05-20 Pedro Alves <palves@redhat.com>
5606
5607 * linux-aarch64-low.c: Include break-common.h.
5608 (enum target_point_type): Delete.
5609 (Z_packet_to_point_type): Rename to ...
5610 (Z_packet_to_target_hw_bp_type): ... this, and return a
5611 target_hw_bp_type instead.
5612 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5613 instead of an enum target_point_type.
5614 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5615 breakpoint type.
5616 (aarch64_dr_state_insert_one_point)
5617 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5618 (aarch64_handle_aligned_watchpoint)
5619 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5620 Take an enum target_hw_bp_type instead of an enum
5621 target_point_type.
5622 (aarch64_supports_z_point_type): New function.
5623 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5624 use Z_packet_to_target_hw_bp_type.
5625
5626 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5627
5628 * configure.ac: Only use -Werror by default when DEVELOPMENT
5629 is true.
5630 * configure: Regenerate.
5631
5632 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5633
5634 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5635 * linux-x86-low.c (X86_64_USER_REGS): New.
5636 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5637
5638 2014-04-28 Yao Qi <yao@codesourcery.com>
5639
5640 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5641 name.
5642
5643 2014-04-25 Pedro Alves <palves@redhat.com>
5644
5645 PR server/16255
5646 * linux-low.c (linux_attach_fail_reason_string): New function.
5647 (linux_attach_lwp): Delete.
5648 (linux_attach_lwp_1): Rename to ...
5649 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5650 argument. Remove "initial" parameter. Return int instead of
5651 void. Don't error or warn here.
5652 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5653 failure to attach to the tgid. Call warning when failing to
5654 attach to an lwp.
5655 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5656 argument. Remove "initial" parameter. Return int instead of
5657 void. Don't error or warn here.
5658 (linux_attach_fail_reason_string): New declaration.
5659 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5660 interface change. Use linux_attach_fail_reason_string.
5661
5662 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5663 Walfred Tedeschi <walfred.tedeschi@intel.com>
5664
5665 * Makefile.in: Added rules to handle new files
5666 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5667 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5668 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5669 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5670 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5671 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5672 x32-avx512-linux.o.
5673 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5674 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5675 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5676 i386/x32-avx512.xml.
5677 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5678 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5679 i386/x32-avx512-linux.xml.
5680 * i387-fp.c (num_avx512_k_registers): New constant for number
5681 of K registers.
5682 (num_avx512_zmmh_low_registers): New constant for number of
5683 lower ZMM registers (0-15).
5684 (num_avx512_zmmh_high_registers): New constant for number of
5685 higher ZMM registers (16-31).
5686 (num_avx512_ymmh_registers): New contant for number of higher
5687 YMM registers (ymm16-31 added by avx521 on x86_64).
5688 (num_avx512_xmm_registers): New constant for number of higher
5689 XMM registers (xmm16-31 added by AVX512 on x86_64).
5690 (struct i387_xsave): Add space for AVX512 registers.
5691 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5692 Add code to handle AVX512 registers.
5693 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5694 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5695 prototypei from generated file.
5696 (tdesc_amd64_avx512_linux): Likewise.
5697 (init_registers_x32_avx512_linux): Likewise.
5698 (tdesc_x32_avx512_linux): Likewise.
5699 (init_registers_i386_avx512_linux): Likewise.
5700 (tdesc_i386_avx512_linux): Likewise.
5701 (x86_64_regmap): Add AVX512 registers.
5702 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5703 mask.
5704 (initialize_low_arch): Add code to initialize AVX512 registers.
5705
5706 2014-04-23 Pedro Alves <palves@redhat.com>
5707
5708 * mem-break.c (find_gdb_breakpoint_at): Make static.
5709 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5710
5711 2014-04-23 Pedro Alves <palves@redhat.com>
5712
5713 * i386-low.c: Don't include break-common.h here.
5714 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5715 prototype to take target_hw_bp_type as argument instead of a Z
5716 packet char.
5717 * i386-low.h: Include break-common.h here.
5718 (Z_packet_to_hw_type): Declare.
5719 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5720 prototypes.
5721 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5722 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5723 (x86_remove_point): Convert the packet number to a
5724 target_hw_bp_type before calling i386_low_remove_watchpoint.
5725 * win32-i386-low.c (i386_insert_point): Convert the packet number
5726 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5727 (i386_remove_point): Convert the packet number to a
5728 target_hw_bp_type before calling i386_low_remove_watchpoint.
5729
5730 2014-04-23 Pedro Alves <palves@redhat.com>
5731
5732 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5733
5734 2014-04-10 Pedro Alves <palves@redhat.com>
5735
5736 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5737 Check if the condition or command is NULL before checking if the
5738 breakpoint is known. On success, return true.
5739 * mem-break.h (add_breakpoint_condition): Document return.
5740 (add_breakpoint_commands): Add describing comment.
5741 * server.c (skip_to_semicolon): New function.
5742 (process_point_options): Use it.
5743
5744 2014-04-09 Pedro Alves <palves@redhat.com>
5745
5746 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5747 to lwpid_of.
5748
5749 2014-02-27 Pedro Alves <palves@redhat.com>
5750
5751 PR 12702
5752 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5753 macros.
5754 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5755 output.
5756 (last_thread_of_process_p): Take a PID argument instead of a
5757 thread pointer.
5758 (linux_wait_for_lwp): Delete.
5759 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5760 functions.
5761 (linux_low_filter_event): New function, party factored out from
5762 linux_wait_for_event.
5763 (linux_wait_for_event): Rename to ...
5764 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5765 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5766 sigsuspend. Check for zombie leaders.
5767 (linux_wait_for_event): Reimplement as wrapper around
5768 linux_wait_for_event_filtered.
5769 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5770 a normal or signal exit is seen, it's the whole process exiting.
5771 (wait_for_sigstop): No longer a for_each_inferior callback.
5772 Rewrite on top of linux_wait_for_event_filtered.
5773 (stop_all_lwps): Call wait_for_sigstop directly.
5774 * server.c (resume, handle_target_event): Handle
5775 TARGET_WAITKIND_NO_RESUMED.
5776
5777 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5778
5779 * win32-low.c (psapi_get_dll_name,
5780 * win32_CreateToolhelp32Snapshot): Delete.
5781 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5782 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5783 Delete.
5784 (handle_load_dll): Add function description.
5785 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5786
5787 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5788
5789 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5790 Add comment.
5791 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5792 base address when calling win32_add_one_solib.
5793 (handle_load_dll): Delete local variable load_addr.
5794 Remove 0x1000 offset applied to DLL base address when calling
5795 win32_add_one_solib.
5796 (handle_unload_dll): Add comment.
5797
5798 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5799
5800 * win32-low.c (win32_add_all_dlls): Renames
5801 win32_ensure_ntdll_loaded. Rewrite function documentation.
5802 Adjust implementation to always load all DLLs.
5803 Add 0x1000 offset to DLL base address when calling
5804 win32_add_one_solib.
5805 (child_initialization_done): New static global.
5806 (do_initial_child_stuff): Set child_initialization_done to
5807 zero during child initialization, and 1 after. Replace call
5808 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5809 Add comment.
5810 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5811 (handle_unload_dll): Add function documentation.
5812 (get_child_debug_event): Ignore load and unload DLL events
5813 during child initialization.
5814
5815 2014-02-20 Doug Evans <dje@google.com>
5816
5817 Remove global all_lwps.
5818 * inferiors.h (ptid_of): Move here from linux-low.h.
5819 (pid_of, lwpid_of): Ditto.
5820 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5821 parameter is a struct thread_info * now.
5822 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5823 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5824 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5825 directly.
5826 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5827 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5828 * linux-arm-low.c (update_registers_callback): Update, "entry"
5829 parameter is a struct thread_info * now.
5830 Fetch lwpid from current_inferior directly.
5831 (arm_insert_point): Pass &all_threads to find_inferior instead of
5832 &all_lwps.
5833 (arm_remove_point): Ditto.
5834 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5835 (arm_prepare_to_resume): Fetch pid from thread.
5836 (arm_read_description): Fetch lwpid from current_inferior directly.
5837 * linux-low.c (all_lwps): Delete.
5838 (delete_lwp): Delete call to remove_inferior.
5839 (handle_extended_wait): Fetch lwpid from thread.
5840 (add_lwp): Don't set lwp->entry.id. Remove call to
5841 add_inferior_to_list.
5842 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5843 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5844 (kill_one_lwp_callback): Ditto.
5845 (linux_kill): Don't dereference NULL pointer.
5846 Fetch ptid,lwpid from thread.
5847 (get_detach_signal): Fetch ptid from thread.
5848 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5849 Simplify call to regcache_invalidate_thread.
5850 (delete_lwp_callback): Update, "entry" parameter is a
5851 struct thread_info * now. Fetch pid from thread.
5852 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5853 (status_pending_p_callback): Update, "entry" parameter is a
5854 struct thread_info * now. Fetch ptid from thread.
5855 (find_lwp_pid): Update, "entry" parameter is a
5856 struct thread_info * now.
5857 (linux_wait_for_lwp): Fetch pid from thread.
5858 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5859 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5860 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5861 (dequeue_one_deferred_signal): Ditto.
5862 (cancel_breakpoint): Fetch ptid from current_inferior.
5863 (linux_wait_for_event): Pass &all_threads to find_inferior,
5864 not &all_lwps. Fetch ptid, lwpid from thread.
5865 (count_events_callback): Update, "entry" parameter is a
5866 struct thread_info * now.
5867 (select_singlestep_lwp_callback): Ditto.
5868 (select_event_lwp_callback): Ditto.
5869 (cancel_breakpoints_callback): Ditto.
5870 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5871 not &all_lwps.
5872 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5873 (unsuspend_one_lwp): Update, "entry" parameter is a
5874 struct thread_info * now.
5875 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5876 not &all_lwps.
5877 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5878 Fetch lwpid from thread, not lwp.
5879 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5880 Pass &all_threads to find_inferior, not &all_lwps.
5881 (send_sigstop): Fetch lwpid from thread, not lwp.
5882 (send_sigstop_callback): Update, "entry" parameter is a
5883 struct thread_info * now.
5884 (suspend_and_send_sigstop_callback): Ditto.
5885 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5886 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5887 struct thread_info * now.
5888 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5889 from thread, lwp.
5890 (lwp_running): Update, "entry" parameter is a
5891 struct thread_info * now.
5892 (stop_all_lwps): Fetch ptid from thread.
5893 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5894 (linux_resume_one_lwp): Fetch lwpid from thread.
5895 (linux_set_resume_request): Update, "entry" parameter is a
5896 struct thread_info * now. Fetch pid, lwpid from thread.
5897 (resume_status_pending_p): Update, "entry" parameter is a
5898 struct thread_info * now.
5899 (need_step_over_p): Ditto. Fetch lwpid from thread.
5900 (start_step_over): Fetch lwpid from thread.
5901 (linux_resume_one_thread): Update, "entry" parameter is a
5902 struct thread_info * now. Fetch lwpid from thread.
5903 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5904 (proceed_one_lwp): Update, "entry" parameter is a
5905 struct thread_info * now. Fetch lwpid from thread.
5906 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5907 struct thread_info * now.
5908 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5909 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5910 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5911 directly.
5912 (regsets_store_inferior_registers): Ditto.
5913 (fetch_register, store_register): Ditto.
5914 (linux_read_memory, linux_write_memory): Ditto.
5915 (linux_request_interrupt): Ditto.
5916 (linux_read_auxv): Ditto.
5917 (linux_xfer_siginfo): Ditto.
5918 (linux_qxfer_spu): Ditto.
5919 (linux_qxfer_libraries_svr4): Ditto.
5920 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5921 moved to inferiors.h.
5922 (get_lwp): Delete.
5923 (get_thread_lwp): Update.
5924 (struct lwp_info): Delete member "entry". Simplify comment for
5925 member "thread".
5926 (all_lwps): Delete.
5927 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5928 current_inferior directly.
5929 (update_watch_registers_callback): Update, "entry" parameter is a
5930 struct thread_info * now. Fetch pid from thread.
5931 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5932 (mips_insert_point): Fetch lwpid from current_inferior.
5933 Pass &all_threads to find_inferior, not &all_lwps.
5934 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5935 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5936 directly.
5937 (mips_stopped_data_address): Ditto.
5938 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5939 directly.
5940 * linux-tile-low.c (tile_arch_setup): Ditto.
5941 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5942 (update_debug_registers_callback): Update, "entry" parameter is a
5943 struct thread_info * now. Fetch pid from thread.
5944 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5945 Pass &all_threads to find_inferior, not &all_lwps.
5946 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5947 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5948 Pass &all_threads to find_inferior, not &all_lwps.
5949 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5950 (i386_dr_low_get_status): Ditto.
5951 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5952 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5953 (x86_linux_read_description): Ditto.
5954 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5955
5956 2014-02-20 Doug Evans <dje@google.com>
5957
5958 * inferiors.c (get_first_inferior): Fix buglet.
5959
5960 2014-02-19 Doug Evans <dje@google.com>
5961
5962 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5963 * inferiors.c (add_thread): Change result type to struct thread_info *.
5964 All callers updated.
5965 (add_lwp): Call add_thread here instead of in callers.
5966 All callers updated.
5967 * linux-low.h (get_lwp_thread): Rewrite.
5968 (struct lwp_info): New member "thread".
5969
5970 2014-02-19 Doug Evans <dje@google.com>
5971
5972 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5973 All callers updated.
5974
5975 2014-02-19 Doug Evans <dje@google.com>
5976
5977 * inferiors.c (add_thread): Fix whitespace.
5978
5979 2014-02-19 Doug Evans <dje@google.com>
5980
5981 * dll.c (clear_dlls): Replace accessing list implemention details
5982 with API function.
5983 * gdbthread.h (get_first_thread): Declare.
5984 * inferiors.c (for_each_inferior_with_data): New function.
5985 (get_first_thread): New function.
5986 (find_thread_ptid): Simplify.
5987 (get_first_inferior): New function.
5988 (clear_list): Delete.
5989 (one_inferior_p): New function.
5990 (clear_inferior_list): New function.
5991 (clear_inferiors): Update.
5992 * inferiors.h (for_each_inferior_with_data): Declare.
5993 (clear_inferior_list): Declare.
5994 (one_inferior_p): Declare.
5995 (get_first_inferior): Declare.
5996 * linux-low.c (linux_wait_for_event): Replace accessing list
5997 implemention details with API function.
5998 * server.c (target_running): Ditto.
5999 (accumulate_file_name_length): New function.
6000 (emit_dll_description): New function.
6001 (handle_qxfer_libraries): Replace accessing list implemention
6002 details with API function.
6003 (handle_qxfer_threads_worker): New function.
6004 (handle_qxfer_threads_proper): Replace accessing list implemention
6005 details with API function.
6006 (handle_query): Ditto.
6007 (visit_actioned_threads_callback_ftype): New typedef.
6008 (visit_actioned_threads_data): New struct.
6009 (visit_actioned_threads): Rewrite to be find_inferior callback.
6010 (resume): Call find_inferior.
6011 (handle_status): Replace accessing list implemention
6012 details with API function.
6013 (process_serial_event): Replace accessing list implemention details
6014 with API function.
6015 * target.c (set_desired_inferior): Replace accessing list implemention
6016 details with API function.
6017 * tracepoint.c (same_process_p): New function.
6018 (gdb_agent_about_to_close): Replace accessing list implemention
6019 details with API function.
6020 * win32-low.c (child_delete_thread): Replace accessing list
6021 implemention details with API function.
6022 (match_dll_by_basename): New function.
6023 (dll_is_loaded_by_basename): New function.
6024 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6025 details call to dll_is_loaded_by_basename.
6026
6027 2014-02-19 Doug Evans <dje@google.com>
6028
6029 * dll.h (struct dll_info): Add comment.
6030 * gdbthread.h (struct thread_info): Add comment.
6031 (current_ptid): Simplify.
6032 * inferiors.c (add_process): Update.
6033 (remove_process): Update.
6034 * inferiors.h (struct process_info): Rename member "head" to "entry".
6035 * linux-low.c (delete_lwp): Update.
6036 (add_lwp): Update.
6037 (last_thread_of_process_p): Update.
6038 (kill_one_lwp_callback, linux_kill): Update.
6039 (status_pending_p_callback): Update.
6040 (wait_for_sigstop): Update. Simplify read of ptid.
6041 (start_step_over): Update.
6042 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6043 (get_lwp_thread): Update.
6044 (struct lwp_info): Rename member "head" to "entry".
6045 * regcache.h (inferior_list_entry): Delete.
6046 * server.c (kill_inferior_callback): Update.
6047 (detach_or_kill_inferior_callback): Update.
6048 (print_started_pid): Update.
6049 (print_attached_pid): Update.
6050 (process_serial_event): Simplify read of ptid.
6051 * thread-db.c (thread_db_create_event): Update.
6052 (thread_db_get_tls_address): Update.
6053 * win32-low.c (current_inferior_ptid): Simplify.
6054
6055 2014-02-19 Tom Tromey <tromey@redhat.com>
6056
6057 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6058 argument.
6059 (target_supports_btrace): Update.
6060
6061 2014-02-14 Yao Qi <yao@codesourcery.com>
6062
6063 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6064 (rsp-low-ipa.o): New target.
6065
6066 2014-02-12 Tom Tromey <tromey@redhat.com>
6067
6068 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6069 convert_ascii_to_int.
6070 * regcache.c (registers_to_string): Likewise.
6071 * remote-utils.c (decode_M_packet): Likewise.
6072 * server.c (process_serial_event): Likewise.
6073
6074 2014-02-12 Tom Tromey <tromey@redhat.com>
6075
6076 * server.c (handle_query, handle_v_run): Use hex2bin, not
6077 unhexify.
6078 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6079
6080 2014-02-12 Tom Tromey <tromey@redhat.com>
6081
6082 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6083 convert_int_to_ascii.
6084 * regcache.c (registers_to_string, collect_register_as_string):
6085 Likewise.
6086 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6087 Likewise.
6088 * server.c (process_serial_event): Likewise.
6089 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6090 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6091
6092 2014-02-12 Tom Tromey <tromey@redhat.com>
6093
6094 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6095 bin2hex, not hexify.
6096 * tracepoint.c (cmd_qtstatus): Likewise.
6097
6098 2014-02-12 Tom Tromey <tromey@redhat.com>
6099
6100 * remote-utils.c (monitor_output): Pass explicit length to
6101 hexify.
6102
6103 2014-02-12 Tom Tromey <tromey@redhat.com>
6104
6105 * tracepoint.c: Include rsp-low.h.
6106 * server.c: Include rsp-low.h.
6107 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6108 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6109 declare.
6110 * remote-utils.c: Include rsp-low.h.
6111 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6112 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6113 (convert_int_to_ascii, convert_ascii_to_int): Move to
6114 common/rsp-low.c.
6115 * regcache.c: Include rsp-low.h.
6116 * ax.c: Include rsp-low.h.
6117 * Makefile.in (SFILES): Add common/rsp-low.c.
6118 (OBS): Add rsp-low.o.
6119 (rsp-low.o): New target.
6120
6121 2014-02-12 Tom Tromey <tromey@redhat.com>
6122
6123 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6124 Include print-utils.h.
6125 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6126 (plongest, thirty_two, phex_nz): Remove.
6127 * Makefile.in (SFILES): Add common/print-utils.c.
6128 (OBS): Add print-utils.o.
6129 (print-utils-ipa.o): New target.
6130 (print-utils.o): New target.
6131 (IPA_OBJS): Add print-utils-ipa.o.
6132
6133 2014-02-06 Tom Tromey <tromey@redhat.com>
6134
6135 * Makefile.in (SFILES): Fix indentation.
6136
6137 2014-02-05 Doug Evans <dje@google.com>
6138
6139 * linux-low.c (linux_wait_for_event): Improve comment.
6140 (linux_wait_1): Keep current_inferior in sync with event_child.
6141
6142 2014-01-22 Doug Evans <dje@google.com>
6143
6144 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6145
6146 2014-01-22 Doug Evans <dje@google.com>
6147
6148 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6149 * configure: Regenerate.
6150 * config.in: Regenerate.
6151 * Makefile.in (SFILES): Add debug.c.
6152 (OBS): Add debug.o.
6153 * debug.c: New file.
6154 * debug.h: New file.
6155 * linux-aarch64-low.c (*): Update all debugging printfs to use
6156 debug_printf instead of fprintf.
6157 * linux-arm-low.c (*): Ditto.
6158 * linux-cris-low.c (*): Ditto.
6159 * linux-crisv32-low.c (*): Ditto.
6160 * linux-m32r-low.c (*): Ditto.
6161 * linux-sparc-low.c (*): Ditto.
6162 * linux-x86.c (*): Ditto.
6163 * linux-low.c (*): Ditto.
6164 (linux_wait_1): Add calls to debug_enter, debug_exit.
6165 (linux_wait): Remove redundant debugging printf.
6166 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6167 (linux_resume, unstop_all_lwps): Ditto.
6168 * mem-break.c (*): Update all debugging printfs to use
6169 debug_printf instead of fprintf.
6170 * remote-utils.c (*): Ditto.
6171 * thread-db.c (*): Ditto.
6172 * server.c #include <ctype.h>, "gdb_vecs.h".
6173 (debug_threads): Moved to debug.c.
6174 (*): Update all debugging printfs to use debug_printf instead of
6175 fprintf.
6176 (start_inferior): Replace call to fflush with call to debug_flush.
6177 (monitor_show_help): Mention set debug-format.
6178 (parse_debug_format_options): New function.
6179 (handle_monitor_command): Handle "monitor set debug-format".
6180 (gdbserver_usage): Mention --debug-format.
6181 (main): Parse --debug-format.
6182 * server.h (debug_threads): Declaration moved to debug.h.
6183 #include "debug.h".
6184 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6185 trace_debug_1 that uses debug_printf.
6186 (tracepoint_look_up_symbols): Update all debugging printfs to use
6187 debug_printf instead of fprintf.
6188
6189 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6190
6191 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6192 sys/ptrace.h.
6193
6194 2014-01-17 Pedro Alves <palves@redhat.com>
6195
6196 PR build/16445
6197 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6198 defined after including gdb_proc_service.h.
6199
6200 2014-01-16 Doug Evans <dje@google.com>
6201
6202 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6203 (match_dll): Use it.
6204
6205 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6206
6207 * target.h (target_ops) <read_btrace>: Change parameters and
6208 return type to allow error reporting.
6209 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6210 trace reading errors on.
6211 * linux-low.c (linux_low_read_btrace): Pass trace reading
6212 errors on.
6213 (linux_low_disable_btrace): New.
6214
6215 2014-01-15 Doug Evans <dje@google.com>
6216
6217 * inferiors.c (thread_id_to_gdb_id): Delete.
6218 * inferiors.h (thread_id_to_gdb_id): Delete.
6219
6220 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6221
6222 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6223 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6224 versions.
6225
6226 2014-01-08 Pedro Alves <palves@redhat.com>
6227
6228 * server.c (handle_status): Don't discard previous queued stop
6229 replies or thread's pending status here.
6230 (main) <disconnection>: Do it here instead.
6231
6232 2014-01-08 Pedro Alves <palves@redhat.com>
6233
6234 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6235 * server.c (visit_actioned_threads, handle_pending_status): New
6236 function.
6237 (handle_v_cont): Factor out parts to ...
6238 (resume): ... this new function. If in all-stop, and a thread
6239 being resumed has a pending status, report it without actually
6240 resuming.
6241 (myresume): Adjust to use the new 'resume' function.
6242 (clear_pending_status_callback, set_pending_status_callback)
6243 (find_status_pending_thread_callback): New functions.
6244 (handle_status): Handle the case of multiple threads having
6245 interesting statuses to report. Report threads' real last signal
6246 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6247 with an interesting thread to report the status for, instead of
6248 always reporting the status of the first thread.
6249
6250 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6251
6252 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6253 * gdbreplay.c (gdbreplay_version): Likewise.
6254
6255 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6256
6257 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6258 iov.iov_len with the real length in use.
6259
6260 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6261
6262 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6263 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6264 for all targets that use win32-low.c.
6265 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6266 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6267
6268 2013-12-13 Pedro Alves <palves@redhat.com>
6269
6270 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6271 if equal to TARGET_WAITKIND_LOADED.
6272 * win32-low.c (cached_status): New static global.
6273 (win32_wait): Add declaration.
6274 (do_initial_child_stuff): Flush all initial pending debug events
6275 up to the initial breakpoint.
6276 (win32_wait): If CACHED_STATUS was set, return that instead
6277 of doing a real wait. Remove the code resuming the execution
6278 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6279 during the initial phase. Also remove the code changing
6280 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6281 TARGET_WAITKIND_STOPPED.
6282
6283 2013-12-11 Yao Qi <yao@codesourcery.com>
6284
6285 * notif.c (handle_notif_ack): Return 0 if no notification
6286 matches.
6287
6288 2013-11-20 Doug Evans <dje@google.com>
6289
6290 * linux-low.c (linux_set_resume_request): Fix comment.
6291
6292 2013-11-20 Doug Evans <dje@google.com>
6293
6294 * linux-low.c (resume_status_pending_p): Tweak comment.
6295
6296 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6297
6298 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6299 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6300 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6301 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6302 (srv_amd64_regobj): Add amd64-mpx.o.
6303 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6304 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6305 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6306 * i387-fp.c (num_pl_bnd_register) Added constant.
6307 (num_pl_bnd_cfg_registers) Added constant.
6308 (struct i387_xsave) Added reserved area and MPX fields.
6309 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6310 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6311 function.
6312 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6313 (init_registers_amd64_mpx_linux): Declare new function.
6314 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6315 (x86_64_regmap): Add MPX registers.
6316 (x86_linux_read_description): Add MPX case.
6317 (initialize_low_arch): Initialize MPX targets.
6318
6319 2013-11-18 Tom Tromey <tromey@redhat.com>
6320
6321 * configure: Rebuild.
6322 * configure.ac: Don't check for stdlib.h.
6323 * gdbreplay.c: Unconditionally include stdlib.h.
6324
6325 2013-11-18 Tom Tromey <tromey@redhat.com>
6326
6327 * config.in: Rebuild.
6328 * configure: Rebuild.
6329 * configure.ac: Don't use AC_HEADER_DIRENT.
6330
6331 2013-11-18 Tom Tromey <tromey@redhat.com>
6332
6333 * server.h: Don't check HAVE_STRING_H.
6334 * gdbreplay.c: Don't check HAVE_STRING_H.
6335 * configure: Rebuild.
6336
6337 2013-11-18 Tom Tromey <tromey@redhat.com>
6338
6339 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6340 LIBGNU.
6341
6342 2013-11-08 Tom Tromey <tromey@redhat.com>
6343
6344 * configure, config.in: Rebuild.
6345 * configure.ac: Remove unused configury.
6346
6347 2013-11-08 Tom Tromey <tromey@redhat.com>
6348
6349 * acinclude.m4: Include common.m4, codeset.m4.
6350 * configure, config.in: Rebuild.
6351 * configure.ac: Use GDB_AC_COMMON.
6352
6353 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6354
6355 * linux-s390-low.c (HWCAP_S390_TE): New define.
6356 (s390_arch_setup): Consider the TE field in the HWCAP for
6357 determining 'have_regset_tdb'.
6358
6359 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6360
6361 PR gdb/16014
6362 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6363 call to sizeof.
6364
6365 2013-10-02 Pedro Alves <palves@redhat.com>
6366
6367 * server.c (process_serial_event): Don't output "GDBserver
6368 exiting" if GDB is connected through stdio.
6369 * target.c (mywait): Likewise, be silent if GDB is connected
6370 through stdio.
6371
6372 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6373
6374 * lynx-low.c (lynx_add_threads_after_attach): New function.
6375 (lynx_attach): Remove call to add_thread. Add call to
6376 lynx_add_threads_after_attach instead.
6377
6378 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6379
6380 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6381 * config.in, configure: Regenerated.
6382
6383 2013-09-18 Yao Qi <yao@codesourcery.com>
6384
6385 PR server/15959
6386 * server.c (start_inferior): Clear 'resume_info'.
6387
6388 2013-09-16 Jiong Wang <jiwang@tilera.com>
6389
6390 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6391 for each register.
6392
6393 2013-09-16 Jiong Wang <jiwang@tilera.com>
6394
6395 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6396 linux-tile-low.o to srv_tgtobj.
6397
6398 2013-09-16 Will Newton <will.newton@linaro.org>
6399
6400 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6401 out regs.
6402
6403 2013-09-06 Pedro Alves <palves@redhat.com>
6404
6405 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6406 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6407 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6408 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6409 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6410 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6411
6412 2013-09-06 Pedro Alves <palves@redhat.com>
6413
6414 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6415 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6416
6417 2013-09-06 Pedro Alves <palves@redhat.com>
6418
6419 * linux-amd64-ipa.c: Include tracepoint.h.
6420 * linux-i386-ipa.c: Include tracepoint.h.
6421
6422 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6423
6424 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6425 (ps_get_thread_area): New function.
6426
6427 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6428
6429 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6430 (initialize_low_arch): Call init_registers_crisv32 rather than
6431 init_register_crisv32.
6432
6433 2013-09-05 Pedro Alves <palves@redhat.com>
6434
6435 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6436 to ...
6437 * hostio.h: ... this new file.
6438 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6439 win32-low.c: Include hostio.h.
6440
6441 2013-09-05 Pedro Alves <palves@redhat.com>
6442
6443 * server.h (gdb_client_data, handler_func, callback_handler_func)
6444 (delete_file_handler, add_file_handler, append_callback_event)
6445 (delete_callback_event, start_event_loop, initialize_event_loop):
6446 Move to event-loop.h and include it.
6447 * event-loop.h: New file.
6448
6449 2013-09-05 Pedro Alves <palves@redhat.com>
6450
6451 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6452 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6453 (loaded_dll, unloaded_dll): Move to ...
6454 * dll.h: ... this new file.
6455 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6456
6457 2013-09-05 Pedro Alves <palves@redhat.com>
6458
6459 * server.h (current_process, get_thread_process, all_processes)
6460 (add_inferior_to_list, for_each_inferior, current_inferior)
6461 (remove_inferior, add_process, remove_process, find_process_pid)
6462 (have_started_inferiors_p, have_attached_inferiors_p)
6463 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6464 (clear_inferiors, find_inferior, find_inferior_id)
6465 (inferior_target_data, set_inferior_target_data)
6466 (inferior_regcache_data, set_inferior_regcache_data): Move to
6467 inferiors.h, and include it.
6468 * inferiors.h: New file.
6469
6470 2013-09-05 Pedro Alves <palves@redhat.com>
6471
6472 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6473 Move ...
6474 * ax.h: ... here.
6475
6476 2013-09-05 Pedro Alves <palves@redhat.com>
6477
6478 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6479 tracepoint.h.
6480 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6481 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6482 (handle_tracepoint_general_set, handle_tracepoint_query)
6483 (tracepoint_finished_step, tracepoint_was_hit)
6484 (release_while_stepping_state_list, current_traceframe)
6485 (in_readonly_region, traceframe_read_mem)
6486 (fetch_traceframe_registers, traceframe_read_sdata)
6487 (traceframe_read_info, struct fast_tpoint_collect_status)
6488 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6489 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6490 (supply_fast_tracepoint_registers)
6491 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6492 (ipa_tdesc, claim_trampoline_space)
6493 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6494 (agent_mem_read, agent_get_trace_state_variable_value)
6495 (agent_set_trace_state_variable_value, agent_tsv_read)
6496 (agent_mem_read_string, get_raw_reg_func_addr)
6497 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6498 * tracepoint.h: ... this new file.
6499
6500 2013-09-05 Pedro Alves <palves@redhat.com>
6501
6502 * server.h (perror_with_name, error, fatal, warning, paddress)
6503 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6504 include it.
6505 * utils.h: New file.
6506
6507 2013-09-05 Pedro Alves <palves@redhat.com>
6508
6509 * server.h (remote_debug, noack_mode, transport_is_reliable)
6510 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6511 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6512 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6513 (write_enn, initialize_async_io, enable_async_io)
6514 (disable_async_io, check_remote_input_interrupt_request)
6515 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6516 (dead_thread_notify, prepare_resume_reply)
6517 (decode_address_to_semicolon, decode_address, decode_m_packet)
6518 (decode_M_packet, decode_X_packet, decode_xfer_write)
6519 (decode_search_memory_packet, unhexify, hexify)
6520 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6521 (look_up_one_symbol, relocate_instruction)
6522 (monitor_output): Move to remote-utils.h, and include it.
6523 * remote-utils.h: New file.
6524
6525 2013-09-05 Pedro Alves <palves@redhat.com>
6526
6527 * server.h (_): Delete.
6528
6529 2013-09-02 Pedro Alves <palves@redhat.com>
6530
6531 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6532 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6533 allocated.
6534 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6535
6536 2013-09-02 Pierre Muller <muller@sourceware.org>
6537
6538 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6539 or WriteProcessMemory complete successfully and handle
6540 ERROR_PARTIAL_COPY error.
6541
6542 2013-09-02 Pedro Alves <palves@redhat.com>
6543
6544 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6545 error instead of EIO.
6546
6547 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6548
6549 PR server/15604
6550 * linux-low.c: Include filestuff.h.
6551 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6552 * lynx-low.c: Include filestuff.h.
6553 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6554 * server.c: Include filestuff.h.
6555 (main): Call notice_open_fds.
6556 * spu-low.c: Include filestuff.h.
6557 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6558
6559 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6560
6561 * Makefile.in: Explain why ../target and ../nat are not
6562 listed as include file search paths.
6563 (linux-waitpid.o): New object file rule.
6564 * configure.srv (srv_native_linux_obj): New variable.
6565 Replace all occurrences of linux native object files with
6566 $srv_native_linux_obj.
6567 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6568 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6569 (linux_enable_event_reporting): Remove declaration.
6570 (my_waitpid): Moved to common/linux-waitpid.c.
6571 (linux_wait_for_event): Pass ptid when calling
6572 linux_enable_event_reporting.
6573 (linux_supports_tracefork_flag): Remove.
6574 (linux_enable_event_reporting): Likewise.
6575 (linux_tracefork_grandchild): Remove.
6576 (STACK_SIZE): Moved to common/linux-ptrace.c.
6577 (linux_tracefork_child): Remove.
6578 (linux_test_for_tracefork): Remove.
6579 (linux_look_up_symbols): Call linux_supports_traceclone.
6580 (initialize_low): Remove call to linux_test_for_tracefork.
6581 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6582 common/linux-ptrace.h.
6583 (PTRACE_TYPE_ARG4): Likewise.
6584 Include linux-ptrace.h.
6585
6586 2013-08-21 Pedro Alves <palves@redhat.com>
6587
6588 * config.in: Renegerate.
6589
6590 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6591
6592 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6593 (SFILES): Remove $(srcdir)/common/target-common.c and
6594 add $(srcdir)/target/waitstatus.c.
6595 (OBS): Remove target-common.o and add waitstatus.o.
6596 (server_h): Remove $(srcdir)/../common/target-common.h and
6597 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6598 and $(srcdir)/../target/waitstatus.h.
6599 (target-common.o): Remove.
6600 (waitstatus.o): New target object file.
6601 * target.h: Do not include target-common.h and
6602 include target/resume.h, target/wait.h and
6603 target/waitstatus.h.
6604
6605 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6606
6607 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6608 to PTRACE_TYPE_ARG3.
6609 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6610 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6611 PTRACE_TYPE_ARG4.
6612 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6613 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6614
6615 2013-07-27 Jie Zhang <jie@codesourcery.com>
6616 Daniel Jacobowitz <dan@codesourcery.com>
6617 Yao Qi <yao@codesourcery.com>
6618
6619 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6620 (mips-linux-watch.o): New rule.
6621 (mips_linux_watch_h): New variable.
6622 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6623 srv_tgtobj.
6624 * linux-mips-low.c: Include mips-linux-watch.h.
6625 (struct arch_process_info, struct arch_lwp_info): New.
6626 (update_watch_registers_callback): New function.
6627 (mips_linux_new_process, mips_linux_new_thread) New functions.
6628 (mips_linux_prepare_to_resume, mips_insert_point): New
6629 functions.
6630 (mips_remove_point, mips_stopped_by_watchpoint): New
6631 functions.
6632 (rsp_bp_type_to_target_hw_bp_type): New function.
6633 (mips_stopped_data_address): New function.
6634 (the_low_target): Add watchpoint support functions.
6635
6636 2013-07-27 Yao Qi <yao@codesourcery.com>
6637
6638 * i386-low.c: Include break-common.h.
6639 (enum target_hw_bp_type): Remove.
6640
6641 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6642
6643 * Makefile.in (SFILES): /common/target-common.c.
6644 (OBS): Add target-common.o.
6645 (server_h): Add $(srcdir)/../common/target-common.h.
6646 (target-common.o): New target.
6647 * server.c (queue_stop_reply_callback): Free
6648 status string after use.
6649 * target.c (target_waitstatus_to_string): Remove.
6650 * target.h: Include target-common.h.
6651 (resume_kind): Likewise.
6652 (target_waitkind): Likewise.
6653 (target_waitstatus): Likewise.
6654 (TARGET_WNOHANG): Likewise.
6655
6656 2013-07-04 Yao Qi <yao@codesourcery.com>
6657
6658 * Makefile.in (host_alias): Use @host_noncanonical@.
6659 (target_alias): Use @target_noncanonical@.
6660 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6661 ACX_NONCANONICAL_HOST.
6662 * configure: Regenerated.
6663
6664 Revert:
6665 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6666
6667 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6668 * configure: Rebuild.
6669 * Makefile.in (version_host, version_target): Get from configure.
6670 (version.c): Use $(version_host) and $(version_target).
6671
6672 2013-07-03 Pedro Alves <palves@redhat.com>
6673
6674 * Makefile.in (config.status): Depend on development.sh.
6675 * acinclude.m4: Include libmcheck.m4.
6676 * configure: Regenerate.
6677
6678 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6679
6680 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6681 attribute inside the parentheses.
6682 (winapi_DebugSetProcessKillOnExit): Ditto.
6683 (winapi_DebugBreakProcess): Ditto.
6684 (winapi_GenerateConsoleCtrlEvent): Ditto.
6685
6686 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6687
6688 * notif.h (notif_event): Add a dummy member to avoid compiler
6689 errors.
6690
6691 2013-07-01 Pedro Alves <palves@redhat.com>
6692
6693 * hostio.c (HOSTIO_PATH_MAX): Define.
6694 (require_filename, handle_open, handle_unlink, handle_readlink):
6695 Use it.
6696
6697 2013-07-01 Pedro Alves <palves@redhat.com>
6698
6699 * server.h: Include "pathmax.h".
6700 * linux-low.c: Don't include sys/param.h.
6701 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6702 MAXPATHLEN.
6703 * win32-low.c: Don't include sys/param.h.
6704 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6705
6706 2013-07-01 Pedro Alves <palves@redhat.com>
6707
6708 * event-loop.c: Don't check HAVE_UNISTD_H before including
6709 <unistd.h>.
6710 * gdbreplay.c: Likewise.
6711 * remote-utils.c: Likewise.
6712 * server.c: Likewise.
6713 * configure.ac: Don't check for unistd.h.
6714 * configure: Regenerate.
6715
6716 2013-06-28 Tom Tromey <tromey@redhat.com>
6717
6718 * Makefile.in (version.c): Use version.in, not
6719 common/version.in.
6720
6721 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6722
6723 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6724 * configure: Rebuild.
6725 * Makefile.in (version_host, version_target): Get from configure.
6726 (version.c): Use $(version_host) and $(version_target).
6727
6728 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6729
6730 Fix trace-status to output user name without trailing colon.
6731 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6732
6733 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6734
6735 Fix trace-status to output proper start-time and stop-time.
6736 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6737 output start time and stop time in hex as gdb expects.
6738
6739 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6740
6741 * tracepoint.c (build_traceframe_info_xml): Output trace state
6742 variables present in the trace buffer.
6743
6744 2013-06-24 Tom Tromey <tromey@redhat.com>
6745
6746 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6747 create-version.sh.
6748 (version.o): Remove.
6749 * gdbreplay.c: Include version.h.
6750 (version, host_name): Don't declare.
6751 * server.h: Include version.h.
6752 (version, host_name): Don't declare.
6753
6754 2013-06-12 Pedro Alves <palves@redhat.com>
6755
6756 * linux-x86-low.c (linux_is_elf64): Delete global.
6757 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6758 with local linux_pid_exe_is_elf_64_file use.
6759
6760 2013-06-11 Pedro Alves <palves@redhat.com>
6761
6762 * linux-low.c (regset_disabled, disable_regset): New functions.
6763 (regsets_fetch_inferior_registers)
6764 (regsets_store_inferior_registers): Use them.
6765 (initialize_regsets_info); Don't allocate the disabled_regsets
6766 array here.
6767 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6768 comment.
6769
6770 2013-06-11 Pedro Alves <palves@redhat.com>
6771
6772 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6773 xmalloc.
6774
6775 2013-06-11 Pedro Alves <palves@redhat.com>
6776
6777 * linux-x86-low.c (initialize_low_arch): Call
6778 init_registers_x32_avx_linux.
6779
6780 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6781
6782 Fix compatibility with Android Bionic.
6783 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6784 it is not empty.
6785
6786 2013-06-07 Pedro Alves <palves@redhat.com>
6787
6788 PR server/14823
6789 * Makefile.in (OBS): Add tdesc.o.
6790 (IPA_OBJS): Add tdesc-ipa.o.
6791 (tdesc-ipa.o): New rule.
6792 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6793 interface.
6794 * linux-low.c (new_inferior): Delete.
6795 (disabled_regsets, num_regsets): Delete.
6796 (linux_add_process): Adjust to set the new per-process
6797 new_inferior flag.
6798 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6799 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6800 was a stop. When calling arch_setup, switch the current inferior
6801 to the thread that got an event.
6802 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6803 (regsets_fetch_inferior_registers)
6804 (regsets_store_inferior_registers): New regsets_info parameter.
6805 Adjust to use it.
6806 (linux_register_in_regsets): New regs_info parameter. Adjust to
6807 use it.
6808 (register_addr, fetch_register, store_register): New usrregs_info
6809 parameter. Adjust to use it.
6810 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6811 parameter regs_info. Adjust to use it.
6812 (linux_fetch_registers): Get the current inferior's regs_info, and
6813 adjust to use it.
6814 (linux_store_registers): Ditto.
6815 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6816 (initialize_low): Don't initialize the target_regsets here. Call
6817 initialize_low_arch.
6818 * linux-low.h (target_regsets): Delete declaration.
6819 (struct regsets_info): New.
6820 (struct usrregs_info): New.
6821 (struct regs_info): New.
6822 (struct process_info_private) <new_inferior>: New field.
6823 (struct linux_target_ops): Delete the num_regs, regmap, and
6824 regset_bitmap fields. New field regs_info.
6825 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6826 * i387-fp.c (num_xmm_registers): Delete.
6827 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6828 calls to new interface.
6829 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6830 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6831 Infer the number of xmm registers from the regcache's target
6832 description.
6833 * i387-fp.h (num_xmm_registers): Delete.
6834 * inferiors.c (add_thread): Don't install the thread's regcache
6835 here.
6836 * proc-service.c (gregset_info): Fetch the current inferior's
6837 regs_info. Adjust to use it.
6838 * regcache.c: Include tdesc.h.
6839 (register_bytes, reg_defs, num_registers)
6840 (gdbserver_expedite_regs): Delete.
6841 (get_thread_regcache): If the thread doesn't have a regcache yet,
6842 create one, instead of aborting gdbserver.
6843 (regcache_invalidate_one): Rename to ...
6844 (regcache_invalidate_thread): ... this.
6845 (regcache_invalidate_one): New.
6846 (regcache_invalidate): Only invalidate registers of the current
6847 process.
6848 (init_register_cache): Add target_desc parameter, and use it.
6849 (new_register_cache): Ditto. Assert the target description has a
6850 non zero registers_size.
6851 (regcache_cpy): Add assertions. Adjust.
6852 (realloc_register_cache, set_register_cache): Delete.
6853 (registers_to_string, registers_from_string): Adjust.
6854 (find_register_by_name, find_regno, find_register_by_number)
6855 (register_cache_size): Add target_desc parameter, and use it.
6856 (free_register_cache_thread, free_register_cache_thread_one)
6857 (regcache_release, register_cache_size): New.
6858 (register_size): Add target_desc parameter, and use it.
6859 (register_data, supply_register, supply_register_zeroed)
6860 (supply_regblock, supply_register_by_name, collect_register)
6861 (collect_register_as_string, collect_register_by_name): Adjust.
6862 * regcache.h (struct target_desc): Forward declare.
6863 (struct regcache) <tdesc>: New field.
6864 (init_register_cache, new_register_cache): Add target_desc
6865 parameter.
6866 (regcache_invalidate_thread): Declare.
6867 (regcache_invalidate_one): Delete declaration.
6868 (regcache_release): Declare.
6869 (find_register_by_number, register_cache_size, register_size)
6870 (find_regno): Add target_desc parameter.
6871 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6872 declarations.
6873 * remote-utils.c: Include tdesc.h.
6874 (outreg, prepare_resume_reply): Adjust.
6875 * server.c: Include tdesc.h.
6876 (gdbserver_xmltarget): Delete declaration.
6877 (get_features_xml, process_serial_event): Adjust.
6878 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6879 declare.
6880 (struct process_info) <tdesc>: New field.
6881 (ipa_tdesc): Declare.
6882 * tdesc.c: New file.
6883 * tdesc.h: New file.
6884 * tracepoint.c: Include tdesc.h.
6885 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6886 (get_context_regcache): Adjust to pass ipa_tdesc down.
6887 (do_action_at_tracepoint): Adjust to get the register cache size
6888 from the context regcache's description.
6889 (traceframe_walk_blocks): Adjust to get the register cache size
6890 from the current trace frame's description.
6891 (traceframe_get_pc): Adjust to get current trace frame's
6892 description and pass it down.
6893 (gdb_collect): Adjust to get the register cache size from the
6894 IPA's description.
6895 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6896 (gdbserver_xmltarget): Delete.
6897 (initialize_low_tracepoint): Set the ipa's target description.
6898 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6899 (initialize_low_tracepoint): Set the ipa's target description.
6900 * linux-x86-low.c: Include tdesc.h.
6901 [__x86_64__] (is_64bit_tdesc): New.
6902 (ps_get_thread_area, x86_get_thread_area): Use it.
6903 (i386_cannot_store_register): Rename to ...
6904 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6905 (i386_cannot_fetch_register): Rename to ...
6906 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6907 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6908 to new interface.
6909 (target_regsets): Rename to ...
6910 (x86_regsets): ... this.
6911 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6912 interface.
6913 (x86_siginfo_fixup): Use is_64bit_tdesc.
6914 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6915 (tdesc_x32_avx_linux, tdesc_x32_linux)
6916 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6917 Declare.
6918 (x86_linux_update_xmltarget): Delete.
6919 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6920 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6921 (AMD64_LINUX_USER64_CS): New.
6922 (x86_linux_read_description): New, based on
6923 x86_linux_update_xmltarget.
6924 (same_process_callback): New.
6925 (x86_arch_setup_process_callback): New.
6926 (x86_linux_update_xmltarget): New.
6927 (x86_regsets_info): New.
6928 (amd64_linux_regs_info): New.
6929 (i386_linux_usrregs_info): New.
6930 (i386_linux_regs_info): New.
6931 (x86_linux_regs_info): New.
6932 (x86_arch_setup): Reimplement.
6933 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6934 (x86_emit_ops): Ditto.
6935 (the_low_target): Adjust. Install x86_linux_regs_info,
6936 x86_cannot_fetch_register, and x86_cannot_store_register.
6937 (initialize_low_arch): New.
6938 * linux-ia64-low.c (tdesc_ia64): Declare.
6939 (ia64_fetch_register): Adjust.
6940 (ia64_usrregs_info, regs_info): New globals.
6941 (ia64_regs_info): New function.
6942 (the_low_target): Adjust.
6943 (initialize_low_arch): New function.
6944 * linux-sparc-low.c (tdesc_sparc64): Declare.
6945 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6946 Adjust.
6947 (sparc_arch_setup): New function.
6948 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6949 (the_low_target): Adjust.
6950 (initialize_low_arch): New function.
6951 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6952 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6953 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6954 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6955 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6956 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6957 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6958 (tdesc_powerpc_isa205_vsx64l): Declare.
6959 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6960 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6961 (ppc_set_pc, ppc_get_hwcap): Adjust.
6962 (ppc_usrregs_info): Forward declare.
6963 (!__powerpc64__) ppc_regmap_adjusted: New global.
6964 (ppc_arch_setup): Adjust to the current process'es target
6965 description.
6966 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6967 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6968 (ppc_store_evrregset): Adjust.
6969 (target_regsets): Rename to ...
6970 (ppc_regsets): ... this, and make static.
6971 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6972 (ppc_regs_info): New function.
6973 (the_low_target): Adjust.
6974 (initialize_low_arch): New function.
6975 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6976 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6977 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6978 (tdesc_s390x_linux64v2): Declare.
6979 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6980 (s390_fill_gregset, s390_store_last_break): Adjust.
6981 (target_regsets): Rename to ...
6982 (s390_regsets): ... this, and make static.
6983 (s390_get_pc, s390_set_pc): Adjust.
6984 (s390_get_hwcap): New target_desc parameter, and use it.
6985 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6986 (s390_arch_setup): Adjust to set the current process'es target
6987 description. Don't adjust the regmap.
6988 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6989 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6990 (regs_info_3264): New globals.
6991 (s390_regs_info): New function.
6992 (the_low_target): Adjust.
6993 (initialize_low_arch): New function.
6994 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6995 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6996 [__mips64] (init_registers_mips_linux)
6997 (init_registers_mips_dsp_linux): Delete defines.
6998 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6999 (have_dsp): New global.
7000 (mips_read_description): New, based on mips_arch_setup.
7001 (mips_arch_setup): Reimplement.
7002 (get_usrregs_info): New function.
7003 (mips_cannot_fetch_register, mips_cannot_store_register)
7004 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7005 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7006 (target_regsets): Rename to ...
7007 (mips_regsets): ... this, and make static.
7008 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7009 (dsp_regs_info, regs_info): New globals.
7010 (mips_regs_info): New function.
7011 (the_low_target): Adjust.
7012 (initialize_low_arch): New function.
7013 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7014 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7015 Declare.
7016 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7017 (arm_read_description): New, with bits factored from
7018 arm_arch_setup.
7019 (arm_arch_setup): Reimplement.
7020 (target_regsets): Rename to ...
7021 (arm_regsets): ... this, and make static.
7022 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7023 (arm_regs_info): New function.
7024 (the_low_target): Adjust.
7025 (initialize_low_arch): New function.
7026 * linux-m68k-low.c (tdesc_m68k): Declare.
7027 (target_regsets): Rename to ...
7028 (m68k_regsets): ... this, and make static.
7029 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7030 (m68k_regs_info): New function.
7031 (m68k_arch_setup): New function.
7032 (the_low_target): Adjust.
7033 (initialize_low_arch): New function.
7034 * linux-sh-low.c (tdesc_sharch): Declare.
7035 (target_regsets): Rename to ...
7036 (sh_regsets): ... this, and make static.
7037 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7038 (sh_regs_info, sh_arch_setup): New functions.
7039 (the_low_target): Adjust.
7040 (initialize_low_arch): New function.
7041 * linux-bfin-low.c (tdesc_bfin): Declare.
7042 (bfin_arch_setup): New function.
7043 (bfin_usrregs_info, regs_info): New globals.
7044 (bfin_regs_info): New function.
7045 (the_low_target): Adjust.
7046 (initialize_low_arch): New function.
7047 * linux-cris-low.c (tdesc_cris): Declare.
7048 (cris_arch_setup): New function.
7049 (cris_usrregs_info, regs_info): New globals.
7050 (cris_regs_info): New function.
7051 (the_low_target): Adjust.
7052 (initialize_low_arch): New function.
7053 * linux-cris-low.c (tdesc_crisv32): Declare.
7054 (cris_arch_setup): New function.
7055 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7056 (cris_regs_info): New function.
7057 (the_low_target): Adjust.
7058 (initialize_low_arch): New function.
7059 * linux-m32r-low.c (tdesc_m32r): Declare.
7060 (m32r_arch_setup): New function.
7061 (m32r_usrregs_info, regs_info): New globals.
7062 (m32r_regs_info): Adjust.
7063 (initialize_low_arch): New function.
7064 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7065 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7066 (tic6x_usrregs_info): Forward declare.
7067 (tic6x_read_description): New function, based on ...
7068 (tic6x_arch_setup): ... this. Reimplement.
7069 (target_regsets): Rename to ...
7070 (tic6x_regsets): ... this, and make static.
7071 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7072 (tic6x_regs_info): New function.
7073 (the_low_target): Adjust.
7074 (initialize_low_arch): New function.
7075 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7076 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7077 (target_regsets): Rename to ...
7078 (xtensa_regsets): ... this, and make static.
7079 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7080 globals.
7081 (xtensa_arch_setup, xtensa_regs_info): New functions.
7082 (the_low_target): Adjust.
7083 (initialize_low_arch): New function.
7084 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7085 (nios2_arch_setup): Set the current process'es tdesc.
7086 (target_regsets): Rename to ...
7087 (nios2_regsets): ... this.
7088 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7089 (nios2_regs_info): New function.
7090 (the_low_target): Adjust.
7091 (initialize_low_arch): New function.
7092 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7093 (aarch64_arch_setup): Set the current process'es tdesc.
7094 (target_regsets): Rename to ...
7095 (aarch64_regsets): ... this.
7096 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7097 (aarch64_regs_info): New function.
7098 (the_low_target): Adjust.
7099 (initialize_low_arch): New function.
7100 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7101 globals.
7102 (target_regsets): Rename to ...
7103 (tile_regsets): ... this.
7104 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7105 (tile_regs_info): New function.
7106 (tile_arch_setup): Set the current process'es tdesc.
7107 (the_low_target): Adjust.
7108 (initialize_low_arch): New function.
7109 * spu-low.c (tdesc_spu): Declare.
7110 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7111 * win32-arm-low.c (tdesc_arm): Declare.
7112 (arm_arch_setup): New function.
7113 (the_low_target): Install arm_arch_setup instead of
7114 init_registers_arm.
7115 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7116 (init_windows_x86): Rename to ...
7117 (i386_arch_setup): ... this. Set `win32_tdesc'.
7118 (the_low_target): Adjust.
7119 * win32-low.c (win32_tdesc): New global.
7120 (child_add_thread): Don't create the thread cache here.
7121 (do_initial_child_stuff): Set the new process'es tdesc.
7122 * win32-low.h (struct target_desc): Forward declare.
7123 (win32_tdesc): Declare.
7124 * lynx-i386-low.c (tdesc_i386): Declare global.
7125 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7126 * lynx-low.c (lynx_tdesc): New global.
7127 (lynx_add_process): Set the new process'es tdesc.
7128 * lynx-low.h (struct target_desc): Forward declare.
7129 (lynx_tdesc): Declare global.
7130 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7131 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7132 * nto-low.c (nto_tdesc): New global.
7133 (do_attach): Set the new process'es tdesc.
7134 * nto-low.h (struct target_desc): Forward declare.
7135 (nto_tdesc): Declare.
7136 * nto-x86-low.c (tdesc_i386): Declare.
7137 (nto_x86_arch_setup): Set `nto_tdesc'.
7138
7139 2013-06-04 Gary Benson <gbenson@redhat.com>
7140
7141 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7142 to qSupported response when appropriate.
7143 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7144 with nonzero-length annex.
7145 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7146 arguments supplied in annex.
7147
7148 2013-05-31 Doug Evans <dje@google.com>
7149
7150 PR server/15594
7151 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7152 64 bits in 64-cross-32 environment.
7153
7154 2013-05-28 Pedro Alves <palves@redhat.com>
7155
7156 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7157 (aarch64-without-fpu.c): Delete rule.
7158 * configure.srv (aarch64*-*-linux*): Remove references to
7159 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7160 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7161 declaration.
7162
7163 2013-05-24 Pedro Alves <palves@redhat.com>
7164
7165 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7166 instead of strchr/decode_address. Error if the range isn't split
7167 with a ','. Don't assume there's be a ':' in the action.
7168
7169 2013-05-23 Yao Qi <yao@codesourcery.com>
7170 Pedro Alves <palves@redhat.com>
7171
7172 * linux-low.c (lwp_in_step_range): New function.
7173 (linux_wait_1): If the thread was range stepping and stopped
7174 outside the stepping range, report the stop to GDB. Otherwise,
7175 continue stepping. Add range stepping debug output.
7176 (linux_set_resume_request): Copy the step range from the resume
7177 request to the lwp.
7178 (linux_supports_range_stepping): New.
7179 (linux_target_ops) <supports_range_stepping>: Set to
7180 linux_supports_range_stepping.
7181 * linux-low.h (struct linux_target_ops)
7182 <supports_range_stepping>: New field.
7183 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7184 * linux-x86-low.c (x86_supports_range_stepping): New.
7185 (the_low_target) <supports_range_stepping>: Set to
7186 x86_supports_range_stepping.
7187 * server.c (handle_v_cont): Handle 'r' action.
7188 (handle_v_requests): Append ";r" if the target supports range
7189 stepping.
7190 * target.h (struct thread_resume) <step_range_start,
7191 step_range_end>: New fields.
7192 (struct target_ops) <supports_range_stepping>:
7193 New field.
7194 (target_supports_range_stepping): New macro.
7195
7196 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7197
7198 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7199 confusion in comment.
7200
7201 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7202
7203 * lynx-low.c (struct process_info_private): New type.
7204 (lynx_add_process): New function.
7205 (lynx_create_inferior, lynx_attach): Replace calls to
7206 add_process by calls to lynx_add_process.
7207 (lynx_resume): If PTID is null, then try using
7208 current_process()->private->last_wait_event_ptid.
7209 Add comments.
7210 (lynx_clear_inferiors): Delete. The contents of that function
7211 has been inlined in lynx_mourn;
7212 (lynx_wait_1): Save the ptid in the process's private data.
7213 (lynx_mourn): Free the process' private data. Replace call
7214 to lynx_clear_inferiors by call to clear_inferiors.
7215
7216 2013-05-17 Yao Qi <yao@codesourcery.com>
7217
7218 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7219 the right place.
7220
7221 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7222
7223 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7224 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7225 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7226 PT_TEXT_END_ADDR guards. Update comments.
7227 (linux_target_op) <read_offsets>: Conditionally define to
7228 linux_read_offsets if the target is UCLIBC and if it defines
7229 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7230
7231 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7232 Andrew Jenner <andrew@codesourcery.com>
7233
7234 * Makefile.in (SFILES): Add linux-nios2-low.c.
7235 (clean): Add action to delete nios2-linux.c.
7236 (nios2-linux.c): New rule.
7237 * configure.srv: Add nios2*-*-linux*.
7238 * linux-nios2-low.c: New.
7239
7240 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7241
7242 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7243
7244 2013-04-25 Hui Zhu <hui@codesourcery.com>
7245
7246 PR gdb/15186
7247 * ax.c (ax_printf): Add fflush.
7248
7249 2013-04-22 Tom Tromey <tromey@redhat.com>
7250
7251 * Makefile.in (SFILES): Add filestuff.c.
7252 (OBS): Add filestuff.o.
7253 (filestuff.o): New target.
7254 * config.in, configure: Rebuild.
7255 * configure.ac: Check for fdwalk, pipe2.
7256
7257 2013-04-17 Pedro Alves <palves@redhat.com>
7258
7259 * configure.ac (USE_THREAD_DB): Delete variable.
7260 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7261 Don't AC_SUBST USE_THREAD_DB.
7262 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7263 * config.in, configure: Regenerate.
7264
7265 2013-04-16 Pedro Alves <palves@redhat.com>
7266
7267 * linux-low.h (struct lwp_info) <thread_known>: Move under
7268 the USE_THREAD_DB #ifdef.
7269
7270 2013-04-16 Pedro Alves <palves@redhat.com>
7271
7272 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7273 (linux-low.o): Delete rule.
7274 * linux-low.h: Always include "gdb_thread_db.h" instead of
7275 conditionally including thread_db.h.
7276 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7277 HAVE_THREAD_DB_H.
7278
7279 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7280
7281 * Makefile.in (install-only): Fix make install regression.
7282
7283 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7284
7285 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7286 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7287 installation.
7288 * gdbserver.1: Remove.
7289
7290 2013-03-22 Pedro Alves <palves@redhat.com>
7291
7292 * linux-low.c (handle_extended_wait): Don't call
7293 linux_enable_event_reporting.
7294
7295 2013-03-15 Tony Theodore <tonyt@logyst.com>
7296
7297 PR build/9098:
7298 * Makefile.in (SHELL): Use @SHELL@.
7299
7300 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7301
7302 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7303 compiler warning.
7304
7305 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7306
7307 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7308 Remove extraneous NULL element.
7309
7310 2013-03-13 Yao Qi <yao@codesourcery.com>
7311
7312 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7313 'V' block in trace frame.
7314
7315 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7316
7317 * target.h (struct target_ops): Add btrace ops.
7318 (target_supports_btrace): New macro.
7319 (target_enable_btrace): New macro.
7320 (target_disable_btrace): New macro.
7321 (target_read_btrace): New macro.
7322 * gdbthread.h (struct thread_info): Add btrace field.
7323 * server.c: Include btrace-common.h.
7324 (handle_btrace_general_set): New function.
7325 (handle_btrace_enable): New function.
7326 (handle_btrace_disable): New function.
7327 (handle_general_set): Call handle_btrace_general_set.
7328 (handle_qxfer_btrace): New function.
7329 (struct qxfer qxfer_packets[]): Add btrace entry.
7330 * inferiors.c (remove_thread): Disable btrace.
7331 * linux-low: Include linux-btrace.h.
7332 (linux_low_enable_btrace): New function.
7333 (linux_low_read_btrace): New function.
7334 (linux_target_ops): Add btrace ops.
7335 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7336 Add srv_linux_btrace=yes.
7337 (x86_64-*-linux*): Add linux-btrace.o.
7338 Add srv_linux_btrace=yes.
7339 * configure.ac: Define HAVE_LINUX_BTRACE.
7340 * config.in: Regenerated.
7341 * configure: Regenerated.
7342
7343 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7344
7345 * server.c (handle_qxfer): Preserve error message if -3 is
7346 returned.
7347 (qxfer): Document the -3 return value.
7348
7349 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7350
7351 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7352 (linux_btrace_h): New variable.
7353 (linux-btrace.o): New rule.
7354
7355 2013-03-08 Stan Shebs <stan@codesourcery.com>
7356 Hafiz Abid Qadeer <abidh@codesourcery.com>
7357
7358 * tracepoint.c (trace_buffer_size): New global.
7359 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7360 (init_trace_buffer): Change to one-argument function. Allocate
7361 trace buffer memory.
7362 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7363 handle QTBuffer:size packet.
7364 (cmd_bigqtbuffer_size): New function.
7365 (initialize_tracepoint): Call init_trace_buffer with
7366 DEFAULT_TRACE_BUFFER_SIZE.
7367 * server.c (handle_query): Add QTBuffer:size in the
7368 supported packets.
7369
7370 2013-03-07 Yao Qi <yao@codesourcery.com>
7371
7372 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7373 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7374 of -1.
7375 (cmd_qtsp): Adjust condition. Do post increment.
7376 Set cur_action and cur_step_action back to 0.
7377
7378 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7379
7380 PR server/15236
7381 * linux-low.c (linux_write_memory): Return early success if LEN is
7382 zero.
7383
7384 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7385
7386 * configure.srv: Add x86_64-*-cygwin* as target.
7387
7388 2013-02-28 Tom Tromey <tromey@redhat.com>
7389
7390 * configure.ac: Invoke AC_SYS_LARGEFILE.
7391 * configure, config.in: Rebuild.
7392
7393 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7394
7395 * win32-low.c: Throughout, fix format strings and casts of
7396 printf-like functions to avoid type related warnings on all
7397 platforms.
7398 (get_child_debug_event): Print dwDebugEventCode as hex since
7399 that's how it's usually documented.
7400
7401 2013-02-28 Yao Qi <yao@codesourcery.com>
7402
7403 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7404 pulongest.
7405
7406 2013-02-27 Jiong Wang <jiwang@tilera.com>
7407
7408 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7409 (reg-tilegx32.c): New rule.
7410 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7411 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7412 different register info initializer according to elf class.
7413 (init_registers_tilgx32): New function. The tilegx32 register info
7414 initializer.
7415 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7416 (tile_store_gregset): Likewise.
7417
7418 2013-02-27 Yao Qi <yao@codesourcery.com>
7419
7420 * server.c (process_point_options): Print debug message when
7421 debug_threads is true.
7422
7423 2013-02-26 Yao Qi <yao@codesourcery.com>
7424
7425 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7426
7427 2013-02-19 Pedro Alves <palves@redhat.com>
7428 Kai Tietz <ktietz@redhat.com>
7429
7430 PR gdb/15161
7431
7432 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7433 instead of strtoul to extract address from packet.
7434 (process_serial_event) <'z'>: Likewise.
7435
7436 2013-02-18 Yao Qi <yao@codesourcery.com>
7437
7438 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7439
7440 2013-02-14 Pedro Alves <palves@redhat.com>
7441
7442 Plug memory leak.
7443
7444 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7445 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7446
7447 2013-02-14 Pedro Alves <palves@redhat.com>
7448
7449 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7450
7451 2013-02-14 Pedro Alves <palves@redhat.com>
7452
7453 * tracepoint.c (save_string): Delete.
7454 (add_tracepoint_action): Use savestring instead of save_string.
7455
7456 2013-02-12 Pedro Alves <palves@redhat.com>
7457
7458 * linux-xtensa-low.c: Ditto.
7459 * xtensa-xtregs.c: Ditto.
7460
7461 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7462
7463 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7464 thread_db.
7465
7466 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7467
7468 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7469 aarch64_num_wp_regs and aarch64_num_bp_regs to
7470 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7471
7472 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7473
7474 * linux-aarch64-low.c (ps_get_thread_area): Replace
7475 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7476
7477 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7478 Marcus Shawcroft <marcus.shawcroft@arm.com>
7479 Nigel Stephens <nigel.stephens@arm.com>
7480 Yufeng Zhang <yufeng.zhang@arm.com>
7481
7482 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7483 (aarch64.c, aarch64-without-fpu.c): New targets.
7484 * configure.srv (aarch64*-*-linux*): New.
7485 * linux-aarch64-low.c: New file.
7486
7487 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7488
7489 * linux-low.c (handle_extended_wait, linux_create_inferior)
7490 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7491 (dequeue_one_deferred_signal, linux_resume_one_thread)
7492 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7493 (linux_tracefork_grandchild, linux_test_for_tracefork)
7494 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7495 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7496 where the argument is 0.
7497
7498 2013-01-25 Yao Qi <yao@codesourcery.com>
7499
7500 * event-loop.c: Include "queue.h".
7501 (gdb_event_p): New typedef.
7502 (struct gdb_event) <next_event>: Remove.
7503 (event_queue): Change to QUEUE(gdb_event_p).
7504 (async_queue_event): Remove.
7505 (gdb_event_xfree): New.
7506 (initialize_event_loop): New.
7507 (process_event): Use API from QUEUE.
7508 (wait_for_event): Likewise.
7509 * server.c (main): Call initialize_event_loop.
7510 * server.h (initialize_event_loop): Declare.
7511
7512 2013-01-18 Yao Qi <yao@codesourcery.com>
7513
7514 * ax.h (struct eval_agent_expr_context): New.
7515 (gdb_eval_agent_expr): Update declaration.
7516 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7517 TFRAME. Add new argument CTX.
7518 * server.h (struct eval_agent_expr_context): Declare.
7519 (agent_mem_read, agent_tsv_read): Update declaration.
7520 (agent_mem_read_string): Likewise.
7521 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7522 (add_traceframe_block): Add new argument TPOINT.
7523 Increase TPOINT->traceframe_usage.
7524 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7525 eval_tracepoint_agent_expr.
7526 (condition_true_at_tracepoint): Likewise.
7527 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7528 (agent_mem_read_string, agent_tsv_read): Likewise.
7529
7530 2013-01-16 Yao Qi <yao@codesourcery.com>
7531
7532 * linux-low.c (linux_resume_one_lwp): Don't check
7533 'lwp->bp_reinsert != 0'.
7534
7535 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7536 Pedro Alves <palves@redhat.com>
7537
7538 * lynx-low.c (ptrace_request_to_str): Define a temporary
7539 macro and use it to simplify this function's implementation.
7540
7541 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7542
7543 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7544 sets errno.
7545
7546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7547
7548 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7549
7550 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7551
7552 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7553
7554 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7555
7556 * lynx-low.c (lynx_resume): Use the resume_info parameter
7557 to determine the ptid for the lynx_ptrace call, unless
7558 it is equal to minus_one_ptid, in which case we use the
7559 ptid of the current_inferior.
7560 (lynx_wait_1): After having received a thread create/exit
7561 event, resume the inferior's execution using the signaling
7562 thread's ptid, rather than the old ptid.
7563
7564 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7565
7566 * lynx-low.c (lynx_resume): Delete variable ret.
7567
7568 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7569
7570 * gdbreplay.c (gdbreplay_version): Update copyright year.
7571 * server.c (gdbserver_version): Likewise.
7572
7573 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7574
7575 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7576 new thread.
7577
7578 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7579
7580 * lynx-low.c (ptrace_request_to_str): Add handling for
7581 PTRACE_GETTRACESIG.
7582
7583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7584
7585 * lynx-low.c (lynx_attach): Delete variable new_process.
7586
7587 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7588
7589 * lynx-low.c (lynx_create_inferior): Delete variable
7590 new_process.
7591
7592 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7593
7594 * lynx-low.c (ptrace_request_to_str): Do not handle
7595 PTRACE_GETTHREADLIST if this macro does not exist.
7596
7597 2012-12-15 Yao Qi <yao@codesourcery.com>
7598
7599 * Makefile.in (OBS): Add notif.o.
7600 * notif.c, notif.h: New.
7601 * server.c: Include "notif.h".
7602 (struct vstop_notif) <next>: Remove.
7603 <base>: New field.
7604 (queue_stop_reply): Update.
7605 (push_event, send_next_stop_reply): Remove.
7606 (discard_queued_stop_replies): Update.
7607 (notif_stop): New variable.
7608 (handle_v_stopped): Remove.
7609 (handle_v_requests): Don't call handle_v_stopped. Call
7610 handle_ack_notif instead.
7611 (queue_stop_reply_callback): Call notif_event_enque instead
7612 of queue_stop_reply.
7613 (handle_status): Don't call send_next_stop_reply, call
7614 notif_write_event instead.
7615 (kill_inferior_callback): Likewise.
7616 (detach_or_kill_inferior_callback): Likewise.
7617 (main): Call initialize_notif.
7618 (process_serial_event): Call QUEUE_is_empty.
7619 (handle_target_event): Call notif_push instead of push event.
7620 * server.h (push_event): Remove declaration.
7621
7622 2012-12-10 Tom Tromey <tromey@redhat.com>
7623
7624 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7625 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7626 macros.
7627 (.c.o): Rewrite.
7628 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7629 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7630 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7631 (amd64-linux-ipa.o, ax.o): Rewrite.
7632 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7633 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7634 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7635 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7636 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7637 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7638 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7639 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7640 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7641 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7642 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7643 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7644 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7645 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7646 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7647 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7648 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7649 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7650 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7651 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7652 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7653 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7654 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7655 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7656 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7657 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7658 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7659 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7660 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7661 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7662 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7663 (reg-tilegx.o): Remove.
7664 (all_object_files): New macro.
7665 Include .deps files.
7666 * aclocal.m4, configure: Rebuild.
7667 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7668 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7669 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7670
7671 2012-12-05 Tom Tromey <tromey@redhat.com>
7672
7673 PR gdb/14917:
7674 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7675
7676 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7677
7678 * configure.ac: Check for linux/perf_event.h.
7679 * config.in: Regenerated.
7680 * configure: Regenerated.
7681
7682 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7683
7684 * hostio.c (handle_readlink): Decrease buffer size
7685 parameter passed to readlink by one byte.
7686
7687 2012-11-26 Yao Qi <yao@codesourcery.com>
7688
7689 * configure.ac (build_warnings): Append '-Wempty-body'.
7690 * configure: Regenerated.
7691 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7692 body.
7693
7694 2012-11-15 Pierre Muller <muller@sourceware.org>
7695
7696 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7697 * config.in: Regenerate.
7698 * configure: Regenerate.
7699 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7700 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7701 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7702 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7703 header.
7704 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7705 instead of <sys/wait.h> header.
7706 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7707
7708 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7709
7710 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7711 (various make rules): Remove -DGDBSERVER
7712
7713 2012-11-09 Yao Qi <yao@codesourcery.com>
7714
7715 * spu-low.c (current_ptid): Move it to ..
7716 * gdbthread.h: ... here. New.
7717 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7718 * server.c (myresume, process_serial_event): Likewise.
7719 * thread-db.c (thread_db_find_new_threads): Likewise.
7720 * tracepoint.c (run_inferior_command): Likewise.
7721
7722 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7723
7724 * server.c (handle_search_memory_1): Include access length in
7725 warning message.
7726
7727 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7728
7729 * linux-crisv32-low.c: Fix compile errors.
7730
7731 2012-09-04 Yao Qi <yao@codesourcery.com>
7732
7733 * tracepoint.c (cmd_qtsv): Adjust debug message.
7734 Don't check CUR_TPOINT.
7735
7736 2012-08-28 Yao Qi <yao@codesourcery.com>
7737
7738 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7739 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7740 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7741 Remove declarations of xmalloc, xreallloc, xstrdup and
7742 freeargv.
7743 * Makefile.in (libiberty_h): New.
7744 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7745 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7746
7747 2012-08-23 Yao Qi <yao@codesourcery.com>
7748
7749 * server.h: Remove declaration of 'xsnprintf'.
7750
7751 2012-08-22 Keith Seitz <keiths@redhat.com>
7752
7753 * server.h: Include build-gnulib-gbserver/config.h.
7754 * gdbreplay.c: Likewise.
7755
7756 2012-08-08 Doug Evans <dje@google.com>
7757
7758 * Makefile.in (SFILES): Add gdb_vecs.c.
7759 (OBS): Add gdb_vecs.o.
7760 (gdb_vecs_h, host_defs_h): New variables.
7761 (thread-db.o): Add $(gdb_vecs_h) dependency.
7762 (gdb_vecs.o): New rule.
7763 * thread-db.c: #include "gdb_vecs.h".
7764 (thread_db_load_search): Use a vector to iterate over path elements.
7765 Handle text appearing after "$pdir".
7766
7767 * configure.ac: Add check for strstr.
7768 * config.in: Regenerate.
7769 * configure: Regenerate.
7770
7771 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7772
7773 * hostio.c (handle_pread): If pread fails, fall back to attempting
7774 lseek/read.
7775 (handle_pwrite): Likewise for pwrite.
7776
7777 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7778
7779 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7780 between unsupported TYPE and unimplementable ADDR/LEN combination.
7781 (arm_insert_point): Act on new return value.
7782
7783 2012-07-31 Pedro Alves <palves@redhat.com>
7784
7785 * server.c (process_point_options): Only skip tokens if we find
7786 one that is unrecognized. Don't treat 'X' specially while
7787 skipping unrecognized tokens.
7788
7789 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7790
7791 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7792 to 4-byte-align HW breakpoint addresses for Thumb.
7793
7794 2012-07-27 Yao Qi <yao@codesourcery.com>
7795
7796 PR remote/14161.
7797
7798 * server.h: Declare gdb_agent_about_to_close.
7799 * target.c (kill_inferior): Include "agent.h".
7800 New. Send command 'kill'.
7801 * target.h (kill_inferior): Removed macro.
7802 * tracepoint.c (gdb_agent_about_to_close): New.
7803 (gdb_agent_helper_thread): Handle command 'close'.
7804 Wait endlessly until the inferior stops.
7805 Install gdb_agent_remove_socket to atexit hook.
7806 (agent_socket_name): New static variable.
7807 (gdb_agent_socket_init): Replace local variable 'name' with
7808 'agent_socket_name'.
7809 (gdb_agent_remove_socket): New.
7810
7811 2012-07-27 Yao Qi <yao@codesourcery.com>
7812
7813 * server.c (process_point_options): Stop at 'X' when parsing.
7814
7815 2012-07-19 Michael Eager <eager@eagercon.com>
7816
7817 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7818 to hw_execute.
7819 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7820 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7821 hardware breakpoint.
7822
7823 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7824
7825 * gdbserver/linux-low.c (initialize_low): Call
7826 linux_ptrace_init_warnings.
7827
7828 2012-07-02 Doug Evans <dje@google.com>
7829
7830 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7831 pointer to int.
7832
7833 2012-07-02 Stan Shebs <stan@codesourcery.com>
7834
7835 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7836 (ax.o): Add it to build rule.
7837 (ax-ipa.o): Ditto.
7838 (OBS): Add format.o.
7839 (IPA_OBS): Add format.o.
7840 * server.c (handle_query): Claim support for breakpoint commands.
7841 (process_point_options): Add command case.
7842 (process_serial_event): Leave running if there are printfs in
7843 effect.
7844 * mem-break.h (any_persistent_commands): Declare.
7845 (add_breakpoint_commands): Declare.
7846 (gdb_no_commands_at_breakpoint): Declare.
7847 (run_breakpoint_commands): Declare.
7848 * mem-break.c (struct point_command_list): New struct.
7849 (struct breakpoint): New field command_list.
7850 (any_persistent_commands): New function.
7851 (add_commands_to_breakpoint): New function.
7852 (add_breakpoint_commands): New function.
7853 (gdb_no_commands_at_breakpoint): New function.
7854 (run_breakpoint_commands): New function.
7855 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7856 locally.
7857 * ax.c: Include format.h.
7858 (ax_printf): New function.
7859 (gdb_eval_agent_expr): Add printf opcode.
7860
7861 2012-06-13 Yao Qi <yao@codesourcery.com>
7862
7863 * server.c (start_inferior): Remove duplicated writes to fields
7864 'last_resume_kind' and 'last_status' of 'current_inferior'.
7865
7866 2012-06-12 Yao Qi <yao@codesourcery.com>
7867 Pedro Alves <palves@redhat.com>
7868
7869 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7870 comment.
7871 * server.c (handle_v_cont): Extend comment.
7872
7873 2012-06-11 Yao Qi <yao@codesourcery.com>
7874
7875 * linux-low.c (linux_attach): Add 'static'.
7876
7877 2012-06-06 Yao Qi <yao@codesourcery.com>
7878
7879 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7880
7881 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7882
7883 Fix gcc -flto compilation warning.
7884 * server.c (main): Make variable multi_mode and attach volatile.
7885
7886 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7887
7888 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7889 if the platform doesn't know about it.
7890
7891 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7892
7893 * Makefile.in (SFILES): Add linux-tile-low.c.
7894 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7895 * configure.srv: Handle tilegx-*-linux*.
7896 * linux-tile-low.c: New file.
7897
7898 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7899
7900 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7901
7902 2012-05-24 Pedro Alves <palves@redhat.com>
7903
7904 PR gdb/7205
7905
7906 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7907
7908 2012-05-24 Pedro Alves <palves@redhat.com>
7909
7910 PR gdb/7205
7911
7912 Replace target_signal with gdb_signal throughout.
7913
7914 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7915
7916 * linux-low.c (linux_store_registers): Avoid the copying sequence
7917 when no data has been retrieved by ptrace.
7918
7919 2012-05-22 Will Deacon <will.deacon@arm.com>
7920
7921 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7922 Include asm/ptrace.h.
7923 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7924 already defined.
7925
7926 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7927
7928 * linux-low.c (linux_store_registers): Don't re-retrieve data
7929 with ptrace that has already been obtained from /proc. Always
7930 copy any data retrieved with ptrace to the buffer supplied.
7931
7932 2012-05-11 Yao Qi <yao@codesourcery.com>
7933 Pedro Alves <palves@redhat.com>
7934
7935 * linux-low.c (enum stopping_threads_kind): New.
7936 (stopping_threads): Change type to `enum stopping_threads_kind'.
7937 (handle_extended_wait): If stopping and suspending threads, leave
7938 the new_lwp suspended too.
7939 (linux_wait_for_event): Adjust.
7940 (stop_all_lwps): Set `stopping_threads' to
7941 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7942 whether we're suspending threads or just stopping them. Assert no
7943 recursion happens.
7944
7945 2012-04-29 Yao Qi <yao@codesourcery.com>
7946
7947 * server.h: Move some code to ...
7948 * gdbthread.h: ... here. New.
7949 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7950 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7951 (nto-low.o, win32-low.o): Likewise.
7952 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7953 * regcache.c, remote-utils.c, server.c: Likewise.
7954 * target.c, tracepoint.c, win32-low.c: Likewise.
7955
7956 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7957
7958 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7959 (PTRACE_ARG4_TYPE): Likewise.
7960 (PTRACE_XFER_TYPE): Likewise.
7961 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7962 ptrace to PTRACE_ARG3_TYPE.
7963 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7964 (PTRACE_ARG4_TYPE): Likewise.
7965 (PTRACE_XFER_TYPE): Likewise.
7966 (linux_detach_one_lwp): Cast fourth argument of
7967 ptrace to long then PTRACE_ARG4_TYPE.
7968 (regsets_fetch_inferior_registers): Cast third argument of
7969 ptrace to long then PTRACE_ARG3_TYPE.
7970 (regsets_store_inferior_registers): Likewise.
7971
7972 2012-04-20 Pedro Alves <palves@redhat.com>
7973
7974 * configure: Regenerate.
7975
7976 2012-04-19 Pedro Alves <palves@redhat.com>
7977
7978 * Makefile.in (GNULIB_BUILDDIR): New.
7979 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7980 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7981 (all, install-only, uninstall, clean-info, all-lib, clean): No
7982 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7983 (maintainer-clean realclean distclean): Use subdir_do.
7984 (subdir_do): New.
7985 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7986 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7987 * acinclude.m4: Include acx_configure_dir.m4.
7988 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7989 calls. Call AC_PROG_RANLIB. Configure gnulib using
7990 ACX_CONFIGURE_DIR.
7991 (GNULIB): New.
7992 (GNULIB_STDINT_H): Adjust.
7993 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7994 * gdbreplay.c: Include build-gnulib/config.h.
7995 * server.h: Likewise.
7996 * aclocal.m4: Regenerate.
7997 * config.in: Regenerate.
7998 * configure: Regenerate.
7999
8000 2012-04-19 Pedro Alves <palves@redhat.com>
8001
8002 * Makefile.in (LIBGNU, INCGNU): Adjust.
8003 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8004 (all, install-only, uninstall, clean-info, all-lib, clean)
8005 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8006 * configure.ac: Adjust AC_OUTPUT output.
8007 * aclocal.m4: Regenerate.
8008 * configure: Regenerate.
8009
8010 2012-04-19 Pedro Alves <palves@redhat.com>
8011
8012 * Makefile.in (generated_files): New.
8013 (server_h): Remove the explicit dependency on config.h, and depend
8014 on $generated_files.
8015
8016 2012-04-19 Pedro Alves <palves@redhat.com>
8017
8018 * Makefile.in (INCGNU): Add -Ignulib.
8019
8020 2012-04-19 Pedro Alves <palves@redhat.com>
8021
8022 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8023 (INCGNU): ... this, and spell out -I here.
8024 (GNULIB_LIB): Rename to ...
8025 (LIBGNU): ... this.
8026 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8027
8028 2012-04-19 Pedro Alves <palves@redhat.com>
8029
8030 * config.in: Regenerate.
8031
8032 2012-04-19 Pedro Alves <palves@redhat.com>
8033
8034 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8035 * server.h (memmem): Remove declaration.
8036 * config.in: Regenerate.
8037 * configure: Regenerate.
8038
8039 2012-04-19 Yao Qi <yao@codesourcery.com>
8040
8041 * Makefile.in (SFILES): Add common/vec.c.
8042 (OBS): Add vec.o.
8043 (vec.o): New rule.
8044
8045 2012-04-19 Yao Qi <yao@codesourcery.com>
8046
8047 * remote-utils.c (prepare_resume_reply): Replace with macro
8048 target_core_of_thread.
8049 * server.c (handle_qxfer_threads_proper): Likewise.
8050 * target.h (traget_core_of_thread): New macro.
8051
8052 2012-04-18 Pedro Alves <palves@redhat.com>
8053
8054 * aclocal.m4: Regenerate.
8055 * configure: Regenerate.
8056
8057 2012-04-16 Yao Qi <yao@codesourcery.com>
8058
8059 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8060 duplicated on address.
8061
8062 2012-04-16 Yao Qi <yao@codesourcery.com>
8063
8064 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8065 (struct tracepoint_action_ops) <send>: New field.
8066 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8067 (agent_expr_send, x_tracepoint_action_send): New.
8068 (l_tracepoint_action_send): New.
8069 (cmd_qtdp): Download and install tracepoint
8070 according to `use_agent'.
8071 (run_inferior_command): Add one more parameter `len'.
8072 Update callers.
8073 (tracepoint_send_agent): New.
8074 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8075
8076 2012-04-16 Yao Qi <yao@codesourcery.com>
8077
8078 * tracepoint.c (download_tracepoints): Moved to ...
8079 (cmd_qtstart): ... here.
8080
8081 2012-04-14 Yao Qi <yao@codesourcery.com>
8082
8083 * tracepoint.c: Include inttypes.h.
8084 (struct collect_memory_action): Use sized types.
8085 (struct tracepoint): Likewise.
8086 (cmd_qtdp, stop_tracing): Update print specifiers.
8087 (cmd_qtp, response_tracepoint): Likewise.
8088 (collect_data_at_tracepoint): Likewise.
8089 (collect_data_at_step): Likewise.
8090
8091 2012-04-14 Yao Qi <yao@codesourcery.com>
8092
8093 Import gnulib module inttypes.
8094 * aclocal.m4, config.in, configure: Regenerated.
8095
8096 2012-04-14 Yao Qi <yao@codesourcery.com>
8097
8098 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8099 Makefile and config.status at last.
8100
8101 2012-04-13 Yao Qi <yao@codesourcery.com>
8102
8103 * tracepoint.c: Include stdint.h unconditionally.
8104
8105 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8106
8107 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8108 on BFD_HAVE_SYS_PROCFS_TYPE.
8109 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8110 * configure: Regenerate.
8111 * config.in: Likewise.
8112
8113 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8114
8115 * Makefile.in (clean): Also remove x32.c x32-linux.c
8116 x32-avx.c x32-avx-linux.c.
8117 (x32.o): New target.
8118 (x32.c): Likewise.
8119 (x32-linux.o): Likewise.
8120 (x32-linux.c): Likewise.
8121 (x32-avx.o): Likewise.
8122 (x32-avx.c): Likewise.
8123 (x32-avx-linux.o): Likewise.
8124 (x32-avx-linux.c): Likewise.
8125
8126 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8127 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8128 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8129 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8130 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8131 i386/x32-avx-linux.xml.
8132
8133 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8134 (init_registers_x32_avx_linux): Likwise.
8135 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8136 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8137
8138 2012-04-13 Pedro Alves <palves@redhat.com>
8139
8140 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8141 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8142 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8143 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8144 the sub-make.
8145
8146 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8147
8148 * linux-x86-low.c (compat_x32_clock_t): New.
8149 (compat_x32_siginfo_t): Likewise.
8150 (compat_x32_siginfo_from_siginfo): Likewise.
8151 (siginfo_from_compat_x32_siginfo): Likewise.
8152 (linux_is_elf64): Likewise.
8153 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8154 and siginfo_from_compat_x32_siginfo for x32.
8155 (x86_arch_setup): Set linux_is_elf64.
8156
8157 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8158
8159 PR gdb/13969
8160 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8161 e_machine field.
8162 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8163 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8164 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8165 compatible with process.
8166
8167 2012-04-12 Yao Qi <yao@codesourcery.com>
8168
8169 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8170 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8171 (install-only, install-info, clean): Handle sub dir gnulib.
8172 (all-lib, am--refresh): New targets.
8173 (memmem.o): Remove target.
8174 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8175 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8176 (AC_REPLACE_FUNCS): Remove memmem.
8177 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8178 (AC_OUTPUT): Generate Makefile in gnulib/.
8179 * aclocal.m4, config.in, configure: Regenerated.
8180
8181 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8182
8183 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8184
8185 2012-04-05 Pedro Alves <palves@redhat.com>
8186
8187 -Werror=strict-aliasing
8188
8189 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8190 pointer.
8191
8192 2012-04-04 Pedro Alves <palves@redhat.com>
8193
8194 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8195 (sparc_store_gregset_from_stack, sparc_store_gregset)
8196 (sparc_breakpoint_at): Fix formatting.
8197
8198 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8199
8200 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8201 are available.
8202 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8203 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8204 * config.in: Regenerate.
8205 * configure: Likewise.
8206
8207 2012-03-29 Pedro Alves <palves@redhat.com>
8208
8209 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8210 Correct ptrace arguments.
8211
8212 2012-03-28 Pedro Alves <palves@redhat.com>
8213
8214 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8215 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8216 (IA64_FR1_REGNUM): New defines.
8217 (ia64_fetch_register): New.
8218 (the_low_target): Install it.
8219 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8220 field.
8221 * linux-low.c (linux_fetch_registers): Try the
8222 the_low_target.fetch_register hook first.
8223
8224 * linux-arm-low.c (the_low_target): Adjust.
8225 * linux-bfin-low.c (the_low_target): Adjust.
8226 * linux-cris-low.c (the_low_target): Adjust.
8227 * linux-crisv32-low.c (the_low_target): Adjust.
8228 * linux-m32r-low.c (the_low_target): Adjust.
8229 * linux-m68k-low.c (the_low_target): Adjust.
8230 * linux-mips-low.c (the_low_target): Adjust.
8231 * linux-ppc-low.c (the_low_target): Adjust.
8232 * linux-s390-low.c (the_low_target): Adjust.
8233 * linux-sh-low.c (the_low_target): Adjust.
8234 * linux-sparc-low.c (the_low_target): Adjust.
8235 * linux-tic6x-low.c (the_low_target): Adjust.
8236 * linux-x86-low.c (the_low_target): Adjust.
8237 * linux-xtensa-low.c (the_low_target): Adjust.
8238
8239 2012-03-26 Pedro Alves <palves@redhat.com>
8240
8241 * server.c (handle_qxfer_libraries): Don't bail early if
8242 the_target->qxfer_libraries_svr4 is not NULL.
8243
8244 2012-03-26 Pedro Alves <palves@redhat.com>
8245
8246 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8247
8248 2012-03-23 Pedro Alves <palves@redhat.com>
8249
8250 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8251 "library-list-svr4" element's start tag when the the DSO list is
8252 empty.
8253
8254 2012-03-23 Pedro Alves <palves@redhat.com>
8255
8256 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8257 a variable whose type size is the same as the inferior's pointer
8258 size.
8259
8260 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8261
8262 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8263 struct siginfo.
8264 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8265 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8266 * linux-low.h: Include <signal.h>.
8267 (struct siginfo): Remove forward declaration.
8268 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8269 struct siginfo.
8270
8271 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8272
8273 * .gitignore: Ignore more files.
8274
8275 2012-03-19 Pedro Alves <palves@redhat.com>
8276 Jan Kratochvil <jan.kratochvil@redhat.com>
8277
8278 * server.c (cont_thread, general_thread): Add describing comments.
8279 (start_inferior): Clear `cont_thread'.
8280 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8281 of a process.
8282
8283 2012-03-15 Yao Qi <yao@codesourcery.com>
8284
8285 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8286 handling to ...
8287 (cmd_qtdp): ... here.
8288
8289 2012-03-15 Yao Qi <yao@codesourcery.com>
8290
8291 * tracepoint.c (struct tracepoint_action_ops): New.
8292 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8293 (m_tracepoint_action_download): New.
8294 (r_tracepoint_action_download): New.
8295 (x_tracepoint_action_download): New.
8296 (l_tracepoint_action_download): New.
8297 (add_tracepoint_action): Install `action->ops' according type.
8298 (download_tracepoint_1): Move code `download' function pointer
8299 of various tracepoint_action_ops.
8300
8301 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8302
8303 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8304 linux_ptrace_attach_warnings.
8305
8306 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8307
8308 * Makefile.in (linux-ptrace.o): New.
8309 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8310 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8311 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8312 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8313 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8314 of these targets.
8315 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8316
8317 2012-03-08 Yao Qi <yao@codesourcery.com>
8318 Pedro Alves <palves@redhat.com>
8319
8320 Fix PR server/13392.
8321 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8322 offset of JMP insn.
8323 * tracepoint.c (remove_tracepoint): New.
8324 (cmd_qtdp): Call remove_tracepoint when failed to install.
8325
8326 2012-03-07 Pedro Alves <palves@redhat.com>
8327
8328 * linux-low.c (get_detach_signal): New.
8329 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8330 Pass on pending signals to PTRACE_DETACH. Check the result of the
8331 ptrace call.
8332 * server.c (program_signals, program_signals_p): New.
8333 (handle_general_set): Handle QProgramSignals.
8334 * server.h (program_signals, program_signals_p): Declare.
8335
8336 2012-03-05 Pedro Alves <palves@redhat.com>
8337 Jan Kratochvil <jan.kratochvil@redhat.com>
8338
8339 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8340 New comment why.
8341
8342 2012-03-03 Yao Qi <yao@codesourcery.com>
8343
8344 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8345 agent_look_up_symbols.
8346
8347 2012-03-03 Yao Qi <yao@codesourcery.com>
8348
8349 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8350 (linux-x86-low.o): Likewise.
8351 * server.h: Remove in_process_agent_loaded.
8352 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8353 common/agent.c.
8354 Update callers.
8355
8356 2012-03-03 Yao Qi <yao@codesourcery.com>
8357
8358 * tracepoint.c (gdb_agent_capability): New global.
8359 (in_process_agent_loaded_ust): Renamed to
8360 `in_process_agent_supports_ust'.
8361 Update callers.
8362 (in_process_agent_supports_ust): Call agent_capability_check.
8363 (clear_installed_tracepoints): Assert that agent supports
8364 agent.
8365
8366 2012-03-03 Yao Qi <yao@codesourcery.com>
8367
8368 * linux-low.c (linux_supports_agent): New.
8369 (linux_target_ops): Initialize field `supports_agent' with
8370 linux_supports_agent.
8371 * target.h (struct target_ops) <supports_agent>: New.
8372 (target_supports_agent): New macro.
8373 * server.c (handle_general_set): Handle packet 'QAgent'.
8374 (handle_query): Send `QAgent+'.
8375 * Makefile.in (server.o): Depends on agent.h.
8376
8377 2012-03-03 Yao Qi <yao@codesourcery.com>
8378
8379 * Makefile.in (OBS): Add agent.o.
8380 Add new rule for agent.o.
8381 Track dependence of tracepoint.c on agent.h.
8382 * tracepoint.c (run_inferior_command_1):
8383 (run_inferior_command): Call agent_run_command.
8384 (gdb_ust_connect_sync_socket): Deleted. Move it to
8385 common/agent.c.
8386 (resume_thread, stop_thread): Likewise.
8387 (gdb_ust_socket_init): Renamed to ...
8388 (gdb_agent_socket_init): ... New.
8389 (gdb_ust_thread): Renamed to ...
8390 (gdb_agent_helper_thread): ... New.
8391 (gdb_ust_init): Move some code to ...
8392 (gdb_agent_init): ... here. New.
8393 [HAVE_UST]: Call gdb_ust_init.
8394 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8395 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8396 * config.in, configure: Regenerated.
8397
8398 2012-03-02 Pedro Alves <palves@redhat.com>
8399
8400 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8401 * linux-low.c (struct simple_pid_list): New.
8402 (stopped_pids): New a struct simple_pid_list pointer.
8403 (add_to_pid_list, pull_pid_from_list): New.
8404 (handle_extended_wait): Don't assume the first signal new children
8405 report is SIGSTOP. Adjust call to pull_pid_from_list.
8406 (linux_wait_for_lwp): Adjust.
8407
8408 2012-03-02 Yao Qi <yao@codesourcery.com>
8409
8410 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8411 debug log.
8412
8413 2012-03-02 Yao Qi <yao@codesourcery.com>
8414
8415 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8416 `stop_pc' and `tpoint'. Update caller.
8417
8418 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8419
8420 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8421 * linux-low.c (use_linux_regsets): New macro.
8422 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8423 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8424 (linux_register_in_regsets): New function.
8425 (usr_fetch_inferior_registers): Skip registers covered by
8426 regsets.
8427 (usr_store_inferior_registers): Likewise.
8428 (usr_fetch_inferior_registers): New macro.
8429 (usr_store_inferior_registers): Likewise.
8430 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8431 (linux_store_registers): Likewise.
8432 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8433 prototype.
8434 (init_registers_mips64_dsp_linux): Likewise.
8435 (init_registers_mips_linux): New macro.
8436 (init_registers_mips_dsp_linux): Likewise.
8437 (mips_dsp_num_regs): Likewise.
8438 (DSP_BASE, DSP_CONTROL): New fallback macros.
8439 (mips_base_regs): New macro.
8440 (mips_regmap): Use it. Fix the size.
8441 (mips_dsp_regmap): New variable.
8442 (mips_dsp_regset_bitmap): Likewise.
8443 (mips_arch_setup): New function.
8444 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8445 than mips_regmap.
8446 (mips_cannot_store_register): Likewise.
8447 (the_low_target): Update .arch_setup, .num_regs and .regmap
8448 initializers. Add .regset_bitmap initializer.
8449 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8450 initializer.
8451 * linux-bfin-low.c (the_low_target): Likewise.
8452 * linux-cris-low.c (the_low_target): Likewise.
8453 * linux-crisv32-low.c (the_low_target): Likewise.
8454 * linux-ia64-low.c (the_low_target): Likewise.
8455 * linux-m32r-low.c (the_low_target): Likewise.
8456 * linux-m68k-low.c (the_low_target): Likewise.
8457 * linux-ppc-low.c (the_low_target): Likewise.
8458 * linux-s390-low.c (the_low_target): Likewise.
8459 * linux-sh-low.c (the_low_target): Likewise.
8460 * linux-sparc-low.c (the_low_target): Likewise.
8461 * linux-tic6x-low.c (the_low_target): Likewise.
8462 * linux-x86-low.c (the_low_target): Likewise.
8463 * linux-xtensa-low.c (the_low_target): Likewise.
8464 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8465 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8466 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8467 srv_xmlfiles.
8468 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8469 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8470
8471 2012-02-29 Yao Qi <yao@codesourcery.com>
8472 Pedro Alves <palves@redhat.com>
8473
8474 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8475 `step_over_finished' is true.
8476
8477 2012-02-27 Pedro Alves <palves@redhat.com>
8478
8479 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8480 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8481
8482 2012-02-27 Pedro Alves <palves@redhat.com>
8483
8484 PR server/9684
8485 * linux-low.c (pid_is_stopped): New.
8486 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8487
8488 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8489
8490 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8491 of conditions.
8492
8493 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8494
8495 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8496
8497 2012-02-24 Luis Machado <lgustavo@codesourcery>
8498
8499 * server.c (handle_query): Advertise support for target-side
8500 breakpoint condition evaluation.
8501 (process_point_options): New function.
8502 (process_serial_event): When inserting a breakpoint, check for
8503 a target-side condition that should be evaluated.
8504
8505 * mem-break.c: Include regcache.h and ax.h.
8506 (point_cond_list_t): New data structure.
8507 (breakpoint) <cond_list>: New field.
8508 (find_gdb_breakpoint_at): Make non-static.
8509 (delete_gdb_breakpoint_at): Clear any target-side
8510 conditions.
8511 (clear_gdb_breakpoint_conditions): New function.
8512 (add_condition_to_breakpoint): Likewise.
8513 (add_breakpoint_condition): Likewise.
8514 (gdb_condition_true_at_breakpoint): Likewise.
8515 (gdb_breakpoint_here): Return result directly instead
8516 of going through a local variable.
8517
8518 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8519 (clear_gdb_breakpoint_conditions): Likewise.
8520 (add_breakpoint_condition): Likewise.
8521 (gdb_condition_true_at_breakpoint): Likewise.
8522
8523 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8524 (need_step_over_p): Take target-side breakpoint condition into
8525 consideration.
8526
8527 2012-02-24 Luis Machado <lgustavo@codesourcery>
8528
8529 * server.h: Include tracepoint.h.
8530 (agent_mem_read, agent_get_trace_state_variable_value,
8531 agent_set_trace_state_variable_value,
8532 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8533 get_set_tsv_func_addr): New prototypes.
8534
8535 * ax.h: New include file.
8536 * ax.c: New source file.
8537
8538 * tracepoint.c: Include ax.h.
8539 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8540 agent_expr, eval_result_type): Move to ax.h.
8541 (parse_agent_expr): Rename to ...
8542 (gdb_parse_agent_expr): ... this, make it non-static and move
8543 to ax.h.
8544 (unparse_agent_expr) Rename to ...
8545 (gdb_unparse_agent_expr): ... this, make it non-static and move
8546 to ax.h.
8547 (eval_agent_expr): Rename to ...
8548 (eval_tracepoint_agent_expr): ... this.
8549 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8550 forward declarations.
8551 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8552 (agent_get_trace_state_variable_value): New function.
8553 (agent_set_trace_state_variable_value): New function.
8554 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8555 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8556 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8557 (condition_true_at_tracepoint): Likewise.
8558 (parse_agent_expr): Rename to ...
8559 (gdb_parse_agent_expr): ... this and move to ax.c.
8560 (unparse_agent_expr): Rename to ...
8561 (gdb_unparse_agent_expr): ... this and move to ax.c.
8562 (gdb_agent_op_name): Move to ax.c.
8563 (eval_agent_expr): Rename to ...
8564 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8565 and move to ax.c.
8566 (eval_tracepoint_agent_expr): New function.
8567 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8568 non-static.
8569 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8570 ax.c.
8571 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8572 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8573 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8574 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8575 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8576 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8577 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8578 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8579 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8580 (compile_bytecodes): Remove forward declaration.
8581 (is_goto_target): Move to ax.c.
8582 (compile_bytecodes): Move to ax.c and call
8583 agent_get_trace_state_variable_value (...) and
8584 agent_set_trace_state_variable_value (...).
8585
8586 * Makefile.in: Update ax.c and IPA dependencies.
8587
8588 2012-02-24 Pedro Alves <palves@redhat.com>
8589
8590 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8591 (cmd_bigqtbuffer_circular): ... this. Only handle
8592 'QTBuffer:circular:'.
8593 (handle_tracepoint_general_set): Adjust.
8594
8595 2012-02-16 Yao Qi <yao@codesourcery.com>
8596
8597 * inferiors.c: Move code to ...
8598 * dll.c: .... here. New.
8599 * server.h: Declare clear_dlls.
8600 * Makefile.in (SFILES): Add dll.c.
8601 (OBS): Add dll.o
8602 (dll.o): New rule.
8603
8604 2012-02-11 Yao Qi <yao@codesourcery.com>
8605
8606 * server.c: (handle_monitor_command): Add a new parameter
8607 `own_buf'.
8608 (handle_query): Update caller.
8609
8610 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8611
8612 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8613 * configure, config.in: Regenerate.
8614 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8615 is not defined.
8616
8617 2012-02-02 Pedro Alves <palves@redhat.com>
8618
8619 Try SIGKILL first, then PTRACE_KILL.
8620 * linux-low.c (linux_kill_one_lwp): New.
8621 (linux_kill_one_lwp): Rename to ...
8622 (kill_one_lwp_callback): ... this. Use the new
8623 linux_kill_one_lwp.
8624
8625 2012-02-02 Pedro Alves <palves@redhat.com>
8626
8627 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8628 inferior.
8629
8630 2012-01-27 Pedro Alves <palves@redhat.com>
8631
8632 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8633 (elf_64_file_p): Make static.
8634 (linux_pid_exe_is_elf_64_file): New.
8635 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8636 Delete declarations.
8637 (linux_pid_exe_is_elf_64_file): Declare.
8638 * linux-x86-low.c (x86_arch_setup): Use
8639 linux_pid_exe_is_elf_64_file.
8640
8641 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8642
8643 * linux-low.c (linux_wait_for_event_1): Rename to ...
8644 (linux_wait_for_event): ... here and merge it with former
8645 linux_wait_for_event - new variable wait_ptid, use it.
8646 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8647
8648 2012-01-23 Pedro Alves <palves@redhat.com>
8649
8650 * server.c (main): Avoid yet another case of infinite loop while
8651 detaching/killing after a longjmp.
8652
8653 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8654
8655 Code cleanup.
8656 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8657
8658 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8659
8660 * hostio.c (handle_readlink): New function.
8661 (handle_vFile): Call it to handle "vFile:readlink" packets.
8662
8663 2012-01-20 Pedro Alves <palves@redhat.com>
8664 Ulrich Weigand <ulrich.weigand@linaro.org>
8665
8666 * server.c (handle_v_requests): Only support vAttach and vRun to
8667 start multiple processes when in extended protocol mode.
8668
8669 2012-01-17 Pedro Alves <palves@redhat.com>
8670
8671 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8672 memalign plus mprotect to allocate the scratch buffer.
8673
8674 2012-01-13 Pedro Alves <palves@redhat.com>
8675
8676 * server.c (attach_inferior): Clear `cont_thread'.
8677
8678 2012-01-13 Pedro Alves <palves@redhat.com>
8679
8680 * server.c (main): Avoid infinite loop while detaching/killing
8681 after a longjmp.
8682
8683 2012-01-09 Doug Evans <dje@google.com>
8684
8685 * server.c (start_inferior): Set last_ptid in --wrapper case.
8686
8687 2012-01-06 Yao Qi <yao@codesourcery.com>
8688
8689 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8690 defined.
8691 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8692
8693 2012-01-04 Yao Qi <yao@codesourcery.com>
8694
8695 * tracepoint.c (cmd_qtdp): Print debug message
8696 for static tracepoint.
8697
8698 2012-01-04 Yao Qi <yao@codesourcery.com>
8699
8700 * tracepoint.c (trace_vdebug): Differentiate debug message
8701 between gdbserver and IPA.
8702
8703 2012-01-03 Yao Qi <yao@codesourcery.com>
8704
8705 * tracepoint.c (tracepoint_was_hit): Don't collect for
8706 static tracepoint.
8707
8708 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8709
8710 * terminal.h: Reformat copyright header.
8711
8712 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8713
8714 * server.c (gdbserver_version): Update copyright year.
8715 * gdbreplay.c (gdbreplay_version): Likewise.
8716
8717 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8718
8719 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8720
8721 Revert:
8722 2011-12-18 Hui Zhu <teawater@gmail.com>
8723 * linux-low.c (linux_create_inferior): Save return value to ret.
8724
8725 2011-12-18 Hui Zhu <teawater@gmail.com>
8726
8727 * linux-low.c (linux_create_inferior): Save return value to ret.
8728
8729 2011-12-16 Doug Evans <dje@google.com>
8730
8731 * linux-low.c (linux_create_inferior): If stdio connection,
8732 redirect stdin from /dev/null, stdout to stderr.
8733 * remote-utils.c (remote_is_stdio): New static global.
8734 (remote_connection_is_stdio): New function.
8735 (remote_prepare): Handle stdio connection.
8736 (remote_open): Ditto.
8737 (remote_close): Don't close stdin for stdio connections.
8738 (read_prim,write_prim): New functions. Replace all calls to
8739 read/write to these.
8740 * server.c (main): Watch for "-" argument. Move call to
8741 remote_prepare before start_inferior.
8742 * server.h (STDIO_CONNECTION_NAME): New macro.
8743 (remote_connection_is_stdio): Declare.
8744
8745 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8746 in debugging output.
8747
8748 2011-12-15 Yao Qi <yao@codesourcery.com>
8749
8750 * tracepoint.c: Include sys/syscall.h.
8751 (gdb_ust_thread): Remove preprocessor conditional.
8752
8753 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8754
8755 * linux-low.c (linux_detach_one_lwp): Call
8756 the_low_target.prepare_to_resume before detaching.
8757
8758 2011-12-14 Yao Qi <yao@codesourcery.com>
8759
8760 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8761 of write.
8762
8763 2011-12-14 Yao Qi <yao@codesourcery.com>
8764
8765 * i386-low.c (i386_low_stopped_data_address): Initialize local
8766 variable `control'.
8767
8768 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8769
8770 PR remote/13492
8771
8772 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8773 DR_CONTROL unless necessary. Extend comments.
8774 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8775 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8776
8777 2011-12-13 Yao Qi <yao@codesourcery.com>
8778
8779 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8780 macros.
8781 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8782
8783 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8784
8785 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8786 Print new debug message for such case.
8787
8788 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8789
8790 Fix overlapping memcpy.
8791 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8792 the read_inferior_memory transfer.
8793 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8794 write_inferior_memory transfer.
8795 (set_fast_tracepoint_jump): New variable buf. Use it for the
8796 read_inferior_memory and write_inferior_memory transfers.
8797 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8798 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8799 Use it for the write_inferior_memory transfer.
8800 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8801 buffers.
8802
8803 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8804
8805 * linux-low.c (fetch_register, store_register): Make code
8806 consistent, fix formatting.
8807
8808 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8809
8810 * linux-low.c (usr_store_inferior_registers): Factor out code
8811 to handle individual registers into...
8812 (store_register): ... this new function.
8813
8814 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8815
8816 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8817 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8818 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8819 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8820 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8821 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8822 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8823 (srv_xmlfiles): Add new XML files.
8824
8825 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8826 and <sys/uio.h>.
8827 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8828 (init_registers_s390_linux32v1): Add prototype.
8829 (init_registers_s390_linux32v2): Likewise.
8830 (init_registers_s390_linux64v1): Likewise.
8831 (init_registers_s390_linux64v2): Likewise.
8832 (init_registers_s390x_linux64v1): Likewise.
8833 (init_registers_s390x_linux64v2): Likewise.
8834 (s390_num_regs): Increment to 52.
8835 (s390_regmap): Add orig_r2 register.
8836 (s390_num_regs_3264): Increment to 68.
8837 (s390_regmap_3264): Add orig_r2 register.
8838 (s390_collect_ptrace_register): Handle orig_r2 register.
8839 (s390_supply_ptrace_register): Likewise.
8840 (s390_fill_last_break): New function.
8841 (s390_store_last_break): Likewise.
8842 (s390_fill_system_call): New function.
8843 (s390_store_system_call): Likewise.
8844 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8845 register sets.
8846 (s390_check_regset): New function.
8847 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8848 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8849 Update target_regsets for available register sets.
8850
8851 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8852 Jan Kratochvil <jan.kratochvil@redhat.com>
8853
8854 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8855 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8856 New.
8857 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8858 * linux-low.h (struct process_info_private): New member r_debug.
8859 * server.c (handle_qxfer_libraries): Call
8860 the_target->qxfer_libraries_svr4.
8861 (handle_qxfer_libraries_svr4): New function.
8862 (qxfer_packets): New entry "libraries-svr4".
8863 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8864 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8865 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8866 PACKET_qXfer_libraries_svr4.
8867
8868 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8869
8870 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8871 PSW address/mask between 8-byte and 16-byte formats.
8872 (s390_supply_ptrace_register): Likewise.
8873 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8874 basic addressing mode bit.
8875
8876 2011-11-24 Stan Shebs <stan@codesourcery.com>
8877
8878 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8879
8880 2011-11-17 Stan Shebs <stan@codesourcery.com>
8881
8882 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8883 (tracing_start_time): New global.
8884 (tracing_stop_time): New global.
8885 (tracing_user_name): New global.
8886 (tracing_notes): New global.
8887 (tracing_stop_note): New global.
8888 (cmd_qtstart): Set traceframe_usage, start_time.
8889 (stop_tracing): Set stop_time.
8890 (cmd_qtstatus): Report additional status.
8891 (cmd_qtp): New function.
8892 (handle_tracepoint_query): Call it.
8893 (cmd_qtnotes): New function.
8894 (handle_tracepoint_general_set): Call it.
8895 (get_timestamp): Rename from tsv_get_timestamp.
8896
8897 2011-11-14 Stan Shebs <stan@codesourcery.com>
8898 Kwok Cheung Yeung <kcy@codesourcery.com>
8899
8900 * linux-x86-low.c (small_jump_insn): New.
8901 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8902 trampoline and error message, build a trampoline and issue a small
8903 jump instruction to it.
8904 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8905 trampoline and error message.
8906 (x86_get_min_fast_tracepoint_insn_len): New.
8907 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8908 * linux-low.h (struct linux_target_ops): Add arguments to
8909 install_fast_tracepoint_jump_pad operation, add new operation.
8910 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8911 arguments.
8912 (linux_get_min_fast_tracepoint_insn_len): New function.
8913 (linux_target_op): Add new operation.
8914 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8915 (gdb_trampoline_buffer_end): Ditto.
8916 (gdb_trampoline_buffer_error): Ditto.
8917 (struct ipa_sym_addresses): Add fields for new IPA variables.
8918 (symbol_list): Add entries for new IPA variables.
8919 (struct tracepoint): Add fields to hold the address range of the
8920 trampoline used by the tracepoint.
8921 (trampoline_buffer_head): New static variable.
8922 (trampoline_buffer_tail): Ditto.
8923 (claim_trampoline_space): New function.
8924 (have_fast_tracepoint_trampoline_buffer): New function.
8925 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8926 structure.
8927 (install_fast_tracepoint): Ditto, also add error buffer argument.
8928 (cmd_qtminftpilen): New function.
8929 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8930 (fast_tracepoint_from_trampoline_address): New function.
8931 (fast_tracepoint_collecting): Handle trampoline as part of jump
8932 pad space.
8933 (set_trampoline_buffer_space): New function.
8934 (initialize_tracepoint): Initialize new IPA variables.
8935 * target.h (struct target_ops): Add arguments to
8936 install_fast_tracepoint_jump_pad operation, add new
8937 get_min_fast_tracepoint_insn_len operation.
8938 (target_get_min_fast_tracepoint_insn_len): New.
8939 (install_fast_tracepoint_jump_pad): Add arguments.
8940 * server.h (IPA_BUFSIZ): Define.
8941 * linux-i386-ipa.c: Include extra header files.
8942 (initialize_fast_tracepoint_trampoline_buffer): New function.
8943 (initialize_low_tracepoint): Call it.
8944 * server.h (set_trampoline_buffer_space): Declare.
8945 (claim_trampoline_space): Ditto.
8946 (have_fast_tracepoint_trampoline_buffer): Ditto.
8947
8948 2011-11-14 Yao Qi <yao@codesourcery.com>
8949
8950 * server.c (handle_query): Handle InstallInTrace for qSupported.
8951 * tracepoint.c (add_tracepoint): Sort list.
8952 (install_tracepoint, download_tracepoint): New.
8953 (cmd_qtdp): Call them to install and download tracepoints.
8954 (sort_tracepoints): Removed.
8955 (cmd_qtstart): Update.
8956
8957 2011-11-14 Yao Qi <yao@codesourcery.com>
8958
8959 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8960 * mem-break.h: Declare.
8961 * tracepoint.c (cmd_qtstart): Move some code to ...
8962 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8963 New.
8964 (download_tracepoints): Move some code to ...
8965 (download_tracepoint_1): ... here. New.
8966
8967 2011-11-08 Yao Qi <yao@codesourcery.com>
8968
8969 * remote-utils.c (relocate_instruction): A comment fix.
8970
8971 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8972
8973 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8974 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8975 dr_status_mirror and dr_control_mirror from debug_reg_state.
8976 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8977 (i386_initial_stuff): Remove use of deleted globals.
8978 (i386_get_thread_context, i386_set_thread_context,
8979 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8980 from debug_reg_state.
8981
8982 2011-11-05 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8985 address as TPOINT's.
8986
8987 2011-11-02 Stan Shebs <stan@codesourcery.com>
8988
8989 * tracepoint.c (agent_mem_read_string): New function.
8990 (eval_agent_expr): Call it for tracenz.
8991 * server.c (handle_query): Report support for tracenz.
8992
8993 2011-11-02 Yao Qi <yao@codesourcery.com>
8994
8995 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8996
8997 2011-11-02 Yao Qi <yao@codesourcery.com>
8998
8999 * target.h: Fix a typo in comment.
9000
9001 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9002
9003 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9004 clobber the breakpoints' shadows with fast tracepoint jumps.
9005 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9006 * target.c (write_inferior_memory): Also pass MYADDR down to
9007 check_mem_write.
9008
9009 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9010
9011 * configure.ac: Check support for personality routine.
9012 * configure: Regenerate.
9013 * config.in: Likewise.
9014 * linux-low.c: Include <sys/personality.h>.
9015 Define ADDR_NO_RANDOMIZE if necessary.
9016 (linux_create_inferior): Disable address space randomization when
9017 forking inferior, if requested.
9018 (linux_supports_disable_randomization): New function.
9019 (linux_target_ops): Install it.
9020 * server.h (disable_randomization): Declare.
9021 * server.c (disable_randomization): New global variable.
9022 (handle_general_set): Handle QDisableRandomization.
9023 (handle_query): Likewise for qSupported.
9024 (main): Support --disable-randomization and --no-disable-randomization
9025 command line arguments.
9026 * target.h (struct target_ops): Add supports_disable_randomization.
9027 (target_supports_disable_randomization): New macro.
9028
9029 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9030
9031 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9032 ifdef check.
9033 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9034 [!PT_GETDSBT] (target_loadmap): New definition.
9035 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9036 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9037 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9038 and PT_GETDSBT to LINUX_LOADMAP.
9039 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9040 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9041
9042 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9043
9044 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9045 (arm_linux_hwbp_cap): New static variable.
9046 (arm_linux_get_hwbp_cap): Replace by ...
9047 (arm_linux_init_hwbp_cap): ... this new function.
9048 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9049 (arm_linux_get_hw_watchpoint_count): Likewise.
9050 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9051 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9052 (arm_prepare_to_resume): Use perror_with_name instead of error.
9053
9054 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9055
9056 * linux-arm-low.c: Include <signal.h>.
9057 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9058 (struct arm_linux_hwbp_cap): New data type.
9059 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9060 (struct arm_linux_hw_breakpoint): New data type.
9061 (MAX_BPTS, MAX_WPTS): Define.
9062 (struct arch_process_info, struct arch_lwp_info): New data types.
9063 (arm_linux_get_hwbp_cap): New function.
9064 (arm_linux_get_hw_breakpoint_count): Likewise.
9065 (arm_linux_get_hw_watchpoint_count): Likewise.
9066 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9067 (arm_hwbp_control_initialize): Likewise.
9068 (arm_hwbp_control_is_enabled): Likewise.
9069 (arm_hwbp_control_is_initialized): Likewise.
9070 (arm_hwbp_control_disable): Likewise.
9071 (arm_linux_hw_breakpoint_equal): Likewise.
9072 (arm_linux_hw_point_initialize): Likewise.
9073 (struct update_registers_data): New data structure.
9074 (update_registers_callback: New function.
9075 (arm_insert_point): Likewise.
9076 (arm_remove_point): Likewise.
9077 (arm_stopped_by_watchpoint): Likewise.
9078 (arm_stopped_data_address): Likewise.
9079 (arm_new_process): Likewise.
9080 (arm_new_thread): Likewise.
9081 (arm_prepare_to_resume): Likewise.
9082 (the_low_target): Register arm_insert_point, arm_remove_point,
9083 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9084 arm_new_thread, and arm_prepare_to_resume.
9085
9086 2011-09-15 Stan Shebs <stan@codesourcery.com>
9087
9088 * server.h (struct emit_ops): Add compare-goto fields.
9089 * tracepoint.c (gdb_agent_op_sizes): New table.
9090 (emit_eq_goto): New function.
9091 (emit_ne_goto): New function.
9092 (emit_lt_goto): New function.
9093 (emit_le_goto): New function.
9094 (emit_gt_goto): New function.
9095 (emit_ge_goto): New function.
9096 (is_goto_target): New function.
9097 (compile_bytecodes): Recognize special cases of compare-goto
9098 combinations and call specialized emitters for them.
9099 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9100 (amd64_emit_ne_goto): New function.
9101 (amd64_emit_lt_goto): New function.
9102 (amd64_emit_le_goto): New function.
9103 (amd64_emit_gt_goto): New function.
9104 (amd64_emit_ge_goto): New function.
9105 (amd64_emit_ops): Add the new functions.
9106 (i386_emit_eq_goto): New function.
9107 (i386_emit_ne_goto): New function.
9108 (i386_emit_lt_goto): New function.
9109 (i386_emit_le_goto): New function.
9110 (i386_emit_gt_goto): New function.
9111 (i386_emit_ge_goto): New function.
9112 (i386_emit_ops): Add the new functions.
9113
9114 2011-09-08 Stan Shebs <stan@codesourcery.com>
9115
9116 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9117 (i386_emit_epilogue): Restore %ebx.
9118
9119 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9120
9121 * server.c (step_thread): Remove definition.
9122 (process_serial_event): Don't handle Hs.
9123 * server.h (step_thread): Remove declaration.
9124 * target.c (set_desired_inferior): Remove use of step_thread.
9125
9126 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9127
9128 * linux-low.c: Include linux-procfs.h.
9129 (linux_attach_lwp_1): Update comments.
9130 (linux_attach): Scan for existing threads when attaching to a
9131 process that is the tgid.
9132 * Makefile.in: Update dependencies.
9133
9134 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9135
9136 * configure.srv: Add linux-procfs.o dependencies.
9137
9138 2011-08-14 Yao Qi <yao@codesourcery.com>
9139
9140 * target.h (struct target_ops): Fix indent.
9141 * win32-low.c (win32_target_ops): Fix comment.
9142
9143 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9144 Yao Qi <yao@codesourcery.com>
9145
9146 * Makefile.in (clean): Remove tic6x-*.c files.
9147 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9148 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9149 (tic6x-c64xp-linux.c): Likewise.
9150 * configure.srv: Add support for tic6x-*-uclinux.
9151 * linux-tic6x-low.c: New.
9152 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9153
9154 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9155 Yao Qi <yao@codesourcery.com>
9156
9157 * target.h (struct target_ops): Add read_loadmap.
9158 * linux-low.c (struct target_loadseg): New type.
9159 (struct target_loadmap): New type.
9160 (linux_read_loadmap): New function.
9161 (linux_target_ops): Add linux_read_loadmap.
9162 * server.c (handle_query): Support qXfer:fdpic:read packet.
9163 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9164 to NULL.
9165
9166 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9167
9168 * win32-low.c: Include <stdint.h>.
9169
9170 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9171
9172 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9173 to the inferior here.
9174 (i386_remove_aligned_watchpoint): Ditto.
9175 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9176 fit part of the watchpoint in the debug registers.
9177 (i386_update_inferior_debug_regs): New.
9178 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9179 registers, and only update the inferior on success.
9180 (i386_low_remove_watchpoint): Ditto.
9181
9182 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9183
9184 * linux-low.c (compare_ints, unique, list_threads, show_process,
9185 linux_core_of_thread): Delete.
9186 (linux_target_ops): Change linux_core_of_thread to
9187 linux_common_core_of_thread.
9188 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9189 * utils.c (malloc_failure): Change type of argument.
9190 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9191 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9192 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9193 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9194 (IPA_OBJS): Add common-utils-ipa.o.
9195 (ptid_h, linux_osdata_h): New macros.
9196 (server_h): Add common/common-utils.h, common/xml-utils.h,
9197 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9198 common/ptid.h.
9199 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9200 ptid.o, buffer.o): New rules.
9201 (linux-low.o): Add common/linux-osdata.h as a dependency.
9202 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9203 * configure.ac: Add AC_HEADER_DIRENT check.
9204 * config.in: Regenerate.
9205 * configure: Regenerate.
9206 * remote-utils.c (xml_escape_text): Delete.
9207 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9208 buffer_xml_printf): Move to common/buffer.c.
9209 * server.c (main): Remove call to initialize_inferiors.
9210 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9211 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9212 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9213 internal_error, gdb_assert, gdb_assert_fail): Delete.
9214 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9215 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9216 common/buffer.h.
9217 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9218 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9219 initialize_inferiors): Delete.
9220
9221 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9222
9223 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9224 symbol error.
9225
9226 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9227
9228 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9229 assertion.
9230 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9231
9232 2011-05-26 Yao Qi <yao@codesourcery.com>
9233
9234 * Makefile.in (thread-db.o): Track dependence to
9235 common/gdb_thread_db.h.
9236 * thread-db.c: include gdb_thread_db.h from right place.
9237
9238 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9239
9240 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9241 __FILE__ and __LINE__ to internal_error.
9242
9243 2011-05-13 Doug Evans <dje@google.com>
9244
9245 * thread-db.c (try_thread_db_load_from_sdir): New function.
9246 (try_thread_db_load_from_dir): New function.
9247 (thread_db_load_search): Handle $sdir, ignore $pdir.
9248 Remove trying of system directories if search of
9249 libthread-db-search-path fails, that is now done via $sdir.
9250
9251 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9252
9253 * server.c (handle_query): Add EnableDisableTracepoints to the list
9254 of supported features.
9255 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9256 tracepoints.
9257 (cmd_qtenable_disable): New.
9258 (cmd_qtstart): Install tracepoints even if disabled.
9259 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9260 receiving a QTEnable or QTDisable packet.
9261 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9262 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9263 tracepoints.
9264 (gdb_probe): Skip data collection if static tracepoint is disabled.
9265
9266 2011-05-10 Doug Evans <dje@google.com>
9267
9268 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9269
9270 2011-05-04 Doug Evans <dje@google.com>
9271
9272 * linux-low.c (linux_join): Skip process lookup.
9273 * spu-low.c (spu_join): Ditto.
9274 * server.c (join_inferiors_callback): Delete.
9275 (process_serial_event): For 'D' packet (detach) call join_inferior
9276 directly.
9277
9278 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9279
9280 * README: Don't mention xscale*-*-linux*.
9281 * configure.srv (xscale*-*-linux*): Don't handle target.
9282
9283 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9284
9285 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9286 casting pointers.
9287 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9288 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9289 (i386_emit_void_call_2): Likewise.
9290
9291 2011-04-26 Yao Qi <yao@codesourcery.com>
9292
9293 * linux-low.c: Move common macros to linux-ptrace.h.
9294 Include linux-ptrace.h.
9295 * Makefile.in (linux_ptrace_h): New.
9296 (linux-low.o): Depends on linux-ptrace.h.
9297
9298 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9299
9300 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9301 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9302 (remote_prepare): New function with most of the TCP code from ...
9303 (remote_open): ... here. Detect PORT here unconditionally. Move also
9304 setting transport_is_reliable.
9305 * server.c (run_once): New variable.
9306 (gdbserver_usage): Document it.
9307 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9308 the first run if RUN_ONCE.
9309 * server.h (run_once, remote_prepare): New declarations.
9310
9311 2011-04-19 Tom Tromey <tromey@redhat.com>
9312
9313 * win32-low.c (handle_load_dll): Remove duplicate "the".
9314
9315 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9316
9317 Remove support for old Cygwin 1.5 versions.
9318 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9319 function to avoid warning.
9320 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9321 warning.
9322
9323 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9324
9325 * gdbserver/server.h (Macro _): Define it if not available.
9326
9327 2011-03-14 Michael Snyder <msnyder@vmware.com>
9328
9329 * hostio.c (handle_close): Remove unnecessary null test.
9330
9331 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9332
9333 * Makefile.in (maintainer-clean realclean distclean): Remove
9334 "make ... subdir_do" command.
9335
9336 2011-03-10 Michael Snyder <msnyder@vmware.com>
9337
9338 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9339
9340 * server.c (handle_v_run): Free alloced buffer on early return.
9341
9342 2011-03-09 Yao Qi <yao@codesourcery.com>
9343
9344 Revert:
9345 2011-03-04 Yao Qi <yao@codesourcery.com>
9346
9347 * Makefile.in: Remove GNU make feature --directory.
9348
9349 2011-03-05 Yao Qi <yao@codesourcery.com>
9350
9351 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9352 (subdir_do): New make target. Copied from gdb/Makefile.
9353 (maintainer-clean, realclean, distclean, clean): Call corresponding
9354 make targets in common/Makefile.
9355
9356 2011-02-11 Yao Qi <yao@codesourcery.com>
9357
9358 * configure.ac: Call AC_PROG_RANLIB.
9359 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9360 * configure: Regenerate.
9361
9362 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9363
9364 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9365
9366 2011-03-06 Yao Qi <yao@codesourcery.com>
9367
9368 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9369
9370 2011-03-05 Yao Qi <yao@codesourcery.com>
9371
9372 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9373 (subdir_do): New make target. Copied from gdb/Makefile.
9374 (maintainer-clean, realclean, distclean, clean): Call corresponding
9375 make targets in common/Makefile.
9376
9377 2011-03-04 Yao Qi <yao@codesourcery.com>
9378
9379 * Makefile.in: Remove GNU make feature --directory.
9380
9381 2011-03-04 Michael Snyder <msnyder@vmware.com>
9382
9383 * server.c (queue_stop_reply): Call xmalloc not malloc.
9384
9385 2011-03-02 Michael Snyder <msnyder@vmware.com>
9386
9387 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9388
9389 2011-02-28 Michael Snyder <msnyder@vmware.com>
9390
9391 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9392 (cmd_qtframe): Ditto.
9393 (cmd_qtbuffer): Ditto.
9394 (cmd_bigqtbuffer): Ditto.
9395
9396 * utils.c (decimal2str): Initialize 'width' to nine, then
9397 don't mess with it.
9398
9399 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9400
9401 * hostio.c (require_data): Free *data, not data.
9402
9403 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9404
9405 * hostio.c (require_data): Use free, not xfree.
9406
9407 2011-02-27 Michael Snyder <msnyder@vmware.com>
9408
9409 * server.c (handle_query): Discard unused value.
9410
9411 * hostio.c (require_data): Free malloc memory before returning
9412 error.
9413
9414 2011-02-26 Michael Snyder <msnyder@vmware.com>
9415
9416 * linux-low.c (list_threads): Call closedir for dirent.
9417
9418 2011-02-27 Michael Snyder <msnyder@vmware.com>
9419
9420 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9421 a case statement falls through.
9422
9423 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9424
9425 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9426 in comparison.
9427
9428 2011-02-26 Michael Snyder <msnyder@vmware.com>
9429
9430 * utils.c (decimal2str): Eliminate dead code and dead param.
9431 (pulongest): Drop dead param from call to decimal2str.
9432 (plongest): Ditto.
9433
9434 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9435
9436 Revert the following patch (not approved yet):
9437 2011-02-21 Hui Zhu <teawater@gmail.com>
9438 * tracepoint.c (tp_printf): New function.
9439 (eval_agent_expr): Handle gdb_agent_op_printf.
9440
9441 2011-02-21 Hui Zhu <teawater@gmail.com>
9442
9443 * tracepoint.c (tp_printf): New function.
9444 (eval_agent_expr): Handle gdb_agent_op_printf.
9445
9446 2011-02-18 Tom Tromey <tromey@redhat.com>
9447
9448 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9449 (tracepoint.o): Likewise.
9450 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9451 (gdb_agent_op_names): Likewise.
9452
9453 2011-02-18 Tom Tromey <tromey@redhat.com>
9454
9455 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9456 gdb_agent_op_rot>: New constants.
9457 (gdb_agent_op_names): Add pick and roll.
9458 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9459 cases.
9460
9461 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9462
9463 * aclocal.m4: Regenerated with aclocal-1.11.1.
9464
9465 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9466
9467 * server.c (handle_qxfer_traceframe_info): New.
9468 (qxfer_packets): Register "traceframe-info".
9469 (handle_query): Report support for qXfer:traceframe-info:read+.
9470 * tracepoint.c (match_blocktype): New.
9471 (traceframe_find_block_type): Rename to ...
9472 (traceframe_walk_blocks): ... this. Add callback filter argument,
9473 and use it.
9474 (traceframe_find_block_type): New, reimplemented on top of
9475 traceframe_walk_blocks.
9476 (build_traceframe_info_xml): New.
9477 (traceframe_read_info): New.
9478 * server.h (traceframe_read_info): Declare.
9479
9480 2011-02-11 Yao Qi <yao@codesourcery.com>
9481
9482 * configure.ac: Call AC_PROG_RANLIB.
9483 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9484 * configure: Regenerate.
9485
9486 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9487
9488 * server.c (gdb_read_memory): Change return semantics to allow
9489 partial transfers.
9490 (handle_search_memory_1): Adjust.
9491 (process_serial_event) <'m' packet>: Handle partial transfers.
9492 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9493
9494 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9495
9496 * regcache.c (init_register_cache): Initialize
9497 regcache->register_status.
9498 (free_register_cache): Release regcache->register_status.
9499 (regcache_cpy): Copy register_status.
9500 (registers_to_string): Print 'x's for unavailable registers.
9501 (supply_register): Mark the register's status valid or
9502 unavailable, depending on whether a buffer was passed in or not.
9503 (supply_register_zeroed): New.
9504 (supply_regblock): Mark the registers' status valid or
9505 unavailable, depending on whether a buffer was passed in or not.
9506 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9507 (struct regcache): New `register_status' field.
9508 (supply_register_zeroed): Declare.
9509 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9510 supply_register_zeroed, rather than passing a NULL buffer to
9511 supply_register.
9512 * tracepoint.c (fetch_traceframe_registers): Update comment.
9513
9514 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9515
9516 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9517 buffer explicit.
9518
9519 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9520
9521 * server.h (decode_xfer_write): Change prototype.
9522 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9523 and don't extract the annex here.
9524 * server.c (decode_xfer_read): Remove `annex' parameter,
9525 and don't extract the annex here.
9526 (decode_xfer): New.
9527 (struct qxfer): New.
9528 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9529 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9530 (handle_qxfer_statictrace): New functions, abstracted out from
9531 handle_query, and made to use the struct qxfer interface.
9532 (handle_threads_qxfer_proper): Rename to ...
9533 (handle_qxfer_threads_proper): ... this.
9534 (handle_threads_qxfer): Rename to ...
9535 (handle_qxfer_threads): ... this. Adjust.
9536 (qxfer_packets): New array.
9537 (handle_qxfer): New function.
9538 (handle_query): Use handle_qxfer.
9539
9540 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9541
9542 * gdbreplay.c: Shorten lines of >= 80 columns.
9543 * linux-low.c: Ditto.
9544 * linux-ppc-low.c: Ditto.
9545 * linux-s390-low.c: Ditto.
9546 * linux-sparc-low.c: Ditto.
9547 * linux-x86-low.c: Ditto.
9548 * linux-xtensa-low.c: Ditto.
9549 * mem-break.c: Ditto.
9550 * nto-low.c: Ditto.
9551 * regcache.h: Ditto.
9552 * remote-utils.c: Ditto.
9553 * server.c: Ditto.
9554 * server.h: Ditto.
9555 * thread-db.c: Ditto.
9556 * tracepoint.c: Ditto.
9557 * utils.c: Ditto.
9558 * win32-low.h: Ditto.
9559
9560 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9561
9562 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9563 update.
9564
9565 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9566
9567 * server.c (gdbserver_version): Update copyright year in version
9568 output.
9569 * gdbreplay.c (gdbreplay_version): Ditto.
9570
9571 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9572
9573 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9574 * linux-bfin-low.c: New file.
9575 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9576 PT_DATA_ADDR for BFIN targets.
9577 * Makefile.in (SFILES): Add linux-bfin-low.c.
9578 (clean): Remove reg-bfin.c.
9579 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9580 * README: Mention supported Blackfin targets.
9581
9582 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9583
9584 * .gitignore: New file.
9585
9586 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9587
9588 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9589
9590 2010-10-22 Jie Zhang <jie@codesourcery.com>
9591
9592 * Makefile.in: Add FLAGS_TO_PASS variable.
9593 (install): Remove dependency of install-only and recursively
9594 invoke make for install-only.
9595
9596 2010-10-04 Doug Evans <dje@google.com>
9597
9598 * Makefile.in (uninstall): Use $(DESTDIR).
9599
9600 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9601
9602 PR gdb/11842
9603
9604 * linux-x86-low.c (compat_siginfo_from_siginfo)
9605 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9606 si_code is < 0. Check for si_code == SI_TIMER before checking for
9607 si_code < 0.
9608
9609 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9610
9611 * lynx-i386-low.c: New file.
9612 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9613
9614 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9615
9616 * lynx-low.c (ptrace_request_to_str): Remove handling for
9617 request values that have been removed in LynxOS 5.x.
9618
9619 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9620
9621 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9622 <ptrace.h>
9623
9624 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9625
9626 * configure.ac: Add --enable-inprocess-agent option.
9627 * configure: Rebuilt.
9628
9629 2010-09-06 Yao Qi <yao@codesourcery.com>
9630
9631 * linux-low.c (linux_kill): Remove unused variable.
9632 (linux_stabilize_threads): Likewise.
9633 * server.c (start_inferior): Likewise.
9634 (queue_stop_reply_callback): Likewise.
9635 * tracepoint.c (do_action_at_tracepoint): Likewise.
9636
9637 2010-09-06 Yao Qi <yao@codesourcery.com>
9638
9639 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9640 on return.
9641
9642 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9645
9646 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9647
9648 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9649 "$(IPA_DEPFILES)".
9650
9651 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9652
9653 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9654 gdbserver/lynx-ppc-low.c: New files.
9655 * Makefile.in (lynx_low_h): New variable.
9656 (lynx-low.o, lynx-ppc-low.o): New rules.
9657 * configure.ac: On LynxOS, link with -lnetinet.
9658 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9659 * configure: regenerate.
9660
9661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9662
9663 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9664 * configure.ac: Add check for vasprintf and vsnprintf.
9665 * configure, config.in: Regenerate.
9666 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9667
9668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9669
9670 * gdbreplay.c: Move include of alloca.h up, next to include of
9671 malloc.h.
9672 * server.h: Add include of malloc.h.
9673 * mem-break.c: Remove include of malloc.h.
9674 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9675
9676 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9677
9678 * Makefile.in (memmem.o): Build with -Wno-error.
9679
9680 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9681
9682 * utils.c (xsnprintf): Make non-static.
9683 * server.h: Add xsnprintf declaration.
9684 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9685 replace calls to snprintf by calls to xsnprintf throughout.
9686
9687 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9688
9689 * configure.ac: Add configure check for alloca.
9690 * configure, config.in: Regenerate.
9691 * server.h: Include alloca.h if it exists.
9692 * gdbreplay.c: Include alloca.h if it exists.
9693
9694 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9695
9696 * linux-low.c (__SIGRTMIN): Define if not already defined.
9697 (linux_create_inferior): Check for __ANDROID__ rather than
9698 __SIGRTMIN.
9699 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9700 are already deferred.
9701 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9702 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9703 stopped and already has a pending signal to report.
9704 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9705 a pending signal to report or is moving out of a jump pad.
9706 (linux_init_signals): Check for __ANDROID__ rather than
9707 __SIGRTMIN.
9708
9709 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9710
9711 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9712 debug_threads check. Avoid a linear search when not doing debug
9713 output.
9714
9715 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9716
9717 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9718 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9719 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9720 (process_event): Change local fd's type to gdb_fildes_t.
9721 (create_file_handler): Adjust prototype.
9722 (delete_file_handler): Adjust prototype.
9723 (handle_file_event): Adjust prototype. Use pfildes.
9724 (create_file_event): Adjsut prototype.
9725 * remote-utils.c (remote_desc, listen_desc): Change type to
9726 gdb_fildes_t.
9727 * server.h: New gdb_fildes_t typedef.
9728 [USE_WIN32API]: Include winsock2.h.
9729 (delete_file_handler, add_file_handler): Adjust prototypes.
9730 (pfildes): Declare.
9731 * utils.c (pfildes): New.
9732
9733 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9734
9735 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9736 * configure: Regenerate.
9737
9738 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9739
9740 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9741 (linux_done_accessing_memory): ... this.
9742 (linux_target_ops): Adjust.
9743 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9744 * nto-low.c (nto_target_ops): Adjust comment.
9745 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9746 * spu-low.c (spu_target_ops): Adjust comment.
9747 * target.h (target_ops): Rename unprepare_to_access_memory field
9748 to done_accessing_memory.
9749 (unprepare_to_access_memory): Rename to ...
9750 (done_accessing_memory): ... this.
9751
9752 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9753
9754 * linux-low.c (linux_prepare_to_access_memory): New.
9755 (linux_unprepare_to_access_memory): New.
9756 (linux_target_ops): Install them.
9757 * server.c (read_memory): Rename to ...
9758 (gdb_read_memory): ... this. Use
9759 prepare_to_access_memory/prepare_to_access_memory.
9760 (write_memory): Rename to ...
9761 (gdb_write_memory): ... this. Use
9762 prepare_to_access_memory/prepare_to_access_memory.
9763 (handle_search_memory_1): Adjust.
9764 (process_serial_event): Adjust.
9765 * target.h (struct target_ops): New fields
9766 prepare_to_access_memory and unprepare_to_access_memory.
9767 (prepare_to_access_memory, unprepare_to_access_memory): New.
9768 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9769 prepare_to_access_memory/prepare_to_access_memory.
9770 * nto-low.c (nto_target_ops): Adjust.
9771 * spu-low.c (spu_target_ops): Adjust.
9772 * win32-low.c (win32_target_ops): Adjust.
9773
9774 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9775
9776 * Makefile.in (WARN_CFLAGS): Get it from configure.
9777 (WERROR_CFLAGS): New.
9778 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9779 * configure.ac: Introduce --enable-werror, which adds -Werror to
9780 the compiler command line. Enabled by default. Disable with
9781 --disable-werror. Add -Wdeclaration-after-statement
9782 Wpointer-arith and -Wformat-nonliteral to warning flags.
9783 * configure: Regenerate.
9784
9785 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9786
9787 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9788
9789 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9790
9791 * gdbreplay.c (remote_error): New.
9792 (gdbchar): New.
9793 (expect): Use gdbchar. Check for error reading from GDB.
9794 Clarify sync error output.
9795 (play): Check for errors writing to GDB.
9796 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9797 * remote-utils.c (getpkt): Check for errors writing to the remote
9798 descriptor.
9799
9800 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9801
9802 * linux-low.c (linux_wait_1): Move non-debugging code out of
9803 `debug_threads' control.
9804
9805 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9806
9807 * linux-low.c (linux_wait_1): Don't set last_status here.
9808 * server.c (push_event, queue_stop_reply_callback): Assert we're
9809 not pushing a TARGET_WAITKIND_IGNORE event.
9810 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9811 (myresume, handle_target_event): Set the thread's last_resume_kind
9812 and last_status from the target returned status.
9813
9814 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9815
9816 PR threads/10729
9817
9818 * linux-x86-low.c (update_debug_registers_callback): New.
9819 (i386_dr_low_set_addr): Use it.
9820 (i386_dr_low_get_addr): New.
9821 (i386_dr_low_set_control): Use update_debug_registers_callback.
9822 (i386_dr_low_get_control): New.
9823 (i386_dr_low_get_status): Adjust.
9824 * linux-low.c (linux_stop_lwp): New.
9825 * linux-low.h (linux_stop_lwp): Declare.
9826
9827 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9828 argument instead of a i386_debug_reg_state.
9829 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9830 a i386_debug_reg_state.
9831 (i386_insert_aligned_watchpoint): Adjust.
9832 (i386_remove_aligned_watchpoint): Adjust.
9833 (i386_low_stopped_data_address): Read the debug registers from the
9834 inferior instead of from the mirrors.
9835 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9836 (i386_dr_low_get_addr): Declare.
9837 (i386_dr_low_get_control): Declare.
9838 (i386_dr_low_get_status): Change prototype.
9839
9840 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9841 (i386_dr_low_get_addr): New.
9842 (i386_dr_low_get_control): New.
9843 (i386_dr_low_get_status): Adjust prototype. Return
9844 dr_status_mirror.
9845 (i386_initial_stuff): Clear dr_status_mirror and
9846 dr_control_mirror.
9847 (i386_get_thread_context): Adjust.
9848 (i386_set_thread_context): Adjust.
9849 (i386_thread_added): Adjust.
9850
9851 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9852
9853 * linux-low.h (linux_thread_area): Delete declaration.
9854
9855 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9856
9857 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9858 after its termination.
9859
9860 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9861
9862 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9863 (gdb_wants_all_stopped): Delete.
9864 (linux_wait_1): Don't call them.
9865 * server.c (handle_v_cont): Tag all threads as want-stopped.
9866 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9867 stopped as "client-wants-stopped".
9868
9869 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9870
9871 * Makefile.in (signals_h): New.
9872 (server_h): Depend on it.
9873 (server.o): Don't depend on $(signals_def).
9874 (signals.o): Depend on $(signals_def).
9875
9876 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9877
9878 * Makefile.in (signals_def): New.
9879 (server_h): Append include/gdb/signals.h and signals_def.
9880 (server.o): Append signals_def.
9881
9882 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9883
9884 * server.c (handle_target_event): Use target_signal_to_host for
9885 resume_info.sig initialization.
9886 * target.h (struct thread_resume) <sig>: New comment.
9887
9888 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9889
9890 * server.c (handle_query): strcpy() the returned string from paddress()
9891 instead of sprintf().
9892 * utils.c (paddress): Return phex_nz().
9893
9894 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9895
9896 * server.c (handle_v_cont): Call mourn_inferior if process
9897 just exited.
9898 (myresume): Likewise.
9899
9900 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9901
9902 Static tracepoints, and integration with UST.
9903
9904 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9905 * mem-break.c (uninsert_all_breakpoints)
9906 (reinsert_all_breakpoints): New.
9907 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9908 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9909 (gdb_agent_ust_loaded, helper_thread_id)
9910 (gdb_agent_helper_thread_id): New macros.
9911 (struct ipa_sym_addresses): Add addr_ust_loaded,
9912 addr_helper_thread_id, addr_cmd_buf.
9913 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9914 (in_process_agent_loaded_ust): New.
9915 (write_e_ust_not_loaded): New.
9916 (maybe_write_ipa_ust_not_loaded): New.
9917 (struct collect_static_trace_data_action): New.
9918 (enum tracepoint_type) <static_tracepoint>: New.
9919 (struct tracepoint) <handle>: Mention static tracepoints.
9920 (struct static_tracepoint_ctx): New.
9921 (CMD_BUF_SIZE): New.
9922 (add_tracepoint_action): Handle static tracepoint actions.
9923 (unprobe_marker_at): New.
9924 (clear_installed_tracepoints): Handle static tracepoints.
9925 (cmd_qtdp): Handle static tracepoints.
9926 (probe_marker_at): New.
9927 (cmd_qtstart): Handle static tracepoints.
9928 (response_tracepoint): Handle static tracepoints.
9929 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9930 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9931 (get_context_regcache): Handle static tracepoints.
9932 (do_action_at_tracepoint): Handle static tracepoint actions.
9933 (traceframe_find_block_type): Handle static trace data blocks.
9934 (traceframe_read_sdata): New.
9935 (download_tracepoints): Download static tracepoint actions.
9936 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9937 (GDB_PROBE_NAME): New.
9938 (ust_ops): New.
9939 (GET_UST_SYM): New.
9940 (USTF): New.
9941 (dlsym_ust): New.
9942 (ust_marker_to_static_tracepoint): New.
9943 (gdb_probe): New.
9944 (collect_ust_data_at_tracepoint): New.
9945 (gdb_ust_probe): New.
9946 (UNIX_PATH_MAX, SOCK_DIR): New.
9947 (gdb_ust_connect_sync_socket): New.
9948 (resume_thread, stop_thread): New.
9949 (run_inferior_command): New.
9950 (init_named_socket): New.
9951 (gdb_ust_socket_init): New.
9952 (cstr_to_hexstr): New.
9953 (next_st): New.
9954 (first_marker, next_marker): New.
9955 (response_ust_marker): New.
9956 (cmd_qtfstm, cmd_qtsstm): New.
9957 (unprobe_marker_at, probe_marker_at): New.
9958 (cmd_qtstmat, gdb_ust_thread): New.
9959 (gdb_ust_init): New.
9960 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9961 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9962 (ST_REGENTRY): New.
9963 (x86_64_st_collect_regmap): New.
9964 (X86_64_NUM_ST_COLLECT_GREGS): New.
9965 (AMD64_RIP_REGNUM): New.
9966 (supply_static_tracepoint_registers): New.
9967 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9968 (ST_REGENTRY): New.
9969 (i386_st_collect_regmap): New.
9970 (i386_NUM_ST_COLLECT_GREGS): New.
9971 (supply_static_tracepoint_registers): New.
9972 * server.c (handle_query): Handle qXfer:statictrace:read.
9973 <qSupported>: Report support for StaticTracepoints, and
9974 qXfer:statictrace:read features.
9975 * server.h (traceframe_read_sdata)
9976 (supply_static_tracepoint_registers): Declare.
9977 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9978 (unpack_varlen_hex): Include in IPA build.
9979 * Makefile.in (ustlibs, ustinc): New.
9980 (IPA_OBJS): Add remote-utils-ipa.o.
9981 ($(IPA_LIB)): Link -ldl and -lpthread.
9982 (UST_CFLAGS): New.
9983 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9984 * config.in, configure: Regenerate.
9985
9986 2010-06-20 Ian Lance Taylor <iant@google.com>
9987 Pedro Alves <pedro@codesourcery.com>
9988
9989 * linux-x86-low.c (always_true): Delete.
9990 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9991 trying to fool the compiler with always_true.
9992
9993 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9994
9995 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9996 conditions in gdbserver.
9997
9998 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9999
10000 * spu-low.c (spu_read_memory): Wrap around local store limit.
10001 (spu_write_memory): Likewise.
10002
10003 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10004
10005 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10006 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10007 LONGEST uses.
10008 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10009 uses.
10010 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10011 uses with LONGEST uses.
10012
10013 2010-06-14 Stan Shebs <stan@codesourcery.com>
10014 Pedro Alves <pedro@codesourcery.com>
10015
10016 Bytecode compiler.
10017
10018 * linux-x86-low.c: Include limits.h.
10019 (add_insns): New.
10020 (always_true): New.
10021 (EMIT_ASM): New.
10022 (EMIT_ASM32): New.
10023 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10024 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10025 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10026 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10027 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10028 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10029 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10030 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10031 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10032 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10033 (amd64_emit_void_call_2): New.
10034 (amd64_emit_ops): New.
10035 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10036 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10037 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10038 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10039 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10040 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10041 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10042 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10043 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10044 (i386_emit_stack_adjust, i386_emit_int_call_1)
10045 (i386_emit_void_call_2): New.
10046 (i386_emit_ops): New.
10047 (x86_emit_ops): New.
10048 (the_low_target): Install x86_emit_ops.
10049 * server.h (struct emit_ops): New.
10050 (get_raw_reg_func_addr): Declare.
10051 (current_insn_ptr, emit_error): Declare.
10052 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10053 (set_trace_state_variable_value): New defines.
10054 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10055 addr_get_trace_state_variable_value and
10056 addr_set_trace_state_variable_value.
10057 (symbol_list): New fields for get_raw_reg,
10058 get_trace_state_variable_value and set_trace_state_variable_value.
10059 (condfn): New typedef.
10060 (struct tracepoint): New field `compiled_cond'.
10061 (do_action_at_tracepoint): Clear compiled_cond.
10062 (get_trace_state_variable_value, set_trace_state_variable_value):
10063 Export in the IPA.
10064 (condition_true_at_tracepoint): If there's a compiled condition,
10065 run that.
10066 (current_insn_ptr, emit_error): New globals.
10067 (struct bytecode_address): New.
10068 (get_raw_reg_func_addr): New.
10069 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10070 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10071 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10072 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10073 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10074 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10075 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10076 (compile_tracepoint_condition, compile_bytecodes): New.
10077 * target.h (emit_ops): Forward declare.
10078 (struct target_ops): New field emit_ops.
10079 (target_emit_ops): New.
10080 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10081 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10082 * linux-low.c (linux_emit_ops): New.
10083 (linux_target_ops): Install it.
10084 * linux-low.h (struct linux_target_ops): New field emit_ops.
10085
10086 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10087
10088 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10089 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10090
10091 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10092 Stan Shebs <stan@codesourcery.com>
10093
10094 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10095 (all): Depend on $(extra_libraries).
10096 (install-only): Install the IPA.
10097 (IPA_OBJS, IPA_LIB): New.
10098 (clean): Remove the IPA lib.
10099 (IPAGENT_CFLAGS): New.
10100 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10101 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10102 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10103 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10104 * configure.ac: Check for atomic builtins support in the compiler.
10105 (IPA_DEPFILES, extra_libraries): Define.
10106 * configure.srv (ipa_obj): Add description.
10107 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10108 (i[34567]86-*-linux*): Set ipa_obj.
10109 (x86_64-*-linux*): Set ipa_obj.
10110 * linux-low.c (stabilizing_threads): New.
10111 (supports_fast_tracepoints): New.
10112 (linux_detach): Stabilize threads before detaching.
10113 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10114 the lwp is either not stabilizing, or is moving out of a jump pad.
10115 (linux_fast_tracepoint_collecting): New.
10116 (maybe_move_out_of_jump_pad): New.
10117 (enqueue_one_deferred_signal): New.
10118 (dequeue_one_deferred_signal): New.
10119 (linux_wait_for_event_1): If moving out of a jump pad, defer
10120 pending signals to later.
10121 (linux_stabilize_threads): New.
10122 (linux_wait_1): Check if threads need moving out of jump pads, and
10123 do it if so.
10124 (stuck_in_jump_pad_callback): New.
10125 (move_out_of_jump_pad_callback): New.
10126 (lwp_running): New.
10127 (linux_resume_one_lwp): Handle moving out of jump pads.
10128 (linux_set_resume_request): Dequeue deferred signals.
10129 (need_step_over_p): Also step over fast tracepoint jumps.
10130 (start_step_over): Also uninsert fast tracepoint jumps.
10131 (finish_step_over): Also reinsert fast tracepoint jumps.
10132 (linux_install_fast_tracepoint_jump): New.
10133 (linux_target_ops): Install linux_stabilize_threads and
10134 linux_install_fast_tracepoint_jump_pad.
10135 * linux-low.h (linux_target_ops) <get_thread_area,
10136 install_fast_tracepoint_jump_pad>: New fields.
10137 (struct lwp_info) <collecting_fast_tracepoint,
10138 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10139 (linux_get_thread_area): Declare.
10140 * linux-x86-low.c (jump_insn): New.
10141 (x86_get_thread_area): New.
10142 (append_insns): New.
10143 (push_opcode): New.
10144 (amd64_install_fast_tracepoint_jump_pad): New.
10145 (i386_install_fast_tracepoint_jump_pad): New.
10146 (x86_install_fast_tracepoint_jump_pad): New.
10147 (the_low_target): Install x86_get_thread_area and
10148 x86_install_fast_tracepoint_jump_pad.
10149 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10150 (struct fast_tracepoint_jump): New.
10151 (fast_tracepoint_jump_insn): New.
10152 (fast_tracepoint_jump_shadow): New.
10153 (find_fast_tracepoint_jump_at): New.
10154 (fast_tracepoint_jump_here): New.
10155 (delete_fast_tracepoint_jump): New.
10156 (set_fast_tracepoint_jump): New.
10157 (uninsert_fast_tracepoint_jumps_at): New.
10158 (reinsert_fast_tracepoint_jumps_at): New.
10159 (set_breakpoint_at): Use write_inferior_memory.
10160 (uninsert_raw_breakpoint): Use write_inferior_memory.
10161 (check_mem_read): Mask out fast tracepoint jumps.
10162 (check_mem_write): Mask out fast tracepoint jumps.
10163 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10164 (set_fast_tracepoint_jump): Declare.
10165 (delete_fast_tracepoint_jump)
10166 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10167 (reinsert_fast_tracepoint_jumps_at): Declare.
10168 * regcache.c: Don't compile many functions when building the
10169 in-process agent library.
10170 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10171 the register buffer in the heap.
10172 (free_register_cache): If the register buffer isn't owned by the
10173 regcache, don't free it.
10174 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10175 pre-existing register caches.
10176 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10177 type.
10178 (convert_ascii_to_int): : Constify `from' parameter type.
10179 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10180 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10181 the needed buffer in-place.
10182 (relocate_instruction): New.
10183 * server.c (handle_query) <qSymbols>: If the target supports
10184 tracepoints, give it a chance of looking up symbols. Report
10185 support for fast tracepoints.
10186 (handle_status): Stabilize threads.
10187 (process_serial_event): Adjust.
10188 * server.h (struct fast_tracepoint_jump): Forward declare.
10189 (struct process_info) <fast_tracepoint_jumps>: New field.
10190 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10191 (decode_X_packet, decode_M_packet): Adjust.
10192 (relocate_instruction): Declare.
10193 (in_process_agent_loaded): Declare.
10194 (tracepoint_look_up_symbols): Declare.
10195 (struct fast_tpoint_collect_status): Declare.
10196 (fast_tracepoint_collecting): Declare.
10197 (force_unlock_trace_buffer): Declare.
10198 (handle_tracepoint_bkpts): Declare.
10199 (initialize_low_tracepoint)
10200 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10201 * target.h (struct target_ops) <stabilize_threads,
10202 install_fast_tracepoint_jump_pad>: New fields.
10203 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10204 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10205 [HAVE_STDINT_H]: Include stdint.h.
10206 (trace_debug_1): Rename to ...
10207 (trace_vdebug): ... this.
10208 (trace_debug): Rename to ...
10209 (trace_debug_1): ... this. Add `level' parameter.
10210 (trace_debug): New.
10211 (ATTR_USED, ATTR_NOINLINE): New.
10212 (IP_AGENT_EXPORT): New.
10213 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10214 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10215 (about_to_request_buffer_space, trace_buffer_is_full)
10216 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10217 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10218 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10219 (traceframe_write_count, traceframes_created)
10220 (trace_state_variables)
10221 New renaming defines.
10222 (struct ipa_sym_addresses): New.
10223 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10224 (symbol_list): New.
10225 (ipa_sym_addrs): New.
10226 (all_tracepoint_symbols_looked_up): New.
10227 (in_process_agent_loaded): New.
10228 (write_e_ipa_not_loaded): New.
10229 (maybe_write_ipa_not_loaded): New.
10230 (tracepoint_look_up_symbols): New.
10231 (debug_threads) [IN_PROCESS_AGENT]: New.
10232 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10233 (UNKNOWN_SIDE_EFFECTS): New.
10234 (stop_tracing): New.
10235 (flush_trace_buffer): New.
10236 (stop_tracing_bkpt): New.
10237 (flush_trace_buffer_bkpt): New.
10238 (read_inferior_integer): New.
10239 (read_inferior_uinteger): New.
10240 (read_inferior_data_pointer): New.
10241 (write_inferior_data_pointer): New.
10242 (write_inferior_integer): New.
10243 (write_inferior_uinteger): New.
10244 (struct collect_static_trace_data_action): Delete.
10245 (enum tracepoint_type): New.
10246 (struct tracepoint) <type>: New field `type'.
10247 <actions_str, step_actions, step_actions_str>: Only include in
10248 GDBserver.
10249 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10250 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10251 (tracepoints): Use IP_AGENT_EXPORT.
10252 (last_tracepoint): Don't include in the IPA.
10253 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10254 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10255 (alloced_trace_state_variables): New.
10256 (trace_state_variables): Use IP_AGENT_EXPORT.
10257 (traceframe_t): Delete unused variable.
10258 (circular_trace_buffer): Don't include in the IPA.
10259 (trace_buffer_start): Delete.
10260 (struct trace_buffer_control): New.
10261 (trace_buffer_free): Delete.
10262 (struct ipa_trace_buffer_control): New.
10263 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10264 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10265 New.
10266 (trace_buffer_ctrl): New.
10267 (TRACE_BUFFER_CTRL_CURR): New.
10268 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10269 Reimplement as macros.
10270 (trace_buffer_wrap): Delete.
10271 (traceframe_write_count, traceframe_read_count)
10272 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10273 (struct tracepoint_hit_ctx) <type>: New field.
10274 (struct fast_tracepoint_ctx): New.
10275 (memory_barrier): New.
10276 (cmpxchg): New.
10277 (record_tracepoint_error): Update atomically in the IPA.
10278 (clear_inferior_trace_buffer): New.
10279 (about_to_request_buffer_space): New.
10280 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10281 updating the same buffer.
10282 (add_tracepoint): Default the tracepoint's type to trap
10283 tracepoint, and orig_size to -1.
10284 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10285 internal variables.
10286 (create_trace_state_variable): New parameter `gdb'. Handle it.
10287 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10288 (cmd_qtdp): Handle fast tracepoints.
10289 (cmd_qtdv): Adjust.
10290 (max_jump_pad_size): New.
10291 (gdb_jump_pad_head): New.
10292 (get_jump_space_head): New.
10293 (claim_jump_space): New.
10294 (sort_tracepoints): New.
10295 (MAX_JUMP_SIZE): New.
10296 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10297 IPA.
10298 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10299 support. Upload fast traceframes, and delete internal IPA
10300 breakpoints.
10301 (stop_tracing_handler): New.
10302 (flush_trace_buffer_handler): New.
10303 (cmd_qtstop): Upload fast tracepoints.
10304 (response_tracepoint): Handle fast tracepoints.
10305 (tracepoint_finished_step): Upload fast traceframes. Set the
10306 tracepoint hit context's tracepoint type.
10307 (handle_tracepoint_bkpts): New.
10308 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10309 type. Add comment about fast tracepoints.
10310 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10311 non-existing action_str field.
10312 (get_context_regcache): Handle fast tracepoints.
10313 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10314 to the regcache.
10315 (fast_tracepoint_from_jump_pad_address): New.
10316 (fast_tracepoint_from_ipa_tpoint_address): New.
10317 (collecting_t): New.
10318 (force_unlock_trace_buffer): New.
10319 (fast_tracepoint_collecting): New.
10320 (collecting): New.
10321 (gdb_collect): New.
10322 (write_inferior_data_ptr): New.
10323 (target_tp_heap): New.
10324 (target_malloc): New.
10325 (download_agent_expr): New.
10326 (UALIGN): New.
10327 (download_tracepoints): New.
10328 (download_trace_state_variables): New.
10329 (upload_fast_traceframes): New.
10330 (IPA_FIRST_TRACEFRAME): New.
10331 (IPA_NEXT_TRACEFRAME_1): New.
10332 (IPA_NEXT_TRACEFRAME): New.
10333 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10334 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10335 (gdb_jump_pad_buffer_end): New.
10336 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10337 (initialize_tracepoint): Adjust.
10338 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10339 buffer. Initialize the low module.
10340 * utils.c (PREFIX, TOOLNAME): New.
10341 (malloc_failure): Use PREFIX.
10342 (error): In the IPA, an error causes an exit.
10343 (fatal, warning): Use PREFIX.
10344 (internal_error): Use TOOLNAME.
10345 (NUMCELLS): Increase to 10.
10346 * configure, config.in: Regenerate.
10347
10348 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10349
10350 * server.c (handle_query) <qSupported>: Do two passes over the
10351 qSupported string to avoid nesting strtok.
10352
10353 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10354
10355 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10356 (CDEPS): New.
10357 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10358 -Wl,--dynamic-list.
10359 * configure: Regenerate.
10360 * proc-service.list: New.
10361
10362 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10363
10364 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10365 New comment.
10366
10367 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10368
10369 * gdbreplay.c (remote_open): Check error return from socket() call by
10370 its equality to -1 not by it being negative.
10371 * remote-utils.c (remote_open): Likewise.
10372
10373 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10374
10375 * config.h: Regenerate.
10376
10377 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10378
10379 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10380 doesn't provide PTRACE_GET_THREAD_AREA.
10381
10382 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10383
10384 * linux-m68k-low.c: Include <asm/ptrace.h>
10385 (ps_get_thread_area): Implement.
10386
10387 2010-05-03 Doug Evans <dje@google.com>
10388
10389 * event-loop.c (struct callback_event): New struct.
10390 (callback_list): New global.
10391 (append_callback_event, delete_callback_event): New functions.
10392 (process_callback): New function.
10393 (start_event_loop): Call it.
10394 * remote-utils.c (NOT_SCHEDULED): Define.
10395 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10396 moved out of readchar.
10397 (readchar): Rewrite. Call reschedule before returning.
10398 (reset_readchar): New function.
10399 (remote_close): Call it.
10400 (process_remaining, reschedule): New functions.
10401 * server.h (callback_handler_func): New typedef.
10402 (append_callback_event, delete_callback_event): Declare.
10403
10404 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10405
10406 * proc-service.c (ps_pglobal_lookup): Use
10407 thread_db_look_up_one_symbol.
10408 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10409 parameter. Use it instead of all_symbols_looked_up.
10410 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10411 field.
10412 (all_symbols_looked_up): Don't declare.
10413 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10414 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10415 field.
10416 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10417 Set all_symbols_looked_up here.
10418 (thread_db_look_up_one_symbol): New.
10419 (thread_db_get_tls_address): Adjust.
10420 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10421 thread_db object on the heap, and tentatively set it in the
10422 process structure.
10423 (thread_db_init): Don't set all_symbols_looked_up here.
10424 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10425
10426 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10427
10428 * linux-low.c (linux_kill, linux_detach): Adjust.
10429 (status_pending_p_callback): Remove redundant statement. Check
10430 for !TARGET_WAITIKIND_IGNORE, instead of
10431 TARGET_WAITKIND_STOPPED.
10432 (handle_tracepoints): Make sure LWP is locked. Adjust.
10433 (linux_wait_for_event_1): Adjust.
10434 (linux_cancel_breakpoints): New.
10435 (unsuspend_one_lwp): New.
10436 (unsuspend_all_lwps): New.
10437 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10438 (send_sigstop_callback): Change return type to int, add new
10439 `except' parameter and handle it.
10440 (suspend_and_send_sigstop_callback): New.
10441 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10442 pass them down. If SUSPEND, also increment the lwp's suspend
10443 count.
10444 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10445 (need_step_over_p): Don't consider suspended LWPs.
10446 (start_step_over): Adjust.
10447 (proceed_one_lwp): Change return type to int, add new `except'
10448 parameter and handle it.
10449 (unsuspend_and_proceed_one_lwp): New.
10450 (proceed_all_lwps): Use find_inferior instead of
10451 for_each_inferior.
10452 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10453 also decrement the suspend count of LWPs. Pass `except' down,
10454 instead of hacking its suspend count.
10455 (linux_pause_all): Add `freeze' parameter. Adjust.
10456 (linux_unpause_all): New.
10457 (linux_target_ops): Install linux_unpause_all.
10458 * server.c (handle_status): Adjust.
10459 * target.h (struct target_ops): New fields `unpause_all' and
10460 `cancel_breakpoints'. Add new parameter to `pause_all'.
10461 (pause_all): Add new `freeze' parameter.
10462 (unpause_all): New.
10463 (cancel_breakpoints): New.
10464 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10465 cancel breakpoints.
10466 (cmd_qtstart): Pause threads.
10467 (stop_tracing): Pause threads, and cancel breakpoints.
10468 * win32-low.c (win32_target_ops): Adjust.
10469
10470 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10471
10472 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10473 the inferior right away from here...
10474 (linux_wait_1): ... to here, and adjust to check the thread's
10475 last_resume_kind instead of the lwp's step or stop_expected flags.
10476
10477 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10478
10479 * README: Use consistent `GDB' and `GDBserver' spellings.
10480
10481 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10482
10483 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10484 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10485 (linux_detach_one_lwp): Assume the lwp is stopped.
10486 (any_thread_of): Delete.
10487 (linux_detach): Stop all lwps here. Don't blindly delete all
10488 breakpoints.
10489 (delete_lwp_callback): New.
10490 (linux_mourn): Delete all lwps of the process that is gone.
10491 (linux_wait_1): Don't delete the last lwp of the process here.
10492 * mem-break.h (mark_breakpoints_out): Declare.
10493 * mem-break.c (mark_breakpoints_out): New.
10494 (free_all_breakpoints): Use it.
10495 * server.c (handle_target_event): If the process is gone, mark
10496 breakpoints out.
10497 * thread-db.c (struct thread_db) <create_bp>: New field.
10498 (thread_db_enable_reporting): Fix prototype. Store a thread event
10499 breakpoint reference in the thread_db struct.
10500 (thread_db_load_search): Clear the thread_db object.
10501 (try_thread_db_load_1): Ditto.
10502 (switch_to_process): New.
10503 (disable_thread_event_reporting): Use it.
10504 (remove_thread_event_breakpoints): New.
10505 (thread_db_detach, thread_db_mourn): Use it.
10506
10507 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10508
10509 * linux-low.c (linux_enable_event_reporting): New.
10510 (linux_wait_for_event_1, handle_extended_wait): Use it.
10511
10512 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10513
10514 * linux-low.c (linux_kill_one_lwp, linux_kill)
10515 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10516 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10517 SIGSTOP even if the LWP is stopped.
10518 (send_sigstop_callback): New.
10519 (stop_all_lwps): Use send_sigstop_callback instead.
10520 (linux_resume_one_thread): Adjust.
10521 (proceed_one_lwp): Still proceed an LWP that the client has
10522 requested to stop, if we haven't reported it as stopped yet. Make
10523 sure that LWPs the client want stopped, have a pending SIGSTOP.
10524
10525 2010-04-26 Doug Evans <dje@google.com>
10526
10527 * server.c (handle_general_set): Make static.
10528
10529 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10530 Print received char after testing for error/eof instead of before.
10531 (input_interrupt): Tweak comment.
10532
10533 2010-04-23 Doug Evans <dje@google.com>
10534
10535 * server.c (start_inferior): Print inferior argv if --debug.
10536
10537 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10538
10539 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10540 * nto-x86-low.c: Include server.h
10541
10542 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10543
10544 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10545 be consistent with other sources of this directory.
10546 (init_registers_amd64): Correct name of source file of this function
10547 in the comment.
10548
10549 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10550
10551 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10552 64-bit executables.
10553
10554 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10555
10556 * win32-i386-low.c: Add 64-bit support.
10557 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10558 (init_registers_amd64): Declare.
10559 (mappings): Add 64-bit version of array.
10560 (init_windows_x86): New function.
10561 (the_low_target): Change init_arch field to init_windows_x86.
10562
10563 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10564
10565 * win32-low.c: Adapt to support also 64-bit architecture.
10566 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10567 (get_image_name): Use SIZE_T type for local variable `done'.
10568 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10569 (toolhelp_get_dll_name): Idem.
10570 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10571 Use uintptr_t typecast to avoid warning.
10572 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10573 (handle_exception): Use phex_nz to avoid warning.
10574 (win32_wait): Remove unused local variable `process'.
10575
10576 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10577
10578 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10579 `amd64-avx.o'.
10580
10581 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10582
10583 * configure.ac: Use `ws2_32' library for srv_mingw.
10584 * configure: Regenerate.
10585 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10586 * remote-utils.c: Likewise.
10587
10588 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10589
10590 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10591 if __x86_64__ is defined.
10592
10593 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10594
10595 * configure: Regenerate.
10596
10597 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10598
10599 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10600 * target.h (target_ops): New get_tib_address field.
10601 * win32-low.h (win32_thread_info): Add thread_local_base field.
10602 * win32-low.c (child_add_thread): Add tlb argument.
10603 Set thread_local_base field to TLB.
10604 (get_child_debug_event): Adapt to child_add_thread change.
10605 (win32_get_tib_address): New function.
10606 (win32_target_ops): Set get_tib_address field to
10607 win32_get_tib_address.
10608 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10609
10610 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10611
10612 * linux-low.c (linux_mourn): Also remove the process.
10613 * server.c (handle_target_event): Don't remove the process here.
10614 * nto-low.c (nto_mourn): New.
10615 (nto_target_ops): Install it.
10616 * spu-low.c (spu_mourn): New.
10617 (spu_target_ops): Install it.
10618 * win32-low.c (win32_mourn): New.
10619 (win32_target_ops): Install it.
10620
10621 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10622
10623 * server.h (buffer_xml_printf): Remove redundant `;'.
10624
10625 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10626
10627 * regcache.c (set_register_cache): Invalidate regcaches before
10628 changing the register cache layout.
10629 (regcache_invalidate_one): Allow a NULL regcache.
10630 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10631 regcaches before changing the register cache layout or the target
10632 regsets.
10633
10634 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10635
10636 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10637 variable warning on Linux/x86-64.
10638
10639 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10640
10641 GDBserver disconnected tracing support.
10642
10643 * linux-low.c (linux_remove_process): Delete.
10644 (add_lwp): Don't set last_resume_kind here.
10645 (linux_kill): Use `mourn'.
10646 (linux_detach): Use `thread_db_detach', and `mourn'.
10647 (linux_mourn): New.
10648 (linux_attach_lwp_1): Adjust comment.
10649 (linux_attach): last_resume_kind moved the thread_info; adjust.
10650 (status_pending_p_callback): Adjust.
10651 (linux_wait_for_event_1): Adjust.
10652 (count_events_callback, select_singlestep_lwp_callback)
10653 (select_event_lwp_callback, cancel_breakpoints_callback)
10654 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10655 (proceed_one_lwp): Adjust.
10656 (linux_async): Add debug output.
10657 (linux_thread_stopped): New.
10658 (linux_pause_all): New.
10659 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10660 linux_pause_all.
10661 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10662 (thread_db_free): Delete declaration.
10663 (thread_db_detach, thread_db_mourn): Declare.
10664 * thread-db.c (thread_db_init): Use thread_db_mourn.
10665 (thread_db_free): Delete, split in two.
10666 (disable_thread_event_reporting): New.
10667 (thread_db_detach): New.
10668 (thread_db_mourn): New.
10669
10670 * server.h (struct thread_info) <last_resume_kind>: New field.
10671 <attached>: Add comment.
10672 <gdb_detached>: New field.
10673 (handler_func): Change return type to int.
10674 (handle_serial_event, handle_target_event): Ditto.
10675 (gdb_connected): Declare.
10676 (tracing): Delete.
10677 (disconnected_tracing): Declare.
10678 (stop_tracing): Declare.
10679
10680 * server.c (handle_query) <qSupported>: Report support for
10681 disconnected tracing.
10682 (queue_stop_reply_callback): Account for running threads.
10683 (gdb_wants_thread_stopped): New.
10684 (gdb_wants_all_threads_stopped): New.
10685 (gdb_reattached_process): New.
10686 (handle_status): Clear the `gdb_detached' flag of all processes.
10687 In all-stop, stop all threads.
10688 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10689 (process_serial_event): If the remote connection breaks, or if an
10690 exit was forced with "monitor exit", force an event loop exit.
10691 Handle disconnected tracing on detach.
10692 (handle_serial_event): Adjust.
10693 (handle_target_event): If GDB isn't connected, forward events back
10694 to the inferior, unless the last process exited, in which case,
10695 exit gdbserver. Adjust interface.
10696
10697 * remote-utils.c (remote_open): Don't block in accept. Instead
10698 register an event loop source on the listen socket file
10699 descriptor. Refactor bits into ...
10700 (listen_desc): ... this new global.
10701 (gdb_connected): ... this new function.
10702 (enable_async_notification): ... this new function.
10703 (handle_accept_event): ... this new function.
10704 (remote_close): Clear remote_desc.
10705
10706 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10707
10708 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10709 New fields.
10710 (mourn_inferior): Define.
10711 (target_process_qsupported): Avoid the dangling else problem.
10712 (thread_stopped): Define.
10713 (pause_all): Define.
10714 (target_waitstatus_to_string): Declare.
10715 * target.c (target_waitstatus_to_string): New.
10716
10717 * tracepoint.c (tracing): Make extern.
10718 (disconnected_tracing): New.
10719 (stop_tracing): Make extern. Handle tracing stops due to GDB
10720 disconnecting.
10721 (cmd_qtdisconnected): New.
10722 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10723 (handle_tracepoint_general_set): Handle QTDisconnected.
10724
10725 * event-loop.c (event_handler_func): Change return type to int.
10726 (process_event): Bail out if the event handler wants the event
10727 loop to stop.
10728 (handle_file_event): Ditto.
10729 (start_event_loop): Bail out if the event handler wants the event
10730 loop to stop.
10731
10732 * nto-low.c (nto_target_ops): Adjust.
10733 * spu-low.c (spu_wait): Don't remove the process here.
10734 (spu_target_ops): Adjust.
10735 * win32-low.c (win32_wait): Don't remove the process here.
10736 (win32_target_ops): Adjust.
10737
10738 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10739
10740 * regcache.c (realloc_register_cache): Invalidate inferior's
10741 regcache before recreating it.
10742
10743 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10744
10745 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10746
10747 2010-04-09 Stan Shebs <stan@codesourcery.com>
10748 Pedro Alves <pedro@codesourcery.com>
10749
10750 * server.h (LONGEST): New.
10751 (struct thread_info) <while_stepping>: New field.
10752 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10753 Declare.
10754 (initialize_tracepoint, handle_tracepoint_general_set)
10755 (handle_tracepoint_query, tracepoint_finished_step)
10756 (tracepoint_was_hit, release_while_stepping_state_list):
10757 (current_traceframe): Declare.
10758 * server.c (handle_general_set): Handle tracepoint packets.
10759 (read_memory): New.
10760 (write_memory): New.
10761 (handle_search_memory_1): Use read_memory.
10762 (handle_query): Report support for conditional tracepoints, trace
10763 state variables, and tracepoint sources. Handle tracepoint
10764 queries.
10765 (main): Initialize the tracepoints module.
10766 (process_serial_event): Handle traceframe reads/writes.
10767
10768 * linux-low.c (handle_tracepoints): New.
10769 (linux_wait_1): Call it.
10770 (linux_resume_one_lwp): Handle while-stepping.
10771 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10772 (linux_target_ops): Install them.
10773 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10774 New field.
10775 * linux-x86-low.c (x86_supports_tracepoints): New.
10776 (the_low_target). Install it.
10777
10778 * mem-break.h (delete_breakpoint): Declare.
10779 * mem-break.c (delete_breakpoint): Make external.
10780
10781 * target.h (struct target_ops): Add `supports_tracepoints',
10782 `read_pc', and `write_pc' fields.
10783 (target_supports_tracepoints): Define.
10784 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10785 (phex_nz): New.
10786
10787 * regcache.h (struct regcache) <registers_owned>: New field.
10788 (init_register_cache, regcache_cpy): Declare.
10789 (regcache_read_pc, regcache_write_pc): Declare.
10790 (register_cache_size): Declare.
10791 (supply_regblock): Declare.
10792 * regcache.c (init_register_cache): New.
10793 (new_register_cache): Use it.
10794 (regcache_cpy): New.
10795 (register_cache_size): New.
10796 (supply_regblock): New.
10797 (regcache_read_pc, regcache_write_pc): New.
10798
10799 * tracepoint.c: New.
10800
10801 * Makefile.in (OBS): Add tracepoint.o.
10802 (tracepoint.o): New rule.
10803
10804 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10805
10806 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10807 (i386-mmx.o): New.
10808 (i386-mmx.c): Likewise.
10809 (i386-mmx-linux.o): Likewise.
10810 (i386-mmx-linux.c): Likewise.
10811
10812 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10813 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10814 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10815 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10816
10817 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10818 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10819 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10820
10821 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10822
10823 * Makefile.in (clean): Updated.
10824 (i386-avx.o): New.
10825 (i386-avx.c): Likewise.
10826 (i386-avx-linux.o): Likewise.
10827 (i386-avx-linux.c): Likewise.
10828 (amd64-avx.o): Likewise.
10829 (amd64-avx.c): Likewise.
10830 (amd64-avx-linux.o): Likewise.
10831 (amd64-avx-linux.c): Likewise.
10832
10833 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10834 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10835 (srv_amd64_regobj): Add amd64-avx.o.
10836 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10837 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10838 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10839 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10840 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10841 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10842 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10843
10844 * i387-fp.c: Include "i386-xstate.h".
10845 (i387_xsave): New.
10846 (i387_cache_to_xsave): Likewise.
10847 (i387_xsave_to_cache): Likewise.
10848 (x86_xcr0): Likewise.
10849
10850 * i387-fp.h (i387_cache_to_xsave): Likewise.
10851 (i387_xsave_to_cache): Likewise.
10852 (x86_xcr0): Likewise.
10853
10854 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10855 * linux-crisv32-low.c (target_regsets): Likewise.
10856 * linux-m68k-low.c (target_regsets): Likewise.
10857 * linux-mips-low.c (target_regsets): Likewise.
10858 * linux-ppc-low.c (target_regsets): Likewise.
10859 * linux-s390-low.c (target_regsets): Likewise.
10860 * linux-sh-low.c (target_regsets): Likewise.
10861 * linux-sparc-low.c (target_regsets): Likewise.
10862 * linux-xtensa-low.c (target_regsets): Likewise.
10863
10864 * linux-low.c: Include <sys/uio.h>.
10865 (regsets_fetch_inferior_registers): Support nt_type.
10866 (regsets_store_inferior_registers): Likewise.
10867 (linux_process_qsupported): New.
10868 (linux_target_ops): Add linux_process_qsupported.
10869
10870 * linux-low.h (regset_info): Add nt_type.
10871 (linux_target_ops): Add process_qsupported.
10872
10873 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10874 and <sys/uio.h>.
10875 (init_registers_i386_avx_linux): New.
10876 (init_registers_amd64_avx_linux): Likewise.
10877 (xmltarget_i386_linux_no_xml): Likewise.
10878 (xmltarget_amd64_linux_no_xml): Likewise.
10879 (PTRACE_GETREGSET): Likewise.
10880 (PTRACE_SETREGSET): Likewise.
10881 (x86_fill_xstateregset): Likewise.
10882 (x86_store_xstateregset): Likewise.
10883 (use_xml): Likewise.
10884 (x86_linux_update_xmltarget): Likewise.
10885 (x86_linux_process_qsupported): Likewise.
10886 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10887 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10888 init_registers_i386_linux here. Call
10889 x86_linux_update_xmltarget.
10890 (the_low_target): Add x86_linux_process_qsupported.
10891
10892 * server.c (handle_query): Call target_process_qsupported.
10893
10894 * target.h (target_ops): Add process_qsupported.
10895 (target_process_qsupported): New.
10896
10897 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10898
10899 * inferiors.c (add_thread): Set last_status kind to
10900 TARGET_WAITKIND_IGNORE.
10901 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10902 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10903 (linux_wait_1): Move `thread' local definition to block that uses
10904 it. Don't NULL initialize `event_child'.
10905 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10906 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10907 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10908
10909 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10910
10911 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10912 an extended waitstatus, or by a watchpoint.
10913 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10914 thread was stepping or has been stopped by a watchpoint.
10915
10916 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10917
10918 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10919 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10920 of another, then delete the previous, and validate all
10921 breakpoints.
10922 (validate_inserted_breakpoint): New.
10923 (delete_disabled_breakpoints): New.
10924 (validate_breakpoints): New.
10925 (check_mem_read): Validate breakpoints before trusting their
10926 shadow. Delete disabled breakpoints.
10927 (check_mem_write): Validate breakpoints before trusting they
10928 should be inserted. Delete disabled breakpoints.
10929 * mem-break.h (validate_breakpoints):
10930 * server.c (handle_query): Validate breakpoints when we see a
10931 qSymbol query.
10932
10933 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10934
10935 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10936 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10937 if we could tell there's a GDB breakpoint at stop_pc.
10938 (need_step_over_p): Don't do a step over if we find a GDB
10939 breakpoint at the resume PC.
10940
10941 * mem-break.c (struct raw_breakpoint): New.
10942 (enum bkpt_type): New type `gdb_breakpoint'.
10943 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10944 fields. New field `raw'.
10945 (find_raw_breakpoint_at): New.
10946 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10947 breakpoint instead.
10948 (set_breakpoint_at): Adjust.
10949 (delete_raw_breakpoint): New.
10950 (release_breakpoint): New.
10951 (delete_breakpoint): Rename to...
10952 (delete_breakpoint_1): ... this. Add proc parameter. Use
10953 release_breakpoint. Return ENOENT.
10954 (delete_breakpoint): Reimplement.
10955 (find_breakpoint_at): Delete.
10956 (find_gdb_breakpoint_at): New.
10957 (delete_breakpoint_at): Delete.
10958 (set_gdb_breakpoint_at): New.
10959 (delete_gdb_breakpoint_at): New.
10960 (gdb_breakpoint_here): New.
10961 (set_reinsert_breakpoint): Use release_breakpoint.
10962 (uninsert_breakpoint): Rename to ...
10963 (uninsert_raw_breakpoint): ... this.
10964 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10965 (reinsert_raw_breakpoint): Change parameter type to
10966 raw_breakpoint.
10967 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10968 instead.
10969 (check_breakpoints): Adjust. Use release_breakpoint.
10970 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10971 (breakpoint_inserted_here): Ditto.
10972 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10973 Don't trust the breakpoint's shadow if it is not inserted.
10974 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10975 (delete_all_breakpoints): Adjust.
10976 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10977 use delete_breakpoint_1.
10978
10979 * mem-break.h (breakpoints_supported): Delete declaration.
10980 (set_gdb_breakpoint_at): Declare.
10981 (gdb_breakpoint_here): Declare.
10982 (delete_breakpoint_at): Delete.
10983 (delete_gdb_breakpoint_at): Declare.
10984
10985 * server.h (struct raw_breakpoint): Forward declare.
10986 (struct process_info): New field `raw_breakpoints'.
10987
10988 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10989 breakpoints.
10990
10991 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10992
10993 * linux-low.c (status_pending_p_callback): Fix comment.
10994 (linux_wait_for_event_1): Move most of the internal breakpoint
10995 handling from here...
10996 (linux_wait_1): ... to here.
10997 (count_events_callback): New.
10998 (select_singlestep_lwp_callback): New.
10999 (select_event_lwp_callback): New.
11000 (cancel_breakpoints_callback): New.
11001 (select_event_lwp): New.
11002 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11003 priority to all LWPs that have had events that should be reported
11004 to the client. Cancel breakpoints when about to reporting the
11005 event to the client, not while stopping lwps. No longer cancel
11006 finished single-steps here.
11007 (cancel_finished_single_step): Delete.
11008 (cancel_finished_single_steps): Delete.
11009
11010 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11011
11012 * mem-break.c (enum bkpt_type): New.
11013 (struct breakpoint): New field `type'.
11014 (set_breakpoint_at): Change return type to struct breakpoint
11015 pointer. Set type to `other_breakpoint' by default.
11016 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11017 in the breakpoint list.
11018 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11019 (reinsert_breakpoint): Rename to ...
11020 (reinsert_raw_breakpoint): ... this.
11021 (reinsert_breakpoints_at): Adjust.
11022 * mem-break.h (struct breakpoint): Declare.
11023 (set_breakpoint_at): Change return type to struct breakpoint
11024 pointer.
11025
11026 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11027
11028 * server.c (handle_query): Assign, not compare.
11029
11030 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11031
11032 Teach linux gdbserver to step-over-breakpoints.
11033
11034 * linux-low.c (can_hardware_single_step): New.
11035 (supports_breakpoints): New.
11036 (handle_extended_wait): If stopping threads, read the stop pc of
11037 the new cloned LWP.
11038 (get_pc): New.
11039 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11040 low target doesn't support retrieving the PC.
11041 (add_lwp): Set last_resume_kind to resume_continue.
11042 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11043 (linux_attach): Don't clear stop_expected. Set the lwp's
11044 last_resume_kind to resume_stop.
11045 (linux_detach_one_lwp): Don't check for removed breakpoints.
11046 (check_removed_breakpoint): Delete.
11047 (status_pending_p): Rename to ...
11048 (status_pending_p_callback): ... this. Don't check for removed
11049 breakpoints. Don't consider threads that are stopped from GDB's
11050 perspective.
11051 (linux_wait_for_lwp): Always read the stop_pc here.
11052 (cancel_breakpoint): New.
11053 (step_over_bkpt): New global.
11054 (linux_wait_for_event_1): Implement stepping over breakpoints.
11055 (gdb_wants_lwp_stopped): New.
11056 (gdb_wants_all_stopped): New.
11057 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11058 single-step traps here. Store the thread's last reported target
11059 wait status.
11060 (send_sigstop): Don't clear stop_expected. Always set it,
11061 instead.
11062 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11063 (cancel_finished_single_step): New.
11064 (cancel_finished_single_steps): New.
11065 (wait_for_sigstop): Don't cancel finished single-step traps here.
11066 (linux_resume_one_lwp): Don't check for removed breakpoints.
11067 Don't set `step' on non-hardware step archs.
11068 (linux_set_resume_request): Ignore resume_stop requests if already
11069 stopping or stopped. Set the lwp's last_resume_kind.
11070 (resume_status_pending_p): Don't check for removed breakpoints.
11071 (need_step_over_p): New.
11072 (start_step_over): New.
11073 (finish_step_over): New.
11074 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11075 requests. Clear the thread's last reported target waitstatus.
11076 Don't use the `suspended' flag. Don't consider pending breakpoints.
11077 (linux_resume): Start a step-over if necessary.
11078 (proceed_one_lwp): New.
11079 (proceed_all_lwps): New.
11080 (unstop_all_lwps): New.
11081 * linux-low.h (struct lwp_info): Rewrite comment for the
11082 `suspended' flag. Add the `stop_pc' field. Delete the
11083 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11084 Add `'last_resume_kind' and `need_step_over' fields.
11085 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11086 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11087 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11088 (set_raw_breakpoint_at): New.
11089 (set_breakpoint_at): Rewrite to use it.
11090 (reinsert_breakpoint_handler): Delete.
11091 (set_reinsert_breakpoint): New.
11092 (reinsert_breakpoint_by_bp): Delete.
11093 (delete_reinsert_breakpoints): New.
11094 (uninsert_breakpoint): Rewrite.
11095 (uninsert_breakpoints_at): New.
11096 (reinsert_breakpoint): Rewrite.
11097 (reinsert_breakpoints_at): New.
11098 (check_breakpoints): Rewrite.
11099 (breakpoint_here): New.
11100 (breakpoint_inserted_here): New.
11101 (check_mem_read): Adjust.
11102 * mem-break.h (breakpoints_supported, breakpoint_here)
11103 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11104 (reinsert_breakpoint_by_bp): Delete declaration.
11105 (delete_reinsert_breakpoints): Declare.
11106 (reinsert_breakpoint): Delete declaration.
11107 (reinsert_breakpoints_at): Declare.
11108 (uninsert_breakpoint): Delete declaration.
11109 (uninsert_breakpoints_at): Declare.
11110 (check_breakpoints): Adjust prototype.
11111 * server.h: Adjust include order.
11112 (struct thread_info): Declare here. Add a `last_status' field.
11113
11114 2010-03-23 Michael Snyder <msnyder@vmware.com>
11115
11116 * server.c (crc32): New function.
11117 (handle_query): Add handling for 'qCRC:' request.
11118
11119 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11120
11121 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11122 lwp had been stopped by a watchpoint.
11123
11124 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11125
11126 * server.h (internal_error): Declare.
11127 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11128 * utils.c (internal_error): New function.
11129
11130 2010-03-15 Andreas Schwab <schwab@redhat.com>
11131
11132 * configure.srv: Fix typo setting srv_regobj.
11133
11134 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11135
11136 * linux-low.c (fetch_register): Avoid passing a non string literal
11137 format to `error'.
11138 (usr_store_inferior_registers): Ditto.
11139
11140 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11141
11142 * linux-low.c (linux_write_memory): Bail out early if peeking
11143 memory failed.
11144
11145 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11146
11147 * linux-low.h (struct lwp_info): New fields
11148 `stopped_by_watchpoint' and `stopped_data_address'.
11149 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11150 here, and cache them in the lwp object.
11151 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11152 directly.
11153 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11154 field.
11155 (linux_stopped_by_watchpoint): Rewrite.
11156 (linux_stopped_data_address): Rewrite.
11157
11158 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11159
11160 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11161 switching the current inferior, not before.
11162
11163 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11164
11165 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11166 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11167 i386-linux.c and amd64-linux.c.
11168 (reg-i386.o): Removed.
11169 (reg-i386.c): Likewise.
11170 (reg-i386-linux.o): Likewise.
11171 (reg-i386-linux.c): Likewise.
11172 (reg-x86-64.o): Likewise.
11173 (reg-x86-64.c): Likewise.
11174 (reg-x86-64-linux.o): Likewise.
11175 (reg-x86-64-linux.c): Likewise.
11176 (i386.o): New.
11177 (i386.c): Likewise.
11178 (i386-linux.o): Likewise.
11179 (i386-linux.c): Likewise.
11180 (amd64.o): Likewise.
11181 (amd64.c): Likewise.
11182 (amd64-linux.o): Likewise.
11183 (amd64-linux.c): Likewise.
11184
11185 * configure.srv (srv_i386_regobj): New.
11186 (srv_i386_linux_regobj): Likewise.
11187 (srv_amd64_regobj): Likewise.
11188 (srv_amd64_linux_regobj): Likewise.
11189 (srv_i386_32bit_xmlfiles): Likewise.
11190 (srv_i386_64bit_xmlfiles): Likewise.
11191 (srv_i386_xmlfiles): Likewise.
11192 (srv_amd64_xmlfiles): Likewise.
11193 (srv_i386_linux_xmlfiles): Likewise.
11194 (srv_amd64_linux_xmlfiles): Likewise.
11195 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11196 srv_xmlfiles to $srv_i386_xmlfiles.
11197 (i[34567]86-*-mingw32ce*): Likewise.
11198 (i[34567]86-*-mingw*): Likewise.
11199 (i[34567]86-*-nto*): Likewise.
11200 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11201 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11202 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11203 (x86_64-*-linux*): Likewise.
11204
11205 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11206 (init_registers_amd64_linux): New.
11207 (x86_arch_setup): Replace init_registers_x86_64_linux with
11208 init_registers_amd64_linux.
11209
11210 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11211
11212 * configure.ac: Check for libdl. If it is not available link against
11213 static libthread_db.
11214 * configure: Regenerate.
11215
11216 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11217
11218 PR9605
11219
11220 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11221 handing a read watchpoint.
11222 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11223
11224 2010-02-12 Doug Evans <dje@google.com>
11225
11226 * linux-low.c (linux_supports_tracefork_flag): Document.
11227 (linux_look_up_symbols): Add comment.
11228
11229 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11230
11231 * regcache.c (supply_register): Clear regcache if buf is NULL.
11232
11233 2010-02-02 Nicolas Roche <roche@sourceware.org>
11234 Joel Brobecker <brobecker@adacore.com>
11235
11236 * inferiors.c (find_inferior): Add function documentation.
11237 (unloaded_dll): Handle the case where the unloaded dll has not
11238 been previously registered in the dll list.
11239
11240 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11241
11242 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11243 (thumb2_breakpoint): New.
11244 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11245
11246 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11249 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11250 breakpoints.
11251
11252 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11253
11254 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11255
11256 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11257
11258 * linux-s390-low.c (s390_collect_ptrace_register)
11259 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11260
11261 2010-01-21 Doug Evans <dje@google.com>
11262
11263 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11264 (PTRACE_ARG4_TYPE): New macro.
11265 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11266 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11267 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11268 (usr_store_inferior_registers): Ditto.
11269 (linux_read_memory, linux_write_memory): Ditto.
11270 (linux_test_for_tracefork): Ditto.
11271
11272 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11273 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11274
11275 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11276
11277 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11278 target.
11279
11280 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11281
11282 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11283 prototype to take a regcache. Adjust.
11284
11285 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11286
11287 * regcache.h (struct thread_info): Forward declare.
11288 (struct regcache): New.
11289 (new_register_cache): Adjust prototype.
11290 (get_thread_regcache): Declare.
11291 (free_register_cache): Adjust prototype.
11292 (registers_to_string, registers_from_string): Ditto.
11293 (supply_register, supply_register_by_name, collect_register)
11294 (collect_register_as_string, collect_register_by_name): Ditto.
11295 * regcache.c (struct inferior_regcache_data): Delete.
11296 (get_regcache): Rename to ...
11297 (get_thread_regcache): ... this. Adjust. Switch inferior before
11298 fetching registers.
11299 (regcache_invalidate_one): Adjust.
11300 (regcache_invalidate): Fix prototype.
11301 (new_register_cache): Return the new register cache.
11302 (free_register_cache): Change prototype.
11303 (realloc_register_cache): Adjust.
11304 (registers_to_string): Change prototype to take a regcache. Adjust.
11305 (registers_from_string): Ditto.
11306 (register_data): Ditto.
11307 (supply_register): Ditto.
11308 (supply_register_by_name): Ditto.
11309 (collect_register): Ditto.
11310 (collect_register_as_string): Ditto.
11311 (collect_register_by_name): Ditto.
11312 * server.c (process_serial_event): Adjust.
11313 * linux-low.h (regset_fill_func, regset_store_func): Change
11314 prototype.
11315 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11316 Change prototype.
11317 * linux-low.c (get_stop_pc): Adjust.
11318 (check_removed_breakpoint): Adjust.
11319 (linux_wait_for_event): Adjust.
11320 (linux_resume_one_lwp): Adjust.
11321 (fetch_register): Add regcache parameter. Adjust.
11322 (usr_store_inferior_registers): Ditto.
11323 (regsets_fetch_inferior_registers): Ditto.
11324 (regsets_store_inferior_registers): Ditto.
11325 (linux_fetch_registers, linux_store_registers): Ditto.
11326 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11327 regcache. Adjust.
11328 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11329 Ditto.
11330 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11331 prototype to take a regcache.
11332 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11333 * remote-utils.c (convert_ascii_to_int, outreg)
11334 (prepare_resume_reply): Change prototype to take a regcache.
11335 Adjust.
11336 * target.h (struct target_ops) <fetch_registers, store_registers>:
11337 Change prototype to take a regcache.
11338 (fetch_inferior_registers, store_inferior_registers): Change
11339 prototype to take a regcache. Adjust.
11340 * proc-service.c (ps_lgetregs): Adjust.
11341 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11342 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11343 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11344 take a regcache. Adjust.
11345 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11346 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11347 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11348 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11349 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11350 (cris_cannot_fetch_register):
11351 (cris_breakpoint_at): Change prototype to take a regcache.
11352 Adjust.
11353 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11354 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11355 to take a regcache. Adjust.
11356 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11357 Adjust.
11358 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11359 take a regcache. Adjust.
11360 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11361 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11362 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11363 * linux-mips-low.c (mips_get_pc):
11364 (mips_set_pc): Change prototype to take a regcache. Adjust.
11365 (mips_reinsert_addr): Adjust.
11366 (mips_collect_register): Change prototype to take a regcache.
11367 Adjust.
11368 (mips_supply_register):
11369 (mips_collect_register_32bit, mips_supply_register_32bit)
11370 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11371 (mips_store_fpregset): Ditto.
11372 * linux-ppc-low.c (ppc_supply_ptrace_register)
11373 (ppc_supply_ptrace_register): Ditto.
11374 (parse_spufs_run): Adjust.
11375 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11376 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11377 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11378 take a regcache. Adjust.
11379 * linux-s390-low.c (s390_collect_ptrace_register)
11380 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11381 (s390_set_pc): Change prototype to take a regcache. Adjust.
11382 (s390_arch_setup): Adjust.
11383 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11384 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11385 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11386 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11387 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11388 regcache. Adjust.
11389 (sparc_breakpoint_at): Adjust.
11390 * linux-xtensa-low.c (xtensa_fill_gregset):
11391 (xtensa_store_gregset):
11392 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11393 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11394 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11395 prototype to take a regcache. Adjust.
11396 * win32-arm-low.c (arm_fetch_inferior_register)
11397 (arm_store_inferior_register): Change prototype to take a
11398 regcache. Adjust.
11399 * win32-i386-low.c (i386_fetch_inferior_register)
11400 (i386_store_inferior_register): Change prototype to take a
11401 regcache. Adjust.
11402 * win32-low.c (child_fetch_inferior_registers)
11403 (child_store_inferior_registers): Change prototype to take a
11404 regcache. Adjust.
11405 (win32_wait): Adjust.
11406 (win32_fetch_inferior_registers): Change prototype to take a
11407 regcache. Adjust.
11408 (win32_store_inferior_registers): Adjust.
11409 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11410 store_inferior_register>: Change prototype to take a regcache.
11411
11412 2010-01-20 Doug Evans <dje@google.com>
11413
11414 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11415 #ifdef.
11416 (linux_wait_for_event1, linux_init_signals): Ditto.
11417 (W_STOPCODE): Provide definition if missing.
11418
11419 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11420
11421 * linux-low.c (linux_core_of_thread): New.
11422 (compare_ints, show_process, list_threads): New.
11423 (linux_qxfer_osdata): Report threads and cores.
11424 (linux_target_op): Register linux_core_of_thread.
11425 * remote-utils.c (prepare_resume_reply): Report the core.
11426 (buffer_xml_printf): Support %d specifier.
11427 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11428 New.
11429 (handle_query): Handle qXfer:threads. Announce availability
11430 thereof.
11431 * target.h (struct target_ops): New field core_of_thread.
11432
11433 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11434
11435 * Makefile.in (clean): Remove new generated files.
11436 (reg-s390.o, reg-s390.c): Remove rules.
11437 (reg-s390x.o, reg-s390x.c): Likewise.
11438 (s390-linux32.o, s390-linux32.c): Add rules.
11439 (s390-linux64.o, s390-linux64.c): Likewise.
11440 (s390x-linux64.o, s390x-linux64.c): Likewise.
11441 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11442 * linux-s390-low.c: Include <elf.h>.
11443 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11444 (init_registers_s390): Remove prototype.
11445 (init_registers_s390x): Likewise.
11446 (init_registers_s390_linux32): Add prototype.
11447 (init_registers_s390_linux64): Likewise.
11448 (init_registers_s390x_linux64): Likewise.
11449 (s390_num_regs_3264): New define.
11450 (s390_regmap_3264): New global variable.
11451 (s390_cannot_fetch_register): Remove obsolete check.
11452 (s390_cannot_store_register): Likewise.
11453 (s390_collect_ptrace_register): Handle upper/lower register halves.
11454 (s390_supply_ptrace_register): Likewise.
11455 (s390_fill_gregset): Update to register number changes.
11456 (s390_get_hwcap): New routine.
11457 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11458 Install appropriate regmap and register set.
11459
11460 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11461
11462 * server.c (gdbserver_version): Update copyright year to 2010.
11463 * gdbreplay.c (gdbreplay_version): Likewise.
11464
11465 2009-12-28 Doug Evans <dje@google.com>
11466
11467 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11468 elf/external.h. Include <elf.h> instead but only if necessary.
11469
11470 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11471
11472 * linux-low.c (linux_remove_process): Remove `detaching'
11473 parameter. Don't release/detach from thread_db here.
11474 (linux_kill): Release/detach from thread_db here, ...
11475 (linux_detach): ... and here, before actually detaching.
11476 (linux_wait_1): ... and here, when a process exits.
11477 * thread-db.c (any_thread_of): New.
11478 (thread_db_free): Switch the current inferior to a thread of the
11479 passed in process.
11480
11481 2009-12-21 Doug Evans <dje@google.com>
11482
11483 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11484
11485 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11486 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11487 warning ifndef __NR_tkill. Move setting of errno there too.
11488 Delete unnecessary resetting of errno after syscall.
11489 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11490
11491 * configure.ac: Check for dladdr.
11492 * config.in: Regenerate.
11493 * configure: Regenerate.
11494 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11495 (try_thread_db_load): Update.
11496
11497 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11498
11499 2009-12-18 Doug Evans <dje@google.com>
11500
11501 * event-loop.c: Include unistd.h if it exists.
11502
11503 * linux-low.c (my_waitpid): Move definition away from being in
11504 between linux_tracefork_child/linux_test_for_tracefork.
11505
11506 * gdb_proc_service.h (psaddr_t): Fix type.
11507 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11508 signature to match glibc.
11509
11510 2009-12-16 Doug Evans <dje@google.com>
11511
11512 * linux-low.c (linux_read_memory): Fix argument to read.
11513
11514 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11515
11516 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11517 events, don't leave current_inferior pointing at null.
11518
11519 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11520
11521 * win32-low.c (LOG): Delete.
11522 (OUTMSG): Output to stderr.
11523 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11524 on compile time LOG macro.
11525 (win32_wait): Fix debug output.
11526
11527 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11528
11529 * win32-low.c (win32_add_one_solib): If the dll name is
11530 "ntdll.dll", prepend the system directory to the dll path.
11531
11532 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11533
11534 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11535
11536 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11537 Vladimir Prus <vladimir@codesourcery.com>
11538
11539 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11540 * configure.ac: Check for __mcoldfire__ and set
11541 gdb_cv_m68k_is_coldfire.
11542 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11543 reg-cf.o and reg-m68k.o.
11544 * configure: Regenerated.
11545
11546 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11547
11548 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11549 Pass it to thread_db_free.
11550 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11551 proper `detaching' argument to linux_remove_process.
11552 * linux-low.h (thread_db_free): Add `detaching' parameter.
11553 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11554 to thread_db_free.
11555 (thread_db_free): Add `detaching' parameter. Only
11556 call td_ta_clear_event if detaching from process.
11557
11558 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11559
11560 * thread-db.c (thread_db_free): Fix typo.
11561
11562 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11563
11564 PR gdb/10838
11565 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11566
11567 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11568
11569 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11570 with an i686 compiler.
11571 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11572 needed.
11573 * configure: Rebuilt.
11574
11575 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11576
11577 PR gdb/10783
11578
11579 * server.c (handle_search_memory_1): Correct read_addr initialization
11580 in loop for searching subsequent chunks.
11581
11582 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11583
11584 * configure.ac: New --with-libthread-db option.
11585 * thread-db.c: Allow direct dependence on libthread_db.
11586 (thread_db_free): Adjust.
11587 * config.in: Regenerate.
11588 * configure: Likewise.
11589
11590 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11591
11592 PR gdb/10757
11593 * thread-db.c (attach_thread): New function.
11594 (maybe_attach_thread): Return success/failure.
11595 (find_new_threads_callback): Adjust.
11596 (thread_db_find_new_threads): Loop until no new threads.
11597
11598 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11599
11600 * proc-service.c (ps_lgetregs): Formatting.
11601
11602 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11603
11604 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11605 * configure.ac: Adjust.
11606 * linux-low.h (struct process_info_private): Move members to struct
11607 thread_db.
11608 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11609 * linux-low.c (linux_remove_process): Adjust.
11610 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11611 * server.c (handle_query): Move code ...
11612 (handle_monitor_command): ... here. New function.
11613 * target.h (struct target_ops): New member.
11614 * thread-db.c (struct thread_db): New.
11615 (libthread_db_search_path): New variable.
11616 (thread_db_create_event, thread_db_enable_reporting)
11617 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11618 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11619 (try_thread_db_load_1, dladdr_to_soname): New functions.
11620 (try_thread_db_load, thread_db_load_search): New functions.
11621 (thread_db_init): Search for libthread_db.
11622 (thread_db_free): New function.
11623 (thread_db_handle_monitor_command): Likewise.
11624 * config.in: Regenerate.
11625 * configure: Regenerate.
11626
11627 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11628
11629 * spu-low.c (spu_kill): Wait for inferior to terminate.
11630 Call clear_inferiors.
11631 (spu_detach): Call clear_inferiors.
11632
11633 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11634
11635 * aclocal.m4: Regenerate.
11636 * config.in: Likewise.
11637 * configure: Likewise.
11638
11639 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11640
11641 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11642 (parse_spufs_run): New function.
11643 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11644 (ppc_breakpoint_at): Handle SPU breakpoints.
11645
11646 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11647
11648 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11649 (SPUFS_MAGIC): Define.
11650 (spu_enumerate_spu_ids): New function.
11651 (linux_qxfer_spu): New function.
11652 (linux_target_ops): Install linux_qxfer_spu.
11653
11654 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11655
11656 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11657 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11658 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11659 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11660 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11661 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11662 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11663 (init_registers_powerpc_cell32l): Add prototype.
11664 (init_registers_powerpc_cell64l): Likewise.
11665 (ppc_arch_setup): Detect Cell/B.E. architecture.
11666
11667 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11668
11669 * Makefile.in (datarootdir): New variable.
11670
11671 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * linux-low.c (linux_write_memory): Update debugging output.
11674 * Makefile.in (clean): Add new descriptions.
11675 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11676 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11677 * configure.srv: Add new files for arm*-*-linux*.
11678 * linux-arm-low.c: Add new declarations.
11679 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11680 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11681 (HWCAP_VFPv3D16): New.
11682 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11683 instead of __IWMMXT__.
11684 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11685 (arm_arch_setup): New.
11686 (target_regsets): Remove #ifdef. Add VFP regset.
11687 (the_low_target): Use arm_arch_setup.
11688
11689 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11692 the main thread again.
11693
11694 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11695
11696 Adding Neutrino gdbserver.
11697 * configure: Regenerated.
11698 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11699 * configure.srv (i[34567]86-*-nto*): New target.
11700 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11701 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11702 (nto_comctrl) [__QNX__]: New function.
11703 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11704
11705 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11706
11707 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11708 srv_tgtobj.
11709
11710 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11711 Pedro Alves <pedro@codesourcery.com>
11712
11713 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11714 don't support CONTEXT_EXTENDED_REGISTERS.
11715 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11716 (the_low_target): Install them.
11717 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11718 failing with ERROR_PIPE_NOT_CONNECTED.
11719
11720 2009-06-30 Doug Evans <dje@google.com>
11721 Pierre Muller <muller@ics.u-strasbg.fr>
11722
11723 Add h/w watchpoint support to x86-linux, win32-i386.
11724 * Makefile.in (SFILES): Add i386-low.c
11725 (i386_low_h): Define.
11726 (i386-low.o): Add dependencies.
11727 (linux-x86-low.o): Add i386-low.h dependency.
11728 (win32-i386-low.o): Ditto.
11729 * i386-low.c: New file.
11730 * i386-low.h: New file.
11731 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11732 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11733 * linux-low.c (linux_add_process): Initialize arch_private.
11734 (linux_remove_process): Free arch_private.
11735 (add_lwp): Initialize arch_private.
11736 (delete_lwp): Free arch_private.
11737 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11738 provided.
11739 * linux-low.h (process_info_private): New member arch_private.
11740 (lwp_info): New member arch_private.
11741 (linux_target_ops): New members new_process, new_thread,
11742 prepare_to_resume.
11743 (ptid_of): New macro.
11744 * linux-x86-low.c: Include stddef.h, i386-low.h.
11745 (arch_process_info): New struct.
11746 (arch_lwp_info): New struct.
11747 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11748 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11749 (i386_dr_low_get_status): New function.
11750 (x86_insert_point, x86_remove_point): New functions.
11751 (x86_stopped_by_watchpoint): New function.
11752 (x86_stopped_data_address): New function.
11753 (x86_linux_new_process, x86_linux_new_thread): New functions.
11754 (x86_linux_prepare_to_resume): New function.
11755 (the_low_target): Add entries for insert_point, remove_point,
11756 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11757 prepare_to_resume.
11758 * server.c (debug_hw_points): New global.
11759 (monitor_show_help): Document set debug-hw-points.
11760 (handle_query): Process "set debug-hw-points".
11761 * server.h (debug_hw_points): Declare.
11762 (paddress): Declare.
11763 * utils.c (NUMCELLS, CELLSIZE): New macros.
11764 (get_sell, xsnprintf, paddress): New functions.
11765 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11766 remove_point, stopped_by_watchpoint, stopped_data_address.
11767 * win32-i386-low.c: Include i386-low.h.
11768 (debug_reg_state): Replaces dr.
11769 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11770 (i386_dr_low_get_status): New function.
11771 (i386_insert_point, i386_remove_point): New functions.
11772 (i386_stopped_by_watchpoint): New function.
11773 (i386_stopped_data_address): New function.
11774 (i386_initial_stuff): Update.
11775 (get_thread_context,set_thread_context,i386_thread_added): Update.
11776 (the_low_target): Add entries for insert_point,
11777 remove_point, stopped_by_watchpoint, stopped_data_address.
11778 * win32-low.c (win32_insert_watchpoint): New function.
11779 (win32_remove_watchpoint): New function.
11780 (win32_stopped_by_watchpoint): New function.
11781 (win32_stopped_data_address): New function.
11782 (win32_target_ops): Add entries for insert_watchpoint,
11783 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11784 * win32-low.h (win32_target_ops): New members insert_point,
11785 remove_point, stopped_by_watchpoint, stopped_data_address.
11786
11787 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11788
11789 * server.c (process_serial_event): Re-return unsupported, not
11790 error, if the type isn't recognized. Re-allow supporting only
11791 insert or remove packets. Also call require_running for
11792 breakpoints. Add missing break statement to default case. Tidy.
11793 * target.h (struct target_ops): Rename insert_watchpoint to
11794 insert_point, and remove_watchpoint to remove_point.
11795
11796 * linux-low.h (struct linux_target_ops): Likewise.
11797 * linux-low.c (linux_insert_watchpoint): Rename to ...
11798 (linux_insert_point): ... this. Adjust.
11799 (linux_remove_watchpoint): Rename to ...
11800 (linux_remove_point): ... this. Adjust.
11801 (linux_target_ops): Adjust.
11802 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11803 (cris_insert_point): ... this.
11804 (cris_remove_watchpoint): Rename to ...
11805 (cris_remove_point): ... this.
11806 (the_low_target): Adjust.
11807
11808 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11809
11810 * server.c (handle_v_kill): Pass signal_pid to
11811 kill_inferior if multi_process is zero.
11812
11813 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11814
11815 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11816 * target.h (target_ops): Comment for *_watchpoint to make it clear
11817 the functions can get types '0' and '1'.
11818
11819 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11820
11821 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11822 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11823 * regcache.c (get_regcache): Likewise.
11824 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11825 * win32-low.c (child_fetch_inferior_registers): Remove check for
11826 regno 0.
11827
11828 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11829 Pedro Alves <pedro@codesourcery.com>
11830
11831 * target.h (struct target_ops) <supports_multi_process>: New
11832 callback.
11833 (target_supports_multi_process): New.
11834 * server.c (handle_query): Even if GDB reports support, only
11835 enable multi-process if the target also supports it. Report
11836 multi-process support only if the target backend supports it.
11837 * linux-low.c (linux_supports_multi_process): New function.
11838 (linux_target_ops): Install it as target_supports_multi_process
11839 callback.
11840
11841 2009-05-24 Doug Evans <dje@google.com>
11842
11843 Global renaming of find_thread_pid to find_thread_ptid.
11844 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11845 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11846 All callers updated.
11847
11848 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11849 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11850 directly.
11851
11852 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11853 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11854 (linux_resume_one_lwp): Ditto.
11855
11856 2009-05-23 Doug Evans <dje@google.com>
11857
11858 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11859 from struct inferior_list_entry * to struct lwp_info *.
11860 All callers updated.
11861
11862 2009-05-13 Doug Evans <dje@google.com>
11863
11864 * linux-x86-low.c: Don't include assert.h.
11865 (x86_siginfo_fixup): Use fatal, not assert.
11866 (x86_arch_setup): Fix comment.
11867
11868 2009-05-12 Doug Evans <dje@google.com>
11869
11870 Biarch support for i386/amd64 gdbserver.
11871 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11872 Add linux-x86-low.c.
11873 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11874 (linux-x86-low.o): Add.
11875 * linux-x86-64-low.c: Delete.
11876 * linux-i386-low.c: Delete.
11877 * linux-x86-low.c: New file.
11878 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11879 linux-x86-low.o.
11880 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11881 linux-x86-low.o.
11882 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11883 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11884 (linux_child_pid_to_exec_file): New function.
11885 (elf_64_header_p, elf_64_file_p): New functions.
11886 (siginfo_fixup): New function.
11887 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11888 give target a chance to convert layout.
11889 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11890 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11891
11892 2009-05-07 Doug Evans <dje@google.com>
11893
11894 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11895 (regsets_store_inferior_registers): Ditto.
11896
11897 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11898
11899 PR server/10048
11900
11901 * linux-low.c (must_set_ptrace_flags): Delete.
11902 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11903 of the global.
11904 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11905 `lwp->must_set_ptrace_flags' instead.
11906 (linux_wait_for_event_1): Set ptrace options here.
11907 (linux_wait_1): ... not here.
11908
11909 2009-04-30 Doug Evans <dje@google.com>
11910
11911 * inferiors.c (started_inferior_callback): New function.
11912 (attached_inferior_callback): New function.
11913 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11914 * server.c (print_started_pid, print_attached_pid): New functions.
11915 (detach_or_kill_for_exit): New function.
11916 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11917 * server.h (have_started_inferiors_p): Declare.
11918 (have_attached_inferiors_p): Declare.
11919
11920 * inferiors.c (remove_process): Fix memory leak, free process.
11921 * linux-low.c (linux_remove_process): New function.
11922 (linux_kill): Call it instead of remove_process.
11923 (linux_detach, linux_wait_1): Ditto.
11924
11925 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11926
11927 * configure.srv: Add x86 Windows CE target.
11928
11929 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11930
11931 * inferiors.c (get_thread_process): Make global.
11932 * server.h (get_thread_process): Add prototype.
11933 * thread-db.c (find_one_thread): Use get_thread_process
11934 instead of current_process.
11935 (thread_db_get_tls_address): Do not crash if called when
11936 thread layer is not yet initialized.
11937
11938 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11939
11940 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11941 * spu-low.c (current_tid): Rename to ...
11942 (current_ptid): ... this.
11943 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11944 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11945 ptid_get_lwp (current_ptid) instead of current_tid.
11946 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11947 instead of current_tid. Use find_process_pid to verify pid
11948 argument is valid. Pass proper argument to remove_process.
11949 (spu_thread_alive): Compare current_ptid instead of current_tid.
11950 (spu_resume): Likewise.
11951
11952 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11953
11954 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11955 variable.
11956
11957 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11958
11959 Implement the multiprocess extensions, and add linux multiprocess
11960 support.
11961
11962 * server.h (ULONGEST): Declare.
11963 (struct ptid, ptid_t): New.
11964 (minus_one_ptid, null_ptid): Declare.
11965 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11966 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11967 (struct inferior_list_entry): Change `id' type from unsigned from
11968 to ptid_t.
11969 (struct sym_cache, struct breakpoint, struct
11970 process_info_private): Forward declare.
11971 (struct process_info): Declare.
11972 (current_process): Declare.
11973 (all_processes): Declare.
11974 (initialize_inferiors): Declare.
11975 (add_thread): Adjust to use ptid_t.
11976 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11977 (add_process, remove_process, find_thread_pid): Declare.
11978 (find_inferior_id): Adjust to use ptid_t.
11979 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11980 (multi_process): Declare.
11981 (push_event): Adjust to use ptid_t.
11982 (read_ptid, write_ptid): Declare.
11983 (prepare_resume_reply): Adjust to use ptid_t.
11984 (clear_symbol_cache): Declare.
11985 * inferiors.c (all_processes): New.
11986 (null_ptid, minus_one_ptid): New.
11987 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11988 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11989 (add_thread): Change unsigned long to ptid. Remove gdb_id
11990 parameter. Adjust.
11991 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11992 (gdb_id_to_thread): Rename to ...
11993 (find_thread_pid): ... this. Change unsigned long to ptid.
11994 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11995 (loaded_dll, pull_pid_from_list): Adjust.
11996 (add_process, remove_process, find_process_pid)
11997 (get_thread_process, current_process, initialize_inferiors): New.
11998 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11999 (struct target_waitstatus) <related_pid>: Ditto.
12000 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12001 return type to int.
12002 (struct target_ops) <join>: Add `pid' argument.
12003 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12004 (struct target_ops) <wait>: Add `ptid' field. Change return type
12005 to ptid.
12006 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12007 (mywait): Add `ptid' argument. Change return type to ptid_t.
12008 (target_pid_to_str): Declare.
12009 * target.c (set_desired_inferior): Adjust to use ptids.
12010 (mywait): Add new `ptid' argument. Adjust.
12011 (target_pid_to_str): New.
12012 * mem-break.h (free_all_breakpoints): Declare.
12013 * mem-break.c (breakpoints): Delelete.
12014 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12015 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12016 to use per-process breakpoint list.
12017 (free_all_breakpoints): New.
12018 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12019 (symbol_cache, all_symbols_looked_up): Delete.
12020 (hexchars): New.
12021 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12022 read_ptid): New.
12023 (prepare_resume_reply): Change ptid argument's type from unsigned
12024 long to ptid_t. Adjust. Implement W;process and X;process.
12025 (free_sym_cache, clear_symbol_cache): New.
12026 (look_up_one_symbol): Adjust to per-process symbol cache. *
12027 * server.c (cont_thread, general_thread, step_thread): Change type
12028 to ptid_t.
12029 (attached): Delete.
12030 (multi_process): New.
12031 (last_ptid): Change type to ptid_t.
12032 (struct vstop_notif) <ptid>: Change type to ptid_t.
12033 (queue_stop_reply, push_event): Change `ptid' argument's type to
12034 ptid_t.
12035 (discard_queued_stop_replies): Add `pid' argument.
12036 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12037 changes. Don't reference the `attached' global.
12038 (attach_inferior): Adjust to mywait interface changes.
12039 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12040 features. Handle and report "multiprocess+". Handle
12041 "qAttached:PID".
12042 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12043 changes.
12044 (handle_v_kill): New.
12045 (handle_v_stopped): Adjust to use target_pid_to_str.
12046 (handle_v_requests): Allow multiple attaches and runs when
12047 multiprocess extensions are in effect. Handle "vKill".
12048 (myresume): Adjust to use ptids.
12049 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12050 (handle_status): Adjust to discard_queued_stop_replies interface
12051 change.
12052 (first_thread_of, kill_inferior_callback)
12053 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12054 (main): Call initialize_inferiors. Adjust to use ptids, killing
12055 and detaching from all inferiors. Handle multiprocess packet
12056 variants.
12057 * linux-low.h: Include gdb_proc_service.h.
12058 (struct process_info_private): New.
12059 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12060 <lwpid_of>: Use ptid_get_lwp.
12061 (get_lwp_thread): Adjust.
12062 (struct lwp_info): Add `dead' member.
12063 (find_lwp_pid): Declare.
12064 * linux-low.c (thread_db_active): Delete.
12065 (new_inferior): Adjust comment.
12066 (inferior_pid): Delete.
12067 (linux_add_process): New.
12068 (handle_extended_wait): Adjust.
12069 (add_lwp): Change unsigned long to ptid.
12070 (linux_create_inferior): Add process to processes table. Adjust
12071 to use ptids. Don't set new_inferior here.
12072 (linux_attach_lwp): Rename to ...
12073 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12074 it. Adjust to use ptids.
12075 (linux_attach_lwp): New.
12076 (linux_attach): Add process to processes table. Don't set
12077 new_inferior here.
12078 (struct counter): New.
12079 (second_thread_of_pid_p, last_thread_of_process_p): New.
12080 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12081 multiple processes.
12082 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12083 processes. Remove process from process table.
12084 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12085 to multiple processes.
12086 (any_thread_of): New.
12087 (linux_detach): Add `pid' argument, and handle it. Remove process
12088 from processes table.
12089 (linux_join): Add `pid' argument. Handle it.
12090 (linux_thread_alive): Change unsighed long argument to ptid_t.
12091 Consider dead lwps as not being alive.
12092 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12093 threads we're not interested in.
12094 (same_lwp, find_lwp_pid): New.
12095 (linux_wait_for_lwp): Change `pid' argument's type from int to
12096 ptid_t. Adjust.
12097 (linux_wait_for_event): Rename to ...
12098 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12099 from int to ptid_t. Adjust.
12100 (linux_wait_for_event): New.
12101 (linux_wait_1): Add `ptid' argument. Change return type to
12102 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12103 that exit from the process table.
12104 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12105 Adjust.
12106 (mark_lwp_dead): New.
12107 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12108 stopping all threads, mark its main lwp as dead.
12109 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12110 ptids.
12111 (fetch_register, usr_store_inferior_registers)
12112 (regsets_fetch_inferior_registers)
12113 (regsets_store_inferior_registers, linux_read_memory)
12114 (linux_write_memory): Inline `inferior_pid'.
12115 (linux_look_up_symbols): Adjust to use per-process
12116 `thread_db_active'.
12117 (linux_request_interrupt): Adjust to use ptids.
12118 (linux_read_auxv): Inline `inferior_pid'.
12119 (initialize_low): Don't reference thread_db_active.
12120 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12121 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12122 (ps_getpid): Return the pid of the current inferior.
12123 * thread-db.c (proc_handle, thread_agent): Delete.
12124 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12125 per-process data.
12126 (find_one_thread): Change argument type to ptid_t. Adjust to
12127 per-process data.
12128 (maybe_attach_thread): Adjust to per-process data and ptids.
12129 (thread_db_find_new_threads): Ditto.
12130 (thread_db_init): Ditto.
12131 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12132 processes table. Adjust to use ptids.
12133 (spu_kill, spu_detach): Adjust interface. Remove process from
12134 processes table.
12135 (spu_join, spu_thread_alive): Adjust interface.
12136 (spu_wait): Adjust interface. Remove process from processes
12137 table. Adjust to use ptids.
12138 * win32-low.c (current_inferior_tid): Delete.
12139 (current_inferior_ptid): New.
12140 (debug_event_ptid): New.
12141 (thread_rec): Take a ptid. Adjust.
12142 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12143 (child_delete_thread): Ditto.
12144 (do_initial_child_stuff): Add `attached' argument. Add process to
12145 processes table.
12146 (child_fetch_inferior_registers, child_store_inferior_registers):
12147 Adjust.
12148 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12149 (win32_attach): Pass 1 to do_initial_child_stuff.
12150 (win32_kill): Adjust interface. Remove process from processes
12151 table.
12152 (win32_detach): Ditto.
12153 (win32_join): Adjust interface.
12154 (win32_thread_alive): Take a ptid.
12155 (win32_resume): Adjust to use ptids.
12156 (get_child_debug_event): Ditto.
12157 (win32_wait): Adjust interface. Remove exiting process from
12158 processes table.
12159
12160 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12161
12162 Non-stop mode support.
12163
12164 * server.h (non_stop): Declare.
12165 (gdb_client_data, handler_func): Declare.
12166 (delete_file_handler, add_file_handler, start_event_loop):
12167 Declare.
12168 (handle_serial_event, handle_target_event, push_event)
12169 (putpkt_notif): Declare.
12170 * target.h (enum resume_kind): New.
12171 (struct thread_resume): Replace `step' field by `kind' field.
12172 (TARGET_WNOHANG): Define.
12173 (struct target_ops) <wait>: Add `options' argument.
12174 <supports_non_stop, async, start_non_stop>: New fields.
12175 (target_supports_non_stop, target_async): New.
12176 (start_non_stop): Declare.
12177 (mywait): Add `options' argument.
12178 * target.c (mywait): Add `options' argument. Print child exit
12179 notifications here.
12180 (start_non_stop): New.
12181 * server.c (non_stop, own_buf, mem_buf): New globals.
12182 (struct vstop_notif): New.
12183 (notif_queue): New global.
12184 (queue_stop_reply, push_event, discard_queued_stop_replies)
12185 (send_next_stop_reply): New.
12186 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12187 interface changes.
12188 (attach_inferior): In non-stop mode, don't wait for the target
12189 here.
12190 (handle_general_set): Handle QNonStop.
12191 (handle_query): When handling qC, return the current general
12192 thread, instead of the first thread of the list.
12193 (handle_query): If the backend supports non-stop mode, include
12194 QNonStop+ in the qSupported query response.
12195 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12196 and non-stop mode.
12197 (handle_v_attach, handle_v_run): Handle non-stop mode.
12198 (handle_v_stopped): New.
12199 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12200 (myresume): Adjust to use resume_kind. Handle non-stop.
12201 (queue_stop_reply_callback): New.
12202 (handle_status): Handle non-stop mode.
12203 (main): Clear non_stop flag on reconnection. Use the event-loop.
12204 Refactor serial protocol handling from here ...
12205 (process_serial_event): ... to this new function. When GDB
12206 selects any thread, select one here. In non-stop mode, wait until
12207 GDB acks all pending events before exiting.
12208 (handle_serial_event, handle_target_event): New.
12209 * remote-utils.c (remote_open): Install remote_desc in the event
12210 loop.
12211 (remote_close): Remove remote_desc from the event loop.
12212 (putpkt_binary): Rename to...
12213 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12214 (putpkt_binary): New as wrapper around putpkt_binary_1.
12215 (putpkt_notif): New.
12216 (prepare_resume_reply): In non-stop mode, don't change the
12217 general_thread.
12218 * event-loop.c: New.
12219 * Makefile.in (OBJ): Add event-loop.o.
12220 (event-loop.o): New rule.
12221
12222 * linux-low.h (pid_of): Moved here.
12223 (lwpid_of): New.
12224 (get_lwp_thread): Use lwpid_of.
12225 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12226 * linux-low.c (pid_of): Delete.
12227 (inferior_pid): Use lwpid_of.
12228 (linux_event_pipe): New.
12229 (target_is_async_p): New.
12230 (delete_lwp): New.
12231 (handle_extended_wait): Use lwpid_of.
12232 (add_lwp): Don't set lwpid field.
12233 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12234 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12235 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12236 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12237 first. Adjust to linux_wait_for_event interface changes. Use
12238 lwpid_of.
12239 (linux_detach): Don't delete the main lwp here.
12240 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12241 (status_pending_p): Don't consider explicitly suspended lwps.
12242 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12243 pointer. Add OPTIONS argument. Change return type to int. Use
12244 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12245 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12246 pointer. Add status pointer argument. Return a pid instead of a
12247 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12248 changes. In non-stop mode, don't switch to a random thread.
12249 (linux_wait): Rename to...
12250 (linux_wait_1): ... this. Add target_options argument, and handle
12251 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12252 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12253 clean exit and signal exit code. Don't stop all threads in
12254 non-stop mode. In all-stop mode, only stop all threads when
12255 reporting a stop to GDB. Handle explicit thread stop requests.
12256 (async_file_flush, async_file_mark): New.
12257 (linux_wait): New.
12258 (send_sigstop): Use lwpid_of.
12259 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12260 interface changes. In non-stop mode, don't switch to a random
12261 thread.
12262 (linux_resume_one_lwp): Use lwpid_of.
12263 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12264 (linux_resume_one_thread): ... this. Handle resume_stop. In
12265 non-stop mode, don't look for pending flag in all threads.
12266 (resume_status_pending_p): Don't consider explicitly suspended
12267 threads.
12268 (my_waitpid): Reimplement. Emulate __WALL.
12269 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12270 Use lwpid_of.
12271 (sigchld_handler, linux_supports_non_stop, linux_async)
12272 (linux_start_non_stop): New.
12273 (linux_target_ops): Register linux_supports_non_stop, linux_async
12274 and linux_start_non_stop.
12275 (initialize_low): Install SIGCHLD handler.
12276 * thread-db.c (thread_db_create_event, find_one_thread)
12277 (thread_db_get_tls_address): Use lwpid_of.
12278 * win32-low.c (win32_detach): Adjust to use resume_kind.
12279 (win32_wait): Add `options' argument.
12280 * spu-low.c (spu_resume): Adjust to use resume_kind.
12281 (spu_wait): Add `options' argument.
12282
12283 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12284
12285 Decouple target code from remote protocol.
12286
12287 * target.h (enum target_waitkind): New.
12288 (struct target_waitstatus): New.
12289 (struct target_ops) <wait>: Return an unsigned long. Take a
12290 target_waitstatus pointer instead of a char pointer.
12291 (mywait): Likewise.
12292 * target.c (mywait): Change prototype to return an unsigned long.
12293 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12294 * server.h (thread_from_wait, old_thread_from_wait): Delete
12295 declarations.
12296 (prepare_resume_reply): Change prototype to take a
12297 target_waitstatus.
12298 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12299 (last_status, last_ptid): New.
12300 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12301 pid instead of a signal.
12302 (attach_inferior): Remove "status" and "signal" parameters.
12303 Adjust.
12304 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12305 not as an address.
12306 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12307 (handle_v_requests, myresume): Remove "status" and "signal"
12308 parameters. Adjust.
12309 (handle_status): New.
12310 (main): Delete local `status'. Adjust.
12311 * remote-utils.c: Include target.h.
12312 (prepare_resume_reply): Change prototype to take a
12313 target_waitstatus. Adjust.
12314
12315 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12316 interface.
12317 * spu-low.c (spu_wait): Adjust.
12318 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12319 Delete.
12320 (win32_wait): Adjust.
12321
12322 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12323
12324 * target.h (struct thread_resume): Delete leave_stopped member.
12325 (struct target_ops): Add a `n' argument to the `resume' callback.
12326 * server.c (start_inferior): Adjust.
12327 (handle_v_cont, myresume): Adjust.
12328 * linux-low.c (check_removed_breakpoint): Adjust to resume
12329 interface change, and to removed leave_stopped field.
12330 (resume_ptr): Delete.
12331 (struct thread_resume_array): New.
12332 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12333 resume interface change.
12334 (linux_continue_one_thread, linux_queue_one_thread)
12335 (resume_status_pending_p): Check if the resume field is NULL
12336 instead of checking the leave_stopped member.
12337 (linux_resume): Adjust to the target resume interface change.
12338 * spu-low.c (spu_resume): Adjust to the target resume interface
12339 change.
12340 * win32-low.c (win32_detach, win32_resume): Ditto.
12341
12342 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12343
12344 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12345 flag.
12346 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12347 pending.
12348 (linux_continue_one_thread): Only preserve the stepping flag if
12349 there's a pending breakpoint.
12350
12351 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12352
12353 * server.c (main): After the inferior having exited, call
12354 remote_close before exiting gdbserver.
12355
12356 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12357
12358 Fix size of FPSCR in Power 7 processors.
12359 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12360 (PPC_FEATURE_HAS_DFP): New #define.
12361 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12362 size of the FPSCR.
12363
12364 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12365
12366 * server.c (handle_query) Whitespace and formatting.
12367
12368 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12369
12370 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12371 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12372 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12373 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12374 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12375 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12376 Makefile.in, configure.ac: Fix whitespace throughout.
12377 * configure: Regenerate.
12378
12379 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12380
12381 * inferiors.c (find_inferior): Make it safe for the callback
12382 function to delete the currently iterated inferior.
12383
12384 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12385
12386 * Makefile.in (linuw_low_h): Move higher.
12387 (thread-db.o): Depend on $(linux_low_h).
12388
12389 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12390
12391 Rename "process" to "lwp" throughout.
12392
12393 * linux-low.c (all_processes): Rename to...
12394 (all_lwps): ... this.
12395 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12396 (add_process): Rename to ...
12397 (add_lwp): ... this. Adjust.
12398 (linux_create_inferior): Adjust.
12399 (linux_attach_lwp): Adjust.
12400 (linux_attach): Adjust.
12401 (linux_kill_one_process): Rename to ...
12402 (linux_kill_one_lwp): ... this. Adjust.
12403 (linux_kill): Adjust.
12404 (linux_detach_one_process): Rename to ...
12405 (linux_detach_one_lwp): ... this. Adjust.
12406 (linux_detach): Adjust.
12407 (check_removed_breakpoint): Adjust.
12408 (status_pending_p): Adjust.
12409 (linux_wait_for_process): Rename to ...
12410 (linux_wait_for_lwp): ... this. Adjust.
12411 (linux_wait_for_event): Adjust.
12412 (send_sigstop): Adjust.
12413 (wait_for_sigstop): Adjust.
12414 (stop_all_processes): Rename to ...
12415 (stop_all_lwps): ... this.
12416 (linux_resume_one_process): Rename to ...
12417 (linux_resume_one_lwp): ... this. Adjust.
12418 (linux_set_resume_request, linux_continue_one_thread)
12419 (linux_queue_one_thread, resume_status_pending_p)
12420 (usr_store_inferior_registers, regsets_store_inferior_registers)
12421 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12422 Adjust.
12423 * linux-low.h (get_process): Rename to ...
12424 (get_lwp): ... this. Adjust.
12425 (get_thread_process): Rename to ...
12426 (get_thread_lwp): ... this. Adjust.
12427 (get_process_thread): Rename to ...
12428 (get_lwp_thread): ... this. Adjust.
12429 (struct process_info): Rename to ...
12430 (struct lwp_info): ... this.
12431 (all_processes): Rename to ...
12432 (all_lwps): ... this.
12433 * proc-service.c (ps_lgetregs): Adjust.
12434 * thread-db.c (thread_db_create_event, find_one_thread)
12435 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12436
12437 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12438
12439 * server.c (handle_query): Handle "qAttached".
12440
12441 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12442
12443 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12444 GPLv3, update license URL.
12445
12446 2009-03-01 Doug Evans <dje@google.com>
12447
12448 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12449 (server_h): Add gdb_signals.h.
12450 (signals.o): Update.
12451 * server.h (target_signal_from_host,target_signal_to_host_p)
12452 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12453
12454 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12455
12456 * remote-utils.c (getpkt): Also generate remote-debug
12457 information if noack_mode is set.
12458
12459 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12460
12461 * server.c (handle_query): Report qXfer:siginfo:read and
12462 qXfer:siginfo:write as supported and handle them.
12463 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12464 * linux-low.c (linux_xfer_siginfo): New.
12465 (linux_target_ops): Set it.
12466
12467 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12468
12469 * server.c (gdbserver_usage): Mention --remote-debug.
12470 (main): Accept '--remote-debug' switch.
12471
12472 2009-01-18 Doug Evans <dje@google.com>
12473
12474 * regcache.c (new_register_cache): No need to check result of xcalloc.
12475 * server.c (handle_search_memory): Back out calls to xmalloc,
12476 result is checked and error is returned to user upon failure.
12477 (handle_query): Ditto. Add more checks for result of malloc.
12478 (handle_v_cont): Check result of malloc, report error back to
12479 user upon failure.
12480 (handle_v_run): Ditto. Call freeargv.
12481 * server.h (freeargv): Declare.
12482 * utils.c (freeargv): New fn.
12483
12484 2009-01-15 Doug Evans <dje@google.com>
12485
12486 * gdbreplay.c (perror_with_name): Make arg const char *.
12487 * server.h (target_signal_to_name): Make return type const char *.
12488 * thread-db.c (thread_db_err_str): Make return type const char *.
12489 * utils.c (perror_with_name): Make arg const char *.
12490
12491 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12492
12493 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12494 when handling a EXIT_PROCESS_DEBUG_EVENT.
12495
12496 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12497
12498 * gdbreplay.c (gdbreplay_version): Update copyright year.
12499 * server.c (gdbserver_version): Likewise.
12500
12501 2009-01-05 Doug Evans <dje@google.com>
12502
12503 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12504 (handle_extended_wait): Improve comment.
12505
12506 2008-12-13 Doug Evans <dje@google.com>
12507
12508 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12509 * server.h (ATTR_MALLOC): New macro.
12510 (xmalloc,xcalloc,xstrdup): Declare.
12511 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12512 * inferiors.c: Ditto.
12513 * linux-low.c: Ditto.
12514 * mem-break.c: Ditto.
12515 * regcache.c: Ditto.
12516 * remote-utils.c: Ditto.
12517 * server.c: Ditto.
12518 * target.c: Ditto.
12519 * win32-low.c: Ditto.
12520
12521 2008-12-12 Doug Evans <dje@google.com>
12522
12523 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12524 in debugging printf.
12525
12526 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12527
12528 2008-12-09 Doug Evans <dje@google.com>
12529
12530 * linux-low.h (struct process_info): Delete member tid, unused.
12531 * thread-db.c (find_one_thread): Update.
12532 (maybe_attach_thread): Update.
12533
12534 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12535
12536 * target.h (struct target_ops): Add qxfer_osdata member.
12537 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12538 and dirent.h.
12539 (linux_qxfer_osdata): New functions.
12540 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12541 callback.
12542 * server.c (handle_query): Handle "qXfer:osdata:read:".
12543 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12544 (buffer_xml_printf): New functions.
12545 * server.h (struct buffer): New.
12546 (buffer_grow_str, buffer_grow_str0): New macros.
12547 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12548 (buffer_xml_printf): Declare.
12549
12550 2008-11-24 Doug Evans <dje@google.com>
12551
12552 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12553
12554 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12555
12556 * server.c (handle_v_run): Always use the supplied argument list.
12557
12558 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12559
12560 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12561 (xtensa_regmap_table): Add entry for scompare1.
12562
12563 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12564
12565 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12566 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12567 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12568 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12569 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12570 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12571 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12572 XML target descriptions.
12573 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12574 when inferior is running on an ISA 2.05 or later processor. Add
12575 special case to return offset for full 64-bit slot of FPSCR when
12576 in 32-bits.
12577
12578 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12579
12580 * Makefile.in (SFILES, clean): Added sparc64 files.
12581 (reg-sparc64.o, reg-sparc64.c): New.
12582 * configure.srv (sparc*-*-linux*): New configuration.
12583 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12584 syscall arguments for SPARC.
12585 (regsets_store_inferior_registers): Likewise.
12586 * linux-sparc-low.c: New file.
12587
12588 2008-10-21 Doug Evans <dje@google.com>
12589
12590 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12591 (READLINE_DIR,READLINE_DEP): Delete.
12592 (INTERNAL_CFLAGS): Update.
12593 (LINTFLAGS): Update.
12594
12595 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12596
12597 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12598 whole argv from the last run, not just argv[0].
12599
12600 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12601
12602 * regcache.c (new_register_cache): Return NULL if the register
12603 cache size isn't known yet.
12604 (free_register_cache): Avoid dereferencing a NULL regcache.
12605
12606 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12607
12608 * configure.srv: Merge MIPS and MIPS64.
12609
12610 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12611
12612 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12613
12614 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12615
12616 * Makefile.in: Add required vsx dependencies.
12617
12618 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12619 Declare init_registers_powerpc_vsx32l.
12620 Declare init_registers_powerpc_vsx64l.
12621 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12622 (ppc_arch_setup): Check for VSX in hwcap.
12623 (ppc_fill_vsxregset): New function.
12624 (ppc_store_vsxregset): New function.
12625 Add new VSX entry in regset_info target_regsets.
12626
12627 * configure.srv: Add new VSX dependencies.
12628
12629 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12630
12631 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12632 (remote_open): Set or clear transport_is_reliable.
12633 (putpkt_binary): Don't expect acks in noack mode.
12634 (getpkt): Don't send ack/nac in noack mode.
12635 * server.c (handle_general_set): Handle QStartNoAckMode.
12636 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12637 qSupported.
12638 (main): Reset noack_mode on every connection.
12639 * server.h (noack_mode): Declare.
12640
12641 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12642
12643 * Makefile.in (GDBREPLAY_OBS): New variable.
12644 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12645
12646 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12647 Daniel Jacobowitz <dan@codesourcery.com>
12648
12649 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12650 (usr_store_inferior_registers): Likewise.
12651 (regsets_store_inferior_registers): Likewise.
12652
12653 2008-07-31 Rolf Jansen <rj@surtec.com>
12654 Pedro Alves <pedro@codesourcery.com>
12655
12656 * configure.ac: Check for memmem declaration.
12657 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12658 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12659 (disable_packet_qfThreadInfo): Unconditionally compile.
12660 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12661 * configure, config.in: Regenerate.
12662
12663 2008-07-28 Doug Kwan <dougkwan@google.com>
12664
12665 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12666 (linux_write_memory): Remove declaration of errno.
12667
12668 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12669
12670 * linux-low.c (handle_extended_wait): Do not use "status"
12671 variable uninitialized.
12672
12673 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12674
12675 * server.c (handle_v_attach): Inhibit reporting dll changes.
12676
12677 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12678
12679 * remote-utils.c (prepare_resume_reply): If requested, don't
12680 output "thread:TID" in the T stop reply.
12681
12682 * server.c (disable_packet_vCont, disable_packet_Tthread)
12683 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12684 (handle_query): If requested, disable support for qC, qfThreadInfo
12685 and qsThreadInfo.
12686 (handle_v_requests): If requested, disable support for vCont.
12687 (gdbserver_show_disableable): New.
12688 (main): Handle --disable-packet and --disable-packet=LIST.
12689
12690 * server.h (disable_packet_vCont, disable_packet_Tthread)
12691 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12692
12693 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12694
12695 * server.c (gdbserver_usage): Mention --version.
12696
12697 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12698
12699 * Makefile.in (gdbreplay.o): New rule.
12700
12701 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12702
12703 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12704 message, not gdbserver.
12705
12706 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12707 Nathan Sidwell <nathan@codesourcery.com>
12708 Joseph Myers <joseph@codesourcery.com>
12709
12710 * acinclude.m4: Include ../../config/acx.m4.
12711 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12712 * configure, config.in: Regenerate.
12713 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12714 * server.c (gdbserver_version): Print PKGVERSION.
12715 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12716 (main): Adjust gdbserver_usage calls.
12717 * gdbreplay.c (version, host_name): Add declarations.
12718 (gdbreplay_version, gdbreplay_usage): New.
12719 (main): Accept --version and --help options.
12720
12721 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12722
12723 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12724 (arm_breakpoint_at): Handle Thumb.
12725 (the_low_target): Add comment.
12726
12727 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12728
12729 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12730
12731 2008-05-09 Doug Evans <dje@google.com>
12732
12733 * server.h (decode_search_memory_packet): Declare.
12734 * remote-utils.c (decode_search_memory_packet): New fn.
12735 * server.c (handle_search_memory_1): New fn.
12736 (handle_search_memory): New fn.
12737 (handle_query): Process qSearch:memory packets.
12738
12739 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12740
12741 * regcache.c (registers_length): Remove.
12742 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12743 full register packet.
12744 * regcache.h (registers_length): Remove prototype.
12745 * server.h (PBUFSIZ): Define to 16384.
12746
12747 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12748
12749 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12750 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12751 powerpc-64l.o, and powerpc-altivec64l.o.
12752 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12753 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12754 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12755 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12756 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12757 to srv_xmlfiles.
12758
12759 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12760 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12761 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12762 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12763 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12764 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12765 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12766 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12767 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12768 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12769 (clean): Update.
12770
12771 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12772 (init_registers_powerpc_32l): ... this new prototype.
12773 (init_registers_powerpc_32): Remove, replace by ...
12774 (init_registers_powerpc_altivec32l): ... this new prototype.
12775 (init_registers_powerpc_e500): Remove, replace by ...
12776 (init_registers_powerpc_e500l): ... this new prototype.
12777 (init_registers_ppc64): Remove, replace by ...
12778 (init_registers_powerpc_64l): ... this new prototype.
12779 (init_registers_powerpc_64): Remove, replace by ...
12780 (init_registers_powerpc_altivec64l): ... this new prototype.
12781 (ppc_num_regs): Set to 73.
12782 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12783 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12784 (ppc_cannot_store_register): Handle orig_r3 and trap.
12785 (ppc_arch_setup): Update init_registers_... calls.
12786 (ppc_fill_gregset): Handle orig_r3 and trap.
12787
12788 * inferiors.c (clear_inferiors): Reset current_inferior.
12789
12790 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12791
12792 * acinclude.m4: Add override.m4.
12793 * configure: Regenerate.
12794
12795 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12796
12797 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12798 initial call to init_register_ppc64.
12799
12800 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12801
12802 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12803 single powerpc*-*-linux* case.
12804 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12805
12806 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12807
12808 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12809 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12810 from reg_xmlfiles.
12811 * linux-ppc-low.c: Include <elf.h>.
12812 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12813 (ppc_hwcap): New global variable.
12814 (ppc_regmap): Remove __SPE__ #ifdef sections.
12815 (ppc_regmap_e500): New global variable.
12816 (ppc_cannot_store_register): Update __SPE__ special case.
12817 (ppc_get_hwcap): New function.
12818 (ppc_arch_setup): Use it to determine whether inferior supports
12819 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12820 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12821 Do not access registers if target does not support AltiVec.
12822 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12823 Do not access registers if target does not support SPE.
12824 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12825
12826 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12827
12828 * linux-low.c (disabled_regsets, num_regsets): New.
12829 (use_regsets_p): Delete.
12830 (linux_wait_for_process): Clear disabled_regsets.
12831 (regsets_fetch_inferior_registers): Check and set it.
12832 (regsets_store_inferior_registers): Likewise.
12833 (linux_fetch_registers, linux_store_registers): Do not use
12834 use_regsets_p.
12835 (initialize_low): Allocate disabled_regsets.
12836
12837 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12838
12839 * Makefile.in (LIBOBJS): New.
12840 (OBS): Use LIBOBJS.
12841 (memmem.o): New rule.
12842 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12843 * configure: Regenerated.
12844
12845 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12846
12847 * server.c (handle_query): Never return "unsupported" for
12848 qXfer:features:read queries.
12849
12850 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12851
12852 * server.c (get_features_xml): Fix inverted condition.
12853 (handle_query): Always support qXfer:feature:read.
12854
12855 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * server.c (wrapper_argv): New.
12858 (start_inferior): Handle wrapper_argv. If set, expect an extra
12859 trap.
12860 (gdbserver_usage): Document --wrapper.
12861 (main): Parse --wrapper.
12862
12863 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12864
12865 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12866 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12867 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12868 (ppc_set_pc): Likewise.
12869 (ppc_arch_setup): New function.
12870 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12871 of collect_register.
12872 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12873
12874 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12875
12876 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12877 instead of linux-ppc64-low.o.
12878 * linux-ppc64-low.c: Remove file.
12879 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12880 (linux-ppc64-low.o): Remove rule.
12881
12882 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12883 (init_registers_powerpc_64): Likewise.
12884 (ppc_regmap): Conditionally define depending on __powerpc64__.
12885 (ppc_cannot_store_register): Do not special-case "fpscr" when
12886 compiled on __powerpc64__.
12887 (ppc_collect_ptrace_register): New function.
12888 (ppc_supply_ptrace_register): New function.
12889 (ppc_breakpoint): Change type to "unsigned int".
12890 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12891 (the_low_target): Conditionally provide initializers for the
12892 arch_setup member depending on __powerpc64__. Install
12893 collect_ptrace_register and supply_ptrace_register members.
12894
12895 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12896
12897 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12898 * server.c (gdbserver_xmltarget): Define.
12899 (get_features_xml): Use it to replace "target.xml" and arch_string.
12900
12901 * configure.srv: Remove srv_xmltarget. Add XML files that were
12902 mentioned there to srv_xmlfiles instead. Remove conditional tests
12903 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12904 srv_xmlfiles and srv_regobj to include all possible choices.
12905 * configure.ac (srv_xmltarget): Remove.
12906 (srv_xmlfiles): Do not add "target.xml".
12907 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12908 checks for supplementary target information.
12909 * configure: Regenerate.
12910 * Makefile.in (XML_TARGET): Remove.
12911 (target.xml): Remove rule.
12912 (clean): Do not clean up target.xml.
12913 (.PRECIOUS): Do not mention target.xml.
12914
12915 * target.h (struct target_ops): Remove arch_string member.
12916 * linux-low.c (linux_arch_string): Remove.
12917 (linux_target_ops): Remove arch_string initializer.
12918 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12919 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12920 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12921 * spu-low.c (spu_arch_string): Remove.
12922 (spu_target_ops): Remove arch_string initializer.
12923 * win32-low.c (win32_arch_string): Remove.
12924 (win32_target_ops): Remove arch_string initializer.
12925 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12926 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12927 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12928
12929 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12930
12931 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12932 by collect_ptrace_register and supply_ptrace_register hooks.
12933 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12934 instead of checking for the_low_target.left_pad_xfer.
12935 (usr_store_inferior_registers): Use collect_ptrace_register callback
12936 instead of checking for the_low_target.left_pad_xfer.
12937
12938 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12939 (s390_supply_ptrace_register): Likewise.
12940 (s390_fill_gregset): Call s390_collect_ptrace_register.
12941 (the_low_target): Update.
12942
12943 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12944 (ppc_supply_ptrace_register): Likewise.
12945 (the_low_target): Update.
12946
12947 * linux-i386-low.c (the_low_target): Update.
12948 * linux-x86-64-low.c (the_low_target): Update.
12949
12950 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12951
12952 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12953 reg-s390.o and reg-s390x.o.
12954
12955 * linux-low.c (new_inferior): New global variable.
12956 (linux_create_inferior, linux_attach): Set it.
12957 (linux_wait_for_process): Call the_low_target.arch_setup after the
12958 target has stopped for the first time.
12959 (initialize_low): Do not call the_low_target.arch_setup.
12960
12961 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12962 (s390_set_pc): Likewise.
12963 (s390_arch_setup): New function.
12964 (the_low_target): Use s390_arch_setup as arch_setup routine.
12965
12966 * regcache.c (realloc_register_cache): New function.
12967 (set_register_cache): Call it for each existing regcache.
12968
12969 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12970
12971 * server.h (init_registers): Remove prototype.
12972
12973 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12974 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12975 instead of init_registers ().
12976 * linux-arm-low.c (init_registers_arm): Add prototype.
12977 (init_registers_arm_with_iwmmxt): Likewise.
12978 (the_low_target): Add initializer for arch_setup field.
12979 * linux-cris-low.c (init_registers_cris): Add prototype.
12980 (the_low_target): Add initializer for arch_setup field.
12981 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12982 (the_low_target): Add initializer for arch_setup field.
12983 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12984 (the_low_target): Add initializer for arch_setup field.
12985 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12986 (the_low_target): Add initializer for arch_setup field.
12987 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12988 (the_low_target): Add initializer for arch_setup field.
12989 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12990 (the_low_target): Add initializer for arch_setup field.
12991 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12992 (init_registers_mips64_linux): Likewise.
12993 (the_low_target): Add initializer for arch_setup field.
12994 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12995 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12996 (the_low_target): Add initializer for arch_setup field.
12997 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12998 (init_registers_powerpc_64): Likewise.
12999 (the_low_target): Add initializer for arch_setup field.
13000 * linux-s390-low.c (init_registers_s390): Add prototype.
13001 (init_registers_s390x): Likewise.
13002 (the_low_target): Add initializer for arch_setup field.
13003 * linux-sh-low.c (init_registers_sh): Add prototype.
13004 (the_low_target): Add initializer for arch_setup field.
13005 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13006 (the_low_target): Add initializer for arch_setup field.
13007 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13008 (the_low_target): Add initializer for arch_setup field.
13009
13010 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13011 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13012 instead of init_registers ().
13013 * win32-arm-low.c (init_registers_arm): Add prototype.
13014 (the_low_target): Add initializer for arch_setup field.
13015 * win32-i386-low.c (init_registers_i386): Add prototype.
13016 (the_low_target): Add initializer for arch_setup field.
13017
13018 * spu-low.c (init_registers_spu): Add prototype.
13019 (initialize_low): Call initialie_registers_spu () instead of
13020 initialize_registers ().
13021
13022 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13023
13024 * server.c (handle_v_requests): When handling the vRun and vAttach
13025 packets, if already debugging a process, don't kill it. Return an
13026 error instead.
13027
13028 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13029
13030 * server.c (handle_query): Correct length check.
13031
13032 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13033
13034 * win32-low.c (do_initial_child_stuff): Add process handle
13035 parameter. Set current_process_handle and current_process_id from the
13036 parameters. Clear globals.
13037 (win32_create_inferior): Don't set current_process_handle and
13038 current_process_id here. Instead pass them on the call to
13039 do_initial_child_stuff.
13040 (win32_attach): Likewise.
13041 (win32_clear_inferiors): New.
13042 (win32_kill): Don't close the current process handle or the
13043 current thread handle here. Instead call win32_clear_inferiors.
13044 (win32_detach): Don't open a new handle to the process. Call
13045 win32_clear_inferiors.
13046 (win32_join): Don't rely on current_process_handle; open a new
13047 handle using the process id.
13048 (win32_wait): Call win32_clear_inferiors when the inferior process
13049 has exited.
13050
13051 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13052
13053 * server.c (monitor_show_help): Add "exit".
13054
13055 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13056
13057 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13058 (clean): Add reg-xtensa.c.
13059 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13060 * configure.srv (xtensa*-*-linux*) New target.
13061 * linux-xtensa-low.c: New.
13062 * xtensa-xtregs.c: New.
13063
13064 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13065
13066 * hostio.c: Don't include errno.h.
13067 (errno_to_fileio_errno): Move to hostio-errno.
13068 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13069 error number outputting to the target->hostio_last_error callback.
13070 (hostio_packet_error): Use FILEIO_EINVAL directly.
13071 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13072 calls to hostio_error.
13073 * hostio-errno.c: New.
13074 * server.h (hostio_last_error_from_errno): Declare.
13075 * target.h (target_ops): Add hostio_last_error member.
13076 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13077 as hostio_last_error handler.
13078 * spu-low.c (spu_target_ops): Likewise.
13079 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13080 (wince_hostio_last_error): New functions.
13081 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13082 as hostio_last_error handler.
13083 (win32_target_ops) [!_WIN32_WCE]: Register
13084 hostio_last_error_from_errno as hostio_last_error handler.
13085 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13086 (hostio-errno.o): New rule.
13087 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13088 * configure.srv (srv_hostio_err_objs): New variable. Default to
13089 hostio-errno.o.
13090 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13091 * configure: Regenerate.
13092
13093 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13094
13095 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13096 (linux_kill, linux_detach): Clean up the process list.
13097 * remote-utils.c (remote_open): Improve port number parsing.
13098 (putpkt_binary, input_interrupt): Only send interrupts if the target
13099 is running.
13100 * server.c (extended_protocol): Make static.
13101 (attached): Define earlier.
13102 (exit_requested, response_needed, program_argv): New variables.
13103 (target_running): New.
13104 (start_inferior): Clear attached here.
13105 (attach_inferior): Set attached here.
13106 (require_running): Define.
13107 (handle_query): Use require_running and target_running. Implement
13108 "monitor exit".
13109 (handle_v_attach, handle_v_run): New.
13110 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13111 (gdbserver_usage): Update.
13112 (main): Redo argument parsing. Handle --debug and --multi. Handle
13113 --attach along with other options or after the port. Save
13114 program_argv. Support no initial program. Resynchronize
13115 communication with GDB after an error. Handle "monitor exit".
13116 Use require_running and target_running. Always allow the extended
13117 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13118 restart in extended mode.
13119 * README: Refer to the GDB manual. Update --attach usage.
13120
13121 2007-12-20 Andreas Schwab <schwab@suse.de>
13122
13123 * linux-low.c (STACK_SIZE): Define.
13124 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13125 (linux_test_for_tracefork): Likewise.
13126
13127 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13128
13129 * linux-low.c (linux_wait_for_event): Update messages. Do not
13130 reinsert auto-delete breakpoints.
13131 * mem-break.c (struct breakpoint): Change return type of handler to
13132 int.
13133 (set_breakpoint_at): Update handler type.
13134 (reinsert_breakpoint_handler): Return 1 instead of calling
13135 delete_breakpoint.
13136 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13137 setting a new one.
13138 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13139 * mem-break.h (set_breakpoint_at): Update handler type.
13140 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13141 * win32-low.c (auto_delete_breakpoint): New.
13142 (get_child_debug_event): Use it.
13143
13144 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13145
13146 * configure.ac: Check for pread and pwrite.
13147 * hostio.c (handle_pread): Fall back to lseek and read.
13148 (handle_pwrite): Fall back to lseek and write.
13149 * config.in, configure: Regenerated.
13150
13151 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13152
13153 * server.c (myresume): Add own_buf argument.
13154 (main): Update calls.
13155
13156 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13157
13158 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13159 * remote-utils.c (remote_open): Do not call disable_async_io.
13160 (block_async_io): Delete.
13161 (unblock_async_io): Make static.
13162 (initialize_async_io): New.
13163 * server.c (handle_v_cont): Handle async I/O here.
13164 (myresume): Likewise. Move other common resume tasks here...
13165 (main): ... from here. Call initialize_async_io. Disable async
13166 I/O before the main loop.
13167 * server.h (initialize_async_io): Declare.
13168 (block_async_io, unblock_async_io): Delete prototypes.
13169 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13170
13171 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13172
13173 * remote-utils.c (readchar): Allow binary data in received messages.
13174
13175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13176
13177 * win32-low.c (attaching): New global.
13178 (win32_create_inferior): Clear the `attaching' global.
13179 (win32_attach): Set the `attaching' global.
13180 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13181 attaching. Only set a breakpoint at the entry point if not
13182 attaching.
13183
13184 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13185
13186 * server.c (main): Don't report dll events on the initial
13187 connection on attaches.
13188
13189 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13190
13191 * server.c (main): Relax numerical bases supported for the pid of
13192 the --attach command line argument.
13193
13194 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13195
13196 * win32-low.c (win32_attach): Call OpenProcess before
13197 DebugActiveProcess, not after. Add last error output to error
13198 call.
13199
13200 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13201
13202 * win32-low.c (win32_get_thread_context)
13203 (win32_set_thread_context): New functions.
13204 (thread_rec): Use win32_get_thread_context.
13205 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13206 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13207 field.
13208
13209 2007-12-03 Leo Zayas
13210 Pedro Alves <pedro_alves@portugalmail.pt>
13211
13212 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13213 global variables.
13214 (child_add_thread): Minor cleanup.
13215 (child_continue): Resume artificially suspended threads before
13216 calling ContinueDebugEvent.
13217 (suspend_one_thread): New.
13218 (fake_breakpoint_event): New.
13219 (get_child_debug_event): Change return type to int. Check here if
13220 gdb sent an interrupt request. If a soft interrupt was requested,
13221 fake a breakpoint event. Return 0 if there is no event to handle,
13222 and 1 otherwise.
13223 (win32_wait): Don't check here if gdb sent an interrupt request.
13224 Ensure there is a valid event to handle.
13225 (win32_request_interrupt): Add soft interruption method as last
13226 resort.
13227
13228 2007-12-03 Leo Zayas
13229 Pedro Alves <pedro_alves@portugalmail.pt>
13230
13231 * win32-low.h (win32_thread_info): Add descriptions to the
13232 structure members. Replace `suspend_count' counter by a
13233 `suspended' flag.
13234 * win32-low.c (thread_rec): Update condition of when to get the
13235 context from the inferior. Rely on ContextFlags being set if it
13236 has already been retrieved. Only suspend the inferior thread if
13237 we haven't already. Warn if that fails.
13238 (continue_one_thread): s/suspend_count/suspended/. Only call
13239 ResumeThread once. Warn if that fails.
13240
13241 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13242
13243 * win32-low.c (win32_wait): Don't read from the inferior when it
13244 has already exited.
13245
13246 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13247
13248 * Makefile.in (win32_low_h): New variable.
13249 (win32-low.o): Add dependency on $(win32_low_h).
13250 (win32-arm-low.o, win32-i386-low.o): New rules.
13251
13252 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13253
13254 * hostio.c: Correct copyright year.
13255
13256 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * Makefile.in (OBS): Add hostio.o.
13259 (hostio.o): New rule.
13260 * server.h (handle_vFile): Declare.
13261 * hostio.c: New file.
13262 * server.c (handle_v_requests): Take packet_len and new_packet_len
13263 for binary packets. Call handle_vFile.
13264 (main): Update call to handle_v_requests.
13265
13266 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * linux-low.c: Include <sched.h>.
13269
13270 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13271
13272 * linux-low.c (linux_tracefork_grandchild): New.
13273 (linux_tracefork_child): Use clone.
13274 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13275
13276 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13277
13278 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13279
13280 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13283
13284 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13285
13286 * inferiors.c (change_inferior_id): Delete.
13287 (add_pid_to_list, pull_pid_from_list): New.
13288 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13289 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13290 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13291 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13292 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13293 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13294 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13295 (using_threads): Always set to 1.
13296 (handle_extended_wait): New.
13297 (add_process): Do not set TID.
13298 (linux_create_inferior): Set must_set_ptrace_flags.
13299 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13300 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13301 (linux_thread_alive): Rename TID argument to LWPID.
13302 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13303 (linux_wait_for_event): Do not use TID or check using_threads. Update
13304 call to dead_thread_notify. Call handle_extended_wait.
13305 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13306 (send_sigstop): Delete sigstop_sent.
13307 (wait_for_sigstop): Avoid TID.
13308 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13309 (linux_test_for_tracefork): New.
13310 (linux_lookup_signals): Use thread_db_active and
13311 linux_supports_tracefork_flag.
13312 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13313 * linux-low.h (get_process_thread): Avoid TID.
13314 (struct process_ifo): Move thread_known and tid to the end. Remove
13315 sigstop_sent.
13316 (linux_attach_lwp, thread_db_init): Update prototypes.
13317 * server.h (change_inferior_id): Delete prototype.
13318 (add_pid_to_list, pull_pid_from_list): New prototypes.
13319 * thread-db.c (thread_db_use_events): New.
13320 (find_first_thread): Rename to...
13321 (find_one_thread): ...this. Update callers and messages. Do not
13322 call fatal. Check thread_db_use_events. Do not call
13323 change_inferior_id or new_thread_notify.
13324 (maybe_attach_thread): Update. Do not call new_thread_notify.
13325 (thread_db_init): Set thread_db_use_events. Check use_events.
13326 * utils.c (fatal, warning): Correct message prefix.
13327
13328 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * Makefile.in (clean): Remove new files.
13331 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13332 (powerpc-64.o, powerpc-64.c): New rules.
13333 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13334 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13335 with SPE.
13336 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13337 SPE targets.
13338 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13339 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13340 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13341 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13342 (target_regsets): Add AltiVec and SPE register sets.
13343 * configure.ac: Check for AltiVec and SPE.
13344 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13345 (ppc_fill_vrregset, ppc_store_vrregset): New.
13346 (target_regsets): Add AltiVec register set.
13347 * configure: Regenerated.
13348
13349 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13350
13351 * linux-low.c (O_LARGEFILE): Define.
13352 (linux_read_memory): Use /proc/PID/mem.
13353 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13354 * configure, config.in: Regenerated.
13355
13356 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * linux-low.c (linux_wait_for_event): Do not pass signals while
13359 single-stepping.
13360
13361 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13362
13363 * win32-low.c (create_process): New.
13364 (win32_create_inferior): Use create_process instead of
13365 CreateProcess. If create_process failed retry appending an ".exe"
13366 suffix. Store the GetLastError result immediatelly after
13367 create_process calls and use it on the call to error.
13368
13369 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13370
13371 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13372
13373 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13374
13375 * configure.ac: Switch license to GPLv3.
13376
13377 2007-08-01 Michael Snyder <msnyder@access-company.com>
13378
13379 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13380
13381 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13382
13383 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13384 typedef.
13385 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13386 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13387 CloseToolhelp32Snapshot.
13388 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13389 CloseToolhelp32Snapshot.
13390
13391 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13392
13393 * server.c (main): Check for inferior exit before main loop.
13394
13395 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13396
13397 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13398 instead of on tmp_desc.
13399
13400 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13401 Daniel Jacobowitz <dan@codesourcery.com>
13402
13403 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13404 (add_thread): Minor cleanups.
13405 (clear_inferiors): Move lower in the file. Clear the DLL
13406 list.
13407 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13408 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13409 (xml_escape_text): New.
13410 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13411 for qSupported.
13412 (handle_v_cont): Report errors.
13413 (gdbserver_version): Update.
13414 (main): Correct size of own_buf. Do not report initial DLL events.
13415 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13416 (unloaded_dll, xml_escape_text): New.
13417 * win32-low.c (enum target_waitkind): Update comments.
13418 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13419 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13420 (win32_EnumProcessModules, win32_GetModuleInformation)
13421 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13422 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13423 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13424 (win32_Module32First, win32_Module32Next, load_toolhelp)
13425 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13426 (get_child_debug_event): Handle DLL events.
13427 (win32_wait): Likewise.
13428
13429 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13430
13431 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13432 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13433
13434 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13435
13436 * win32-low.c (handle_output_debug_string): Ignore event if not
13437 waiting.
13438
13439 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13440
13441 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13442
13443 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13444
13445 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13446
13447 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13448
13449 * inferiors.c (change_inferior_id): Add comment.
13450 * linux-low.c (check_removed_breakpoint): Add an early
13451 prototype. Improve debug output.
13452 (linux_attach): Doc update.
13453 (linux_detach_one_process, linux_detach): Clean up before releasing
13454 each process.
13455 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13456 * linux-low.h (struct process_info): Doc improvement.
13457 * mem-break.c (delete_all_breakpoints): New.
13458 * mem-break.h (delete_all_breakpoints): New prototype.
13459 * thread-db.c (find_first_thread): New.
13460 (thread_db_create_event): Call it instead of
13461 thread_db_find_new_threads. Clean up unused variables.
13462 (maybe_attach_thread): Remove first thread handling.
13463 (thread_db_find_new_threads): Use find_first_thread.
13464 (thread_db_get_tls_address): Likewise.
13465
13466 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13467
13468 * thread-db.c (thread_db_find_new_threads): Add prototype.
13469 (thread_db_create_event): Check for the main thread before adding
13470 a new thread.
13471 (maybe_attach_thread): Only enable event reporting if TID == 0.
13472 (thread_db_get_tls_address): Check for new threads.
13473
13474 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * linux-low.c (linux_create_inferior): Try execv before execvp.
13477 * spu-low.c (spu_create_inferior): Likewise.
13478
13479 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13480
13481 * linux-low.c (linux_create_inferior): Change execv to execvp.
13482 * spu-low.c (spu_create_inferior): Likewies.
13483
13484 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13485
13486 * Makefile.in (clean): Clean new files instead of deleted ones.
13487 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13488 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13489 rules.
13490 * configure.srv: Specify XML files and new regformats for MIPS and
13491 MIPS64 GNU/Linux.
13492 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13493 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13494 an entry for the restart register.
13495 (mips_cannot_fetch_register, mips_cannot_store_register)
13496 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13497 register names to match the XML descriptions.
13498 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13499 restart register instead of $0.
13500
13501 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13502 Markus Deuling <deuling@de.ibm.com>
13503
13504 * remote-utils.c (decode_xfer_write): New function.
13505 * server.h (decode_xfer_write): Add prototype.
13506 * server.c (handle_query): Add PACKET_LEN argument. Support
13507 qXfer:spu:read and qXfer:spu:write packets.
13508 (main): Pass packet_len to handle_query.
13509 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13510 * target.h (target_ops): Add qxfer_spu.
13511
13512 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13513
13514 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13515 accessing non-seekable spufs files.
13516
13517 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13518
13519 * server.c (handle_query): Add reply for qC packet.
13520
13521 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13522 Leo Zayas <lerele@champenstudios@com>
13523
13524 * server.h (check_remote_input_interrupt_request): New function.
13525 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13526 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13527 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13528 (check_remote_input_interrupt_request): New function.
13529 * server.h (check_remote_input_interrupt_request): Declare.
13530 * win32-low.c (winapi_DebugBreakProcess,
13531 winapi_GenerateConsoleCtrlEvent): New typedefs.
13532 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13533 to 250 ms.
13534 (win32_wait): Check for remote interrupt request
13535 with check_remote_input_interrupt_request.
13536 (win32_request_interrupt): New function.
13537 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13538
13539 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13540
13541 * win32-low.c (debug_registers_changed,
13542 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13543 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13544 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13545 (thread_rec): Get context using the low target.
13546 (child_add_thread): Call thread_added on the low target,
13547 which does the same thing.
13548 (regptr): Delete.
13549 (do_initial_child_stuff): Remove debug registers references.
13550 Set context using the low target. Resume threads after
13551 setting the contexts.
13552 (child_continue): Remove dead variable. Remove debug
13553 registers references.
13554 (child_fetch_inferior_registers): Go through the low target.
13555 (do_child_store_inferior_registers): Remove.
13556 (child_store_inferior_registers): Go through the low target.
13557 (win32_resume): Remove debug registers references.
13558 Set context using the low target.
13559 (handle_exception): Change return type to void. Don't record
13560 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13561 first chance exception.
13562 (get_child_debug_event): Change return type to void. Remove
13563 goto loop. Always return after waiting for debug event.
13564 (win32_wait): Convert to switch statement. Handle spurious
13565 events.
13566
13567 * win32-i386-low.c (debug_registers_changed,
13568 debug_registers_used): New.
13569 (initial_stuff): Rename to ...
13570 (i386_initial_stuff): ... this. Clear debug registers
13571 state variables.
13572 (store_debug_registers): Delete.
13573 (i386_get_thread_context): New.
13574 (load_debug_registers): Delete.
13575 (i386_set_thread_context): New.
13576 (i386_thread_added): New.
13577 (single_step): Rename to ...
13578 (i386_single_step): ... this.
13579 (do_fetch_inferior_registers): Rename to ...
13580 (i386_fetch_inferior_register): ... this.
13581 (i386_store_inferior_register): New.
13582 (the_low_target): Adapt to new interface.
13583
13584 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13585 (arm_get_thread_context): New.
13586 (arm_set_thread_context): New.
13587 (regptr): New.
13588 (do_fetch_inferior_registers): Rename to ...
13589 (arm_fetch_inferior_register): ... this.
13590 (arm_store_inferior_register): New.
13591 (arm_wince_breakpoint): Reimplement as unsigned long.
13592 (arm_wince_breakpoint_len): Define.
13593 (the_low_target): Adapt to new interface.
13594
13595 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13596 load_debug_registers. Add get_thread_context, set_thread_context,
13597 thread_added and store_inferior_register. Rename
13598 fetch_inferior_registers to fetch_inferior_register.
13599 (regptr): Remove declaration.
13600
13601 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13602
13603 * linux-low.c (linux_detach): Change return type to int. Return 0.
13604 * spu-low.c (spu_detach): Likewise.
13605
13606 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13607
13608 * target.h (target_ops): Change return type of detach to int.
13609 Add join.
13610 (join_inferior): New.
13611 * server.c (main): Don't skip detach support on mingw32.
13612 If the inferior doesn't support detaching return error.
13613 Call join_inferior instead of using waitpid.
13614 * linux-low.c (linux_join): New.
13615 (linux_target_op): Add linux_join.
13616 * spu-low.c (spu_join): New.
13617 (spu_target_ops): Add spu_join.
13618 * win32-low.c (win32_detach): Adapt to new interface.
13619 Reopen current_process_handle before detaching. Issue a child
13620 resume before detaching.
13621 (win32_join): New.
13622 (win32_target_op): Add win32_join.
13623
13624 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13625
13626 * win32-low.c (win32-attach): Fix return value.
13627 * target.h (target_ops): Describe ATTACH return values.
13628
13629 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13630
13631 * win32-low.c (GETPROCADDRESS): Define.
13632 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13633 (winapi_DebugSetProcessKillOnExit): Likewise.
13634 (win32_create_inferior): Force usage of ansi CreateProcessA.
13635 (win32_attach): Use GETPROCADDRESS.
13636 (win32_detach): Likewise.
13637
13638 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13639
13640 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13641
13642 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * win32-low.c: Commit leftover changes from 2007-03-29.
13645
13646 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13649 fields short instead of int. Add explicit padding.
13650 (i387_cache_to_fsave): Remove unnecessary casts.
13651 (i387_fsave_to_cache): Doc fix.
13652 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13653
13654 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13657 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13658
13659 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13660
13661 * configure.srv (arm*-*-mingw32ce*): Move near the other
13662 arm targets.
13663
13664 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13665
13666 * configure.ac: Add errno checking.
13667 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13668 sys/file.h and malloc.h.
13669 (AC_CHECK_DECLS): Add perror.
13670 (srv_mingwce): Handle.
13671 * configure.srv (i[34567]86-*-cygwin*): Add
13672 win32-i386-low.o to srv_tgtobj.
13673 (i[34567]86-*-mingw*): Likewise.
13674 (arm*-*-mingw32ce*): Add case.
13675 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13676 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13677 [__MINGW32CE__] (strerror): New function.
13678 [__MINGW32CE__] (errno): Define to GetLastError.
13679 [__MINGW32CE__] (COUNTOF): New macro.
13680 (remote_open): Remove extra close call.
13681 * mem-break.c (delete_breakpoint_at): New function.
13682 * mem-break.h (delete_breakpoint_at): Declare.
13683 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13684 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13685 [USE_WIN32API] (read, write): Add char* casts.
13686 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13687 * server.h: Include wincecompat.h on Windows CE.
13688 [HAVE_ERRNO_H]: Check.
13689 (perror): Declare if not declared.
13690 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13691 (perror_with_name): Remove errno declaration.
13692 * wincecompat.h: New.
13693 * wincecompat.c: New.
13694 * win32-low.h: New.
13695 * win32-arm-low.c: New.
13696 * win32-i386-low.c: New.
13697 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13698 (OUTMSG2): Make it safe.
13699 (_T): New macro.
13700 (COUNTOF): New macro.
13701 (NUM_REGS): Get it from the low target.
13702 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13703 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13704 (thread_rec): Let low target handle debug registers.
13705 (child_add_thread): Likewise.
13706 (child_init_thread_list): Likewise.
13707 (continue_one_thread): Likewise.
13708 (regptr): New.
13709 (do_child_fetch_inferior_registers): Move to ...
13710 * win32-i386-low.c: ... here, and rename to ...
13711 (do_fetch_inferior_registers): ... this.
13712 * win32-low.c (child_fetch_inferior_registers):
13713 Go through the low target.
13714 (do_child_store_inferior_registers): Use regptr.
13715 (strwinerror): New function.
13716 (win32_create_inferior): Handle Windows CE.
13717 Use strwinerror instead of strerror on Windows error
13718 codes. Add program to the error output.
13719 Don't close the main thread handle on Windows CE.
13720 (win32_attach): Use coredll.dll on Windows CE.
13721 (win32_kill): Close current process and current
13722 thread handles.
13723 (win32_detach): Use coredll.dll on Windows CE.
13724 (win32_resume): Let low target handle debug registers, and
13725 step request.
13726 (handle_exception): Add/Remove initial breakpoint. Avoid
13727 non-existant WSTOPSIG on Windows CE.
13728 (win32_read_inferior_memory): Cast to remove warning.
13729 (win32_arch_string): Go through the low target.
13730 (initialize_low): Call set_breakpoint_data with the low
13731 target's breakpoint.
13732 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13733 FOP_REGNUM, mappings): Move to ...
13734 * win32-i386-low.c: ... here.
13735 * win32-low.c (win32_thread_info): Move to ...
13736 * win32-low.h: ... here.
13737 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13738 win32-arm-low.c and wincecompat.c.
13739 (all:): Add $EXEEXT.
13740 (install-only:): Likewise.
13741 (gdbserver:): Likewise.
13742 (gdbreplay:): Likewise.
13743 * config.in: Regenerate.
13744 * configure: Regenerate.
13745
13746 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13747
13748 * win32-low.c: Rename typedef thread_info to
13749 win32_thread_info throughout.
13750
13751 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13752
13753 * win32-i386-low.c: Rename to ...
13754 * win32-low.c: ... this.
13755 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13756 * Makefile.in: Likewise.
13757
13758 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13759
13760 * remote-utils.c (monitor_output): Constify msg parameter.
13761 * server.h (monitor_output): Likewise.
13762 * win32-i386-low.c (handle_output_debug_string): New.
13763 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13764 handle_output_debug_string.
13765 (get_child_debug_event): Likewise.
13766
13767 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13768
13769 * server.c (main): Correct strtoul check.
13770
13771 2007-03-27 Jon Ringle <jon@ringle.org>
13772
13773 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13774
13775 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13776
13777 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13778
13779 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * terminal.h: Check HAVE_SGTTY_H.
13782
13783 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13784
13785 * remote-utils.c (remote_open): Print out the assigned port number.
13786
13787 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13788
13789 * remote-utils.c (monitor_output): New function.
13790 * server.c (debug_threads): Define here.
13791 (monitor_show_help): New function.
13792 (handle_query): Handle qRcmd.
13793 (main): Do not handle 'd' packet.
13794 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13795 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13796 of debug_threads.
13797
13798 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13799
13800 * Makefile.in (EXEEXT): New.
13801 (clean): Use $(EXEEXT).
13802
13803 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13804
13805 * target.h (target_ops): Rename send_signal to request_interrupt,
13806 and remove enum target_signal parameter.
13807 * linux-low.c (linux_request_interrupt): Rename from
13808 linux_send_signal, and always send SIGINT.
13809 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13810 and always send SIGINT.
13811 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13812 of send_signal.
13813 (input_interrupt): Likewise.
13814
13815 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13816
13817 * server.c (get_features_xml): Check if target implemented
13818 arch_string.
13819 * win32-i386-low.c (win32_arch_string): New.
13820 (win32_target_ops): Add win32_arch_string as arch_string member.
13821
13822 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13823
13824 * spu-low.c (spu_arch_string): New.
13825 (spu_target_ops): Add spu_arch_string.
13826
13827 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13830 * configure.ac: Do not check for terminal.h.
13831 * configure, config.in: Regenerated.
13832
13833 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13834
13835 * Makefile.in (OBS): Add $(XML_BUILTIN).
13836 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13837 (clean): Update.
13838 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13839 (arm-with-iwmmxt.c): New.
13840 * config.in, configure: Regenerate.
13841 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13842 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13843 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13844 (arm*-*-linux*): Add iWMMXt and regset support.
13845 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13846 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13847 (arm_store_wmmxregset, target_regsets): New.
13848 * server.c (get_features_xml): Take annex argument. Check builtin
13849 XML documents.
13850 (handle_query): Handle multiple annexes.
13851
13852 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * remote-utils.c [USE_WIN32API] (read, write): Define.
13855 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13856 write.
13857
13858 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13859
13860 * linux-i386-low.c (the_low_target): Set arch_string.
13861 * linux-x86-64-low.c (the_low_target): Likewise.
13862 * linux-low.c (linux_arch_string): New.
13863 (linux_target_ops): Add it.
13864 * linux-low.h (struct linux_target_ops): Add arch_string.
13865 * server.c (write_qxfer_response): Use const void * for DATA.
13866 (get_features_xml): New.
13867 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13868 * target.h (struct target_ops): Add arch_string method.
13869
13870 2007-01-03 Denis Pilat <denis.pilat@st.com>
13871 Daniel Jacobowitz <dan@codesourcery.com>
13872
13873 * linux-low.c (linux_kill): Handle being called with no threads.
13874 * win32-i386-low.c (win32_kill): Likewise.
13875 (get_child_debug_event): Clear current_process_handle.
13876
13877 2006-12-30 Denis PILAT <denis.pilat@st.com>
13878 Daniel Jacobowitz <dan@codesourcery.com>
13879
13880 * remote-utils.c (remote_open): Check the type of specified
13881 serial port devices before opening them.
13882 * server.c (main): Kill the inferior if an error occurs during
13883 the first remote_open.
13884
13885 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13886
13887 * README: Update supported targets.
13888
13889 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * Makefile.in (clean): Remove reg-mips64.c.
13892 (reg-mips64.c, reg-mips64.o): New rules.
13893 * configure.srv: Handle mips64. Include regset support for mips.
13894 * linux-mips-low.c (union mips_register): New.
13895 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13896 (mips_breakpoint, mips_breakpoint_at): Use int.
13897 (mips_collect_register, mips_supply_register)
13898 (mips_collect_register_32bit, mips_supply_register_32bit)
13899 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13900 (mips_store_fpregset, target_regsets): New.
13901 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13902
13903 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13904
13905 * configure.srv: Add target "spu*-*-*".
13906 * Makefile.in (clean): Remove reg-spu.c.
13907 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13908 * spu-low.c: New file.
13909
13910 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13911
13912 * configure.ac: Correct td_thr_tls_get_addr test.
13913 * configure: Regenerated.
13914
13915 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * linux-low.c (linux_wait_for_event): Reformat. Use the
13918 pass_signals array.
13919 * remote-utils.c (decode_address_to_semicolon): New.
13920 * server.c (pass_signals, handle_general_set): New.
13921 (handle_query): Mention QPassSignals for qSupported.
13922 (main): Call handle_general_set.
13923 * server.h (pass_signals, decode_address_to_semicolon): New.
13924
13925 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * server.c (handle_query): Correct error handling for read_auxv.
13928
13929 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13930
13931 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13932 and srv_linux_thread_db to yes.
13933 * linux-s390-low.c (s390_fill_gregset): New function.
13934 (target_regsets): Define data structure.
13935
13936 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13939 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13940 * config.in, configure: Regenerated.
13941 * inferiors.c (gdb_id_to_thread): New function.
13942 (gdb_id_to_thread_id): Use it.
13943 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13944 * linux-low.h (struct process_info): Add th member.
13945 (thread_db_get_tls_address): New prototype.
13946 * remote-utils.c (decode_address): Make non-static.
13947 * server.c (handle_query): Handle qGetTLSAddr.
13948 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13949 * target.h (struct target_ops): Add get_tls_address.
13950 * thread-db.c (maybe_attach_thread): Save the thread handle.
13951 (thread_db_get_tls_address): New.
13952
13953 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13956 (linux_resume_one_process): Take a siginfo_t *. Update all
13957 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13958 (struct pending_signals): Add a siginfo_t.
13959 (linux_wait_for_process): Always set last_status.
13960 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13961 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13962 * linux-low.h (struct process_info): Add last_status.
13963
13964 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13965
13966 * remote-utils.c (try_rle): New function.
13967 (putpkt_binary): Use it.
13968
13969 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13972 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13973 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13974 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13975 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13976 point registers.
13977
13978 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13979
13980 * server.c (terminal_fd): New variable.
13981 (old_foreground_pgrp): Likewise.
13982 (restore_old_foreground_pgrp): New function.
13983 (start_inferior): Record the terminal file descriptor in terminal_fd
13984 and its original foreground group in old_foreground_pgrp. Register
13985 restore_old_foreground_pgrp with atexit().
13986
13987 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * server.c (handle_query): Correct qPart to qXfer.
13990
13991 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13992
13993 * configure.ac: Check for more headers which are missing on
13994 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13995 * configure.srv: Add Cygwin and mingw32.
13996 * remote-utils.c: Don't include headers unconditionally which
13997 are missing on mingw32. Include <winsock.h> for mingw32.
13998 (remote_open): Adjust for mingw32 support. Flush
13999 standard error after writing to it.
14000 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14001 (unblock_async_io, enable_async_io, disable_async_io)
14002 (readchar, getpkt): Update for Winsock support.
14003 (prepare_resume_reply): Expect a protocol signal number.
14004 * server.c: Disable <sys/wait.h> on mingw32.
14005 (start_inferior): Adjust for mingw32 support. Flush
14006 standard error after writing to it.
14007 (attach_inferior): Likewise. Use protocol signal
14008 numbers.
14009 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14010 and names.
14011 * win32-i386-low.c: New file.
14012 * Makefile.in (XM_CLIBS): Set.
14013 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14014 (win32-i386-low.o): New dependency rule.
14015 * linux-low.c (linux_wait): Use target signal numbers.
14016 * target.h (struct target_ops): Doc fix.
14017 * server.h (target_signal_to_name): New prototype.
14018 * gdbreplay.c: Don't include headers unconditionally which
14019 are missing on mingw32. Include <winsock.h> for mingw32.
14020 (remote_close, remote_open): Adjust for Winsock support.
14021 * configure, config.in: Regenerated.
14022
14023 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * server.c (decode_xfer_read, write_qxfer_response): New.
14026 (handle_query): Take a packet length argument. Handle
14027 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14028 the qSupported response.
14029 (main): Update call to handle_query.
14030
14031 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14032
14033 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14034 (putpkt_binary): Renamed from putpkt and adjusted for binary
14035 data.
14036 (putpkt): New wrapper for putpkt_binary.
14037 (readchar): Don't mask off the high bit.
14038 (decode_X_packet): New function.
14039 * server.c (main): Call putpkt_binary if a handler sets the packet
14040 length. Save the length of the incoming packet. Handle 'X'.
14041 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14042
14043 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14044
14045 * server.c (handle_query): Handle qSupported.
14046
14047 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * remote-utils.c (all_symbols_looked_up): New variable.
14050 (look_up_one_symbol): Check it.
14051 * server.h (look_up_one_symbol): New declaration.
14052 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14053
14054 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14055
14056 * Makefile.in (linux-arm-low.o): Update dependencies.
14057 * linux-arm-low.c: Include "gdb_proc_service.h".
14058 (PTRACE_GET_THREAD_AREA): Define.
14059 (ps_get_thread_area): New function.
14060
14061 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14062
14063 * configure.srv (m68k*-*-uclinux*): New target.
14064 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14065 (linux_resume_one_process): Remove extraneous cast.
14066 (linux_read_offsets): New.
14067 (linux_target_op): Add linux_read_offsets on mmuless systems.
14068 * server.c (handle_query): Add qOffsets logic.
14069 * target.h (struct target_ops): Add read_offsets.
14070
14071 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14074 (PTRACE_GET_THREAD_AREA): Define.
14075 (ps_get_thread_area): New function.
14076 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14077 (linux-x86-64-low.o): Update.
14078
14079 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14080
14081 * configure.ac: Remove checks for prfpregset_t.
14082 * gdb_proc_service.h: New file.
14083 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14084 new "gdb_proc_service.h".
14085 * proc-service.c: Likewise.
14086 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14087 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14088 * Makefile.in (gdb_proc_service_h): Updated.
14089 * configure, config.in: Regenerated.
14090
14091 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14092
14093 * remote-utils.c (prepare_resume_reply): Move declaration
14094 of gdb_id_from_wait to the top of the block.
14095
14096 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14097
14098 * linux-low.c (regsets_store_inferior_registers): Read the regset
14099 from the target before filling it.
14100
14101 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * server.c (attach_inferior): Return SIGTRAP for a successful
14104 attach.
14105
14106 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14107
14108 * Makefile.in (OBS): Add version.o.
14109 (STAGESTUFF): Delete.
14110 (version.o): Add dependencies.
14111 (version.c): Replace rule.
14112 (clean): Remove version.c.
14113 * server.c (gdbserver_version): New.
14114 (gdbserver_usage): Use printf.
14115 (main): Handle --version and --help.
14116 * server.h (version, host_name): Add declarations.
14117
14118 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14119
14120 * linux-arm-low.c:
14121 * linux-arm-low.c:
14122 * inferiors.c:
14123 * i387-fp.h:
14124 * i387-fp.c:
14125 * gdbreplay.c:
14126 * regcache.c:
14127 * proc-service.c:
14128 * mem-break.h:
14129 * mem-break.c:
14130 * linux-x86-64-low.c:
14131 * linux-sh-low.c:
14132 * linux-s390-low.c:
14133 * linux-ppc64-low.c:
14134 * linux-ppc-low.c:
14135 * linux-mips-low.c:
14136 * linux-m68k-low.c:
14137 * linux-m32r-low.c:
14138 * linux-low.h:
14139 * linux-low.c:
14140 * linux-ia64-low.c:
14141 * linux-i386-low.c:
14142 * linux-crisv32-low.c:
14143 * thread-db.c:
14144 * terminal.h:
14145 * target.h:
14146 * target.c:
14147 * server.h:
14148 * server.c:
14149 * remote-utils.c:
14150 * regcache.h:
14151 * utils.c:
14152 * Makefile.in:
14153 * configure.ac:
14154 * gdbserver.1: Add (C) after Copyright. Update the FSF
14155 address.
14156
14157 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14160 (arm_breakpoint_at): Recognize both breakpoints.
14161 (the_low_target): Use the correct breakpoint instruction.
14162
14163 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14164
14165 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14166 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14167 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14168 (the_low_target): Update.
14169
14170 2005-10-25 Andreas Schwab <schwab@suse.de>
14171
14172 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14173
14174 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14175 (ia64_num_regs): Reduce to 462.
14176
14177 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * acinclude.m4: Correct quoting.
14180 * aclocal.m4: Regenerated.
14181
14182 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14183 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14184 (thread_db_init): Call thread_db_err_str.
14185 * configure.ac: Check for TD_VERSION.
14186 * config.in, configure: Regenerated.
14187
14188 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14189
14190 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14191
14192 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14193
14194 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14195 is not available. Define HAVE_PTRACE_GETREGS if it is.
14196 * config.in, configure: Regenerated.
14197 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14198 * linux-i386-low.c, linux-m68k-low.c: Update to use
14199 HAVE_PTRACE_GETREGS.
14200 * linux-low.c (regsets_fetch_inferior_registers)
14201 (regsets_store_inferior_registers): Only return 0 if we processed
14202 GENERAL_REGS.
14203 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14204 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14205
14206 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * inferiors.c (struct thread_info): Add gdb_id.
14209 (add_thread): Add gdb_id argument.
14210 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14211 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14212 calls to add_thread.
14213 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14214 * server.c (handle_query): Use thread_to_gdb_id.
14215 (handle_v_cont, main): Use gdb_id_to_thread_id.
14216 * server.h (add_thread): Update prototype.
14217 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14218 prototypes.
14219
14220 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14223 left-padded registers.
14224 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14225 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14226
14227 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14228
14229 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14230 * configure: Regenerate.
14231 * config.in: Regenerate.
14232 * server.h (NEED_DECLARATION_STRERROR):
14233 Replace with !HAVE_DECL_STRERROR.
14234
14235 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14236
14237 * linux-low.c (linux_wait, linux_send_signal): Don't test
14238 an unsigned long variable for > 0 if it could be MAX_ULONG.
14239 * server.c (myresume): Likewise.
14240 * target.c (set_desired_inferior): Likewise.
14241
14242 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14243
14244 * configure.ac: Simplify and improve check for socklen_t.
14245 * configure, config.in: Regenerate.
14246
14247 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * acconfig.h: Remove.
14250 * configure.ac: Add a test for socklen_t. Use three-argument
14251 AC_DEFINE throughout.
14252 * config.in: Regenerated using autoheader 2.59.
14253 * configure: Regenerated.
14254
14255 * gdbreplay.c (socklen_t): Provide a default.
14256 (remote_open): Use socklen_t.
14257 * remote-utils.c (socklen_t): Provide a default.
14258 (remote_open): Use socklen_t.
14259 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14260 unsigned char.
14261
14262 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14263 char for buffers.
14264 * linux-low.c (linux_read_memory, linux_write_memory)
14265 (linux_read_auxv): Likewise.
14266 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14267 (check_mem_write): Likewise.
14268 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14269 Likewise.
14270 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14271 (registers_from_string, register_data): Likewise.
14272 * server.c (handle_query, main): Likewise.
14273 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14274 (decode_M_packet): Likewise.
14275 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14276 * target.h (struct target_ops): Update read_memory, write_memory,
14277 and read_auxv.
14278 (read_inferior_memory, write_inferior_memory): Update.
14279 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14280 to unsigned char *.
14281 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14282 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14283 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14284 linux-s390-low.c, linux-sh-low.c: Update for changes in
14285 read_inferior_memory and the_low_target->breakpoint.
14286
14287 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14290 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14291 * configure.srv: Add powerpc64-*-linux*.
14292 * linux-ppc64-low.c: New file.
14293
14294 2005-05-23 Orjan Friberg <orjanf@axis.com>
14295
14296 * linux-cris-low.c: New file with support for CRIS.
14297 * linux-crisv32-low.c: Ditto for CRISv32.
14298 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14299 (clean): Add reg-cris.c and reg-crisv32.c.
14300 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14301 reg-crisv32.o, and reg-crisv32.c to make rules.
14302 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14303 recognized targets.
14304
14305 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14306
14307 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14308 of sizeof (PTRACE_XFER_TYPE).
14309 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14310
14311 2005-05-12 Orjan Friberg <orjanf@axis.com>
14312
14313 * target.h (struct target_ops): Add insert_watchpoint,
14314 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14315 pointers for hardware watchpoint support.
14316 * linux-low.h (struct linux_target_ops): Ditto.
14317 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14318 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14319 to linux_target_ops.
14320 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14321 reply packet.
14322 * server.c (main): Recognize 'Z' and 'z' packets.
14323
14324 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14325
14326 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14327 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14328 (the_low_target): Add new members.
14329
14330 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * proc-service.c (ps_lgetregs): Search all_processes instead of
14333 all_threads.
14334
14335 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * server.c (start_inferior): Change return type to int.
14338 (attach_inferior): Change sigptr to int *.
14339 (handle_v_cont, handle_v_requests): Change signal to int *.
14340 (main): Change signal to int.
14341
14342 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14343
14344 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14345 * configure.srv: Add m32r*-*-linux*.
14346 * linux-m32r-low.c: New file.
14347
14348 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14351
14352 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14355 Take unsigned long arguments for PIDs.
14356 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14357 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14358 (wait_for_sigstop, linux_resume_one_process)
14359 (regsets_fetch_inferior_registers, linux_send_signal)
14360 (linux_read_auxv): Likewise. Update the types of variables holding
14361 PIDs. Update format string specifiers.
14362 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14363 * remote-utils.c (prepare_resume_reply): Likewise.
14364 * server.c (cont_thread, general_thread, step_thread)
14365 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14366 unsigned long.
14367 (handle_query): Update format specifiers.
14368 (handle_v_cont, main): Use strtoul for thread IDs.
14369 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14370 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14371 (general_thread, step_thread, thread_from_wait)
14372 (old_thread_from_wait): Update.
14373 * target.h (struct thread_resume): Use unsigned long for THREAD.
14374 (struct target_ops): Use unsigned long for arguments to attach and
14375 thread_alive.
14376
14377 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14378
14379 * acinclude.m4: Include bfd/bfd.m4 directly.
14380 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14381 <agriffis@toolchain.org>.
14382 * aclocal.m4, configure: Regenerated.
14383
14384 2005-01-07 Andrew Cagney <cagney@gnu.org>
14385
14386 * configure.ac: Rename configure.in, require autoconf 2.59.
14387 * configure: Re-generate.
14388
14389 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14390
14391 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14392 LIBS when finished.
14393 * aclocal.m4: Regenerated.
14394 * configure: Regenerated.
14395
14396 2004-11-21 Andreas Schwab <schwab@suse.de>
14397
14398 * linux-m68k-low.c (m68k_num_gregs): Define.
14399 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14400 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14401 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14402 (m68k_breakpoint_at): New. Add to the_low_target.
14403
14404 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14405 srv_linux_thread_db to yes.
14406
14407 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14408
14409 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14410 (ARCH_SET_FS): Likewise.
14411 (ARCH_GET_FS): Likewise.
14412 (ARCH_GET_GS): Likewise.
14413
14414 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14415
14416 * linux-i386-low.c (ps_get_thread_area): New.
14417 * linux-x86-64-low.c (ps_get_thread_area): New.
14418 * linux-low.c: Include <sys/syscall.h>.
14419 (linux_kill_one_process): Don't kill the first thread here.
14420 (linux_kill): Kill the first thread here.
14421 (kill_lwp): New function.
14422 (send_sigstop, linux_send_signal): Use it.
14423 * proc-service.c: Clean up #ifdefs.
14424 (fpregset_info): Delete.
14425 (ps_lgetregs): Update and enable implementation.
14426 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14427 implementations.
14428 * remote-utils.c (struct sym_cache, symbol_cache): New.
14429 (input_interrupt): Print a clearer message.
14430 (async_io_enabled): New variable.
14431 (enable_async_io, disable_async_io): Use it. Update comments.
14432 (look_up_one_symbol): Use the symbol cache.
14433 * thread-db.c (thread_db_look_up_symbols): New function.
14434 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14435
14436 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14437
14438 * configure.in: Test for -rdynamic.
14439 * configure: Regenerated.
14440 * Makefile (INTERNAL_LDFLAGS): New.
14441 (gdbserver, gdbreplay): Use it.
14442
14443 2004-09-02 Andrew Cagney <cagney@gnu.org>
14444
14445 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14446
14447 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14448
14449 * linux-low.c (linux_wait): Clear all_processes list also.
14450
14451 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14452
14453 * linux-low.c: Include <errno.h>. Remove extern declaration of
14454 errno.
14455
14456 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14457
14458 * gdbreplay.c, server.h, utils.c: Update copyright years.
14459
14460 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14461
14462 * server.c (main): Print child status or termination signal from
14463 variable 'signal', not 'sig'.
14464
14465 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14466
14467 * linux-low.c (linux_read_memory): Change return type to
14468 int. Check for and return error from ptrace().
14469 * target.c (read_inferior_memory): Change return type to int. Pass
14470 back return status from the_target->read_memory().
14471 * target.h (struct target_ops): Adapt *read_memory() prototype.
14472 Update comment.
14473 (read_inferior_memory): Adapt prototype.
14474 * server.c (main): Return an error packet if
14475 read_inferior_memory() returns an error.
14476
14477 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14478
14479 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14480 Unify with other clean targets.
14481
14482 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14483
14484 * server.c (handle_v_cont): Call set_desired_inferior.
14485
14486 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14487
14488 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14489
14490 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14491
14492 * linux-low.c (linux_wait): Unblock async I/O.
14493 (linux_resume): Block and enable async I/O.
14494 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14495 * server.h (block_async_io, unblock_async_io): Add prototypes.
14496
14497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14498
14499 * remote-utils.c (remote_open): Print a status notice after
14500 opening a TCP port.
14501 * server.c (attach_inferior): Print a status notice after
14502 attaching.
14503
14504 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14505
14506 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14507
14508 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14509
14510 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14511 error packet.
14512 * server.c, target.h: Update copyright years.
14513
14514 2004-02-25 Roland McGrath <roland@redhat.com>
14515
14516 * target.h (struct target_ops): New member `read_auxv'.
14517 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14518 * linux-low.c (linux_read_auxv): New function.
14519 (linux_target_ops): Initialize `read_auxv' member to that.
14520
14521 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14522
14523 Committed by Jim Blandy <jimb@redhat.com>.
14524
14525 * linux-s390-low.c (s390_num_regs): Update.
14526 (s390_regmap): Remove control registers. Use __s390x__ predefine
14527 instead of GPR_SIZE to distiguish s390 and s390x targets.
14528
14529 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14530
14531 * linux-low.c: Update copyright year.
14532 (check_removed_breakpoint): Clear pending_is_breakpoint.
14533 (linux_set_resume_request, linux_queue_one_thread)
14534 (resume_status_pending_p): New functions.
14535 (linux_continue_one_thread): Use process->resume.
14536 (linux_resume): Only resume threads if there are no pending events.
14537 * linux-low.h (struct process_info): Add resume request
14538 pointer.
14539
14540 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14541
14542 * regcache.c (new_register_cache): Clear the allocated register
14543 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14544
14545 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14546
14547 * linux-low.c (linux_resume): Take a struct thread_resume *
14548 argument.
14549 (linux_wait): Update call.
14550 (resume_ptr): New static variable.
14551 (linux_continue_one_thread): Renamed from
14552 linux_continue_one_process. Use resume_ptr.
14553 (linux_resume): Use linux_continue_one_thread.
14554 * server.c (handle_v_cont, handle_v_requests): New functions.
14555 (myresume): New function.
14556 (main): Handle 'v' case.
14557 * target.h (struct thread_resume): New type.
14558 (struct target_ops): Change argument of "resume" to struct
14559 thread_resume *.
14560 (myresume): Delete macro.
14561
14562 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14563
14564 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14565 (uninstall): Support DESTDIR.
14566
14567 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14568
14569 * configure.srv: Add xscale*linux copy of arm*linux entry.
14570
14571 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14572
14573 * linux-arm-low.c (arm_reinsert_addr): New function.
14574 (the_low_target): Add arm_reinsert_addr.
14575
14576 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14577
14578 * mem-break.c: Remove whitespace at end of file.
14579
14580 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14581
14582 * configure.in: Check whether we need to prototype strerror.
14583 * server.h: Optionally prototype strerror.
14584 * gdbreplay.c (perror_with_name): Use strerror.
14585 * linux-low.c (linux_attach_lwp): Use strerror.
14586 * utils.c (perror_with_name): Use strerror.
14587 * config.in, configure: Regenerated.
14588
14589 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14590
14591 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14592 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14593
14594 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14595
14596 * Makefile.in (SFILES): Update.
14597 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14598 low-sun3.c: Remove files.
14599
14600 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14601
14602 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14603 (linux_detach_one_process, linux_detach): New functions.
14604 (linux_target_ops): Add linux_detach.
14605 * server.c (main): Handle 'D' packet.
14606 * target.h (struct target_ops): Add "detach" member.
14607 (detach_inferior): Define.
14608
14609 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14610
14611 From Kelley Cook <kelleycook@wideopenwest.com>:
14612 * configure.srv: Accept i[34567]86 variants.
14613
14614 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14615
14616 * linux-low.c (linux_wait_for_event): Correct comment typos.
14617 (linux_resume_one_process): Call check_removed_breakpoint.
14618 (linux_send_signal): New function.
14619 (linux_target_ops): Add linux_send_signal.
14620 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14621 of kill.
14622 * target.h (struct target_ops): Add send_signal.
14623
14624 2003-05-29 Jim Blandy <jimb@redhat.com>
14625
14626 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14627 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14628 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14629 away part of the register's value.
14630
14631 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14632
14633 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14634 (linux_wait_for_event, linux_init_signals): Likewise.
14635
14636 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14637
14638 * configure.in: Check for stdlib.h.
14639 * configure: Regenerated.
14640 * config.in: Regenerated.
14641
14642 2003-01-04 Andreas Schwab <schwab@suse.de>
14643
14644 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14645
14646 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14647
14648 * Makefile.in: Remove obsolete code.
14649
14650 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14651
14652 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14653 defined(PT_FPR0_HI).
14654
14655 2002-11-17 Stuart Hughes <seh@zee2.com>
14656
14657 * linux-arm-low.c (arm_num_regs): Increase.
14658 (arm_regmap): Include status register.
14659
14660 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14661
14662 * linux-low.c (register_addr): Remove incorrect -1 check.
14663
14664 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14665
14666 * linux-low.c (linux_create_inferior): Call setpgid. Return
14667 the new PID.
14668 (unstopped_p, linux_signal_pid): Remove.
14669 (linux_target_ops): Remove linux_signal_pid.
14670 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14671 global instead of target method.
14672 * target.h (struct target_ops): Remove signal_pid. Update comment
14673 for create_inferior.
14674 * server.c (signal_pid): New variable.
14675 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14676 gdbserver. Set the child to be the foreground process group.
14677 (attach_inferior): Set signal_pid.
14678
14679 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14680
14681 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14682
14683 2002-08-20 Jim Blandy <jimb@redhat.com>
14684
14685 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14686 default for this.
14687
14688 2002-08-01 Andrew Cagney <cagney@redhat.com>
14689
14690 * Makefile.in: Make chill references obsolete.
14691
14692 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14693
14694 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14695 * configure: Regenerate.
14696 * config.in: Regenerate.
14697
14698 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14699
14700 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14701 (perror_with_name, remote_close, remote_open, expect, play): Static.
14702
14703 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14704
14705 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14706 byte offsets instead of an array of indexes.
14707 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14708
14709 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14710
14711 * regcache.c: Add comment.
14712
14713 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * thread-db.c: New file.
14716 * proc-service.c: New file.
14717 * acinclude.m4: New file.
14718 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14719 proc-service.o, and thread-db.o.
14720 (linux-low.o): Add USE_THREAD_DB.
14721 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14722 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14723 * aclocal.m4: Regenerated.
14724 * config.in: Regenerated.
14725 * configure: Regenerated.
14726 * configure.in: Check for proc_service.h, sys/procfs.h,
14727 thread_db.h, and linux/elf.h headrs.
14728 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14729 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14730 Check for -lthread_db and thread support.
14731 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14732 PowerPC, and SuperH.
14733 * i387-fp.c: Constify arguments.
14734 * i387-fp.h: Likewise.
14735 * inferiors.c: (struct thread_info): Renamed from
14736 `struct inferior_info'. Remove PID member. Use generic inferior
14737 list header. All uses updated.
14738 (inferiors, signal_pid): Removed.
14739 (all_threads): New variable.
14740 (get_thread): Define.
14741 (add_inferior_to_list): New function.
14742 (for_each_inferior): New function.
14743 (change_inferior_id): New function.
14744 (add_inferior): Removed.
14745 (remove_inferior): New function.
14746 (add_thread): New function.
14747 (free_one_thread): New function.
14748 (remove_thread): New function.
14749 (clear_inferiors): Use for_each_inferior and free_one_thread.
14750 (find_inferior): New function.
14751 (find_inferior_id): New function.
14752 (inferior_target_data): Update argument type.
14753 (set_inferior_target_data): Likewise.
14754 (inferior_regcache_data): Likewise.
14755 (set_inferior_regcache_data): Likewise.
14756 * linux-low.c (linux_bp_reinsert): Remove.
14757 (all_processes, stopping_threads, using_thrads)
14758 (struct pending_signals, debug_threads, pid_of): New.
14759 (inferior_pid): Replace with macro.
14760 (struct inferior_linux_data): Remove.
14761 (get_stop_pc, add_process): New functions.
14762 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14763 Use add_process and add_thread.
14764 (linux_attach_lwp): New function, based on old linux_attach. Use
14765 add_process and add_thread. Set stop_expected for new threads.
14766 (linux_attach): New function.
14767 (linux_kill_one_process): New function.
14768 (linux_kill): Kill all LWPs.
14769 (linux_thread_alive): Use find_inferior_id.
14770 (check_removed_breakpoints, status_pending_p): New functions.
14771 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14772 Update. Use WNOHANG. Wait for cloned processes also. Update process
14773 struct for the found process.
14774 (linux_wait_for_event): New function.
14775 (linux_wait): Use it. Support LWPs.
14776 (send_sigstop, wait_for_sigstop, stop_all_processes)
14777 (linux_resume_one_process, linux_continue_one_process): New functions.
14778 (linux_resume): Support LWPs.
14779 (REGISTER_RAW_SIZE): Remove.
14780 (fetch_register): Use register_size instead. Call supply_register.
14781 (usr_store_inferior_registers): Likewise. Call collect_register.
14782 Fix recursive case.
14783 (regsets_fetch_inferior_registers): Improve error message.
14784 (regsets_store_inferior_registers): Add debugging.
14785 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14786 (unstopped_p, linux_signal_pid): New functions.
14787 (linux_target_ops): Add linux_signal_pid.
14788 (linux_init_signals): New function.
14789 (initialize_low): Call it. Initialize using_threads.
14790 * regcache.c (inferior_regcache_data): Add valid
14791 flag.
14792 (get_regcache): Fetch registers lazily. Add fetch argument
14793 and update all callers.
14794 (regcache_invalidate_one, regcache_invalidate): New
14795 functions.
14796 (new_register_cache): Renamed from create_register_cache.
14797 Return the new regcache.
14798 (free_register_cache): Change argument to a void *.
14799 (registers_to_string, registers_from_string): Call get_regcache
14800 with fetch flag set.
14801 (register_data): Make static. Pass fetch flag to get_regcache.
14802 (supply_register): Call get_regcache with fetch flag clear.
14803 (collect_register): Call get_regcache with fetch flag set.
14804 (collect_register_as_string): New function.
14805 * regcache.h: Update.
14806 * remote-utils.c (putpkt): Flush after debug output and use
14807 stderr.
14808 Handle input interrupts while waiting for an ACK.
14809 (input_interrupt): Use signal_pid method.
14810 (getpkt): Flush after debug output and use stderr.
14811 (outreg): Use collect_register_as_string.
14812 (new_thread_notify, dead_thread_notify): New functions.
14813 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14814 and general_thread.
14815 (look_up_one_symbol): Flush after debug output.
14816 * server.c (step_thread, server_waiting): New variables.
14817 (start_inferior): Don't use signal_pid. Update call to mywait.
14818 (attach_inferior): Update call to mywait.
14819 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14820 (main): Don't fetch/store registers explicitly. Use
14821 set_desired_inferior. Support proposed ``Hs'' packet. Update
14822 calls to mywait.
14823 * server.h: Update.
14824 (struct inferior_list, struct_inferior_list_entry): New.
14825 * target.c (set_desired_inferior): New.
14826 (write_inferior_memory): Constify.
14827 (mywait): New function.
14828 * target.h: Update.
14829 (struct target_ops): New signal_pid method.
14830 (mywait): Removed macro, added prototype.
14831
14832 * linux-low.h (regset_func): Removed.
14833 (regset_fill_func, regset_store_func): New.
14834 (enum regset_type): New.
14835 (struct regset_info): Add type field. Use new operation types.
14836 (struct linux_target_ops): stop_pc renamed to get_pc.
14837 Add decr_pc_after_break and breakpoint_at.
14838 (get_process, get_thread_proess, get_process_thread)
14839 (strut process_info, all_processes, linux_attach_lwp)
14840 (thread_db_init): New.
14841
14842 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14843 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14844 (the_low_target): Add new members.
14845 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14846 (i386_store_fpxregset): Constify.
14847 (target_regsets): Add new kind identifier.
14848 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14849 (i386_set_pc): Add debugging.
14850 (i386_breakpoint_at): New function.
14851 (the_low_target): Add new members.
14852 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14853 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14854 (mips_breakpoint_at): New.
14855 (the_low_target): Add new members.
14856 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14857 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14858 (the_low_target): Add new members.
14859 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14860 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14861 (the_low_target): Add new members.
14862 * linux-x86-64-low.c (target_regsets): Add new kind
14863 identifier.
14864
14865 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14866
14867 From Martin Pool <mbp@samba.org>:
14868 * server.c (gdbserver_usage): New function.
14869 (main): Call it.
14870
14871 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14874 stop_at -> stop_pc.
14875
14876 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14877
14878 * Makefile.in: Remove obsolete code.
14879
14880 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14881
14882 * linux-low.c (regsets_fetch_inferior_registers),
14883 (regsets_store_inferior_registers): Removed cast to int from
14884 ptrace() calls.
14885 * regcache.h: Added declaration of struct inferior_info.
14886
14887 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14888
14889 * inferiors.c (struct inferior_info): Add regcache_data.
14890 (add_inferior): Call create_register_cache.
14891 (clear_inferiors): Call free_register_cache.
14892 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14893 * regcache.c (struct inferior_regcache_data): New.
14894 (registers): Remove.
14895 (get_regcache): New function.
14896 (create_register_cache, free_register_cache): New functions.
14897 (set_register_cache): Don't initialize the register cache here.
14898 (registers_to_string, registers_from_string, register_data): Call
14899 get_regcache.
14900 * regcache.h: Add prototypes.
14901 * server.h: Likewise.
14902
14903 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14904
14905 * mem-break.c: New file.
14906 * mem-break.h: New file.
14907 * Makefile.in: Add mem-break.o rule; update server.h
14908 dependencies.
14909 * inferiors.c (struct inferior_info): Add target_data
14910 member.
14911 (clear_inferiors): Free target_data member if set.
14912 (inferior_target_data, set_inferior_target_data): New functions.
14913 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14914 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14915 * linux-low.c (linux_bp_reinsert): New variable.
14916 (struct inferior_linux_data): New.
14917 (linux_create_inferior): Use set_inferior_target_data.
14918 (linux_attach): Likewise. Call add_inferior.
14919 (linux_wait_for_one_inferior): New function.
14920 (linux_wait): Call it.
14921 (linux_write_memory): Add const.
14922 (initialize_low): Call set_breakpoint_data.
14923 * linux-low.h (struct linux_target_ops): Add breakpoint
14924 handling members.
14925 * server.c (attach_inferior): Remove extra add_inferior
14926 call.
14927 * server.h: Include mem-break.h. Update inferior.c
14928 prototypes.
14929 * target.c (read_inferior_memory)
14930 (write_inferior_memory): New functions.
14931 * target.h (read_inferior_memory)
14932 (write_inferior_memory): Change macros to prototypes.
14933 (struct target_ops): Update comments. Add const to write_memory
14934 definition.
14935
14936 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14937
14938 * linux-low.c (usr_store_inferior_registers): Support
14939 registers which are allowed to fail to store.
14940 * linux-low.h (linux_target_ops): Likewise.
14941 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14942 (ppc_cannot_store_register): FPSCR may not be storable.
14943
14944 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * server.h: Include <string.h> if HAVE_STRING_H.
14947 * ChangeLog: Correct paths in last ChangeLog entry.
14948
14949 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14950
14951 * linux-low.h: Remove obsolete prototypes.
14952 (struct linux_target_ops): New.
14953 (extern the_low_target): New.
14954 * linux-low.c (num_regs, regmap): Remove declarations.
14955 (register_addr): Use the_low_target explicitly.
14956 (fetch_register): Likewise.
14957 (usr_fetch_inferior_registers): Likewise.
14958 (usr_store_inferior_registers): Likewise.
14959 * linux-arm-low.c (num_regs): Remove.
14960 (arm_num_regs): Define.
14961 (arm_regmap): Renamed from regmap, made static.
14962 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14963 made static.
14964 (arm_cannot_store_register): Renamed from cannot_store_register,
14965 made static.
14966 (the_low_target): New.
14967 * linux-i386-low.c (num_regs): Remove.
14968 (i386_num_regs): Define.
14969 (i386_regmap): Renamed from regmap, made static.
14970 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14971 made static.
14972 (i386_cannot_store_register): Renamed from cannot_store_register,
14973 made static.
14974 (the_low_target): New.
14975 * linux-ia64-low.c (num_regs): Remove.
14976 (ia64_num_regs): Define.
14977 (ia64_regmap): Renamed from regmap, made static.
14978 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14979 made static.
14980 (ia64_cannot_store_register): Renamed from cannot_store_register,
14981 made static.
14982 (the_low_target): New.
14983 * linux-m68k-low.c (num_regs): Remove.
14984 (m68k_num_regs): Define.
14985 (m68k_regmap): Renamed from regmap, made static.
14986 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14987 made static.
14988 (m68k_cannot_store_register): Renamed from cannot_store_register,
14989 made static.
14990 (the_low_target): New.
14991 * linux-mips-low.c (num_regs): Remove.
14992 (mips_num_regs): Define.
14993 (mips_regmap): Renamed from regmap, made static.
14994 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14995 made static.
14996 (mips_cannot_store_register): Renamed from cannot_store_register,
14997 made static.
14998 (the_low_target): New.
14999 * linux-ppc-low.c (num_regs): Remove.
15000 (ppc_num_regs): Define.
15001 (ppc_regmap): Renamed from regmap, made static.
15002 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15003 made static.
15004 (ppc_cannot_store_register): Renamed from cannot_store_register,
15005 made static.
15006 (the_low_target): New.
15007 * linux-s390-low.c (num_regs): Remove.
15008 (s390_num_regs): Define.
15009 (s390_regmap): Renamed from regmap, made static.
15010 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15011 made static.
15012 (s390_cannot_store_register): Renamed from cannot_store_register,
15013 made static.
15014 (the_low_target): New.
15015 * linux-sh-low.c (num_regs): Remove.
15016 (sh_num_regs): Define.
15017 (sh_regmap): Renamed from regmap, made static.
15018 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15019 made static.
15020 (sh_cannot_store_register): Renamed from cannot_store_register,
15021 made static.
15022 (the_low_target): New.
15023 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15024 (the_low_target): New.
15025
15026 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15027
15028 * Makefile.in: Add stamp-h target.
15029 * configure.in: Create stamp-h.
15030 * configure: Regenerated.
15031
15032 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15033
15034 * inferiors.c: New file.
15035 * target.c: New file.
15036 * target.h: New file.
15037 * Makefile.in: Add target.o and inferiors.o. Update
15038 dependencies.
15039 * linux-low.c (inferior_pid): New static variable,
15040 moved from server.c.
15041 (linux_create_inferior): Renamed from create_inferior.
15042 Call add_inferior. Return 0 on success instead of a PID.
15043 (linux_attach): Renamed from myattach.
15044 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15045 (linux_thread_alive): Renamed from mythread_alive.
15046 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15047 child dies.
15048 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15049 (regsets_store_inferior_registers): Correct error message.
15050 Add missing ``return 0''.
15051 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15052 (linux_store_registers): Renamed from store_inferior_registers.
15053 (linux_read_memory): Renamed from read_inferior_memory.
15054 (linux_write_memory): Renamed from write_inferior_memory.
15055 (linux_target_ops): New structure.
15056 (initialize_low): Call set_target_ops ().
15057 * remote-utils.c (unhexify): New function.
15058 (hexify): New function.
15059 (input_interrupt): Send signals to ``signal_pid''.
15060 * server.c (inferior_pid): Remove.
15061 (start_inferior): Update create_inferior call.
15062 (attach_inferior): Call add_inferior.
15063 (handle_query): New function.
15064 (main): Call handle_query for `q' packets.
15065 * server.h: Include "target.h". Remove obsolete prototypes.
15066 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15067
15068 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15069
15070 * Makefile.in: Add WARN_CFLAGS. Update configury
15071 dependencies.
15072 * configure.in: Check for <string.h>
15073 * configure: Regenerate.
15074 * config.in: Regenerate.
15075 * gdbreplay.c: Include needed system headers.
15076 (remote_open): Remove strchr prototype.
15077 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15078 * regcache.c (supply_register): Change buf argument to const void *.
15079 (supply_register_by_name): Likewise.
15080 (collect_register): Change buf argument to void *.
15081 (collect_register_by_name): Likewise.
15082 * regcache.h: Add missing prototypes.
15083 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15084 * server.c (handle_query): New function.
15085 (attached): New static variable, moved out of main.
15086 (main): Quiet longjmp clobber warnings.
15087 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15088 * utils.c (error): Remove NORETURN.
15089 (fatal): Likewise.
This page took 0.353911 seconds and 4 git commands to generate.