Re-indent the code
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-07-10 Yao Qi <yao.qi@linaro.org>
2
3 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4
5 2017-06-29 Yao Qi <yao.qi@linaro.org>
6
7 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
8 Remove.
9 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
10
11 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
12
13 * Makefile.in (IPA_OBJS): Sort and format one item per line.
14
15 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
16
17 * linux-low.c (linux_create_inferior): Adjust code to access the
18 environment information via 'gdb_environ' class.
19 * lynx-low.c (lynx_create_inferior): Likewise.
20 * server.c (our_environ): Make it an instance of 'gdb_environ'.
21 (get_environ): Return a pointer to 'our_environ'.
22 (captured_main): Initialize 'our_environ'.
23 * server.h (get_environ): Adjust prototype.
24 * spu-low.c (spu_create_inferior): Adjust code to access the
25 environment information via 'gdb_environ' class.
26
27 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
28
29 * linux-low.c (linux_read_memory, linux_write_memory): Remove
30 usage of "register" keyword.
31
32 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
33
34 * configure: Re-generate.
35
36 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
37
38 * configure: Re-generate.
39
40 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
41
42 * Makefile.in (COMPILE.pre): Add "-x c++".
43
44 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
45
46 * fork-child.c: Conditionally include <signal.h>.
47
48 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
49
50 * server.c (handle_general_set): Handle new packet
51 "QStartupWithShell".
52 (handle_query): Add "QStartupWithShell" to the list of supported
53 packets.
54 (gdbserver_usage): Add help text explaining the
55 new "--startup-with-shell" and "--no-startup-with-shell" CLI
56 options.
57 (captured_main): Recognize and act upon the presence of the new
58 CLI options.
59
60 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
61 Pedro Alves <palves@redhat.com>
62
63 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
64 * configure: Regenerate.
65 * configure.srv (srv_linux_obj): Add "fork-child.o" and
66 "fork-inferior.o".
67 (i[34567]86-*-lynxos*): Likewise.
68 (spu*-*-*): Likewise.
69 * fork-child.c: New file.
70 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
71 and "environ.h".
72 (linux_ptrace_fun): New function.
73 (linux_create_inferior): Adjust function prototype to reflect
74 change on "target.h". Adjust function code to use
75 "fork_inferior".
76 (linux_request_interrupt): Delete "signal_pid".
77 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
78 (lynx_ptrace_fun): New function.
79 (lynx_create_inferior): Adjust function prototype to reflect
80 change on "target.h". Adjust function code to use
81 "fork_inferior".
82 * nto-low.c (nto_create_inferior): Adjust function prototype and
83 code to reflect change on "target.h". Update comments.
84 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
85 "common-terminal.h" and "environ.h".
86 (terminal_fd): Moved to fork-child.c.
87 (old_foreground_pgrp): Likewise.
88 (restore_old_foreground_pgrp): Likewise.
89 (last_status): Make it global.
90 (last_ptid): Likewise.
91 (our_environ): New variable.
92 (startup_with_shell): Likewise.
93 (program_name): Likewise.
94 (program_argv): Rename to...
95 (program_args): ...this.
96 (wrapper_argv): New variable.
97 (start_inferior): Delete function.
98 (get_exec_wrapper): New function.
99 (get_exec_file): Likewise.
100 (get_environ): Likewise.
101 (prefork_hook): Likewise.
102 (post_fork_inferior): Likewise.
103 (postfork_hook): Likewise.
104 (postfork_child_hook): Likewise.
105 (handle_v_run): Update code to deal with arguments coming from the
106 remote host. Update calls from "start_inferior" to
107 "create_inferior".
108 (captured_main): Likewise. Initialize environment variable. Call
109 "have_job_control".
110 * server.h (post_fork_inferior): New prototype.
111 (get_environ): Likewise.
112 (last_status): Declare.
113 (last_ptid): Likewise.
114 (signal_pid): Likewise.
115 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
116 (spu_ptrace_fun): New function.
117 (spu_create_inferior): Adjust function prototype to reflect change
118 on "target.h". Adjust function code to use "fork_inferior".
119 * target.c (target_terminal_init): New function.
120 (target_terminal_inferior): Likewise.
121 (target_terminal_ours): Likewise.
122 * target.h: Include <vector>.
123 (struct target_ops) <create_inferior>: Update prototype.
124 (create_inferior): Update macro.
125 * utils.c (gdb_flush_out_err): New function.
126 * win32-low.c (win32_create_inferior): Adjust function prototype
127 and code to reflect change on "target.h".
128
129 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
130
131 * inferiors.c (switch_to_thread): New function.
132
133 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
134
135 * Makefile.in (SFILE): Add "common/job-control.c".
136 (OBS): Add "job-control.o".
137
138 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
139
140 * Makefile: Remove "@host_makefile_frag@".
141
142 2017-05-05 Pedro Alves <palves@redhat.com>
143
144 * configure: Regenerate.
145
146 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
147
148 * configure: Regenerate.
149
150 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
151
152 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
153 software_single_step change of return type to
154 std::vector<CORE_ADDR>.
155 * linux-low.c (install_software_single_step_breakpoints):
156 Likewise.
157 * linux-low.h (install_software_single_step_breakpoints):
158 Likewise.
159
160 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
161
162 * remote-utils.c: Include "gdb_termios.h" instead of
163 "terminal.h".
164 * terminal.h: Delete file.
165
166 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
167
168 * server.c: Include <vector>.
169 <program_argv, wrapper_argv>: Convert to std::vector.
170 (start_inferior): Rewrite function to use C++.
171 (handle_v_run): Likewise. Update code that calculates the argv
172 based on the vRun packet; use C++.
173 (captured_main): Likewise.
174
175 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
176
177 * server.c (handle_v_cont): Initialize thread_resume::thread
178 with null_ptid.
179
180 2017-04-05 Pedro Alves <palves@redhat.com>
181
182 * configure: Regenerate.
183
184 2017-04-05 Pedro Alves <palves@redhat.com>
185
186 * gdbreplay.c (sync_error): Constify.
187 * linux-x86-low.c (push_opcode): Constify.
188
189 2017-04-05 Pedro Alves <palves@redhat.com>
190
191 * win32-low.c (get_child_debug_event)
192 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
193 Report TARGET_WAITKIND_SPURIOUS instead.
194
195 2017-04-05 Pedro Alves <palves@redhat.com>
196
197 * remote-utils.c (remote_prepare, remote_open): Constify.
198 * remote-utils.h (remote_prepare, remote_open): Constify.
199 * server.c (captured_main): Constify 'port' handling.
200
201 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
202
203 * Makefile.in (clean): Clear .deps.
204
205 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * .gitignore: Remove generated files, replace with wildcard.
208 * (clean): Replace removal of generated files with wildcard.
209 (version.c): Replace with...
210 (version-generated.c): ...this.
211 (xml-builtin.c): Replace with...
212 (xml-builtin-generated.c): ...this.
213 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
214 (%.c: *regformats*): Replace with...
215 (%-generated.c: *regformats*): ...this.
216
217 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
218
219 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
220 (xtensa_fill_gregset): Call collect_register_by_name for
221 threadptr register.
222 (xtensa_store_gregset): Call supply_register_by_name for
223 threadptr register.
224
225 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
226
227 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
228 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
229 (xtensa_store_gregset): Call supply_register for all registers in
230 a0_regnum..a0_regnum + C0_NREGS range.
231
232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
233
234 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
235 (ax-ipa.o: ax.c): Remove.
236 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
237 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
238 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
239 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
240 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
241
242 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
243
244 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
245 (print-utils-ipa.o: ../common/print-utils.c): Remove.
246 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
247 (errors-ipa.o: ../common/errors.c): Remove.
248 (format-ipa.o: ../common/format.c): Remove.
249 (common-utils-ipa.o: ../common/common-utils.c): Remove.
250
251 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
252
253 * Makefile.in (%-ipa.o: %.c): New rule.
254 (tracepoint-ipa.o: tracepoint.c): Remove.
255 (utils-ipa.o: utils.c): Remove.
256 (remote-utils-ipa.o: remote-utils.c): Remove.
257 (regcache-ipa.o: regcache.c): Remove.
258 (i386-linux-ipa.o: i386-linux.c): Remove.
259 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
260 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
261 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
262 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
263 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
264 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
265 (amd64-linux-ipa.o: amd64-linux.c): Remove.
266 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
267 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
268 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
269 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
270 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
271 (aarch64-ipa.o: aarch64.c): Remove.
272 (s390-linux32-ipa.o: s390-linux32.c): Remove.
273 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
274 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
275 (s390-linux64-ipa.o: s390-linux64.c): Remove.
276 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
277 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
278 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
279 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
280 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
281 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
282 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
283 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
284 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
285 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
286 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
287 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
288 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
289 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
290 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
291 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
292 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
293 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
294 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
295 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
296 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
297 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
298 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
299 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
300 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
301 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
302 (tdesc-ipa.o: tdesc.c): Remove.
303 (x32-linux-ipa.o: x32-linux.c): Remove.
304 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
305 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
306
307 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
308
309 * Makefile.in (%.o: ../arch/%.c): New rule.
310 (arm.o: ../arch/arm.c): Remove.
311 (arm-linux.o: ../arch/arm-linux.c): Remove.
312 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
313 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
314
315 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * Makefile.in (%.o: ../nat/%.c): New rule.
318 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
319 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
320 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
321 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
322 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
323 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
324 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
325 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
326 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
327 (linux-personality.o: ../nat/linux-personality.c): Remove.
328 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
329 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
330 (x86-linux.o: ../nat/x86-linux.c): Remove.
331 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
332 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
333
334 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
335
336 * Makefile.in (%.o: ../common/%.c): New rule.
337 (signals.o: ../common/signals.c): Remove.
338 (print-utils.o: ../common/print-utils.c): Remove.
339 (rsp-low.o: ../common/rsp-low.c): Remove.
340 (common-utils.o: ../common/common-utils.c): Remove.
341 (posix-strerror.o: ../common/posix-strerror.c): Remove.
342 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
343 (vec.o: ../common/vec.c): Remove.
344 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
345 (xml-utils.o: ../common/xml-utils.c): Remove.
346 (ptid.o: ../common/ptid.c): Remove.
347 (buffer.o: ../common/buffer.c): Remove.
348 (format.o: ../common/format.c): Remove.
349 (filestuff.o: ../common/filestuff.c): Remove.
350 (agent.o: ../common/agent.c): Remove.
351 (errors.o: ../common/errors.c): Remove.
352 (environ.o: ../common/environ.c): Remove.
353 (common-debug.o: ../common/common-debug.c): Remove.
354 (cleanups.o: ../common/cleanups.c): Remove.
355 (common-exceptions.o: ../common/common-exceptions.c): Remove.
356 (fileio.o: ../common/fileio.c): Remove.
357 (common-regcache.o: ../common/common-regcache.c): Remove.
358 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
359 (new-op.o: ../common/new-op.c): Remove.
360 (btrace-common.o: ../common/btrace-common.c): Remove.
361
362 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
363
364 * Makefile.in (%.o: ../target/%.c): New rule.
365 (waitstatus.o: ../target/waitstatus.c): Remove.
366
367 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * Makefile.in
370 (%.c: ../regformats/%.dat,
371 (%.c: ../regformats/arm/%.dat,
372 (%.c: ../regformats/i386/%.dat,
373 (%.c: ../regformats/rs6000/%.dat): New rules.
374 (aarch64.c): Remove.
375 (reg-arm.c): Remove.
376 (arm-with-iwmmxt.c): Remove.
377 (arm-with-vfpv2.c): Remove.
378 (arm-with-vfpv3.c): Remove.
379 (arm-with-neon.c): Remove.
380 (reg-bfin.c): Remove.
381 (reg-cris.c): Remove.
382 (reg-crisv32.c): Remove.
383 (i386.c): Remove.
384 (i386-linux.c): Remove.
385 (i386-avx.c): Remove.
386 (i386-avx-linux.c): Remove.
387 (i386-avx-avx512.c): Remove.
388 (i386-avx-avx512-linux.c): Remove.
389 (i386-mpx.c): Remove.
390 (i386-mpx-linux.c): Remove.
391 (i386-avx-mpx-avx512-pku.c): Remove.
392 (i386-avx-mpx-avx512-pku-linux.c): Remove.
393 (i386-avx-mpx.c): Remove.
394 (i386-avx-mpx-linux.c): Remove.
395 (i386-mmx.c): Remove.
396 (i386-mmx-linux.c): Remove.
397 (reg-ia64.c): Remove.
398 (reg-m32r.c): Remove.
399 (reg-m68k.c): Remove.
400 (reg-cf.c): Remove.
401 (mips-linux.c): Remove.
402 (mips-dsp-linux.c): Remove.
403 (mips64-linux.c): Remove.
404 (mips64-dsp-linux.c): Remove.
405 (nios2-linux.c): Remove.
406 (powerpc-32.c): Remove.
407 (powerpc-32l.c): Remove.
408 (powerpc-altivec32l.c): Remove.
409 (powerpc-cell32l.c): Remove.
410 (powerpc-vsx32l.c): Remove.
411 (powerpc-isa205-32l.c): Remove.
412 (powerpc-isa205-altivec32l.c): Remove.
413 (powerpc-isa205-vsx32l.c): Remove.
414 (powerpc-e500l.c): Remove.
415 (powerpc-64l.c): Remove.
416 (powerpc-altivec64l.c): Remove.
417 (powerpc-cell64l.c): Remove.
418 (powerpc-vsx64l.c): Remove.
419 (powerpc-isa205-64l.c): Remove.
420 (powerpc-isa205-altivec64l.c): Remove.
421 (powerpc-isa205-vsx64l.c): Remove.
422 (s390-linux32.c): Remove.
423 (s390-linux32v1.c): Remove.
424 (s390-linux32v2.c): Remove.
425 (s390-linux64.c): Remove.
426 (s390-linux64v1.c): Remove.
427 (s390-linux64v2.c): Remove.
428 (s390-te-linux64.c): Remove.
429 (s390-vx-linux64.c): Remove.
430 (s390-tevx-linux64.c): Remove.
431 (s390x-linux64.c): Remove.
432 (s390x-linux64v1.c): Remove.
433 (s390x-linux64v2.c): Remove.
434 (s390x-te-linux64.c): Remove.
435 (s390x-vx-linux64.c): Remove.
436 (s390x-tevx-linux64.c): Remove.
437 (tic6x-c64xp-linux.c): Remove.
438 (tic6x-c64x-linux.c): Remove.
439 (tic6x-c62x-linux.c): Remove.
440 (reg-sh.c): Remove.
441 (reg-sparc64.c): Remove.
442 (reg-spu.c): Remove.
443 (amd64.c): Remove.
444 (amd64-linux.c): Remove.
445 (amd64-avx.c): Remove.
446 (amd64-avx-linux.c): Remove.
447 (amd64-avx-avx512.c): Remove.
448 (amd64-avx-avx512-linux.c): Remove.
449 (amd64-mpx.c): Remove.
450 (amd64-mpx-linux.c): Remove.
451 (amd64-avx-mpx-avx512-pku.c): Remove.
452 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
453 (amd64-avx-mpx.c): Remove.
454 (amd64-avx-mpx-linux.c): Remove.
455 (x32.c): Remove.
456 (x32-linux.c): Remove.
457 (x32-avx.c): Remove.
458 (x32-avx-linux.c): Remove.
459 (x32-avx-avx512.c): Remove.
460 (x32-avx-avx512-linux.c): Remove.
461 (reg-xtensa.c): Remove.
462 (reg-tilegx.c): Remove.
463 (reg-tilegx32.c): Remove.
464
465 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 * Makefile.in (SFILES): Add "common/environ.c".
468 (OBJS): Add "common/environ.h".
469
470 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
471
472 * configure.ac: Check if the fs_base and gs_base members of
473 `struct user_regs_struct' exist.
474 * config.in: Regenerated.
475 * configure: Likewise.
476
477 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
478
479 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
480 target_read_memory.
481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
482 (get_next_pcs_syscall_next_pc): Likewise.
483
484 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
485
486 * win32-i386-low.c: Fix incorrect reference to a couple source files.
487 * nto-x86-low.c: Likewise.
488
489 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
490
491 * Makefile.in: Include disable-implicit-rules.mk.
492
493 2016-11-23 Pedro Alves <palves@redhat.com>
494
495 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
496 (debug_vprintf): Use std::chrono::steady_clock instead of
497 gettimeofday. Use '.' instead of ':'.
498 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
499 (get_timestamp): Use std::chrono::steady_clock instead of
500 gettimeofday.
501
502 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * Makefile.in: Fix whitespace formatting.
505
506 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * Makefile.in (SFILES, OBS): Flatten list and order
509 alphabetically.
510
511 2016-11-23 Pedro Alves <palves@redhat.com>
512
513 * event-loop.c (handle_file_event): Use warning.
514 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
515 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
516 Use warning.
517
518 2016-11-23 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
521 output.
522 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
523 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
524 debug_printf and debug_flush for debug output.
525 * server.c (handle_general_set): Likewise.
526 * thread-db.c (try_thread_db_load): Use debug_printf for debug
527 output.
528
529 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
530
531 * Makefile.in (.c.o): Replace rule with ...
532 (%.o: %.c): ... this one.
533
534 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
535
536 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
537 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
538 make.
539 * configure.ac: Remove checks for the make program.
540 * configure: Re-generate.
541
542 2016-10-28 Pedro Alves <palves@redhat.com>
543
544 * Makefile.in (CXX_DIALECT): Get from configure.
545 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
546 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
547 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
548 * config.in: Regenerate.
549 * configure: Regenerate.
550
551 2016-10-27 Yao Qi <yao.qi@linaro.org>
552
553 * linux-low.c (linux_supports_range_stepping): Return true if
554 can_software_single_step return true.
555
556 2016-10-27 Yao Qi <yao.qi@linaro.org>
557
558 * inferiors.c (find_inferior_in_random): New function.
559 * inferiors.h (find_inferior_in_random): Declare.
560 * linux-low.c (linux_wait_for_event_filtered): Call
561 find_inferior_in_random instead of find_inferior.
562
563 2016-10-27 Yao Qi <yao.qi@linaro.org>
564
565 * linux-low.c (linux_wait_1): If single-step breakpoints are
566 inserted, remove them.
567
568 2016-10-26 Pedro Alves <palves@redhat.com>
569
570 * linux-low.c (handle_extended_wait): Link parent/child fork
571 threads.
572 (linux_wait_1): Unlink them.
573 (linux_set_resume_request): Ignore resume requests for
574 already-resumed and unhandled fork child threads.
575 * linux-low.h (struct lwp_info) <fork_relative>: New field.
576 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
577 New functions.
578 (handle_v_requests) <vCont>: Don't call require_running.
579 * server.h (in_queued_stop_replies): New declaration.
580
581 2016-10-24 Yao Qi <yao.qi@linaro.org>
582
583 PR server/20733
584 * linux-aarch64-low.c (append_insns): Cast the return value to
585 'uint32_t *'.
586
587 2016-10-10 Yao Qi <yao.qi@linaro.org>
588
589 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
590
591 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
592
593 * target.c (target_supports_multi_process): New function, moved
594 from...
595 * target.h (target_supports_multi_process): ... here. Remove
596 macro.
597
598 2016-10-05 Tom Tromey <tom@tromey.com>
599
600 PR remote/20655:
601 * tracepoint.c (handle_tracepoint_bkpts): Check
602 ipa_error_tracepoint, not ipa_stopping_tracepoint.
603
604 2016-10-05 Yao Qi <yao.qi@linaro.org>
605
606 * configure.srv: Update the path of arm-*.xml files.
607
608 2016-10-05 Terry Guo <terry.guo@arm.com>
609 Yao Qi <yao.qi@linaro.org>
610
611 * Makefile.in: Adjust the path of rules.
612 * configure.srv: Update the path of xml files.
613 * regformats/arm-with-iwmmxt.dat: Regenerated.
614 * regformats/arm-with-neon.dat: Likewise.
615 * regformats/arm-with-vfpv2.dat: Likewise.
616 * regformats/arm-with-vfpv3.dat Likewise.
617
618 2016-09-30 Yao Qi <yao.qi@linaro.org>
619
620 PR gdbserver/20627
621 * target.c (target_stop_and_wait): Don't call
622 target_continue_no_signal, use resume_stop instead.
623
624 2016-09-26 Yao Qi <yao.qi@linaro.org>
625
626 * linux-low.c (linux_wait_1): Call debug_exit.
627
628 2016-09-23 Pedro Alves <palves@redhat.com>
629
630 * Makefile.in (SFILES): Add common/new-op.c.
631 (OBS): Add common/new-op.o.
632 (new-op.o): New rule.
633
634 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
635
636 * .gitinore: Ignore more files.
637
638 2016-09-21 Yao Qi <yao.qi@linaro.org>
639
640 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
641 23.
642
643 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
644
645 * server.c (start_inferior): Call target_mourn_inferior instead of
646 mourn_inferior; pass ptid_t argument to it.
647 (resume): Likewise.
648 (handle_target_event): Likewise.
649 * target.c (target_mourn_inferior): New function.
650 * target.h (mourn_inferior): Delete macro.
651
652 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
653
654 * linux-low.c (lwp_is_stepping): New function.
655
656 2016-09-06 Carl Love <cel@us.ibm.com>
657
658 * server.c (start_inferior): Fixed comment, requested comment change
659 didn't get updated correctly. Removed reference to ptrace () call as
660 it is only true on Linux systems.
661
662 2016-09-06 Carl Love <cel@us.ibm.com>
663
664 * server.c (start_inferior): Do not call
665 function target_post_create_inferior () if the
666 inferior process has already exited.
667
668 2016-09-05 Pedro Alves <palves@redhat.com>
669
670 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
671 (COMPILE.pre, CC_LD): Use CXX directly.
672 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
673 * acinclude.m4: Don't include build-with-cxx.m4.
674 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
675 * configure: Regenerate.
676
677 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
678
679 PR gdb/19495
680 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
681 call writing data to own_buf.
682
683 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
684
685 * target.c (mywait): Call target_wait instead of
686 the_target->wait.
687 (target_wait): New function.
688
689 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
690
691 * server.c (start_inferior): New variable 'ptid'. Replace calls
692 to the_target->resume by target_continue{,_no_signal}, depending
693 on the case.
694 * target.c (target_stop_and_wait): Call target_continue_no_signal
695 instead of the_target->resume.
696 (target_continue): New function.
697
698 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
699
700 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
701
702 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
703
704 PR server/20491
705 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
706 ps_prochandle.
707 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
708 * linux-arm-low.c (ps_get_thread_area): Likewise.
709 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
710 * linux-m68k-low.c (ps_get_thread_area): Likewise.
711 * linux-mips-low.c (ps_get_thread_area): Likewise.
712 * linux-nios2-low.c (ps_get_thread_area): Likewise.
713 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
714 * linux-x86-low.c (ps_get_thread_area): Likewise.
715 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
716
717 2016-08-19 Pedro Alves <palves@redhat.com>
718
719 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
720
721 2016-08-19 Pedro Alves <palves@redhat.com>
722
723 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
724 comment. Use memcpy instead of casting through unsigned long.
725
726 2016-08-19 Pedro Alves <palves@redhat.com>
727
728 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
729 allocating around 0x80000000.
730
731 2016-08-19 Pedro Alves <palves@redhat.com>
732
733 PR gdb/20415
734 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
735 (x32-avx512-linux-ipa.o): New rules.
736 * configure.ac (x86_64-*-linux*): New x32 check.
737 * configure.srv (ipa_x32_linux_regobj): New.
738 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
739 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
740 descriptions.
741 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
742 descriptions.
743 * configure: Regenerate.
744
745 2016-08-09 Pedro Alves <palves@redhat.com>
746
747 PR gdb/18653
748 * Makefile.in (OBS): Add signals-state-save-restore.o.
749 (signals-state-save-restore.o): New rule.
750 * config.in: Regenerate.
751 * configure: Regenerate.
752 * linux-low.c: Include "signals-state-save-restore.h".
753 (linux_create_inferior): Call
754 restore_original_signals_state.
755 * server.c: Include "dispositions-save-restore.h".
756 (captured_main): Call save_original_signals_state.
757
758 2016-08-05 Pedro Alves <palves@redhat.com>
759
760 * configure: Regenerate.
761
762 2016-08-04 Yao Qi <yao.qi@linaro.org>
763
764 * linux-low.c (regsets_fetch_inferior_registers): Check
765 errno is ESRCH or not.
766
767 2016-08-02 Yao Qi <yao.qi@linaro.org>
768
769 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
770 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
771 (thread_db_load_search): Update.
772 (try_thread_db_load_1): Don't look for td_ta_event_addr,
773 td_ta_set_event and td_ta_event_getmsg.
774
775 2016-07-26 Pedro Alves <palves@redhat.com>
776
777 PR server/20414
778 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
779 of unsigned long for 64-bit registers and use uint32_t instead of
780 unsigned int for 32-bit registers.
781
782 2016-07-26 Pedro Alves <palves@redhat.com>
783
784 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
785 to 'ptrace'.
786
787 2016-07-21 Tom Tromey <tom@tromey.com>
788
789 * configure: Rebuild.
790
791 2016-07-21 Yao Qi <yao.qi@linaro.org>
792
793 * mem-break.c (find_gdb_breakpoint): Cast bp to
794 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
795
796 2016-07-21 Yao Qi <yao.qi@linaro.org>
797
798 * server.c (handle_v_requests): Support s and S actions
799 if target_supports_software_single_step return true.
800
801 2016-07-21 Yao Qi <yao.qi@linaro.org>
802
803 * linux-low.c (resume_stopped_resumed_lwps): If resume request
804 is resume_step, call maybe_hw_step.
805 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
806 and unstop them.
807 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
808 breakpoints or not.
809 (proceed_one_lwp): If resume request is resume_step, install
810 reinsert breakpoints and call maybe_hw_step.
811
812 2016-07-21 Yao Qi <yao.qi@linaro.org>
813
814 * linux-low.c (proceed_one_lwp): Declare.
815 (linux_resume_one_thread): Remove local variable 'step'.
816 Lift code enqueue signal. Call proceed_one_lwp instead of
817 linux_resume_one_lwp.
818
819 2016-07-21 Yao Qi <yao.qi@linaro.org>
820
821 * linux-low.c (linux_resume_one_thread): Call
822 enqueue_pending_signal.
823
824 2016-07-21 Yao Qi <yao.qi@linaro.org>
825
826 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
827 * inferiors.c (do_restore_current_thread_cleanup): New function.
828 (make_cleanup_restore_current_thread): Likewise.
829 * linux-low.c (install_software_single_step_breakpoints): Call
830 make_cleanup_restore_current_thread. Switch current_thread to
831 thread.
832
833 2016-07-21 Yao Qi <yao.qi@linaro.org>
834
835 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
836 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
837 (clone_one_breakpoint): Likewise.
838 (delete_reinsert_breakpoints): Change parameter to thread.
839 Callers updated.
840 (has_reinsert_breakpoints): Likewise.
841 (uninsert_reinsert_breakpoints): Likewise.
842 (reinsert_reinsert_breakpoints): Likewise.
843 * mem-break.h (set_reinsert_breakpoint): Update declaration.
844 (delete_reinsert_breakpoints): Likewise.
845 (reinsert_reinsert_breakpoints): Likewise.
846 (uninsert_reinsert_breakpoints): Likewise.
847 (has_reinsert_breakpoints): Likewise.
848
849 2016-07-21 Yao Qi <yao.qi@linaro.org>
850
851 * inferiors.c (get_thread_process): Make parameter const.
852 * inferiors.h (get_thread_process): Update declaration.
853 * mem-break.c (clone_all_breakpoints): Remove all parameters.
854 Add new parameters child_thread and parent_thread. Callers
855 updated.
856 * mem-break.h (clone_all_breakpoints): Update declaration.
857
858 2016-07-21 Yao Qi <yao.qi@linaro.org>
859
860 * mem-break.c (struct breakpoint) <cond_list>: Remove.
861 <command_list, handler>: Remove.
862 (struct gdb_breakpoint): New.
863 (struct other_breakpoint): New.
864 (struct reinsert_breakpoint): New.
865 (is_gdb_breakpoint): New function.
866 (any_persistent_commands): Update command_list if
867 is_gdb_breakpoint returns true.
868 (set_breakpoint): Create breakpoints according to their types.
869 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
870 (set_gdb_breakpoint_1): Likewise.
871 (set_gdb_breakpoint): Likewise.
872 (clear_breakpoint_conditions): Change parameter type to
873 'struct gdb_breakpoint *'.
874 (clear_breakpoint_commands): Likewise.
875 (clear_breakpoint_conditions_and_commands): Likewise.
876 (add_condition_to_breakpoint): Likewise.
877 (add_breakpoint_condition): Likewise.
878 (add_commands_to_breakpoint): Likewise.
879 (check_breakpoints): Check other_breakpoint.
880 (clone_one_breakpoint): Clone breakpopint according to its type.
881 * mem-break.h (struct gdb_breakpoint): Declare.
882 (set_gdb_breakpoint): Update declaration.
883 (clear_breakpoint_conditions_and_commands): Likewise.
884 (add_breakpoint_condition): Likewise.
885 (add_breakpoint_commands): Likewise.
886 * server.c (process_point_options): Change parameter type to
887 'struct gdb_breakpoint *'.
888
889 2016-07-21 Yao Qi <yao.qi@linaro.org>
890
891 * mem-break.c (set_breakpoint_at): Rename it to ...
892 (set_breakpoint_type_at): ... it.
893 (set_breakpoint_at): Call set_breakpoint_type_at.
894 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
895 * mem-break.h (set_breakpoint_at): Update comments.
896
897 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
898
899 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
900 to buf parameter.
901 (nios2_store_gregset): Likewise.
902
903 2016-07-01 Pedro Alves <palves@redhat.com>
904 Antoine Tremblay <antoine.tremblay@ericsson.com>
905
906 * linux-low.c: Change interface to take the target lwp_info
907 pointer directly and return void. Handle detaching from a zombie
908 thread.
909 (linux_detach_lwp_callback): New function.
910 (linux_detach): Detach from the leader thread after detaching from
911 the clone threads.
912
913 2016-06-28 Yao Qi <yao.qi@linaro.org>
914
915 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
916 for variable new_offset.
917 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
918 (aarch64_ftrace_insn_reloc_cb): Likewise.
919 (aarch64_ftrace_insn_reloc_tb): Likewise.
920 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
921 PRIx64 instead of PRIx32.
922
923 2016-06-28 Yao Qi <yao.qi@linaro.org>
924
925 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
926 (the_low_target): Install arm_get_syscall_trapinfo.
927
928 2016-06-28 Yao Qi <yao.qi@linaro.org>
929
930 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
931 function.
932 (the_low_target): Install aarch64_get_syscall_trapinfo.
933
934 2016-06-28 Yao Qi <yao.qi@linaro.org>
935
936 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
937 Callers updated.
938 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
939 Remove parameter sysno.
940 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
941 sysret.
942
943 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
944
945 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
946 (s390_emit_ne_goto): Likewise.
947 (s390_emit_lt_goto): Likewise.
948 (s390_emit_le_goto): Likewise.
949 (s390_emit_gt_goto): Likewise.
950 (s390_emit_ge_goto): Likewise.
951 (s390x_emit_eq_goto): Likewise.
952 (s390x_emit_ne_goto): Likewise.
953 (s390x_emit_lt_goto): Likewise.
954 (s390x_emit_le_goto): Likewise.
955 (s390x_emit_gt_goto): Likewise.
956 (s390x_emit_ge_goto): Likewise.
957 (s390_emit_ops_impl): Mark variable static.
958 (s390x_emit_ops): Likewise.
959
960 2016-06-17 Yao Qi <yao.qi@linaro.org>
961
962 * linux-low.c (handle_extended_wait): Call
963 uninsert_reinsert_breakpoints for the parent process. Remove
964 reinsert breakpoints from the child process. Reinsert them to
965 the parent process when vfork is done.
966 * mem-break.c (uninsert_reinsert_breakpoints): New function.
967 (reinsert_reinsert_breakpoints): New function.
968 * mem-break.h (uninsert_reinsert_breakpoints): Declare
969 (reinsert_reinsert_breakpoints): Declare.
970
971 2016-06-17 Yao Qi <yao.qi@linaro.org>
972
973 * linux-low.c (handle_extended_wait): If the parent is doing
974 step-over, remove the reinsert breakpoints from the forked child.
975
976 2016-06-17 Yao Qi <yao.qi@linaro.org>
977
978 * linux-low.c (unsuspend_all_lwps): Declare.
979 (linux_low_filter_event): If thread exited, call finish_step_over.
980 If step-over is finished, unsuspend other threads.
981
982 2016-06-17 Yao Qi <yao.qi@linaro.org>
983
984 * linux-low.c (linux_resume_one_lwp_throw): Assert
985 has_reinsert_breakpoints returns false.
986 * mem-break.c (delete_disabled_breakpoints): Assert
987 bp type isn't reinsert_breakpoint.
988
989 2016-06-17 Yao Qi <yao.qi@linaro.org>
990
991 * linux-low.c (maybe_hw_step): New function.
992 (linux_resume_one_lwp_throw): Call maybe_hw_step.
993 (finish_step_over): Switch current_thread to lwp temporarily,
994 and assert has_reinsert_breakpoints returns true.
995 (proceed_one_lwp): Call maybe_hw_step.
996 * mem-break.c (has_reinsert_breakpoints): New function.
997 * mem-break.h (has_reinsert_breakpoints): Declare.
998
999 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1000
1001 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1002
1003 2016-05-17 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1006 instead of find_inferior.
1007
1008 2016-05-05 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1011 Initialize res to zero.
1012
1013 2016-05-05 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1016 to uint32_t.
1017
1018 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1019
1020 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1021 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1022 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1023
1024 2016-04-28 Par Olsson <par.olsson@windriver.com>
1025 Simon Marchi <simon.marchi@ericsson.com>
1026
1027 * tracepoint.c (write_inferior_int8): New function.
1028 (cmd_qtenable_disable): Write enable flag using
1029 write_inferior_int8.
1030
1031 2016-04-25 Yao Qi <yao.qi@linaro.org>
1032
1033 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1034 (need_step_over_p): Return zero if the LWP has pending signals
1035 can be delivered on software single step target.
1036
1037 2016-04-25 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1040 return instead of error.
1041
1042 2016-04-22 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1045 to 23.
1046
1047 2016-04-22 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1050 signal when stepping over breakpoint with software single
1051 step.
1052
1053 2016-04-21 Pedro Alves <palves@redhat.com>
1054
1055 * linux-s390-low.c (s390_collect_ptrace_register)
1056 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1057 add casts.
1058 (s390_check_regset): Use void * instead of gdb_byte *.
1059
1060 2016-04-20 Pedro Alves <palves@redhat.com>
1061
1062 * configure: Renegerate.
1063
1064 2016-04-20 Yao Qi <yao.qi@linaro.org>
1065
1066 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1067 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1068 number 16.
1069 (arm_store_gregset): Likewise.
1070
1071 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1072
1073 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1074 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1075 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1076 (amd64-avx-mpx-linux.c): New rules.
1077 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1078 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1079 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1080 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1081 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1082 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1083 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1084 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1085 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1086 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1087 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1088 * linux-x86-low.c (x86_linux_read_description): Add case for
1089 X86_XSTATE_AVX_MPX_MASK.
1090 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1091 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1092 init_registers_i386_avx_mpx_linux.
1093 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1094 (initialize_low_tracepoint): Call
1095 init_registers_i386_avx_mpx_linux.
1096 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1097 (initialize_low_tracepoint): Call
1098 init_registers_amd64_avx_mpx_linux.
1099 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1100 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1101 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1102 declarations.
1103
1104 2016-04-18 Pedro Alves <palves@redhat.com>
1105
1106 * configure: Regenerate.
1107
1108 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1109
1110 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1111 (aarch64_emit_sub): Likewise.
1112
1113 2016-04-12 Pedro Alves <palves@redhat.com>
1114
1115 * utils.c (prepare_to_throw_exception): Delete.
1116
1117 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1118
1119 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1120
1121 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1122
1123 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1124
1125 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1126
1127 * linux-aarch64-ipa.c: Add <elf.h> include.
1128 * linux-ppc-ipa.c: Add <elf.h> include.
1129 * linux-s390-ipa.c: Add <elf.h> include.
1130
1131 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1132
1133 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1134 (get_raw_reg_ptr): Likewise.
1135 (get_trace_state_variable_value_ptr): Likewise.
1136 (set_trace_state_variable_value_ptr): Likewise.
1137 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1138 char *.
1139
1140 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1141 Marcin Kościelnicki <koriakin@0x04.net>
1142
1143 PR/17221
1144 * linux-ppc-low.c (emit_insns): New function.
1145 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1146 (ppc_emit_prologue): New function.
1147 (ppc_emit_epilogue): New function.
1148 (ppc_emit_add): New function.
1149 (ppc_emit_sub): New function.
1150 (ppc_emit_mul): New function.
1151 (ppc_emit_lsh): New function.
1152 (ppc_emit_rsh_signed): New function.
1153 (ppc_emit_rsh_unsigned): New function.
1154 (ppc_emit_ext): New function.
1155 (ppc_emit_zero_ext): New function.
1156 (ppc_emit_log_not): New function.
1157 (ppc_emit_bit_and): New function.
1158 (ppc_emit_bit_or): New function.
1159 (ppc_emit_bit_xor): New function.
1160 (ppc_emit_bit_not): New function.
1161 (ppc_emit_equal): New function.
1162 (ppc_emit_less_signed): New function.
1163 (ppc_emit_less_unsigned): New function.
1164 (ppc_emit_ref): New function.
1165 (ppc_emit_const): New function.
1166 (ppc_emit_reg): New function.
1167 (ppc_emit_pop): New function.
1168 (ppc_emit_stack_flush): New function.
1169 (ppc_emit_swap): New function.
1170 (ppc_emit_stack_adjust): New function.
1171 (ppc_emit_call): New function.
1172 (ppc_emit_int_call_1): New function.
1173 (ppc_emit_void_call_2): New function.
1174 (ppc_emit_if_goto): New function.
1175 (ppc_emit_goto): New function.
1176 (ppc_emit_eq_goto): New function.
1177 (ppc_emit_ne_goto): New function.
1178 (ppc_emit_lt_goto): New function.
1179 (ppc_emit_le_goto): New function.
1180 (ppc_emit_gt_goto): New function.
1181 (ppc_emit_ge_goto): New function.
1182 (ppc_write_goto_address): New function.
1183 (ppc_emit_ops_impl): New static variable.
1184 (ppc64v1_emit_prologue): New function.
1185 (ppc64v2_emit_prologue): New function.
1186 (ppc64_emit_epilogue): New function.
1187 (ppc64_emit_add): New function.
1188 (ppc64_emit_sub): New function.
1189 (ppc64_emit_mul): New function.
1190 (ppc64_emit_lsh): New function.
1191 (ppc64_emit_rsh_signed): New function.
1192 (ppc64_emit_rsh_unsigned): New function.
1193 (ppc64_emit_ext): New function.
1194 (ppc64_emit_zero_ext): New function.
1195 (ppc64_emit_log_not): New function.
1196 (ppc64_emit_bit_and): New function.
1197 (ppc64_emit_bit_or): New function.
1198 (ppc64_emit_bit_xor): New function.
1199 (ppc64_emit_bit_not): New function.
1200 (ppc64_emit_equal): New function.
1201 (ppc64_emit_less_signed): New function.
1202 (ppc64_emit_less_unsigned): New function.
1203 (ppc64_emit_ref): New function.
1204 (ppc64_emit_const): New function.
1205 (ppc64v1_emit_reg): New function.
1206 (ppc64v2_emit_reg): New function.
1207 (ppc64_emit_pop): New function.
1208 (ppc64_emit_stack_flush): New function.
1209 (ppc64_emit_swap): New function.
1210 (ppc64v1_emit_call): New function.
1211 (ppc64v2_emit_call): New function.
1212 (ppc64v1_emit_int_call_1): New function.
1213 (ppc64v2_emit_int_call_1): New function.
1214 (ppc64v1_emit_void_call_2): New function.
1215 (ppc64v2_emit_void_call_2): New function.
1216 (ppc64_emit_if_goto): New function.
1217 (ppc64_emit_eq_goto): New function.
1218 (ppc64_emit_ne_goto): New function.
1219 (ppc64_emit_lt_goto): New function.
1220 (ppc64_emit_le_goto): New function.
1221 (ppc64_emit_gt_goto): New function.
1222 (ppc64_emit_ge_goto): New function.
1223 (ppc64v1_emit_ops_impl): New static variable.
1224 (ppc64v2_emit_ops_impl): New static variable.
1225 (ppc_emit_ops): New function.
1226 (linux_low_target): Wire in ppc_emit_ops.
1227
1228 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1229 Marcin Kościelnicki <koriakin@0x04.net>
1230
1231 PR/17221
1232 * Makefile.in: Add powerpc-*-ipa.o
1233 * configure.srv: Add ipa_obj for powerpc*-linux.
1234 * linux-ppc-ipa.c: New file.
1235 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1236 includes.
1237 (PPC_FIELD): New macro.
1238 (PPC_SEXT): New macro.
1239 (PPC_OP6): New macro.
1240 (PPC_BO): New macro.
1241 (PPC_LI): New macro.
1242 (PPC_BD): New macro.
1243 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1244 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1245 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1246 (ppc_get_thread_area): New function.
1247 (is_elfv2_inferior): New function.
1248 (gen_ds_form): New function.
1249 (GEN_STD): New macro.
1250 (GEN_STDU): New macro.
1251 (GEN_LD): New macro.
1252 (GEN_LDU): New macro.
1253 (gen_d_form): New function.
1254 (GEN_ADDI): New macro.
1255 (GEN_ADDIS): New macro.
1256 (GEN_LI): New macro.
1257 (GEN_LIS): New macro.
1258 (GEN_ORI): New macro.
1259 (GEN_ORIS): New macro.
1260 (GEN_LWZ): New macro.
1261 (GEN_STW): New macro.
1262 (GEN_STWU): New macro.
1263 (gen_xfx_form): New function.
1264 (GEN_MFSPR): New macro.
1265 (GEN_MTSPR): New macro.
1266 (GEN_MFCR): New macro.
1267 (GEN_MTCR): New macro.
1268 (GEN_SYNC): New macro.
1269 (GEN_LWSYNC): New macro.
1270 (gen_x_form): New function.
1271 (GEN_OR): New macro.
1272 (GEN_MR): New macro.
1273 (GEN_LWARX): New macro.
1274 (GEN_STWCX): New macro.
1275 (GEN_CMPW): New macro.
1276 (gen_md_form): New function.
1277 (GEN_RLDICL): New macro.
1278 (GEN_RLDICR): New macro.
1279 (gen_i_form): New function.
1280 (GEN_B): New macro.
1281 (GEN_BL): New macro.
1282 (gen_b_form): New function.
1283 (GEN_BNE): New macro.
1284 (GEN_LOAD): New macro.
1285 (GEN_STORE): New macro.
1286 (gen_limm): New function.
1287 (gen_atomic_xchg): New function.
1288 (gen_call): New function.
1289 (ppc_relocate_instruction): New function.
1290 (ppc_install_fast_tracepoint_jump_pad): New function.
1291 (ppc_get_min_fast_tracepoint_insn_len): New function.
1292 (ppc_get_ipa_tdesc_idx): New function.
1293 (the_low_target): Wire in the new functions.
1294 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1295 tdescs.
1296 * linux-ppc-tdesc.h: New file.
1297
1298 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1299
1300 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1301 (alloc_jump_pad_buffer): New function.
1302 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1303 (alloc_jump_pad_buffer): New function.
1304 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1305 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1306 (alloc_jump_pad_buffer): New function.
1307 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1308 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1309 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1310 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1311
1312 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1313
1314 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1315 * linux-amd64-ipa.c: Likewise.
1316 * linux-i386-ipa.c: Likewise.
1317 * linux-s390-ipa.c: Likewise.
1318 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1319 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1320 set_trace_state_variable_value_ptr.
1321 (struct ipa_sym_addresses): Likewise.
1322 (symbol_list): Likewise.
1323 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1324 accessing gdb_collect directly.
1325 (gdb_collect_ptr_type): New typedef.
1326 (get_raw_reg_ptr_type): New typedef.
1327 (get_trace_state_variable_value_ptr_type): New typedef.
1328 (set_trace_state_variable_value_ptr_type): New typedef.
1329 (gdb_collect_ptr): New global.
1330 (get_raw_reg_ptr): New global.
1331 (get_trace_state_variable_value_ptr): New global.
1332 (set_trace_state_variable_value_ptr): New global.
1333 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1334 accessing get_raw_reg directly.
1335 (get_get_tsv_func_addr): Likewise for
1336 get_trace_state_variable_value_ptr.
1337 (get_set_tsv_func_addr): Likewise for
1338 set_trace_state_variable_value_ptr.
1339 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1340
1341 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1344
1345 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1346
1347 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1348 packets.
1349 (relocate_instruction): Remove own_buf.
1350 * server.c (own_buf): Make global.
1351 (handle_v_requests): Make global.
1352 * server.h (own_buf): New declaration.
1353 (handle_v_requests): New prototype.
1354
1355 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1356
1357 PR 18377
1358 * linux-s390-low.c (add_insns): New function.
1359 (s390_emit_prologue): New function.
1360 (s390_emit_epilogue): New function.
1361 (s390_emit_add): New function.
1362 (s390_emit_sub): New function.
1363 (s390_emit_mul): New function.
1364 (s390_emit_lsh): New function.
1365 (s390_emit_rsh_signed): New function.
1366 (s390_emit_rsh_unsigned): New function.
1367 (s390_emit_ext): New function.
1368 (s390_emit_log_not): New function.
1369 (s390_emit_bit_and): New function.
1370 (s390_emit_bit_or): New function.
1371 (s390_emit_bit_xor): New function.
1372 (s390_emit_bit_not): New function.
1373 (s390_emit_equal): New function.
1374 (s390_emit_less_signed): New function.
1375 (s390_emit_less_unsigned): New function.
1376 (s390_emit_ref): New function.
1377 (s390_emit_if_goto): New function.
1378 (s390_emit_goto): New function.
1379 (s390_write_goto_address): New function.
1380 (s390_emit_litpool): New function.
1381 (s390_emit_const): New function.
1382 (s390_emit_call): New function.
1383 (s390_emit_reg): New function.
1384 (s390_emit_pop): New function.
1385 (s390_emit_stack_flush): New function.
1386 (s390_emit_zero_ext): New function.
1387 (s390_emit_swap): New function.
1388 (s390_emit_stack_adjust): New function.
1389 (s390_emit_set_r2): New function.
1390 (s390_emit_int_call_1): New function.
1391 (s390_emit_void_call_2): New function.
1392 (s390_emit_eq_goto): New function.
1393 (s390_emit_ne_goto): New function.
1394 (s390_emit_lt_goto): New function.
1395 (s390_emit_le_goto): New function.
1396 (s390_emit_gt_goto): New function.
1397 (s390_emit_ge_goto): New function.
1398 (s390x_emit_prologue): New function.
1399 (s390x_emit_epilogue): New function.
1400 (s390x_emit_add): New function.
1401 (s390x_emit_sub): New function.
1402 (s390x_emit_mul): New function.
1403 (s390x_emit_lsh): New function.
1404 (s390x_emit_rsh_signed): New function.
1405 (s390x_emit_rsh_unsigned): New function.
1406 (s390x_emit_ext): New function.
1407 (s390x_emit_log_not): New function.
1408 (s390x_emit_bit_and): New function.
1409 (s390x_emit_bit_or): New function.
1410 (s390x_emit_bit_xor): New function.
1411 (s390x_emit_bit_not): New function.
1412 (s390x_emit_equal): New function.
1413 (s390x_emit_less_signed): New function.
1414 (s390x_emit_less_unsigned): New function.
1415 (s390x_emit_ref): New function.
1416 (s390x_emit_if_goto): New function.
1417 (s390x_emit_const): New function.
1418 (s390x_emit_call): New function.
1419 (s390x_emit_reg): New function.
1420 (s390x_emit_pop): New function.
1421 (s390x_emit_stack_flush): New function.
1422 (s390x_emit_zero_ext): New function.
1423 (s390x_emit_swap): New function.
1424 (s390x_emit_stack_adjust): New function.
1425 (s390x_emit_int_call_1): New function.
1426 (s390x_emit_void_call_2): New function.
1427 (s390x_emit_eq_goto): New function.
1428 (s390x_emit_ne_goto): New function.
1429 (s390x_emit_lt_goto): New function.
1430 (s390x_emit_le_goto): New function.
1431 (s390x_emit_gt_goto): New function.
1432 (s390x_emit_ge_goto): New function.
1433 (s390_emit_ops): New function.
1434 (struct linux_target_ops): Fill in emit_ops hook.
1435
1436 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1437
1438 PR 18377
1439 * Makefile.in: Add s390 IPA files.
1440 * configure.srv: Build IPA for s390.
1441 * linux-s390-ipa.c: New file.
1442 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1443 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1444 (tdesc_s390_linux32): Likewise.
1445 (init_registers_s390_linux32v1): Likewise.
1446 (tdesc_s390_linux32v1): Likewise.
1447 (init_registers_s390_linux32v2): Likewise.
1448 (tdesc_s390_linux32v2): Likewise.
1449 (init_registers_s390_linux64): Likewise.
1450 (tdesc_s390_linux64): Likewise.
1451 (init_registers_s390_linux64v1): Likewise.
1452 (tdesc_s390_linux64v1): Likewise.
1453 (init_registers_s390_linux64v2): Likewise.
1454 (tdesc_s390_linux64v2): Likewise.
1455 (init_registers_s390_te_linux64): Likewise.
1456 (tdesc_s390_te_linux64): Likewise.
1457 (init_registers_s390_vx_linux64): Likewise.
1458 (tdesc_s390_vx_linux64): Likewise.
1459 (init_registers_s390_tevx_linux64): Likewise.
1460 (tdesc_s390_tevx_linux64): Likewise.
1461 (init_registers_s390x_linux64): Likewise.
1462 (tdesc_s390x_linux64): Likewise.
1463 (init_registers_s390x_linux64v1): Likewise.
1464 (tdesc_s390x_linux64v1): Likewise.
1465 (init_registers_s390x_linux64v2): Likewise.
1466 (tdesc_s390x_linux64v2): Likewise.
1467 (init_registers_s390x_te_linux64): Likewise.
1468 (tdesc_s390x_te_linux64): Likewise.
1469 (init_registers_s390x_vx_linux64): Likewise.
1470 (tdesc_s390x_vx_linux64): Likewise.
1471 (init_registers_s390x_tevx_linux64): Likewise.
1472 (tdesc_s390x_tevx_linux64): Likewise.
1473 (have_hwcap_s390_vx): New static variable.
1474 (s390_arch_setup): Fill have_hwcap_s390_vx.
1475 (s390_get_thread_area): New function.
1476 (s390_ft_entry_gpr_esa): New const.
1477 (s390_ft_entry_gpr_zarch): New const.
1478 (s390_ft_entry_misc): New const.
1479 (s390_ft_entry_fr): New const.
1480 (s390_ft_entry_vr): New const.
1481 (s390_ft_main_31): New const.
1482 (s390_ft_main_64): New const.
1483 (s390_ft_exit_fr): New const.
1484 (s390_ft_exit_vr): New const.
1485 (s390_ft_exit_misc): New const.
1486 (s390_ft_exit_gpr_esa): New const.
1487 (s390_ft_exit_gpr_zarch): New const.
1488 (append_insns): New function.
1489 (s390_relocate_instruction): New function.
1490 (s390_install_fast_tracepoint_jump_pad): New function.
1491 (s390_get_min_fast_tracepoint_insn_len): New function.
1492 (s390_get_ipa_tdesc_idx): New function.
1493 (struct linux_target_ops): Wire in the above functions.
1494 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1495 * linux-s390-tdesc.h: New file.
1496
1497 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1498
1499 * linux-s390-low.c (s390_supports_tracepoints): New function.
1500 (struct linux_target_ops): Fill supports_tracepoints hook.
1501
1502 2016-03-18 Yao Qi <yao.qi@linaro.org>
1503
1504 * linux-low.c (lwp_signal_can_be_delivered): New function.
1505 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1506
1507 2016-03-18 Yao Qi <yao.qi@linaro.org>
1508
1509 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1510 0 if signal is enqueued. Remove 'signal' from one debugging
1511 message. Move one debugging message to some lines below.
1512 Remove code setting 'signal' to 0.
1513
1514 2016-03-18 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-low.c (linux_low_filter_event): Remove redundant
1517 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1518
1519 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1520
1521 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1522 (struct linux_target_ops): Wire in the above.
1523
1524 2016-03-03 Yao Qi <yao.qi@linaro.org>
1525
1526 * linux-low.c: Update comments to start_step_over.
1527
1528 2016-03-03 Yao Qi <yao.qi@linaro.org>
1529
1530 PR server/19736
1531 * linux-low.c (handle_extended_wait): Set child suspended
1532 if event_lwp->bp_reinsert isn't zero.
1533
1534 2016-03-02 Yao Qi <yao.qi@linaro.org>
1535
1536 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1537 enqueue_pending_signal.
1538
1539 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1540
1541 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1542 is actually loaded.
1543
1544 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1545
1546 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1547 (s390_regmap_3264) [!__s390x__]: New global.
1548 (s390_collect_ptrace_register): Skip map entries containing -1.
1549 (s390_supply_ptrace_register): Ditto.
1550 (s390_fill_gprs_high): New function.
1551 (s390_store_gprs_high): New function.
1552 (s390_regsets): Add NT_S390_HIGH_GPRS.
1553 (s390_get_hwcap): Enable on 31-bit.
1554 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1555 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1556 Detect NT_S390_HIGH_GPRS.
1557 (s390_usrregs_info_3264): Enable on 31-bit.
1558 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1559 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1560
1561 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1562
1563 PR gdb/13808
1564 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1565 * configure.srv: Ditto.
1566 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1567 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1568 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1569 (init_registers_amd64_linux): Remove prototype.
1570 (tdesc_amd64_linux): Remove declaration.
1571 (get_ipa_tdesc): New function.
1572 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1573 initialize remaining tdescs.
1574 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1575 (init_registers_i386_linux): Remove prototype.
1576 (tdesc_i386_linux): Remove declaration.
1577 (get_ipa_tdesc): New function.
1578 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1579 initialize remaining tdescs.
1580 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1581 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1582 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1583 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1584 (x86_get_ipa_tdesc_idx): New function.
1585 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1586 * linux-x86-tdesc.h: New file.
1587 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1588 (target_get_ipa_tdesc_idx): New macro.
1589 * tracepoint.c (ipa_tdesc_idx): New macro.
1590 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1591 (symbol_list): Add ipa_tdesc_idx.
1592 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1593 (ipa_tdesc): Remove.
1594 (ipa_tdesc_idx): New variable.
1595 (get_context_regcache): Use get_ipa_tdesc.
1596 (gdb_collect): Ditto.
1597 (gdb_probe): Ditto.
1598 * tracepoint.h (get_ipa_tdesc): New prototype.
1599 (ipa_tdesc): Remove.
1600
1601 2016-02-24 Pedro Alves <palves@redhat.com>
1602
1603 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1604 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1605 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1606 Factor out common code between the USE_SIGTRAP_SIGINFO and
1607 !USE_SIGTRAP_SIGINFO blocks.
1608 (linux_low_filter_event): Call save_stop_reason instead of
1609 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1610 Update comments.
1611 (linux_wait_1): Update comments.
1612
1613 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1614
1615 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1616 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1617 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1618 ppc_insert_point, ppc_remove_point.
1619
1620 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1621
1622 * linux-s390-low.c (s390_supports_z_point_type): New function.
1623 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1624
1625 2016-02-16 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1628 PC. Get pc from regcache_read_pc.
1629
1630 2016-02-12 Yao Qi <yao.qi@linaro.org>
1631
1632 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1633 or linux_get_pc_32bit.
1634 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1635
1636 2016-02-12 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1639 arm_linux_get_next_pcs_fixup.
1640
1641 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1642
1643 * tracepoint.c (x_tracepoint_action_download): Change
1644 write_inferior_data_ptr to write_inferior_data_pointer.
1645 (cmd_qtstart): Likewise.
1646 (write_inferior_data_ptr): Remove.
1647 (download_agent_expr): Change write_inferior_data_ptr to
1648 write_inferior_data_pointer.
1649 (download_tracepoint_1): Likewise.
1650 (download_tracepoint): Likewise.
1651 (download_trace_state_variables): Likewise.
1652
1653 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1654 Marcin Kościelnicki <koriakin@0x04.net>
1655
1656 * tracepoint.c (struct tracepoint_action_ops): Remove.
1657 (struct tracepoint_action): Remove ops.
1658 (m_tracepoint_action_download, r_tracepoint_action_download)
1659 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1660 size and offset accordingly.
1661 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1662 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1663 (tracepoint_action_send, tracepoint_action_download): New functions.
1664 Helpers for trace action handlers.
1665 (add_tracepoint_action): Remove setup actions ops.
1666 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1667
1668 2016-02-10 Yao Qi <yao.qi@linaro.org>
1669
1670 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1671
1672 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1673
1674 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1675 to AC_OUTPUT.
1676 * configure: Regenerate.
1677
1678 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1681 void * to gdb_byte *.
1682 * linux-low.c (siginfo_fixup): Likewise.
1683 (linux_xfer_siginfo): Likewise.
1684 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1685 Likewise.
1686 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1687
1688 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1689
1690 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1691 to srv_tgtobj.
1692 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1693 to srv_tgtobj.
1694 * linux-x86-low.c [__x86_64__]: Include
1695 "nat/amd64-linux-siginfo.h".
1696 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1697 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1698 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1699 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1700 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1701 (cpt_si_fd, si_timerid, si_overrun): Move from
1702 nat/amd64-linux-siginfo.c.
1703 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1704
1705 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * server.c (skip_to_semicolon): Remove.
1708 (process_point_options): Use strchrnul instead of
1709 skip_to_semicolon.
1710
1711 2016-01-26 Yao Qi <yao.qi@linaro.org>
1712
1713 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1714 * linux-low.c (install_software_single_step_breakpoints): Don't
1715 call regcache_read_pc.
1716 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1717 argument pc.
1718
1719 2016-01-26 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-low.c (install_software_single_step_breakpoints): Call
1722 regcache_read_pc instead of get_pc.
1723
1724 2016-01-26 Yao Qi <yao.qi@linaro.org>
1725
1726 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1727 (unblock_async_io): Rename to ...
1728 (block_unblock_async_io): ... it. New function.
1729 (enable_async_io): Don't install SIGIO handler. Unblock it
1730 instead.
1731 (disable_async_io): Don't ignore SIGIO. Block it instead.
1732 (initialize_async_io): Install SIGIO handler. Don't call
1733 unblock_async_io.
1734
1735 2016-01-26 Yao Qi <yao.qi@linaro.org>
1736
1737 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1738 first character is '\003', call *the_target->request_interrupt.
1739
1740 2016-01-25 Yao Qi <yao.qi@linaro.org>
1741
1742 * remote-utils.c (new_thread_notify): Remove.
1743 (dead_thread_notify): Likewise.
1744 * remote-utils.h (new_thread_notify): Remove declaration.
1745 (dead_thread_notify): Likewise.
1746
1747 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1748
1749 * gdb.trace/pending.exp: Fix expected message on continue.
1750
1751 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1752
1753 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1754 it works properly on big-endian machines where sizeof (CORE_ADDR)
1755 != sizeof (void *).
1756
1757 2016-01-21 Pedro Alves <palves@redhat.com>
1758
1759 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1760 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1761 * configure: Regenerate.
1762
1763 2016-01-21 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1766 is_thumb and set it according to CPSR saved on the stack.
1767 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1768 arm_sigreturn_next_pc.
1769
1770 2016-01-18 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (linux_set_pc_64bit): New function.
1773 (linux_get_pc_64bit): New function.
1774 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1775 Declare.
1776 * linux-sparc-low.c (debug_threads): Remove declaration.
1777 (sparc_get_pc): Remove.
1778 (the_low_target): Use linux_get_pc_64bit instead of
1779 sparc_get_pc.
1780 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1781 (the_low_target): Use linux_get_pc_64bit and
1782 linux_set_pc_64bit.
1783
1784 2016-01-18 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-arm-low.c (debug_threads): Remove declaration.
1787 (arm_get_pc, arm_set_pc): Remove.
1788 (the_low_target): Use linux_get_pc_32bit and
1789 linux_set_pc_32bit.
1790 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1791 (the_low_target): Use linux_get_pc_32bit and
1792 linux_set_pc_32bit.
1793 * linux-cris-low.c (debug_threads): Remove declaration.
1794 (cris_get_pc, cris_set_pc,): Remove.
1795 (the_low_target): Use linux_get_pc_32bit and
1796 linux_set_pc_32bit.
1797 * linux-crisv32-low.c (debug_threads): Remove declaration.
1798 (cris_get_pc, cris_set_pc): Remove.
1799 (the_low_target): Use linux_get_pc_32bit and
1800 linux_set_pc_32bit.
1801 * linux-low.c: Include inttypes.h.
1802 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1803 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1804 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1805 (the_low_target): Use linux_get_pc_32bit and
1806 linux_set_pc_32bit.
1807 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1808 (the_low_target): Use linux_get_pc_32bit and
1809 linux_set_pc_32bit.
1810 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1811 (the_low_target): Use linux_get_pc_32bit and
1812 linux_set_pc_32bit.
1813 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1814 (the_low_target): Use linux_get_pc_32bit and
1815 linux_set_pc_32bit.
1816 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1817 (the_low_target): Use linux_get_pc_32bit and
1818 linux_set_pc_32bit.
1819
1820 2016-01-18 Gary Benson <gbenson@redhat.com>
1821
1822 * configure.ac (AC_FUNC_FORK): New check.
1823 * config.in: Regenerate.
1824 * configure: Likewise.
1825
1826 2016-01-14 Yao Qi <yao.qi@linaro.org>
1827
1828 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1829 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1830 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1831 arm_get_next_pcs_ctor.
1832
1833 2016-01-12 Josh Stone <jistone@redhat.com>
1834 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1835
1836 * inferiors.h: Include "gdb_vecs.h".
1837 (struct process_info): Add syscalls_to_catch.
1838 * inferiors.c (remove_process): Free syscalls_to_catch.
1839 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1840 syscall_return stops.
1841 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1842 * server.c (handle_general_set): Handle QCatchSyscalls.
1843 (handle_query): Report support for QCatchSyscalls.
1844 * target.h (struct target_ops): Add supports_catch_syscall.
1845 (target_supports_catch_syscall): New macro.
1846 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1847 (struct lwp_info): Add syscall_state.
1848 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1849 Maintain syscall_state and syscalls_to_catch across exec.
1850 (get_syscall_trapinfo): New function, proxy to the_low_target.
1851 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1852 (linux_low_filter_event): Toggle syscall_state entry/return for
1853 syscall traps, and set it ignored for all others.
1854 (gdb_catching_syscalls_p): New function.
1855 (gdb_catch_this_syscall_p): New function.
1856 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1857 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1858 (linux_supports_catch_syscall): New function.
1859 (linux_target_ops): Install it.
1860 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1861 (the_low_target): Install it.
1862
1863 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1864
1865 * acinclude.m4: Include new ../warning.m4 file.
1866 * configure: Regenerated.
1867 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1868
1869 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1870
1871 * ax.c (is_goto_target): Mark static.
1872 * linux-low.c (register_addr): Likewise.
1873 (linux_fetch_registers, linux_store_registers): Likewise.
1874 * mem-break.c (any_persistent_commands): Fix old prototype.
1875 (add_commands_to_breakpoint): Mark static.
1876 * regcache.c (find_register_by_name): Delete unused func.
1877 * remote-utils.c (hex_or_minus_one): Mark static.
1878 * server.c (monitor_show_help): Mark static.
1879 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1880 handle_v_requests): Likewise.
1881
1882 2016-01-12 Pedro Alves <palves@redhat.com>
1883
1884 Remove use of the registered trademark symbol throughout.
1885
1886 2016-01-08 Yao Qi <yao.qi@linaro.org>
1887
1888 * remote-utils.c (getpkt): If c is '\003', call target hook
1889 request_interrupt.
1890
1891 2016-01-06 Yao Qi <yao.qi@linaro.org>
1892
1893 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1894 linux-aarch32-low.c.
1895 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1896 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1897 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1898 (thumb2_breakpoint): Declare.
1899 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1900 linux-aarch32-low.h.
1901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1902 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1903 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1904
1905 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1906
1907 * gdbreplay.c (gdbreplay_version): Change copyright year in
1908 version message.
1909 * server.c (gdbserver_version): Likewise.
1910
1911 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1912
1913 * server.c (crc32_table): Delete.
1914 (crc32): Use libiberty's xcrc32 function.
1915
1916 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1917
1918 * lynx-low.c (lynx_delete_thread_callback): New function.
1919 (lynx_mourn): Properly delete our process and all of its
1920 threads. Remove call to clear_inferiors.
1921
1922 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1923
1924 * target.c (thread_search_callback): Add check that
1925 the thread_stopped target callback is not NULL before
1926 calling it.
1927
1928 2015-12-21 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1931 arm breakpoint.
1932
1933 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1934
1935 * server.c (handle_query): Call target_supports_software_single_step.
1936
1937 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1938
1939 * linux-low.c (single_step): New function.
1940 (linux_resume_one_lwp_throw): Call single_step.
1941 (start_step_over): Likewise.
1942
1943 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944
1945 * Makefile.in (SFILES): Append arch/arm-linux.c,
1946 arch/arm-get-next-pcs.c.
1947 (arm-linux.o): New rule.
1948 (arm-get-next-pcs.o): New rule.
1949 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1950 arm-linux.o.
1951 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1952 to linux-aarch32-low.c.
1953 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1954 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1955 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1956 (thumb2_breakpoint_len): Likewise.
1957 (arm_is_thumb_mode): Make non-static.
1958 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1959 from linux-aarch32-low.c.
1960 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1961 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1962 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1963 (thumb2_breakpoint_len): Likewise.
1964 (arm_is_thumb_mode): New declaration.
1965 * linux-arm-low.c: Include arch/arm-linux.h
1966 aarch/arm-get-next-pcs.h, sys/syscall.h.
1967 (get_next_pcs_ops): New struct.
1968 (get_next_pcs_addr_bits_remove): New function.
1969 (get_next_pcs_is_thumb): New function.
1970 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1971 (arm_sigreturn_next_pc): Likewise.
1972 (get_next_pcs_syscall_next_pc): Likewise.
1973 (arm_gdbserver_get_next_pcs): Likewise.
1974 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1975 Initialize.
1976 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1977 * server.h: Include gdb_vecs.h.
1978
1979 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1980
1981 * Makefile.in (SFILES): Append common/common-regcache.c.
1982 (OBS): Append common-regcache.o.
1983 (common-regcache.o): New rule.
1984 * regcache.c (init_register_cache): Initialize cache to
1985 REG_UNAVAILABLE.
1986 (regcache_raw_read_unsigned): New function.
1987 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1988 register_status enum.
1989
1990 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1991
1992 * linux-aarch64-low.c (the_low_targets): Rename
1993 breakpoint_reinsert_addr to get_next_pcs.
1994 * linux-arm-low.c (the_low_targets): Likewise.
1995 * linux-bfin-low.c (the_low_targets): Likewise.
1996 * linux-cris-low.c (the_low_targets): Likewise.
1997 * linux-crisv32-low.c (the_low_targets): Likewise.
1998 * linux-low.c (can_software_single_step): Likewise.
1999 (install_software_single_step_breakpoints): New function.
2000 (start_step_over): Use install_software_single_step_breakpoints.
2001 * linux-low.h: New CORE_ADDR vector.
2002 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2003 get_next_pcs.
2004 * linux-mips-low.c (the_low_targets): Likewise.
2005 * linux-nios2-low.c (the_low_targets): Likewise.
2006 * linux-sparc-low.c (the_low_targets): Likewise.
2007
2008 2015-12-17 Pedro Alves <palves@redhat.com>
2009
2010 * linux-low.c (linux_kill_one_lwp): Remove references to
2011 LinuxThreads.
2012 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2013 to 'kill'.
2014 (linux_init_signals): Delete.
2015 (initialize_low): Adjust.
2016 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2017
2018 2015-12-16 Pedro Alves <palves@redhat.com>
2019
2020 * configure.ac (compiler warning flags): When testing a
2021 -Wno-foo option, check whether -Wfoo works instead.
2022 * configure: Regenerate.
2023
2024 2015-12-11 Don Breazeal <donb@codesourcery.com>
2025
2026 * server.c (process_serial_event): Don't exit from gdbserver
2027 in remote mode if there are still active inferiors.
2028
2029 2015-12-11 Yao Qi <yao.qi@linaro.org>
2030
2031 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2032 arm_breakpoint_at if the process is 32-bit.
2033
2034 2015-12-11 Yao Qi <yao.qi@linaro.org>
2035
2036 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2037 arm breakpoint.
2038
2039 2015-12-07 Yao Qi <yao.qi@linaro.org>
2040
2041 * configure.srv: Append arm.o to srv_tgtobj for
2042 aarch64*-*-linux* target.
2043 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2044 from linux-arm-low.c.
2045 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2046 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2047 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2048 (thumb2_breakpoint_len): Likewise.
2049 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2050 (arm_breakpoint_kinds): Likewise.
2051 (arm_breakpoint_kind_from_pc): Likewise.
2052 (arm_sw_breakpoint_from_kind): Likewise.
2053 (arm_breakpoint_kind_from_current_state): Likewise.
2054 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2055 (arm_sw_breakpoint_from_kind): Declare.
2056 (arm_breakpoint_kind_from_current_state): Declare.
2057 (arm_breakpoint_at): Declare.
2058 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2059 arm_sw_breakpoint_from_kind if process is 32-bit.
2060 (aarch64_breakpoint_kind_from_pc): New function.
2061 (aarch64_breakpoint_kind_from_current_state): New function.
2062 (the_low_target): Initialize fields breakpoint_kind_from_pc
2063 and breakpoint_kind_from_current_state.
2064 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2065 linux-aarch32-low.c.
2066 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2067 (arm_breakpoint, arm_breakpoint_len): Likewise.
2068 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2069 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2070 (arm_is_thumb_mode): Likewise.
2071 (arm_breakpoint_at): Likewise.
2072 (arm_breakpoint_kind_from_pc): Likewise.
2073 (arm_sw_breakpoint_from_kind): Likewise.
2074 (arm_breakpoint_kind_from_current_state): Likewise.
2075
2076 Revert:
2077 2015-08-04 Yao Qi <yao.qi@linaro.org>
2078
2079 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2080 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2081 * server.c (extended_protocol): Remove "static".
2082 * server.h (extended_protocol): Declare it.
2083
2084 2015-12-04 Josh Stone <jistone@redhat.com>
2085
2086 * target.h (struct target_ops) <arch_setup>: Rename to ...
2087 (struct target_ops) <post_create_inferior>: ... this.
2088 (target_arch_setup): Rename to ...
2089 (target_post_create_inferior): ... this, calling post_create_inferior.
2090 * server.c (start_inferior): Update target_arch_setup calls to
2091 target_post_create_inferior.
2092 * linux-low.c (linux_low_ptrace_options): Forward declare.
2093 (linux_arch_setup): Update its comment for general use.
2094 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2095 (struct linux_target_ops): Use linux_post_create_inferior.
2096 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2097 to post_create_inferior.
2098 * nto-low.c (struct nto_target_ops): Likewise.
2099 * spu-low.c (struct spu_target_ops): Likewise.
2100 * win32-low.c (struct win32_target_ops): Likewise.
2101
2102 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2103
2104 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2105
2106 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2107
2108 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2109 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2110 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2111 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2112 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2113 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2114 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2116 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2118 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2119 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2120
2121 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2122
2123 * linux-low.c (linux_look_up_symbols): Don't call
2124 linux_supports_traceclone.
2125 * linux-low.h (thread_db_init): Remove use_events argument.
2126 * thread-db.c (thread_db_use_event): Remove global variable.
2127 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2128 (struct thread_db) <td_create_bp>: Remove field.
2129 (thread_db_create_event): Remove function.
2130 (thread_db_enable_reporting): Likewise.
2131 (find_one_thread): Don't check for thread_db_use_events.
2132 (attach_thread): Likewise.
2133 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2134 (try_thread_db_load_1): Don't check for thread_db_use_events.
2135 (thread_db_init): Remove use_events argument and thread events
2136 handling.
2137 (remove_thread_event_breakpoints): Remove function.
2138 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2139
2140 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2141
2142 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2143 New function.
2144 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2145 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2146 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2147 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2148 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2149 Initialize.
2150 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2151 New function.
2152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2153 * linux-low.c (can_hardware_single_step): Use
2154 supports_hardware_single_step.
2155 (can_software_single_step): New function.
2156 (start_step_over): Call can_software_single_step.
2157 (linux_supports_hardware_single_step): New function.
2158 (struct target_ops) <supports_software_single_step>: Initialize.
2159 * linux-low.h (struct linux_target_ops)
2160 <supports_hardware_single_step>: Initialize.
2161 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2163 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2164 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2165 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2167 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2168 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2169 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2170 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2171 Initialize.
2172 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2173 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2174 Initialize.
2175 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2177 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2178 New function.
2179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2180 * target.h (struct target_ops): <supports_software_single_step>:
2181 New field.
2182 (target_supports_software_single_step): New macro.
2183
2184 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2185
2186 * linux-low.c (linux_wait_1): Fix pc advance condition.
2187 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2188 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2189
2190 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2191
2192 * linux-arm-low.c (arm_is_thumb_mode): New function.
2193 (arm_breakpoint_at): Use arm_is_thumb_mode.
2194 (arm_breakpoint_kind_from_current_state): New function.
2195 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2196 Initialize.
2197 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2198 (linux_breakpoint_kind_from_current_state): New function.
2199 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2200 * linux-low.h (struct linux_target_ops)
2201 <breakpoint_kind_from_current_state>: New field.
2202 * target.h (struct target_ops): Likewise.
2203 (target_breakpoint_kind_from_current_state): New macro.
2204
2205 2015-11-30 Pedro Alves <palves@redhat.com>
2206
2207 * linux-low.c (linux_resume): Wake up the event loop before
2208 returning.
2209
2210 2015-11-30 Pedro Alves <palves@redhat.com>
2211
2212 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2213 check.
2214 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2215 to -1.
2216 * target.c (struct thread_search): New structure.
2217 (thread_search_callback): New function.
2218 (prev_general_thread): New global.
2219 (prepare_to_access_memory, done_accessing_memory): New functions.
2220 * target.h (prepare_to_access_memory, done_accessing_memory):
2221 Replace macros with function declarations.
2222
2223 2015-11-30 Pedro Alves <palves@redhat.com>
2224
2225 PR 14618
2226 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2227 report TARGET_WAITKIND_NO_RESUMED.
2228 * remote-utils.c (prepare_resume_reply): Handle
2229 TARGET_WAITKIND_NO_RESUMED.
2230 * server.c (report_no_resumed): New global.
2231 (handle_query) <qSupported>: Handle "no-resumed+". Report
2232 "no-resumed+" support.
2233 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2234 return error if the client doesn't support no-resumed events.
2235 (push_stop_notification): New function.
2236 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2237 events if the client supports them.
2238
2239 2015-11-30 Pedro Alves <palves@redhat.com>
2240
2241 * linux-low.c (thread_still_has_status_pending_p): Don't check
2242 vCont;t here.
2243 (lwp_resumed): New function.
2244 (status_pending_p_callback): Return early if the LWP is not
2245 supposed to be resumed.
2246
2247 2015-11-30 Pedro Alves <palves@redhat.com>
2248
2249 * linux-low.c (handle_extended_wait): Assert that the LWP's
2250 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2251 thread create events, leave the new child's status pending.
2252 (linux_low_filter_event): If GDB wants to hear about thread exit
2253 events, leave the LWP marked dead and don't delete it.
2254 (linux_wait_for_event_filtered): Don't check for thread exit.
2255 (filter_exit_event): New function.
2256 (linux_wait_1): Use it, when returning an exit event.
2257 (linux_resume_one_lwp_throw): Assert that the LWP's
2258 waitstatus is TARGET_WAITKIND_IGNORE.
2259 * remote-utils.c (prepare_resume_reply): Handle
2260 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2261 * server.c (report_thread_events): New global.
2262 (handle_general_set): Handle QThreadEvents.
2263 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2264 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2265 TARGET_WAITKIND_THREAD_EXITED.
2266 * server.h (report_thread_events): Declare.
2267
2268 2015-11-30 Pedro Alves <palves@redhat.com>
2269
2270 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2271 the thread's last_resume_kind was resume_stop.
2272
2273 2015-11-30 Pedro Alves <palves@redhat.com>
2274
2275 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2276 before returning.
2277
2278 2015-11-30 Pedro Alves <palves@redhat.com>
2279
2280 * server.c (handle_v_requests): Handle vCtrlC.
2281
2282 2015-11-30 Pedro Alves <palves@redhat.com>
2283
2284 * gdbthread.h (find_any_thread_of_pid): Declare.
2285 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2286 functions.
2287 * server.c (handle_query): If current_thread is NULL, look for
2288 another thread of the selected process.
2289
2290 2015-11-26 Daniel Colascione <dancol@dancol.org>
2291 Simon Marchi <simon.marchi@ericsson.com>
2292
2293 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2294 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2295 name in reply.
2296 * target.h (struct target_ops) <thread_name>: New field.
2297 (target_thread_name): New macro.
2298
2299 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2300
2301 * regcache.h (regcache_invalidate_pid): Add declaration.
2302 * regcache.c (regcache_invalidate_pid): New function, extracted
2303 from regcache_invalidate.
2304 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2305 Add trivial documentation comment.
2306 * lynx-low.c: Use regcache_invalidate_pid instead of
2307 regcache_invalidate.
2308
2309 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2310
2311 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2312 and Elf64_auxv_t if the target is Android.
2313
2314 2015-11-22 Doug Evans <xdje42@gmail.com>
2315
2316 * target.h: #include <sys/types.h>.
2317
2318 2015-11-19 Pedro Alves <palves@redhat.com>
2319
2320 * linux-low.c (linux_process_qsupported): Change prototype.
2321 Adjust.
2322 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2323 Change prototype.
2324 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2325 and adjust to loop over all features.
2326 * server.c (handle_query) <qSupported>: Adjust to call
2327 target_process_qsupported once, passing it a vector of unprocessed
2328 features.
2329 * target.h (struct target_ops) <process_qsupported>: Change
2330 prototype.
2331 (target_process_qsupported): Adjust.
2332
2333 2015-11-19 Pedro Alves <palves@redhat.com>
2334
2335 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2336 mode.
2337 * configure: Regenerate.
2338
2339 2015-11-19 Pedro Alves <palves@redhat.com>
2340
2341 * configure: Regenerate.
2342
2343 2015-11-19 Yao Qi <yao.qi@linaro.org>
2344
2345 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2346 type to uint32_t.
2347
2348 2015-11-19 Yao Qi <yao.qi@linaro.org>
2349
2350 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2351 (struct aarch64_operand): Move enum out.
2352
2353 2015-11-19 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2356 struct user_fpsimd_state *.
2357 (aarch64_store_fpregset): Likewise.
2358
2359 2015-11-19 Yao Qi <yao.qi@linaro.org>
2360
2361 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2362 struct user_pt_regs *.
2363 (aarch64_store_gregset): Likewise.
2364
2365 2015-11-18 Pedro Alves <palves@redhat.com>
2366
2367 * Makefile.in (all_object_files): Add $IPA_OBJS.
2368
2369 2015-11-17 Pedro Alves <palves@redhat.com>
2370
2371 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2372 GDB_SIGNAL_0 and gdb_signal_to_string.
2373
2374 2015-11-17 Pedro Alves <palves@redhat.com>
2375
2376 * win32-low.c (handle_output_debug_string): Remove parameter.
2377 (win32_kill): Remove our_status local and adjust call to
2378 handle_output_debug_string.
2379 (get_child_debug_event): Adjust call to
2380 handle_output_debug_string.
2381
2382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2383
2384 * linux-mips-low.c (mips_fill_gregset): Add cast.
2385 (mips_store_gregset): Likewise.
2386 (mips_fill_fpregset): Likewise.
2387 (mips_store_fpregset): Likewise.
2388
2389 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2390
2391 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2392 priv.
2393
2394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2395
2396 * linux-mips-low.c (mips_linux_new_thread): Change type of
2397 watch_type to enum target_hw_bp_type.
2398
2399 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2402 Change return type to arm_hwbp_type.
2403
2404 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2405
2406 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2407 (arm_store_gregset): Likewise.
2408 * linux-arm-low.c (arm_get_hwcap): Likewise.
2409 (arm_read_description): Likewise.
2410
2411 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2412
2413 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2414
2415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2416
2417 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2418 (ppc_fill_vsxregset): Likewise.
2419 (ppc_store_vsxregset): Likewise.
2420 (ppc_fill_vrregset): Likewise.
2421 (ppc_store_vrregset): Likewise.
2422 (ppc_fill_evrregset): Likewise.
2423 (ppc_store_evrregset): Likewise.
2424
2425 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2426
2427 * linux-ppc-low.c (ppc_usrregs_info): Remove
2428 forward-declaration.
2429 (ppc_arch_setup): Move lower in file.
2430
2431 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2434 (ps_pdwrite): Likewise.
2435
2436 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2437
2438 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2439 to after assert checks.
2440
2441 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2442
2443 * proc-service.c (ps_pdread): Add/adjust casts.
2444 (ps_pdwrite): Add/adjust casts.
2445
2446 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2447
2448 * server.c (handle_search_memory_1): Cast return value of
2449 memmem.
2450
2451 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2452
2453 * server.c (write_qxfer_response): Change type of data to
2454 gdb_byte *.
2455
2456 2015-10-29 Pedro Alves <palves@redhat.com>
2457
2458 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2459
2460 2015-10-29 Pedro Alves <palves@redhat.com>
2461
2462 * tracepoint.c (clear_installed_tracepoints): Add casts.
2463
2464 2015-10-29 Pedro Alves <palves@redhat.com>
2465
2466 * server.c (handle_v_cont, process_serial_event): Add enum
2467 gdb_signal casts to signal parsing code.
2468
2469 2015-10-29 Pedro Alves <palves@redhat.com>
2470
2471 * linux-low.h (NULL_REGSET): Define.
2472 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2473 * linux-arm-low.c (arm_regsets): Likewise.
2474 * linux-crisv32-low.c (cris_regsets): Likewise.
2475 * linux-m68k-low.c (m68k_regsets): Likewise.
2476 * linux-mips-low.c (mips_regsets): Likewise.
2477 * linux-nios2-low.c (nios2_regsets): Likewise.
2478 * linux-ppc-low.c (ppc_regsets): Likewise.
2479 * linux-s390-low.c (s390_regsets): Likewise.
2480 * linux-sh-low.c (sh_regsets): Likewise.
2481 * linux-sparc-low.c (sparc_regsets): Likewise.
2482 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2483 * linux-tile-low.c (tile_regsets): Likewise.
2484 * linux-x86-low.c (x86_regsets): Likewise.
2485 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2486
2487 2015-10-29 Pedro Alves <palves@redhat.com>
2488
2489 * linux-low.h (NULL_REGSET): Define.
2490 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2491 * linux-arm-low.c (arm_regsets): Likewise.
2492 * linux-crisv32-low.c (cris_regsets): Likewise.
2493 * linux-m68k-low.c (m68k_regsets): Likewise.
2494 * linux-mips-low.c (mips_regsets): Likewise.
2495 * linux-nios2-low.c (nios2_regsets): Likewise.
2496 * linux-ppc-low.c (ppc_regsets): Likewise.
2497 * linux-s390-low.c (s390_regsets): Likewise.
2498 * linux-sh-low.c (sh_regsets): Likewise.
2499 * linux-sparc-low.c (sparc_regsets): Likewise.
2500 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2501 * linux-tile-low.c (tile_regsets): Likewise.
2502 * linux-x86-low.c (x86_regsets): Likewise.
2503 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2504
2505 2015-10-26 Doug Evans <dje@google.com>
2506
2507 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2508
2509 2015-10-26 Doug Evans <dje@google.com>
2510
2511 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2512
2513 2015-10-26 Doug Evans <dje@google.com>
2514
2515 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2516 for debug_printf.
2517 (attach_thread, find_new_threads_callback): Ditto.
2518
2519 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2520
2521 * mem-break.h (set_breakpoint_data): Remove.
2522
2523 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2524
2525 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2526 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2527 (initialize_low): Remove set_breakpoint_data call.
2528 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2529 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2530 (initialize_low): Remove set_breakpoint_data call.
2531 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2532 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2533 (initialize_low): Remove set_breakpoint_data call.
2534
2535 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2536
2537 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2538 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2539 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2540 * target.h (target_breakpoint_kind_from_pc): New macro.
2541
2542 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2543
2544 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2545 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2546 the default breakpoint kind.
2547
2548 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2549
2550 * linux-arm-low.c (arm_supports_z_point_type): Add software
2551 breakpoint support.
2552
2553 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2554
2555 * linux-arm-low.c: Refactor breakpoint definitions.
2556 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2557 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2558
2559 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2560
2561 * Makefile.in: Add arm.c/o.
2562 * configure.srv: Likewise.
2563 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2564 (arm_breakpoint_kind_from_pc): New function.
2565 (arm_sw_breakpoint_from_kind): Return proper kind.
2566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2567
2568 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2569
2570 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2571 removal.
2572 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2573 (struct raw_breakpoint) <size>: Remove.
2574 (struct raw_breakpoint) <kind>: Add.
2575 (bp_size): New function.
2576 (bp_opcode): Likewise.
2577 (find_raw_breakpoint_at): Adjust for kind.
2578 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2579 (remove_memory_breakpoint): Adjust for kind call bp_size.
2580 (set_raw_breakpoint_at): Adjust for kind.
2581 (set_breakpoint): Likewise.
2582 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2583 (delete_raw_breakpoint): Adjust for kind.
2584 (delete_breakpoint): Likewise.
2585 (find_gdb_breakpoint): Likewise.
2586 (set_gdb_breakpoint_1): Likewise.
2587 (set_gdb_breakpoint): Likewise.
2588 (delete_gdb_breakpoint_1): Likewise.
2589 (delete_gdb_breakpoint): Likewise.
2590 (uninsert_raw_breakpoint): Likewise.
2591 (reinsert_raw_breakpoint): Likewise.
2592 (set_breakpoint_data): Remove.
2593 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2594 (check_mem_read): Adjust for kind call bp_size.
2595 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2596 (clone_one_breakpoint): Adjust for kind.
2597 * mem-break.h (set_gdb_breakpoint): Likewise.
2598 (delete_gdb_breakpoint): Likewise.
2599 * server.c (process_serial_event): Likewise.
2600
2601 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2602
2603 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2604 (struct linux_target_ops) <breakpoint>: Remove.
2605 (struct linux_target_ops) <breakpoint_len>: Remove.
2606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2608 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2609 (arm_sw_breakpoint_from_kind): New function.
2610 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2616 (struct linux_target_ops) <breakpoint>: Remove.
2617 (struct linux_target_ops) <breakpoint_len>: Remove.
2618 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2619 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2620 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2621 (struct linux_target_ops) <breakpoint>: Remove.
2622 (struct linux_target_ops) <breakpoint_len>: Remove.
2623 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2625 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2626 and sw_breakpoint_from_kind to increment the pc.
2627 (linux_breakpoint_kind_from_pc): New function.
2628 (linux_sw_breakpoint_from_kind): New function.
2629 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2630 (initialize_low): Call breakpoint_kind_from_pc and
2631 sw_breakpoint_from_kind to replace breakpoint_data/len.
2632 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2633 New field.
2634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2635 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2671 (struct linux_target_ops) <breakpoint>: Remove.
2672 (struct linux_target_ops) <breakpoint_len>: Remove.
2673 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2674 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2675 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2676 (struct linux_target_ops) <breakpoint>: Remove.
2677 (struct linux_target_ops) <breakpoint_len>: Remove.
2678 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2679 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2680 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2681 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2682 (struct linux_target_ops) <breakpoint>: Remove.
2683 (struct linux_target_ops) <breakpoint_len>: Remove.
2684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2686 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2687 (struct linux_target_ops) <breakpoint>: Remove.
2688 (struct linux_target_ops) <breakpoint_len>: Remove.
2689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2690 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2691
2692 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2693
2694 * linux-cris-low.c (cris_get_pc): Remove void arg.
2695
2696 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2697
2698 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2699 variable name.
2700
2701 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2702
2703 * inferiors.c (thread_pid_matches_callback): New function.
2704 (find_thread_process): New function.
2705 (remove_thread): Reset current_thread.
2706 (remove_process): Assert threads have been removed first.
2707
2708 2015-10-15 Yao Qi <yao.qi@linaro.org>
2709
2710 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2711 if it is 3.
2712 (aarch64_remove_point): Likewise.
2713 * regcache.c (regcache_register_size): New function.
2714
2715 2015-10-12 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-aarch64-low.c: Update all callers as emit_load_store
2718 is renamed to aarch64_emit_load_store.
2719
2720 2015-10-12 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-aarch64-low.c: Update all callers of function renaming
2723 from emit_insn to aarch64_emit_insn.
2724
2725 2015-10-12 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2728 arch/aarch64-insn.h.
2729 (struct aarch64_memory_operand): Likewise.
2730 (ENCODE): Likewise.
2731 (emit_insn): Move to arch/aarch64-insn.c.
2732 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2733 (emit_load_store): Move to arch/aarch64-insn.c.
2734 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2735 (can_encode_int32): Remove.
2736
2737 2015-10-12 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2740 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2741 (aarch64_relocate_instruction): Likewise.
2742 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2743 (struct aarch64_insn_visitor): Likewise.
2744
2745 2015-10-12 Yao Qi <yao.qi@linaro.org>
2746
2747 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2748 (struct aarch64_insn_visitor): New.
2749 (struct aarch64_insn_relocation_data): New.
2750 (aarch64_ftrace_insn_reloc_b): New function.
2751 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2752 (aarch64_ftrace_insn_reloc_cb): Likewise.
2753 (aarch64_ftrace_insn_reloc_tb): Likewise.
2754 (aarch64_ftrace_insn_reloc_adr): Likewise.
2755 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2756 (aarch64_ftrace_insn_reloc_others): Likewise.
2757 (visitor): New.
2758 (aarch64_relocate_instruction): Use visitor.
2759
2760 2015-10-12 Yao Qi <yao.qi@linaro.org>
2761
2762 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2763 int. Add argument buf.
2764 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2765 aarch64_relocate_instruction.
2766
2767 2015-10-12 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2770 argument insn. Remove local variable insn. Don't call
2771 target_read_uint32.
2772 (aarch64_install_fast_tracepoint_jump_pad): Call
2773 target_read_uint32.
2774
2775 2015-09-30 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2778 (emit_load_store_pair): Likewise.
2779
2780 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2781
2782 * dll.c (match_dll): Add cast(s).
2783 (unloaded_dll): Likewise.
2784 * linux-low.c (second_thread_of_pid_p): Likewise.
2785 (delete_lwp_callback): Likewise.
2786 (count_events_callback): Likewise.
2787 (select_event_lwp_callback): Likewise.
2788 (linux_set_resume_request): Likewise.
2789 * server.c (accumulate_file_name_length): Likewise.
2790 (emit_dll_description): Likewise.
2791 (handle_qxfer_threads_worker): Likewise.
2792 (visit_actioned_threads): Likewise.
2793 * thread-db.c (any_thread_of): Likewise.
2794 * tracepoint.c (same_process_p): Likewise.
2795 (match_blocktype): Likewise.
2796 (build_traceframe_info_xml): Likewise.
2797
2798 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2799
2800 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2801 assignment.
2802 (gdb_unparse_agent_expr): Likewise.
2803 * hostio.c (require_data): Likewise.
2804 (handle_pread): Likewise.
2805 * linux-low.c (disable_regset): Likewise.
2806 (fetch_register): Likewise.
2807 (store_register): Likewise.
2808 (get_dynamic): Likewise.
2809 (linux_qxfer_libraries_svr4): Likewise.
2810 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2811 (set_fast_tracepoint_jump): Likewise.
2812 (uninsert_fast_tracepoint_jumps_at): Likewise.
2813 (reinsert_fast_tracepoint_jumps_at): Likewise.
2814 (validate_inserted_breakpoint): Likewise.
2815 (clone_agent_expr): Likewise.
2816 * regcache.c (init_register_cache): Likewise.
2817 * remote-utils.c (putpkt_binary_1): Likewise.
2818 (decode_M_packet): Likewise.
2819 (decode_X_packet): Likewise.
2820 (look_up_one_symbol): Likewise.
2821 (relocate_instruction): Likewise.
2822 (monitor_output): Likewise.
2823 * server.c (handle_search_memory): Likewise.
2824 (handle_qxfer_exec_file): Likewise.
2825 (handle_qxfer_libraries): Likewise.
2826 (handle_qxfer): Likewise.
2827 (handle_query): Likewise.
2828 (handle_v_cont): Likewise.
2829 (handle_v_run): Likewise.
2830 (captured_main): Likewise.
2831 * target.c (write_inferior_memory): Likewise.
2832 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2833 * tracepoint.c (init_trace_buffer): Likewise.
2834 (add_tracepoint_action): Likewise.
2835 (add_traceframe): Likewise.
2836 (add_traceframe_block): Likewise.
2837 (cmd_qtdpsrc): Likewise.
2838 (cmd_qtdv): Likewise.
2839 (cmd_qtstatus): Likewise.
2840 (response_source): Likewise.
2841 (response_tsv): Likewise.
2842 (cmd_qtnotes): Likewise.
2843 (gdb_collect): Likewise.
2844 (initialize_tracepoint): Likewise.
2845
2846 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2847
2848 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2849 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2850 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2851 <NOP>: New.
2852 (enum aarch64_condition_codes): New enum.
2853 (w0): New static global.
2854 (fp): Likewise.
2855 (lr): Likewise.
2856 (struct aarch64_memory_operand) <type>: New
2857 MEMORY_OPERAND_POSTINDEX type.
2858 (postindex_memory_operand): New helper function.
2859 (emit_ret): New function.
2860 (emit_load_store_pair): New function, factored out of emit_stp
2861 with support for MEMORY_OPERAND_POSTINDEX.
2862 (emit_stp): Rewrite using emit_load_store_pair.
2863 (emit_ldp): New function.
2864 (emit_load_store): Likewise.
2865 (emit_ldr): Mention post-index instruction in comment.
2866 (emit_ldrh): New function.
2867 (emit_ldrb): New function.
2868 (emit_ldrsw): Mention post-index instruction in comment.
2869 (emit_str): Likewise.
2870 (emit_subs): New function.
2871 (emit_cmp): Likewise.
2872 (emit_and): Likewise.
2873 (emit_orr): Likewise.
2874 (emit_orn): Likewise.
2875 (emit_eor): Likewise.
2876 (emit_mvn): Likewise.
2877 (emit_lslv): Likewise.
2878 (emit_lsrv): Likewise.
2879 (emit_asrv): Likewise.
2880 (emit_mul): Likewise.
2881 (emit_sbfm): Likewise.
2882 (emit_sbfx): Likewise.
2883 (emit_ubfm): Likewise.
2884 (emit_ubfx): Likewise.
2885 (emit_csinc): Likewise.
2886 (emit_cset): Likewise.
2887 (emit_nop): Likewise.
2888 (emit_ops_insns): New helper function.
2889 (emit_pop): Likewise.
2890 (emit_push): Likewise.
2891 (aarch64_emit_prologue): New function.
2892 (aarch64_emit_epilogue): Likewise.
2893 (aarch64_emit_add): Likewise.
2894 (aarch64_emit_sub): Likewise.
2895 (aarch64_emit_mul): Likewise.
2896 (aarch64_emit_lsh): Likewise.
2897 (aarch64_emit_rsh_signed): Likewise.
2898 (aarch64_emit_rsh_unsigned): Likewise.
2899 (aarch64_emit_ext): Likewise.
2900 (aarch64_emit_log_not): Likewise.
2901 (aarch64_emit_bit_and): Likewise.
2902 (aarch64_emit_bit_or): Likewise.
2903 (aarch64_emit_bit_xor): Likewise.
2904 (aarch64_emit_bit_not): Likewise.
2905 (aarch64_emit_equal): Likewise.
2906 (aarch64_emit_less_signed): Likewise.
2907 (aarch64_emit_less_unsigned): Likewise.
2908 (aarch64_emit_ref): Likewise.
2909 (aarch64_emit_if_goto): Likewise.
2910 (aarch64_emit_goto): Likewise.
2911 (aarch64_write_goto_address): Likewise.
2912 (aarch64_emit_const): Likewise.
2913 (aarch64_emit_call): Likewise.
2914 (aarch64_emit_reg): Likewise.
2915 (aarch64_emit_pop): Likewise.
2916 (aarch64_emit_stack_flush): Likewise.
2917 (aarch64_emit_zero_ext): Likewise.
2918 (aarch64_emit_swap): Likewise.
2919 (aarch64_emit_stack_adjust): Likewise.
2920 (aarch64_emit_int_call_1): Likewise.
2921 (aarch64_emit_void_call_2): Likewise.
2922 (aarch64_emit_eq_goto): Likewise.
2923 (aarch64_emit_ne_goto): Likewise.
2924 (aarch64_emit_lt_goto): Likewise.
2925 (aarch64_emit_le_goto): Likewise.
2926 (aarch64_emit_gt_goto): Likewise.
2927 (aarch64_emit_ge_got): Likewise.
2928 (aarch64_emit_ops_impl): New static global variable.
2929 (aarch64_emit_ops): New target function, return
2930 &aarch64_emit_ops_impl.
2931 (struct linux_target_ops): Install it.
2932
2933 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2934
2935 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2936 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2937 aarch64-ipa.o.
2938 * linux-aarch64-ipa.c: New file.
2939 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2940 and endian.h.
2941 (aarch64_get_thread_area): New target method.
2942 (extract_signed_bitfield): New helper function.
2943 (aarch64_decode_ldr_literal): New function.
2944 (enum aarch64_opcodes): New enum.
2945 (struct aarch64_register): New struct.
2946 (struct aarch64_operand): New struct.
2947 (x0): New static global.
2948 (x1): Likewise.
2949 (x2): Likewise.
2950 (x3): Likewise.
2951 (x4): Likewise.
2952 (w2): Likewise.
2953 (ip0): Likewise.
2954 (sp): Likewise.
2955 (xzr): Likewise.
2956 (aarch64_register): New helper function.
2957 (register_operand): Likewise.
2958 (immediate_operand): Likewise.
2959 (struct aarch64_memory_operand): New struct.
2960 (offset_memory_operand): New helper function.
2961 (preindex_memory_operand): Likewise.
2962 (enum aarch64_system_control_registers): New enum.
2963 (ENCODE): New macro.
2964 (emit_insn): New helper function.
2965 (emit_b): New function.
2966 (emit_bcond): Likewise.
2967 (emit_cb): Likewise.
2968 (emit_tb): Likewise.
2969 (emit_blr): Likewise.
2970 (emit_stp): Likewise.
2971 (emit_ldp_q_offset): Likewise.
2972 (emit_stp_q_offset): Likewise.
2973 (emit_load_store): Likewise.
2974 (emit_ldr): Likewise.
2975 (emit_ldrsw): Likewise.
2976 (emit_str): Likewise.
2977 (emit_ldaxr): Likewise.
2978 (emit_stxr): Likewise.
2979 (emit_stlr): Likewise.
2980 (emit_data_processing_reg): Likewise.
2981 (emit_data_processing): Likewise.
2982 (emit_add): Likewise.
2983 (emit_sub): Likewise.
2984 (emit_mov): Likewise.
2985 (emit_movk): Likewise.
2986 (emit_mov_addr): Likewise.
2987 (emit_mrs): Likewise.
2988 (emit_msr): Likewise.
2989 (emit_sevl): Likewise.
2990 (emit_wfe): Likewise.
2991 (append_insns): Likewise.
2992 (can_encode_int32_in): New helper function.
2993 (aarch64_relocate_instruction): New function.
2994 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2995 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2996 (struct linux_target_ops): Install aarch64_get_thread_area,
2997 aarch64_install_fast_tracepoint_jump_pad and
2998 aarch64_get_min_fast_tracepoint_insn_len.
2999
3000 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3001
3002 * Makefile.in (aarch64-insn.o): New rule.
3003 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3004
3005 2015-09-21 Yao Qi <yao.qi@linaro.org>
3006
3007 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3008
3009 2015-09-21 Yao Qi <yao.qi@linaro.org>
3010
3011 * tracepoint.c (max_jump_pad_size): Remove.
3012
3013 2015-09-18 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-aarch64-low.c: Don't include sys/uio.h.
3016 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3017
3018 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3019
3020 * tracepoint.c (eval_result_type): Change prototype.
3021 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3022
3023 2015-09-15 Pedro Alves <palves@redhat.com>
3024
3025 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3026 Check whether to report exec events instead of checking whether
3027 multiprocess is enabled.
3028
3029 2015-09-15 Pedro Alves <palves@redhat.com>
3030
3031 PR remote/18965
3032 * remote-utils.c (prepare_resume_reply): Merge
3033 TARGET_WAITKIND_VFORK_DONE switch case with the
3034 TARGET_WAITKIND_FORKED case.
3035
3036 2015-09-15 Yao Qi <yao.qi@linaro.org>
3037
3038 * server.c (handle_query): Check string comparison using
3039 "else if" instead of "if".
3040
3041 2015-09-15 Yao Qi <yao.qi@linaro.org>
3042
3043 * server.c (vCont_supported): New global variable.
3044 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3045 matches. Append ";vContSupported+" to own_buf.
3046 (handle_v_requests): Append ";s;S" to own_buf if target supports
3047 hardware single step or vCont_supported is false.
3048 (capture_main): Set vCont_supported to zero.
3049
3050 2015-09-15 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3053 it to ...
3054 (linux_supports_hardware_single_step): ... New function.
3055 (linux_target_ops): Update.
3056 * lynx-low.c (lynx_target_ops): Set field
3057 supports_hardware_single_step to target_can_do_hardware_single_step.
3058 * nto-low.c (nto_target_ops): Likewise.
3059 * spu-low.c (spu_target_ops): Likewise.
3060 * win32-low.c (win32_target_ops): Likewise.
3061 * target.c (target_can_do_hardware_single_step): New function.
3062 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3063 Remove. <supports_hardware_single_step>: New field.
3064 (target_supports_conditional_breakpoints): Remove.
3065 (target_supports_hardware_single_step): New macro.
3066 (target_can_do_hardware_single_step): Declare.
3067 * server.c (handle_query): Use target_supports_hardware_single_step
3068 instead of target_supports_conditional_breakpoints.
3069
3070 2015-09-15 Yao Qi <yao.qi@linaro.org>
3071
3072 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3073 function.
3074 (struct linux_target_ops the_low_target): Install
3075 aarch64_linux_siginfo_fixup.
3076
3077 2015-09-11 Don Breazeal <donb@codesourcery.com>
3078 Luis Machado <lgustavo@codesourcery.com>
3079
3080 * linux-low.c (linux_mourn): Static declaration.
3081 (linux_arch_setup): Move in front of
3082 handle_extended_wait.
3083 (linux_arch_setup_thread): New function.
3084 (handle_extended_wait): Handle exec events. Call
3085 linux_arch_setup_thread. Make event_lwp argument a
3086 pointer-to-a-pointer.
3087 (check_zombie_leaders): Do not check stopped threads.
3088 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3089 (linux_low_filter_event): Add lwp and thread for exec'ing
3090 non-leader thread if leader thread has been deleted.
3091 Refactor code into linux_arch_setup_thread and call it.
3092 Pass child lwp pointer by reference to handle_extended_wait.
3093 (linux_wait_for_event_filtered): Update comment.
3094 (linux_wait_1): Prevent clobbering exec event status.
3095 (linux_supports_exec_events): New function.
3096 (linux_target_ops) <supports_exec_events>: Initialize new member.
3097 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3098 new member.
3099 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3100 * server.c (report_exec_events): New global variable.
3101 (handle_query): Handle qSupported query for exec-events feature.
3102 (captured_main): Initialize report_exec_events.
3103 * server.h (report_exec_events): Declare new global variable.
3104 * target.h (struct target_ops) <supports_exec_events>: New
3105 member.
3106 (target_supports_exec_events): New macro.
3107 * win32-low.c (win32_target_ops) <supports_exec_events>:
3108 Initialize new member.
3109
3110 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3111
3112 * linux-low.c (linux_low_enable_btrace): Remove.
3113 (linux_target_ops): Replace linux_low_enable_btrace with
3114 linux_enable_btrace.
3115
3116 2015-09-03 Yao Qi <yao.qi@linaro.org>
3117
3118 * linux-aarch64-low.c (aarch64_insert_point): Call
3119 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3120 returns true.
3121
3122 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3123
3124 * linux-low.c (check_stopped_by_breakpoint): Use
3125 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3126
3127 2015-08-27 Pedro Alves <palves@redhat.com>
3128
3129 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3130
3131 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3132
3133 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3134 the XNEW-family equivalent.
3135 (compile_bytecodes): Likewise.
3136 * dll.c (loaded_dll): Likewise.
3137 * event-loop.c (append_callback_event): Likewise.
3138 (create_file_handler): Likewise.
3139 (create_file_event): Likewise.
3140 * hostio.c (handle_open): Likewise.
3141 * inferiors.c (add_thread): Likewise.
3142 (add_process): Likewise.
3143 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3144 * linux-arm-low.c (arm_new_process): Likewise.
3145 (arm_new_thread): Likewise.
3146 * linux-low.c (add_to_pid_list): Likewise.
3147 (linux_add_process): Likewise.
3148 (handle_extended_wait): Likewise.
3149 (add_lwp): Likewise.
3150 (enqueue_one_deferred_signal): Likewise.
3151 (enqueue_pending_signal): Likewise.
3152 (linux_resume_one_lwp_throw): Likewise.
3153 (linux_resume_one_thread): Likewise.
3154 (linux_read_memory): Likewise.
3155 (linux_write_memory): Likewise.
3156 * linux-mips-low.c (mips_linux_new_process): Likewise.
3157 (mips_linux_new_thread): Likewise.
3158 (mips_add_watchpoint): Likewise.
3159 * linux-x86-low.c (initialize_low_arch): Likewise.
3160 * lynx-low.c (lynx_add_process): Likewise.
3161 * mem-break.c (set_raw_breakpoint_at): Likewise.
3162 (set_breakpoint): Likewise.
3163 (add_condition_to_breakpoint): Likewise.
3164 (add_commands_to_breakpoint): Likewise.
3165 (clone_agent_expr): Likewise.
3166 (clone_one_breakpoint): Likewise.
3167 * regcache.c (new_register_cache): Likewise.
3168 * remote-utils.c (look_up_one_symbol): Likewise.
3169 * server.c (queue_stop_reply): Likewise.
3170 (start_inferior): Likewise.
3171 (queue_stop_reply_callback): Likewise.
3172 (handle_target_event): Likewise.
3173 * spu-low.c (fetch_ppc_memory): Likewise.
3174 (store_ppc_memory): Likewise.
3175 * target.c (set_target_ops): Likewise.
3176 * thread-db.c (thread_db_load_search): Likewise.
3177 (try_thread_db_load_1): Likewise.
3178 * tracepoint.c (add_tracepoint): Likewise.
3179 (add_tracepoint_action): Likewise.
3180 (create_trace_state_variable): Likewise.
3181 (cmd_qtdpsrc): Likewise.
3182 (cmd_qtro): Likewise.
3183 (add_while_stepping_state): Likewise.
3184 * win32-low.c (child_add_thread): Likewise.
3185 (get_image_name): Likewise.
3186
3187 2015-08-25 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3190
3191 2015-08-25 Yao Qi <yao.qi@linaro.org>
3192
3193 * Makefile.in (aarch64-linux.o): New rule.
3194 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3195 srv_tgtobj.
3196 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3197 (aarch64_init_debug_reg_state): Make it extern.
3198 (aarch64_linux_prepare_to_resume): Remove.
3199
3200 2015-08-25 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3203 lwp_arch_private_info and ptid_of_lwp.
3204
3205 2015-08-25 Yao Qi <yao.qi@linaro.org>
3206
3207 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3208 Find proc_info by find_process_pid. All callers updated.
3209
3210 2015-08-25 Yao Qi <yao.qi@linaro.org>
3211
3212 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3213 Remove.
3214 (debug_reg_change_callback): Remove.
3215 (aarch64_notify_debug_reg_change): Remove.
3216
3217 2015-08-25 Yao Qi <yao.qi@linaro.org>
3218
3219 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3220 Call current_lwp_ptid.
3221
3222 2015-08-25 Yao Qi <yao.qi@linaro.org>
3223
3224 * linux-aarch64-low.c (debug_reg_change_callback): Use
3225 debug_printf.
3226
3227 2015-08-25 Yao Qi <yao.qi@linaro.org>
3228
3229 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3230
3231 2015-08-25 Yao Qi <yao.qi@linaro.org>
3232
3233 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3234
3235 2015-08-25 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3238 the code.
3239
3240 2015-08-25 Yao Qi <yao.qi@linaro.org>
3241
3242 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3243 Remove.
3244 (debug_reg_change_callback): Remove argument entry and add argument
3245 lwp. Remove local variable thread. Don't print thread id in the
3246 debugging output. Don't check whether pid of thread equals to pid.
3247 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3248 iterate_over_lwps instead find_inferior.
3249
3250 2015-08-24 Pedro Alves <palves@redhat.com>
3251
3252 * inferiors.c (get_first_process): New function.
3253 * inferiors.h (get_first_process): New declaration.
3254 * remote-utils.c (read_ptid): Default to the first process in the
3255 list, instead of to the current thread's process.
3256
3257 2015-08-24 Pedro Alves <palves@redhat.com>
3258
3259 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3260 * event-loop.c: Likewise.
3261 * remote-utils.c: Likewise.
3262 * tracepoint.c: Likewise.
3263
3264 2015-08-24 Pedro Alves <palves@redhat.com>
3265
3266 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3267 ptid_get_lwp.
3268
3269 2015-08-21 Pedro Alves <palves@redhat.com>
3270
3271 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3272 instead of literal 1.
3273
3274 2015-08-21 Pedro Alves <palves@redhat.com>
3275
3276 * tdesc.c (default_description): Explicitly zero-initialize.
3277
3278 2015-08-21 Pedro Alves <palves@redhat.com>
3279
3280 PR gdb/18749
3281 * inferiors.c (remove_thread): Discard any pending stop reply for
3282 this thread.
3283 * server.c (remove_all_on_match_pid): Rename to ...
3284 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3285 instead of a pid.
3286 (discard_queued_stop_replies): Change parameter to a ptid. Now
3287 extern.
3288 (handle_v_kill, kill_inferior_callback, captured_main)
3289 (process_serial_event): Adjust.
3290 * server.h (discard_queued_stop_replies): Declare.
3291
3292 2015-08-21 Pedro Alves <palves@redhat.com>
3293
3294 * linux-low.c (wait_for_sigstop): Always switch to no thread
3295 selected if the previously current thread dies.
3296 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3297 process instead of the current thread's.
3298 * remote-utils.c (input_interrupt): Don't check if there's no
3299 current thread.
3300 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3301 current thread to the general thread fails, error out.
3302 (handle_qxfer_auxv, handle_qxfer_libraries)
3303 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3304 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3305 (handle_query): Check if there's a thread selected instead of
3306 checking whether there's any thread in the thread list.
3307 (handle_qxfer_threads, handle_qxfer_btrace)
3308 (handle_qxfer_btrace_conf): Don't error out early if there's no
3309 thread in the thread list.
3310 (handle_v_cont, myresume): Don't set the current thread to the
3311 continue thread.
3312 (process_serial_event) <Hg handling>: Also set thread_id if the
3313 previous general thread is still alive.
3314 (process_serial_event) <g/G handling>: If setting the current
3315 thread to the general thread fails, error out.
3316 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3317 thread's lwp instead of the current thread's.
3318 * target.c (set_desired_thread): If the desired thread was not
3319 found, leave the current thread pointing to NULL. Return an int
3320 (boolean) indicating success.
3321 * target.h (set_desired_thread): Change return type to int.
3322
3323 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3324
3325 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3326 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3327 #includes.
3328 (ps_get_thread_area): New function.
3329
3330 2015-08-19 Gary Benson <gbenson@redhat.com>
3331
3332 * hostio.c (handle_pread): Do not attempt to read more data
3333 than hostio_reply_with_data can fit in a packet.
3334
3335 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3336
3337 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3338
3339 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3340
3341 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3342
3343 2015-08-06 Pedro Alves <palves@redhat.com>
3344
3345 * tracepoint.c (expr_eval_result): Now an int.
3346
3347 2015-08-06 Pedro Alves <palves@redhat.com>
3348
3349 * gdbthread.h (struct regcache): Forward declare.
3350 (struct thread_info) <regcache_data>: Now a struct regcache
3351 pointer.
3352 * inferiors.c (inferior_regcache_data)
3353 (set_inferior_regcache_data): Now work with struct regcache
3354 pointers.
3355 * inferiors.h (struct regcache): Forward declare.
3356 (inferior_regcache_data, set_inferior_regcache_data): Now work
3357 with struct regcache pointers.
3358 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3359 (free_register_cache_thread): Remove struct regcache pointer
3360 casts.
3361
3362 2015-08-06 Pedro Alves <palves@redhat.com>
3363
3364 * server.c (captured_main): On error, print the exception message
3365 to stderr, and if run_once is set, throw a quit.
3366
3367 2015-08-06 Pedro Alves <palves@redhat.com>
3368
3369 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3370 the current thread.
3371
3372 2015-08-06 Pedro Alves <palves@redhat.com>
3373
3374 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3375 reading beyond the passed in buffer length.
3376
3377 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3378
3379 * tracepoint.c (symbol_list) <required>: Remove.
3380
3381 2015-08-06 Pedro Alves <palves@redhat.com>
3382
3383 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3384 count if stopping and suspending threads.
3385 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3386 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3387 (linux_detach): Complete an ongoing step-over.
3388 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3389 throughout.
3390 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3391 (linux_wait_1): If passing a signal to the inferior after
3392 finishing a step-over, unsuspend and re-resume all lwps. If we
3393 see a single-step event but the thread should be continuing, don't
3394 pass the trap to gdb.
3395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3396 internal_error instead of gdb_assert.
3397 (enqueue_pending_signal): New function.
3398 (check_ptrace_stopped_lwp_gone): Add debug output.
3399 (start_step_over): Use internal_error instead of gdb_assert.
3400 (complete_ongoing_step_over): New function.
3401 (linux_resume_one_thread): Don't resume a suspended thread.
3402 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3403 it stepping.
3404
3405 2015-08-06 Pedro Alves <palves@redhat.com>
3406
3407 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3408 (linux_thread_alive): Use lwp_is_marked_dead.
3409 (extended_event_reported): Delete.
3410 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3411 instead of extended_event_reported.
3412 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3413 as well.
3414 (lwp_is_marked_dead): New function.
3415 (lwp_running): Use lwp_is_marked_dead.
3416 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3417 comment.
3418
3419 2015-08-06 Pedro Alves <palves@redhat.com>
3420
3421 * linux-low.c (linux_wait_1): Move fork event output out of the
3422 !report_to_gdb check. Pass event_child->waitstatus to
3423 target_waitstatus_to_string instead of ourstatus.
3424
3425 2015-08-04 Yao Qi <yao.qi@linaro.org>
3426
3427 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3428 if current_thread is 32 bit.
3429
3430 2015-08-04 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3433 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3434 * server.c (extended_protocol): Remove "static".
3435 * server.h (extended_protocol): Declare it.
3436
3437 2015-08-04 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3440 both aarch64 and aarch32.
3441 (aarch64_set_pc): Likewise.
3442
3443 2015-08-04 Yao Qi <yao.qi@linaro.org>
3444
3445 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3446 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3447 arm-with-neon.xml to srv_xmlfiles.
3448 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3449 (is_64bit_tdesc): New function.
3450 (aarch64_linux_read_description): New function.
3451 (aarch64_arch_setup): Call aarch64_linux_read_description.
3452 (regs_info): Rename to regs_info_aarch64.
3453 (aarch64_regs_info): Return right regs_info.
3454 (initialize_low_arch): Call initialize_low_arch_aarch32.
3455
3456 2015-08-04 Yao Qi <yao.qi@linaro.org>
3457
3458 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3459 * linux-aarch32-low.c: New file.
3460 * linux-aarch32-low.h: New file.
3461 * linux-arm-low.c (arm_fill_gregset): Move it to
3462 linux-aarch32-low.c.
3463 (arm_store_gregset): Likewise.
3464 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3465 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3466 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3467 (regs_info): Rename to regs_info_arm.
3468 (arm_regs_info): Return regs_info_aarch32 if
3469 have_ptrace_getregset is 1 and target description is
3470 arm_with_neon or arm_with_vfpv3.
3471 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3472 Call initialize_low_arch_aarch32 instead.
3473
3474 2015-08-04 Yao Qi <yao.qi@linaro.org>
3475
3476 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3477 * linux-low.c: ... here.
3478 * linux-low.h (have_ptrace_getregset): Declare it.
3479
3480 2015-08-04 Pedro Alves <palves@redhat.com>
3481
3482 * thread-db.c (struct thread_db): Use new typedefs.
3483 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3484 CHK calls.
3485 (disable_thread_event_reporting): Cast result of dlsym to
3486 destination function pointer type.
3487 (thread_db_mourn): Use td_ta_delete_ftype.
3488
3489 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3490
3491 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3492 arch variant.
3493 (CDX_BREAKPOINT): Define for R2.
3494 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3495 (the_low_target): Add comments.
3496
3497 2015-07-30 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-arm-low.c (arm_hwcap): Remove it.
3500 (arm_read_description): New local variable arm_hwcap. Don't
3501 set arm_hwcap to zero.
3502
3503 2015-07-30 Yao Qi <yao.qi@linaro.org>
3504
3505 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3506 Use regcache->tdesc instead.
3507 (arm_store_wmmxregset): Likewise.
3508 (arm_fill_vfpregset): Likewise.
3509 (arm_store_vfpregset): Likewise.
3510
3511 2015-07-30 Yao Qi <yao.qi@linaro.org>
3512
3513 * linux-arm-low.c: Include arch/arm.h.
3514 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3515 (arm_store_gregset): Likewise.
3516
3517 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3518
3519 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3520 ptrace's 4th parameter.
3521
3522 2015-07-27 Yao Qi <yao.qi@linaro.org>
3523
3524 * configure.srv (case aarch64*-*-linux*): Don't set
3525 srv_linux_usrregs.
3526
3527 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3528
3529 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3530 sys/ptrace.h.
3531 * linux-arm-low.c: Likewise.
3532 * linux-cris-low.c: Likewise.
3533 * linux-crisv32-low.c: Likewise.
3534 * linux-low.c: Likewise.
3535 * linux-m68k-low.c: Likewise.
3536 * linux-mips-low.c: Likewise.
3537 * linux-nios2-low.c: Likewise.
3538 * linux-s390-low.c: Likewise.
3539 * linux-sparc-low.c: Likewise.
3540 * linux-tic6x-low.c: Likewise.
3541 * linux-tile-low.c: Likewise.
3542 * linux-x86-low.c: Likewise.
3543
3544 2015-07-24 Pedro Alves <palves@redhat.com>
3545
3546 * config.in: Regenerate.
3547 * configure: Regenerate.
3548
3549 2015-07-24 Pedro Alves <palves@redhat.com>
3550
3551 * acinclude.m4: Include ../ptrace.m4.
3552 * configure.ac: Call GDB_AC_PTRACE.
3553 * config.in, configure: Regenerate.
3554
3555 2015-07-24 Yao Qi <yao.qi@linaro.org>
3556
3557 * linux-low.c (linux_create_inferior): Remove setting to
3558 proc->priv->new_inferior.
3559 (linux_attach): Likewise.
3560 (linux_low_filter_event): Likewise.
3561 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3562
3563 2015-07-24 Yao Qi <yao.qi@linaro.org>
3564
3565 * linux-low.c (linux_arch_setup): New function.
3566 (linux_low_filter_event): If proc->tdesc is NULL and
3567 proc->attached is true, call the_low_target.arch_setup.
3568 Otherwise, keep status pending, and return.
3569 (linux_resume_one_lwp_throw): Don't call get_pc if
3570 thread->while_stepping isn't NULL. Don't call
3571 get_thread_regcache if proc->tdesc is NULL.
3572 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3573 (linux_target_ops): Install arch_setup.
3574 * server.c (start_inferior): Call the_target->arch_setup.
3575 * target.h (struct target_ops) <arch_setup>: New field.
3576 (target_arch_setup): New marco.
3577 * lynx-low.c (lynx_target_ops): Update.
3578 * nto-low.c (nto_target_ops): Update.
3579 * spu-low.c (spu_target_ops): Update.
3580 * win32-low.c (win32_target_ops): Update.
3581
3582 2015-07-24 Yao Qi <yao.qi@linaro.org>
3583
3584 * linux-low.c (linux_add_process): Don't set
3585 proc->priv->new_inferior.
3586 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3587 (linux_attach): Likewise.
3588
3589 2015-07-24 Yao Qi <yao.qi@linaro.org>
3590
3591 * server.c (start_inferior): Code refactor.
3592
3593 2015-07-24 Yao Qi <yao.qi@linaro.org>
3594
3595 * server.c (process_serial_event): Set general_thread.
3596
3597 2015-07-21 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3600 aarch64_linux_get_debug_reg_capacity.
3601
3602 2015-07-17 Yao Qi <yao.qi@linaro.org>
3603
3604 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3605 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3606 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3607 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3608 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3609 (AARCH64_HWP_ALIGNMENT): Likewise.
3610 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3611 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3612 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3613 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3614 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3615 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3616 (struct aarch64_debug_reg_state): Likewise.
3617 (struct arch_lwp_info): Likewise.
3618 (aarch64_align_watchpoint): Likewise.
3619 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3620 (aarch64_watchpoint_length): Likewise.
3621 (aarch64_point_encode_ctrl_reg): Likewise
3622 (aarch64_point_is_aligned): Likewise.
3623 (aarch64_align_watchpoint): Likewise.
3624 (aarch64_linux_set_debug_regs):
3625 (aarch64_dr_state_insert_one_point): Likewise.
3626 (aarch64_dr_state_remove_one_point): Likewise.
3627 (aarch64_handle_breakpoint): Likewise.
3628 (aarch64_handle_aligned_watchpoint): Likewise.
3629 (aarch64_handle_unaligned_watchpoint): Likewise.
3630 (aarch64_handle_watchpoint): Likewise.
3631
3632 2015-07-17 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3635 and don't aarch64_get_debug_reg_state. All callers update.
3636 (aarch64_handle_aligned_watchpoint): Likewise.
3637 (aarch64_handle_unaligned_watchpoint): Likewise.
3638 (aarch64_handle_watchpoint): Likewise.
3639 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3640 (aarch64_remove_point): Likewise.
3641
3642 2015-07-17 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3645 debug_printf.
3646 (aarch64_handle_unaligned_watchpoint): Likewise.
3647
3648 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3649
3650 Revert the previous 3 commits:
3651 Move gdb_regex* to common/
3652 Move linux_find_memory_regions_full & co.
3653 gdbserver build-id attribute generator
3654
3655 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3656 Jan Kratochvil <jan.kratochvil@redhat.com>
3657
3658 gdbserver build-id attribute generator.
3659 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3660 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3661 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3662 (find_phdr): New.
3663 (get_dynamic): Use find_pdhr to traverse program headers.
3664 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3665 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3666 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3667 (get_hex_build_id): New.
3668 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3669 to reply XML document.
3670
3671 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3672 Jan Kratochvil <jan.kratochvil@redhat.com>
3673
3674 * target.c: Include target/target-utils.h and fcntl.h.
3675 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3676 (target_fileio_read_stralloc): New functions.
3677
3678 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3679
3680 * Makefile.in (OBS): Add gdb_regex.o.
3681 (gdb_regex.o): New.
3682 * config.in: Rebuilt.
3683 * configure: Rebuilt.
3684
3685 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3686 Jan Kratochvil <jan.kratochvil@redhat.com>
3687
3688 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3689 * Makefile.in (OBS): Add target-utils.o.
3690 (linux-maps.o, target-utils.o): New.
3691 * configure.srv (srv_linux_obj): Add linux-maps.o.
3692
3693 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3694
3695 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3696 function, return 1.
3697 (the_low_target): Install it.
3698
3699 2015-07-14 Pedro Alves <palves@redhat.com>
3700
3701 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3702 Instead, ignore ECHILD, and throw an error for other errnos.
3703
3704 2015-07-10 Pedro Alves <palves@redhat.com>
3705
3706 * event-loop.c (struct callback_event) <data>: Change type to
3707 gdb_client_data instance instead of gdb_client_data pointer.
3708 (append_callback_event): Adjust.
3709
3710 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3711
3712 * linux-aarch64-low.c: Add comments for each linux_target_ops
3713 method. Remove comments already covered in target_ops and
3714 linux_target_ops definitions.
3715 (the_low_target): Add comments for each unimplemented method.
3716
3717 2015-07-09 Yao Qi <yao.qi@linaro.org>
3718
3719 * linux-aarch64-low.c (aarch64_regmap): Remove.
3720 (aarch64_usrregs_info): Remove.
3721 (regs_info): Set field usrregs to NULL.
3722
3723 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3724
3725 * linux-low.c: Include "rsp-low.h"
3726 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3727 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3728 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3729 (handle_btrace_enable_pt): New.
3730 (handle_btrace_general_set): Support "pt".
3731 (handle_btrace_conf_general_set): Support "pt:size".
3732
3733 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3734
3735 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3736 Z_PACKET_SW_BP.
3737
3738 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3739
3740 * linux-aarch64-low.c: Remove comment about endianness.
3741 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3742 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3743 memcmp.
3744
3745 2015-06-24 Gary Benson <gbenson@redhat.com>
3746
3747 * linux-i386-ipa.c (stdint.h): Do not include.
3748 * lynx-i386-low.c (stdint.h): Likewise.
3749 * lynx-ppc-low.c (stdint.h): Likewise.
3750 * mem-break.c (stdint.h): Likewise.
3751 * thread-db.c (stdint.h): Likewise.
3752 * tracepoint.c (stdint.h): Likewise.
3753 * win32-low.c (stdint.h): Likewise.
3754
3755 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3756
3757 * server.c (write_qxfer_response): Update call to
3758 remote_escape_output.
3759
3760 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3761 Jan Kratochvil <jan.kratochvil@redhat.com>
3762
3763 Merge multiple hex conversions.
3764 * gdbreplay.c (tohex): Rename to 'fromhex'.
3765 (logchar): Use fromhex.
3766
3767 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3768
3769 * server.c (handle_qxfer_libraries): Set `version' attribute for
3770 <library-list>.
3771
3772 2015-06-10 Gary Benson <gbenson@redhat.com>
3773
3774 * target.h (struct target_ops) <multifs_open>: New field.
3775 <multifs_unlink>: Likewise.
3776 <multifs_readlink>: Likewise.
3777 * linux-low.c (nat/linux-namespaces.h): New include.
3778 (linux_target_ops): Initialize the_target->multifs_open,
3779 the_target->multifs_unlink and the_target->multifs_readlink.
3780 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3781 * hostio.c (hostio_fs_pid): New static variable.
3782 (hostio_handle_new_gdb_connection): New function.
3783 (handle_setfs): Likewise.
3784 (handle_open): Use the_target->multifs_open as appropriate.
3785 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3786 (handle_readlink): Use the_target->multifs_readlink as
3787 appropriate.
3788 (handle_vFile): Handle vFile:setfs packets.
3789 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3790 after target_handle_new_gdb_connection.
3791
3792 2015-06-10 Gary Benson <gbenson@redhat.com>
3793
3794 * configure.ac (AC_CHECK_FUNCS): Add setns.
3795 * config.in: Regenerate.
3796 * configure: Likewise.
3797 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3798 (linux-namespaces.o): New rule.
3799 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3800
3801 2015-06-09 Gary Benson <gbenson@redhat.com>
3802
3803 * hostio.c (handle_open): Process mode argument with
3804 fileio_to_host_mode.
3805
3806 2015-06-01 Yao Qi <yao.qi@linaro.org>
3807
3808 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3809 * linux-x86-low.c: Likewise.
3810
3811 2015-05-28 Don Breazeal <donb@codesourcery.com>
3812
3813 * linux-low.c (handle_extended_wait): Initialize
3814 thread_info.last_resume_kind for new fork children.
3815
3816 2015-05-15 Pedro Alves <palves@redhat.com>
3817
3818 * target.h (target_handle_new_gdb_connection): Rewrite using if
3819 wrapped in do/while.
3820
3821 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3822
3823 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3824 * configure, config.in: Regenerate.
3825 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3826 Declare typedef.
3827
3828 2015-05-12 Don Breazeal <donb@codesourcery.com>
3829
3830 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3831 PTRACE_EVENT_VFORK_DONE.
3832 (linux_low_ptrace_options, extended_event_reported): Add vfork
3833 events.
3834 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3835 and "vforkdone" for RSP 'T' Stop Reply Packet.
3836 * server.h (report_vfork_events): Declare
3837 global variable.
3838
3839 2015-05-12 Don Breazeal <donb@codesourcery.com>
3840
3841 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3842 (the_low_target) <new_fork>: Initialize new member.
3843 * linux-arm-low.c (arm_new_fork): New function.
3844 (the_low_target) <new_fork>: Initialize new member.
3845 * linux-low.c (handle_extended_wait): Call new target function
3846 new_fork.
3847 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3848 * linux-mips-low.c (mips_add_watchpoint): New function
3849 extracted from mips_insert_point.
3850 (the_low_target) <new_fork>: Initialize new member.
3851 (mips_linux_new_fork): New function.
3852 (mips_insert_point): Call mips_add_watchpoint.
3853 * linux-x86-low.c (x86_linux_new_fork): New function.
3854 (the_low_target) <new_fork>: Initialize new member.
3855
3856 2015-05-12 Don Breazeal <donb@codesourcery.com>
3857
3858 * linux-low.c (handle_extended_wait): Implement return value,
3859 rename argument 'event_child' to 'event_lwp', handle
3860 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3861 (linux_low_ptrace_options): New function.
3862 (linux_low_filter_event): Call linux_low_ptrace_options,
3863 use different argument fo linux_enable_event_reporting,
3864 use return value from handle_extended_wait.
3865 (extended_event_reported): New function.
3866 (linux_wait_1): Call extended_event_reported and set
3867 status to report fork events.
3868 (linux_write_memory): Add pid to debug message.
3869 (reset_lwp_ptrace_options_callback): New function.
3870 (linux_handle_new_gdb_connection): New function.
3871 (linux_target_ops): Initialize new structure member.
3872 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3873 * lynx-low.c: Initialize new structure member.
3874 * remote-utils.c (prepare_resume_reply): Implement stop reason
3875 "fork" for "T" stop message.
3876 * server.c (handle_query): Call handle_new_gdb_connection.
3877 * server.h (report_fork_events): Declare global flag.
3878 * target.h (struct target_ops) <handle_new_gdb_connection>:
3879 New member.
3880 (target_handle_new_gdb_connection): New macro.
3881 * win32-low.c: Initialize new structure member.
3882
3883 2015-05-12 Don Breazeal <donb@codesourcery.com>
3884
3885 * mem-break.c (APPEND_TO_LIST): Define macro.
3886 (clone_agent_expr): New function.
3887 (clone_one_breakpoint): New function.
3888 (clone_all_breakpoints): New function.
3889 * mem-break.h: Declare new functions.
3890
3891 2015-05-12 Don Breazeal <donb@codesourcery.com>
3892
3893 * linux-low.c (linux_supports_fork_events): New function.
3894 (linux_supports_vfork_events): New function.
3895 (linux_target_ops): Initialize new structure members.
3896 (initialize_low): Call linux_check_ptrace_features.
3897 * lynx-low.c (lynx_target_ops): Initialize new structure
3898 members.
3899 * server.c (report_fork_events, report_vfork_events):
3900 New global flags.
3901 (handle_query): Add new features to qSupported packet and
3902 response.
3903 (captured_main): Initialize new global variables.
3904 * target.h (struct target_ops) <supports_fork_events>:
3905 New member.
3906 <supports_vfork_events>: New member.
3907 (target_supports_fork_events): New macro.
3908 (target_supports_vfork_events): New macro.
3909 * win32-low.c (win32_target_ops): Initialize new structure
3910 members.
3911
3912 2015-05-12 Gary Benson <gbenson@redhat.com>
3913
3914 * server.c (handle_qxfer_exec_file): Use current process
3915 if annex is empty.
3916
3917 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3918
3919 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3920 Remove HAVE_PTRACE_GETREGS conditionals.
3921 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3922 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3923
3924 2015-05-08 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-low.c (linux_supports_conditional_breakpoints): New
3927 function.
3928 (linux_target_ops): Install new target method.
3929 * lynx-low.c (lynx_target_ops): Install NULL hook for
3930 supports_conditional_breakpoints.
3931 * nto-low.c (nto_target_ops): Likewise.
3932 * spu-low.c (spu_target_ops): Likewise.
3933 * win32-low.c (win32_target_ops): Likewise.
3934 * server.c (handle_query): Check
3935 target_supports_conditional_breakpoints.
3936 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3937 New field.
3938 (target_supports_conditional_breakpoints): New macro.
3939
3940 2015-05-06 Pedro Alves <palves@redhat.com>
3941
3942 PR server/18081
3943 * server.c (start_inferior): If the process exits, mourn it.
3944
3945 2015-04-21 Gary Benson <gbenson@redhat.com>
3946
3947 * hostio.c (fileio_open_flags_to_host): Factored out to
3948 fileio_to_host_openflags in common/fileio.c. Single use
3949 updated.
3950
3951 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3952
3953 * linux-xtensa-low.c (xtensa_fill_gregset)
3954 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3955 XCHAL_HAVE_LOOP.
3956
3957 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3958
3959 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3960 (regs_info): Replace usrregs pointer with NULL.
3961
3962 2015-04-17 Gary Benson <gbenson@redhat.com>
3963
3964 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3965 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3966 * server.c (handle_qxfer_exec_file): New function.
3967 (qxfer_packets): Add exec-file entry.
3968 (handle_query): Report qXfer:exec-file:read as supported packet.
3969
3970 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3971
3972 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3973
3974 2015-04-09 Gary Benson <gbenson@redhat.com>
3975
3976 * hostio-errno.c (errno_to_fileio_error): Remove function.
3977 Update caller to use remote_fileio_to_fio_error.
3978
3979 2015-04-09 Yao Qi <yao.qi@linaro.org>
3980
3981 * linux-low.c (linux_insert_point): Call
3982 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3983 (linux_remove_point): Call remove_memory_breakpoint if type is
3984 raw_bkpt_type_sw.
3985 * linux-x86-low.c (x86_insert_point): Don't call
3986 insert_memory_breakpoint.
3987 (x86_remove_point): Don't call remove_memory_breakpoint.
3988
3989 2015-04-01 Pedro Alves <palves@redhat.com>
3990 Cleber Rosa <crosa@redhat.com>
3991
3992 * server.c (gdbserver_usage): Reorganize and extend the usage
3993 message.
3994
3995 2015-03-24 Pedro Alves <palves@redhat.com>
3996
3997 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3998 output. Also dump TRAP_TRACE.
3999 (linux_low_filter_event): In debug output, distinguish a
4000 resume_stop SIGSTOP from a delayed SIGSTOP.
4001
4002 2015-03-24 Gary Benson <gbenson@redhat.com>
4003
4004 * linux-x86-low.c (x86_linux_new_thread): Moved to
4005 nat/x86-linux.c.
4006 (x86_linux_prepare_to_resume): Likewise.
4007
4008 2015-03-24 Gary Benson <gbenson@redhat.com>
4009
4010 * Makefile.in (x86-linux-dregs.o): New rule.
4011 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4012 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4013 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4014 (x86_linux_dr_get): Likewise.
4015 (x86_linux_dr_set): Likewise.
4016 (update_debug_registers_callback): Likewise.
4017 (x86_linux_dr_set_addr): Likewise.
4018 (x86_linux_dr_get_addr): Likewise.
4019 (x86_linux_dr_set_control): Likewise.
4020 (x86_linux_dr_get_control): Likewise.
4021 (x86_linux_dr_get_status): Likewise.
4022 (x86_linux_update_debug_registers): Likewise.
4023
4024 2015-03-24 Gary Benson <gbenson@redhat.com>
4025
4026 * linux-x86-low.c (x86_linux_update_debug_registers):
4027 New function, factored out from...
4028 (x86_linux_prepare_to_resume): ...this.
4029
4030 2015-03-24 Gary Benson <gbenson@redhat.com>
4031
4032 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4033 (x86_linux_dr_set): Likewise.
4034 (update_debug_registers_callback): Likewise.
4035 (x86_linux_dr_set_addr): Likewise.
4036 (x86_linux_dr_get_addr): Likewise.
4037 (x86_linux_dr_set_control): Likewise.
4038 (x86_linux_dr_get_control): Likewise.
4039 (x86_linux_dr_get_status): Likewise.
4040 (x86_linux_prepare_to_resume): Likewise.
4041
4042 2015-03-24 Gary Benson <gbenson@redhat.com>
4043
4044 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4045 Use perror_with_name. Pass string through gettext.
4046 (x86_linux_dr_set): Likewise.
4047
4048 2015-03-24 Gary Benson <gbenson@redhat.com>
4049
4050 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4051 (x86_linux_dr_set_addr): ...this.
4052 (x86_dr_low_get_addr): Rename to...
4053 (x86_linux_dr_get_addr): ...this.
4054 (x86_dr_low_set_control): Rename to...
4055 (x86_linux_dr_set_control): ...this.
4056 (x86_dr_low_get_control): Rename to...
4057 (x86_linux_dr_get_control): ...this.
4058 (x86_dr_low_get_status): Rename to...
4059 (x86_linux_dr_get_status): ...this.
4060 (x86_dr_low): Update with new function names.
4061
4062 2015-03-24 Gary Benson <gbenson@redhat.com>
4063
4064 * Makefile.in (x86-linux.o): New rule.
4065 * configure.srv: Add x86-linux.o to relevant targets.
4066 * linux-low.c (lwp_set_arch_private_info): New function.
4067 (lwp_arch_private_info): Likewise.
4068 * linux-x86-low.c: Include nat/x86-linux.h.
4069 (arch_lwp_info): Removed structure.
4070 (update_debug_registers_callback):
4071 Use lwp_set_debug_registers_changed.
4072 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4073 and lwp_set_debug_registers_changed.
4074 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4075
4076 2015-03-24 Gary Benson <gbenson@redhat.com>
4077
4078 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4079 * linux-arm-low.c (arm_new_thread): Likewise.
4080 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4081 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4082 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4083 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4084
4085 2015-03-24 Gary Benson <gbenson@redhat.com>
4086
4087 * linux-low.c (ptid_of_lwp): New function.
4088 (lwp_is_stopped): Likewise.
4089 (lwp_stop_reason): Likewise.
4090 * linux-x86-low.c (update_debug_registers_callback):
4091 Use lwp_is_stopped.
4092 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4093 lwp_stop_reason.
4094
4095 2015-03-24 Gary Benson <gbenson@redhat.com>
4096
4097 * linux-low.h (linux_stop_lwp): Remove declaration.
4098
4099 2015-03-24 Gary Benson <gbenson@redhat.com>
4100
4101 * linux-low.h: Include nat/linux-nat.h.
4102 * linux-low.c (iterate_over_lwps_args): New structure.
4103 (iterate_over_lwps_filter): New function.
4104 (iterate_over_lwps): Likewise.
4105 * linux-x86-low.c (update_debug_registers_callback):
4106 Update signature to what iterate_over_lwps expects.
4107 Remove PID check that iterate_over_lwps now performs.
4108 (x86_dr_low_set_addr): Use iterate_over_lwps.
4109 (x86_dr_low_set_control): Likewise.
4110
4111 2015-03-24 Gary Benson <gbenson@redhat.com>
4112
4113 * linux-x86-low.c (x86_debug_reg_state): New function.
4114 (x86_linux_prepare_to_resume): Use the above.
4115
4116 2015-03-24 Gary Benson <gbenson@redhat.com>
4117
4118 * linux-low.c (current_lwp_ptid): New function.
4119 * linux-x86-low.c: Include nat/linux-nat.h.
4120 (x86_dr_low_get_addr): Use current_lwp_ptid.
4121 (x86_dr_low_get_control): Likewise.
4122 (x86_dr_low_get_status): Likewise.
4123
4124 2015-03-20 Pedro Alves <palves@redhat.com>
4125
4126 * tracepoint.c (cmd_qtstatus): Make "str" const.
4127
4128 2015-03-20 Pedro Alves <palves@redhat.com>
4129
4130 * server.c (handle_general_set): Make "req_str" const.
4131
4132 2015-03-19 Pedro Alves <palves@redhat.com>
4133
4134 * linux-low.c (linux_resume_one_lwp): Rename to ...
4135 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4136 instead call perror_with_name.
4137 (check_ptrace_stopped_lwp_gone): New function.
4138 (linux_resume_one_lwp): Reimplement as wrapper around
4139 linux_resume_one_lwp_throw that swallows errors if the LWP is
4140 gone.
4141
4142 2015-03-19 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (count_events_callback, select_event_lwp_callback):
4145 No longer check whether the thread has resume_stop as last resume
4146 kind.
4147
4148 2015-03-19 Pedro Alves <palves@redhat.com>
4149
4150 * linux-low.c (count_events_callback, select_event_lwp_callback):
4151 Use the lwp's status_pending_p field, not the thread's.
4152
4153 2015-03-19 Pedro Alves <palves@redhat.com>
4154
4155 * linux-low.c (select_event_lwp_callback): Update comments to
4156 no longer mention SIGTRAP.
4157
4158 2015-03-18 Gary Benson <gbenson@redhat.com>
4159
4160 * server.c (handle_query): Do not report vFile:fstat as supported.
4161
4162 2015-03-11 Gary Benson <gbenson@redhat.com>
4163
4164 * hostio.c (sys/types.h): New include.
4165 (sys/stat.h): Likewise.
4166 (common-remote-fileio.h): Likewise.
4167 (handle_fstat): New function.
4168 (handle_vFile): Handle vFile:fstat packets.
4169
4170 2015-03-11 Gary Benson <gbenson@redhat.com>
4171
4172 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4173 struct stat.st_blocks and struct stat.st_blksize.
4174 * configure: Regenerate.
4175 * config.in: Likewise.
4176 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4177 (OBS): Add common-remote-fileio.o.
4178 (common-remote-fileio.o): New rule.
4179
4180 2015-03-09 Pedro Alves <palves@redhat.com>
4181
4182 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4183 'struct sockaddr' pointer in 'accept' call.
4184
4185 2015-03-09 Pedro Alves <palves@redhat.com>
4186
4187 Revert:
4188 2015-03-07 Pedro Alves <palves@redhat.com>
4189 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4190 or <winsock2.h> here. Instead include "gdb_socket.h".
4191 (remote_open): Use union gdb_sockaddr_u.
4192 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4193 or <winsock2.h> here. Instead include "gdb_socket.h".
4194 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4195 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4196 or <sys/un.h>.
4197 (init_named_socket, gdb_agent_helper_thread): Use union
4198 gdb_sockaddr_u.
4199
4200 2015-03-07 Pedro Alves <palves@redhat.com>
4201
4202 * configure.ac (build_warnings): Move
4203 -Wdeclaration-after-statement to the C-specific set.
4204 * configure: Regenerate.
4205
4206 2015-03-07 Pedro Alves <palves@redhat.com>
4207
4208 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4209 or <winsock2.h> here. Instead include "gdb_socket.h".
4210 (remote_open): Use union gdb_sockaddr_u.
4211 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4212 or <winsock2.h> here. Instead include "gdb_socket.h".
4213 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4214 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4215 or <sys/un.h>.
4216 (init_named_socket, gdb_agent_helper_thread): Use union
4217 gdb_sockaddr_u.
4218
4219 2015-03-07 Pedro Alves <palves@redhat.com>
4220
4221 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4222 instead.
4223
4224 2015-03-06 Yao Qi <yao.qi@linaro.org>
4225
4226 * linux-aarch64-low.c (aarch64_insert_point): Use
4227 show_debug_regs as a boolean.
4228 (aarch64_remove_point): Likewise.
4229
4230 2015-03-05 Pedro Alves <palves@redhat.com>
4231
4232 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4233 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4234 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4235 * nto-low.c (nto_target_ops): Likewise.
4236 * spu-low.c (spu_target_ops): Likewise.
4237 * win32-low.c (win32_target_ops): Likewise.
4238
4239 2015-03-04 Pedro Alves <palves@redhat.com>
4240
4241 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4242 Decide whether a breakpoint triggered based on the SIGTRAP's
4243 siginfo.si_code.
4244 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4245 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4246 (linux_low_filter_event): Check for breakpoints before checking
4247 watchpoints.
4248 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4249 siginfo.si_code.
4250 (linux_stopped_by_sw_breakpoint)
4251 (linux_supports_stopped_by_sw_breakpoint)
4252 (linux_stopped_by_hw_breakpoint)
4253 (linux_supports_stopped_by_hw_breakpoint): New functions.
4254 (linux_target_ops): Install new target methods.
4255
4256 2015-03-04 Pedro Alves <palves@redhat.com>
4257
4258 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4259 * server.c (swbreak_feature, hwbreak_feature): New globals.
4260 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4261 (captured_main): Clear swbreak_feature and hwbreak_feature.
4262 * server.h (swbreak_feature, hwbreak_feature): Declare.
4263 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4264 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4265 supports_stopped_by_hw_breakpoint>: New fields.
4266 (target_supports_stopped_by_sw_breakpoint)
4267 (target_stopped_by_sw_breakpoint)
4268 (target_supports_stopped_by_hw_breakpoint)
4269 (target_stopped_by_hw_breakpoint): Declare.
4270
4271 2015-03-04 Pedro Alves <palves@redhat.com>
4272
4273 enum lwp_stop_reason -> enum target_stop_reason
4274 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4275 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4276 (linux_wait_1, stuck_in_jump_pad_callback)
4277 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4278 (linux_stopped_by_watchpoint):
4279 * linux-low.h (enum lwp_stop_reason): Delete.
4280 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4281 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4282
4283 2015-03-04 Yao Qi <yao.qi@linaro.org>
4284
4285 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4286
4287 2015-03-03 Gary Benson <gbenson@redhat.com>
4288
4289 * hostio.c (handle_vFile): Fix prefix lengths.
4290
4291 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4292
4293 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4294 ptr_bits.
4295
4296 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4297
4298 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4299 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4300 (clean): Add "rm -f" for above C files.
4301 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4302 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4303 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4304 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4305 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4306 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4307 (init_registers_s390x_vx_linux64)
4308 (init_registers_s390x_tevx_linux64)
4309 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4310 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4311 declarations.
4312 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4313 (s390_store_vxrs_high): New functions.
4314 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4315 NT_S390_VXRS_HIGH.
4316 (s390_arch_setup): Add logic for selecting one of the new target
4317 descriptions. Activate the new vector regsets if applicable.
4318 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4319 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4320 and init_registers_s390x_tevx_linux64.
4321
4322 2015-03-01 Pedro Alves <palves@redhat.com>
4323
4324 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4325 parameter.
4326
4327 2015-02-27 Pedro Alves <palves@redhat.com>
4328
4329 * linux-x86-low.c (u_debugreg_offset): New function.
4330 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4331
4332 2015-02-27 Pedro Alves <palves@redhat.com>
4333
4334 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4335 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4336 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4337 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4338 (ps_lsetfpregs, ps_getpid)
4339 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4340 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4341 (ps_lsetxregs, ps_plog): Declare.
4342
4343 2015-02-27 Pedro Alves <palves@redhat.com>
4344
4345 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4346 IP_AGENT_EXPORT_FUNC.
4347 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4348 IP_AGENT_EXPORT_FUNC.
4349 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4350 (IP_AGENT_EXPORT): Delete.
4351 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4352 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4353 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4354 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4355 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4356 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4357 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4358 (traceframe_read_count, traceframe_write_count)
4359 (traceframes_created, trace_state_variables, get_raw_reg)
4360 (get_trace_state_variable_value, set_trace_state_variable_value)
4361 (ust_loaded, helper_thread_id, cmd_buf): Use
4362 IPA_SYM_EXPORTED_NAME.
4363 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4364 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4365 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4366 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4367 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4368 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4369 EXTERN_C_PUSH/EXTERN_C_POP.
4370 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4371 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4372 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4373 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4374 (traceframe_write_count, traceframe_read_count)
4375 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4376 (about_to_request_buffer_space, get_trace_state_variable_value)
4377 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4378 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4379 EXTERN_C_PUSH/EXTERN_C_POP.
4380 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4381 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4382 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4383 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4384 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4385 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4386 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4387 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4388 Define.
4389 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4390 (IP_AGENT_EXPORT_VAR_DECL): Define.
4391 (tracing): Declare.
4392 (gdb_agent_get_raw_reg): Declare.
4393
4394 2015-02-27 Tom Tromey <tromey@redhat.com>
4395 Pedro Alves <palves@redhat.com>
4396
4397 Rename symbols whose names are reserved C++ keywords throughout.
4398
4399 2015-02-27 Pedro Alves <palves@redhat.com>
4400
4401 * Makefile.in (COMPILER): New, get it from autoconf.
4402 (CXX): Get from autoconf instead.
4403 (COMPILE.pre): Use COMPILER.
4404 (CC-LD): Rename to ...
4405 (CC_LD): ... this. Use COMPILER.
4406 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4407 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4408 * acinclude.m4: Include build-with-cxx.m4.
4409 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4410 Disable -Werror by default if building in C++ mode.
4411 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4412 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4413 the C++ compiler. Save/restore CXXFLAGS too.
4414 * configure: Regenerate.
4415
4416 2015-02-27 Pedro Alves <palves@redhat.com>
4417
4418 * acinclude.m4: Include libiberty.m4.
4419 * configure.ac: Call libiberty_INIT.
4420 * config.in, configure: Regenerate.
4421
4422 2015-02-26 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (linux_wait_1): When incrementing the PC past a
4425 program breakpoint always use the_low_target.breakpoint_len as
4426 increment, rather than the maximum between that and
4427 the_low_target.decr_pc_after_break.
4428
4429 2015-02-23 Pedro Alves <palves@redhat.com>
4430
4431 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4432 thread was doing a step-over; always adjust the PC if
4433 we stepped over a permanent breakpoint.
4434 (linux_wait_1): If we stepped over breakpoint that was on top of a
4435 permanent breakpoint, manually advance the PC past it.
4436
4437 2015-02-23 Pedro Alves <palves@redhat.com>
4438
4439 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4440 modes.
4441 (x86_fill_gregset, x86_store_gregset): Use it when handling
4442 $orig_eax.
4443
4444 2015-02-20 Pedro Alves <palves@redhat.com>
4445
4446 * thread-db.c: Include "nat/linux-procfs.h".
4447 (thread_db_init): Skip listing new threads if the kernel supports
4448 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4449
4450 2015-02-20 Pedro Alves <palves@redhat.com>
4451
4452 * linux-low.c (status_pending_p_callback): Use ptid_match.
4453
4454 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4455
4456 PR breakpoints/16812
4457 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4458 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4459 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4460
4461 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4462
4463 PR breakpoints/15956
4464 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4465
4466 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4467
4468 * linux-low.c (linux_low_btrace_conf): Print size.
4469 * server.c (handle_btrace_conf_general_set): New.
4470 (hanle_general_set): Call handle_btrace_conf_general_set.
4471 (handle_query): Report Qbtrace-conf:bts:size as supported.
4472
4473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4474
4475 * linux-low.c (linux_low_enable_btrace): Update parameters.
4476 (linux_low_btrace_conf): New.
4477 (linux_target_ops)<to_btrace_conf>: Initialize.
4478 * server.c (current_btrace_conf): New.
4479 (handle_btrace_enable): Rename to ...
4480 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4481 to target_enable_btrace. Update comment. Update users.
4482 (handle_qxfer_btrace_conf): New.
4483 (qxfer_packets): Add btrace-conf entry.
4484 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4485 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4486 (target_ops)<read_btrace_conf>: New.
4487 (target_enable_btrace): Update parameters.
4488 (target_read_btrace_conf): New.
4489
4490 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4491
4492 * server.c (handle_btrace_general_set): Remove call to
4493 target_supports_btrace.
4494 (supported_btrace_packets): New.
4495 (handle_query): Call supported_btrace_packets.
4496 * target.h: include btrace-common.h.
4497 (btrace_target_info): Removed.
4498 (supports_btrace, target_supports_btrace): Update parameters.
4499
4500 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4501
4502 * Makefile.in (SFILES): Add common/btrace-common.c.
4503 (OBS): Add common/btrace-common.o.
4504 (btrace-common.o): Add build rules.
4505 * linux-low: Include btrace-common.h.
4506 (linux_low_read_btrace): Use struct btrace_data. Call
4507 btrace_data_init and btrace_data_fini.
4508
4509 2015-02-06 Pedro Alves <palves@redhat.com>
4510
4511 * thread-db.c (find_new_threads_callback): Add debug output.
4512
4513 2015-02-04 Pedro Alves <palves@redhat.com>
4514
4515 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4516 (resume_stopped_resumed_lwps): New function.
4517 (linux_wait_for_event_filtered): Use it.
4518
4519 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4520
4521 * Makefile.in (SFILES): Add linux-personality.c.
4522 (linux-personality.o): New rule.
4523 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4524 list of objects to be built.
4525 * linux-low.c: Include nat/linux-personality.h.
4526 (linux_create_inferior): Remove code to disable address space
4527 randomization (moved to ../nat/linux-personality.c). Create
4528 cleanup to disable address space randomization.
4529
4530 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4531
4532 * Makefile.in (posix-strerror.o): New rule.
4533 (mingw-strerror.o): Likewise.
4534 * configure: Regenerated.
4535 * configure.ac: Source file ../common/common.host. Initialize new
4536 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4537
4538 2015-01-14 Yao Qi <yao@codesourcery.com>
4539
4540 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4541 (ppc-linux.o): New rule.
4542 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4543 * configure.ac: AC_CHECK_FUNCS(getauxval).
4544 * config.in: Re-generated.
4545 * configure: Re-generated.
4546 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4547 ppc64_64bit_inferior_p
4548
4549 2015-01-14 Yao Qi <yao@codesourcery.com>
4550
4551 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4552 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4553 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4554 (PT_ORIG_R3, PT_TRAP): Likewise.
4555 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4556 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4557 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4558
4559 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4560
4561 * i387-fp.c (i387_cache_to_xsave): In look over
4562 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4563 zmmh_low_space field by use of zmmh_high_space.
4564
4565 2015-01-09 Pedro Alves <palves@redhat.com>
4566
4567 * linux-low.c (step_over_bkpt): Move higher up in the file.
4568 (handle_extended_wait): Don't store the stop_pc here.
4569 (get_stop_pc): Adjust comments and rename to ...
4570 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4571 stopped for a software breakpoint or hardware breakpoint.
4572 (thread_still_has_status_pending_p): New function.
4573 (status_pending_p_callback): Use
4574 thread_still_has_status_pending_p. If the event is no longer
4575 interesting, resume the LWP.
4576 (handle_tracepoints): Add assert.
4577 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4578 (wstatus_maybe_breakpoint): New function.
4579 (cancel_breakpoint): Delete function.
4580 (check_stopped_by_watchpoint): New function, factored out from
4581 linux_low_filter_event.
4582 (lp_status_maybe_breakpoint): Delete function.
4583 (linux_low_filter_event): Remove filter_ptid argument.
4584 Leave thread group exits pending here. Store the LWP's stop PC.
4585 Always leave events pending.
4586 (linux_wait_for_event_filtered): Pull all events out of the
4587 kernel, and leave them all pending.
4588 (count_events_callback, select_event_lwp_callback): Consider all
4589 events.
4590 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4591 (select_event_lwp): Only give preference to the stepping LWP in
4592 all-stop mode. Adjust comments.
4593 (ignore_event): New function.
4594 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4595 references to cancel_breakpoints. Adjust to renames. Also give
4596 equal priority to all LWPs that have had events in non-stop mode.
4597 If reporting a software breakpoint event, unadjust the LWP's PC.
4598 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4599 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4600 Adjust.
4601 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4602 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4603 (linux_stopped_by_watchpoint): Adjust.
4604 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4605 * linux-low.h (enum lwp_stop_reason): New.
4606 (struct lwp_info) <stop_pc>: Adjust comment.
4607 <stopped_by_watchpoint>: Delete field.
4608 <stop_reason>: New field.
4609 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4610 * mem-break.c (software_breakpoint_inserted_here)
4611 (hardware_breakpoint_inserted_here): New function.
4612 * mem-break.h (software_breakpoint_inserted_here)
4613 (hardware_breakpoint_inserted_here): Declare.
4614 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4615 (cancel_breakpoints): Delete.
4616 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4617 (upload_fast_traceframes): Remove references to
4618 cancel_breakpoints.
4619
4620 2015-01-09 Pedro Alves <palves@redhat.com>
4621
4622 * thread-db.c (find_new_threads_callback): Ignore thread if the
4623 kernel thread ID is -1.
4624
4625 2015-01-09 Pedro Alves <palves@redhat.com>
4626
4627 * linux-low.c (linux_attach_fail_reason_string): Move to
4628 nat/linux-ptrace.c, and rename.
4629 (linux_attach_lwp): Update comment.
4630 (attach_proc_task_lwp_callback): New function.
4631 (linux_attach): Adjust to rename and use
4632 linux_proc_attach_tgid_threads.
4633 (linux_attach_fail_reason_string): Delete declaration.
4634
4635 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4636
4637 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4638 * server.c (gdbserver_version): Likewise.
4639
4640 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4641
4642 * remote-utils.c: Include ctype.h.
4643 (input_interrupt): Explicitly handle the case when the char
4644 received is the NUL byte. Improve the printing of non-ASCII
4645 characters.
4646
4647 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4648
4649 * linux-low.c (linux_low_filter_event): Update call to
4650 linux_enable_event_reporting following the addition of
4651 a new parameter to that function.
4652
4653 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4654
4655 PR server/17457
4656 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4657 (AARCH64_FPCR_REGNO): Likewise.
4658 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4659 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4660 (aarch64_store_fpregset): Likewise.
4661
4662 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4663
4664 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4665 Remove FIXME comment about assumption about N.
4666
4667 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4668
4669 * configure.ac: If large-file support is disabled in GDBserver,
4670 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4671 * configure: Regenerate.
4672
4673 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4674
4675 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4676 warning upon ENODATA from ptrace.
4677 * linux-s390-low.c (s390_store_tdb): New.
4678 (s390_regsets): Add regset for NT_S390_TDB.
4679
4680 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4681
4682 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4683 without a fill_function.
4684 * linux-s390-low.c (s390_fill_last_break): Remove.
4685 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4686 (s390_arch_setup): Use regset's size instead of fill_function for
4687 loop end condition.
4688
4689 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4690
4691 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4692 the regset's store function when ptrace returned an error.
4693 * regcache.c (get_thread_regcache): Invalidate register cache
4694 before fetching inferior's registers.
4695
4696 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4697
4698 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4699 while-loop as for-loop.
4700 (regsets_store_inferior_registers): Likewise.
4701
4702 2014-11-28 Yao Qi <yao@codesourcery.com>
4703
4704 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4705 * config.in, configure: Re-generate.
4706 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4707 is defined.
4708
4709 2014-11-21 Yao Qi <yao@codesourcery.com>
4710
4711 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4712 (AC_CHECK_HEADERS): Remove malloc.h.
4713 * configure: Re-generated.
4714 * config.in: Re-generated.
4715 * server.h: Don't include alloca.h and malloc.h.
4716 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4717 Don't include malloc.h.
4718
4719 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4720
4721 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4722 corresponding ERRNO check in same block.
4723
4724 2014-11-12 Pedro Alves <palves@redhat.com>
4725
4726 * server.c (cont_thread): Update comment.
4727 (start_inferior, attach_inferior): No longer clear cont_thread.
4728 (handle_v_cont): No longer set cont_thread.
4729 (captured_main): Clear cont_thread each time a GDB connects.
4730
4731 2014-11-12 Pedro Alves <palves@redhat.com>
4732
4733 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4734 thread, and don't resume all threads if the Hc thread has exited.
4735
4736 2014-11-12 Pedro Alves <palves@redhat.com>
4737
4738 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4739 the process group instead of to a specific LWP.
4740
4741 2014-10-15 Pedro Alves <palves@redhat.com>
4742
4743 PR server/17487
4744 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4745 parameter.
4746 (arm_set_thread_context): Delete.
4747 (the_low_target): Adjust.
4748 * win32-i386-low.c (debug_registers_changed)
4749 (debug_registers_used): Delete.
4750 (update_debug_registers_callback): New function.
4751 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4752 needing to update their debug registers.
4753 (win32_get_current_dr): New function.
4754 (x86_dr_low_get_addr, x86_dr_low_get_control)
4755 (x86_dr_low_get_status): Fetch the debug register from the thread
4756 record's context.
4757 (i386_initial_stuff): Adjust.
4758 (i386_get_thread_context): Remove current_event parameter. Don't
4759 clear debug_registers_changed nor copy DR values to
4760 debug_reg_state.
4761 (i386_set_thread_context): Delete.
4762 (i386_prepare_to_resume): New function.
4763 (i386_thread_added): Mark the thread as needing to update irs
4764 debug registers.
4765 (the_low_target): Remove i386_set_thread_context and install
4766 i386_prepare_to_resume.
4767 * win32-low.c (win32_get_thread_context): Adjust.
4768 (win32_set_thread_context): Use SetThreadContext
4769 directly.
4770 (win32_prepare_to_resume): New function.
4771 (win32_require_context): New function, factored out from ...
4772 (thread_rec): ... this.
4773 (continue_one_thread): Call win32_prepare_to_resume on each thread
4774 we're about to continue.
4775 (win32_resume): Call win32_prepare_to_resume on the event thread.
4776 * win32-low.h (struct win32_thread_info)
4777 <debug_registers_changed>: New field.
4778 (struct win32_target_ops): Change prototype of set_thread_context,
4779 delete set_thread_context and add prepare_to_resume.
4780 (win32_require_context): New declaration.
4781
4782 2014-10-08 Gary Benson <gbenson@redhat.com>
4783
4784 * server.h: Do not include common-exceptions.h.
4785
4786 2014-10-08 Gary Benson <gbenson@redhat.com>
4787
4788 * server.h: Do not include cleanups.h.
4789
4790 2014-09-30 James Hogan <james.hogan@imgtec.com>
4791
4792 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4793 mips64-dsp-linux.c.
4794
4795 2014-09-23 Yao Qi <yao@codesourcery.com>
4796
4797 * linux-low.c (lp_status_maybe_breakpoint): New function.
4798 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4799 (count_events_callback): Likewise.
4800 (select_event_lwp_callback): Likewise.
4801 (cancel_breakpoints_callback): Likewise.
4802
4803 2014-09-19 Don Breazeal <donb@codesourcery.com>
4804
4805 * linux-low.c (handle_extended_wait): Call
4806 linux_ptrace_get_extended_event.
4807 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4808 linux_is_extended_waitstatus.
4809
4810 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4811
4812 * Makefile.in (CPPFLAGS): Define.
4813 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4814 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4815
4816 2014-09-16 Gary Benson <gbenson@redhat.com>
4817
4818 * inferiors.h (current_inferior): Renamed as...
4819 (current_thread): New variable. All uses updated.
4820 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4821 (maybe_move_out_of_jump_pad): Likewise.
4822 (cancel_breakpoint): Likewise.
4823 (linux_low_filter_event): Likewise.
4824 (wait_for_sigstop): Likewise.
4825 (linux_resume_one_lwp): Likewise.
4826 (need_step_over_p): Likewise.
4827 (start_step_over): Likewise.
4828 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4829 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4830 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4831 and save_inferior as saved_thread.
4832 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4833 saved_thread.
4834 (regcache_invalidate_thread): Likewise.
4835 * remote-utils.c (prepare_resume_reply): Likewise.
4836 * thread-db.c (thread_db_get_tls_address): Likewise.
4837 (disable_thread_event_reporting): Likewise.
4838 (remove_thread_event_breakpoints): Likewise.
4839 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4840 as saved_thread.
4841 * target.h (set_desired_inferior): Renamed as...
4842 (set_desired_thread): New declaration. All uses updated.
4843 * server.c (myresume): Updated comment to reference thread instead
4844 of inferior.
4845 (handle_serial_event): Likewise.
4846 (handle_target_event): Likewise.
4847
4848 2014-09-12 Tom Tromey <tromey@redhat.com>
4849 Gary Benson <gbenson@redhat.com>
4850
4851 * regcache.h: Include common-regcache.h.
4852 (regcache_read_pc): Don't declare.
4853 * regcache.c (get_thread_regcache_for_ptid): New function.
4854
4855 2014-09-11 Tom Tromey <tromey@redhat.com>
4856 Gary Benson <gbenson@redhat.com>
4857
4858 * symbol.c: New file.
4859 * Makefile.in (SFILES): Add symbol.c.
4860 (OBS): Add symbol.o.
4861
4862 2014-09-11 Gary Benson <gbenson@redhat.com>
4863
4864 * target.c (target_stop_ptid, target_continue_ptid): New
4865 functions.
4866
4867 2014-09-11 Tom Tromey <tromey@redhat.com>
4868 Gary Benson <gbenson@redhat.com>
4869
4870 * target.h: Include target/target.h.
4871 * target.c (target_read_memory, target_read_uint32)
4872 (target_write_memory): New functions.
4873
4874 2014-09-11 Gary Benson <gbenson@redhat.com>
4875
4876 * server.h (debug_hw_points): Don't declare.
4877 * server.c (debug_hw_points): Don't define. Replace all uses
4878 with show_debug_regs.
4879 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4880 all uses with show_debug_regs.
4881
4882 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4883
4884 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4885 endianness into account.
4886 (ppc_supply_ptrace_register): Likewise.
4887
4888 2014-09-03 James Hogan <james.hogan@imgtec.com>
4889
4890 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4891 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4892
4893 2014-09-03 Gary Benson <gbenson@redhat.com>
4894
4895 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4896 ALL_DEBUG_ADDRESS_REGISTERS.
4897
4898 2014-09-02 Gary Benson <gbenson@redhat.com>
4899
4900 * i386-low.h: Renamed as...
4901 * x86-low.h: New file. All type, function and variable name
4902 prefixes changed from "i386_" to "x86_". All references updated.
4903 * i386-low.c: Renamed as...
4904 * x86-low.c: New file. All type, function and variable name
4905 prefixes changed from "i386_" to "x86_". All references updated.
4906
4907 2014-09-02 Gary Benson <gbenson@redhat.com>
4908
4909 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4910 (x86_linux_new_thread): Likewise.
4911
4912 2014-08-29 Gary Benson <gbenson@redhat.com>
4913
4914 * server.h (setjmp.h): Do not include.
4915 (toplevel): Do not declare.
4916 (common-exceptions.h): Include.
4917 (cleanups.h): Likewise.
4918 * server.c (toplevel): Do not define.
4919 (exit_code): New static global.
4920 (detach_or_kill_for_exit_cleanup): New function.
4921 (main): New function. Original main renamed to...
4922 (captured_main): New function.
4923 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4924
4925 2014-08-29 Gary Benson <gbenson@redhat.com>
4926
4927 * Makefile.in (SFILES): Add common/common-exceptions.c.
4928 (OBS): Add common-exceptions.o.
4929 (common-exceptions.o): New rule.
4930 * utils.c (prepare_to_throw_exception): New function.
4931
4932 2014-08-29 Gary Benson <gbenson@redhat.com>
4933
4934 * config.in: Regenerate.
4935 * configure: Likewise.
4936
4937 2014-08-29 Gary Benson <gbenson@redhat.com>
4938
4939 * Makefile.in (SFILES): Add common/cleanups.c.
4940 (OBS): cleanups.o.
4941 (cleanups.o): New rule.
4942
4943 2014-08-29 Gary Benson <gbenson@redhat.com>
4944
4945 * utils.c (internal_vwarning): New function.
4946
4947 2014-08-28 Gary Benson <gbenson@redhat.com>
4948
4949 * utils.h (fatal): Remove declaration.
4950 * utils.c (fatal): Remove function.
4951
4952 2014-08-28 Gary Benson <gbenson@redhat.com>
4953
4954 * tracepoint.c (gdb_agent_init): Replace fatal with
4955 perror_with_name.
4956 (initialize_tracepoint): Likewise.
4957
4958 2014-08-28 Gary Benson <gbenson@redhat.com>
4959
4960 * remote-utils.c (remote_prepare): Replace fatal with error.
4961
4962 2014-08-28 Gary Benson <gbenson@redhat.com>
4963
4964 * linux-low.c (linux_async): Replace fatal with warning.
4965 Tidy up and return.
4966 (linux_start_non_stop): Return -1 if linux_async failed.
4967
4968 2014-08-28 Gary Benson <gbenson@redhat.com>
4969
4970 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4971 gdb_assert.
4972 (i386_dr_low_get_addr): Remove vague comment.
4973 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4974 gdb_assert.
4975
4976 2014-08-28 Gary Benson <gbenson@redhat.com>
4977
4978 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4979 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4980 internal_error.
4981 (linux_resume_one_lwp): Likewise.
4982 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4983 gdb_assert.
4984 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4985 with internal_error.
4986 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4987 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4988 (find_register_by_name): Replace fatal with internal_error.
4989 (find_regno): Likewise.
4990 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4991 * thread-db.c (thread_db_create_event): Likewise.
4992 (thread_db_load_search): Likewise.
4993 (try_thread_db_load_1): Likewise.
4994 * tracepoint.c (get_jump_space_head): Replace fatal with
4995 internal_error.
4996 (claim_trampoline_space): Likewise.
4997 (have_fast_tracepoint_trampoline_buffer): Likewise.
4998 (cmd_qtstart): Likewise.
4999 (stop_tracing): Likewise.
5000 (fast_tracepoint_collecting): Likewise.
5001 (target_malloc): Likewise.
5002 (download_tracepoint): Likewise.
5003 (download_trace_state_variables): Replace check with gdb_assert.
5004 (upload_fast_traceframes): Replace fatal with internal_error.
5005
5006 2014-08-19 Tom Tromey <tromey@redhat.com>
5007 Gary Benson <gbenson@redhat.com>
5008
5009 * Makefile.in (SFILES): Add common/common-debug.c.
5010 (OBS): Add common-debug.o.
5011 (common-debug.o): New rule.
5012 * debug.h (debug_printf): Don't declare.
5013 * debug.c (debug_printf): Renamed and rewritten as...
5014 (debug_vprintf): New function.
5015
5016 2014-08-19 Gary Benson <gbenson@redhat.com>
5017
5018 * utils.h: Do not include print-utils.h.
5019
5020 2014-08-19 Tom Tromey <tromey@redhat.com>
5021 Gary Benson <gbenson@redhat.com>
5022
5023 * server.h: Add static assertion.
5024 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5025
5026 2014-08-19 Tom Tromey <tromey@redhat.com>
5027 Gary Benson <gbenson@redhat.com>
5028
5029 * Makefile.in (SFILES): Add common/errors.c.
5030 (OBS): Add errors.o.
5031 (IPA_OBS): Add errors-ipa.o.
5032 (errors.o): New rule.
5033 (errors-ipa.o): Likewise.
5034 * utils.h (perror_with_name, error, warning): Don't declare.
5035 * utils.c (warning): Renamed and rewritten as...
5036 (vwarning): New function.
5037 (error): Renamed and rewritten as...
5038 (verror): New function.
5039 (internal_error): Renamed and rewritten as...
5040 (internal_verror): New function.
5041
5042 2014-08-07 Gary Benson <gbenson@redhat.com>
5043
5044 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5045 * configure: Regenerate.
5046 * config.in: Likewise.
5047 * server.h: Do not include errno.h.
5048 * event-loop.c: Likewise.
5049 * hostio-errno.c: Likewise.
5050 * linux-low.c: Likewise.
5051 * remote-utils.c: Likewise.
5052 * spu-low.c: Likewise.
5053 * utils.c: Likewise.
5054 * gdbreplay.c: Unconditionally include errno.h.
5055
5056 2014-08-07 Gary Benson <gbenson@redhat.com>
5057
5058 * server.h: Do not include string.h.
5059 * event-loop.c: Likewise.
5060 * linux-low.c: Likewise.
5061 * regcache.c: Likewise.
5062 * remote-utils.c: Likewise.
5063 * spu-low.c: Likewise.
5064 * utils.c: Likewise.
5065
5066 2014-08-07 Gary Benson <gbenson@redhat.com>
5067
5068 * server.h: Do not include gdb_assert.h.
5069
5070 2014-08-07 Gary Benson <gbenson@redhat.com>
5071
5072 * server.h: Do not include common-utils.h.
5073
5074 2014-08-07 Gary Benson <gbenson@redhat.com>
5075
5076 * server.h: Do not include ptid.h.
5077 * notif.h: Likewise.
5078
5079 2014-08-07 Gary Benson <gbenson@redhat.com>
5080
5081 * server.h: Do not include gdb_locale.h.
5082
5083 2014-08-07 Gary Benson <gbenson@redhat.com>
5084
5085 * server.h: Do not include gdb/signals.h.
5086 * win32-low.c: Likewise.
5087
5088 2014-08-07 Gary Benson <gbenson@redhat.com>
5089
5090 * server.h: Do not include pathmax.h.
5091
5092 2014-08-07 Gary Benson <gbenson@redhat.com>
5093
5094 * server.h: Do not include libiberty.h.
5095 * linux-bfin-low.c: Likewise.
5096
5097 2014-08-07 Gary Benson <gbenson@redhat.com>
5098
5099 * server.h: Do not include ansidecl.h.
5100
5101 2014-08-07 Gary Benson <gbenson@redhat.com>
5102
5103 * linux-x86-low.c: Do not include stddef.h.
5104 * lynx-ppc-low.c: Likewise.
5105 * tracepoint.c: Likewise.
5106
5107 2014-08-07 Gary Benson <gbenson@redhat.com>
5108
5109 * server.h: Do not include stdarg.h.
5110 * nto-low.c: Likewise.
5111
5112 2014-08-07 Gary Benson <gbenson@redhat.com>
5113
5114 * server.h: Do not include stdlib.h.
5115 * inferiors.c: Likewise.
5116 * linux-low.c: Likewise.
5117 * regcache.c: Likewise.
5118 * spu-low.c: Likewise.
5119 * tracepoint.c: Likewise.
5120 * utils.c: Likewise.
5121
5122 2014-08-07 Gary Benson <gbenson@redhat.com>
5123
5124 * server.h: Do not include stdio.h.
5125 * linux-low.c: Likewise.
5126 * remote-utils.c: Likewise.
5127 * spu-low.c: Likewise.
5128 * utils.c: Likewise.
5129 * wincecompat.c: Likewise.
5130
5131 2014-08-06 Gary Benson <gbenson@redhat.com>
5132
5133 * regcache.c (init_register_cache): Move conditionals inside if.
5134
5135 2014-08-06 Gary Benson <gbenson@redhat.com>
5136
5137 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5138
5139 2014-07-31 Gary Benson <gbenson@redhat.com>
5140
5141 * ax.h: Do not include server.h.
5142 * gdbthread.h: Likewise.
5143 * lynx-low.h: Likewise.
5144 * notif.h: Likewise.
5145
5146 2014-07-30 Gary Benson <gbenson@redhat.com>
5147
5148 * server.h: Include common-defs.h.
5149 Do not include config.h or build-gnulib-gdbserver/config.h.
5150
5151 2014-07-30 Gary Benson <gbenson@redhat.com>
5152
5153 * hostio-errno.c: Move server.h to top of includes list.
5154 * inferiors.c: Likewise.
5155 * linux-x86-low.c: Likewise.
5156 * notif.c: Include server.h.
5157
5158 2014-07-24 Tom Tromey <tromey@redhat.com>
5159 Gary Benson <gbenson@redhat.com>
5160
5161 * server.h (CORE_ADDR): Now unsigned.
5162
5163 2014-07-16 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5166
5167 2014-07-15 Pedro Alves <palves@redhat.com>
5168
5169 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5170 copy.
5171
5172 2014-07-11 Pedro Alves <palves@redhat.com>
5173
5174 * linux-low.c (kill_wait_lwp): New function, based on
5175 kill_one_lwp_callback, but use my_waitpid directly.
5176 (kill_one_lwp_callback, linux_kill): Use it.
5177
5178 2014-06-23 Pedro Alves <palves@redhat.com>
5179
5180 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5181 before setting DR0..DR3.
5182
5183 2014-06-20 Gary Benson <gbenson@redhat.com>
5184
5185 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5186 * configure: Regenerated.
5187 * config.in: Likewise.
5188
5189 2014-06-20 Gary Benson <gbenson@redhat.com>
5190
5191 * Makefile.in (SFILES): Update locations for files moved
5192 from common to nat.
5193 (object file files): Reordered.
5194
5195 2014-06-20 Gary Benson <gbenson@redhat.com>
5196
5197 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5198 (i386_dr_low_set_addr): Likewise.
5199 (i386_dr_low_get_addr): Likewise.
5200 (i386_dr_low_can_set_control): Likewise.
5201 (i386_dr_low_set_control): Likewise.
5202 (i386_dr_low_get_control): Likewise.
5203 (i386_dr_low_get_status): Likewise.
5204 (i386_get_debug_register_length): Likewise.
5205 * linux-x86-low.c (i386_dr_low_set_addr):
5206 Changed signature. Made static.
5207 (i386_dr_low_get_addr): Likewise.
5208 (i386_dr_low_set_control): Likewise.
5209 (i386_dr_low_get_control): Likewise.
5210 (i386_dr_low_get_status): Likewise.
5211 (i386_dr_low): New global variable.
5212 * win32-i386-low.c (i386_dr_low_set_addr):
5213 Changed signature. Made static.
5214 (i386_dr_low_get_addr): Likewise.
5215 (i386_dr_low_set_control): Likewise.
5216 (i386_dr_low_get_control): Likewise.
5217 (i386_dr_low_get_status): Likewise.
5218 (i386_dr_low): New global variable.
5219
5220 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5221
5222 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5223 * Makefile.in (AR, AR_FLAGS): Define.
5224 * configure: Regenerate.
5225
5226 2014-06-19 Gary Benson <gbenson@redhat.com>
5227
5228 * Makefile.in (i386-dregs.o): New rule.
5229 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5230 * i386-low.c (target.h): Remove include.
5231 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5232 (DR_CONTROL_SHIFT): Likewise.
5233 (DR_CONTROL_SIZE): Likewise.
5234 (DR_RW_EXECUTE): Likewise.
5235 (DR_RW_WRITE): Likewise.
5236 (DR_RW_READ): Likewise.
5237 (DR_RW_IORW): Likewise.
5238 (DR_LEN_1): Likewise.
5239 (DR_LEN_2): Likewise.
5240 (DR_LEN_4): Likewise.
5241 (DR_LEN_8): Likewise.
5242 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5243 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5244 (DR_ENABLE_SIZE): Likewise.
5245 (DR_LOCAL_SLOWDOWN): Likewise.
5246 (DR_GLOBAL_SLOWDOWN): Likewise.
5247 (DR_CONTROL_RESERVED): Likewise.
5248 (I386_DR_CONTROL_MASK): Likewise.
5249 (I386_DR_VACANT): Likewise.
5250 (I386_DR_LOCAL_ENABLE): Likewise.
5251 (I386_DR_GLOBAL_ENABLE): Likewise.
5252 (I386_DR_DISABLE): Likewise.
5253 (I386_DR_SET_RW_LEN): Likewise.
5254 (I386_DR_GET_RW_LEN): Likewise.
5255 (I386_DR_WATCH_HIT): Likewise.
5256 (i386_wp_op_t): Likewise.
5257 (i386_show_dr): Likewise.
5258 (i386_length_and_rw_bits): Likewise.
5259 (i386_insert_aligned_watchpoint): Likewise.
5260 (i386_remove_aligned_watchpoint): Likewise.
5261 (i386_handle_nonaligned_watchpoint): Likewise.
5262 i386_update_inferior_debug_regs(): Likewise.
5263 (i386_dr_insert_watchpoint): Likewise.
5264 (i386_dr_remove_watchpoint): Likewise.
5265 (i386_dr_region_ok_for_watchpoint): Likewise.
5266 (i386_dr_stopped_data_address): Likewise.
5267 (i386_dr_stopped_by_watchpoint): Likewise.
5268
5269 2014-06-19 Gary Benson <gbenson@redhat.com>
5270
5271 * i386-low.c (i386_dr_show): Renamed to
5272 i386_show_dr and made static. All uses updated.
5273 (i386_dr_length_and_rw_bits): Renamed to
5274 i386_length_and_rw_bits and made static.
5275 All uses updated.
5276 (i386_dr_insert_aligned_watchpoint): Renamed to
5277 i386_insert_aligned_watchpoint and made static.
5278 All uses updated.
5279 (i386_dr_remove_aligned_watchpoint): Renamed to
5280 i386_remove_aligned_watchpoint and made static.
5281 All uses updated.
5282 (i386_dr_update_inferior_debug_regs): Renamed to
5283 i386_update_inferior_debug_regs and made static.
5284 All uses updated.
5285
5286 2014-06-18 Gary Benson <gbenson@redhat.com>
5287
5288 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5289 (i386_dr_low_can_set_control): Likewise.
5290 (i386_get_debug_register_length): Likewise.
5291 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5292 (i386_dr_low_can_set_control): Likewise.
5293 (i386_get_debug_register_length): Likewise.
5294
5295 2014-06-17 Gary Benson <gbenson@redhat.com>
5296
5297 * i386-low.h (i386-dregs.h): New include.
5298 (DR_FIRSTADDR): Now in i386-dregs.h.
5299 (DR_LASTADDR): Likewise.
5300 (DR_NADDR): Likewise.
5301 (DR_STATUS): Likewise.
5302 (DR_CONTROL): Likewise.
5303 (i386_debug_reg_state): Likewise.
5304 (i386_dr_insert_watchpoint): Likewise.
5305 (i386_dr_remove_watchpoint): Likewise.
5306 (i386_dr_region_ok_for_watchpoint): Likewise.
5307 (i386_dr_stopped_data_address): Likewise.
5308 (i386_dr_stopped_by_watchpoint): Likewise.
5309 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5310
5311 2014-06-18 Gary Benson <gbenson@redhat.com>
5312
5313 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5314 i386_dr_insert_watchpoint.
5315 (i386_low_remove_watchpoint): Renamed to
5316 i386_dr_remove_watchpoint.
5317 (i386_low_region_ok_for_watchpoint): Renamed to
5318 i386_dr_region_ok_for_watchpoint.
5319 (i386_low_stopped_data_address): Renamed to
5320 i386_dr_stopped_data_address.
5321 (i386_low_stopped_by_watchpoint): Renamed to
5322 i386_dr_stopped_by_watchpoint.
5323 * i386-low.c (i386_show_dr): Renamed to
5324 i386_dr_show and made nonstatic. All uses updated.
5325 (i386_length_and_rw_bits): Renamed to
5326 i386_dr_length_and_rw_bits and made nonstatic.
5327 All uses updated.
5328 (i386_insert_aligned_watchpoint): Renamed to
5329 i386_dr_insert_aligned_watchpoint and made nonstatic.
5330 All uses updated.
5331 (i386_remove_aligned_watchpoint): Renamed to
5332 i386_dr_remove_aligned_watchpoint and made nonstatic.
5333 All uses updated.
5334 (i386_update_inferior_debug_regs): Renamed to
5335 i386_dr_update_inferior_debug_regs and made nonstatic.
5336 All uses updated.
5337 (i386_low_insert_watchpoint): Renamed to
5338 i386_dr_insert_watchpoint. All uses updated.
5339 (i386_low_remove_watchpoint): Renamed to
5340 i386_dr_remove_watchpoint. All uses updated.
5341 (i386_low_region_ok_for_watchpoint): Renamed to
5342 i386_dr_region_ok_for_watchpoint. All uses updated.
5343 (i386_low_stopped_data_address): Renamed to
5344 i386_dr_stopped_data_address. All uses updated.
5345 (i386_low_stopped_by_watchpoint): Renamed to
5346 i386_dr_stopped_by_watchpoint. All uses updated.
5347
5348 2014-06-18 Gary Benson <gbenson@redhat.com>
5349
5350 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5351 (i386_dr_low_can_set_control): Likewise.
5352 (i386_insert_aligned_watchpoint): New check.
5353
5354 2014-06-18 Gary Benson <gbenson@redhat.com>
5355
5356 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5357 Renamed to state.
5358
5359 2014-06-18 Gary Benson <gbenson@redhat.com>
5360
5361 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5362 instead of fatal and error.
5363 (i386_handle_nonaligned_watchpoint): Likewise.
5364
5365 2014-06-18 Gary Benson <gbenson@redhat.com>
5366
5367 * i386-low.c (i386_get_debug_register_length): New macro.
5368 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5369 (i386_show_dr): Use debug_printf instead of fprintf. Use
5370 phex to format values.
5371
5372 2014-06-18 Gary Benson <gbenson@redhat.com>
5373
5374 * i386-low.h: Comment changes.
5375 * i386-low.c: Likewise.
5376
5377 2014-06-18 Gary Benson <gbenson@redhat.com>
5378
5379 * i386-low.c: Whitespace changes.
5380
5381 2014-06-12 Tom Tromey <tromey@redhat.com>
5382
5383 * utils.c (freeargv): Remove.
5384
5385 2014-06-12 Tom Tromey <tromey@redhat.com>
5386
5387 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5388 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5389 (parse_debug_format_options): Likewise.
5390 (gdbserver_usage): Likewise.
5391 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5392 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5393 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5394 against libiberty.
5395 ($(LIBGNU)): Depend on libiberty.
5396 (all-lib): Recurse into all subdirs.
5397 (install-only): Invoke "install" target in subdirs.
5398 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5399 targets.
5400 * configure: Rebuild.
5401 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5402 for vasprintf, vsnprintf, or gettimeofday.
5403 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5404 srv_tgtobj.
5405
5406 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5407
5408 * development.sh: Delete.
5409 * Makefile.in (config.status): Adjust dependency on development.sh.
5410 * configure.ac: Adjust development.sh source call.
5411 * configure: Regenerate.
5412
5413 2014-06-02 Pedro Alves <palves@redhat.com>
5414
5415 * ax.c (gdb_free_agent_expr): New function.
5416 * ax.h (gdb_free_agent_expr): New declaration.
5417 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5418 list.
5419 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5420 static.
5421 (clear_breakpoint_conditions_and_commands): New function.
5422 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5423 (clear_breakpoint_conditions_and_commands): New declaration.
5424
5425 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5426
5427 * linux-aarch64-low.c (asm/ptrace.h): Include.
5428
5429 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5430
5431 Fix TLS access for -static -pthread.
5432 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5433 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5434 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5435
5436 2014-05-20 Pedro Alves <palves@redhat.com>
5437
5438 * linux-aarch64-low.c (aarch64_insert_point)
5439 (aarch64_remove_point): No longer check whether the type is
5440 supported here. Adjust to new interface.
5441 (the_low_target): Install aarch64_supports_z_point_type as
5442 supports_z_point_type method.
5443 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5444 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5445 instead of a Z packet char. Adjust.
5446 (arm_supports_z_point_type): New function.
5447 (arm_insert_point, arm_remove_point): Adjust to new interface.
5448 (the_low_target): Install arm_supports_z_point_type.
5449 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5450 (cris_insert_point, cris_remove_point): Adjust to new interface.
5451 Don't check whether the type is supported here.
5452 (the_low_target): Install cris_supports_z_point_type.
5453 * linux-low.c (linux_supports_z_point_type): New function.
5454 (linux_insert_point, linux_remove_point): Adjust to new interface.
5455 * linux-low.h (struct linux_target_ops) <insert_point,
5456 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5457 raw_breakpoint pointer parameter.
5458 <supports_z_point_type>: New method.
5459 * linux-mips-low.c (mips_supports_z_point_type): New function.
5460 (mips_insert_point, mips_remove_point): Adjust to new interface.
5461 Use mips_supports_z_point_type.
5462 (the_low_target): Install mips_supports_z_point_type.
5463 * linux-ppc-low.c (the_low_target): Install NULL as
5464 supports_z_point_type method.
5465 * linux-s390-low.c (the_low_target): Install NULL as
5466 supports_z_point_type method.
5467 * linux-sparc-low.c (the_low_target): Install NULL as
5468 supports_z_point_type method.
5469 * linux-x86-low.c (x86_supports_z_point_type): New function.
5470 (x86_insert_point): Adjust to new insert_point interface. Use
5471 insert_memory_breakpoint. Adjust to new
5472 i386_low_insert_watchpoint interface.
5473 (x86_remove_point): Adjust to remove_point interface. Use
5474 remove_memory_breakpoint. Adjust to new
5475 i386_low_remove_watchpoint interface.
5476 (the_low_target): Install x86_supports_z_point_type.
5477 * lynx-low.c (lynx_target_ops): Install NULL as
5478 supports_z_point_type callback.
5479 * nto-low.c (nto_supports_z_point_type): New.
5480 (nto_insert_point, nto_remove_point): Adjust to new interface.
5481 (nto_target_ops): Install nto_supports_z_point_type.
5482 * mem-break.c: Adjust intro comment.
5483 (struct raw_breakpoint) <raw_type, size>: New fields.
5484 <inserted>: Update comment.
5485 <shlib_disabled>: Delete field.
5486 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5487 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5488 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5489 (raw_bkpt_type_to_target_hw_bp_type): New function.
5490 (find_enabled_raw_code_breakpoint_at): New function.
5491 (find_raw_breakpoint_at): New type and size parameters. Use them.
5492 (insert_memory_breakpoint): New function, based off
5493 set_raw_breakpoint_at.
5494 (remove_memory_breakpoint): New function.
5495 (set_raw_breakpoint_at): Reimplement.
5496 (set_breakpoint): New, based on set_breakpoint_at.
5497 (set_breakpoint_at): Reimplement.
5498 (delete_raw_breakpoint): Go through the_target->remove_point
5499 instead of assuming memory breakpoints.
5500 (find_gdb_breakpoint_at): Delete.
5501 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5502 (find_gdb_breakpoint): New function.
5503 (set_gdb_breakpoint_at): Delete.
5504 (z_type_supported): New function.
5505 (set_gdb_breakpoint_1): New function, loosely based off
5506 set_gdb_breakpoint_at.
5507 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5508 (delete_gdb_breakpoint_at): Delete.
5509 (delete_gdb_breakpoint_1): New function, loosely based off
5510 delete_gdb_breakpoint_at.
5511 (delete_gdb_breakpoint): New function.
5512 (clear_gdb_breakpoint_conditions): Rename to ...
5513 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5514 breakpoint.
5515 (add_condition_to_breakpoint): Make static.
5516 (add_breakpoint_condition): Take a struct breakpoint pointer
5517 instead of an address. Adjust.
5518 (gdb_condition_true_at_breakpoint): Rename to ...
5519 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5520 z_type parameter.
5521 (gdb_condition_true_at_breakpoint): Reimplement.
5522 (add_breakpoint_commands): Take a struct breakpoint pointer
5523 instead of an address. Adjust.
5524 (gdb_no_commands_at_breakpoint): Rename to ...
5525 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5526 parameter. Return true if no breakpoint was found. Change debug
5527 output.
5528 (gdb_no_commands_at_breakpoint): Reimplement.
5529 (run_breakpoint_commands): Rename to ...
5530 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5531 and change return type to boolean.
5532 (run_breakpoint_commands): New function.
5533 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5534 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5535 breakpoint. Go through the_target->remove_point instead of
5536 assuming memory breakpoint.
5537 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5538 software and hardware breakpoints.
5539 (reinsert_raw_breakpoint): Go through the_target->insert_point
5540 instead of assuming memory breakpoint.
5541 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5542 software and hardware breakpoints.
5543 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5544 Check both software and hardware breakpoints.
5545 (validate_inserted_breakpoint): Assert the breakpoint is a
5546 software breakpoint. Set the inserted flag to -1 instead of
5547 setting shlib_disabled.
5548 (delete_disabled_breakpoints): Adjust.
5549 (validate_breakpoints): Only validate software breakpoints.
5550 Adjust to inserted flag change.
5551 (check_mem_read, check_mem_write): Skip breakpoint types other
5552 than software breakpoints. Adjust to inserted flag change.
5553 * mem-break.h (enum raw_bkpt_type): New enum.
5554 (raw_breakpoint, struct process_info): Forward declare.
5555 (Z_packet_to_target_hw_bp_type): Delete declaration.
5556 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5557 (set_gdb_breakpoint, delete_gdb_breakpoint)
5558 (clear_breakpoint_conditions): New declarations.
5559 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5560 (breakpoint_inserted_here): Update comment.
5561 (add_breakpoint_condition, add_breakpoint_commands): Replace
5562 address parameter with a breakpoint pointer parameter.
5563 (gdb_breakpoint_here): Update comment.
5564 (delete_gdb_breakpoint_at): Delete.
5565 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5566 * server.c (process_point_options): Take a struct breakpoint
5567 pointer instead of an address. Adjust.
5568 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5569 delete_gdb_breakpoint.
5570 * spu-low.c (spu_target_ops): Install NULL as
5571 supports_z_point_type method.
5572 * target.h: Include mem-break.h.
5573 (struct target_ops) <prepare_to_access_memory>: Update comment.
5574 <supports_z_point_type>: New field.
5575 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5576 instead of a char. Also take a raw breakpoint pointer.
5577 * win32-arm-low.c (the_low_target): Install NULL as
5578 supports_z_point_type.
5579 * win32-i386-low.c (i386_supports_z_point_type): New function.
5580 (i386_insert_point, i386_remove_point): Adjust to new interface.
5581 (the_low_target): Install i386_supports_z_point_type.
5582 * win32-low.c (win32_supports_z_point_type): New function.
5583 (win32_insert_point, win32_remove_point): Adjust to new interface.
5584 (win32_target_ops): Install win32_supports_z_point_type.
5585 * win32-low.h (struct win32_target_ops):
5586 <supports_z_point_type>: New method.
5587 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5588 instead of a char. Also take a raw breakpoint pointer.
5589
5590 2014-05-20 Pedro Alves <palves@redhat.com>
5591
5592 * mem-break.h: Include break-common.h.
5593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5595 (Z_packet_to_target_hw_bp_type): New declaration.
5596 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5597 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5598 (Z_PACKET_ACCESS_WP): Delete macros.
5599 (Z_packet_to_hw_type): Delete function.
5600 * i386-low.h: Don't include break-common.h here.
5601 (Z_packet_to_hw_type): Delete declaration.
5602 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5603 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5604 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5605 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5606 * linux-aarch64-low.c: Don't include break-common.h here.
5607 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5608 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5609 (Z_packet_to_target_hw_bp_type): Delete function.
5610 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5611 function.
5612 (mips_insert_point, mips_remove_point): Use
5613 Z_packet_to_target_hw_bp_type.
5614
5615 2014-05-20 Pedro Alves <palves@redhat.com>
5616
5617 * linux-aarch64-low.c: Include break-common.h.
5618 (enum target_point_type): Delete.
5619 (Z_packet_to_point_type): Rename to ...
5620 (Z_packet_to_target_hw_bp_type): ... this, and return a
5621 target_hw_bp_type instead.
5622 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5623 instead of an enum target_point_type.
5624 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5625 breakpoint type.
5626 (aarch64_dr_state_insert_one_point)
5627 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5628 (aarch64_handle_aligned_watchpoint)
5629 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5630 Take an enum target_hw_bp_type instead of an enum
5631 target_point_type.
5632 (aarch64_supports_z_point_type): New function.
5633 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5634 use Z_packet_to_target_hw_bp_type.
5635
5636 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5637
5638 * configure.ac: Only use -Werror by default when DEVELOPMENT
5639 is true.
5640 * configure: Regenerate.
5641
5642 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5643
5644 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5645 * linux-x86-low.c (X86_64_USER_REGS): New.
5646 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5647
5648 2014-04-28 Yao Qi <yao@codesourcery.com>
5649
5650 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5651 name.
5652
5653 2014-04-25 Pedro Alves <palves@redhat.com>
5654
5655 PR server/16255
5656 * linux-low.c (linux_attach_fail_reason_string): New function.
5657 (linux_attach_lwp): Delete.
5658 (linux_attach_lwp_1): Rename to ...
5659 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5660 argument. Remove "initial" parameter. Return int instead of
5661 void. Don't error or warn here.
5662 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5663 failure to attach to the tgid. Call warning when failing to
5664 attach to an lwp.
5665 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5666 argument. Remove "initial" parameter. Return int instead of
5667 void. Don't error or warn here.
5668 (linux_attach_fail_reason_string): New declaration.
5669 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5670 interface change. Use linux_attach_fail_reason_string.
5671
5672 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5673 Walfred Tedeschi <walfred.tedeschi@intel.com>
5674
5675 * Makefile.in: Added rules to handle new files
5676 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5677 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5678 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5679 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5680 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5681 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5682 x32-avx512-linux.o.
5683 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5684 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5685 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5686 i386/x32-avx512.xml.
5687 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5688 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5689 i386/x32-avx512-linux.xml.
5690 * i387-fp.c (num_avx512_k_registers): New constant for number
5691 of K registers.
5692 (num_avx512_zmmh_low_registers): New constant for number of
5693 lower ZMM registers (0-15).
5694 (num_avx512_zmmh_high_registers): New constant for number of
5695 higher ZMM registers (16-31).
5696 (num_avx512_ymmh_registers): New contant for number of higher
5697 YMM registers (ymm16-31 added by avx521 on x86_64).
5698 (num_avx512_xmm_registers): New constant for number of higher
5699 XMM registers (xmm16-31 added by AVX512 on x86_64).
5700 (struct i387_xsave): Add space for AVX512 registers.
5701 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5702 Add code to handle AVX512 registers.
5703 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5704 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5705 prototypei from generated file.
5706 (tdesc_amd64_avx512_linux): Likewise.
5707 (init_registers_x32_avx512_linux): Likewise.
5708 (tdesc_x32_avx512_linux): Likewise.
5709 (init_registers_i386_avx512_linux): Likewise.
5710 (tdesc_i386_avx512_linux): Likewise.
5711 (x86_64_regmap): Add AVX512 registers.
5712 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5713 mask.
5714 (initialize_low_arch): Add code to initialize AVX512 registers.
5715
5716 2014-04-23 Pedro Alves <palves@redhat.com>
5717
5718 * mem-break.c (find_gdb_breakpoint_at): Make static.
5719 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5720
5721 2014-04-23 Pedro Alves <palves@redhat.com>
5722
5723 * i386-low.c: Don't include break-common.h here.
5724 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5725 prototype to take target_hw_bp_type as argument instead of a Z
5726 packet char.
5727 * i386-low.h: Include break-common.h here.
5728 (Z_packet_to_hw_type): Declare.
5729 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5730 prototypes.
5731 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5732 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5733 (x86_remove_point): Convert the packet number to a
5734 target_hw_bp_type before calling i386_low_remove_watchpoint.
5735 * win32-i386-low.c (i386_insert_point): Convert the packet number
5736 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5737 (i386_remove_point): Convert the packet number to a
5738 target_hw_bp_type before calling i386_low_remove_watchpoint.
5739
5740 2014-04-23 Pedro Alves <palves@redhat.com>
5741
5742 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5743
5744 2014-04-10 Pedro Alves <palves@redhat.com>
5745
5746 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5747 Check if the condition or command is NULL before checking if the
5748 breakpoint is known. On success, return true.
5749 * mem-break.h (add_breakpoint_condition): Document return.
5750 (add_breakpoint_commands): Add describing comment.
5751 * server.c (skip_to_semicolon): New function.
5752 (process_point_options): Use it.
5753
5754 2014-04-09 Pedro Alves <palves@redhat.com>
5755
5756 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5757 to lwpid_of.
5758
5759 2014-02-27 Pedro Alves <palves@redhat.com>
5760
5761 PR 12702
5762 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5763 macros.
5764 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5765 output.
5766 (last_thread_of_process_p): Take a PID argument instead of a
5767 thread pointer.
5768 (linux_wait_for_lwp): Delete.
5769 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5770 functions.
5771 (linux_low_filter_event): New function, party factored out from
5772 linux_wait_for_event.
5773 (linux_wait_for_event): Rename to ...
5774 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5775 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5776 sigsuspend. Check for zombie leaders.
5777 (linux_wait_for_event): Reimplement as wrapper around
5778 linux_wait_for_event_filtered.
5779 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5780 a normal or signal exit is seen, it's the whole process exiting.
5781 (wait_for_sigstop): No longer a for_each_inferior callback.
5782 Rewrite on top of linux_wait_for_event_filtered.
5783 (stop_all_lwps): Call wait_for_sigstop directly.
5784 * server.c (resume, handle_target_event): Handle
5785 TARGET_WAITKIND_NO_RESUMED.
5786
5787 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5788
5789 * win32-low.c (psapi_get_dll_name,
5790 * win32_CreateToolhelp32Snapshot): Delete.
5791 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5792 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5793 Delete.
5794 (handle_load_dll): Add function description.
5795 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5796
5797 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5798
5799 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5800 Add comment.
5801 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5802 base address when calling win32_add_one_solib.
5803 (handle_load_dll): Delete local variable load_addr.
5804 Remove 0x1000 offset applied to DLL base address when calling
5805 win32_add_one_solib.
5806 (handle_unload_dll): Add comment.
5807
5808 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5809
5810 * win32-low.c (win32_add_all_dlls): Renames
5811 win32_ensure_ntdll_loaded. Rewrite function documentation.
5812 Adjust implementation to always load all DLLs.
5813 Add 0x1000 offset to DLL base address when calling
5814 win32_add_one_solib.
5815 (child_initialization_done): New static global.
5816 (do_initial_child_stuff): Set child_initialization_done to
5817 zero during child initialization, and 1 after. Replace call
5818 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5819 Add comment.
5820 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5821 (handle_unload_dll): Add function documentation.
5822 (get_child_debug_event): Ignore load and unload DLL events
5823 during child initialization.
5824
5825 2014-02-20 Doug Evans <dje@google.com>
5826
5827 Remove global all_lwps.
5828 * inferiors.h (ptid_of): Move here from linux-low.h.
5829 (pid_of, lwpid_of): Ditto.
5830 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5831 parameter is a struct thread_info * now.
5832 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5833 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5834 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5835 directly.
5836 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5837 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5838 * linux-arm-low.c (update_registers_callback): Update, "entry"
5839 parameter is a struct thread_info * now.
5840 Fetch lwpid from current_inferior directly.
5841 (arm_insert_point): Pass &all_threads to find_inferior instead of
5842 &all_lwps.
5843 (arm_remove_point): Ditto.
5844 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5845 (arm_prepare_to_resume): Fetch pid from thread.
5846 (arm_read_description): Fetch lwpid from current_inferior directly.
5847 * linux-low.c (all_lwps): Delete.
5848 (delete_lwp): Delete call to remove_inferior.
5849 (handle_extended_wait): Fetch lwpid from thread.
5850 (add_lwp): Don't set lwp->entry.id. Remove call to
5851 add_inferior_to_list.
5852 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5853 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5854 (kill_one_lwp_callback): Ditto.
5855 (linux_kill): Don't dereference NULL pointer.
5856 Fetch ptid,lwpid from thread.
5857 (get_detach_signal): Fetch ptid from thread.
5858 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5859 Simplify call to regcache_invalidate_thread.
5860 (delete_lwp_callback): Update, "entry" parameter is a
5861 struct thread_info * now. Fetch pid from thread.
5862 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5863 (status_pending_p_callback): Update, "entry" parameter is a
5864 struct thread_info * now. Fetch ptid from thread.
5865 (find_lwp_pid): Update, "entry" parameter is a
5866 struct thread_info * now.
5867 (linux_wait_for_lwp): Fetch pid from thread.
5868 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5869 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5870 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5871 (dequeue_one_deferred_signal): Ditto.
5872 (cancel_breakpoint): Fetch ptid from current_inferior.
5873 (linux_wait_for_event): Pass &all_threads to find_inferior,
5874 not &all_lwps. Fetch ptid, lwpid from thread.
5875 (count_events_callback): Update, "entry" parameter is a
5876 struct thread_info * now.
5877 (select_singlestep_lwp_callback): Ditto.
5878 (select_event_lwp_callback): Ditto.
5879 (cancel_breakpoints_callback): Ditto.
5880 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5881 not &all_lwps.
5882 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5883 (unsuspend_one_lwp): Update, "entry" parameter is a
5884 struct thread_info * now.
5885 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5886 not &all_lwps.
5887 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5888 Fetch lwpid from thread, not lwp.
5889 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5890 Pass &all_threads to find_inferior, not &all_lwps.
5891 (send_sigstop): Fetch lwpid from thread, not lwp.
5892 (send_sigstop_callback): Update, "entry" parameter is a
5893 struct thread_info * now.
5894 (suspend_and_send_sigstop_callback): Ditto.
5895 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5896 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5897 struct thread_info * now.
5898 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5899 from thread, lwp.
5900 (lwp_running): Update, "entry" parameter is a
5901 struct thread_info * now.
5902 (stop_all_lwps): Fetch ptid from thread.
5903 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5904 (linux_resume_one_lwp): Fetch lwpid from thread.
5905 (linux_set_resume_request): Update, "entry" parameter is a
5906 struct thread_info * now. Fetch pid, lwpid from thread.
5907 (resume_status_pending_p): Update, "entry" parameter is a
5908 struct thread_info * now.
5909 (need_step_over_p): Ditto. Fetch lwpid from thread.
5910 (start_step_over): Fetch lwpid from thread.
5911 (linux_resume_one_thread): Update, "entry" parameter is a
5912 struct thread_info * now. Fetch lwpid from thread.
5913 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5914 (proceed_one_lwp): Update, "entry" parameter is a
5915 struct thread_info * now. Fetch lwpid from thread.
5916 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5917 struct thread_info * now.
5918 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5919 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5920 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5921 directly.
5922 (regsets_store_inferior_registers): Ditto.
5923 (fetch_register, store_register): Ditto.
5924 (linux_read_memory, linux_write_memory): Ditto.
5925 (linux_request_interrupt): Ditto.
5926 (linux_read_auxv): Ditto.
5927 (linux_xfer_siginfo): Ditto.
5928 (linux_qxfer_spu): Ditto.
5929 (linux_qxfer_libraries_svr4): Ditto.
5930 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5931 moved to inferiors.h.
5932 (get_lwp): Delete.
5933 (get_thread_lwp): Update.
5934 (struct lwp_info): Delete member "entry". Simplify comment for
5935 member "thread".
5936 (all_lwps): Delete.
5937 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5938 current_inferior directly.
5939 (update_watch_registers_callback): Update, "entry" parameter is a
5940 struct thread_info * now. Fetch pid from thread.
5941 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5942 (mips_insert_point): Fetch lwpid from current_inferior.
5943 Pass &all_threads to find_inferior, not &all_lwps.
5944 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5945 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5946 directly.
5947 (mips_stopped_data_address): Ditto.
5948 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5949 directly.
5950 * linux-tile-low.c (tile_arch_setup): Ditto.
5951 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5952 (update_debug_registers_callback): Update, "entry" parameter is a
5953 struct thread_info * now. Fetch pid from thread.
5954 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5955 Pass &all_threads to find_inferior, not &all_lwps.
5956 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5957 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5958 Pass &all_threads to find_inferior, not &all_lwps.
5959 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5960 (i386_dr_low_get_status): Ditto.
5961 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5962 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5963 (x86_linux_read_description): Ditto.
5964 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5965
5966 2014-02-20 Doug Evans <dje@google.com>
5967
5968 * inferiors.c (get_first_inferior): Fix buglet.
5969
5970 2014-02-19 Doug Evans <dje@google.com>
5971
5972 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5973 * inferiors.c (add_thread): Change result type to struct thread_info *.
5974 All callers updated.
5975 (add_lwp): Call add_thread here instead of in callers.
5976 All callers updated.
5977 * linux-low.h (get_lwp_thread): Rewrite.
5978 (struct lwp_info): New member "thread".
5979
5980 2014-02-19 Doug Evans <dje@google.com>
5981
5982 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5983 All callers updated.
5984
5985 2014-02-19 Doug Evans <dje@google.com>
5986
5987 * inferiors.c (add_thread): Fix whitespace.
5988
5989 2014-02-19 Doug Evans <dje@google.com>
5990
5991 * dll.c (clear_dlls): Replace accessing list implemention details
5992 with API function.
5993 * gdbthread.h (get_first_thread): Declare.
5994 * inferiors.c (for_each_inferior_with_data): New function.
5995 (get_first_thread): New function.
5996 (find_thread_ptid): Simplify.
5997 (get_first_inferior): New function.
5998 (clear_list): Delete.
5999 (one_inferior_p): New function.
6000 (clear_inferior_list): New function.
6001 (clear_inferiors): Update.
6002 * inferiors.h (for_each_inferior_with_data): Declare.
6003 (clear_inferior_list): Declare.
6004 (one_inferior_p): Declare.
6005 (get_first_inferior): Declare.
6006 * linux-low.c (linux_wait_for_event): Replace accessing list
6007 implemention details with API function.
6008 * server.c (target_running): Ditto.
6009 (accumulate_file_name_length): New function.
6010 (emit_dll_description): New function.
6011 (handle_qxfer_libraries): Replace accessing list implemention
6012 details with API function.
6013 (handle_qxfer_threads_worker): New function.
6014 (handle_qxfer_threads_proper): Replace accessing list implemention
6015 details with API function.
6016 (handle_query): Ditto.
6017 (visit_actioned_threads_callback_ftype): New typedef.
6018 (visit_actioned_threads_data): New struct.
6019 (visit_actioned_threads): Rewrite to be find_inferior callback.
6020 (resume): Call find_inferior.
6021 (handle_status): Replace accessing list implemention
6022 details with API function.
6023 (process_serial_event): Replace accessing list implemention details
6024 with API function.
6025 * target.c (set_desired_inferior): Replace accessing list implemention
6026 details with API function.
6027 * tracepoint.c (same_process_p): New function.
6028 (gdb_agent_about_to_close): Replace accessing list implemention
6029 details with API function.
6030 * win32-low.c (child_delete_thread): Replace accessing list
6031 implemention details with API function.
6032 (match_dll_by_basename): New function.
6033 (dll_is_loaded_by_basename): New function.
6034 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6035 details call to dll_is_loaded_by_basename.
6036
6037 2014-02-19 Doug Evans <dje@google.com>
6038
6039 * dll.h (struct dll_info): Add comment.
6040 * gdbthread.h (struct thread_info): Add comment.
6041 (current_ptid): Simplify.
6042 * inferiors.c (add_process): Update.
6043 (remove_process): Update.
6044 * inferiors.h (struct process_info): Rename member "head" to "entry".
6045 * linux-low.c (delete_lwp): Update.
6046 (add_lwp): Update.
6047 (last_thread_of_process_p): Update.
6048 (kill_one_lwp_callback, linux_kill): Update.
6049 (status_pending_p_callback): Update.
6050 (wait_for_sigstop): Update. Simplify read of ptid.
6051 (start_step_over): Update.
6052 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6053 (get_lwp_thread): Update.
6054 (struct lwp_info): Rename member "head" to "entry".
6055 * regcache.h (inferior_list_entry): Delete.
6056 * server.c (kill_inferior_callback): Update.
6057 (detach_or_kill_inferior_callback): Update.
6058 (print_started_pid): Update.
6059 (print_attached_pid): Update.
6060 (process_serial_event): Simplify read of ptid.
6061 * thread-db.c (thread_db_create_event): Update.
6062 (thread_db_get_tls_address): Update.
6063 * win32-low.c (current_inferior_ptid): Simplify.
6064
6065 2014-02-19 Tom Tromey <tromey@redhat.com>
6066
6067 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6068 argument.
6069 (target_supports_btrace): Update.
6070
6071 2014-02-14 Yao Qi <yao@codesourcery.com>
6072
6073 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6074 (rsp-low-ipa.o): New target.
6075
6076 2014-02-12 Tom Tromey <tromey@redhat.com>
6077
6078 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6079 convert_ascii_to_int.
6080 * regcache.c (registers_to_string): Likewise.
6081 * remote-utils.c (decode_M_packet): Likewise.
6082 * server.c (process_serial_event): Likewise.
6083
6084 2014-02-12 Tom Tromey <tromey@redhat.com>
6085
6086 * server.c (handle_query, handle_v_run): Use hex2bin, not
6087 unhexify.
6088 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6089
6090 2014-02-12 Tom Tromey <tromey@redhat.com>
6091
6092 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6093 convert_int_to_ascii.
6094 * regcache.c (registers_to_string, collect_register_as_string):
6095 Likewise.
6096 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6097 Likewise.
6098 * server.c (process_serial_event): Likewise.
6099 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6100 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6101
6102 2014-02-12 Tom Tromey <tromey@redhat.com>
6103
6104 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6105 bin2hex, not hexify.
6106 * tracepoint.c (cmd_qtstatus): Likewise.
6107
6108 2014-02-12 Tom Tromey <tromey@redhat.com>
6109
6110 * remote-utils.c (monitor_output): Pass explicit length to
6111 hexify.
6112
6113 2014-02-12 Tom Tromey <tromey@redhat.com>
6114
6115 * tracepoint.c: Include rsp-low.h.
6116 * server.c: Include rsp-low.h.
6117 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6118 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6119 declare.
6120 * remote-utils.c: Include rsp-low.h.
6121 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6122 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6123 (convert_int_to_ascii, convert_ascii_to_int): Move to
6124 common/rsp-low.c.
6125 * regcache.c: Include rsp-low.h.
6126 * ax.c: Include rsp-low.h.
6127 * Makefile.in (SFILES): Add common/rsp-low.c.
6128 (OBS): Add rsp-low.o.
6129 (rsp-low.o): New target.
6130
6131 2014-02-12 Tom Tromey <tromey@redhat.com>
6132
6133 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6134 Include print-utils.h.
6135 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6136 (plongest, thirty_two, phex_nz): Remove.
6137 * Makefile.in (SFILES): Add common/print-utils.c.
6138 (OBS): Add print-utils.o.
6139 (print-utils-ipa.o): New target.
6140 (print-utils.o): New target.
6141 (IPA_OBJS): Add print-utils-ipa.o.
6142
6143 2014-02-06 Tom Tromey <tromey@redhat.com>
6144
6145 * Makefile.in (SFILES): Fix indentation.
6146
6147 2014-02-05 Doug Evans <dje@google.com>
6148
6149 * linux-low.c (linux_wait_for_event): Improve comment.
6150 (linux_wait_1): Keep current_inferior in sync with event_child.
6151
6152 2014-01-22 Doug Evans <dje@google.com>
6153
6154 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6155
6156 2014-01-22 Doug Evans <dje@google.com>
6157
6158 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6159 * configure: Regenerate.
6160 * config.in: Regenerate.
6161 * Makefile.in (SFILES): Add debug.c.
6162 (OBS): Add debug.o.
6163 * debug.c: New file.
6164 * debug.h: New file.
6165 * linux-aarch64-low.c (*): Update all debugging printfs to use
6166 debug_printf instead of fprintf.
6167 * linux-arm-low.c (*): Ditto.
6168 * linux-cris-low.c (*): Ditto.
6169 * linux-crisv32-low.c (*): Ditto.
6170 * linux-m32r-low.c (*): Ditto.
6171 * linux-sparc-low.c (*): Ditto.
6172 * linux-x86.c (*): Ditto.
6173 * linux-low.c (*): Ditto.
6174 (linux_wait_1): Add calls to debug_enter, debug_exit.
6175 (linux_wait): Remove redundant debugging printf.
6176 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6177 (linux_resume, unstop_all_lwps): Ditto.
6178 * mem-break.c (*): Update all debugging printfs to use
6179 debug_printf instead of fprintf.
6180 * remote-utils.c (*): Ditto.
6181 * thread-db.c (*): Ditto.
6182 * server.c #include <ctype.h>, "gdb_vecs.h".
6183 (debug_threads): Moved to debug.c.
6184 (*): Update all debugging printfs to use debug_printf instead of
6185 fprintf.
6186 (start_inferior): Replace call to fflush with call to debug_flush.
6187 (monitor_show_help): Mention set debug-format.
6188 (parse_debug_format_options): New function.
6189 (handle_monitor_command): Handle "monitor set debug-format".
6190 (gdbserver_usage): Mention --debug-format.
6191 (main): Parse --debug-format.
6192 * server.h (debug_threads): Declaration moved to debug.h.
6193 #include "debug.h".
6194 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6195 trace_debug_1 that uses debug_printf.
6196 (tracepoint_look_up_symbols): Update all debugging printfs to use
6197 debug_printf instead of fprintf.
6198
6199 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6200
6201 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6202 sys/ptrace.h.
6203
6204 2014-01-17 Pedro Alves <palves@redhat.com>
6205
6206 PR build/16445
6207 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6208 defined after including gdb_proc_service.h.
6209
6210 2014-01-16 Doug Evans <dje@google.com>
6211
6212 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6213 (match_dll): Use it.
6214
6215 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6216
6217 * target.h (target_ops) <read_btrace>: Change parameters and
6218 return type to allow error reporting.
6219 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6220 trace reading errors on.
6221 * linux-low.c (linux_low_read_btrace): Pass trace reading
6222 errors on.
6223 (linux_low_disable_btrace): New.
6224
6225 2014-01-15 Doug Evans <dje@google.com>
6226
6227 * inferiors.c (thread_id_to_gdb_id): Delete.
6228 * inferiors.h (thread_id_to_gdb_id): Delete.
6229
6230 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6231
6232 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6233 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6234 versions.
6235
6236 2014-01-08 Pedro Alves <palves@redhat.com>
6237
6238 * server.c (handle_status): Don't discard previous queued stop
6239 replies or thread's pending status here.
6240 (main) <disconnection>: Do it here instead.
6241
6242 2014-01-08 Pedro Alves <palves@redhat.com>
6243
6244 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6245 * server.c (visit_actioned_threads, handle_pending_status): New
6246 function.
6247 (handle_v_cont): Factor out parts to ...
6248 (resume): ... this new function. If in all-stop, and a thread
6249 being resumed has a pending status, report it without actually
6250 resuming.
6251 (myresume): Adjust to use the new 'resume' function.
6252 (clear_pending_status_callback, set_pending_status_callback)
6253 (find_status_pending_thread_callback): New functions.
6254 (handle_status): Handle the case of multiple threads having
6255 interesting statuses to report. Report threads' real last signal
6256 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6257 with an interesting thread to report the status for, instead of
6258 always reporting the status of the first thread.
6259
6260 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6261
6262 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6263 * gdbreplay.c (gdbreplay_version): Likewise.
6264
6265 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6266
6267 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6268 iov.iov_len with the real length in use.
6269
6270 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6271
6272 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6273 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6274 for all targets that use win32-low.c.
6275 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6276 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6277
6278 2013-12-13 Pedro Alves <palves@redhat.com>
6279
6280 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6281 if equal to TARGET_WAITKIND_LOADED.
6282 * win32-low.c (cached_status): New static global.
6283 (win32_wait): Add declaration.
6284 (do_initial_child_stuff): Flush all initial pending debug events
6285 up to the initial breakpoint.
6286 (win32_wait): If CACHED_STATUS was set, return that instead
6287 of doing a real wait. Remove the code resuming the execution
6288 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6289 during the initial phase. Also remove the code changing
6290 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6291 TARGET_WAITKIND_STOPPED.
6292
6293 2013-12-11 Yao Qi <yao@codesourcery.com>
6294
6295 * notif.c (handle_notif_ack): Return 0 if no notification
6296 matches.
6297
6298 2013-11-20 Doug Evans <dje@google.com>
6299
6300 * linux-low.c (linux_set_resume_request): Fix comment.
6301
6302 2013-11-20 Doug Evans <dje@google.com>
6303
6304 * linux-low.c (resume_status_pending_p): Tweak comment.
6305
6306 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6307
6308 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6309 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6310 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6311 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6312 (srv_amd64_regobj): Add amd64-mpx.o.
6313 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6314 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6315 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6316 * i387-fp.c (num_pl_bnd_register) Added constant.
6317 (num_pl_bnd_cfg_registers) Added constant.
6318 (struct i387_xsave) Added reserved area and MPX fields.
6319 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6320 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6321 function.
6322 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6323 (init_registers_amd64_mpx_linux): Declare new function.
6324 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6325 (x86_64_regmap): Add MPX registers.
6326 (x86_linux_read_description): Add MPX case.
6327 (initialize_low_arch): Initialize MPX targets.
6328
6329 2013-11-18 Tom Tromey <tromey@redhat.com>
6330
6331 * configure: Rebuild.
6332 * configure.ac: Don't check for stdlib.h.
6333 * gdbreplay.c: Unconditionally include stdlib.h.
6334
6335 2013-11-18 Tom Tromey <tromey@redhat.com>
6336
6337 * config.in: Rebuild.
6338 * configure: Rebuild.
6339 * configure.ac: Don't use AC_HEADER_DIRENT.
6340
6341 2013-11-18 Tom Tromey <tromey@redhat.com>
6342
6343 * server.h: Don't check HAVE_STRING_H.
6344 * gdbreplay.c: Don't check HAVE_STRING_H.
6345 * configure: Rebuild.
6346
6347 2013-11-18 Tom Tromey <tromey@redhat.com>
6348
6349 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6350 LIBGNU.
6351
6352 2013-11-08 Tom Tromey <tromey@redhat.com>
6353
6354 * configure, config.in: Rebuild.
6355 * configure.ac: Remove unused configury.
6356
6357 2013-11-08 Tom Tromey <tromey@redhat.com>
6358
6359 * acinclude.m4: Include common.m4, codeset.m4.
6360 * configure, config.in: Rebuild.
6361 * configure.ac: Use GDB_AC_COMMON.
6362
6363 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6364
6365 * linux-s390-low.c (HWCAP_S390_TE): New define.
6366 (s390_arch_setup): Consider the TE field in the HWCAP for
6367 determining 'have_regset_tdb'.
6368
6369 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6370
6371 PR gdb/16014
6372 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6373 call to sizeof.
6374
6375 2013-10-02 Pedro Alves <palves@redhat.com>
6376
6377 * server.c (process_serial_event): Don't output "GDBserver
6378 exiting" if GDB is connected through stdio.
6379 * target.c (mywait): Likewise, be silent if GDB is connected
6380 through stdio.
6381
6382 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6383
6384 * lynx-low.c (lynx_add_threads_after_attach): New function.
6385 (lynx_attach): Remove call to add_thread. Add call to
6386 lynx_add_threads_after_attach instead.
6387
6388 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6389
6390 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6391 * config.in, configure: Regenerated.
6392
6393 2013-09-18 Yao Qi <yao@codesourcery.com>
6394
6395 PR server/15959
6396 * server.c (start_inferior): Clear 'resume_info'.
6397
6398 2013-09-16 Jiong Wang <jiwang@tilera.com>
6399
6400 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6401 for each register.
6402
6403 2013-09-16 Jiong Wang <jiwang@tilera.com>
6404
6405 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6406 linux-tile-low.o to srv_tgtobj.
6407
6408 2013-09-16 Will Newton <will.newton@linaro.org>
6409
6410 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6411 out regs.
6412
6413 2013-09-06 Pedro Alves <palves@redhat.com>
6414
6415 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6416 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6417 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6418 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6419 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6420 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6421
6422 2013-09-06 Pedro Alves <palves@redhat.com>
6423
6424 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6425 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6426
6427 2013-09-06 Pedro Alves <palves@redhat.com>
6428
6429 * linux-amd64-ipa.c: Include tracepoint.h.
6430 * linux-i386-ipa.c: Include tracepoint.h.
6431
6432 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6433
6434 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6435 (ps_get_thread_area): New function.
6436
6437 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6438
6439 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6440 (initialize_low_arch): Call init_registers_crisv32 rather than
6441 init_register_crisv32.
6442
6443 2013-09-05 Pedro Alves <palves@redhat.com>
6444
6445 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6446 to ...
6447 * hostio.h: ... this new file.
6448 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6449 win32-low.c: Include hostio.h.
6450
6451 2013-09-05 Pedro Alves <palves@redhat.com>
6452
6453 * server.h (gdb_client_data, handler_func, callback_handler_func)
6454 (delete_file_handler, add_file_handler, append_callback_event)
6455 (delete_callback_event, start_event_loop, initialize_event_loop):
6456 Move to event-loop.h and include it.
6457 * event-loop.h: New file.
6458
6459 2013-09-05 Pedro Alves <palves@redhat.com>
6460
6461 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6462 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6463 (loaded_dll, unloaded_dll): Move to ...
6464 * dll.h: ... this new file.
6465 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6466
6467 2013-09-05 Pedro Alves <palves@redhat.com>
6468
6469 * server.h (current_process, get_thread_process, all_processes)
6470 (add_inferior_to_list, for_each_inferior, current_inferior)
6471 (remove_inferior, add_process, remove_process, find_process_pid)
6472 (have_started_inferiors_p, have_attached_inferiors_p)
6473 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6474 (clear_inferiors, find_inferior, find_inferior_id)
6475 (inferior_target_data, set_inferior_target_data)
6476 (inferior_regcache_data, set_inferior_regcache_data): Move to
6477 inferiors.h, and include it.
6478 * inferiors.h: New file.
6479
6480 2013-09-05 Pedro Alves <palves@redhat.com>
6481
6482 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6483 Move ...
6484 * ax.h: ... here.
6485
6486 2013-09-05 Pedro Alves <palves@redhat.com>
6487
6488 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6489 tracepoint.h.
6490 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6491 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6492 (handle_tracepoint_general_set, handle_tracepoint_query)
6493 (tracepoint_finished_step, tracepoint_was_hit)
6494 (release_while_stepping_state_list, current_traceframe)
6495 (in_readonly_region, traceframe_read_mem)
6496 (fetch_traceframe_registers, traceframe_read_sdata)
6497 (traceframe_read_info, struct fast_tpoint_collect_status)
6498 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6499 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6500 (supply_fast_tracepoint_registers)
6501 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6502 (ipa_tdesc, claim_trampoline_space)
6503 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6504 (agent_mem_read, agent_get_trace_state_variable_value)
6505 (agent_set_trace_state_variable_value, agent_tsv_read)
6506 (agent_mem_read_string, get_raw_reg_func_addr)
6507 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6508 * tracepoint.h: ... this new file.
6509
6510 2013-09-05 Pedro Alves <palves@redhat.com>
6511
6512 * server.h (perror_with_name, error, fatal, warning, paddress)
6513 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6514 include it.
6515 * utils.h: New file.
6516
6517 2013-09-05 Pedro Alves <palves@redhat.com>
6518
6519 * server.h (remote_debug, noack_mode, transport_is_reliable)
6520 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6521 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6522 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6523 (write_enn, initialize_async_io, enable_async_io)
6524 (disable_async_io, check_remote_input_interrupt_request)
6525 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6526 (dead_thread_notify, prepare_resume_reply)
6527 (decode_address_to_semicolon, decode_address, decode_m_packet)
6528 (decode_M_packet, decode_X_packet, decode_xfer_write)
6529 (decode_search_memory_packet, unhexify, hexify)
6530 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6531 (look_up_one_symbol, relocate_instruction)
6532 (monitor_output): Move to remote-utils.h, and include it.
6533 * remote-utils.h: New file.
6534
6535 2013-09-05 Pedro Alves <palves@redhat.com>
6536
6537 * server.h (_): Delete.
6538
6539 2013-09-02 Pedro Alves <palves@redhat.com>
6540
6541 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6542 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6543 allocated.
6544 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6545
6546 2013-09-02 Pierre Muller <muller@sourceware.org>
6547
6548 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6549 or WriteProcessMemory complete successfully and handle
6550 ERROR_PARTIAL_COPY error.
6551
6552 2013-09-02 Pedro Alves <palves@redhat.com>
6553
6554 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6555 error instead of EIO.
6556
6557 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6558
6559 PR server/15604
6560 * linux-low.c: Include filestuff.h.
6561 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6562 * lynx-low.c: Include filestuff.h.
6563 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6564 * server.c: Include filestuff.h.
6565 (main): Call notice_open_fds.
6566 * spu-low.c: Include filestuff.h.
6567 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6568
6569 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6570
6571 * Makefile.in: Explain why ../target and ../nat are not
6572 listed as include file search paths.
6573 (linux-waitpid.o): New object file rule.
6574 * configure.srv (srv_native_linux_obj): New variable.
6575 Replace all occurrences of linux native object files with
6576 $srv_native_linux_obj.
6577 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6578 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6579 (linux_enable_event_reporting): Remove declaration.
6580 (my_waitpid): Moved to common/linux-waitpid.c.
6581 (linux_wait_for_event): Pass ptid when calling
6582 linux_enable_event_reporting.
6583 (linux_supports_tracefork_flag): Remove.
6584 (linux_enable_event_reporting): Likewise.
6585 (linux_tracefork_grandchild): Remove.
6586 (STACK_SIZE): Moved to common/linux-ptrace.c.
6587 (linux_tracefork_child): Remove.
6588 (linux_test_for_tracefork): Remove.
6589 (linux_look_up_symbols): Call linux_supports_traceclone.
6590 (initialize_low): Remove call to linux_test_for_tracefork.
6591 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6592 common/linux-ptrace.h.
6593 (PTRACE_TYPE_ARG4): Likewise.
6594 Include linux-ptrace.h.
6595
6596 2013-08-21 Pedro Alves <palves@redhat.com>
6597
6598 * config.in: Renegerate.
6599
6600 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6601
6602 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6603 (SFILES): Remove $(srcdir)/common/target-common.c and
6604 add $(srcdir)/target/waitstatus.c.
6605 (OBS): Remove target-common.o and add waitstatus.o.
6606 (server_h): Remove $(srcdir)/../common/target-common.h and
6607 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6608 and $(srcdir)/../target/waitstatus.h.
6609 (target-common.o): Remove.
6610 (waitstatus.o): New target object file.
6611 * target.h: Do not include target-common.h and
6612 include target/resume.h, target/wait.h and
6613 target/waitstatus.h.
6614
6615 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6616
6617 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6618 to PTRACE_TYPE_ARG3.
6619 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6620 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6621 PTRACE_TYPE_ARG4.
6622 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6623 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6624
6625 2013-07-27 Jie Zhang <jie@codesourcery.com>
6626 Daniel Jacobowitz <dan@codesourcery.com>
6627 Yao Qi <yao@codesourcery.com>
6628
6629 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6630 (mips-linux-watch.o): New rule.
6631 (mips_linux_watch_h): New variable.
6632 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6633 srv_tgtobj.
6634 * linux-mips-low.c: Include mips-linux-watch.h.
6635 (struct arch_process_info, struct arch_lwp_info): New.
6636 (update_watch_registers_callback): New function.
6637 (mips_linux_new_process, mips_linux_new_thread) New functions.
6638 (mips_linux_prepare_to_resume, mips_insert_point): New
6639 functions.
6640 (mips_remove_point, mips_stopped_by_watchpoint): New
6641 functions.
6642 (rsp_bp_type_to_target_hw_bp_type): New function.
6643 (mips_stopped_data_address): New function.
6644 (the_low_target): Add watchpoint support functions.
6645
6646 2013-07-27 Yao Qi <yao@codesourcery.com>
6647
6648 * i386-low.c: Include break-common.h.
6649 (enum target_hw_bp_type): Remove.
6650
6651 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6652
6653 * Makefile.in (SFILES): /common/target-common.c.
6654 (OBS): Add target-common.o.
6655 (server_h): Add $(srcdir)/../common/target-common.h.
6656 (target-common.o): New target.
6657 * server.c (queue_stop_reply_callback): Free
6658 status string after use.
6659 * target.c (target_waitstatus_to_string): Remove.
6660 * target.h: Include target-common.h.
6661 (resume_kind): Likewise.
6662 (target_waitkind): Likewise.
6663 (target_waitstatus): Likewise.
6664 (TARGET_WNOHANG): Likewise.
6665
6666 2013-07-04 Yao Qi <yao@codesourcery.com>
6667
6668 * Makefile.in (host_alias): Use @host_noncanonical@.
6669 (target_alias): Use @target_noncanonical@.
6670 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6671 ACX_NONCANONICAL_HOST.
6672 * configure: Regenerated.
6673
6674 Revert:
6675 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6676
6677 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6678 * configure: Rebuild.
6679 * Makefile.in (version_host, version_target): Get from configure.
6680 (version.c): Use $(version_host) and $(version_target).
6681
6682 2013-07-03 Pedro Alves <palves@redhat.com>
6683
6684 * Makefile.in (config.status): Depend on development.sh.
6685 * acinclude.m4: Include libmcheck.m4.
6686 * configure: Regenerate.
6687
6688 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6689
6690 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6691 attribute inside the parentheses.
6692 (winapi_DebugSetProcessKillOnExit): Ditto.
6693 (winapi_DebugBreakProcess): Ditto.
6694 (winapi_GenerateConsoleCtrlEvent): Ditto.
6695
6696 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6697
6698 * notif.h (notif_event): Add a dummy member to avoid compiler
6699 errors.
6700
6701 2013-07-01 Pedro Alves <palves@redhat.com>
6702
6703 * hostio.c (HOSTIO_PATH_MAX): Define.
6704 (require_filename, handle_open, handle_unlink, handle_readlink):
6705 Use it.
6706
6707 2013-07-01 Pedro Alves <palves@redhat.com>
6708
6709 * server.h: Include "pathmax.h".
6710 * linux-low.c: Don't include sys/param.h.
6711 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6712 MAXPATHLEN.
6713 * win32-low.c: Don't include sys/param.h.
6714 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6715
6716 2013-07-01 Pedro Alves <palves@redhat.com>
6717
6718 * event-loop.c: Don't check HAVE_UNISTD_H before including
6719 <unistd.h>.
6720 * gdbreplay.c: Likewise.
6721 * remote-utils.c: Likewise.
6722 * server.c: Likewise.
6723 * configure.ac: Don't check for unistd.h.
6724 * configure: Regenerate.
6725
6726 2013-06-28 Tom Tromey <tromey@redhat.com>
6727
6728 * Makefile.in (version.c): Use version.in, not
6729 common/version.in.
6730
6731 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6732
6733 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6734 * configure: Rebuild.
6735 * Makefile.in (version_host, version_target): Get from configure.
6736 (version.c): Use $(version_host) and $(version_target).
6737
6738 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6739
6740 Fix trace-status to output user name without trailing colon.
6741 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6742
6743 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6744
6745 Fix trace-status to output proper start-time and stop-time.
6746 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6747 output start time and stop time in hex as gdb expects.
6748
6749 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6750
6751 * tracepoint.c (build_traceframe_info_xml): Output trace state
6752 variables present in the trace buffer.
6753
6754 2013-06-24 Tom Tromey <tromey@redhat.com>
6755
6756 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6757 create-version.sh.
6758 (version.o): Remove.
6759 * gdbreplay.c: Include version.h.
6760 (version, host_name): Don't declare.
6761 * server.h: Include version.h.
6762 (version, host_name): Don't declare.
6763
6764 2013-06-12 Pedro Alves <palves@redhat.com>
6765
6766 * linux-x86-low.c (linux_is_elf64): Delete global.
6767 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6768 with local linux_pid_exe_is_elf_64_file use.
6769
6770 2013-06-11 Pedro Alves <palves@redhat.com>
6771
6772 * linux-low.c (regset_disabled, disable_regset): New functions.
6773 (regsets_fetch_inferior_registers)
6774 (regsets_store_inferior_registers): Use them.
6775 (initialize_regsets_info); Don't allocate the disabled_regsets
6776 array here.
6777 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6778 comment.
6779
6780 2013-06-11 Pedro Alves <palves@redhat.com>
6781
6782 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6783 xmalloc.
6784
6785 2013-06-11 Pedro Alves <palves@redhat.com>
6786
6787 * linux-x86-low.c (initialize_low_arch): Call
6788 init_registers_x32_avx_linux.
6789
6790 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6791
6792 Fix compatibility with Android Bionic.
6793 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6794 it is not empty.
6795
6796 2013-06-07 Pedro Alves <palves@redhat.com>
6797
6798 PR server/14823
6799 * Makefile.in (OBS): Add tdesc.o.
6800 (IPA_OBJS): Add tdesc-ipa.o.
6801 (tdesc-ipa.o): New rule.
6802 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6803 interface.
6804 * linux-low.c (new_inferior): Delete.
6805 (disabled_regsets, num_regsets): Delete.
6806 (linux_add_process): Adjust to set the new per-process
6807 new_inferior flag.
6808 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6809 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6810 was a stop. When calling arch_setup, switch the current inferior
6811 to the thread that got an event.
6812 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6813 (regsets_fetch_inferior_registers)
6814 (regsets_store_inferior_registers): New regsets_info parameter.
6815 Adjust to use it.
6816 (linux_register_in_regsets): New regs_info parameter. Adjust to
6817 use it.
6818 (register_addr, fetch_register, store_register): New usrregs_info
6819 parameter. Adjust to use it.
6820 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6821 parameter regs_info. Adjust to use it.
6822 (linux_fetch_registers): Get the current inferior's regs_info, and
6823 adjust to use it.
6824 (linux_store_registers): Ditto.
6825 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6826 (initialize_low): Don't initialize the target_regsets here. Call
6827 initialize_low_arch.
6828 * linux-low.h (target_regsets): Delete declaration.
6829 (struct regsets_info): New.
6830 (struct usrregs_info): New.
6831 (struct regs_info): New.
6832 (struct process_info_private) <new_inferior>: New field.
6833 (struct linux_target_ops): Delete the num_regs, regmap, and
6834 regset_bitmap fields. New field regs_info.
6835 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6836 * i387-fp.c (num_xmm_registers): Delete.
6837 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6838 calls to new interface.
6839 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6840 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6841 Infer the number of xmm registers from the regcache's target
6842 description.
6843 * i387-fp.h (num_xmm_registers): Delete.
6844 * inferiors.c (add_thread): Don't install the thread's regcache
6845 here.
6846 * proc-service.c (gregset_info): Fetch the current inferior's
6847 regs_info. Adjust to use it.
6848 * regcache.c: Include tdesc.h.
6849 (register_bytes, reg_defs, num_registers)
6850 (gdbserver_expedite_regs): Delete.
6851 (get_thread_regcache): If the thread doesn't have a regcache yet,
6852 create one, instead of aborting gdbserver.
6853 (regcache_invalidate_one): Rename to ...
6854 (regcache_invalidate_thread): ... this.
6855 (regcache_invalidate_one): New.
6856 (regcache_invalidate): Only invalidate registers of the current
6857 process.
6858 (init_register_cache): Add target_desc parameter, and use it.
6859 (new_register_cache): Ditto. Assert the target description has a
6860 non zero registers_size.
6861 (regcache_cpy): Add assertions. Adjust.
6862 (realloc_register_cache, set_register_cache): Delete.
6863 (registers_to_string, registers_from_string): Adjust.
6864 (find_register_by_name, find_regno, find_register_by_number)
6865 (register_cache_size): Add target_desc parameter, and use it.
6866 (free_register_cache_thread, free_register_cache_thread_one)
6867 (regcache_release, register_cache_size): New.
6868 (register_size): Add target_desc parameter, and use it.
6869 (register_data, supply_register, supply_register_zeroed)
6870 (supply_regblock, supply_register_by_name, collect_register)
6871 (collect_register_as_string, collect_register_by_name): Adjust.
6872 * regcache.h (struct target_desc): Forward declare.
6873 (struct regcache) <tdesc>: New field.
6874 (init_register_cache, new_register_cache): Add target_desc
6875 parameter.
6876 (regcache_invalidate_thread): Declare.
6877 (regcache_invalidate_one): Delete declaration.
6878 (regcache_release): Declare.
6879 (find_register_by_number, register_cache_size, register_size)
6880 (find_regno): Add target_desc parameter.
6881 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6882 declarations.
6883 * remote-utils.c: Include tdesc.h.
6884 (outreg, prepare_resume_reply): Adjust.
6885 * server.c: Include tdesc.h.
6886 (gdbserver_xmltarget): Delete declaration.
6887 (get_features_xml, process_serial_event): Adjust.
6888 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6889 declare.
6890 (struct process_info) <tdesc>: New field.
6891 (ipa_tdesc): Declare.
6892 * tdesc.c: New file.
6893 * tdesc.h: New file.
6894 * tracepoint.c: Include tdesc.h.
6895 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6896 (get_context_regcache): Adjust to pass ipa_tdesc down.
6897 (do_action_at_tracepoint): Adjust to get the register cache size
6898 from the context regcache's description.
6899 (traceframe_walk_blocks): Adjust to get the register cache size
6900 from the current trace frame's description.
6901 (traceframe_get_pc): Adjust to get current trace frame's
6902 description and pass it down.
6903 (gdb_collect): Adjust to get the register cache size from the
6904 IPA's description.
6905 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6906 (gdbserver_xmltarget): Delete.
6907 (initialize_low_tracepoint): Set the ipa's target description.
6908 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6909 (initialize_low_tracepoint): Set the ipa's target description.
6910 * linux-x86-low.c: Include tdesc.h.
6911 [__x86_64__] (is_64bit_tdesc): New.
6912 (ps_get_thread_area, x86_get_thread_area): Use it.
6913 (i386_cannot_store_register): Rename to ...
6914 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6915 (i386_cannot_fetch_register): Rename to ...
6916 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6917 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6918 to new interface.
6919 (target_regsets): Rename to ...
6920 (x86_regsets): ... this.
6921 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6922 interface.
6923 (x86_siginfo_fixup): Use is_64bit_tdesc.
6924 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6925 (tdesc_x32_avx_linux, tdesc_x32_linux)
6926 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6927 Declare.
6928 (x86_linux_update_xmltarget): Delete.
6929 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6930 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6931 (AMD64_LINUX_USER64_CS): New.
6932 (x86_linux_read_description): New, based on
6933 x86_linux_update_xmltarget.
6934 (same_process_callback): New.
6935 (x86_arch_setup_process_callback): New.
6936 (x86_linux_update_xmltarget): New.
6937 (x86_regsets_info): New.
6938 (amd64_linux_regs_info): New.
6939 (i386_linux_usrregs_info): New.
6940 (i386_linux_regs_info): New.
6941 (x86_linux_regs_info): New.
6942 (x86_arch_setup): Reimplement.
6943 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6944 (x86_emit_ops): Ditto.
6945 (the_low_target): Adjust. Install x86_linux_regs_info,
6946 x86_cannot_fetch_register, and x86_cannot_store_register.
6947 (initialize_low_arch): New.
6948 * linux-ia64-low.c (tdesc_ia64): Declare.
6949 (ia64_fetch_register): Adjust.
6950 (ia64_usrregs_info, regs_info): New globals.
6951 (ia64_regs_info): New function.
6952 (the_low_target): Adjust.
6953 (initialize_low_arch): New function.
6954 * linux-sparc-low.c (tdesc_sparc64): Declare.
6955 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6956 Adjust.
6957 (sparc_arch_setup): New function.
6958 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6959 (the_low_target): Adjust.
6960 (initialize_low_arch): New function.
6961 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6962 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6963 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6964 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6965 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6966 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6967 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6968 (tdesc_powerpc_isa205_vsx64l): Declare.
6969 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6970 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6971 (ppc_set_pc, ppc_get_hwcap): Adjust.
6972 (ppc_usrregs_info): Forward declare.
6973 (!__powerpc64__) ppc_regmap_adjusted: New global.
6974 (ppc_arch_setup): Adjust to the current process'es target
6975 description.
6976 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6977 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6978 (ppc_store_evrregset): Adjust.
6979 (target_regsets): Rename to ...
6980 (ppc_regsets): ... this, and make static.
6981 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6982 (ppc_regs_info): New function.
6983 (the_low_target): Adjust.
6984 (initialize_low_arch): New function.
6985 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6986 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6987 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6988 (tdesc_s390x_linux64v2): Declare.
6989 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6990 (s390_fill_gregset, s390_store_last_break): Adjust.
6991 (target_regsets): Rename to ...
6992 (s390_regsets): ... this, and make static.
6993 (s390_get_pc, s390_set_pc): Adjust.
6994 (s390_get_hwcap): New target_desc parameter, and use it.
6995 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6996 (s390_arch_setup): Adjust to set the current process'es target
6997 description. Don't adjust the regmap.
6998 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6999 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7000 (regs_info_3264): New globals.
7001 (s390_regs_info): New function.
7002 (the_low_target): Adjust.
7003 (initialize_low_arch): New function.
7004 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7005 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7006 [__mips64] (init_registers_mips_linux)
7007 (init_registers_mips_dsp_linux): Delete defines.
7008 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7009 (have_dsp): New global.
7010 (mips_read_description): New, based on mips_arch_setup.
7011 (mips_arch_setup): Reimplement.
7012 (get_usrregs_info): New function.
7013 (mips_cannot_fetch_register, mips_cannot_store_register)
7014 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7015 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7016 (target_regsets): Rename to ...
7017 (mips_regsets): ... this, and make static.
7018 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7019 (dsp_regs_info, regs_info): New globals.
7020 (mips_regs_info): New function.
7021 (the_low_target): Adjust.
7022 (initialize_low_arch): New function.
7023 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7024 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7025 Declare.
7026 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7027 (arm_read_description): New, with bits factored from
7028 arm_arch_setup.
7029 (arm_arch_setup): Reimplement.
7030 (target_regsets): Rename to ...
7031 (arm_regsets): ... this, and make static.
7032 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7033 (arm_regs_info): New function.
7034 (the_low_target): Adjust.
7035 (initialize_low_arch): New function.
7036 * linux-m68k-low.c (tdesc_m68k): Declare.
7037 (target_regsets): Rename to ...
7038 (m68k_regsets): ... this, and make static.
7039 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7040 (m68k_regs_info): New function.
7041 (m68k_arch_setup): New function.
7042 (the_low_target): Adjust.
7043 (initialize_low_arch): New function.
7044 * linux-sh-low.c (tdesc_sharch): Declare.
7045 (target_regsets): Rename to ...
7046 (sh_regsets): ... this, and make static.
7047 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7048 (sh_regs_info, sh_arch_setup): New functions.
7049 (the_low_target): Adjust.
7050 (initialize_low_arch): New function.
7051 * linux-bfin-low.c (tdesc_bfin): Declare.
7052 (bfin_arch_setup): New function.
7053 (bfin_usrregs_info, regs_info): New globals.
7054 (bfin_regs_info): New function.
7055 (the_low_target): Adjust.
7056 (initialize_low_arch): New function.
7057 * linux-cris-low.c (tdesc_cris): Declare.
7058 (cris_arch_setup): New function.
7059 (cris_usrregs_info, regs_info): New globals.
7060 (cris_regs_info): New function.
7061 (the_low_target): Adjust.
7062 (initialize_low_arch): New function.
7063 * linux-cris-low.c (tdesc_crisv32): Declare.
7064 (cris_arch_setup): New function.
7065 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7066 (cris_regs_info): New function.
7067 (the_low_target): Adjust.
7068 (initialize_low_arch): New function.
7069 * linux-m32r-low.c (tdesc_m32r): Declare.
7070 (m32r_arch_setup): New function.
7071 (m32r_usrregs_info, regs_info): New globals.
7072 (m32r_regs_info): Adjust.
7073 (initialize_low_arch): New function.
7074 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7075 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7076 (tic6x_usrregs_info): Forward declare.
7077 (tic6x_read_description): New function, based on ...
7078 (tic6x_arch_setup): ... this. Reimplement.
7079 (target_regsets): Rename to ...
7080 (tic6x_regsets): ... this, and make static.
7081 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7082 (tic6x_regs_info): New function.
7083 (the_low_target): Adjust.
7084 (initialize_low_arch): New function.
7085 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7086 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7087 (target_regsets): Rename to ...
7088 (xtensa_regsets): ... this, and make static.
7089 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7090 globals.
7091 (xtensa_arch_setup, xtensa_regs_info): New functions.
7092 (the_low_target): Adjust.
7093 (initialize_low_arch): New function.
7094 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7095 (nios2_arch_setup): Set the current process'es tdesc.
7096 (target_regsets): Rename to ...
7097 (nios2_regsets): ... this.
7098 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7099 (nios2_regs_info): New function.
7100 (the_low_target): Adjust.
7101 (initialize_low_arch): New function.
7102 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7103 (aarch64_arch_setup): Set the current process'es tdesc.
7104 (target_regsets): Rename to ...
7105 (aarch64_regsets): ... this.
7106 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7107 (aarch64_regs_info): New function.
7108 (the_low_target): Adjust.
7109 (initialize_low_arch): New function.
7110 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7111 globals.
7112 (target_regsets): Rename to ...
7113 (tile_regsets): ... this.
7114 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7115 (tile_regs_info): New function.
7116 (tile_arch_setup): Set the current process'es tdesc.
7117 (the_low_target): Adjust.
7118 (initialize_low_arch): New function.
7119 * spu-low.c (tdesc_spu): Declare.
7120 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7121 * win32-arm-low.c (tdesc_arm): Declare.
7122 (arm_arch_setup): New function.
7123 (the_low_target): Install arm_arch_setup instead of
7124 init_registers_arm.
7125 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7126 (init_windows_x86): Rename to ...
7127 (i386_arch_setup): ... this. Set `win32_tdesc'.
7128 (the_low_target): Adjust.
7129 * win32-low.c (win32_tdesc): New global.
7130 (child_add_thread): Don't create the thread cache here.
7131 (do_initial_child_stuff): Set the new process'es tdesc.
7132 * win32-low.h (struct target_desc): Forward declare.
7133 (win32_tdesc): Declare.
7134 * lynx-i386-low.c (tdesc_i386): Declare global.
7135 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7136 * lynx-low.c (lynx_tdesc): New global.
7137 (lynx_add_process): Set the new process'es tdesc.
7138 * lynx-low.h (struct target_desc): Forward declare.
7139 (lynx_tdesc): Declare global.
7140 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7141 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7142 * nto-low.c (nto_tdesc): New global.
7143 (do_attach): Set the new process'es tdesc.
7144 * nto-low.h (struct target_desc): Forward declare.
7145 (nto_tdesc): Declare.
7146 * nto-x86-low.c (tdesc_i386): Declare.
7147 (nto_x86_arch_setup): Set `nto_tdesc'.
7148
7149 2013-06-04 Gary Benson <gbenson@redhat.com>
7150
7151 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7152 to qSupported response when appropriate.
7153 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7154 with nonzero-length annex.
7155 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7156 arguments supplied in annex.
7157
7158 2013-05-31 Doug Evans <dje@google.com>
7159
7160 PR server/15594
7161 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7162 64 bits in 64-cross-32 environment.
7163
7164 2013-05-28 Pedro Alves <palves@redhat.com>
7165
7166 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7167 (aarch64-without-fpu.c): Delete rule.
7168 * configure.srv (aarch64*-*-linux*): Remove references to
7169 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7170 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7171 declaration.
7172
7173 2013-05-24 Pedro Alves <palves@redhat.com>
7174
7175 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7176 instead of strchr/decode_address. Error if the range isn't split
7177 with a ','. Don't assume there's be a ':' in the action.
7178
7179 2013-05-23 Yao Qi <yao@codesourcery.com>
7180 Pedro Alves <palves@redhat.com>
7181
7182 * linux-low.c (lwp_in_step_range): New function.
7183 (linux_wait_1): If the thread was range stepping and stopped
7184 outside the stepping range, report the stop to GDB. Otherwise,
7185 continue stepping. Add range stepping debug output.
7186 (linux_set_resume_request): Copy the step range from the resume
7187 request to the lwp.
7188 (linux_supports_range_stepping): New.
7189 (linux_target_ops) <supports_range_stepping>: Set to
7190 linux_supports_range_stepping.
7191 * linux-low.h (struct linux_target_ops)
7192 <supports_range_stepping>: New field.
7193 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7194 * linux-x86-low.c (x86_supports_range_stepping): New.
7195 (the_low_target) <supports_range_stepping>: Set to
7196 x86_supports_range_stepping.
7197 * server.c (handle_v_cont): Handle 'r' action.
7198 (handle_v_requests): Append ";r" if the target supports range
7199 stepping.
7200 * target.h (struct thread_resume) <step_range_start,
7201 step_range_end>: New fields.
7202 (struct target_ops) <supports_range_stepping>:
7203 New field.
7204 (target_supports_range_stepping): New macro.
7205
7206 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7207
7208 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7209 confusion in comment.
7210
7211 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7212
7213 * lynx-low.c (struct process_info_private): New type.
7214 (lynx_add_process): New function.
7215 (lynx_create_inferior, lynx_attach): Replace calls to
7216 add_process by calls to lynx_add_process.
7217 (lynx_resume): If PTID is null, then try using
7218 current_process()->private->last_wait_event_ptid.
7219 Add comments.
7220 (lynx_clear_inferiors): Delete. The contents of that function
7221 has been inlined in lynx_mourn;
7222 (lynx_wait_1): Save the ptid in the process's private data.
7223 (lynx_mourn): Free the process' private data. Replace call
7224 to lynx_clear_inferiors by call to clear_inferiors.
7225
7226 2013-05-17 Yao Qi <yao@codesourcery.com>
7227
7228 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7229 the right place.
7230
7231 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7232
7233 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7234 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7235 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7236 PT_TEXT_END_ADDR guards. Update comments.
7237 (linux_target_op) <read_offsets>: Conditionally define to
7238 linux_read_offsets if the target is UCLIBC and if it defines
7239 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7240
7241 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7242 Andrew Jenner <andrew@codesourcery.com>
7243
7244 * Makefile.in (SFILES): Add linux-nios2-low.c.
7245 (clean): Add action to delete nios2-linux.c.
7246 (nios2-linux.c): New rule.
7247 * configure.srv: Add nios2*-*-linux*.
7248 * linux-nios2-low.c: New.
7249
7250 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7251
7252 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7253
7254 2013-04-25 Hui Zhu <hui@codesourcery.com>
7255
7256 PR gdb/15186
7257 * ax.c (ax_printf): Add fflush.
7258
7259 2013-04-22 Tom Tromey <tromey@redhat.com>
7260
7261 * Makefile.in (SFILES): Add filestuff.c.
7262 (OBS): Add filestuff.o.
7263 (filestuff.o): New target.
7264 * config.in, configure: Rebuild.
7265 * configure.ac: Check for fdwalk, pipe2.
7266
7267 2013-04-17 Pedro Alves <palves@redhat.com>
7268
7269 * configure.ac (USE_THREAD_DB): Delete variable.
7270 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7271 Don't AC_SUBST USE_THREAD_DB.
7272 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7273 * config.in, configure: Regenerate.
7274
7275 2013-04-16 Pedro Alves <palves@redhat.com>
7276
7277 * linux-low.h (struct lwp_info) <thread_known>: Move under
7278 the USE_THREAD_DB #ifdef.
7279
7280 2013-04-16 Pedro Alves <palves@redhat.com>
7281
7282 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7283 (linux-low.o): Delete rule.
7284 * linux-low.h: Always include "gdb_thread_db.h" instead of
7285 conditionally including thread_db.h.
7286 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7287 HAVE_THREAD_DB_H.
7288
7289 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7290
7291 * Makefile.in (install-only): Fix make install regression.
7292
7293 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7294
7295 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7296 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7297 installation.
7298 * gdbserver.1: Remove.
7299
7300 2013-03-22 Pedro Alves <palves@redhat.com>
7301
7302 * linux-low.c (handle_extended_wait): Don't call
7303 linux_enable_event_reporting.
7304
7305 2013-03-15 Tony Theodore <tonyt@logyst.com>
7306
7307 PR build/9098:
7308 * Makefile.in (SHELL): Use @SHELL@.
7309
7310 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7311
7312 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7313 compiler warning.
7314
7315 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7316
7317 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7318 Remove extraneous NULL element.
7319
7320 2013-03-13 Yao Qi <yao@codesourcery.com>
7321
7322 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7323 'V' block in trace frame.
7324
7325 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7326
7327 * target.h (struct target_ops): Add btrace ops.
7328 (target_supports_btrace): New macro.
7329 (target_enable_btrace): New macro.
7330 (target_disable_btrace): New macro.
7331 (target_read_btrace): New macro.
7332 * gdbthread.h (struct thread_info): Add btrace field.
7333 * server.c: Include btrace-common.h.
7334 (handle_btrace_general_set): New function.
7335 (handle_btrace_enable): New function.
7336 (handle_btrace_disable): New function.
7337 (handle_general_set): Call handle_btrace_general_set.
7338 (handle_qxfer_btrace): New function.
7339 (struct qxfer qxfer_packets[]): Add btrace entry.
7340 * inferiors.c (remove_thread): Disable btrace.
7341 * linux-low: Include linux-btrace.h.
7342 (linux_low_enable_btrace): New function.
7343 (linux_low_read_btrace): New function.
7344 (linux_target_ops): Add btrace ops.
7345 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7346 Add srv_linux_btrace=yes.
7347 (x86_64-*-linux*): Add linux-btrace.o.
7348 Add srv_linux_btrace=yes.
7349 * configure.ac: Define HAVE_LINUX_BTRACE.
7350 * config.in: Regenerated.
7351 * configure: Regenerated.
7352
7353 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7354
7355 * server.c (handle_qxfer): Preserve error message if -3 is
7356 returned.
7357 (qxfer): Document the -3 return value.
7358
7359 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7360
7361 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7362 (linux_btrace_h): New variable.
7363 (linux-btrace.o): New rule.
7364
7365 2013-03-08 Stan Shebs <stan@codesourcery.com>
7366 Hafiz Abid Qadeer <abidh@codesourcery.com>
7367
7368 * tracepoint.c (trace_buffer_size): New global.
7369 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7370 (init_trace_buffer): Change to one-argument function. Allocate
7371 trace buffer memory.
7372 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7373 handle QTBuffer:size packet.
7374 (cmd_bigqtbuffer_size): New function.
7375 (initialize_tracepoint): Call init_trace_buffer with
7376 DEFAULT_TRACE_BUFFER_SIZE.
7377 * server.c (handle_query): Add QTBuffer:size in the
7378 supported packets.
7379
7380 2013-03-07 Yao Qi <yao@codesourcery.com>
7381
7382 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7383 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7384 of -1.
7385 (cmd_qtsp): Adjust condition. Do post increment.
7386 Set cur_action and cur_step_action back to 0.
7387
7388 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7389
7390 PR server/15236
7391 * linux-low.c (linux_write_memory): Return early success if LEN is
7392 zero.
7393
7394 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7395
7396 * configure.srv: Add x86_64-*-cygwin* as target.
7397
7398 2013-02-28 Tom Tromey <tromey@redhat.com>
7399
7400 * configure.ac: Invoke AC_SYS_LARGEFILE.
7401 * configure, config.in: Rebuild.
7402
7403 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7404
7405 * win32-low.c: Throughout, fix format strings and casts of
7406 printf-like functions to avoid type related warnings on all
7407 platforms.
7408 (get_child_debug_event): Print dwDebugEventCode as hex since
7409 that's how it's usually documented.
7410
7411 2013-02-28 Yao Qi <yao@codesourcery.com>
7412
7413 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7414 pulongest.
7415
7416 2013-02-27 Jiong Wang <jiwang@tilera.com>
7417
7418 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7419 (reg-tilegx32.c): New rule.
7420 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7421 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7422 different register info initializer according to elf class.
7423 (init_registers_tilgx32): New function. The tilegx32 register info
7424 initializer.
7425 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7426 (tile_store_gregset): Likewise.
7427
7428 2013-02-27 Yao Qi <yao@codesourcery.com>
7429
7430 * server.c (process_point_options): Print debug message when
7431 debug_threads is true.
7432
7433 2013-02-26 Yao Qi <yao@codesourcery.com>
7434
7435 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7436
7437 2013-02-19 Pedro Alves <palves@redhat.com>
7438 Kai Tietz <ktietz@redhat.com>
7439
7440 PR gdb/15161
7441
7442 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7443 instead of strtoul to extract address from packet.
7444 (process_serial_event) <'z'>: Likewise.
7445
7446 2013-02-18 Yao Qi <yao@codesourcery.com>
7447
7448 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7449
7450 2013-02-14 Pedro Alves <palves@redhat.com>
7451
7452 Plug memory leak.
7453
7454 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7455 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7456
7457 2013-02-14 Pedro Alves <palves@redhat.com>
7458
7459 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7460
7461 2013-02-14 Pedro Alves <palves@redhat.com>
7462
7463 * tracepoint.c (save_string): Delete.
7464 (add_tracepoint_action): Use savestring instead of save_string.
7465
7466 2013-02-12 Pedro Alves <palves@redhat.com>
7467
7468 * linux-xtensa-low.c: Ditto.
7469 * xtensa-xtregs.c: Ditto.
7470
7471 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7472
7473 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7474 thread_db.
7475
7476 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7477
7478 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7479 aarch64_num_wp_regs and aarch64_num_bp_regs to
7480 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7481
7482 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7483
7484 * linux-aarch64-low.c (ps_get_thread_area): Replace
7485 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7486
7487 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7488 Marcus Shawcroft <marcus.shawcroft@arm.com>
7489 Nigel Stephens <nigel.stephens@arm.com>
7490 Yufeng Zhang <yufeng.zhang@arm.com>
7491
7492 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7493 (aarch64.c, aarch64-without-fpu.c): New targets.
7494 * configure.srv (aarch64*-*-linux*): New.
7495 * linux-aarch64-low.c: New file.
7496
7497 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7498
7499 * linux-low.c (handle_extended_wait, linux_create_inferior)
7500 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7501 (dequeue_one_deferred_signal, linux_resume_one_thread)
7502 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7503 (linux_tracefork_grandchild, linux_test_for_tracefork)
7504 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7505 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7506 where the argument is 0.
7507
7508 2013-01-25 Yao Qi <yao@codesourcery.com>
7509
7510 * event-loop.c: Include "queue.h".
7511 (gdb_event_p): New typedef.
7512 (struct gdb_event) <next_event>: Remove.
7513 (event_queue): Change to QUEUE(gdb_event_p).
7514 (async_queue_event): Remove.
7515 (gdb_event_xfree): New.
7516 (initialize_event_loop): New.
7517 (process_event): Use API from QUEUE.
7518 (wait_for_event): Likewise.
7519 * server.c (main): Call initialize_event_loop.
7520 * server.h (initialize_event_loop): Declare.
7521
7522 2013-01-18 Yao Qi <yao@codesourcery.com>
7523
7524 * ax.h (struct eval_agent_expr_context): New.
7525 (gdb_eval_agent_expr): Update declaration.
7526 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7527 TFRAME. Add new argument CTX.
7528 * server.h (struct eval_agent_expr_context): Declare.
7529 (agent_mem_read, agent_tsv_read): Update declaration.
7530 (agent_mem_read_string): Likewise.
7531 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7532 (add_traceframe_block): Add new argument TPOINT.
7533 Increase TPOINT->traceframe_usage.
7534 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7535 eval_tracepoint_agent_expr.
7536 (condition_true_at_tracepoint): Likewise.
7537 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7538 (agent_mem_read_string, agent_tsv_read): Likewise.
7539
7540 2013-01-16 Yao Qi <yao@codesourcery.com>
7541
7542 * linux-low.c (linux_resume_one_lwp): Don't check
7543 'lwp->bp_reinsert != 0'.
7544
7545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7546 Pedro Alves <palves@redhat.com>
7547
7548 * lynx-low.c (ptrace_request_to_str): Define a temporary
7549 macro and use it to simplify this function's implementation.
7550
7551 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7552
7553 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7554 sets errno.
7555
7556 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7557
7558 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7559
7560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7561
7562 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7563
7564 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7565
7566 * lynx-low.c (lynx_resume): Use the resume_info parameter
7567 to determine the ptid for the lynx_ptrace call, unless
7568 it is equal to minus_one_ptid, in which case we use the
7569 ptid of the current_inferior.
7570 (lynx_wait_1): After having received a thread create/exit
7571 event, resume the inferior's execution using the signaling
7572 thread's ptid, rather than the old ptid.
7573
7574 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7575
7576 * lynx-low.c (lynx_resume): Delete variable ret.
7577
7578 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7579
7580 * gdbreplay.c (gdbreplay_version): Update copyright year.
7581 * server.c (gdbserver_version): Likewise.
7582
7583 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7584
7585 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7586 new thread.
7587
7588 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7589
7590 * lynx-low.c (ptrace_request_to_str): Add handling for
7591 PTRACE_GETTRACESIG.
7592
7593 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7594
7595 * lynx-low.c (lynx_attach): Delete variable new_process.
7596
7597 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7598
7599 * lynx-low.c (lynx_create_inferior): Delete variable
7600 new_process.
7601
7602 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7603
7604 * lynx-low.c (ptrace_request_to_str): Do not handle
7605 PTRACE_GETTHREADLIST if this macro does not exist.
7606
7607 2012-12-15 Yao Qi <yao@codesourcery.com>
7608
7609 * Makefile.in (OBS): Add notif.o.
7610 * notif.c, notif.h: New.
7611 * server.c: Include "notif.h".
7612 (struct vstop_notif) <next>: Remove.
7613 <base>: New field.
7614 (queue_stop_reply): Update.
7615 (push_event, send_next_stop_reply): Remove.
7616 (discard_queued_stop_replies): Update.
7617 (notif_stop): New variable.
7618 (handle_v_stopped): Remove.
7619 (handle_v_requests): Don't call handle_v_stopped. Call
7620 handle_ack_notif instead.
7621 (queue_stop_reply_callback): Call notif_event_enque instead
7622 of queue_stop_reply.
7623 (handle_status): Don't call send_next_stop_reply, call
7624 notif_write_event instead.
7625 (kill_inferior_callback): Likewise.
7626 (detach_or_kill_inferior_callback): Likewise.
7627 (main): Call initialize_notif.
7628 (process_serial_event): Call QUEUE_is_empty.
7629 (handle_target_event): Call notif_push instead of push event.
7630 * server.h (push_event): Remove declaration.
7631
7632 2012-12-10 Tom Tromey <tromey@redhat.com>
7633
7634 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7635 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7636 macros.
7637 (.c.o): Rewrite.
7638 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7639 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7640 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7641 (amd64-linux-ipa.o, ax.o): Rewrite.
7642 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7643 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7644 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7645 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7646 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7647 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7648 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7649 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7650 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7651 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7652 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7653 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7654 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7655 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7656 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7657 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7658 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7659 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7660 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7661 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7662 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7663 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7664 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7665 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7666 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7667 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7668 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7669 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7670 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7671 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7672 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7673 (reg-tilegx.o): Remove.
7674 (all_object_files): New macro.
7675 Include .deps files.
7676 * aclocal.m4, configure: Rebuild.
7677 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7678 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7679 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7680
7681 2012-12-05 Tom Tromey <tromey@redhat.com>
7682
7683 PR gdb/14917:
7684 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7685
7686 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7687
7688 * configure.ac: Check for linux/perf_event.h.
7689 * config.in: Regenerated.
7690 * configure: Regenerated.
7691
7692 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7693
7694 * hostio.c (handle_readlink): Decrease buffer size
7695 parameter passed to readlink by one byte.
7696
7697 2012-11-26 Yao Qi <yao@codesourcery.com>
7698
7699 * configure.ac (build_warnings): Append '-Wempty-body'.
7700 * configure: Regenerated.
7701 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7702 body.
7703
7704 2012-11-15 Pierre Muller <muller@sourceware.org>
7705
7706 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7707 * config.in: Regenerate.
7708 * configure: Regenerate.
7709 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7710 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7711 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7712 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7713 header.
7714 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7715 instead of <sys/wait.h> header.
7716 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7717
7718 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7719
7720 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7721 (various make rules): Remove -DGDBSERVER
7722
7723 2012-11-09 Yao Qi <yao@codesourcery.com>
7724
7725 * spu-low.c (current_ptid): Move it to ..
7726 * gdbthread.h: ... here. New.
7727 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7728 * server.c (myresume, process_serial_event): Likewise.
7729 * thread-db.c (thread_db_find_new_threads): Likewise.
7730 * tracepoint.c (run_inferior_command): Likewise.
7731
7732 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7733
7734 * server.c (handle_search_memory_1): Include access length in
7735 warning message.
7736
7737 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7738
7739 * linux-crisv32-low.c: Fix compile errors.
7740
7741 2012-09-04 Yao Qi <yao@codesourcery.com>
7742
7743 * tracepoint.c (cmd_qtsv): Adjust debug message.
7744 Don't check CUR_TPOINT.
7745
7746 2012-08-28 Yao Qi <yao@codesourcery.com>
7747
7748 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7749 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7750 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7751 Remove declarations of xmalloc, xreallloc, xstrdup and
7752 freeargv.
7753 * Makefile.in (libiberty_h): New.
7754 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7755 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7756
7757 2012-08-23 Yao Qi <yao@codesourcery.com>
7758
7759 * server.h: Remove declaration of 'xsnprintf'.
7760
7761 2012-08-22 Keith Seitz <keiths@redhat.com>
7762
7763 * server.h: Include build-gnulib-gbserver/config.h.
7764 * gdbreplay.c: Likewise.
7765
7766 2012-08-08 Doug Evans <dje@google.com>
7767
7768 * Makefile.in (SFILES): Add gdb_vecs.c.
7769 (OBS): Add gdb_vecs.o.
7770 (gdb_vecs_h, host_defs_h): New variables.
7771 (thread-db.o): Add $(gdb_vecs_h) dependency.
7772 (gdb_vecs.o): New rule.
7773 * thread-db.c: #include "gdb_vecs.h".
7774 (thread_db_load_search): Use a vector to iterate over path elements.
7775 Handle text appearing after "$pdir".
7776
7777 * configure.ac: Add check for strstr.
7778 * config.in: Regenerate.
7779 * configure: Regenerate.
7780
7781 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7782
7783 * hostio.c (handle_pread): If pread fails, fall back to attempting
7784 lseek/read.
7785 (handle_pwrite): Likewise for pwrite.
7786
7787 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7788
7789 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7790 between unsupported TYPE and unimplementable ADDR/LEN combination.
7791 (arm_insert_point): Act on new return value.
7792
7793 2012-07-31 Pedro Alves <palves@redhat.com>
7794
7795 * server.c (process_point_options): Only skip tokens if we find
7796 one that is unrecognized. Don't treat 'X' specially while
7797 skipping unrecognized tokens.
7798
7799 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7800
7801 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7802 to 4-byte-align HW breakpoint addresses for Thumb.
7803
7804 2012-07-27 Yao Qi <yao@codesourcery.com>
7805
7806 PR remote/14161.
7807
7808 * server.h: Declare gdb_agent_about_to_close.
7809 * target.c (kill_inferior): Include "agent.h".
7810 New. Send command 'kill'.
7811 * target.h (kill_inferior): Removed macro.
7812 * tracepoint.c (gdb_agent_about_to_close): New.
7813 (gdb_agent_helper_thread): Handle command 'close'.
7814 Wait endlessly until the inferior stops.
7815 Install gdb_agent_remove_socket to atexit hook.
7816 (agent_socket_name): New static variable.
7817 (gdb_agent_socket_init): Replace local variable 'name' with
7818 'agent_socket_name'.
7819 (gdb_agent_remove_socket): New.
7820
7821 2012-07-27 Yao Qi <yao@codesourcery.com>
7822
7823 * server.c (process_point_options): Stop at 'X' when parsing.
7824
7825 2012-07-19 Michael Eager <eager@eagercon.com>
7826
7827 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7828 to hw_execute.
7829 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7830 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7831 hardware breakpoint.
7832
7833 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7834
7835 * gdbserver/linux-low.c (initialize_low): Call
7836 linux_ptrace_init_warnings.
7837
7838 2012-07-02 Doug Evans <dje@google.com>
7839
7840 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7841 pointer to int.
7842
7843 2012-07-02 Stan Shebs <stan@codesourcery.com>
7844
7845 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7846 (ax.o): Add it to build rule.
7847 (ax-ipa.o): Ditto.
7848 (OBS): Add format.o.
7849 (IPA_OBS): Add format.o.
7850 * server.c (handle_query): Claim support for breakpoint commands.
7851 (process_point_options): Add command case.
7852 (process_serial_event): Leave running if there are printfs in
7853 effect.
7854 * mem-break.h (any_persistent_commands): Declare.
7855 (add_breakpoint_commands): Declare.
7856 (gdb_no_commands_at_breakpoint): Declare.
7857 (run_breakpoint_commands): Declare.
7858 * mem-break.c (struct point_command_list): New struct.
7859 (struct breakpoint): New field command_list.
7860 (any_persistent_commands): New function.
7861 (add_commands_to_breakpoint): New function.
7862 (add_breakpoint_commands): New function.
7863 (gdb_no_commands_at_breakpoint): New function.
7864 (run_breakpoint_commands): New function.
7865 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7866 locally.
7867 * ax.c: Include format.h.
7868 (ax_printf): New function.
7869 (gdb_eval_agent_expr): Add printf opcode.
7870
7871 2012-06-13 Yao Qi <yao@codesourcery.com>
7872
7873 * server.c (start_inferior): Remove duplicated writes to fields
7874 'last_resume_kind' and 'last_status' of 'current_inferior'.
7875
7876 2012-06-12 Yao Qi <yao@codesourcery.com>
7877 Pedro Alves <palves@redhat.com>
7878
7879 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7880 comment.
7881 * server.c (handle_v_cont): Extend comment.
7882
7883 2012-06-11 Yao Qi <yao@codesourcery.com>
7884
7885 * linux-low.c (linux_attach): Add 'static'.
7886
7887 2012-06-06 Yao Qi <yao@codesourcery.com>
7888
7889 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7890
7891 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7892
7893 Fix gcc -flto compilation warning.
7894 * server.c (main): Make variable multi_mode and attach volatile.
7895
7896 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7897
7898 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7899 if the platform doesn't know about it.
7900
7901 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7902
7903 * Makefile.in (SFILES): Add linux-tile-low.c.
7904 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7905 * configure.srv: Handle tilegx-*-linux*.
7906 * linux-tile-low.c: New file.
7907
7908 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7909
7910 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7911
7912 2012-05-24 Pedro Alves <palves@redhat.com>
7913
7914 PR gdb/7205
7915
7916 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7917
7918 2012-05-24 Pedro Alves <palves@redhat.com>
7919
7920 PR gdb/7205
7921
7922 Replace target_signal with gdb_signal throughout.
7923
7924 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7925
7926 * linux-low.c (linux_store_registers): Avoid the copying sequence
7927 when no data has been retrieved by ptrace.
7928
7929 2012-05-22 Will Deacon <will.deacon@arm.com>
7930
7931 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7932 Include asm/ptrace.h.
7933 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7934 already defined.
7935
7936 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7937
7938 * linux-low.c (linux_store_registers): Don't re-retrieve data
7939 with ptrace that has already been obtained from /proc. Always
7940 copy any data retrieved with ptrace to the buffer supplied.
7941
7942 2012-05-11 Yao Qi <yao@codesourcery.com>
7943 Pedro Alves <palves@redhat.com>
7944
7945 * linux-low.c (enum stopping_threads_kind): New.
7946 (stopping_threads): Change type to `enum stopping_threads_kind'.
7947 (handle_extended_wait): If stopping and suspending threads, leave
7948 the new_lwp suspended too.
7949 (linux_wait_for_event): Adjust.
7950 (stop_all_lwps): Set `stopping_threads' to
7951 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7952 whether we're suspending threads or just stopping them. Assert no
7953 recursion happens.
7954
7955 2012-04-29 Yao Qi <yao@codesourcery.com>
7956
7957 * server.h: Move some code to ...
7958 * gdbthread.h: ... here. New.
7959 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7960 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7961 (nto-low.o, win32-low.o): Likewise.
7962 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7963 * regcache.c, remote-utils.c, server.c: Likewise.
7964 * target.c, tracepoint.c, win32-low.c: Likewise.
7965
7966 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7967
7968 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7969 (PTRACE_ARG4_TYPE): Likewise.
7970 (PTRACE_XFER_TYPE): Likewise.
7971 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7972 ptrace to PTRACE_ARG3_TYPE.
7973 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7974 (PTRACE_ARG4_TYPE): Likewise.
7975 (PTRACE_XFER_TYPE): Likewise.
7976 (linux_detach_one_lwp): Cast fourth argument of
7977 ptrace to long then PTRACE_ARG4_TYPE.
7978 (regsets_fetch_inferior_registers): Cast third argument of
7979 ptrace to long then PTRACE_ARG3_TYPE.
7980 (regsets_store_inferior_registers): Likewise.
7981
7982 2012-04-20 Pedro Alves <palves@redhat.com>
7983
7984 * configure: Regenerate.
7985
7986 2012-04-19 Pedro Alves <palves@redhat.com>
7987
7988 * Makefile.in (GNULIB_BUILDDIR): New.
7989 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7990 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7991 (all, install-only, uninstall, clean-info, all-lib, clean): No
7992 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7993 (maintainer-clean realclean distclean): Use subdir_do.
7994 (subdir_do): New.
7995 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7996 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7997 * acinclude.m4: Include acx_configure_dir.m4.
7998 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7999 calls. Call AC_PROG_RANLIB. Configure gnulib using
8000 ACX_CONFIGURE_DIR.
8001 (GNULIB): New.
8002 (GNULIB_STDINT_H): Adjust.
8003 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8004 * gdbreplay.c: Include build-gnulib/config.h.
8005 * server.h: Likewise.
8006 * aclocal.m4: Regenerate.
8007 * config.in: Regenerate.
8008 * configure: Regenerate.
8009
8010 2012-04-19 Pedro Alves <palves@redhat.com>
8011
8012 * Makefile.in (LIBGNU, INCGNU): Adjust.
8013 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8014 (all, install-only, uninstall, clean-info, all-lib, clean)
8015 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8016 * configure.ac: Adjust AC_OUTPUT output.
8017 * aclocal.m4: Regenerate.
8018 * configure: Regenerate.
8019
8020 2012-04-19 Pedro Alves <palves@redhat.com>
8021
8022 * Makefile.in (generated_files): New.
8023 (server_h): Remove the explicit dependency on config.h, and depend
8024 on $generated_files.
8025
8026 2012-04-19 Pedro Alves <palves@redhat.com>
8027
8028 * Makefile.in (INCGNU): Add -Ignulib.
8029
8030 2012-04-19 Pedro Alves <palves@redhat.com>
8031
8032 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8033 (INCGNU): ... this, and spell out -I here.
8034 (GNULIB_LIB): Rename to ...
8035 (LIBGNU): ... this.
8036 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8037
8038 2012-04-19 Pedro Alves <palves@redhat.com>
8039
8040 * config.in: Regenerate.
8041
8042 2012-04-19 Pedro Alves <palves@redhat.com>
8043
8044 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8045 * server.h (memmem): Remove declaration.
8046 * config.in: Regenerate.
8047 * configure: Regenerate.
8048
8049 2012-04-19 Yao Qi <yao@codesourcery.com>
8050
8051 * Makefile.in (SFILES): Add common/vec.c.
8052 (OBS): Add vec.o.
8053 (vec.o): New rule.
8054
8055 2012-04-19 Yao Qi <yao@codesourcery.com>
8056
8057 * remote-utils.c (prepare_resume_reply): Replace with macro
8058 target_core_of_thread.
8059 * server.c (handle_qxfer_threads_proper): Likewise.
8060 * target.h (traget_core_of_thread): New macro.
8061
8062 2012-04-18 Pedro Alves <palves@redhat.com>
8063
8064 * aclocal.m4: Regenerate.
8065 * configure: Regenerate.
8066
8067 2012-04-16 Yao Qi <yao@codesourcery.com>
8068
8069 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8070 duplicated on address.
8071
8072 2012-04-16 Yao Qi <yao@codesourcery.com>
8073
8074 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8075 (struct tracepoint_action_ops) <send>: New field.
8076 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8077 (agent_expr_send, x_tracepoint_action_send): New.
8078 (l_tracepoint_action_send): New.
8079 (cmd_qtdp): Download and install tracepoint
8080 according to `use_agent'.
8081 (run_inferior_command): Add one more parameter `len'.
8082 Update callers.
8083 (tracepoint_send_agent): New.
8084 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8085
8086 2012-04-16 Yao Qi <yao@codesourcery.com>
8087
8088 * tracepoint.c (download_tracepoints): Moved to ...
8089 (cmd_qtstart): ... here.
8090
8091 2012-04-14 Yao Qi <yao@codesourcery.com>
8092
8093 * tracepoint.c: Include inttypes.h.
8094 (struct collect_memory_action): Use sized types.
8095 (struct tracepoint): Likewise.
8096 (cmd_qtdp, stop_tracing): Update print specifiers.
8097 (cmd_qtp, response_tracepoint): Likewise.
8098 (collect_data_at_tracepoint): Likewise.
8099 (collect_data_at_step): Likewise.
8100
8101 2012-04-14 Yao Qi <yao@codesourcery.com>
8102
8103 Import gnulib module inttypes.
8104 * aclocal.m4, config.in, configure: Regenerated.
8105
8106 2012-04-14 Yao Qi <yao@codesourcery.com>
8107
8108 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8109 Makefile and config.status at last.
8110
8111 2012-04-13 Yao Qi <yao@codesourcery.com>
8112
8113 * tracepoint.c: Include stdint.h unconditionally.
8114
8115 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8116
8117 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8118 on BFD_HAVE_SYS_PROCFS_TYPE.
8119 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8120 * configure: Regenerate.
8121 * config.in: Likewise.
8122
8123 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8124
8125 * Makefile.in (clean): Also remove x32.c x32-linux.c
8126 x32-avx.c x32-avx-linux.c.
8127 (x32.o): New target.
8128 (x32.c): Likewise.
8129 (x32-linux.o): Likewise.
8130 (x32-linux.c): Likewise.
8131 (x32-avx.o): Likewise.
8132 (x32-avx.c): Likewise.
8133 (x32-avx-linux.o): Likewise.
8134 (x32-avx-linux.c): Likewise.
8135
8136 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8137 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8138 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8139 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8140 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8141 i386/x32-avx-linux.xml.
8142
8143 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8144 (init_registers_x32_avx_linux): Likwise.
8145 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8146 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8147
8148 2012-04-13 Pedro Alves <palves@redhat.com>
8149
8150 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8151 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8152 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8153 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8154 the sub-make.
8155
8156 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8157
8158 * linux-x86-low.c (compat_x32_clock_t): New.
8159 (compat_x32_siginfo_t): Likewise.
8160 (compat_x32_siginfo_from_siginfo): Likewise.
8161 (siginfo_from_compat_x32_siginfo): Likewise.
8162 (linux_is_elf64): Likewise.
8163 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8164 and siginfo_from_compat_x32_siginfo for x32.
8165 (x86_arch_setup): Set linux_is_elf64.
8166
8167 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8168
8169 PR gdb/13969
8170 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8171 e_machine field.
8172 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8173 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8174 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8175 compatible with process.
8176
8177 2012-04-12 Yao Qi <yao@codesourcery.com>
8178
8179 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8180 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8181 (install-only, install-info, clean): Handle sub dir gnulib.
8182 (all-lib, am--refresh): New targets.
8183 (memmem.o): Remove target.
8184 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8185 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8186 (AC_REPLACE_FUNCS): Remove memmem.
8187 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8188 (AC_OUTPUT): Generate Makefile in gnulib/.
8189 * aclocal.m4, config.in, configure: Regenerated.
8190
8191 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8192
8193 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8194
8195 2012-04-05 Pedro Alves <palves@redhat.com>
8196
8197 -Werror=strict-aliasing
8198
8199 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8200 pointer.
8201
8202 2012-04-04 Pedro Alves <palves@redhat.com>
8203
8204 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8205 (sparc_store_gregset_from_stack, sparc_store_gregset)
8206 (sparc_breakpoint_at): Fix formatting.
8207
8208 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8209
8210 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8211 are available.
8212 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8213 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8214 * config.in: Regenerate.
8215 * configure: Likewise.
8216
8217 2012-03-29 Pedro Alves <palves@redhat.com>
8218
8219 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8220 Correct ptrace arguments.
8221
8222 2012-03-28 Pedro Alves <palves@redhat.com>
8223
8224 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8225 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8226 (IA64_FR1_REGNUM): New defines.
8227 (ia64_fetch_register): New.
8228 (the_low_target): Install it.
8229 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8230 field.
8231 * linux-low.c (linux_fetch_registers): Try the
8232 the_low_target.fetch_register hook first.
8233
8234 * linux-arm-low.c (the_low_target): Adjust.
8235 * linux-bfin-low.c (the_low_target): Adjust.
8236 * linux-cris-low.c (the_low_target): Adjust.
8237 * linux-crisv32-low.c (the_low_target): Adjust.
8238 * linux-m32r-low.c (the_low_target): Adjust.
8239 * linux-m68k-low.c (the_low_target): Adjust.
8240 * linux-mips-low.c (the_low_target): Adjust.
8241 * linux-ppc-low.c (the_low_target): Adjust.
8242 * linux-s390-low.c (the_low_target): Adjust.
8243 * linux-sh-low.c (the_low_target): Adjust.
8244 * linux-sparc-low.c (the_low_target): Adjust.
8245 * linux-tic6x-low.c (the_low_target): Adjust.
8246 * linux-x86-low.c (the_low_target): Adjust.
8247 * linux-xtensa-low.c (the_low_target): Adjust.
8248
8249 2012-03-26 Pedro Alves <palves@redhat.com>
8250
8251 * server.c (handle_qxfer_libraries): Don't bail early if
8252 the_target->qxfer_libraries_svr4 is not NULL.
8253
8254 2012-03-26 Pedro Alves <palves@redhat.com>
8255
8256 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8257
8258 2012-03-23 Pedro Alves <palves@redhat.com>
8259
8260 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8261 "library-list-svr4" element's start tag when the the DSO list is
8262 empty.
8263
8264 2012-03-23 Pedro Alves <palves@redhat.com>
8265
8266 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8267 a variable whose type size is the same as the inferior's pointer
8268 size.
8269
8270 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8271
8272 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8273 struct siginfo.
8274 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8275 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8276 * linux-low.h: Include <signal.h>.
8277 (struct siginfo): Remove forward declaration.
8278 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8279 struct siginfo.
8280
8281 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8282
8283 * .gitignore: Ignore more files.
8284
8285 2012-03-19 Pedro Alves <palves@redhat.com>
8286 Jan Kratochvil <jan.kratochvil@redhat.com>
8287
8288 * server.c (cont_thread, general_thread): Add describing comments.
8289 (start_inferior): Clear `cont_thread'.
8290 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8291 of a process.
8292
8293 2012-03-15 Yao Qi <yao@codesourcery.com>
8294
8295 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8296 handling to ...
8297 (cmd_qtdp): ... here.
8298
8299 2012-03-15 Yao Qi <yao@codesourcery.com>
8300
8301 * tracepoint.c (struct tracepoint_action_ops): New.
8302 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8303 (m_tracepoint_action_download): New.
8304 (r_tracepoint_action_download): New.
8305 (x_tracepoint_action_download): New.
8306 (l_tracepoint_action_download): New.
8307 (add_tracepoint_action): Install `action->ops' according type.
8308 (download_tracepoint_1): Move code `download' function pointer
8309 of various tracepoint_action_ops.
8310
8311 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8312
8313 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8314 linux_ptrace_attach_warnings.
8315
8316 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8317
8318 * Makefile.in (linux-ptrace.o): New.
8319 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8320 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8321 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8322 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8323 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8324 of these targets.
8325 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8326
8327 2012-03-08 Yao Qi <yao@codesourcery.com>
8328 Pedro Alves <palves@redhat.com>
8329
8330 Fix PR server/13392.
8331 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8332 offset of JMP insn.
8333 * tracepoint.c (remove_tracepoint): New.
8334 (cmd_qtdp): Call remove_tracepoint when failed to install.
8335
8336 2012-03-07 Pedro Alves <palves@redhat.com>
8337
8338 * linux-low.c (get_detach_signal): New.
8339 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8340 Pass on pending signals to PTRACE_DETACH. Check the result of the
8341 ptrace call.
8342 * server.c (program_signals, program_signals_p): New.
8343 (handle_general_set): Handle QProgramSignals.
8344 * server.h (program_signals, program_signals_p): Declare.
8345
8346 2012-03-05 Pedro Alves <palves@redhat.com>
8347 Jan Kratochvil <jan.kratochvil@redhat.com>
8348
8349 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8350 New comment why.
8351
8352 2012-03-03 Yao Qi <yao@codesourcery.com>
8353
8354 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8355 agent_look_up_symbols.
8356
8357 2012-03-03 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8360 (linux-x86-low.o): Likewise.
8361 * server.h: Remove in_process_agent_loaded.
8362 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8363 common/agent.c.
8364 Update callers.
8365
8366 2012-03-03 Yao Qi <yao@codesourcery.com>
8367
8368 * tracepoint.c (gdb_agent_capability): New global.
8369 (in_process_agent_loaded_ust): Renamed to
8370 `in_process_agent_supports_ust'.
8371 Update callers.
8372 (in_process_agent_supports_ust): Call agent_capability_check.
8373 (clear_installed_tracepoints): Assert that agent supports
8374 agent.
8375
8376 2012-03-03 Yao Qi <yao@codesourcery.com>
8377
8378 * linux-low.c (linux_supports_agent): New.
8379 (linux_target_ops): Initialize field `supports_agent' with
8380 linux_supports_agent.
8381 * target.h (struct target_ops) <supports_agent>: New.
8382 (target_supports_agent): New macro.
8383 * server.c (handle_general_set): Handle packet 'QAgent'.
8384 (handle_query): Send `QAgent+'.
8385 * Makefile.in (server.o): Depends on agent.h.
8386
8387 2012-03-03 Yao Qi <yao@codesourcery.com>
8388
8389 * Makefile.in (OBS): Add agent.o.
8390 Add new rule for agent.o.
8391 Track dependence of tracepoint.c on agent.h.
8392 * tracepoint.c (run_inferior_command_1):
8393 (run_inferior_command): Call agent_run_command.
8394 (gdb_ust_connect_sync_socket): Deleted. Move it to
8395 common/agent.c.
8396 (resume_thread, stop_thread): Likewise.
8397 (gdb_ust_socket_init): Renamed to ...
8398 (gdb_agent_socket_init): ... New.
8399 (gdb_ust_thread): Renamed to ...
8400 (gdb_agent_helper_thread): ... New.
8401 (gdb_ust_init): Move some code to ...
8402 (gdb_agent_init): ... here. New.
8403 [HAVE_UST]: Call gdb_ust_init.
8404 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8405 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8406 * config.in, configure: Regenerated.
8407
8408 2012-03-02 Pedro Alves <palves@redhat.com>
8409
8410 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8411 * linux-low.c (struct simple_pid_list): New.
8412 (stopped_pids): New a struct simple_pid_list pointer.
8413 (add_to_pid_list, pull_pid_from_list): New.
8414 (handle_extended_wait): Don't assume the first signal new children
8415 report is SIGSTOP. Adjust call to pull_pid_from_list.
8416 (linux_wait_for_lwp): Adjust.
8417
8418 2012-03-02 Yao Qi <yao@codesourcery.com>
8419
8420 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8421 debug log.
8422
8423 2012-03-02 Yao Qi <yao@codesourcery.com>
8424
8425 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8426 `stop_pc' and `tpoint'. Update caller.
8427
8428 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8429
8430 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8431 * linux-low.c (use_linux_regsets): New macro.
8432 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8433 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8434 (linux_register_in_regsets): New function.
8435 (usr_fetch_inferior_registers): Skip registers covered by
8436 regsets.
8437 (usr_store_inferior_registers): Likewise.
8438 (usr_fetch_inferior_registers): New macro.
8439 (usr_store_inferior_registers): Likewise.
8440 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8441 (linux_store_registers): Likewise.
8442 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8443 prototype.
8444 (init_registers_mips64_dsp_linux): Likewise.
8445 (init_registers_mips_linux): New macro.
8446 (init_registers_mips_dsp_linux): Likewise.
8447 (mips_dsp_num_regs): Likewise.
8448 (DSP_BASE, DSP_CONTROL): New fallback macros.
8449 (mips_base_regs): New macro.
8450 (mips_regmap): Use it. Fix the size.
8451 (mips_dsp_regmap): New variable.
8452 (mips_dsp_regset_bitmap): Likewise.
8453 (mips_arch_setup): New function.
8454 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8455 than mips_regmap.
8456 (mips_cannot_store_register): Likewise.
8457 (the_low_target): Update .arch_setup, .num_regs and .regmap
8458 initializers. Add .regset_bitmap initializer.
8459 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8460 initializer.
8461 * linux-bfin-low.c (the_low_target): Likewise.
8462 * linux-cris-low.c (the_low_target): Likewise.
8463 * linux-crisv32-low.c (the_low_target): Likewise.
8464 * linux-ia64-low.c (the_low_target): Likewise.
8465 * linux-m32r-low.c (the_low_target): Likewise.
8466 * linux-m68k-low.c (the_low_target): Likewise.
8467 * linux-ppc-low.c (the_low_target): Likewise.
8468 * linux-s390-low.c (the_low_target): Likewise.
8469 * linux-sh-low.c (the_low_target): Likewise.
8470 * linux-sparc-low.c (the_low_target): Likewise.
8471 * linux-tic6x-low.c (the_low_target): Likewise.
8472 * linux-x86-low.c (the_low_target): Likewise.
8473 * linux-xtensa-low.c (the_low_target): Likewise.
8474 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8475 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8476 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8477 srv_xmlfiles.
8478 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8479 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8480
8481 2012-02-29 Yao Qi <yao@codesourcery.com>
8482 Pedro Alves <palves@redhat.com>
8483
8484 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8485 `step_over_finished' is true.
8486
8487 2012-02-27 Pedro Alves <palves@redhat.com>
8488
8489 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8490 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8491
8492 2012-02-27 Pedro Alves <palves@redhat.com>
8493
8494 PR server/9684
8495 * linux-low.c (pid_is_stopped): New.
8496 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8497
8498 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8499
8500 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8501 of conditions.
8502
8503 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8504
8505 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8506
8507 2012-02-24 Luis Machado <lgustavo@codesourcery>
8508
8509 * server.c (handle_query): Advertise support for target-side
8510 breakpoint condition evaluation.
8511 (process_point_options): New function.
8512 (process_serial_event): When inserting a breakpoint, check for
8513 a target-side condition that should be evaluated.
8514
8515 * mem-break.c: Include regcache.h and ax.h.
8516 (point_cond_list_t): New data structure.
8517 (breakpoint) <cond_list>: New field.
8518 (find_gdb_breakpoint_at): Make non-static.
8519 (delete_gdb_breakpoint_at): Clear any target-side
8520 conditions.
8521 (clear_gdb_breakpoint_conditions): New function.
8522 (add_condition_to_breakpoint): Likewise.
8523 (add_breakpoint_condition): Likewise.
8524 (gdb_condition_true_at_breakpoint): Likewise.
8525 (gdb_breakpoint_here): Return result directly instead
8526 of going through a local variable.
8527
8528 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8529 (clear_gdb_breakpoint_conditions): Likewise.
8530 (add_breakpoint_condition): Likewise.
8531 (gdb_condition_true_at_breakpoint): Likewise.
8532
8533 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8534 (need_step_over_p): Take target-side breakpoint condition into
8535 consideration.
8536
8537 2012-02-24 Luis Machado <lgustavo@codesourcery>
8538
8539 * server.h: Include tracepoint.h.
8540 (agent_mem_read, agent_get_trace_state_variable_value,
8541 agent_set_trace_state_variable_value,
8542 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8543 get_set_tsv_func_addr): New prototypes.
8544
8545 * ax.h: New include file.
8546 * ax.c: New source file.
8547
8548 * tracepoint.c: Include ax.h.
8549 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8550 agent_expr, eval_result_type): Move to ax.h.
8551 (parse_agent_expr): Rename to ...
8552 (gdb_parse_agent_expr): ... this, make it non-static and move
8553 to ax.h.
8554 (unparse_agent_expr) Rename to ...
8555 (gdb_unparse_agent_expr): ... this, make it non-static and move
8556 to ax.h.
8557 (eval_agent_expr): Rename to ...
8558 (eval_tracepoint_agent_expr): ... this.
8559 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8560 forward declarations.
8561 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8562 (agent_get_trace_state_variable_value): New function.
8563 (agent_set_trace_state_variable_value): New function.
8564 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8565 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8566 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8567 (condition_true_at_tracepoint): Likewise.
8568 (parse_agent_expr): Rename to ...
8569 (gdb_parse_agent_expr): ... this and move to ax.c.
8570 (unparse_agent_expr): Rename to ...
8571 (gdb_unparse_agent_expr): ... this and move to ax.c.
8572 (gdb_agent_op_name): Move to ax.c.
8573 (eval_agent_expr): Rename to ...
8574 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8575 and move to ax.c.
8576 (eval_tracepoint_agent_expr): New function.
8577 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8578 non-static.
8579 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8580 ax.c.
8581 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8582 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8583 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8584 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8585 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8586 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8587 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8588 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8589 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8590 (compile_bytecodes): Remove forward declaration.
8591 (is_goto_target): Move to ax.c.
8592 (compile_bytecodes): Move to ax.c and call
8593 agent_get_trace_state_variable_value (...) and
8594 agent_set_trace_state_variable_value (...).
8595
8596 * Makefile.in: Update ax.c and IPA dependencies.
8597
8598 2012-02-24 Pedro Alves <palves@redhat.com>
8599
8600 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8601 (cmd_bigqtbuffer_circular): ... this. Only handle
8602 'QTBuffer:circular:'.
8603 (handle_tracepoint_general_set): Adjust.
8604
8605 2012-02-16 Yao Qi <yao@codesourcery.com>
8606
8607 * inferiors.c: Move code to ...
8608 * dll.c: .... here. New.
8609 * server.h: Declare clear_dlls.
8610 * Makefile.in (SFILES): Add dll.c.
8611 (OBS): Add dll.o
8612 (dll.o): New rule.
8613
8614 2012-02-11 Yao Qi <yao@codesourcery.com>
8615
8616 * server.c: (handle_monitor_command): Add a new parameter
8617 `own_buf'.
8618 (handle_query): Update caller.
8619
8620 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8621
8622 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8623 * configure, config.in: Regenerate.
8624 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8625 is not defined.
8626
8627 2012-02-02 Pedro Alves <palves@redhat.com>
8628
8629 Try SIGKILL first, then PTRACE_KILL.
8630 * linux-low.c (linux_kill_one_lwp): New.
8631 (linux_kill_one_lwp): Rename to ...
8632 (kill_one_lwp_callback): ... this. Use the new
8633 linux_kill_one_lwp.
8634
8635 2012-02-02 Pedro Alves <palves@redhat.com>
8636
8637 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8638 inferior.
8639
8640 2012-01-27 Pedro Alves <palves@redhat.com>
8641
8642 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8643 (elf_64_file_p): Make static.
8644 (linux_pid_exe_is_elf_64_file): New.
8645 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8646 Delete declarations.
8647 (linux_pid_exe_is_elf_64_file): Declare.
8648 * linux-x86-low.c (x86_arch_setup): Use
8649 linux_pid_exe_is_elf_64_file.
8650
8651 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8652
8653 * linux-low.c (linux_wait_for_event_1): Rename to ...
8654 (linux_wait_for_event): ... here and merge it with former
8655 linux_wait_for_event - new variable wait_ptid, use it.
8656 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8657
8658 2012-01-23 Pedro Alves <palves@redhat.com>
8659
8660 * server.c (main): Avoid yet another case of infinite loop while
8661 detaching/killing after a longjmp.
8662
8663 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8664
8665 Code cleanup.
8666 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8667
8668 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8669
8670 * hostio.c (handle_readlink): New function.
8671 (handle_vFile): Call it to handle "vFile:readlink" packets.
8672
8673 2012-01-20 Pedro Alves <palves@redhat.com>
8674 Ulrich Weigand <ulrich.weigand@linaro.org>
8675
8676 * server.c (handle_v_requests): Only support vAttach and vRun to
8677 start multiple processes when in extended protocol mode.
8678
8679 2012-01-17 Pedro Alves <palves@redhat.com>
8680
8681 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8682 memalign plus mprotect to allocate the scratch buffer.
8683
8684 2012-01-13 Pedro Alves <palves@redhat.com>
8685
8686 * server.c (attach_inferior): Clear `cont_thread'.
8687
8688 2012-01-13 Pedro Alves <palves@redhat.com>
8689
8690 * server.c (main): Avoid infinite loop while detaching/killing
8691 after a longjmp.
8692
8693 2012-01-09 Doug Evans <dje@google.com>
8694
8695 * server.c (start_inferior): Set last_ptid in --wrapper case.
8696
8697 2012-01-06 Yao Qi <yao@codesourcery.com>
8698
8699 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8700 defined.
8701 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8702
8703 2012-01-04 Yao Qi <yao@codesourcery.com>
8704
8705 * tracepoint.c (cmd_qtdp): Print debug message
8706 for static tracepoint.
8707
8708 2012-01-04 Yao Qi <yao@codesourcery.com>
8709
8710 * tracepoint.c (trace_vdebug): Differentiate debug message
8711 between gdbserver and IPA.
8712
8713 2012-01-03 Yao Qi <yao@codesourcery.com>
8714
8715 * tracepoint.c (tracepoint_was_hit): Don't collect for
8716 static tracepoint.
8717
8718 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8719
8720 * terminal.h: Reformat copyright header.
8721
8722 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8723
8724 * server.c (gdbserver_version): Update copyright year.
8725 * gdbreplay.c (gdbreplay_version): Likewise.
8726
8727 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8728
8729 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8730
8731 Revert:
8732 2011-12-18 Hui Zhu <teawater@gmail.com>
8733 * linux-low.c (linux_create_inferior): Save return value to ret.
8734
8735 2011-12-18 Hui Zhu <teawater@gmail.com>
8736
8737 * linux-low.c (linux_create_inferior): Save return value to ret.
8738
8739 2011-12-16 Doug Evans <dje@google.com>
8740
8741 * linux-low.c (linux_create_inferior): If stdio connection,
8742 redirect stdin from /dev/null, stdout to stderr.
8743 * remote-utils.c (remote_is_stdio): New static global.
8744 (remote_connection_is_stdio): New function.
8745 (remote_prepare): Handle stdio connection.
8746 (remote_open): Ditto.
8747 (remote_close): Don't close stdin for stdio connections.
8748 (read_prim,write_prim): New functions. Replace all calls to
8749 read/write to these.
8750 * server.c (main): Watch for "-" argument. Move call to
8751 remote_prepare before start_inferior.
8752 * server.h (STDIO_CONNECTION_NAME): New macro.
8753 (remote_connection_is_stdio): Declare.
8754
8755 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8756 in debugging output.
8757
8758 2011-12-15 Yao Qi <yao@codesourcery.com>
8759
8760 * tracepoint.c: Include sys/syscall.h.
8761 (gdb_ust_thread): Remove preprocessor conditional.
8762
8763 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (linux_detach_one_lwp): Call
8766 the_low_target.prepare_to_resume before detaching.
8767
8768 2011-12-14 Yao Qi <yao@codesourcery.com>
8769
8770 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8771 of write.
8772
8773 2011-12-14 Yao Qi <yao@codesourcery.com>
8774
8775 * i386-low.c (i386_low_stopped_data_address): Initialize local
8776 variable `control'.
8777
8778 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8779
8780 PR remote/13492
8781
8782 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8783 DR_CONTROL unless necessary. Extend comments.
8784 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8785 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8786
8787 2011-12-13 Yao Qi <yao@codesourcery.com>
8788
8789 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8790 macros.
8791 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8792
8793 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8794
8795 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8796 Print new debug message for such case.
8797
8798 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8799
8800 Fix overlapping memcpy.
8801 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8802 the read_inferior_memory transfer.
8803 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8804 write_inferior_memory transfer.
8805 (set_fast_tracepoint_jump): New variable buf. Use it for the
8806 read_inferior_memory and write_inferior_memory transfers.
8807 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8808 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8809 Use it for the write_inferior_memory transfer.
8810 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8811 buffers.
8812
8813 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8814
8815 * linux-low.c (fetch_register, store_register): Make code
8816 consistent, fix formatting.
8817
8818 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8819
8820 * linux-low.c (usr_store_inferior_registers): Factor out code
8821 to handle individual registers into...
8822 (store_register): ... this new function.
8823
8824 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8825
8826 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8827 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8828 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8829 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8830 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8831 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8832 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8833 (srv_xmlfiles): Add new XML files.
8834
8835 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8836 and <sys/uio.h>.
8837 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8838 (init_registers_s390_linux32v1): Add prototype.
8839 (init_registers_s390_linux32v2): Likewise.
8840 (init_registers_s390_linux64v1): Likewise.
8841 (init_registers_s390_linux64v2): Likewise.
8842 (init_registers_s390x_linux64v1): Likewise.
8843 (init_registers_s390x_linux64v2): Likewise.
8844 (s390_num_regs): Increment to 52.
8845 (s390_regmap): Add orig_r2 register.
8846 (s390_num_regs_3264): Increment to 68.
8847 (s390_regmap_3264): Add orig_r2 register.
8848 (s390_collect_ptrace_register): Handle orig_r2 register.
8849 (s390_supply_ptrace_register): Likewise.
8850 (s390_fill_last_break): New function.
8851 (s390_store_last_break): Likewise.
8852 (s390_fill_system_call): New function.
8853 (s390_store_system_call): Likewise.
8854 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8855 register sets.
8856 (s390_check_regset): New function.
8857 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8858 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8859 Update target_regsets for available register sets.
8860
8861 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8862 Jan Kratochvil <jan.kratochvil@redhat.com>
8863
8864 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8865 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8866 New.
8867 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8868 * linux-low.h (struct process_info_private): New member r_debug.
8869 * server.c (handle_qxfer_libraries): Call
8870 the_target->qxfer_libraries_svr4.
8871 (handle_qxfer_libraries_svr4): New function.
8872 (qxfer_packets): New entry "libraries-svr4".
8873 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8874 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8875 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8876 PACKET_qXfer_libraries_svr4.
8877
8878 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8879
8880 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8881 PSW address/mask between 8-byte and 16-byte formats.
8882 (s390_supply_ptrace_register): Likewise.
8883 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8884 basic addressing mode bit.
8885
8886 2011-11-24 Stan Shebs <stan@codesourcery.com>
8887
8888 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8889
8890 2011-11-17 Stan Shebs <stan@codesourcery.com>
8891
8892 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8893 (tracing_start_time): New global.
8894 (tracing_stop_time): New global.
8895 (tracing_user_name): New global.
8896 (tracing_notes): New global.
8897 (tracing_stop_note): New global.
8898 (cmd_qtstart): Set traceframe_usage, start_time.
8899 (stop_tracing): Set stop_time.
8900 (cmd_qtstatus): Report additional status.
8901 (cmd_qtp): New function.
8902 (handle_tracepoint_query): Call it.
8903 (cmd_qtnotes): New function.
8904 (handle_tracepoint_general_set): Call it.
8905 (get_timestamp): Rename from tsv_get_timestamp.
8906
8907 2011-11-14 Stan Shebs <stan@codesourcery.com>
8908 Kwok Cheung Yeung <kcy@codesourcery.com>
8909
8910 * linux-x86-low.c (small_jump_insn): New.
8911 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8912 trampoline and error message, build a trampoline and issue a small
8913 jump instruction to it.
8914 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8915 trampoline and error message.
8916 (x86_get_min_fast_tracepoint_insn_len): New.
8917 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8918 * linux-low.h (struct linux_target_ops): Add arguments to
8919 install_fast_tracepoint_jump_pad operation, add new operation.
8920 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8921 arguments.
8922 (linux_get_min_fast_tracepoint_insn_len): New function.
8923 (linux_target_op): Add new operation.
8924 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8925 (gdb_trampoline_buffer_end): Ditto.
8926 (gdb_trampoline_buffer_error): Ditto.
8927 (struct ipa_sym_addresses): Add fields for new IPA variables.
8928 (symbol_list): Add entries for new IPA variables.
8929 (struct tracepoint): Add fields to hold the address range of the
8930 trampoline used by the tracepoint.
8931 (trampoline_buffer_head): New static variable.
8932 (trampoline_buffer_tail): Ditto.
8933 (claim_trampoline_space): New function.
8934 (have_fast_tracepoint_trampoline_buffer): New function.
8935 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8936 structure.
8937 (install_fast_tracepoint): Ditto, also add error buffer argument.
8938 (cmd_qtminftpilen): New function.
8939 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8940 (fast_tracepoint_from_trampoline_address): New function.
8941 (fast_tracepoint_collecting): Handle trampoline as part of jump
8942 pad space.
8943 (set_trampoline_buffer_space): New function.
8944 (initialize_tracepoint): Initialize new IPA variables.
8945 * target.h (struct target_ops): Add arguments to
8946 install_fast_tracepoint_jump_pad operation, add new
8947 get_min_fast_tracepoint_insn_len operation.
8948 (target_get_min_fast_tracepoint_insn_len): New.
8949 (install_fast_tracepoint_jump_pad): Add arguments.
8950 * server.h (IPA_BUFSIZ): Define.
8951 * linux-i386-ipa.c: Include extra header files.
8952 (initialize_fast_tracepoint_trampoline_buffer): New function.
8953 (initialize_low_tracepoint): Call it.
8954 * server.h (set_trampoline_buffer_space): Declare.
8955 (claim_trampoline_space): Ditto.
8956 (have_fast_tracepoint_trampoline_buffer): Ditto.
8957
8958 2011-11-14 Yao Qi <yao@codesourcery.com>
8959
8960 * server.c (handle_query): Handle InstallInTrace for qSupported.
8961 * tracepoint.c (add_tracepoint): Sort list.
8962 (install_tracepoint, download_tracepoint): New.
8963 (cmd_qtdp): Call them to install and download tracepoints.
8964 (sort_tracepoints): Removed.
8965 (cmd_qtstart): Update.
8966
8967 2011-11-14 Yao Qi <yao@codesourcery.com>
8968
8969 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8970 * mem-break.h: Declare.
8971 * tracepoint.c (cmd_qtstart): Move some code to ...
8972 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8973 New.
8974 (download_tracepoints): Move some code to ...
8975 (download_tracepoint_1): ... here. New.
8976
8977 2011-11-08 Yao Qi <yao@codesourcery.com>
8978
8979 * remote-utils.c (relocate_instruction): A comment fix.
8980
8981 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8982
8983 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8984 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8985 dr_status_mirror and dr_control_mirror from debug_reg_state.
8986 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8987 (i386_initial_stuff): Remove use of deleted globals.
8988 (i386_get_thread_context, i386_set_thread_context,
8989 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8990 from debug_reg_state.
8991
8992 2011-11-05 Yao Qi <yao@codesourcery.com>
8993
8994 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8995 address as TPOINT's.
8996
8997 2011-11-02 Stan Shebs <stan@codesourcery.com>
8998
8999 * tracepoint.c (agent_mem_read_string): New function.
9000 (eval_agent_expr): Call it for tracenz.
9001 * server.c (handle_query): Report support for tracenz.
9002
9003 2011-11-02 Yao Qi <yao@codesourcery.com>
9004
9005 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9006
9007 2011-11-02 Yao Qi <yao@codesourcery.com>
9008
9009 * target.h: Fix a typo in comment.
9010
9011 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9012
9013 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9014 clobber the breakpoints' shadows with fast tracepoint jumps.
9015 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9016 * target.c (write_inferior_memory): Also pass MYADDR down to
9017 check_mem_write.
9018
9019 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9020
9021 * configure.ac: Check support for personality routine.
9022 * configure: Regenerate.
9023 * config.in: Likewise.
9024 * linux-low.c: Include <sys/personality.h>.
9025 Define ADDR_NO_RANDOMIZE if necessary.
9026 (linux_create_inferior): Disable address space randomization when
9027 forking inferior, if requested.
9028 (linux_supports_disable_randomization): New function.
9029 (linux_target_ops): Install it.
9030 * server.h (disable_randomization): Declare.
9031 * server.c (disable_randomization): New global variable.
9032 (handle_general_set): Handle QDisableRandomization.
9033 (handle_query): Likewise for qSupported.
9034 (main): Support --disable-randomization and --no-disable-randomization
9035 command line arguments.
9036 * target.h (struct target_ops): Add supports_disable_randomization.
9037 (target_supports_disable_randomization): New macro.
9038
9039 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9040
9041 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9042 ifdef check.
9043 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9044 [!PT_GETDSBT] (target_loadmap): New definition.
9045 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9046 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9047 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9048 and PT_GETDSBT to LINUX_LOADMAP.
9049 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9050 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9051
9052 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9053
9054 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9055 (arm_linux_hwbp_cap): New static variable.
9056 (arm_linux_get_hwbp_cap): Replace by ...
9057 (arm_linux_init_hwbp_cap): ... this new function.
9058 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9059 (arm_linux_get_hw_watchpoint_count): Likewise.
9060 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9061 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9062 (arm_prepare_to_resume): Use perror_with_name instead of error.
9063
9064 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9065
9066 * linux-arm-low.c: Include <signal.h>.
9067 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9068 (struct arm_linux_hwbp_cap): New data type.
9069 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9070 (struct arm_linux_hw_breakpoint): New data type.
9071 (MAX_BPTS, MAX_WPTS): Define.
9072 (struct arch_process_info, struct arch_lwp_info): New data types.
9073 (arm_linux_get_hwbp_cap): New function.
9074 (arm_linux_get_hw_breakpoint_count): Likewise.
9075 (arm_linux_get_hw_watchpoint_count): Likewise.
9076 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9077 (arm_hwbp_control_initialize): Likewise.
9078 (arm_hwbp_control_is_enabled): Likewise.
9079 (arm_hwbp_control_is_initialized): Likewise.
9080 (arm_hwbp_control_disable): Likewise.
9081 (arm_linux_hw_breakpoint_equal): Likewise.
9082 (arm_linux_hw_point_initialize): Likewise.
9083 (struct update_registers_data): New data structure.
9084 (update_registers_callback: New function.
9085 (arm_insert_point): Likewise.
9086 (arm_remove_point): Likewise.
9087 (arm_stopped_by_watchpoint): Likewise.
9088 (arm_stopped_data_address): Likewise.
9089 (arm_new_process): Likewise.
9090 (arm_new_thread): Likewise.
9091 (arm_prepare_to_resume): Likewise.
9092 (the_low_target): Register arm_insert_point, arm_remove_point,
9093 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9094 arm_new_thread, and arm_prepare_to_resume.
9095
9096 2011-09-15 Stan Shebs <stan@codesourcery.com>
9097
9098 * server.h (struct emit_ops): Add compare-goto fields.
9099 * tracepoint.c (gdb_agent_op_sizes): New table.
9100 (emit_eq_goto): New function.
9101 (emit_ne_goto): New function.
9102 (emit_lt_goto): New function.
9103 (emit_le_goto): New function.
9104 (emit_gt_goto): New function.
9105 (emit_ge_goto): New function.
9106 (is_goto_target): New function.
9107 (compile_bytecodes): Recognize special cases of compare-goto
9108 combinations and call specialized emitters for them.
9109 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9110 (amd64_emit_ne_goto): New function.
9111 (amd64_emit_lt_goto): New function.
9112 (amd64_emit_le_goto): New function.
9113 (amd64_emit_gt_goto): New function.
9114 (amd64_emit_ge_goto): New function.
9115 (amd64_emit_ops): Add the new functions.
9116 (i386_emit_eq_goto): New function.
9117 (i386_emit_ne_goto): New function.
9118 (i386_emit_lt_goto): New function.
9119 (i386_emit_le_goto): New function.
9120 (i386_emit_gt_goto): New function.
9121 (i386_emit_ge_goto): New function.
9122 (i386_emit_ops): Add the new functions.
9123
9124 2011-09-08 Stan Shebs <stan@codesourcery.com>
9125
9126 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9127 (i386_emit_epilogue): Restore %ebx.
9128
9129 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9130
9131 * server.c (step_thread): Remove definition.
9132 (process_serial_event): Don't handle Hs.
9133 * server.h (step_thread): Remove declaration.
9134 * target.c (set_desired_inferior): Remove use of step_thread.
9135
9136 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9137
9138 * linux-low.c: Include linux-procfs.h.
9139 (linux_attach_lwp_1): Update comments.
9140 (linux_attach): Scan for existing threads when attaching to a
9141 process that is the tgid.
9142 * Makefile.in: Update dependencies.
9143
9144 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9145
9146 * configure.srv: Add linux-procfs.o dependencies.
9147
9148 2011-08-14 Yao Qi <yao@codesourcery.com>
9149
9150 * target.h (struct target_ops): Fix indent.
9151 * win32-low.c (win32_target_ops): Fix comment.
9152
9153 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9154 Yao Qi <yao@codesourcery.com>
9155
9156 * Makefile.in (clean): Remove tic6x-*.c files.
9157 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9158 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9159 (tic6x-c64xp-linux.c): Likewise.
9160 * configure.srv: Add support for tic6x-*-uclinux.
9161 * linux-tic6x-low.c: New.
9162 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9163
9164 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9165 Yao Qi <yao@codesourcery.com>
9166
9167 * target.h (struct target_ops): Add read_loadmap.
9168 * linux-low.c (struct target_loadseg): New type.
9169 (struct target_loadmap): New type.
9170 (linux_read_loadmap): New function.
9171 (linux_target_ops): Add linux_read_loadmap.
9172 * server.c (handle_query): Support qXfer:fdpic:read packet.
9173 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9174 to NULL.
9175
9176 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9177
9178 * win32-low.c: Include <stdint.h>.
9179
9180 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9181
9182 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9183 to the inferior here.
9184 (i386_remove_aligned_watchpoint): Ditto.
9185 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9186 fit part of the watchpoint in the debug registers.
9187 (i386_update_inferior_debug_regs): New.
9188 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9189 registers, and only update the inferior on success.
9190 (i386_low_remove_watchpoint): Ditto.
9191
9192 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9193
9194 * linux-low.c (compare_ints, unique, list_threads, show_process,
9195 linux_core_of_thread): Delete.
9196 (linux_target_ops): Change linux_core_of_thread to
9197 linux_common_core_of_thread.
9198 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9199 * utils.c (malloc_failure): Change type of argument.
9200 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9201 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9202 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9203 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9204 (IPA_OBJS): Add common-utils-ipa.o.
9205 (ptid_h, linux_osdata_h): New macros.
9206 (server_h): Add common/common-utils.h, common/xml-utils.h,
9207 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9208 common/ptid.h.
9209 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9210 ptid.o, buffer.o): New rules.
9211 (linux-low.o): Add common/linux-osdata.h as a dependency.
9212 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9213 * configure.ac: Add AC_HEADER_DIRENT check.
9214 * config.in: Regenerate.
9215 * configure: Regenerate.
9216 * remote-utils.c (xml_escape_text): Delete.
9217 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9218 buffer_xml_printf): Move to common/buffer.c.
9219 * server.c (main): Remove call to initialize_inferiors.
9220 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9221 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9222 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9223 internal_error, gdb_assert, gdb_assert_fail): Delete.
9224 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9225 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9226 common/buffer.h.
9227 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9228 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9229 initialize_inferiors): Delete.
9230
9231 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9232
9233 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9234 symbol error.
9235
9236 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9237
9238 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9239 assertion.
9240 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9241
9242 2011-05-26 Yao Qi <yao@codesourcery.com>
9243
9244 * Makefile.in (thread-db.o): Track dependence to
9245 common/gdb_thread_db.h.
9246 * thread-db.c: include gdb_thread_db.h from right place.
9247
9248 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9249
9250 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9251 __FILE__ and __LINE__ to internal_error.
9252
9253 2011-05-13 Doug Evans <dje@google.com>
9254
9255 * thread-db.c (try_thread_db_load_from_sdir): New function.
9256 (try_thread_db_load_from_dir): New function.
9257 (thread_db_load_search): Handle $sdir, ignore $pdir.
9258 Remove trying of system directories if search of
9259 libthread-db-search-path fails, that is now done via $sdir.
9260
9261 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9262
9263 * server.c (handle_query): Add EnableDisableTracepoints to the list
9264 of supported features.
9265 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9266 tracepoints.
9267 (cmd_qtenable_disable): New.
9268 (cmd_qtstart): Install tracepoints even if disabled.
9269 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9270 receiving a QTEnable or QTDisable packet.
9271 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9272 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9273 tracepoints.
9274 (gdb_probe): Skip data collection if static tracepoint is disabled.
9275
9276 2011-05-10 Doug Evans <dje@google.com>
9277
9278 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9279
9280 2011-05-04 Doug Evans <dje@google.com>
9281
9282 * linux-low.c (linux_join): Skip process lookup.
9283 * spu-low.c (spu_join): Ditto.
9284 * server.c (join_inferiors_callback): Delete.
9285 (process_serial_event): For 'D' packet (detach) call join_inferior
9286 directly.
9287
9288 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9289
9290 * README: Don't mention xscale*-*-linux*.
9291 * configure.srv (xscale*-*-linux*): Don't handle target.
9292
9293 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9294
9295 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9296 casting pointers.
9297 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9298 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9299 (i386_emit_void_call_2): Likewise.
9300
9301 2011-04-26 Yao Qi <yao@codesourcery.com>
9302
9303 * linux-low.c: Move common macros to linux-ptrace.h.
9304 Include linux-ptrace.h.
9305 * Makefile.in (linux_ptrace_h): New.
9306 (linux-low.o): Depends on linux-ptrace.h.
9307
9308 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9309
9310 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9311 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9312 (remote_prepare): New function with most of the TCP code from ...
9313 (remote_open): ... here. Detect PORT here unconditionally. Move also
9314 setting transport_is_reliable.
9315 * server.c (run_once): New variable.
9316 (gdbserver_usage): Document it.
9317 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9318 the first run if RUN_ONCE.
9319 * server.h (run_once, remote_prepare): New declarations.
9320
9321 2011-04-19 Tom Tromey <tromey@redhat.com>
9322
9323 * win32-low.c (handle_load_dll): Remove duplicate "the".
9324
9325 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9326
9327 Remove support for old Cygwin 1.5 versions.
9328 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9329 function to avoid warning.
9330 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9331 warning.
9332
9333 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9334
9335 * gdbserver/server.h (Macro _): Define it if not available.
9336
9337 2011-03-14 Michael Snyder <msnyder@vmware.com>
9338
9339 * hostio.c (handle_close): Remove unnecessary null test.
9340
9341 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9342
9343 * Makefile.in (maintainer-clean realclean distclean): Remove
9344 "make ... subdir_do" command.
9345
9346 2011-03-10 Michael Snyder <msnyder@vmware.com>
9347
9348 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9349
9350 * server.c (handle_v_run): Free alloced buffer on early return.
9351
9352 2011-03-09 Yao Qi <yao@codesourcery.com>
9353
9354 Revert:
9355 2011-03-04 Yao Qi <yao@codesourcery.com>
9356
9357 * Makefile.in: Remove GNU make feature --directory.
9358
9359 2011-03-05 Yao Qi <yao@codesourcery.com>
9360
9361 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9362 (subdir_do): New make target. Copied from gdb/Makefile.
9363 (maintainer-clean, realclean, distclean, clean): Call corresponding
9364 make targets in common/Makefile.
9365
9366 2011-02-11 Yao Qi <yao@codesourcery.com>
9367
9368 * configure.ac: Call AC_PROG_RANLIB.
9369 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9370 * configure: Regenerate.
9371
9372 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9373
9374 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9375
9376 2011-03-06 Yao Qi <yao@codesourcery.com>
9377
9378 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9379
9380 2011-03-05 Yao Qi <yao@codesourcery.com>
9381
9382 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9383 (subdir_do): New make target. Copied from gdb/Makefile.
9384 (maintainer-clean, realclean, distclean, clean): Call corresponding
9385 make targets in common/Makefile.
9386
9387 2011-03-04 Yao Qi <yao@codesourcery.com>
9388
9389 * Makefile.in: Remove GNU make feature --directory.
9390
9391 2011-03-04 Michael Snyder <msnyder@vmware.com>
9392
9393 * server.c (queue_stop_reply): Call xmalloc not malloc.
9394
9395 2011-03-02 Michael Snyder <msnyder@vmware.com>
9396
9397 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9398
9399 2011-02-28 Michael Snyder <msnyder@vmware.com>
9400
9401 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9402 (cmd_qtframe): Ditto.
9403 (cmd_qtbuffer): Ditto.
9404 (cmd_bigqtbuffer): Ditto.
9405
9406 * utils.c (decimal2str): Initialize 'width' to nine, then
9407 don't mess with it.
9408
9409 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9410
9411 * hostio.c (require_data): Free *data, not data.
9412
9413 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9414
9415 * hostio.c (require_data): Use free, not xfree.
9416
9417 2011-02-27 Michael Snyder <msnyder@vmware.com>
9418
9419 * server.c (handle_query): Discard unused value.
9420
9421 * hostio.c (require_data): Free malloc memory before returning
9422 error.
9423
9424 2011-02-26 Michael Snyder <msnyder@vmware.com>
9425
9426 * linux-low.c (list_threads): Call closedir for dirent.
9427
9428 2011-02-27 Michael Snyder <msnyder@vmware.com>
9429
9430 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9431 a case statement falls through.
9432
9433 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9434
9435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9436 in comparison.
9437
9438 2011-02-26 Michael Snyder <msnyder@vmware.com>
9439
9440 * utils.c (decimal2str): Eliminate dead code and dead param.
9441 (pulongest): Drop dead param from call to decimal2str.
9442 (plongest): Ditto.
9443
9444 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9445
9446 Revert the following patch (not approved yet):
9447 2011-02-21 Hui Zhu <teawater@gmail.com>
9448 * tracepoint.c (tp_printf): New function.
9449 (eval_agent_expr): Handle gdb_agent_op_printf.
9450
9451 2011-02-21 Hui Zhu <teawater@gmail.com>
9452
9453 * tracepoint.c (tp_printf): New function.
9454 (eval_agent_expr): Handle gdb_agent_op_printf.
9455
9456 2011-02-18 Tom Tromey <tromey@redhat.com>
9457
9458 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9459 (tracepoint.o): Likewise.
9460 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9461 (gdb_agent_op_names): Likewise.
9462
9463 2011-02-18 Tom Tromey <tromey@redhat.com>
9464
9465 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9466 gdb_agent_op_rot>: New constants.
9467 (gdb_agent_op_names): Add pick and roll.
9468 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9469 cases.
9470
9471 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9472
9473 * aclocal.m4: Regenerated with aclocal-1.11.1.
9474
9475 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9476
9477 * server.c (handle_qxfer_traceframe_info): New.
9478 (qxfer_packets): Register "traceframe-info".
9479 (handle_query): Report support for qXfer:traceframe-info:read+.
9480 * tracepoint.c (match_blocktype): New.
9481 (traceframe_find_block_type): Rename to ...
9482 (traceframe_walk_blocks): ... this. Add callback filter argument,
9483 and use it.
9484 (traceframe_find_block_type): New, reimplemented on top of
9485 traceframe_walk_blocks.
9486 (build_traceframe_info_xml): New.
9487 (traceframe_read_info): New.
9488 * server.h (traceframe_read_info): Declare.
9489
9490 2011-02-11 Yao Qi <yao@codesourcery.com>
9491
9492 * configure.ac: Call AC_PROG_RANLIB.
9493 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9494 * configure: Regenerate.
9495
9496 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9497
9498 * server.c (gdb_read_memory): Change return semantics to allow
9499 partial transfers.
9500 (handle_search_memory_1): Adjust.
9501 (process_serial_event) <'m' packet>: Handle partial transfers.
9502 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9503
9504 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9505
9506 * regcache.c (init_register_cache): Initialize
9507 regcache->register_status.
9508 (free_register_cache): Release regcache->register_status.
9509 (regcache_cpy): Copy register_status.
9510 (registers_to_string): Print 'x's for unavailable registers.
9511 (supply_register): Mark the register's status valid or
9512 unavailable, depending on whether a buffer was passed in or not.
9513 (supply_register_zeroed): New.
9514 (supply_regblock): Mark the registers' status valid or
9515 unavailable, depending on whether a buffer was passed in or not.
9516 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9517 (struct regcache): New `register_status' field.
9518 (supply_register_zeroed): Declare.
9519 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9520 supply_register_zeroed, rather than passing a NULL buffer to
9521 supply_register.
9522 * tracepoint.c (fetch_traceframe_registers): Update comment.
9523
9524 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9525
9526 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9527 buffer explicit.
9528
9529 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9530
9531 * server.h (decode_xfer_write): Change prototype.
9532 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9533 and don't extract the annex here.
9534 * server.c (decode_xfer_read): Remove `annex' parameter,
9535 and don't extract the annex here.
9536 (decode_xfer): New.
9537 (struct qxfer): New.
9538 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9539 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9540 (handle_qxfer_statictrace): New functions, abstracted out from
9541 handle_query, and made to use the struct qxfer interface.
9542 (handle_threads_qxfer_proper): Rename to ...
9543 (handle_qxfer_threads_proper): ... this.
9544 (handle_threads_qxfer): Rename to ...
9545 (handle_qxfer_threads): ... this. Adjust.
9546 (qxfer_packets): New array.
9547 (handle_qxfer): New function.
9548 (handle_query): Use handle_qxfer.
9549
9550 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9551
9552 * gdbreplay.c: Shorten lines of >= 80 columns.
9553 * linux-low.c: Ditto.
9554 * linux-ppc-low.c: Ditto.
9555 * linux-s390-low.c: Ditto.
9556 * linux-sparc-low.c: Ditto.
9557 * linux-x86-low.c: Ditto.
9558 * linux-xtensa-low.c: Ditto.
9559 * mem-break.c: Ditto.
9560 * nto-low.c: Ditto.
9561 * regcache.h: Ditto.
9562 * remote-utils.c: Ditto.
9563 * server.c: Ditto.
9564 * server.h: Ditto.
9565 * thread-db.c: Ditto.
9566 * tracepoint.c: Ditto.
9567 * utils.c: Ditto.
9568 * win32-low.h: Ditto.
9569
9570 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9571
9572 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9573 update.
9574
9575 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9576
9577 * server.c (gdbserver_version): Update copyright year in version
9578 output.
9579 * gdbreplay.c (gdbreplay_version): Ditto.
9580
9581 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9582
9583 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9584 * linux-bfin-low.c: New file.
9585 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9586 PT_DATA_ADDR for BFIN targets.
9587 * Makefile.in (SFILES): Add linux-bfin-low.c.
9588 (clean): Remove reg-bfin.c.
9589 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9590 * README: Mention supported Blackfin targets.
9591
9592 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9593
9594 * .gitignore: New file.
9595
9596 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9597
9598 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9599
9600 2010-10-22 Jie Zhang <jie@codesourcery.com>
9601
9602 * Makefile.in: Add FLAGS_TO_PASS variable.
9603 (install): Remove dependency of install-only and recursively
9604 invoke make for install-only.
9605
9606 2010-10-04 Doug Evans <dje@google.com>
9607
9608 * Makefile.in (uninstall): Use $(DESTDIR).
9609
9610 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9611
9612 PR gdb/11842
9613
9614 * linux-x86-low.c (compat_siginfo_from_siginfo)
9615 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9616 si_code is < 0. Check for si_code == SI_TIMER before checking for
9617 si_code < 0.
9618
9619 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9620
9621 * lynx-i386-low.c: New file.
9622 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9623
9624 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9625
9626 * lynx-low.c (ptrace_request_to_str): Remove handling for
9627 request values that have been removed in LynxOS 5.x.
9628
9629 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9630
9631 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9632 <ptrace.h>
9633
9634 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9635
9636 * configure.ac: Add --enable-inprocess-agent option.
9637 * configure: Rebuilt.
9638
9639 2010-09-06 Yao Qi <yao@codesourcery.com>
9640
9641 * linux-low.c (linux_kill): Remove unused variable.
9642 (linux_stabilize_threads): Likewise.
9643 * server.c (start_inferior): Likewise.
9644 (queue_stop_reply_callback): Likewise.
9645 * tracepoint.c (do_action_at_tracepoint): Likewise.
9646
9647 2010-09-06 Yao Qi <yao@codesourcery.com>
9648
9649 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9650 on return.
9651
9652 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9653
9654 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9655
9656 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9657
9658 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9659 "$(IPA_DEPFILES)".
9660
9661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9662
9663 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9664 gdbserver/lynx-ppc-low.c: New files.
9665 * Makefile.in (lynx_low_h): New variable.
9666 (lynx-low.o, lynx-ppc-low.o): New rules.
9667 * configure.ac: On LynxOS, link with -lnetinet.
9668 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9669 * configure: regenerate.
9670
9671 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9672
9673 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9674 * configure.ac: Add check for vasprintf and vsnprintf.
9675 * configure, config.in: Regenerate.
9676 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9677
9678 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9679
9680 * gdbreplay.c: Move include of alloca.h up, next to include of
9681 malloc.h.
9682 * server.h: Add include of malloc.h.
9683 * mem-break.c: Remove include of malloc.h.
9684 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9685
9686 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9687
9688 * Makefile.in (memmem.o): Build with -Wno-error.
9689
9690 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9691
9692 * utils.c (xsnprintf): Make non-static.
9693 * server.h: Add xsnprintf declaration.
9694 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9695 replace calls to snprintf by calls to xsnprintf throughout.
9696
9697 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9698
9699 * configure.ac: Add configure check for alloca.
9700 * configure, config.in: Regenerate.
9701 * server.h: Include alloca.h if it exists.
9702 * gdbreplay.c: Include alloca.h if it exists.
9703
9704 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9705
9706 * linux-low.c (__SIGRTMIN): Define if not already defined.
9707 (linux_create_inferior): Check for __ANDROID__ rather than
9708 __SIGRTMIN.
9709 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9710 are already deferred.
9711 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9712 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9713 stopped and already has a pending signal to report.
9714 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9715 a pending signal to report or is moving out of a jump pad.
9716 (linux_init_signals): Check for __ANDROID__ rather than
9717 __SIGRTMIN.
9718
9719 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9720
9721 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9722 debug_threads check. Avoid a linear search when not doing debug
9723 output.
9724
9725 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9726
9727 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9728 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9729 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9730 (process_event): Change local fd's type to gdb_fildes_t.
9731 (create_file_handler): Adjust prototype.
9732 (delete_file_handler): Adjust prototype.
9733 (handle_file_event): Adjust prototype. Use pfildes.
9734 (create_file_event): Adjsut prototype.
9735 * remote-utils.c (remote_desc, listen_desc): Change type to
9736 gdb_fildes_t.
9737 * server.h: New gdb_fildes_t typedef.
9738 [USE_WIN32API]: Include winsock2.h.
9739 (delete_file_handler, add_file_handler): Adjust prototypes.
9740 (pfildes): Declare.
9741 * utils.c (pfildes): New.
9742
9743 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9744
9745 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9746 * configure: Regenerate.
9747
9748 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9749
9750 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9751 (linux_done_accessing_memory): ... this.
9752 (linux_target_ops): Adjust.
9753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9754 * nto-low.c (nto_target_ops): Adjust comment.
9755 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9756 * spu-low.c (spu_target_ops): Adjust comment.
9757 * target.h (target_ops): Rename unprepare_to_access_memory field
9758 to done_accessing_memory.
9759 (unprepare_to_access_memory): Rename to ...
9760 (done_accessing_memory): ... this.
9761
9762 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9763
9764 * linux-low.c (linux_prepare_to_access_memory): New.
9765 (linux_unprepare_to_access_memory): New.
9766 (linux_target_ops): Install them.
9767 * server.c (read_memory): Rename to ...
9768 (gdb_read_memory): ... this. Use
9769 prepare_to_access_memory/prepare_to_access_memory.
9770 (write_memory): Rename to ...
9771 (gdb_write_memory): ... this. Use
9772 prepare_to_access_memory/prepare_to_access_memory.
9773 (handle_search_memory_1): Adjust.
9774 (process_serial_event): Adjust.
9775 * target.h (struct target_ops): New fields
9776 prepare_to_access_memory and unprepare_to_access_memory.
9777 (prepare_to_access_memory, unprepare_to_access_memory): New.
9778 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9779 prepare_to_access_memory/prepare_to_access_memory.
9780 * nto-low.c (nto_target_ops): Adjust.
9781 * spu-low.c (spu_target_ops): Adjust.
9782 * win32-low.c (win32_target_ops): Adjust.
9783
9784 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9785
9786 * Makefile.in (WARN_CFLAGS): Get it from configure.
9787 (WERROR_CFLAGS): New.
9788 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9789 * configure.ac: Introduce --enable-werror, which adds -Werror to
9790 the compiler command line. Enabled by default. Disable with
9791 --disable-werror. Add -Wdeclaration-after-statement
9792 Wpointer-arith and -Wformat-nonliteral to warning flags.
9793 * configure: Regenerate.
9794
9795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9796
9797 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9798
9799 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9800
9801 * gdbreplay.c (remote_error): New.
9802 (gdbchar): New.
9803 (expect): Use gdbchar. Check for error reading from GDB.
9804 Clarify sync error output.
9805 (play): Check for errors writing to GDB.
9806 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9807 * remote-utils.c (getpkt): Check for errors writing to the remote
9808 descriptor.
9809
9810 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9811
9812 * linux-low.c (linux_wait_1): Move non-debugging code out of
9813 `debug_threads' control.
9814
9815 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9816
9817 * linux-low.c (linux_wait_1): Don't set last_status here.
9818 * server.c (push_event, queue_stop_reply_callback): Assert we're
9819 not pushing a TARGET_WAITKIND_IGNORE event.
9820 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9821 (myresume, handle_target_event): Set the thread's last_resume_kind
9822 and last_status from the target returned status.
9823
9824 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9825
9826 PR threads/10729
9827
9828 * linux-x86-low.c (update_debug_registers_callback): New.
9829 (i386_dr_low_set_addr): Use it.
9830 (i386_dr_low_get_addr): New.
9831 (i386_dr_low_set_control): Use update_debug_registers_callback.
9832 (i386_dr_low_get_control): New.
9833 (i386_dr_low_get_status): Adjust.
9834 * linux-low.c (linux_stop_lwp): New.
9835 * linux-low.h (linux_stop_lwp): Declare.
9836
9837 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9838 argument instead of a i386_debug_reg_state.
9839 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9840 a i386_debug_reg_state.
9841 (i386_insert_aligned_watchpoint): Adjust.
9842 (i386_remove_aligned_watchpoint): Adjust.
9843 (i386_low_stopped_data_address): Read the debug registers from the
9844 inferior instead of from the mirrors.
9845 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9846 (i386_dr_low_get_addr): Declare.
9847 (i386_dr_low_get_control): Declare.
9848 (i386_dr_low_get_status): Change prototype.
9849
9850 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9851 (i386_dr_low_get_addr): New.
9852 (i386_dr_low_get_control): New.
9853 (i386_dr_low_get_status): Adjust prototype. Return
9854 dr_status_mirror.
9855 (i386_initial_stuff): Clear dr_status_mirror and
9856 dr_control_mirror.
9857 (i386_get_thread_context): Adjust.
9858 (i386_set_thread_context): Adjust.
9859 (i386_thread_added): Adjust.
9860
9861 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9862
9863 * linux-low.h (linux_thread_area): Delete declaration.
9864
9865 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9866
9867 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9868 after its termination.
9869
9870 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9871
9872 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9873 (gdb_wants_all_stopped): Delete.
9874 (linux_wait_1): Don't call them.
9875 * server.c (handle_v_cont): Tag all threads as want-stopped.
9876 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9877 stopped as "client-wants-stopped".
9878
9879 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9880
9881 * Makefile.in (signals_h): New.
9882 (server_h): Depend on it.
9883 (server.o): Don't depend on $(signals_def).
9884 (signals.o): Depend on $(signals_def).
9885
9886 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9887
9888 * Makefile.in (signals_def): New.
9889 (server_h): Append include/gdb/signals.h and signals_def.
9890 (server.o): Append signals_def.
9891
9892 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9893
9894 * server.c (handle_target_event): Use target_signal_to_host for
9895 resume_info.sig initialization.
9896 * target.h (struct thread_resume) <sig>: New comment.
9897
9898 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9899
9900 * server.c (handle_query): strcpy() the returned string from paddress()
9901 instead of sprintf().
9902 * utils.c (paddress): Return phex_nz().
9903
9904 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9905
9906 * server.c (handle_v_cont): Call mourn_inferior if process
9907 just exited.
9908 (myresume): Likewise.
9909
9910 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9911
9912 Static tracepoints, and integration with UST.
9913
9914 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9915 * mem-break.c (uninsert_all_breakpoints)
9916 (reinsert_all_breakpoints): New.
9917 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9918 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9919 (gdb_agent_ust_loaded, helper_thread_id)
9920 (gdb_agent_helper_thread_id): New macros.
9921 (struct ipa_sym_addresses): Add addr_ust_loaded,
9922 addr_helper_thread_id, addr_cmd_buf.
9923 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9924 (in_process_agent_loaded_ust): New.
9925 (write_e_ust_not_loaded): New.
9926 (maybe_write_ipa_ust_not_loaded): New.
9927 (struct collect_static_trace_data_action): New.
9928 (enum tracepoint_type) <static_tracepoint>: New.
9929 (struct tracepoint) <handle>: Mention static tracepoints.
9930 (struct static_tracepoint_ctx): New.
9931 (CMD_BUF_SIZE): New.
9932 (add_tracepoint_action): Handle static tracepoint actions.
9933 (unprobe_marker_at): New.
9934 (clear_installed_tracepoints): Handle static tracepoints.
9935 (cmd_qtdp): Handle static tracepoints.
9936 (probe_marker_at): New.
9937 (cmd_qtstart): Handle static tracepoints.
9938 (response_tracepoint): Handle static tracepoints.
9939 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9940 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9941 (get_context_regcache): Handle static tracepoints.
9942 (do_action_at_tracepoint): Handle static tracepoint actions.
9943 (traceframe_find_block_type): Handle static trace data blocks.
9944 (traceframe_read_sdata): New.
9945 (download_tracepoints): Download static tracepoint actions.
9946 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9947 (GDB_PROBE_NAME): New.
9948 (ust_ops): New.
9949 (GET_UST_SYM): New.
9950 (USTF): New.
9951 (dlsym_ust): New.
9952 (ust_marker_to_static_tracepoint): New.
9953 (gdb_probe): New.
9954 (collect_ust_data_at_tracepoint): New.
9955 (gdb_ust_probe): New.
9956 (UNIX_PATH_MAX, SOCK_DIR): New.
9957 (gdb_ust_connect_sync_socket): New.
9958 (resume_thread, stop_thread): New.
9959 (run_inferior_command): New.
9960 (init_named_socket): New.
9961 (gdb_ust_socket_init): New.
9962 (cstr_to_hexstr): New.
9963 (next_st): New.
9964 (first_marker, next_marker): New.
9965 (response_ust_marker): New.
9966 (cmd_qtfstm, cmd_qtsstm): New.
9967 (unprobe_marker_at, probe_marker_at): New.
9968 (cmd_qtstmat, gdb_ust_thread): New.
9969 (gdb_ust_init): New.
9970 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9971 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9972 (ST_REGENTRY): New.
9973 (x86_64_st_collect_regmap): New.
9974 (X86_64_NUM_ST_COLLECT_GREGS): New.
9975 (AMD64_RIP_REGNUM): New.
9976 (supply_static_tracepoint_registers): New.
9977 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9978 (ST_REGENTRY): New.
9979 (i386_st_collect_regmap): New.
9980 (i386_NUM_ST_COLLECT_GREGS): New.
9981 (supply_static_tracepoint_registers): New.
9982 * server.c (handle_query): Handle qXfer:statictrace:read.
9983 <qSupported>: Report support for StaticTracepoints, and
9984 qXfer:statictrace:read features.
9985 * server.h (traceframe_read_sdata)
9986 (supply_static_tracepoint_registers): Declare.
9987 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9988 (unpack_varlen_hex): Include in IPA build.
9989 * Makefile.in (ustlibs, ustinc): New.
9990 (IPA_OBJS): Add remote-utils-ipa.o.
9991 ($(IPA_LIB)): Link -ldl and -lpthread.
9992 (UST_CFLAGS): New.
9993 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9994 * config.in, configure: Regenerate.
9995
9996 2010-06-20 Ian Lance Taylor <iant@google.com>
9997 Pedro Alves <pedro@codesourcery.com>
9998
9999 * linux-x86-low.c (always_true): Delete.
10000 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10001 trying to fool the compiler with always_true.
10002
10003 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10004
10005 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10006 conditions in gdbserver.
10007
10008 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10009
10010 * spu-low.c (spu_read_memory): Wrap around local store limit.
10011 (spu_write_memory): Likewise.
10012
10013 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10014
10015 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10016 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10017 LONGEST uses.
10018 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10019 uses.
10020 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10021 uses with LONGEST uses.
10022
10023 2010-06-14 Stan Shebs <stan@codesourcery.com>
10024 Pedro Alves <pedro@codesourcery.com>
10025
10026 Bytecode compiler.
10027
10028 * linux-x86-low.c: Include limits.h.
10029 (add_insns): New.
10030 (always_true): New.
10031 (EMIT_ASM): New.
10032 (EMIT_ASM32): New.
10033 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10034 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10035 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10036 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10037 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10038 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10039 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10040 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10041 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10042 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10043 (amd64_emit_void_call_2): New.
10044 (amd64_emit_ops): New.
10045 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10046 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10047 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10048 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10049 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10050 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10051 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10052 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10053 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10054 (i386_emit_stack_adjust, i386_emit_int_call_1)
10055 (i386_emit_void_call_2): New.
10056 (i386_emit_ops): New.
10057 (x86_emit_ops): New.
10058 (the_low_target): Install x86_emit_ops.
10059 * server.h (struct emit_ops): New.
10060 (get_raw_reg_func_addr): Declare.
10061 (current_insn_ptr, emit_error): Declare.
10062 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10063 (set_trace_state_variable_value): New defines.
10064 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10065 addr_get_trace_state_variable_value and
10066 addr_set_trace_state_variable_value.
10067 (symbol_list): New fields for get_raw_reg,
10068 get_trace_state_variable_value and set_trace_state_variable_value.
10069 (condfn): New typedef.
10070 (struct tracepoint): New field `compiled_cond'.
10071 (do_action_at_tracepoint): Clear compiled_cond.
10072 (get_trace_state_variable_value, set_trace_state_variable_value):
10073 Export in the IPA.
10074 (condition_true_at_tracepoint): If there's a compiled condition,
10075 run that.
10076 (current_insn_ptr, emit_error): New globals.
10077 (struct bytecode_address): New.
10078 (get_raw_reg_func_addr): New.
10079 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10080 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10081 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10082 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10083 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10084 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10085 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10086 (compile_tracepoint_condition, compile_bytecodes): New.
10087 * target.h (emit_ops): Forward declare.
10088 (struct target_ops): New field emit_ops.
10089 (target_emit_ops): New.
10090 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10092 * linux-low.c (linux_emit_ops): New.
10093 (linux_target_ops): Install it.
10094 * linux-low.h (struct linux_target_ops): New field emit_ops.
10095
10096 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10097
10098 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10099 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10100
10101 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10102 Stan Shebs <stan@codesourcery.com>
10103
10104 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10105 (all): Depend on $(extra_libraries).
10106 (install-only): Install the IPA.
10107 (IPA_OBJS, IPA_LIB): New.
10108 (clean): Remove the IPA lib.
10109 (IPAGENT_CFLAGS): New.
10110 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10111 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10112 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10113 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10114 * configure.ac: Check for atomic builtins support in the compiler.
10115 (IPA_DEPFILES, extra_libraries): Define.
10116 * configure.srv (ipa_obj): Add description.
10117 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10118 (i[34567]86-*-linux*): Set ipa_obj.
10119 (x86_64-*-linux*): Set ipa_obj.
10120 * linux-low.c (stabilizing_threads): New.
10121 (supports_fast_tracepoints): New.
10122 (linux_detach): Stabilize threads before detaching.
10123 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10124 the lwp is either not stabilizing, or is moving out of a jump pad.
10125 (linux_fast_tracepoint_collecting): New.
10126 (maybe_move_out_of_jump_pad): New.
10127 (enqueue_one_deferred_signal): New.
10128 (dequeue_one_deferred_signal): New.
10129 (linux_wait_for_event_1): If moving out of a jump pad, defer
10130 pending signals to later.
10131 (linux_stabilize_threads): New.
10132 (linux_wait_1): Check if threads need moving out of jump pads, and
10133 do it if so.
10134 (stuck_in_jump_pad_callback): New.
10135 (move_out_of_jump_pad_callback): New.
10136 (lwp_running): New.
10137 (linux_resume_one_lwp): Handle moving out of jump pads.
10138 (linux_set_resume_request): Dequeue deferred signals.
10139 (need_step_over_p): Also step over fast tracepoint jumps.
10140 (start_step_over): Also uninsert fast tracepoint jumps.
10141 (finish_step_over): Also reinsert fast tracepoint jumps.
10142 (linux_install_fast_tracepoint_jump): New.
10143 (linux_target_ops): Install linux_stabilize_threads and
10144 linux_install_fast_tracepoint_jump_pad.
10145 * linux-low.h (linux_target_ops) <get_thread_area,
10146 install_fast_tracepoint_jump_pad>: New fields.
10147 (struct lwp_info) <collecting_fast_tracepoint,
10148 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10149 (linux_get_thread_area): Declare.
10150 * linux-x86-low.c (jump_insn): New.
10151 (x86_get_thread_area): New.
10152 (append_insns): New.
10153 (push_opcode): New.
10154 (amd64_install_fast_tracepoint_jump_pad): New.
10155 (i386_install_fast_tracepoint_jump_pad): New.
10156 (x86_install_fast_tracepoint_jump_pad): New.
10157 (the_low_target): Install x86_get_thread_area and
10158 x86_install_fast_tracepoint_jump_pad.
10159 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10160 (struct fast_tracepoint_jump): New.
10161 (fast_tracepoint_jump_insn): New.
10162 (fast_tracepoint_jump_shadow): New.
10163 (find_fast_tracepoint_jump_at): New.
10164 (fast_tracepoint_jump_here): New.
10165 (delete_fast_tracepoint_jump): New.
10166 (set_fast_tracepoint_jump): New.
10167 (uninsert_fast_tracepoint_jumps_at): New.
10168 (reinsert_fast_tracepoint_jumps_at): New.
10169 (set_breakpoint_at): Use write_inferior_memory.
10170 (uninsert_raw_breakpoint): Use write_inferior_memory.
10171 (check_mem_read): Mask out fast tracepoint jumps.
10172 (check_mem_write): Mask out fast tracepoint jumps.
10173 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10174 (set_fast_tracepoint_jump): Declare.
10175 (delete_fast_tracepoint_jump)
10176 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10177 (reinsert_fast_tracepoint_jumps_at): Declare.
10178 * regcache.c: Don't compile many functions when building the
10179 in-process agent library.
10180 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10181 the register buffer in the heap.
10182 (free_register_cache): If the register buffer isn't owned by the
10183 regcache, don't free it.
10184 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10185 pre-existing register caches.
10186 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10187 type.
10188 (convert_ascii_to_int): : Constify `from' parameter type.
10189 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10190 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10191 the needed buffer in-place.
10192 (relocate_instruction): New.
10193 * server.c (handle_query) <qSymbols>: If the target supports
10194 tracepoints, give it a chance of looking up symbols. Report
10195 support for fast tracepoints.
10196 (handle_status): Stabilize threads.
10197 (process_serial_event): Adjust.
10198 * server.h (struct fast_tracepoint_jump): Forward declare.
10199 (struct process_info) <fast_tracepoint_jumps>: New field.
10200 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10201 (decode_X_packet, decode_M_packet): Adjust.
10202 (relocate_instruction): Declare.
10203 (in_process_agent_loaded): Declare.
10204 (tracepoint_look_up_symbols): Declare.
10205 (struct fast_tpoint_collect_status): Declare.
10206 (fast_tracepoint_collecting): Declare.
10207 (force_unlock_trace_buffer): Declare.
10208 (handle_tracepoint_bkpts): Declare.
10209 (initialize_low_tracepoint)
10210 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10211 * target.h (struct target_ops) <stabilize_threads,
10212 install_fast_tracepoint_jump_pad>: New fields.
10213 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10214 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10215 [HAVE_STDINT_H]: Include stdint.h.
10216 (trace_debug_1): Rename to ...
10217 (trace_vdebug): ... this.
10218 (trace_debug): Rename to ...
10219 (trace_debug_1): ... this. Add `level' parameter.
10220 (trace_debug): New.
10221 (ATTR_USED, ATTR_NOINLINE): New.
10222 (IP_AGENT_EXPORT): New.
10223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10224 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10225 (about_to_request_buffer_space, trace_buffer_is_full)
10226 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10227 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10228 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10229 (traceframe_write_count, traceframes_created)
10230 (trace_state_variables)
10231 New renaming defines.
10232 (struct ipa_sym_addresses): New.
10233 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10234 (symbol_list): New.
10235 (ipa_sym_addrs): New.
10236 (all_tracepoint_symbols_looked_up): New.
10237 (in_process_agent_loaded): New.
10238 (write_e_ipa_not_loaded): New.
10239 (maybe_write_ipa_not_loaded): New.
10240 (tracepoint_look_up_symbols): New.
10241 (debug_threads) [IN_PROCESS_AGENT]: New.
10242 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10243 (UNKNOWN_SIDE_EFFECTS): New.
10244 (stop_tracing): New.
10245 (flush_trace_buffer): New.
10246 (stop_tracing_bkpt): New.
10247 (flush_trace_buffer_bkpt): New.
10248 (read_inferior_integer): New.
10249 (read_inferior_uinteger): New.
10250 (read_inferior_data_pointer): New.
10251 (write_inferior_data_pointer): New.
10252 (write_inferior_integer): New.
10253 (write_inferior_uinteger): New.
10254 (struct collect_static_trace_data_action): Delete.
10255 (enum tracepoint_type): New.
10256 (struct tracepoint) <type>: New field `type'.
10257 <actions_str, step_actions, step_actions_str>: Only include in
10258 GDBserver.
10259 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10260 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10261 (tracepoints): Use IP_AGENT_EXPORT.
10262 (last_tracepoint): Don't include in the IPA.
10263 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10264 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10265 (alloced_trace_state_variables): New.
10266 (trace_state_variables): Use IP_AGENT_EXPORT.
10267 (traceframe_t): Delete unused variable.
10268 (circular_trace_buffer): Don't include in the IPA.
10269 (trace_buffer_start): Delete.
10270 (struct trace_buffer_control): New.
10271 (trace_buffer_free): Delete.
10272 (struct ipa_trace_buffer_control): New.
10273 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10274 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10275 New.
10276 (trace_buffer_ctrl): New.
10277 (TRACE_BUFFER_CTRL_CURR): New.
10278 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10279 Reimplement as macros.
10280 (trace_buffer_wrap): Delete.
10281 (traceframe_write_count, traceframe_read_count)
10282 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10283 (struct tracepoint_hit_ctx) <type>: New field.
10284 (struct fast_tracepoint_ctx): New.
10285 (memory_barrier): New.
10286 (cmpxchg): New.
10287 (record_tracepoint_error): Update atomically in the IPA.
10288 (clear_inferior_trace_buffer): New.
10289 (about_to_request_buffer_space): New.
10290 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10291 updating the same buffer.
10292 (add_tracepoint): Default the tracepoint's type to trap
10293 tracepoint, and orig_size to -1.
10294 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10295 internal variables.
10296 (create_trace_state_variable): New parameter `gdb'. Handle it.
10297 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10298 (cmd_qtdp): Handle fast tracepoints.
10299 (cmd_qtdv): Adjust.
10300 (max_jump_pad_size): New.
10301 (gdb_jump_pad_head): New.
10302 (get_jump_space_head): New.
10303 (claim_jump_space): New.
10304 (sort_tracepoints): New.
10305 (MAX_JUMP_SIZE): New.
10306 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10307 IPA.
10308 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10309 support. Upload fast traceframes, and delete internal IPA
10310 breakpoints.
10311 (stop_tracing_handler): New.
10312 (flush_trace_buffer_handler): New.
10313 (cmd_qtstop): Upload fast tracepoints.
10314 (response_tracepoint): Handle fast tracepoints.
10315 (tracepoint_finished_step): Upload fast traceframes. Set the
10316 tracepoint hit context's tracepoint type.
10317 (handle_tracepoint_bkpts): New.
10318 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10319 type. Add comment about fast tracepoints.
10320 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10321 non-existing action_str field.
10322 (get_context_regcache): Handle fast tracepoints.
10323 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10324 to the regcache.
10325 (fast_tracepoint_from_jump_pad_address): New.
10326 (fast_tracepoint_from_ipa_tpoint_address): New.
10327 (collecting_t): New.
10328 (force_unlock_trace_buffer): New.
10329 (fast_tracepoint_collecting): New.
10330 (collecting): New.
10331 (gdb_collect): New.
10332 (write_inferior_data_ptr): New.
10333 (target_tp_heap): New.
10334 (target_malloc): New.
10335 (download_agent_expr): New.
10336 (UALIGN): New.
10337 (download_tracepoints): New.
10338 (download_trace_state_variables): New.
10339 (upload_fast_traceframes): New.
10340 (IPA_FIRST_TRACEFRAME): New.
10341 (IPA_NEXT_TRACEFRAME_1): New.
10342 (IPA_NEXT_TRACEFRAME): New.
10343 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10344 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10345 (gdb_jump_pad_buffer_end): New.
10346 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10347 (initialize_tracepoint): Adjust.
10348 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10349 buffer. Initialize the low module.
10350 * utils.c (PREFIX, TOOLNAME): New.
10351 (malloc_failure): Use PREFIX.
10352 (error): In the IPA, an error causes an exit.
10353 (fatal, warning): Use PREFIX.
10354 (internal_error): Use TOOLNAME.
10355 (NUMCELLS): Increase to 10.
10356 * configure, config.in: Regenerate.
10357
10358 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10359
10360 * server.c (handle_query) <qSupported>: Do two passes over the
10361 qSupported string to avoid nesting strtok.
10362
10363 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10364
10365 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10366 (CDEPS): New.
10367 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10368 -Wl,--dynamic-list.
10369 * configure: Regenerate.
10370 * proc-service.list: New.
10371
10372 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10373
10374 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10375 New comment.
10376
10377 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10378
10379 * gdbreplay.c (remote_open): Check error return from socket() call by
10380 its equality to -1 not by it being negative.
10381 * remote-utils.c (remote_open): Likewise.
10382
10383 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10384
10385 * config.h: Regenerate.
10386
10387 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10388
10389 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10390 doesn't provide PTRACE_GET_THREAD_AREA.
10391
10392 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10393
10394 * linux-m68k-low.c: Include <asm/ptrace.h>
10395 (ps_get_thread_area): Implement.
10396
10397 2010-05-03 Doug Evans <dje@google.com>
10398
10399 * event-loop.c (struct callback_event): New struct.
10400 (callback_list): New global.
10401 (append_callback_event, delete_callback_event): New functions.
10402 (process_callback): New function.
10403 (start_event_loop): Call it.
10404 * remote-utils.c (NOT_SCHEDULED): Define.
10405 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10406 moved out of readchar.
10407 (readchar): Rewrite. Call reschedule before returning.
10408 (reset_readchar): New function.
10409 (remote_close): Call it.
10410 (process_remaining, reschedule): New functions.
10411 * server.h (callback_handler_func): New typedef.
10412 (append_callback_event, delete_callback_event): Declare.
10413
10414 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10415
10416 * proc-service.c (ps_pglobal_lookup): Use
10417 thread_db_look_up_one_symbol.
10418 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10419 parameter. Use it instead of all_symbols_looked_up.
10420 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10421 field.
10422 (all_symbols_looked_up): Don't declare.
10423 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10424 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10425 field.
10426 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10427 Set all_symbols_looked_up here.
10428 (thread_db_look_up_one_symbol): New.
10429 (thread_db_get_tls_address): Adjust.
10430 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10431 thread_db object on the heap, and tentatively set it in the
10432 process structure.
10433 (thread_db_init): Don't set all_symbols_looked_up here.
10434 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10435
10436 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10437
10438 * linux-low.c (linux_kill, linux_detach): Adjust.
10439 (status_pending_p_callback): Remove redundant statement. Check
10440 for !TARGET_WAITIKIND_IGNORE, instead of
10441 TARGET_WAITKIND_STOPPED.
10442 (handle_tracepoints): Make sure LWP is locked. Adjust.
10443 (linux_wait_for_event_1): Adjust.
10444 (linux_cancel_breakpoints): New.
10445 (unsuspend_one_lwp): New.
10446 (unsuspend_all_lwps): New.
10447 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10448 (send_sigstop_callback): Change return type to int, add new
10449 `except' parameter and handle it.
10450 (suspend_and_send_sigstop_callback): New.
10451 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10452 pass them down. If SUSPEND, also increment the lwp's suspend
10453 count.
10454 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10455 (need_step_over_p): Don't consider suspended LWPs.
10456 (start_step_over): Adjust.
10457 (proceed_one_lwp): Change return type to int, add new `except'
10458 parameter and handle it.
10459 (unsuspend_and_proceed_one_lwp): New.
10460 (proceed_all_lwps): Use find_inferior instead of
10461 for_each_inferior.
10462 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10463 also decrement the suspend count of LWPs. Pass `except' down,
10464 instead of hacking its suspend count.
10465 (linux_pause_all): Add `freeze' parameter. Adjust.
10466 (linux_unpause_all): New.
10467 (linux_target_ops): Install linux_unpause_all.
10468 * server.c (handle_status): Adjust.
10469 * target.h (struct target_ops): New fields `unpause_all' and
10470 `cancel_breakpoints'. Add new parameter to `pause_all'.
10471 (pause_all): Add new `freeze' parameter.
10472 (unpause_all): New.
10473 (cancel_breakpoints): New.
10474 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10475 cancel breakpoints.
10476 (cmd_qtstart): Pause threads.
10477 (stop_tracing): Pause threads, and cancel breakpoints.
10478 * win32-low.c (win32_target_ops): Adjust.
10479
10480 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10481
10482 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10483 the inferior right away from here...
10484 (linux_wait_1): ... to here, and adjust to check the thread's
10485 last_resume_kind instead of the lwp's step or stop_expected flags.
10486
10487 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10488
10489 * README: Use consistent `GDB' and `GDBserver' spellings.
10490
10491 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10492
10493 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10494 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10495 (linux_detach_one_lwp): Assume the lwp is stopped.
10496 (any_thread_of): Delete.
10497 (linux_detach): Stop all lwps here. Don't blindly delete all
10498 breakpoints.
10499 (delete_lwp_callback): New.
10500 (linux_mourn): Delete all lwps of the process that is gone.
10501 (linux_wait_1): Don't delete the last lwp of the process here.
10502 * mem-break.h (mark_breakpoints_out): Declare.
10503 * mem-break.c (mark_breakpoints_out): New.
10504 (free_all_breakpoints): Use it.
10505 * server.c (handle_target_event): If the process is gone, mark
10506 breakpoints out.
10507 * thread-db.c (struct thread_db) <create_bp>: New field.
10508 (thread_db_enable_reporting): Fix prototype. Store a thread event
10509 breakpoint reference in the thread_db struct.
10510 (thread_db_load_search): Clear the thread_db object.
10511 (try_thread_db_load_1): Ditto.
10512 (switch_to_process): New.
10513 (disable_thread_event_reporting): Use it.
10514 (remove_thread_event_breakpoints): New.
10515 (thread_db_detach, thread_db_mourn): Use it.
10516
10517 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10518
10519 * linux-low.c (linux_enable_event_reporting): New.
10520 (linux_wait_for_event_1, handle_extended_wait): Use it.
10521
10522 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10523
10524 * linux-low.c (linux_kill_one_lwp, linux_kill)
10525 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10526 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10527 SIGSTOP even if the LWP is stopped.
10528 (send_sigstop_callback): New.
10529 (stop_all_lwps): Use send_sigstop_callback instead.
10530 (linux_resume_one_thread): Adjust.
10531 (proceed_one_lwp): Still proceed an LWP that the client has
10532 requested to stop, if we haven't reported it as stopped yet. Make
10533 sure that LWPs the client want stopped, have a pending SIGSTOP.
10534
10535 2010-04-26 Doug Evans <dje@google.com>
10536
10537 * server.c (handle_general_set): Make static.
10538
10539 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10540 Print received char after testing for error/eof instead of before.
10541 (input_interrupt): Tweak comment.
10542
10543 2010-04-23 Doug Evans <dje@google.com>
10544
10545 * server.c (start_inferior): Print inferior argv if --debug.
10546
10547 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10548
10549 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10550 * nto-x86-low.c: Include server.h
10551
10552 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10553
10554 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10555 be consistent with other sources of this directory.
10556 (init_registers_amd64): Correct name of source file of this function
10557 in the comment.
10558
10559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10560
10561 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10562 64-bit executables.
10563
10564 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10565
10566 * win32-i386-low.c: Add 64-bit support.
10567 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10568 (init_registers_amd64): Declare.
10569 (mappings): Add 64-bit version of array.
10570 (init_windows_x86): New function.
10571 (the_low_target): Change init_arch field to init_windows_x86.
10572
10573 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10574
10575 * win32-low.c: Adapt to support also 64-bit architecture.
10576 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10577 (get_image_name): Use SIZE_T type for local variable `done'.
10578 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10579 (toolhelp_get_dll_name): Idem.
10580 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10581 Use uintptr_t typecast to avoid warning.
10582 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10583 (handle_exception): Use phex_nz to avoid warning.
10584 (win32_wait): Remove unused local variable `process'.
10585
10586 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10587
10588 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10589 `amd64-avx.o'.
10590
10591 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10592
10593 * configure.ac: Use `ws2_32' library for srv_mingw.
10594 * configure: Regenerate.
10595 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10596 * remote-utils.c: Likewise.
10597
10598 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10599
10600 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10601 if __x86_64__ is defined.
10602
10603 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10604
10605 * configure: Regenerate.
10606
10607 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10608
10609 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10610 * target.h (target_ops): New get_tib_address field.
10611 * win32-low.h (win32_thread_info): Add thread_local_base field.
10612 * win32-low.c (child_add_thread): Add tlb argument.
10613 Set thread_local_base field to TLB.
10614 (get_child_debug_event): Adapt to child_add_thread change.
10615 (win32_get_tib_address): New function.
10616 (win32_target_ops): Set get_tib_address field to
10617 win32_get_tib_address.
10618 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10619
10620 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10621
10622 * linux-low.c (linux_mourn): Also remove the process.
10623 * server.c (handle_target_event): Don't remove the process here.
10624 * nto-low.c (nto_mourn): New.
10625 (nto_target_ops): Install it.
10626 * spu-low.c (spu_mourn): New.
10627 (spu_target_ops): Install it.
10628 * win32-low.c (win32_mourn): New.
10629 (win32_target_ops): Install it.
10630
10631 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10632
10633 * server.h (buffer_xml_printf): Remove redundant `;'.
10634
10635 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10636
10637 * regcache.c (set_register_cache): Invalidate regcaches before
10638 changing the register cache layout.
10639 (regcache_invalidate_one): Allow a NULL regcache.
10640 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10641 regcaches before changing the register cache layout or the target
10642 regsets.
10643
10644 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10645
10646 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10647 variable warning on Linux/x86-64.
10648
10649 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10650
10651 GDBserver disconnected tracing support.
10652
10653 * linux-low.c (linux_remove_process): Delete.
10654 (add_lwp): Don't set last_resume_kind here.
10655 (linux_kill): Use `mourn'.
10656 (linux_detach): Use `thread_db_detach', and `mourn'.
10657 (linux_mourn): New.
10658 (linux_attach_lwp_1): Adjust comment.
10659 (linux_attach): last_resume_kind moved the thread_info; adjust.
10660 (status_pending_p_callback): Adjust.
10661 (linux_wait_for_event_1): Adjust.
10662 (count_events_callback, select_singlestep_lwp_callback)
10663 (select_event_lwp_callback, cancel_breakpoints_callback)
10664 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10665 (proceed_one_lwp): Adjust.
10666 (linux_async): Add debug output.
10667 (linux_thread_stopped): New.
10668 (linux_pause_all): New.
10669 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10670 linux_pause_all.
10671 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10672 (thread_db_free): Delete declaration.
10673 (thread_db_detach, thread_db_mourn): Declare.
10674 * thread-db.c (thread_db_init): Use thread_db_mourn.
10675 (thread_db_free): Delete, split in two.
10676 (disable_thread_event_reporting): New.
10677 (thread_db_detach): New.
10678 (thread_db_mourn): New.
10679
10680 * server.h (struct thread_info) <last_resume_kind>: New field.
10681 <attached>: Add comment.
10682 <gdb_detached>: New field.
10683 (handler_func): Change return type to int.
10684 (handle_serial_event, handle_target_event): Ditto.
10685 (gdb_connected): Declare.
10686 (tracing): Delete.
10687 (disconnected_tracing): Declare.
10688 (stop_tracing): Declare.
10689
10690 * server.c (handle_query) <qSupported>: Report support for
10691 disconnected tracing.
10692 (queue_stop_reply_callback): Account for running threads.
10693 (gdb_wants_thread_stopped): New.
10694 (gdb_wants_all_threads_stopped): New.
10695 (gdb_reattached_process): New.
10696 (handle_status): Clear the `gdb_detached' flag of all processes.
10697 In all-stop, stop all threads.
10698 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10699 (process_serial_event): If the remote connection breaks, or if an
10700 exit was forced with "monitor exit", force an event loop exit.
10701 Handle disconnected tracing on detach.
10702 (handle_serial_event): Adjust.
10703 (handle_target_event): If GDB isn't connected, forward events back
10704 to the inferior, unless the last process exited, in which case,
10705 exit gdbserver. Adjust interface.
10706
10707 * remote-utils.c (remote_open): Don't block in accept. Instead
10708 register an event loop source on the listen socket file
10709 descriptor. Refactor bits into ...
10710 (listen_desc): ... this new global.
10711 (gdb_connected): ... this new function.
10712 (enable_async_notification): ... this new function.
10713 (handle_accept_event): ... this new function.
10714 (remote_close): Clear remote_desc.
10715
10716 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10717
10718 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10719 New fields.
10720 (mourn_inferior): Define.
10721 (target_process_qsupported): Avoid the dangling else problem.
10722 (thread_stopped): Define.
10723 (pause_all): Define.
10724 (target_waitstatus_to_string): Declare.
10725 * target.c (target_waitstatus_to_string): New.
10726
10727 * tracepoint.c (tracing): Make extern.
10728 (disconnected_tracing): New.
10729 (stop_tracing): Make extern. Handle tracing stops due to GDB
10730 disconnecting.
10731 (cmd_qtdisconnected): New.
10732 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10733 (handle_tracepoint_general_set): Handle QTDisconnected.
10734
10735 * event-loop.c (event_handler_func): Change return type to int.
10736 (process_event): Bail out if the event handler wants the event
10737 loop to stop.
10738 (handle_file_event): Ditto.
10739 (start_event_loop): Bail out if the event handler wants the event
10740 loop to stop.
10741
10742 * nto-low.c (nto_target_ops): Adjust.
10743 * spu-low.c (spu_wait): Don't remove the process here.
10744 (spu_target_ops): Adjust.
10745 * win32-low.c (win32_wait): Don't remove the process here.
10746 (win32_target_ops): Adjust.
10747
10748 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10749
10750 * regcache.c (realloc_register_cache): Invalidate inferior's
10751 regcache before recreating it.
10752
10753 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10754
10755 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10756
10757 2010-04-09 Stan Shebs <stan@codesourcery.com>
10758 Pedro Alves <pedro@codesourcery.com>
10759
10760 * server.h (LONGEST): New.
10761 (struct thread_info) <while_stepping>: New field.
10762 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10763 Declare.
10764 (initialize_tracepoint, handle_tracepoint_general_set)
10765 (handle_tracepoint_query, tracepoint_finished_step)
10766 (tracepoint_was_hit, release_while_stepping_state_list):
10767 (current_traceframe): Declare.
10768 * server.c (handle_general_set): Handle tracepoint packets.
10769 (read_memory): New.
10770 (write_memory): New.
10771 (handle_search_memory_1): Use read_memory.
10772 (handle_query): Report support for conditional tracepoints, trace
10773 state variables, and tracepoint sources. Handle tracepoint
10774 queries.
10775 (main): Initialize the tracepoints module.
10776 (process_serial_event): Handle traceframe reads/writes.
10777
10778 * linux-low.c (handle_tracepoints): New.
10779 (linux_wait_1): Call it.
10780 (linux_resume_one_lwp): Handle while-stepping.
10781 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10782 (linux_target_ops): Install them.
10783 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10784 New field.
10785 * linux-x86-low.c (x86_supports_tracepoints): New.
10786 (the_low_target). Install it.
10787
10788 * mem-break.h (delete_breakpoint): Declare.
10789 * mem-break.c (delete_breakpoint): Make external.
10790
10791 * target.h (struct target_ops): Add `supports_tracepoints',
10792 `read_pc', and `write_pc' fields.
10793 (target_supports_tracepoints): Define.
10794 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10795 (phex_nz): New.
10796
10797 * regcache.h (struct regcache) <registers_owned>: New field.
10798 (init_register_cache, regcache_cpy): Declare.
10799 (regcache_read_pc, regcache_write_pc): Declare.
10800 (register_cache_size): Declare.
10801 (supply_regblock): Declare.
10802 * regcache.c (init_register_cache): New.
10803 (new_register_cache): Use it.
10804 (regcache_cpy): New.
10805 (register_cache_size): New.
10806 (supply_regblock): New.
10807 (regcache_read_pc, regcache_write_pc): New.
10808
10809 * tracepoint.c: New.
10810
10811 * Makefile.in (OBS): Add tracepoint.o.
10812 (tracepoint.o): New rule.
10813
10814 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10815
10816 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10817 (i386-mmx.o): New.
10818 (i386-mmx.c): Likewise.
10819 (i386-mmx-linux.o): Likewise.
10820 (i386-mmx-linux.c): Likewise.
10821
10822 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10823 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10824 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10825 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10826
10827 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10828 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10829 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10830
10831 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10832
10833 * Makefile.in (clean): Updated.
10834 (i386-avx.o): New.
10835 (i386-avx.c): Likewise.
10836 (i386-avx-linux.o): Likewise.
10837 (i386-avx-linux.c): Likewise.
10838 (amd64-avx.o): Likewise.
10839 (amd64-avx.c): Likewise.
10840 (amd64-avx-linux.o): Likewise.
10841 (amd64-avx-linux.c): Likewise.
10842
10843 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10844 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10845 (srv_amd64_regobj): Add amd64-avx.o.
10846 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10849 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10850 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10853
10854 * i387-fp.c: Include "i386-xstate.h".
10855 (i387_xsave): New.
10856 (i387_cache_to_xsave): Likewise.
10857 (i387_xsave_to_cache): Likewise.
10858 (x86_xcr0): Likewise.
10859
10860 * i387-fp.h (i387_cache_to_xsave): Likewise.
10861 (i387_xsave_to_cache): Likewise.
10862 (x86_xcr0): Likewise.
10863
10864 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10865 * linux-crisv32-low.c (target_regsets): Likewise.
10866 * linux-m68k-low.c (target_regsets): Likewise.
10867 * linux-mips-low.c (target_regsets): Likewise.
10868 * linux-ppc-low.c (target_regsets): Likewise.
10869 * linux-s390-low.c (target_regsets): Likewise.
10870 * linux-sh-low.c (target_regsets): Likewise.
10871 * linux-sparc-low.c (target_regsets): Likewise.
10872 * linux-xtensa-low.c (target_regsets): Likewise.
10873
10874 * linux-low.c: Include <sys/uio.h>.
10875 (regsets_fetch_inferior_registers): Support nt_type.
10876 (regsets_store_inferior_registers): Likewise.
10877 (linux_process_qsupported): New.
10878 (linux_target_ops): Add linux_process_qsupported.
10879
10880 * linux-low.h (regset_info): Add nt_type.
10881 (linux_target_ops): Add process_qsupported.
10882
10883 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10884 and <sys/uio.h>.
10885 (init_registers_i386_avx_linux): New.
10886 (init_registers_amd64_avx_linux): Likewise.
10887 (xmltarget_i386_linux_no_xml): Likewise.
10888 (xmltarget_amd64_linux_no_xml): Likewise.
10889 (PTRACE_GETREGSET): Likewise.
10890 (PTRACE_SETREGSET): Likewise.
10891 (x86_fill_xstateregset): Likewise.
10892 (x86_store_xstateregset): Likewise.
10893 (use_xml): Likewise.
10894 (x86_linux_update_xmltarget): Likewise.
10895 (x86_linux_process_qsupported): Likewise.
10896 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10897 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10898 init_registers_i386_linux here. Call
10899 x86_linux_update_xmltarget.
10900 (the_low_target): Add x86_linux_process_qsupported.
10901
10902 * server.c (handle_query): Call target_process_qsupported.
10903
10904 * target.h (target_ops): Add process_qsupported.
10905 (target_process_qsupported): New.
10906
10907 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10908
10909 * inferiors.c (add_thread): Set last_status kind to
10910 TARGET_WAITKIND_IGNORE.
10911 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10912 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10913 (linux_wait_1): Move `thread' local definition to block that uses
10914 it. Don't NULL initialize `event_child'.
10915 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10916 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10917 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10918
10919 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10920
10921 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10922 an extended waitstatus, or by a watchpoint.
10923 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10924 thread was stepping or has been stopped by a watchpoint.
10925
10926 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10927
10928 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10929 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10930 of another, then delete the previous, and validate all
10931 breakpoints.
10932 (validate_inserted_breakpoint): New.
10933 (delete_disabled_breakpoints): New.
10934 (validate_breakpoints): New.
10935 (check_mem_read): Validate breakpoints before trusting their
10936 shadow. Delete disabled breakpoints.
10937 (check_mem_write): Validate breakpoints before trusting they
10938 should be inserted. Delete disabled breakpoints.
10939 * mem-break.h (validate_breakpoints):
10940 * server.c (handle_query): Validate breakpoints when we see a
10941 qSymbol query.
10942
10943 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10944
10945 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10946 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10947 if we could tell there's a GDB breakpoint at stop_pc.
10948 (need_step_over_p): Don't do a step over if we find a GDB
10949 breakpoint at the resume PC.
10950
10951 * mem-break.c (struct raw_breakpoint): New.
10952 (enum bkpt_type): New type `gdb_breakpoint'.
10953 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10954 fields. New field `raw'.
10955 (find_raw_breakpoint_at): New.
10956 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10957 breakpoint instead.
10958 (set_breakpoint_at): Adjust.
10959 (delete_raw_breakpoint): New.
10960 (release_breakpoint): New.
10961 (delete_breakpoint): Rename to...
10962 (delete_breakpoint_1): ... this. Add proc parameter. Use
10963 release_breakpoint. Return ENOENT.
10964 (delete_breakpoint): Reimplement.
10965 (find_breakpoint_at): Delete.
10966 (find_gdb_breakpoint_at): New.
10967 (delete_breakpoint_at): Delete.
10968 (set_gdb_breakpoint_at): New.
10969 (delete_gdb_breakpoint_at): New.
10970 (gdb_breakpoint_here): New.
10971 (set_reinsert_breakpoint): Use release_breakpoint.
10972 (uninsert_breakpoint): Rename to ...
10973 (uninsert_raw_breakpoint): ... this.
10974 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10975 (reinsert_raw_breakpoint): Change parameter type to
10976 raw_breakpoint.
10977 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10978 instead.
10979 (check_breakpoints): Adjust. Use release_breakpoint.
10980 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10981 (breakpoint_inserted_here): Ditto.
10982 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10983 Don't trust the breakpoint's shadow if it is not inserted.
10984 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10985 (delete_all_breakpoints): Adjust.
10986 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10987 use delete_breakpoint_1.
10988
10989 * mem-break.h (breakpoints_supported): Delete declaration.
10990 (set_gdb_breakpoint_at): Declare.
10991 (gdb_breakpoint_here): Declare.
10992 (delete_breakpoint_at): Delete.
10993 (delete_gdb_breakpoint_at): Declare.
10994
10995 * server.h (struct raw_breakpoint): Forward declare.
10996 (struct process_info): New field `raw_breakpoints'.
10997
10998 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10999 breakpoints.
11000
11001 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11002
11003 * linux-low.c (status_pending_p_callback): Fix comment.
11004 (linux_wait_for_event_1): Move most of the internal breakpoint
11005 handling from here...
11006 (linux_wait_1): ... to here.
11007 (count_events_callback): New.
11008 (select_singlestep_lwp_callback): New.
11009 (select_event_lwp_callback): New.
11010 (cancel_breakpoints_callback): New.
11011 (select_event_lwp): New.
11012 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11013 priority to all LWPs that have had events that should be reported
11014 to the client. Cancel breakpoints when about to reporting the
11015 event to the client, not while stopping lwps. No longer cancel
11016 finished single-steps here.
11017 (cancel_finished_single_step): Delete.
11018 (cancel_finished_single_steps): Delete.
11019
11020 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11021
11022 * mem-break.c (enum bkpt_type): New.
11023 (struct breakpoint): New field `type'.
11024 (set_breakpoint_at): Change return type to struct breakpoint
11025 pointer. Set type to `other_breakpoint' by default.
11026 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11027 in the breakpoint list.
11028 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11029 (reinsert_breakpoint): Rename to ...
11030 (reinsert_raw_breakpoint): ... this.
11031 (reinsert_breakpoints_at): Adjust.
11032 * mem-break.h (struct breakpoint): Declare.
11033 (set_breakpoint_at): Change return type to struct breakpoint
11034 pointer.
11035
11036 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11037
11038 * server.c (handle_query): Assign, not compare.
11039
11040 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11041
11042 Teach linux gdbserver to step-over-breakpoints.
11043
11044 * linux-low.c (can_hardware_single_step): New.
11045 (supports_breakpoints): New.
11046 (handle_extended_wait): If stopping threads, read the stop pc of
11047 the new cloned LWP.
11048 (get_pc): New.
11049 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11050 low target doesn't support retrieving the PC.
11051 (add_lwp): Set last_resume_kind to resume_continue.
11052 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11053 (linux_attach): Don't clear stop_expected. Set the lwp's
11054 last_resume_kind to resume_stop.
11055 (linux_detach_one_lwp): Don't check for removed breakpoints.
11056 (check_removed_breakpoint): Delete.
11057 (status_pending_p): Rename to ...
11058 (status_pending_p_callback): ... this. Don't check for removed
11059 breakpoints. Don't consider threads that are stopped from GDB's
11060 perspective.
11061 (linux_wait_for_lwp): Always read the stop_pc here.
11062 (cancel_breakpoint): New.
11063 (step_over_bkpt): New global.
11064 (linux_wait_for_event_1): Implement stepping over breakpoints.
11065 (gdb_wants_lwp_stopped): New.
11066 (gdb_wants_all_stopped): New.
11067 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11068 single-step traps here. Store the thread's last reported target
11069 wait status.
11070 (send_sigstop): Don't clear stop_expected. Always set it,
11071 instead.
11072 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11073 (cancel_finished_single_step): New.
11074 (cancel_finished_single_steps): New.
11075 (wait_for_sigstop): Don't cancel finished single-step traps here.
11076 (linux_resume_one_lwp): Don't check for removed breakpoints.
11077 Don't set `step' on non-hardware step archs.
11078 (linux_set_resume_request): Ignore resume_stop requests if already
11079 stopping or stopped. Set the lwp's last_resume_kind.
11080 (resume_status_pending_p): Don't check for removed breakpoints.
11081 (need_step_over_p): New.
11082 (start_step_over): New.
11083 (finish_step_over): New.
11084 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11085 requests. Clear the thread's last reported target waitstatus.
11086 Don't use the `suspended' flag. Don't consider pending breakpoints.
11087 (linux_resume): Start a step-over if necessary.
11088 (proceed_one_lwp): New.
11089 (proceed_all_lwps): New.
11090 (unstop_all_lwps): New.
11091 * linux-low.h (struct lwp_info): Rewrite comment for the
11092 `suspended' flag. Add the `stop_pc' field. Delete the
11093 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11094 Add `'last_resume_kind' and `need_step_over' fields.
11095 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11096 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11097 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11098 (set_raw_breakpoint_at): New.
11099 (set_breakpoint_at): Rewrite to use it.
11100 (reinsert_breakpoint_handler): Delete.
11101 (set_reinsert_breakpoint): New.
11102 (reinsert_breakpoint_by_bp): Delete.
11103 (delete_reinsert_breakpoints): New.
11104 (uninsert_breakpoint): Rewrite.
11105 (uninsert_breakpoints_at): New.
11106 (reinsert_breakpoint): Rewrite.
11107 (reinsert_breakpoints_at): New.
11108 (check_breakpoints): Rewrite.
11109 (breakpoint_here): New.
11110 (breakpoint_inserted_here): New.
11111 (check_mem_read): Adjust.
11112 * mem-break.h (breakpoints_supported, breakpoint_here)
11113 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11114 (reinsert_breakpoint_by_bp): Delete declaration.
11115 (delete_reinsert_breakpoints): Declare.
11116 (reinsert_breakpoint): Delete declaration.
11117 (reinsert_breakpoints_at): Declare.
11118 (uninsert_breakpoint): Delete declaration.
11119 (uninsert_breakpoints_at): Declare.
11120 (check_breakpoints): Adjust prototype.
11121 * server.h: Adjust include order.
11122 (struct thread_info): Declare here. Add a `last_status' field.
11123
11124 2010-03-23 Michael Snyder <msnyder@vmware.com>
11125
11126 * server.c (crc32): New function.
11127 (handle_query): Add handling for 'qCRC:' request.
11128
11129 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11130
11131 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11132 lwp had been stopped by a watchpoint.
11133
11134 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11135
11136 * server.h (internal_error): Declare.
11137 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11138 * utils.c (internal_error): New function.
11139
11140 2010-03-15 Andreas Schwab <schwab@redhat.com>
11141
11142 * configure.srv: Fix typo setting srv_regobj.
11143
11144 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11145
11146 * linux-low.c (fetch_register): Avoid passing a non string literal
11147 format to `error'.
11148 (usr_store_inferior_registers): Ditto.
11149
11150 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11151
11152 * linux-low.c (linux_write_memory): Bail out early if peeking
11153 memory failed.
11154
11155 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11156
11157 * linux-low.h (struct lwp_info): New fields
11158 `stopped_by_watchpoint' and `stopped_data_address'.
11159 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11160 here, and cache them in the lwp object.
11161 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11162 directly.
11163 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11164 field.
11165 (linux_stopped_by_watchpoint): Rewrite.
11166 (linux_stopped_data_address): Rewrite.
11167
11168 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11169
11170 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11171 switching the current inferior, not before.
11172
11173 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11174
11175 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11176 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11177 i386-linux.c and amd64-linux.c.
11178 (reg-i386.o): Removed.
11179 (reg-i386.c): Likewise.
11180 (reg-i386-linux.o): Likewise.
11181 (reg-i386-linux.c): Likewise.
11182 (reg-x86-64.o): Likewise.
11183 (reg-x86-64.c): Likewise.
11184 (reg-x86-64-linux.o): Likewise.
11185 (reg-x86-64-linux.c): Likewise.
11186 (i386.o): New.
11187 (i386.c): Likewise.
11188 (i386-linux.o): Likewise.
11189 (i386-linux.c): Likewise.
11190 (amd64.o): Likewise.
11191 (amd64.c): Likewise.
11192 (amd64-linux.o): Likewise.
11193 (amd64-linux.c): Likewise.
11194
11195 * configure.srv (srv_i386_regobj): New.
11196 (srv_i386_linux_regobj): Likewise.
11197 (srv_amd64_regobj): Likewise.
11198 (srv_amd64_linux_regobj): Likewise.
11199 (srv_i386_32bit_xmlfiles): Likewise.
11200 (srv_i386_64bit_xmlfiles): Likewise.
11201 (srv_i386_xmlfiles): Likewise.
11202 (srv_amd64_xmlfiles): Likewise.
11203 (srv_i386_linux_xmlfiles): Likewise.
11204 (srv_amd64_linux_xmlfiles): Likewise.
11205 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11206 srv_xmlfiles to $srv_i386_xmlfiles.
11207 (i[34567]86-*-mingw32ce*): Likewise.
11208 (i[34567]86-*-mingw*): Likewise.
11209 (i[34567]86-*-nto*): Likewise.
11210 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11211 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11212 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11213 (x86_64-*-linux*): Likewise.
11214
11215 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11216 (init_registers_amd64_linux): New.
11217 (x86_arch_setup): Replace init_registers_x86_64_linux with
11218 init_registers_amd64_linux.
11219
11220 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11221
11222 * configure.ac: Check for libdl. If it is not available link against
11223 static libthread_db.
11224 * configure: Regenerate.
11225
11226 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11227
11228 PR9605
11229
11230 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11231 handing a read watchpoint.
11232 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11233
11234 2010-02-12 Doug Evans <dje@google.com>
11235
11236 * linux-low.c (linux_supports_tracefork_flag): Document.
11237 (linux_look_up_symbols): Add comment.
11238
11239 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11240
11241 * regcache.c (supply_register): Clear regcache if buf is NULL.
11242
11243 2010-02-02 Nicolas Roche <roche@sourceware.org>
11244 Joel Brobecker <brobecker@adacore.com>
11245
11246 * inferiors.c (find_inferior): Add function documentation.
11247 (unloaded_dll): Handle the case where the unloaded dll has not
11248 been previously registered in the dll list.
11249
11250 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11251
11252 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11253 (thumb2_breakpoint): New.
11254 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11255
11256 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11257
11258 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11259 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11260 breakpoints.
11261
11262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11263
11264 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11265
11266 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11267
11268 * linux-s390-low.c (s390_collect_ptrace_register)
11269 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11270
11271 2010-01-21 Doug Evans <dje@google.com>
11272
11273 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11274 (PTRACE_ARG4_TYPE): New macro.
11275 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11276 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11277 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11278 (usr_store_inferior_registers): Ditto.
11279 (linux_read_memory, linux_write_memory): Ditto.
11280 (linux_test_for_tracefork): Ditto.
11281
11282 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11283 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11284
11285 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11286
11287 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11288 target.
11289
11290 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11291
11292 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11293 prototype to take a regcache. Adjust.
11294
11295 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11296
11297 * regcache.h (struct thread_info): Forward declare.
11298 (struct regcache): New.
11299 (new_register_cache): Adjust prototype.
11300 (get_thread_regcache): Declare.
11301 (free_register_cache): Adjust prototype.
11302 (registers_to_string, registers_from_string): Ditto.
11303 (supply_register, supply_register_by_name, collect_register)
11304 (collect_register_as_string, collect_register_by_name): Ditto.
11305 * regcache.c (struct inferior_regcache_data): Delete.
11306 (get_regcache): Rename to ...
11307 (get_thread_regcache): ... this. Adjust. Switch inferior before
11308 fetching registers.
11309 (regcache_invalidate_one): Adjust.
11310 (regcache_invalidate): Fix prototype.
11311 (new_register_cache): Return the new register cache.
11312 (free_register_cache): Change prototype.
11313 (realloc_register_cache): Adjust.
11314 (registers_to_string): Change prototype to take a regcache. Adjust.
11315 (registers_from_string): Ditto.
11316 (register_data): Ditto.
11317 (supply_register): Ditto.
11318 (supply_register_by_name): Ditto.
11319 (collect_register): Ditto.
11320 (collect_register_as_string): Ditto.
11321 (collect_register_by_name): Ditto.
11322 * server.c (process_serial_event): Adjust.
11323 * linux-low.h (regset_fill_func, regset_store_func): Change
11324 prototype.
11325 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11326 Change prototype.
11327 * linux-low.c (get_stop_pc): Adjust.
11328 (check_removed_breakpoint): Adjust.
11329 (linux_wait_for_event): Adjust.
11330 (linux_resume_one_lwp): Adjust.
11331 (fetch_register): Add regcache parameter. Adjust.
11332 (usr_store_inferior_registers): Ditto.
11333 (regsets_fetch_inferior_registers): Ditto.
11334 (regsets_store_inferior_registers): Ditto.
11335 (linux_fetch_registers, linux_store_registers): Ditto.
11336 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11337 regcache. Adjust.
11338 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11339 Ditto.
11340 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11341 prototype to take a regcache.
11342 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11343 * remote-utils.c (convert_ascii_to_int, outreg)
11344 (prepare_resume_reply): Change prototype to take a regcache.
11345 Adjust.
11346 * target.h (struct target_ops) <fetch_registers, store_registers>:
11347 Change prototype to take a regcache.
11348 (fetch_inferior_registers, store_inferior_registers): Change
11349 prototype to take a regcache. Adjust.
11350 * proc-service.c (ps_lgetregs): Adjust.
11351 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11352 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11353 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11354 take a regcache. Adjust.
11355 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11356 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11357 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11358 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11359 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11360 (cris_cannot_fetch_register):
11361 (cris_breakpoint_at): Change prototype to take a regcache.
11362 Adjust.
11363 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11364 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11365 to take a regcache. Adjust.
11366 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11367 Adjust.
11368 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11369 take a regcache. Adjust.
11370 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11371 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11372 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11373 * linux-mips-low.c (mips_get_pc):
11374 (mips_set_pc): Change prototype to take a regcache. Adjust.
11375 (mips_reinsert_addr): Adjust.
11376 (mips_collect_register): Change prototype to take a regcache.
11377 Adjust.
11378 (mips_supply_register):
11379 (mips_collect_register_32bit, mips_supply_register_32bit)
11380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11381 (mips_store_fpregset): Ditto.
11382 * linux-ppc-low.c (ppc_supply_ptrace_register)
11383 (ppc_supply_ptrace_register): Ditto.
11384 (parse_spufs_run): Adjust.
11385 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11386 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11387 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11388 take a regcache. Adjust.
11389 * linux-s390-low.c (s390_collect_ptrace_register)
11390 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11391 (s390_set_pc): Change prototype to take a regcache. Adjust.
11392 (s390_arch_setup): Adjust.
11393 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11394 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11396 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11397 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11398 regcache. Adjust.
11399 (sparc_breakpoint_at): Adjust.
11400 * linux-xtensa-low.c (xtensa_fill_gregset):
11401 (xtensa_store_gregset):
11402 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11403 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11404 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11405 prototype to take a regcache. Adjust.
11406 * win32-arm-low.c (arm_fetch_inferior_register)
11407 (arm_store_inferior_register): Change prototype to take a
11408 regcache. Adjust.
11409 * win32-i386-low.c (i386_fetch_inferior_register)
11410 (i386_store_inferior_register): Change prototype to take a
11411 regcache. Adjust.
11412 * win32-low.c (child_fetch_inferior_registers)
11413 (child_store_inferior_registers): Change prototype to take a
11414 regcache. Adjust.
11415 (win32_wait): Adjust.
11416 (win32_fetch_inferior_registers): Change prototype to take a
11417 regcache. Adjust.
11418 (win32_store_inferior_registers): Adjust.
11419 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11420 store_inferior_register>: Change prototype to take a regcache.
11421
11422 2010-01-20 Doug Evans <dje@google.com>
11423
11424 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11425 #ifdef.
11426 (linux_wait_for_event1, linux_init_signals): Ditto.
11427 (W_STOPCODE): Provide definition if missing.
11428
11429 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11430
11431 * linux-low.c (linux_core_of_thread): New.
11432 (compare_ints, show_process, list_threads): New.
11433 (linux_qxfer_osdata): Report threads and cores.
11434 (linux_target_op): Register linux_core_of_thread.
11435 * remote-utils.c (prepare_resume_reply): Report the core.
11436 (buffer_xml_printf): Support %d specifier.
11437 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11438 New.
11439 (handle_query): Handle qXfer:threads. Announce availability
11440 thereof.
11441 * target.h (struct target_ops): New field core_of_thread.
11442
11443 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11444
11445 * Makefile.in (clean): Remove new generated files.
11446 (reg-s390.o, reg-s390.c): Remove rules.
11447 (reg-s390x.o, reg-s390x.c): Likewise.
11448 (s390-linux32.o, s390-linux32.c): Add rules.
11449 (s390-linux64.o, s390-linux64.c): Likewise.
11450 (s390x-linux64.o, s390x-linux64.c): Likewise.
11451 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11452 * linux-s390-low.c: Include <elf.h>.
11453 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11454 (init_registers_s390): Remove prototype.
11455 (init_registers_s390x): Likewise.
11456 (init_registers_s390_linux32): Add prototype.
11457 (init_registers_s390_linux64): Likewise.
11458 (init_registers_s390x_linux64): Likewise.
11459 (s390_num_regs_3264): New define.
11460 (s390_regmap_3264): New global variable.
11461 (s390_cannot_fetch_register): Remove obsolete check.
11462 (s390_cannot_store_register): Likewise.
11463 (s390_collect_ptrace_register): Handle upper/lower register halves.
11464 (s390_supply_ptrace_register): Likewise.
11465 (s390_fill_gregset): Update to register number changes.
11466 (s390_get_hwcap): New routine.
11467 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11468 Install appropriate regmap and register set.
11469
11470 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11471
11472 * server.c (gdbserver_version): Update copyright year to 2010.
11473 * gdbreplay.c (gdbreplay_version): Likewise.
11474
11475 2009-12-28 Doug Evans <dje@google.com>
11476
11477 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11478 elf/external.h. Include <elf.h> instead but only if necessary.
11479
11480 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11481
11482 * linux-low.c (linux_remove_process): Remove `detaching'
11483 parameter. Don't release/detach from thread_db here.
11484 (linux_kill): Release/detach from thread_db here, ...
11485 (linux_detach): ... and here, before actually detaching.
11486 (linux_wait_1): ... and here, when a process exits.
11487 * thread-db.c (any_thread_of): New.
11488 (thread_db_free): Switch the current inferior to a thread of the
11489 passed in process.
11490
11491 2009-12-21 Doug Evans <dje@google.com>
11492
11493 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11494
11495 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11496 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11497 warning ifndef __NR_tkill. Move setting of errno there too.
11498 Delete unnecessary resetting of errno after syscall.
11499 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11500
11501 * configure.ac: Check for dladdr.
11502 * config.in: Regenerate.
11503 * configure: Regenerate.
11504 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11505 (try_thread_db_load): Update.
11506
11507 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11508
11509 2009-12-18 Doug Evans <dje@google.com>
11510
11511 * event-loop.c: Include unistd.h if it exists.
11512
11513 * linux-low.c (my_waitpid): Move definition away from being in
11514 between linux_tracefork_child/linux_test_for_tracefork.
11515
11516 * gdb_proc_service.h (psaddr_t): Fix type.
11517 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11518 signature to match glibc.
11519
11520 2009-12-16 Doug Evans <dje@google.com>
11521
11522 * linux-low.c (linux_read_memory): Fix argument to read.
11523
11524 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11525
11526 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11527 events, don't leave current_inferior pointing at null.
11528
11529 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11530
11531 * win32-low.c (LOG): Delete.
11532 (OUTMSG): Output to stderr.
11533 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11534 on compile time LOG macro.
11535 (win32_wait): Fix debug output.
11536
11537 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11538
11539 * win32-low.c (win32_add_one_solib): If the dll name is
11540 "ntdll.dll", prepend the system directory to the dll path.
11541
11542 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11545
11546 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11547 Vladimir Prus <vladimir@codesourcery.com>
11548
11549 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11550 * configure.ac: Check for __mcoldfire__ and set
11551 gdb_cv_m68k_is_coldfire.
11552 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11553 reg-cf.o and reg-m68k.o.
11554 * configure: Regenerated.
11555
11556 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11557
11558 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11559 Pass it to thread_db_free.
11560 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11561 proper `detaching' argument to linux_remove_process.
11562 * linux-low.h (thread_db_free): Add `detaching' parameter.
11563 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11564 to thread_db_free.
11565 (thread_db_free): Add `detaching' parameter. Only
11566 call td_ta_clear_event if detaching from process.
11567
11568 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11569
11570 * thread-db.c (thread_db_free): Fix typo.
11571
11572 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11573
11574 PR gdb/10838
11575 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11576
11577 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11578
11579 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11580 with an i686 compiler.
11581 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11582 needed.
11583 * configure: Rebuilt.
11584
11585 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11586
11587 PR gdb/10783
11588
11589 * server.c (handle_search_memory_1): Correct read_addr initialization
11590 in loop for searching subsequent chunks.
11591
11592 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11593
11594 * configure.ac: New --with-libthread-db option.
11595 * thread-db.c: Allow direct dependence on libthread_db.
11596 (thread_db_free): Adjust.
11597 * config.in: Regenerate.
11598 * configure: Likewise.
11599
11600 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11601
11602 PR gdb/10757
11603 * thread-db.c (attach_thread): New function.
11604 (maybe_attach_thread): Return success/failure.
11605 (find_new_threads_callback): Adjust.
11606 (thread_db_find_new_threads): Loop until no new threads.
11607
11608 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11609
11610 * proc-service.c (ps_lgetregs): Formatting.
11611
11612 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11613
11614 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11615 * configure.ac: Adjust.
11616 * linux-low.h (struct process_info_private): Move members to struct
11617 thread_db.
11618 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11619 * linux-low.c (linux_remove_process): Adjust.
11620 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11621 * server.c (handle_query): Move code ...
11622 (handle_monitor_command): ... here. New function.
11623 * target.h (struct target_ops): New member.
11624 * thread-db.c (struct thread_db): New.
11625 (libthread_db_search_path): New variable.
11626 (thread_db_create_event, thread_db_enable_reporting)
11627 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11628 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11629 (try_thread_db_load_1, dladdr_to_soname): New functions.
11630 (try_thread_db_load, thread_db_load_search): New functions.
11631 (thread_db_init): Search for libthread_db.
11632 (thread_db_free): New function.
11633 (thread_db_handle_monitor_command): Likewise.
11634 * config.in: Regenerate.
11635 * configure: Regenerate.
11636
11637 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11638
11639 * spu-low.c (spu_kill): Wait for inferior to terminate.
11640 Call clear_inferiors.
11641 (spu_detach): Call clear_inferiors.
11642
11643 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11644
11645 * aclocal.m4: Regenerate.
11646 * config.in: Likewise.
11647 * configure: Likewise.
11648
11649 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11650
11651 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11652 (parse_spufs_run): New function.
11653 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11654 (ppc_breakpoint_at): Handle SPU breakpoints.
11655
11656 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11657
11658 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11659 (SPUFS_MAGIC): Define.
11660 (spu_enumerate_spu_ids): New function.
11661 (linux_qxfer_spu): New function.
11662 (linux_target_ops): Install linux_qxfer_spu.
11663
11664 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11665
11666 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11667 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11668 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11669 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11670 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11671 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11672 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11673 (init_registers_powerpc_cell32l): Add prototype.
11674 (init_registers_powerpc_cell64l): Likewise.
11675 (ppc_arch_setup): Detect Cell/B.E. architecture.
11676
11677 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11678
11679 * Makefile.in (datarootdir): New variable.
11680
11681 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11682
11683 * linux-low.c (linux_write_memory): Update debugging output.
11684 * Makefile.in (clean): Add new descriptions.
11685 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11686 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11687 * configure.srv: Add new files for arm*-*-linux*.
11688 * linux-arm-low.c: Add new declarations.
11689 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11690 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11691 (HWCAP_VFPv3D16): New.
11692 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11693 instead of __IWMMXT__.
11694 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11695 (arm_arch_setup): New.
11696 (target_regsets): Remove #ifdef. Add VFP regset.
11697 (the_low_target): Use arm_arch_setup.
11698
11699 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11700
11701 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11702 the main thread again.
11703
11704 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11705
11706 Adding Neutrino gdbserver.
11707 * configure: Regenerated.
11708 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11709 * configure.srv (i[34567]86-*-nto*): New target.
11710 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11711 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11712 (nto_comctrl) [__QNX__]: New function.
11713 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11714
11715 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11716
11717 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11718 srv_tgtobj.
11719
11720 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11721 Pedro Alves <pedro@codesourcery.com>
11722
11723 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11724 don't support CONTEXT_EXTENDED_REGISTERS.
11725 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11726 (the_low_target): Install them.
11727 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11728 failing with ERROR_PIPE_NOT_CONNECTED.
11729
11730 2009-06-30 Doug Evans <dje@google.com>
11731 Pierre Muller <muller@ics.u-strasbg.fr>
11732
11733 Add h/w watchpoint support to x86-linux, win32-i386.
11734 * Makefile.in (SFILES): Add i386-low.c
11735 (i386_low_h): Define.
11736 (i386-low.o): Add dependencies.
11737 (linux-x86-low.o): Add i386-low.h dependency.
11738 (win32-i386-low.o): Ditto.
11739 * i386-low.c: New file.
11740 * i386-low.h: New file.
11741 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11742 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11743 * linux-low.c (linux_add_process): Initialize arch_private.
11744 (linux_remove_process): Free arch_private.
11745 (add_lwp): Initialize arch_private.
11746 (delete_lwp): Free arch_private.
11747 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11748 provided.
11749 * linux-low.h (process_info_private): New member arch_private.
11750 (lwp_info): New member arch_private.
11751 (linux_target_ops): New members new_process, new_thread,
11752 prepare_to_resume.
11753 (ptid_of): New macro.
11754 * linux-x86-low.c: Include stddef.h, i386-low.h.
11755 (arch_process_info): New struct.
11756 (arch_lwp_info): New struct.
11757 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11758 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11759 (i386_dr_low_get_status): New function.
11760 (x86_insert_point, x86_remove_point): New functions.
11761 (x86_stopped_by_watchpoint): New function.
11762 (x86_stopped_data_address): New function.
11763 (x86_linux_new_process, x86_linux_new_thread): New functions.
11764 (x86_linux_prepare_to_resume): New function.
11765 (the_low_target): Add entries for insert_point, remove_point,
11766 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11767 prepare_to_resume.
11768 * server.c (debug_hw_points): New global.
11769 (monitor_show_help): Document set debug-hw-points.
11770 (handle_query): Process "set debug-hw-points".
11771 * server.h (debug_hw_points): Declare.
11772 (paddress): Declare.
11773 * utils.c (NUMCELLS, CELLSIZE): New macros.
11774 (get_sell, xsnprintf, paddress): New functions.
11775 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11776 remove_point, stopped_by_watchpoint, stopped_data_address.
11777 * win32-i386-low.c: Include i386-low.h.
11778 (debug_reg_state): Replaces dr.
11779 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11780 (i386_dr_low_get_status): New function.
11781 (i386_insert_point, i386_remove_point): New functions.
11782 (i386_stopped_by_watchpoint): New function.
11783 (i386_stopped_data_address): New function.
11784 (i386_initial_stuff): Update.
11785 (get_thread_context,set_thread_context,i386_thread_added): Update.
11786 (the_low_target): Add entries for insert_point,
11787 remove_point, stopped_by_watchpoint, stopped_data_address.
11788 * win32-low.c (win32_insert_watchpoint): New function.
11789 (win32_remove_watchpoint): New function.
11790 (win32_stopped_by_watchpoint): New function.
11791 (win32_stopped_data_address): New function.
11792 (win32_target_ops): Add entries for insert_watchpoint,
11793 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11794 * win32-low.h (win32_target_ops): New members insert_point,
11795 remove_point, stopped_by_watchpoint, stopped_data_address.
11796
11797 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11798
11799 * server.c (process_serial_event): Re-return unsupported, not
11800 error, if the type isn't recognized. Re-allow supporting only
11801 insert or remove packets. Also call require_running for
11802 breakpoints. Add missing break statement to default case. Tidy.
11803 * target.h (struct target_ops): Rename insert_watchpoint to
11804 insert_point, and remove_watchpoint to remove_point.
11805
11806 * linux-low.h (struct linux_target_ops): Likewise.
11807 * linux-low.c (linux_insert_watchpoint): Rename to ...
11808 (linux_insert_point): ... this. Adjust.
11809 (linux_remove_watchpoint): Rename to ...
11810 (linux_remove_point): ... this. Adjust.
11811 (linux_target_ops): Adjust.
11812 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11813 (cris_insert_point): ... this.
11814 (cris_remove_watchpoint): Rename to ...
11815 (cris_remove_point): ... this.
11816 (the_low_target): Adjust.
11817
11818 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11819
11820 * server.c (handle_v_kill): Pass signal_pid to
11821 kill_inferior if multi_process is zero.
11822
11823 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11824
11825 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11826 * target.h (target_ops): Comment for *_watchpoint to make it clear
11827 the functions can get types '0' and '1'.
11828
11829 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11830
11831 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11832 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11833 * regcache.c (get_regcache): Likewise.
11834 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11835 * win32-low.c (child_fetch_inferior_registers): Remove check for
11836 regno 0.
11837
11838 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11839 Pedro Alves <pedro@codesourcery.com>
11840
11841 * target.h (struct target_ops) <supports_multi_process>: New
11842 callback.
11843 (target_supports_multi_process): New.
11844 * server.c (handle_query): Even if GDB reports support, only
11845 enable multi-process if the target also supports it. Report
11846 multi-process support only if the target backend supports it.
11847 * linux-low.c (linux_supports_multi_process): New function.
11848 (linux_target_ops): Install it as target_supports_multi_process
11849 callback.
11850
11851 2009-05-24 Doug Evans <dje@google.com>
11852
11853 Global renaming of find_thread_pid to find_thread_ptid.
11854 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11855 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11856 All callers updated.
11857
11858 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11859 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11860 directly.
11861
11862 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11863 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11864 (linux_resume_one_lwp): Ditto.
11865
11866 2009-05-23 Doug Evans <dje@google.com>
11867
11868 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11869 from struct inferior_list_entry * to struct lwp_info *.
11870 All callers updated.
11871
11872 2009-05-13 Doug Evans <dje@google.com>
11873
11874 * linux-x86-low.c: Don't include assert.h.
11875 (x86_siginfo_fixup): Use fatal, not assert.
11876 (x86_arch_setup): Fix comment.
11877
11878 2009-05-12 Doug Evans <dje@google.com>
11879
11880 Biarch support for i386/amd64 gdbserver.
11881 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11882 Add linux-x86-low.c.
11883 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11884 (linux-x86-low.o): Add.
11885 * linux-x86-64-low.c: Delete.
11886 * linux-i386-low.c: Delete.
11887 * linux-x86-low.c: New file.
11888 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11889 linux-x86-low.o.
11890 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11891 linux-x86-low.o.
11892 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11893 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11894 (linux_child_pid_to_exec_file): New function.
11895 (elf_64_header_p, elf_64_file_p): New functions.
11896 (siginfo_fixup): New function.
11897 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11898 give target a chance to convert layout.
11899 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11900 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11901
11902 2009-05-07 Doug Evans <dje@google.com>
11903
11904 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11905 (regsets_store_inferior_registers): Ditto.
11906
11907 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11908
11909 PR server/10048
11910
11911 * linux-low.c (must_set_ptrace_flags): Delete.
11912 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11913 of the global.
11914 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11915 `lwp->must_set_ptrace_flags' instead.
11916 (linux_wait_for_event_1): Set ptrace options here.
11917 (linux_wait_1): ... not here.
11918
11919 2009-04-30 Doug Evans <dje@google.com>
11920
11921 * inferiors.c (started_inferior_callback): New function.
11922 (attached_inferior_callback): New function.
11923 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11924 * server.c (print_started_pid, print_attached_pid): New functions.
11925 (detach_or_kill_for_exit): New function.
11926 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11927 * server.h (have_started_inferiors_p): Declare.
11928 (have_attached_inferiors_p): Declare.
11929
11930 * inferiors.c (remove_process): Fix memory leak, free process.
11931 * linux-low.c (linux_remove_process): New function.
11932 (linux_kill): Call it instead of remove_process.
11933 (linux_detach, linux_wait_1): Ditto.
11934
11935 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11936
11937 * configure.srv: Add x86 Windows CE target.
11938
11939 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11940
11941 * inferiors.c (get_thread_process): Make global.
11942 * server.h (get_thread_process): Add prototype.
11943 * thread-db.c (find_one_thread): Use get_thread_process
11944 instead of current_process.
11945 (thread_db_get_tls_address): Do not crash if called when
11946 thread layer is not yet initialized.
11947
11948 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11949
11950 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11951 * spu-low.c (current_tid): Rename to ...
11952 (current_ptid): ... this.
11953 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11954 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11955 ptid_get_lwp (current_ptid) instead of current_tid.
11956 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11957 instead of current_tid. Use find_process_pid to verify pid
11958 argument is valid. Pass proper argument to remove_process.
11959 (spu_thread_alive): Compare current_ptid instead of current_tid.
11960 (spu_resume): Likewise.
11961
11962 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11963
11964 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11965 variable.
11966
11967 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11968
11969 Implement the multiprocess extensions, and add linux multiprocess
11970 support.
11971
11972 * server.h (ULONGEST): Declare.
11973 (struct ptid, ptid_t): New.
11974 (minus_one_ptid, null_ptid): Declare.
11975 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11976 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11977 (struct inferior_list_entry): Change `id' type from unsigned from
11978 to ptid_t.
11979 (struct sym_cache, struct breakpoint, struct
11980 process_info_private): Forward declare.
11981 (struct process_info): Declare.
11982 (current_process): Declare.
11983 (all_processes): Declare.
11984 (initialize_inferiors): Declare.
11985 (add_thread): Adjust to use ptid_t.
11986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11987 (add_process, remove_process, find_thread_pid): Declare.
11988 (find_inferior_id): Adjust to use ptid_t.
11989 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11990 (multi_process): Declare.
11991 (push_event): Adjust to use ptid_t.
11992 (read_ptid, write_ptid): Declare.
11993 (prepare_resume_reply): Adjust to use ptid_t.
11994 (clear_symbol_cache): Declare.
11995 * inferiors.c (all_processes): New.
11996 (null_ptid, minus_one_ptid): New.
11997 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11998 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11999 (add_thread): Change unsigned long to ptid. Remove gdb_id
12000 parameter. Adjust.
12001 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12002 (gdb_id_to_thread): Rename to ...
12003 (find_thread_pid): ... this. Change unsigned long to ptid.
12004 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12005 (loaded_dll, pull_pid_from_list): Adjust.
12006 (add_process, remove_process, find_process_pid)
12007 (get_thread_process, current_process, initialize_inferiors): New.
12008 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12009 (struct target_waitstatus) <related_pid>: Ditto.
12010 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12011 return type to int.
12012 (struct target_ops) <join>: Add `pid' argument.
12013 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12014 (struct target_ops) <wait>: Add `ptid' field. Change return type
12015 to ptid.
12016 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12017 (mywait): Add `ptid' argument. Change return type to ptid_t.
12018 (target_pid_to_str): Declare.
12019 * target.c (set_desired_inferior): Adjust to use ptids.
12020 (mywait): Add new `ptid' argument. Adjust.
12021 (target_pid_to_str): New.
12022 * mem-break.h (free_all_breakpoints): Declare.
12023 * mem-break.c (breakpoints): Delelete.
12024 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12025 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12026 to use per-process breakpoint list.
12027 (free_all_breakpoints): New.
12028 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12029 (symbol_cache, all_symbols_looked_up): Delete.
12030 (hexchars): New.
12031 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12032 read_ptid): New.
12033 (prepare_resume_reply): Change ptid argument's type from unsigned
12034 long to ptid_t. Adjust. Implement W;process and X;process.
12035 (free_sym_cache, clear_symbol_cache): New.
12036 (look_up_one_symbol): Adjust to per-process symbol cache. *
12037 * server.c (cont_thread, general_thread, step_thread): Change type
12038 to ptid_t.
12039 (attached): Delete.
12040 (multi_process): New.
12041 (last_ptid): Change type to ptid_t.
12042 (struct vstop_notif) <ptid>: Change type to ptid_t.
12043 (queue_stop_reply, push_event): Change `ptid' argument's type to
12044 ptid_t.
12045 (discard_queued_stop_replies): Add `pid' argument.
12046 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12047 changes. Don't reference the `attached' global.
12048 (attach_inferior): Adjust to mywait interface changes.
12049 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12050 features. Handle and report "multiprocess+". Handle
12051 "qAttached:PID".
12052 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12053 changes.
12054 (handle_v_kill): New.
12055 (handle_v_stopped): Adjust to use target_pid_to_str.
12056 (handle_v_requests): Allow multiple attaches and runs when
12057 multiprocess extensions are in effect. Handle "vKill".
12058 (myresume): Adjust to use ptids.
12059 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12060 (handle_status): Adjust to discard_queued_stop_replies interface
12061 change.
12062 (first_thread_of, kill_inferior_callback)
12063 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12064 (main): Call initialize_inferiors. Adjust to use ptids, killing
12065 and detaching from all inferiors. Handle multiprocess packet
12066 variants.
12067 * linux-low.h: Include gdb_proc_service.h.
12068 (struct process_info_private): New.
12069 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12070 <lwpid_of>: Use ptid_get_lwp.
12071 (get_lwp_thread): Adjust.
12072 (struct lwp_info): Add `dead' member.
12073 (find_lwp_pid): Declare.
12074 * linux-low.c (thread_db_active): Delete.
12075 (new_inferior): Adjust comment.
12076 (inferior_pid): Delete.
12077 (linux_add_process): New.
12078 (handle_extended_wait): Adjust.
12079 (add_lwp): Change unsigned long to ptid.
12080 (linux_create_inferior): Add process to processes table. Adjust
12081 to use ptids. Don't set new_inferior here.
12082 (linux_attach_lwp): Rename to ...
12083 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12084 it. Adjust to use ptids.
12085 (linux_attach_lwp): New.
12086 (linux_attach): Add process to processes table. Don't set
12087 new_inferior here.
12088 (struct counter): New.
12089 (second_thread_of_pid_p, last_thread_of_process_p): New.
12090 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12091 multiple processes.
12092 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12093 processes. Remove process from process table.
12094 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12095 to multiple processes.
12096 (any_thread_of): New.
12097 (linux_detach): Add `pid' argument, and handle it. Remove process
12098 from processes table.
12099 (linux_join): Add `pid' argument. Handle it.
12100 (linux_thread_alive): Change unsighed long argument to ptid_t.
12101 Consider dead lwps as not being alive.
12102 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12103 threads we're not interested in.
12104 (same_lwp, find_lwp_pid): New.
12105 (linux_wait_for_lwp): Change `pid' argument's type from int to
12106 ptid_t. Adjust.
12107 (linux_wait_for_event): Rename to ...
12108 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12109 from int to ptid_t. Adjust.
12110 (linux_wait_for_event): New.
12111 (linux_wait_1): Add `ptid' argument. Change return type to
12112 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12113 that exit from the process table.
12114 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12115 Adjust.
12116 (mark_lwp_dead): New.
12117 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12118 stopping all threads, mark its main lwp as dead.
12119 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12120 ptids.
12121 (fetch_register, usr_store_inferior_registers)
12122 (regsets_fetch_inferior_registers)
12123 (regsets_store_inferior_registers, linux_read_memory)
12124 (linux_write_memory): Inline `inferior_pid'.
12125 (linux_look_up_symbols): Adjust to use per-process
12126 `thread_db_active'.
12127 (linux_request_interrupt): Adjust to use ptids.
12128 (linux_read_auxv): Inline `inferior_pid'.
12129 (initialize_low): Don't reference thread_db_active.
12130 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12131 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12132 (ps_getpid): Return the pid of the current inferior.
12133 * thread-db.c (proc_handle, thread_agent): Delete.
12134 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12135 per-process data.
12136 (find_one_thread): Change argument type to ptid_t. Adjust to
12137 per-process data.
12138 (maybe_attach_thread): Adjust to per-process data and ptids.
12139 (thread_db_find_new_threads): Ditto.
12140 (thread_db_init): Ditto.
12141 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12142 processes table. Adjust to use ptids.
12143 (spu_kill, spu_detach): Adjust interface. Remove process from
12144 processes table.
12145 (spu_join, spu_thread_alive): Adjust interface.
12146 (spu_wait): Adjust interface. Remove process from processes
12147 table. Adjust to use ptids.
12148 * win32-low.c (current_inferior_tid): Delete.
12149 (current_inferior_ptid): New.
12150 (debug_event_ptid): New.
12151 (thread_rec): Take a ptid. Adjust.
12152 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12153 (child_delete_thread): Ditto.
12154 (do_initial_child_stuff): Add `attached' argument. Add process to
12155 processes table.
12156 (child_fetch_inferior_registers, child_store_inferior_registers):
12157 Adjust.
12158 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12159 (win32_attach): Pass 1 to do_initial_child_stuff.
12160 (win32_kill): Adjust interface. Remove process from processes
12161 table.
12162 (win32_detach): Ditto.
12163 (win32_join): Adjust interface.
12164 (win32_thread_alive): Take a ptid.
12165 (win32_resume): Adjust to use ptids.
12166 (get_child_debug_event): Ditto.
12167 (win32_wait): Adjust interface. Remove exiting process from
12168 processes table.
12169
12170 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12171
12172 Non-stop mode support.
12173
12174 * server.h (non_stop): Declare.
12175 (gdb_client_data, handler_func): Declare.
12176 (delete_file_handler, add_file_handler, start_event_loop):
12177 Declare.
12178 (handle_serial_event, handle_target_event, push_event)
12179 (putpkt_notif): Declare.
12180 * target.h (enum resume_kind): New.
12181 (struct thread_resume): Replace `step' field by `kind' field.
12182 (TARGET_WNOHANG): Define.
12183 (struct target_ops) <wait>: Add `options' argument.
12184 <supports_non_stop, async, start_non_stop>: New fields.
12185 (target_supports_non_stop, target_async): New.
12186 (start_non_stop): Declare.
12187 (mywait): Add `options' argument.
12188 * target.c (mywait): Add `options' argument. Print child exit
12189 notifications here.
12190 (start_non_stop): New.
12191 * server.c (non_stop, own_buf, mem_buf): New globals.
12192 (struct vstop_notif): New.
12193 (notif_queue): New global.
12194 (queue_stop_reply, push_event, discard_queued_stop_replies)
12195 (send_next_stop_reply): New.
12196 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12197 interface changes.
12198 (attach_inferior): In non-stop mode, don't wait for the target
12199 here.
12200 (handle_general_set): Handle QNonStop.
12201 (handle_query): When handling qC, return the current general
12202 thread, instead of the first thread of the list.
12203 (handle_query): If the backend supports non-stop mode, include
12204 QNonStop+ in the qSupported query response.
12205 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12206 and non-stop mode.
12207 (handle_v_attach, handle_v_run): Handle non-stop mode.
12208 (handle_v_stopped): New.
12209 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12210 (myresume): Adjust to use resume_kind. Handle non-stop.
12211 (queue_stop_reply_callback): New.
12212 (handle_status): Handle non-stop mode.
12213 (main): Clear non_stop flag on reconnection. Use the event-loop.
12214 Refactor serial protocol handling from here ...
12215 (process_serial_event): ... to this new function. When GDB
12216 selects any thread, select one here. In non-stop mode, wait until
12217 GDB acks all pending events before exiting.
12218 (handle_serial_event, handle_target_event): New.
12219 * remote-utils.c (remote_open): Install remote_desc in the event
12220 loop.
12221 (remote_close): Remove remote_desc from the event loop.
12222 (putpkt_binary): Rename to...
12223 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12224 (putpkt_binary): New as wrapper around putpkt_binary_1.
12225 (putpkt_notif): New.
12226 (prepare_resume_reply): In non-stop mode, don't change the
12227 general_thread.
12228 * event-loop.c: New.
12229 * Makefile.in (OBJ): Add event-loop.o.
12230 (event-loop.o): New rule.
12231
12232 * linux-low.h (pid_of): Moved here.
12233 (lwpid_of): New.
12234 (get_lwp_thread): Use lwpid_of.
12235 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12236 * linux-low.c (pid_of): Delete.
12237 (inferior_pid): Use lwpid_of.
12238 (linux_event_pipe): New.
12239 (target_is_async_p): New.
12240 (delete_lwp): New.
12241 (handle_extended_wait): Use lwpid_of.
12242 (add_lwp): Don't set lwpid field.
12243 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12244 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12245 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12246 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12247 first. Adjust to linux_wait_for_event interface changes. Use
12248 lwpid_of.
12249 (linux_detach): Don't delete the main lwp here.
12250 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12251 (status_pending_p): Don't consider explicitly suspended lwps.
12252 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12253 pointer. Add OPTIONS argument. Change return type to int. Use
12254 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12255 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12256 pointer. Add status pointer argument. Return a pid instead of a
12257 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12258 changes. In non-stop mode, don't switch to a random thread.
12259 (linux_wait): Rename to...
12260 (linux_wait_1): ... this. Add target_options argument, and handle
12261 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12262 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12263 clean exit and signal exit code. Don't stop all threads in
12264 non-stop mode. In all-stop mode, only stop all threads when
12265 reporting a stop to GDB. Handle explicit thread stop requests.
12266 (async_file_flush, async_file_mark): New.
12267 (linux_wait): New.
12268 (send_sigstop): Use lwpid_of.
12269 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12270 interface changes. In non-stop mode, don't switch to a random
12271 thread.
12272 (linux_resume_one_lwp): Use lwpid_of.
12273 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12274 (linux_resume_one_thread): ... this. Handle resume_stop. In
12275 non-stop mode, don't look for pending flag in all threads.
12276 (resume_status_pending_p): Don't consider explicitly suspended
12277 threads.
12278 (my_waitpid): Reimplement. Emulate __WALL.
12279 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12280 Use lwpid_of.
12281 (sigchld_handler, linux_supports_non_stop, linux_async)
12282 (linux_start_non_stop): New.
12283 (linux_target_ops): Register linux_supports_non_stop, linux_async
12284 and linux_start_non_stop.
12285 (initialize_low): Install SIGCHLD handler.
12286 * thread-db.c (thread_db_create_event, find_one_thread)
12287 (thread_db_get_tls_address): Use lwpid_of.
12288 * win32-low.c (win32_detach): Adjust to use resume_kind.
12289 (win32_wait): Add `options' argument.
12290 * spu-low.c (spu_resume): Adjust to use resume_kind.
12291 (spu_wait): Add `options' argument.
12292
12293 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12294
12295 Decouple target code from remote protocol.
12296
12297 * target.h (enum target_waitkind): New.
12298 (struct target_waitstatus): New.
12299 (struct target_ops) <wait>: Return an unsigned long. Take a
12300 target_waitstatus pointer instead of a char pointer.
12301 (mywait): Likewise.
12302 * target.c (mywait): Change prototype to return an unsigned long.
12303 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12304 * server.h (thread_from_wait, old_thread_from_wait): Delete
12305 declarations.
12306 (prepare_resume_reply): Change prototype to take a
12307 target_waitstatus.
12308 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12309 (last_status, last_ptid): New.
12310 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12311 pid instead of a signal.
12312 (attach_inferior): Remove "status" and "signal" parameters.
12313 Adjust.
12314 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12315 not as an address.
12316 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12317 (handle_v_requests, myresume): Remove "status" and "signal"
12318 parameters. Adjust.
12319 (handle_status): New.
12320 (main): Delete local `status'. Adjust.
12321 * remote-utils.c: Include target.h.
12322 (prepare_resume_reply): Change prototype to take a
12323 target_waitstatus. Adjust.
12324
12325 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12326 interface.
12327 * spu-low.c (spu_wait): Adjust.
12328 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12329 Delete.
12330 (win32_wait): Adjust.
12331
12332 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12333
12334 * target.h (struct thread_resume): Delete leave_stopped member.
12335 (struct target_ops): Add a `n' argument to the `resume' callback.
12336 * server.c (start_inferior): Adjust.
12337 (handle_v_cont, myresume): Adjust.
12338 * linux-low.c (check_removed_breakpoint): Adjust to resume
12339 interface change, and to removed leave_stopped field.
12340 (resume_ptr): Delete.
12341 (struct thread_resume_array): New.
12342 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12343 resume interface change.
12344 (linux_continue_one_thread, linux_queue_one_thread)
12345 (resume_status_pending_p): Check if the resume field is NULL
12346 instead of checking the leave_stopped member.
12347 (linux_resume): Adjust to the target resume interface change.
12348 * spu-low.c (spu_resume): Adjust to the target resume interface
12349 change.
12350 * win32-low.c (win32_detach, win32_resume): Ditto.
12351
12352 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12353
12354 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12355 flag.
12356 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12357 pending.
12358 (linux_continue_one_thread): Only preserve the stepping flag if
12359 there's a pending breakpoint.
12360
12361 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12362
12363 * server.c (main): After the inferior having exited, call
12364 remote_close before exiting gdbserver.
12365
12366 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12367
12368 Fix size of FPSCR in Power 7 processors.
12369 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12370 (PPC_FEATURE_HAS_DFP): New #define.
12371 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12372 size of the FPSCR.
12373
12374 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12375
12376 * server.c (handle_query) Whitespace and formatting.
12377
12378 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12379
12380 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12381 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12382 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12383 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12384 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12385 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12386 Makefile.in, configure.ac: Fix whitespace throughout.
12387 * configure: Regenerate.
12388
12389 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12390
12391 * inferiors.c (find_inferior): Make it safe for the callback
12392 function to delete the currently iterated inferior.
12393
12394 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12395
12396 * Makefile.in (linuw_low_h): Move higher.
12397 (thread-db.o): Depend on $(linux_low_h).
12398
12399 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12400
12401 Rename "process" to "lwp" throughout.
12402
12403 * linux-low.c (all_processes): Rename to...
12404 (all_lwps): ... this.
12405 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12406 (add_process): Rename to ...
12407 (add_lwp): ... this. Adjust.
12408 (linux_create_inferior): Adjust.
12409 (linux_attach_lwp): Adjust.
12410 (linux_attach): Adjust.
12411 (linux_kill_one_process): Rename to ...
12412 (linux_kill_one_lwp): ... this. Adjust.
12413 (linux_kill): Adjust.
12414 (linux_detach_one_process): Rename to ...
12415 (linux_detach_one_lwp): ... this. Adjust.
12416 (linux_detach): Adjust.
12417 (check_removed_breakpoint): Adjust.
12418 (status_pending_p): Adjust.
12419 (linux_wait_for_process): Rename to ...
12420 (linux_wait_for_lwp): ... this. Adjust.
12421 (linux_wait_for_event): Adjust.
12422 (send_sigstop): Adjust.
12423 (wait_for_sigstop): Adjust.
12424 (stop_all_processes): Rename to ...
12425 (stop_all_lwps): ... this.
12426 (linux_resume_one_process): Rename to ...
12427 (linux_resume_one_lwp): ... this. Adjust.
12428 (linux_set_resume_request, linux_continue_one_thread)
12429 (linux_queue_one_thread, resume_status_pending_p)
12430 (usr_store_inferior_registers, regsets_store_inferior_registers)
12431 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12432 Adjust.
12433 * linux-low.h (get_process): Rename to ...
12434 (get_lwp): ... this. Adjust.
12435 (get_thread_process): Rename to ...
12436 (get_thread_lwp): ... this. Adjust.
12437 (get_process_thread): Rename to ...
12438 (get_lwp_thread): ... this. Adjust.
12439 (struct process_info): Rename to ...
12440 (struct lwp_info): ... this.
12441 (all_processes): Rename to ...
12442 (all_lwps): ... this.
12443 * proc-service.c (ps_lgetregs): Adjust.
12444 * thread-db.c (thread_db_create_event, find_one_thread)
12445 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12446
12447 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12448
12449 * server.c (handle_query): Handle "qAttached".
12450
12451 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12452
12453 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12454 GPLv3, update license URL.
12455
12456 2009-03-01 Doug Evans <dje@google.com>
12457
12458 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12459 (server_h): Add gdb_signals.h.
12460 (signals.o): Update.
12461 * server.h (target_signal_from_host,target_signal_to_host_p)
12462 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12463
12464 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12465
12466 * remote-utils.c (getpkt): Also generate remote-debug
12467 information if noack_mode is set.
12468
12469 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12470
12471 * server.c (handle_query): Report qXfer:siginfo:read and
12472 qXfer:siginfo:write as supported and handle them.
12473 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12474 * linux-low.c (linux_xfer_siginfo): New.
12475 (linux_target_ops): Set it.
12476
12477 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12478
12479 * server.c (gdbserver_usage): Mention --remote-debug.
12480 (main): Accept '--remote-debug' switch.
12481
12482 2009-01-18 Doug Evans <dje@google.com>
12483
12484 * regcache.c (new_register_cache): No need to check result of xcalloc.
12485 * server.c (handle_search_memory): Back out calls to xmalloc,
12486 result is checked and error is returned to user upon failure.
12487 (handle_query): Ditto. Add more checks for result of malloc.
12488 (handle_v_cont): Check result of malloc, report error back to
12489 user upon failure.
12490 (handle_v_run): Ditto. Call freeargv.
12491 * server.h (freeargv): Declare.
12492 * utils.c (freeargv): New fn.
12493
12494 2009-01-15 Doug Evans <dje@google.com>
12495
12496 * gdbreplay.c (perror_with_name): Make arg const char *.
12497 * server.h (target_signal_to_name): Make return type const char *.
12498 * thread-db.c (thread_db_err_str): Make return type const char *.
12499 * utils.c (perror_with_name): Make arg const char *.
12500
12501 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12502
12503 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12504 when handling a EXIT_PROCESS_DEBUG_EVENT.
12505
12506 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12507
12508 * gdbreplay.c (gdbreplay_version): Update copyright year.
12509 * server.c (gdbserver_version): Likewise.
12510
12511 2009-01-05 Doug Evans <dje@google.com>
12512
12513 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12514 (handle_extended_wait): Improve comment.
12515
12516 2008-12-13 Doug Evans <dje@google.com>
12517
12518 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12519 * server.h (ATTR_MALLOC): New macro.
12520 (xmalloc,xcalloc,xstrdup): Declare.
12521 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12522 * inferiors.c: Ditto.
12523 * linux-low.c: Ditto.
12524 * mem-break.c: Ditto.
12525 * regcache.c: Ditto.
12526 * remote-utils.c: Ditto.
12527 * server.c: Ditto.
12528 * target.c: Ditto.
12529 * win32-low.c: Ditto.
12530
12531 2008-12-12 Doug Evans <dje@google.com>
12532
12533 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12534 in debugging printf.
12535
12536 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12537
12538 2008-12-09 Doug Evans <dje@google.com>
12539
12540 * linux-low.h (struct process_info): Delete member tid, unused.
12541 * thread-db.c (find_one_thread): Update.
12542 (maybe_attach_thread): Update.
12543
12544 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12545
12546 * target.h (struct target_ops): Add qxfer_osdata member.
12547 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12548 and dirent.h.
12549 (linux_qxfer_osdata): New functions.
12550 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12551 callback.
12552 * server.c (handle_query): Handle "qXfer:osdata:read:".
12553 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12554 (buffer_xml_printf): New functions.
12555 * server.h (struct buffer): New.
12556 (buffer_grow_str, buffer_grow_str0): New macros.
12557 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12558 (buffer_xml_printf): Declare.
12559
12560 2008-11-24 Doug Evans <dje@google.com>
12561
12562 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12563
12564 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12565
12566 * server.c (handle_v_run): Always use the supplied argument list.
12567
12568 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12569
12570 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12571 (xtensa_regmap_table): Add entry for scompare1.
12572
12573 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12574
12575 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12576 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12577 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12578 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12579 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12580 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12581 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12582 XML target descriptions.
12583 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12584 when inferior is running on an ISA 2.05 or later processor. Add
12585 special case to return offset for full 64-bit slot of FPSCR when
12586 in 32-bits.
12587
12588 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12589
12590 * Makefile.in (SFILES, clean): Added sparc64 files.
12591 (reg-sparc64.o, reg-sparc64.c): New.
12592 * configure.srv (sparc*-*-linux*): New configuration.
12593 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12594 syscall arguments for SPARC.
12595 (regsets_store_inferior_registers): Likewise.
12596 * linux-sparc-low.c: New file.
12597
12598 2008-10-21 Doug Evans <dje@google.com>
12599
12600 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12601 (READLINE_DIR,READLINE_DEP): Delete.
12602 (INTERNAL_CFLAGS): Update.
12603 (LINTFLAGS): Update.
12604
12605 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12606
12607 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12608 whole argv from the last run, not just argv[0].
12609
12610 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12611
12612 * regcache.c (new_register_cache): Return NULL if the register
12613 cache size isn't known yet.
12614 (free_register_cache): Avoid dereferencing a NULL regcache.
12615
12616 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12617
12618 * configure.srv: Merge MIPS and MIPS64.
12619
12620 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12621
12622 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12623
12624 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12625
12626 * Makefile.in: Add required vsx dependencies.
12627
12628 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12629 Declare init_registers_powerpc_vsx32l.
12630 Declare init_registers_powerpc_vsx64l.
12631 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12632 (ppc_arch_setup): Check for VSX in hwcap.
12633 (ppc_fill_vsxregset): New function.
12634 (ppc_store_vsxregset): New function.
12635 Add new VSX entry in regset_info target_regsets.
12636
12637 * configure.srv: Add new VSX dependencies.
12638
12639 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12640
12641 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12642 (remote_open): Set or clear transport_is_reliable.
12643 (putpkt_binary): Don't expect acks in noack mode.
12644 (getpkt): Don't send ack/nac in noack mode.
12645 * server.c (handle_general_set): Handle QStartNoAckMode.
12646 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12647 qSupported.
12648 (main): Reset noack_mode on every connection.
12649 * server.h (noack_mode): Declare.
12650
12651 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12652
12653 * Makefile.in (GDBREPLAY_OBS): New variable.
12654 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12655
12656 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12657 Daniel Jacobowitz <dan@codesourcery.com>
12658
12659 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12660 (usr_store_inferior_registers): Likewise.
12661 (regsets_store_inferior_registers): Likewise.
12662
12663 2008-07-31 Rolf Jansen <rj@surtec.com>
12664 Pedro Alves <pedro@codesourcery.com>
12665
12666 * configure.ac: Check for memmem declaration.
12667 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12668 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12669 (disable_packet_qfThreadInfo): Unconditionally compile.
12670 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12671 * configure, config.in: Regenerate.
12672
12673 2008-07-28 Doug Kwan <dougkwan@google.com>
12674
12675 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12676 (linux_write_memory): Remove declaration of errno.
12677
12678 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12679
12680 * linux-low.c (handle_extended_wait): Do not use "status"
12681 variable uninitialized.
12682
12683 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12684
12685 * server.c (handle_v_attach): Inhibit reporting dll changes.
12686
12687 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12688
12689 * remote-utils.c (prepare_resume_reply): If requested, don't
12690 output "thread:TID" in the T stop reply.
12691
12692 * server.c (disable_packet_vCont, disable_packet_Tthread)
12693 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12694 (handle_query): If requested, disable support for qC, qfThreadInfo
12695 and qsThreadInfo.
12696 (handle_v_requests): If requested, disable support for vCont.
12697 (gdbserver_show_disableable): New.
12698 (main): Handle --disable-packet and --disable-packet=LIST.
12699
12700 * server.h (disable_packet_vCont, disable_packet_Tthread)
12701 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12702
12703 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12704
12705 * server.c (gdbserver_usage): Mention --version.
12706
12707 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12708
12709 * Makefile.in (gdbreplay.o): New rule.
12710
12711 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12712
12713 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12714 message, not gdbserver.
12715
12716 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12717 Nathan Sidwell <nathan@codesourcery.com>
12718 Joseph Myers <joseph@codesourcery.com>
12719
12720 * acinclude.m4: Include ../../config/acx.m4.
12721 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12722 * configure, config.in: Regenerate.
12723 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12724 * server.c (gdbserver_version): Print PKGVERSION.
12725 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12726 (main): Adjust gdbserver_usage calls.
12727 * gdbreplay.c (version, host_name): Add declarations.
12728 (gdbreplay_version, gdbreplay_usage): New.
12729 (main): Accept --version and --help options.
12730
12731 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12732
12733 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12734 (arm_breakpoint_at): Handle Thumb.
12735 (the_low_target): Add comment.
12736
12737 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12738
12739 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12740
12741 2008-05-09 Doug Evans <dje@google.com>
12742
12743 * server.h (decode_search_memory_packet): Declare.
12744 * remote-utils.c (decode_search_memory_packet): New fn.
12745 * server.c (handle_search_memory_1): New fn.
12746 (handle_search_memory): New fn.
12747 (handle_query): Process qSearch:memory packets.
12748
12749 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12750
12751 * regcache.c (registers_length): Remove.
12752 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12753 full register packet.
12754 * regcache.h (registers_length): Remove prototype.
12755 * server.h (PBUFSIZ): Define to 16384.
12756
12757 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12758
12759 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12760 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12761 powerpc-64l.o, and powerpc-altivec64l.o.
12762 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12763 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12764 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12765 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12766 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12767 to srv_xmlfiles.
12768
12769 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12770 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12771 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12772 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12773 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12774 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12775 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12776 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12777 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12778 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12779 (clean): Update.
12780
12781 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12782 (init_registers_powerpc_32l): ... this new prototype.
12783 (init_registers_powerpc_32): Remove, replace by ...
12784 (init_registers_powerpc_altivec32l): ... this new prototype.
12785 (init_registers_powerpc_e500): Remove, replace by ...
12786 (init_registers_powerpc_e500l): ... this new prototype.
12787 (init_registers_ppc64): Remove, replace by ...
12788 (init_registers_powerpc_64l): ... this new prototype.
12789 (init_registers_powerpc_64): Remove, replace by ...
12790 (init_registers_powerpc_altivec64l): ... this new prototype.
12791 (ppc_num_regs): Set to 73.
12792 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12793 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12794 (ppc_cannot_store_register): Handle orig_r3 and trap.
12795 (ppc_arch_setup): Update init_registers_... calls.
12796 (ppc_fill_gregset): Handle orig_r3 and trap.
12797
12798 * inferiors.c (clear_inferiors): Reset current_inferior.
12799
12800 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12801
12802 * acinclude.m4: Add override.m4.
12803 * configure: Regenerate.
12804
12805 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12806
12807 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12808 initial call to init_register_ppc64.
12809
12810 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12811
12812 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12813 single powerpc*-*-linux* case.
12814 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12815
12816 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12817
12818 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12819 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12820 from reg_xmlfiles.
12821 * linux-ppc-low.c: Include <elf.h>.
12822 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12823 (ppc_hwcap): New global variable.
12824 (ppc_regmap): Remove __SPE__ #ifdef sections.
12825 (ppc_regmap_e500): New global variable.
12826 (ppc_cannot_store_register): Update __SPE__ special case.
12827 (ppc_get_hwcap): New function.
12828 (ppc_arch_setup): Use it to determine whether inferior supports
12829 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12830 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12831 Do not access registers if target does not support AltiVec.
12832 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12833 Do not access registers if target does not support SPE.
12834 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12835
12836 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12837
12838 * linux-low.c (disabled_regsets, num_regsets): New.
12839 (use_regsets_p): Delete.
12840 (linux_wait_for_process): Clear disabled_regsets.
12841 (regsets_fetch_inferior_registers): Check and set it.
12842 (regsets_store_inferior_registers): Likewise.
12843 (linux_fetch_registers, linux_store_registers): Do not use
12844 use_regsets_p.
12845 (initialize_low): Allocate disabled_regsets.
12846
12847 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12848
12849 * Makefile.in (LIBOBJS): New.
12850 (OBS): Use LIBOBJS.
12851 (memmem.o): New rule.
12852 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12853 * configure: Regenerated.
12854
12855 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12856
12857 * server.c (handle_query): Never return "unsupported" for
12858 qXfer:features:read queries.
12859
12860 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12861
12862 * server.c (get_features_xml): Fix inverted condition.
12863 (handle_query): Always support qXfer:feature:read.
12864
12865 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12866
12867 * server.c (wrapper_argv): New.
12868 (start_inferior): Handle wrapper_argv. If set, expect an extra
12869 trap.
12870 (gdbserver_usage): Document --wrapper.
12871 (main): Parse --wrapper.
12872
12873 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12874
12875 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12876 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12877 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12878 (ppc_set_pc): Likewise.
12879 (ppc_arch_setup): New function.
12880 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12881 of collect_register.
12882 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12883
12884 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12885
12886 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12887 instead of linux-ppc64-low.o.
12888 * linux-ppc64-low.c: Remove file.
12889 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12890 (linux-ppc64-low.o): Remove rule.
12891
12892 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12893 (init_registers_powerpc_64): Likewise.
12894 (ppc_regmap): Conditionally define depending on __powerpc64__.
12895 (ppc_cannot_store_register): Do not special-case "fpscr" when
12896 compiled on __powerpc64__.
12897 (ppc_collect_ptrace_register): New function.
12898 (ppc_supply_ptrace_register): New function.
12899 (ppc_breakpoint): Change type to "unsigned int".
12900 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12901 (the_low_target): Conditionally provide initializers for the
12902 arch_setup member depending on __powerpc64__. Install
12903 collect_ptrace_register and supply_ptrace_register members.
12904
12905 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12906
12907 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12908 * server.c (gdbserver_xmltarget): Define.
12909 (get_features_xml): Use it to replace "target.xml" and arch_string.
12910
12911 * configure.srv: Remove srv_xmltarget. Add XML files that were
12912 mentioned there to srv_xmlfiles instead. Remove conditional tests
12913 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12914 srv_xmlfiles and srv_regobj to include all possible choices.
12915 * configure.ac (srv_xmltarget): Remove.
12916 (srv_xmlfiles): Do not add "target.xml".
12917 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12918 checks for supplementary target information.
12919 * configure: Regenerate.
12920 * Makefile.in (XML_TARGET): Remove.
12921 (target.xml): Remove rule.
12922 (clean): Do not clean up target.xml.
12923 (.PRECIOUS): Do not mention target.xml.
12924
12925 * target.h (struct target_ops): Remove arch_string member.
12926 * linux-low.c (linux_arch_string): Remove.
12927 (linux_target_ops): Remove arch_string initializer.
12928 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12929 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12930 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12931 * spu-low.c (spu_arch_string): Remove.
12932 (spu_target_ops): Remove arch_string initializer.
12933 * win32-low.c (win32_arch_string): Remove.
12934 (win32_target_ops): Remove arch_string initializer.
12935 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12936 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12937 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12938
12939 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12940
12941 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12942 by collect_ptrace_register and supply_ptrace_register hooks.
12943 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12944 instead of checking for the_low_target.left_pad_xfer.
12945 (usr_store_inferior_registers): Use collect_ptrace_register callback
12946 instead of checking for the_low_target.left_pad_xfer.
12947
12948 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12949 (s390_supply_ptrace_register): Likewise.
12950 (s390_fill_gregset): Call s390_collect_ptrace_register.
12951 (the_low_target): Update.
12952
12953 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12954 (ppc_supply_ptrace_register): Likewise.
12955 (the_low_target): Update.
12956
12957 * linux-i386-low.c (the_low_target): Update.
12958 * linux-x86-64-low.c (the_low_target): Update.
12959
12960 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12961
12962 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12963 reg-s390.o and reg-s390x.o.
12964
12965 * linux-low.c (new_inferior): New global variable.
12966 (linux_create_inferior, linux_attach): Set it.
12967 (linux_wait_for_process): Call the_low_target.arch_setup after the
12968 target has stopped for the first time.
12969 (initialize_low): Do not call the_low_target.arch_setup.
12970
12971 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12972 (s390_set_pc): Likewise.
12973 (s390_arch_setup): New function.
12974 (the_low_target): Use s390_arch_setup as arch_setup routine.
12975
12976 * regcache.c (realloc_register_cache): New function.
12977 (set_register_cache): Call it for each existing regcache.
12978
12979 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12980
12981 * server.h (init_registers): Remove prototype.
12982
12983 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12984 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12985 instead of init_registers ().
12986 * linux-arm-low.c (init_registers_arm): Add prototype.
12987 (init_registers_arm_with_iwmmxt): Likewise.
12988 (the_low_target): Add initializer for arch_setup field.
12989 * linux-cris-low.c (init_registers_cris): Add prototype.
12990 (the_low_target): Add initializer for arch_setup field.
12991 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12992 (the_low_target): Add initializer for arch_setup field.
12993 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12994 (the_low_target): Add initializer for arch_setup field.
12995 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12996 (the_low_target): Add initializer for arch_setup field.
12997 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12998 (the_low_target): Add initializer for arch_setup field.
12999 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13000 (the_low_target): Add initializer for arch_setup field.
13001 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13002 (init_registers_mips64_linux): Likewise.
13003 (the_low_target): Add initializer for arch_setup field.
13004 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13005 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13006 (the_low_target): Add initializer for arch_setup field.
13007 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13008 (init_registers_powerpc_64): Likewise.
13009 (the_low_target): Add initializer for arch_setup field.
13010 * linux-s390-low.c (init_registers_s390): Add prototype.
13011 (init_registers_s390x): Likewise.
13012 (the_low_target): Add initializer for arch_setup field.
13013 * linux-sh-low.c (init_registers_sh): Add prototype.
13014 (the_low_target): Add initializer for arch_setup field.
13015 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13016 (the_low_target): Add initializer for arch_setup field.
13017 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13018 (the_low_target): Add initializer for arch_setup field.
13019
13020 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13021 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13022 instead of init_registers ().
13023 * win32-arm-low.c (init_registers_arm): Add prototype.
13024 (the_low_target): Add initializer for arch_setup field.
13025 * win32-i386-low.c (init_registers_i386): Add prototype.
13026 (the_low_target): Add initializer for arch_setup field.
13027
13028 * spu-low.c (init_registers_spu): Add prototype.
13029 (initialize_low): Call initialie_registers_spu () instead of
13030 initialize_registers ().
13031
13032 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13033
13034 * server.c (handle_v_requests): When handling the vRun and vAttach
13035 packets, if already debugging a process, don't kill it. Return an
13036 error instead.
13037
13038 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13039
13040 * server.c (handle_query): Correct length check.
13041
13042 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13043
13044 * win32-low.c (do_initial_child_stuff): Add process handle
13045 parameter. Set current_process_handle and current_process_id from the
13046 parameters. Clear globals.
13047 (win32_create_inferior): Don't set current_process_handle and
13048 current_process_id here. Instead pass them on the call to
13049 do_initial_child_stuff.
13050 (win32_attach): Likewise.
13051 (win32_clear_inferiors): New.
13052 (win32_kill): Don't close the current process handle or the
13053 current thread handle here. Instead call win32_clear_inferiors.
13054 (win32_detach): Don't open a new handle to the process. Call
13055 win32_clear_inferiors.
13056 (win32_join): Don't rely on current_process_handle; open a new
13057 handle using the process id.
13058 (win32_wait): Call win32_clear_inferiors when the inferior process
13059 has exited.
13060
13061 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13062
13063 * server.c (monitor_show_help): Add "exit".
13064
13065 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13066
13067 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13068 (clean): Add reg-xtensa.c.
13069 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13070 * configure.srv (xtensa*-*-linux*) New target.
13071 * linux-xtensa-low.c: New.
13072 * xtensa-xtregs.c: New.
13073
13074 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13075
13076 * hostio.c: Don't include errno.h.
13077 (errno_to_fileio_errno): Move to hostio-errno.
13078 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13079 error number outputting to the target->hostio_last_error callback.
13080 (hostio_packet_error): Use FILEIO_EINVAL directly.
13081 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13082 calls to hostio_error.
13083 * hostio-errno.c: New.
13084 * server.h (hostio_last_error_from_errno): Declare.
13085 * target.h (target_ops): Add hostio_last_error member.
13086 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13087 as hostio_last_error handler.
13088 * spu-low.c (spu_target_ops): Likewise.
13089 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13090 (wince_hostio_last_error): New functions.
13091 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13092 as hostio_last_error handler.
13093 (win32_target_ops) [!_WIN32_WCE]: Register
13094 hostio_last_error_from_errno as hostio_last_error handler.
13095 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13096 (hostio-errno.o): New rule.
13097 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13098 * configure.srv (srv_hostio_err_objs): New variable. Default to
13099 hostio-errno.o.
13100 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13101 * configure: Regenerate.
13102
13103 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13104
13105 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13106 (linux_kill, linux_detach): Clean up the process list.
13107 * remote-utils.c (remote_open): Improve port number parsing.
13108 (putpkt_binary, input_interrupt): Only send interrupts if the target
13109 is running.
13110 * server.c (extended_protocol): Make static.
13111 (attached): Define earlier.
13112 (exit_requested, response_needed, program_argv): New variables.
13113 (target_running): New.
13114 (start_inferior): Clear attached here.
13115 (attach_inferior): Set attached here.
13116 (require_running): Define.
13117 (handle_query): Use require_running and target_running. Implement
13118 "monitor exit".
13119 (handle_v_attach, handle_v_run): New.
13120 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13121 (gdbserver_usage): Update.
13122 (main): Redo argument parsing. Handle --debug and --multi. Handle
13123 --attach along with other options or after the port. Save
13124 program_argv. Support no initial program. Resynchronize
13125 communication with GDB after an error. Handle "monitor exit".
13126 Use require_running and target_running. Always allow the extended
13127 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13128 restart in extended mode.
13129 * README: Refer to the GDB manual. Update --attach usage.
13130
13131 2007-12-20 Andreas Schwab <schwab@suse.de>
13132
13133 * linux-low.c (STACK_SIZE): Define.
13134 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13135 (linux_test_for_tracefork): Likewise.
13136
13137 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13138
13139 * linux-low.c (linux_wait_for_event): Update messages. Do not
13140 reinsert auto-delete breakpoints.
13141 * mem-break.c (struct breakpoint): Change return type of handler to
13142 int.
13143 (set_breakpoint_at): Update handler type.
13144 (reinsert_breakpoint_handler): Return 1 instead of calling
13145 delete_breakpoint.
13146 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13147 setting a new one.
13148 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13149 * mem-break.h (set_breakpoint_at): Update handler type.
13150 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13151 * win32-low.c (auto_delete_breakpoint): New.
13152 (get_child_debug_event): Use it.
13153
13154 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13155
13156 * configure.ac: Check for pread and pwrite.
13157 * hostio.c (handle_pread): Fall back to lseek and read.
13158 (handle_pwrite): Fall back to lseek and write.
13159 * config.in, configure: Regenerated.
13160
13161 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13162
13163 * server.c (myresume): Add own_buf argument.
13164 (main): Update calls.
13165
13166 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13167
13168 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13169 * remote-utils.c (remote_open): Do not call disable_async_io.
13170 (block_async_io): Delete.
13171 (unblock_async_io): Make static.
13172 (initialize_async_io): New.
13173 * server.c (handle_v_cont): Handle async I/O here.
13174 (myresume): Likewise. Move other common resume tasks here...
13175 (main): ... from here. Call initialize_async_io. Disable async
13176 I/O before the main loop.
13177 * server.h (initialize_async_io): Declare.
13178 (block_async_io, unblock_async_io): Delete prototypes.
13179 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13180
13181 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13182
13183 * remote-utils.c (readchar): Allow binary data in received messages.
13184
13185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13186
13187 * win32-low.c (attaching): New global.
13188 (win32_create_inferior): Clear the `attaching' global.
13189 (win32_attach): Set the `attaching' global.
13190 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13191 attaching. Only set a breakpoint at the entry point if not
13192 attaching.
13193
13194 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13195
13196 * server.c (main): Don't report dll events on the initial
13197 connection on attaches.
13198
13199 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13200
13201 * server.c (main): Relax numerical bases supported for the pid of
13202 the --attach command line argument.
13203
13204 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13205
13206 * win32-low.c (win32_attach): Call OpenProcess before
13207 DebugActiveProcess, not after. Add last error output to error
13208 call.
13209
13210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13211
13212 * win32-low.c (win32_get_thread_context)
13213 (win32_set_thread_context): New functions.
13214 (thread_rec): Use win32_get_thread_context.
13215 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13216 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13217 field.
13218
13219 2007-12-03 Leo Zayas
13220 Pedro Alves <pedro_alves@portugalmail.pt>
13221
13222 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13223 global variables.
13224 (child_add_thread): Minor cleanup.
13225 (child_continue): Resume artificially suspended threads before
13226 calling ContinueDebugEvent.
13227 (suspend_one_thread): New.
13228 (fake_breakpoint_event): New.
13229 (get_child_debug_event): Change return type to int. Check here if
13230 gdb sent an interrupt request. If a soft interrupt was requested,
13231 fake a breakpoint event. Return 0 if there is no event to handle,
13232 and 1 otherwise.
13233 (win32_wait): Don't check here if gdb sent an interrupt request.
13234 Ensure there is a valid event to handle.
13235 (win32_request_interrupt): Add soft interruption method as last
13236 resort.
13237
13238 2007-12-03 Leo Zayas
13239 Pedro Alves <pedro_alves@portugalmail.pt>
13240
13241 * win32-low.h (win32_thread_info): Add descriptions to the
13242 structure members. Replace `suspend_count' counter by a
13243 `suspended' flag.
13244 * win32-low.c (thread_rec): Update condition of when to get the
13245 context from the inferior. Rely on ContextFlags being set if it
13246 has already been retrieved. Only suspend the inferior thread if
13247 we haven't already. Warn if that fails.
13248 (continue_one_thread): s/suspend_count/suspended/. Only call
13249 ResumeThread once. Warn if that fails.
13250
13251 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13252
13253 * win32-low.c (win32_wait): Don't read from the inferior when it
13254 has already exited.
13255
13256 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13257
13258 * Makefile.in (win32_low_h): New variable.
13259 (win32-low.o): Add dependency on $(win32_low_h).
13260 (win32-arm-low.o, win32-i386-low.o): New rules.
13261
13262 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13263
13264 * hostio.c: Correct copyright year.
13265
13266 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * Makefile.in (OBS): Add hostio.o.
13269 (hostio.o): New rule.
13270 * server.h (handle_vFile): Declare.
13271 * hostio.c: New file.
13272 * server.c (handle_v_requests): Take packet_len and new_packet_len
13273 for binary packets. Call handle_vFile.
13274 (main): Update call to handle_v_requests.
13275
13276 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13277
13278 * linux-low.c: Include <sched.h>.
13279
13280 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * linux-low.c (linux_tracefork_grandchild): New.
13283 (linux_tracefork_child): Use clone.
13284 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13285
13286 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13287
13288 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13289
13290 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13291
13292 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13293
13294 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13295
13296 * inferiors.c (change_inferior_id): Delete.
13297 (add_pid_to_list, pull_pid_from_list): New.
13298 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13299 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13300 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13301 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13302 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13303 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13304 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13305 (using_threads): Always set to 1.
13306 (handle_extended_wait): New.
13307 (add_process): Do not set TID.
13308 (linux_create_inferior): Set must_set_ptrace_flags.
13309 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13310 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13311 (linux_thread_alive): Rename TID argument to LWPID.
13312 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13313 (linux_wait_for_event): Do not use TID or check using_threads. Update
13314 call to dead_thread_notify. Call handle_extended_wait.
13315 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13316 (send_sigstop): Delete sigstop_sent.
13317 (wait_for_sigstop): Avoid TID.
13318 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13319 (linux_test_for_tracefork): New.
13320 (linux_lookup_signals): Use thread_db_active and
13321 linux_supports_tracefork_flag.
13322 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13323 * linux-low.h (get_process_thread): Avoid TID.
13324 (struct process_ifo): Move thread_known and tid to the end. Remove
13325 sigstop_sent.
13326 (linux_attach_lwp, thread_db_init): Update prototypes.
13327 * server.h (change_inferior_id): Delete prototype.
13328 (add_pid_to_list, pull_pid_from_list): New prototypes.
13329 * thread-db.c (thread_db_use_events): New.
13330 (find_first_thread): Rename to...
13331 (find_one_thread): ...this. Update callers and messages. Do not
13332 call fatal. Check thread_db_use_events. Do not call
13333 change_inferior_id or new_thread_notify.
13334 (maybe_attach_thread): Update. Do not call new_thread_notify.
13335 (thread_db_init): Set thread_db_use_events. Check use_events.
13336 * utils.c (fatal, warning): Correct message prefix.
13337
13338 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13339
13340 * Makefile.in (clean): Remove new files.
13341 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13342 (powerpc-64.o, powerpc-64.c): New rules.
13343 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13344 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13345 with SPE.
13346 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13347 SPE targets.
13348 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13349 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13350 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13351 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13352 (target_regsets): Add AltiVec and SPE register sets.
13353 * configure.ac: Check for AltiVec and SPE.
13354 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13355 (ppc_fill_vrregset, ppc_store_vrregset): New.
13356 (target_regsets): Add AltiVec register set.
13357 * configure: Regenerated.
13358
13359 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13360
13361 * linux-low.c (O_LARGEFILE): Define.
13362 (linux_read_memory): Use /proc/PID/mem.
13363 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13364 * configure, config.in: Regenerated.
13365
13366 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13367
13368 * linux-low.c (linux_wait_for_event): Do not pass signals while
13369 single-stepping.
13370
13371 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13372
13373 * win32-low.c (create_process): New.
13374 (win32_create_inferior): Use create_process instead of
13375 CreateProcess. If create_process failed retry appending an ".exe"
13376 suffix. Store the GetLastError result immediatelly after
13377 create_process calls and use it on the call to error.
13378
13379 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13380
13381 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13382
13383 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13384
13385 * configure.ac: Switch license to GPLv3.
13386
13387 2007-08-01 Michael Snyder <msnyder@access-company.com>
13388
13389 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13390
13391 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13392
13393 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13394 typedef.
13395 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13396 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13397 CloseToolhelp32Snapshot.
13398 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13399 CloseToolhelp32Snapshot.
13400
13401 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13402
13403 * server.c (main): Check for inferior exit before main loop.
13404
13405 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13406
13407 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13408 instead of on tmp_desc.
13409
13410 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13411 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13414 (add_thread): Minor cleanups.
13415 (clear_inferiors): Move lower in the file. Clear the DLL
13416 list.
13417 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13418 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13419 (xml_escape_text): New.
13420 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13421 for qSupported.
13422 (handle_v_cont): Report errors.
13423 (gdbserver_version): Update.
13424 (main): Correct size of own_buf. Do not report initial DLL events.
13425 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13426 (unloaded_dll, xml_escape_text): New.
13427 * win32-low.c (enum target_waitkind): Update comments.
13428 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13429 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13430 (win32_EnumProcessModules, win32_GetModuleInformation)
13431 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13432 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13433 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13434 (win32_Module32First, win32_Module32Next, load_toolhelp)
13435 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13436 (get_child_debug_event): Handle DLL events.
13437 (win32_wait): Likewise.
13438
13439 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13440
13441 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13442 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13443
13444 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * win32-low.c (handle_output_debug_string): Ignore event if not
13447 waiting.
13448
13449 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13450
13451 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13452
13453 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13454
13455 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13456
13457 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13458
13459 * inferiors.c (change_inferior_id): Add comment.
13460 * linux-low.c (check_removed_breakpoint): Add an early
13461 prototype. Improve debug output.
13462 (linux_attach): Doc update.
13463 (linux_detach_one_process, linux_detach): Clean up before releasing
13464 each process.
13465 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13466 * linux-low.h (struct process_info): Doc improvement.
13467 * mem-break.c (delete_all_breakpoints): New.
13468 * mem-break.h (delete_all_breakpoints): New prototype.
13469 * thread-db.c (find_first_thread): New.
13470 (thread_db_create_event): Call it instead of
13471 thread_db_find_new_threads. Clean up unused variables.
13472 (maybe_attach_thread): Remove first thread handling.
13473 (thread_db_find_new_threads): Use find_first_thread.
13474 (thread_db_get_tls_address): Likewise.
13475
13476 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13477
13478 * thread-db.c (thread_db_find_new_threads): Add prototype.
13479 (thread_db_create_event): Check for the main thread before adding
13480 a new thread.
13481 (maybe_attach_thread): Only enable event reporting if TID == 0.
13482 (thread_db_get_tls_address): Check for new threads.
13483
13484 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13485
13486 * linux-low.c (linux_create_inferior): Try execv before execvp.
13487 * spu-low.c (spu_create_inferior): Likewise.
13488
13489 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13490
13491 * linux-low.c (linux_create_inferior): Change execv to execvp.
13492 * spu-low.c (spu_create_inferior): Likewies.
13493
13494 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13495
13496 * Makefile.in (clean): Clean new files instead of deleted ones.
13497 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13498 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13499 rules.
13500 * configure.srv: Specify XML files and new regformats for MIPS and
13501 MIPS64 GNU/Linux.
13502 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13503 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13504 an entry for the restart register.
13505 (mips_cannot_fetch_register, mips_cannot_store_register)
13506 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13507 register names to match the XML descriptions.
13508 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13509 restart register instead of $0.
13510
13511 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13512 Markus Deuling <deuling@de.ibm.com>
13513
13514 * remote-utils.c (decode_xfer_write): New function.
13515 * server.h (decode_xfer_write): Add prototype.
13516 * server.c (handle_query): Add PACKET_LEN argument. Support
13517 qXfer:spu:read and qXfer:spu:write packets.
13518 (main): Pass packet_len to handle_query.
13519 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13520 * target.h (target_ops): Add qxfer_spu.
13521
13522 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13523
13524 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13525 accessing non-seekable spufs files.
13526
13527 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13528
13529 * server.c (handle_query): Add reply for qC packet.
13530
13531 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13532 Leo Zayas <lerele@champenstudios@com>
13533
13534 * server.h (check_remote_input_interrupt_request): New function.
13535 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13536 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13537 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13538 (check_remote_input_interrupt_request): New function.
13539 * server.h (check_remote_input_interrupt_request): Declare.
13540 * win32-low.c (winapi_DebugBreakProcess,
13541 winapi_GenerateConsoleCtrlEvent): New typedefs.
13542 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13543 to 250 ms.
13544 (win32_wait): Check for remote interrupt request
13545 with check_remote_input_interrupt_request.
13546 (win32_request_interrupt): New function.
13547 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13548
13549 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13550
13551 * win32-low.c (debug_registers_changed,
13552 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13553 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13554 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13555 (thread_rec): Get context using the low target.
13556 (child_add_thread): Call thread_added on the low target,
13557 which does the same thing.
13558 (regptr): Delete.
13559 (do_initial_child_stuff): Remove debug registers references.
13560 Set context using the low target. Resume threads after
13561 setting the contexts.
13562 (child_continue): Remove dead variable. Remove debug
13563 registers references.
13564 (child_fetch_inferior_registers): Go through the low target.
13565 (do_child_store_inferior_registers): Remove.
13566 (child_store_inferior_registers): Go through the low target.
13567 (win32_resume): Remove debug registers references.
13568 Set context using the low target.
13569 (handle_exception): Change return type to void. Don't record
13570 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13571 first chance exception.
13572 (get_child_debug_event): Change return type to void. Remove
13573 goto loop. Always return after waiting for debug event.
13574 (win32_wait): Convert to switch statement. Handle spurious
13575 events.
13576
13577 * win32-i386-low.c (debug_registers_changed,
13578 debug_registers_used): New.
13579 (initial_stuff): Rename to ...
13580 (i386_initial_stuff): ... this. Clear debug registers
13581 state variables.
13582 (store_debug_registers): Delete.
13583 (i386_get_thread_context): New.
13584 (load_debug_registers): Delete.
13585 (i386_set_thread_context): New.
13586 (i386_thread_added): New.
13587 (single_step): Rename to ...
13588 (i386_single_step): ... this.
13589 (do_fetch_inferior_registers): Rename to ...
13590 (i386_fetch_inferior_register): ... this.
13591 (i386_store_inferior_register): New.
13592 (the_low_target): Adapt to new interface.
13593
13594 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13595 (arm_get_thread_context): New.
13596 (arm_set_thread_context): New.
13597 (regptr): New.
13598 (do_fetch_inferior_registers): Rename to ...
13599 (arm_fetch_inferior_register): ... this.
13600 (arm_store_inferior_register): New.
13601 (arm_wince_breakpoint): Reimplement as unsigned long.
13602 (arm_wince_breakpoint_len): Define.
13603 (the_low_target): Adapt to new interface.
13604
13605 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13606 load_debug_registers. Add get_thread_context, set_thread_context,
13607 thread_added and store_inferior_register. Rename
13608 fetch_inferior_registers to fetch_inferior_register.
13609 (regptr): Remove declaration.
13610
13611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13612
13613 * linux-low.c (linux_detach): Change return type to int. Return 0.
13614 * spu-low.c (spu_detach): Likewise.
13615
13616 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13617
13618 * target.h (target_ops): Change return type of detach to int.
13619 Add join.
13620 (join_inferior): New.
13621 * server.c (main): Don't skip detach support on mingw32.
13622 If the inferior doesn't support detaching return error.
13623 Call join_inferior instead of using waitpid.
13624 * linux-low.c (linux_join): New.
13625 (linux_target_op): Add linux_join.
13626 * spu-low.c (spu_join): New.
13627 (spu_target_ops): Add spu_join.
13628 * win32-low.c (win32_detach): Adapt to new interface.
13629 Reopen current_process_handle before detaching. Issue a child
13630 resume before detaching.
13631 (win32_join): New.
13632 (win32_target_op): Add win32_join.
13633
13634 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13635
13636 * win32-low.c (win32-attach): Fix return value.
13637 * target.h (target_ops): Describe ATTACH return values.
13638
13639 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13640
13641 * win32-low.c (GETPROCADDRESS): Define.
13642 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13643 (winapi_DebugSetProcessKillOnExit): Likewise.
13644 (win32_create_inferior): Force usage of ansi CreateProcessA.
13645 (win32_attach): Use GETPROCADDRESS.
13646 (win32_detach): Likewise.
13647
13648 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13649
13650 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13651
13652 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13653
13654 * win32-low.c: Commit leftover changes from 2007-03-29.
13655
13656 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13657
13658 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13659 fields short instead of int. Add explicit padding.
13660 (i387_cache_to_fsave): Remove unnecessary casts.
13661 (i387_fsave_to_cache): Doc fix.
13662 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13663
13664 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13667 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13668
13669 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13670
13671 * configure.srv (arm*-*-mingw32ce*): Move near the other
13672 arm targets.
13673
13674 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13675
13676 * configure.ac: Add errno checking.
13677 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13678 sys/file.h and malloc.h.
13679 (AC_CHECK_DECLS): Add perror.
13680 (srv_mingwce): Handle.
13681 * configure.srv (i[34567]86-*-cygwin*): Add
13682 win32-i386-low.o to srv_tgtobj.
13683 (i[34567]86-*-mingw*): Likewise.
13684 (arm*-*-mingw32ce*): Add case.
13685 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13686 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13687 [__MINGW32CE__] (strerror): New function.
13688 [__MINGW32CE__] (errno): Define to GetLastError.
13689 [__MINGW32CE__] (COUNTOF): New macro.
13690 (remote_open): Remove extra close call.
13691 * mem-break.c (delete_breakpoint_at): New function.
13692 * mem-break.h (delete_breakpoint_at): Declare.
13693 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13694 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13695 [USE_WIN32API] (read, write): Add char* casts.
13696 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13697 * server.h: Include wincecompat.h on Windows CE.
13698 [HAVE_ERRNO_H]: Check.
13699 (perror): Declare if not declared.
13700 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13701 (perror_with_name): Remove errno declaration.
13702 * wincecompat.h: New.
13703 * wincecompat.c: New.
13704 * win32-low.h: New.
13705 * win32-arm-low.c: New.
13706 * win32-i386-low.c: New.
13707 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13708 (OUTMSG2): Make it safe.
13709 (_T): New macro.
13710 (COUNTOF): New macro.
13711 (NUM_REGS): Get it from the low target.
13712 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13713 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13714 (thread_rec): Let low target handle debug registers.
13715 (child_add_thread): Likewise.
13716 (child_init_thread_list): Likewise.
13717 (continue_one_thread): Likewise.
13718 (regptr): New.
13719 (do_child_fetch_inferior_registers): Move to ...
13720 * win32-i386-low.c: ... here, and rename to ...
13721 (do_fetch_inferior_registers): ... this.
13722 * win32-low.c (child_fetch_inferior_registers):
13723 Go through the low target.
13724 (do_child_store_inferior_registers): Use regptr.
13725 (strwinerror): New function.
13726 (win32_create_inferior): Handle Windows CE.
13727 Use strwinerror instead of strerror on Windows error
13728 codes. Add program to the error output.
13729 Don't close the main thread handle on Windows CE.
13730 (win32_attach): Use coredll.dll on Windows CE.
13731 (win32_kill): Close current process and current
13732 thread handles.
13733 (win32_detach): Use coredll.dll on Windows CE.
13734 (win32_resume): Let low target handle debug registers, and
13735 step request.
13736 (handle_exception): Add/Remove initial breakpoint. Avoid
13737 non-existant WSTOPSIG on Windows CE.
13738 (win32_read_inferior_memory): Cast to remove warning.
13739 (win32_arch_string): Go through the low target.
13740 (initialize_low): Call set_breakpoint_data with the low
13741 target's breakpoint.
13742 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13743 FOP_REGNUM, mappings): Move to ...
13744 * win32-i386-low.c: ... here.
13745 * win32-low.c (win32_thread_info): Move to ...
13746 * win32-low.h: ... here.
13747 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13748 win32-arm-low.c and wincecompat.c.
13749 (all:): Add $EXEEXT.
13750 (install-only:): Likewise.
13751 (gdbserver:): Likewise.
13752 (gdbreplay:): Likewise.
13753 * config.in: Regenerate.
13754 * configure: Regenerate.
13755
13756 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13757
13758 * win32-low.c: Rename typedef thread_info to
13759 win32_thread_info throughout.
13760
13761 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13762
13763 * win32-i386-low.c: Rename to ...
13764 * win32-low.c: ... this.
13765 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13766 * Makefile.in: Likewise.
13767
13768 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13769
13770 * remote-utils.c (monitor_output): Constify msg parameter.
13771 * server.h (monitor_output): Likewise.
13772 * win32-i386-low.c (handle_output_debug_string): New.
13773 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13774 handle_output_debug_string.
13775 (get_child_debug_event): Likewise.
13776
13777 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13778
13779 * server.c (main): Correct strtoul check.
13780
13781 2007-03-27 Jon Ringle <jon@ringle.org>
13782
13783 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13784
13785 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13786
13787 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13788
13789 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13790
13791 * terminal.h: Check HAVE_SGTTY_H.
13792
13793 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13794
13795 * remote-utils.c (remote_open): Print out the assigned port number.
13796
13797 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * remote-utils.c (monitor_output): New function.
13800 * server.c (debug_threads): Define here.
13801 (monitor_show_help): New function.
13802 (handle_query): Handle qRcmd.
13803 (main): Do not handle 'd' packet.
13804 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13805 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13806 of debug_threads.
13807
13808 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13809
13810 * Makefile.in (EXEEXT): New.
13811 (clean): Use $(EXEEXT).
13812
13813 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13814
13815 * target.h (target_ops): Rename send_signal to request_interrupt,
13816 and remove enum target_signal parameter.
13817 * linux-low.c (linux_request_interrupt): Rename from
13818 linux_send_signal, and always send SIGINT.
13819 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13820 and always send SIGINT.
13821 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13822 of send_signal.
13823 (input_interrupt): Likewise.
13824
13825 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13826
13827 * server.c (get_features_xml): Check if target implemented
13828 arch_string.
13829 * win32-i386-low.c (win32_arch_string): New.
13830 (win32_target_ops): Add win32_arch_string as arch_string member.
13831
13832 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13833
13834 * spu-low.c (spu_arch_string): New.
13835 (spu_target_ops): Add spu_arch_string.
13836
13837 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13840 * configure.ac: Do not check for terminal.h.
13841 * configure, config.in: Regenerated.
13842
13843 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13844
13845 * Makefile.in (OBS): Add $(XML_BUILTIN).
13846 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13847 (clean): Update.
13848 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13849 (arm-with-iwmmxt.c): New.
13850 * config.in, configure: Regenerate.
13851 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13852 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13853 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13854 (arm*-*-linux*): Add iWMMXt and regset support.
13855 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13856 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13857 (arm_store_wmmxregset, target_regsets): New.
13858 * server.c (get_features_xml): Take annex argument. Check builtin
13859 XML documents.
13860 (handle_query): Handle multiple annexes.
13861
13862 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * remote-utils.c [USE_WIN32API] (read, write): Define.
13865 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13866 write.
13867
13868 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13869
13870 * linux-i386-low.c (the_low_target): Set arch_string.
13871 * linux-x86-64-low.c (the_low_target): Likewise.
13872 * linux-low.c (linux_arch_string): New.
13873 (linux_target_ops): Add it.
13874 * linux-low.h (struct linux_target_ops): Add arch_string.
13875 * server.c (write_qxfer_response): Use const void * for DATA.
13876 (get_features_xml): New.
13877 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13878 * target.h (struct target_ops): Add arch_string method.
13879
13880 2007-01-03 Denis Pilat <denis.pilat@st.com>
13881 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * linux-low.c (linux_kill): Handle being called with no threads.
13884 * win32-i386-low.c (win32_kill): Likewise.
13885 (get_child_debug_event): Clear current_process_handle.
13886
13887 2006-12-30 Denis PILAT <denis.pilat@st.com>
13888 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * remote-utils.c (remote_open): Check the type of specified
13891 serial port devices before opening them.
13892 * server.c (main): Kill the inferior if an error occurs during
13893 the first remote_open.
13894
13895 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13896
13897 * README: Update supported targets.
13898
13899 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * Makefile.in (clean): Remove reg-mips64.c.
13902 (reg-mips64.c, reg-mips64.o): New rules.
13903 * configure.srv: Handle mips64. Include regset support for mips.
13904 * linux-mips-low.c (union mips_register): New.
13905 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13906 (mips_breakpoint, mips_breakpoint_at): Use int.
13907 (mips_collect_register, mips_supply_register)
13908 (mips_collect_register_32bit, mips_supply_register_32bit)
13909 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13910 (mips_store_fpregset, target_regsets): New.
13911 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13912
13913 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13914
13915 * configure.srv: Add target "spu*-*-*".
13916 * Makefile.in (clean): Remove reg-spu.c.
13917 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13918 * spu-low.c: New file.
13919
13920 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * configure.ac: Correct td_thr_tls_get_addr test.
13923 * configure: Regenerated.
13924
13925 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * linux-low.c (linux_wait_for_event): Reformat. Use the
13928 pass_signals array.
13929 * remote-utils.c (decode_address_to_semicolon): New.
13930 * server.c (pass_signals, handle_general_set): New.
13931 (handle_query): Mention QPassSignals for qSupported.
13932 (main): Call handle_general_set.
13933 * server.h (pass_signals, decode_address_to_semicolon): New.
13934
13935 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13936
13937 * server.c (handle_query): Correct error handling for read_auxv.
13938
13939 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13940
13941 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13942 and srv_linux_thread_db to yes.
13943 * linux-s390-low.c (s390_fill_gregset): New function.
13944 (target_regsets): Define data structure.
13945
13946 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13949 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13950 * config.in, configure: Regenerated.
13951 * inferiors.c (gdb_id_to_thread): New function.
13952 (gdb_id_to_thread_id): Use it.
13953 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13954 * linux-low.h (struct process_info): Add th member.
13955 (thread_db_get_tls_address): New prototype.
13956 * remote-utils.c (decode_address): Make non-static.
13957 * server.c (handle_query): Handle qGetTLSAddr.
13958 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13959 * target.h (struct target_ops): Add get_tls_address.
13960 * thread-db.c (maybe_attach_thread): Save the thread handle.
13961 (thread_db_get_tls_address): New.
13962
13963 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13964
13965 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13966 (linux_resume_one_process): Take a siginfo_t *. Update all
13967 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13968 (struct pending_signals): Add a siginfo_t.
13969 (linux_wait_for_process): Always set last_status.
13970 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13971 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13972 * linux-low.h (struct process_info): Add last_status.
13973
13974 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * remote-utils.c (try_rle): New function.
13977 (putpkt_binary): Use it.
13978
13979 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13982 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13983 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13984 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13985 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13986 point registers.
13987
13988 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13989
13990 * server.c (terminal_fd): New variable.
13991 (old_foreground_pgrp): Likewise.
13992 (restore_old_foreground_pgrp): New function.
13993 (start_inferior): Record the terminal file descriptor in terminal_fd
13994 and its original foreground group in old_foreground_pgrp. Register
13995 restore_old_foreground_pgrp with atexit().
13996
13997 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13998
13999 * server.c (handle_query): Correct qPart to qXfer.
14000
14001 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14002
14003 * configure.ac: Check for more headers which are missing on
14004 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14005 * configure.srv: Add Cygwin and mingw32.
14006 * remote-utils.c: Don't include headers unconditionally which
14007 are missing on mingw32. Include <winsock.h> for mingw32.
14008 (remote_open): Adjust for mingw32 support. Flush
14009 standard error after writing to it.
14010 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14011 (unblock_async_io, enable_async_io, disable_async_io)
14012 (readchar, getpkt): Update for Winsock support.
14013 (prepare_resume_reply): Expect a protocol signal number.
14014 * server.c: Disable <sys/wait.h> on mingw32.
14015 (start_inferior): Adjust for mingw32 support. Flush
14016 standard error after writing to it.
14017 (attach_inferior): Likewise. Use protocol signal
14018 numbers.
14019 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14020 and names.
14021 * win32-i386-low.c: New file.
14022 * Makefile.in (XM_CLIBS): Set.
14023 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14024 (win32-i386-low.o): New dependency rule.
14025 * linux-low.c (linux_wait): Use target signal numbers.
14026 * target.h (struct target_ops): Doc fix.
14027 * server.h (target_signal_to_name): New prototype.
14028 * gdbreplay.c: Don't include headers unconditionally which
14029 are missing on mingw32. Include <winsock.h> for mingw32.
14030 (remote_close, remote_open): Adjust for Winsock support.
14031 * configure, config.in: Regenerated.
14032
14033 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * server.c (decode_xfer_read, write_qxfer_response): New.
14036 (handle_query): Take a packet length argument. Handle
14037 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14038 the qSupported response.
14039 (main): Update call to handle_query.
14040
14041 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14044 (putpkt_binary): Renamed from putpkt and adjusted for binary
14045 data.
14046 (putpkt): New wrapper for putpkt_binary.
14047 (readchar): Don't mask off the high bit.
14048 (decode_X_packet): New function.
14049 * server.c (main): Call putpkt_binary if a handler sets the packet
14050 length. Save the length of the incoming packet. Handle 'X'.
14051 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14052
14053 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * server.c (handle_query): Handle qSupported.
14056
14057 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * remote-utils.c (all_symbols_looked_up): New variable.
14060 (look_up_one_symbol): Check it.
14061 * server.h (look_up_one_symbol): New declaration.
14062 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14063
14064 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14065
14066 * Makefile.in (linux-arm-low.o): Update dependencies.
14067 * linux-arm-low.c: Include "gdb_proc_service.h".
14068 (PTRACE_GET_THREAD_AREA): Define.
14069 (ps_get_thread_area): New function.
14070
14071 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14072
14073 * configure.srv (m68k*-*-uclinux*): New target.
14074 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14075 (linux_resume_one_process): Remove extraneous cast.
14076 (linux_read_offsets): New.
14077 (linux_target_op): Add linux_read_offsets on mmuless systems.
14078 * server.c (handle_query): Add qOffsets logic.
14079 * target.h (struct target_ops): Add read_offsets.
14080
14081 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14084 (PTRACE_GET_THREAD_AREA): Define.
14085 (ps_get_thread_area): New function.
14086 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14087 (linux-x86-64-low.o): Update.
14088
14089 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * configure.ac: Remove checks for prfpregset_t.
14092 * gdb_proc_service.h: New file.
14093 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14094 new "gdb_proc_service.h".
14095 * proc-service.c: Likewise.
14096 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14097 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14098 * Makefile.in (gdb_proc_service_h): Updated.
14099 * configure, config.in: Regenerated.
14100
14101 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * remote-utils.c (prepare_resume_reply): Move declaration
14104 of gdb_id_from_wait to the top of the block.
14105
14106 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14107
14108 * linux-low.c (regsets_store_inferior_registers): Read the regset
14109 from the target before filling it.
14110
14111 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14112
14113 * server.c (attach_inferior): Return SIGTRAP for a successful
14114 attach.
14115
14116 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14117
14118 * Makefile.in (OBS): Add version.o.
14119 (STAGESTUFF): Delete.
14120 (version.o): Add dependencies.
14121 (version.c): Replace rule.
14122 (clean): Remove version.c.
14123 * server.c (gdbserver_version): New.
14124 (gdbserver_usage): Use printf.
14125 (main): Handle --version and --help.
14126 * server.h (version, host_name): Add declarations.
14127
14128 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14129
14130 * linux-arm-low.c:
14131 * linux-arm-low.c:
14132 * inferiors.c:
14133 * i387-fp.h:
14134 * i387-fp.c:
14135 * gdbreplay.c:
14136 * regcache.c:
14137 * proc-service.c:
14138 * mem-break.h:
14139 * mem-break.c:
14140 * linux-x86-64-low.c:
14141 * linux-sh-low.c:
14142 * linux-s390-low.c:
14143 * linux-ppc64-low.c:
14144 * linux-ppc-low.c:
14145 * linux-mips-low.c:
14146 * linux-m68k-low.c:
14147 * linux-m32r-low.c:
14148 * linux-low.h:
14149 * linux-low.c:
14150 * linux-ia64-low.c:
14151 * linux-i386-low.c:
14152 * linux-crisv32-low.c:
14153 * thread-db.c:
14154 * terminal.h:
14155 * target.h:
14156 * target.c:
14157 * server.h:
14158 * server.c:
14159 * remote-utils.c:
14160 * regcache.h:
14161 * utils.c:
14162 * Makefile.in:
14163 * configure.ac:
14164 * gdbserver.1: Add (C) after Copyright. Update the FSF
14165 address.
14166
14167 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14170 (arm_breakpoint_at): Recognize both breakpoints.
14171 (the_low_target): Use the correct breakpoint instruction.
14172
14173 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14176 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14177 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14178 (the_low_target): Update.
14179
14180 2005-10-25 Andreas Schwab <schwab@suse.de>
14181
14182 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14183
14184 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14185 (ia64_num_regs): Reduce to 462.
14186
14187 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * acinclude.m4: Correct quoting.
14190 * aclocal.m4: Regenerated.
14191
14192 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14193 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14194 (thread_db_init): Call thread_db_err_str.
14195 * configure.ac: Check for TD_VERSION.
14196 * config.in, configure: Regenerated.
14197
14198 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14199
14200 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14201
14202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14205 is not available. Define HAVE_PTRACE_GETREGS if it is.
14206 * config.in, configure: Regenerated.
14207 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14208 * linux-i386-low.c, linux-m68k-low.c: Update to use
14209 HAVE_PTRACE_GETREGS.
14210 * linux-low.c (regsets_fetch_inferior_registers)
14211 (regsets_store_inferior_registers): Only return 0 if we processed
14212 GENERAL_REGS.
14213 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14214 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14215
14216 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14217
14218 * inferiors.c (struct thread_info): Add gdb_id.
14219 (add_thread): Add gdb_id argument.
14220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14221 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14222 calls to add_thread.
14223 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14224 * server.c (handle_query): Use thread_to_gdb_id.
14225 (handle_v_cont, main): Use gdb_id_to_thread_id.
14226 * server.h (add_thread): Update prototype.
14227 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14228 prototypes.
14229
14230 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14233 left-padded registers.
14234 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14235 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14236
14237 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14238
14239 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14240 * configure: Regenerate.
14241 * config.in: Regenerate.
14242 * server.h (NEED_DECLARATION_STRERROR):
14243 Replace with !HAVE_DECL_STRERROR.
14244
14245 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * linux-low.c (linux_wait, linux_send_signal): Don't test
14248 an unsigned long variable for > 0 if it could be MAX_ULONG.
14249 * server.c (myresume): Likewise.
14250 * target.c (set_desired_inferior): Likewise.
14251
14252 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14253
14254 * configure.ac: Simplify and improve check for socklen_t.
14255 * configure, config.in: Regenerate.
14256
14257 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * acconfig.h: Remove.
14260 * configure.ac: Add a test for socklen_t. Use three-argument
14261 AC_DEFINE throughout.
14262 * config.in: Regenerated using autoheader 2.59.
14263 * configure: Regenerated.
14264
14265 * gdbreplay.c (socklen_t): Provide a default.
14266 (remote_open): Use socklen_t.
14267 * remote-utils.c (socklen_t): Provide a default.
14268 (remote_open): Use socklen_t.
14269 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14270 unsigned char.
14271
14272 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14273 char for buffers.
14274 * linux-low.c (linux_read_memory, linux_write_memory)
14275 (linux_read_auxv): Likewise.
14276 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14277 (check_mem_write): Likewise.
14278 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14279 Likewise.
14280 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14281 (registers_from_string, register_data): Likewise.
14282 * server.c (handle_query, main): Likewise.
14283 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14284 (decode_M_packet): Likewise.
14285 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14286 * target.h (struct target_ops): Update read_memory, write_memory,
14287 and read_auxv.
14288 (read_inferior_memory, write_inferior_memory): Update.
14289 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14290 to unsigned char *.
14291 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14292 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14293 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14294 linux-s390-low.c, linux-sh-low.c: Update for changes in
14295 read_inferior_memory and the_low_target->breakpoint.
14296
14297 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14298
14299 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14300 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14301 * configure.srv: Add powerpc64-*-linux*.
14302 * linux-ppc64-low.c: New file.
14303
14304 2005-05-23 Orjan Friberg <orjanf@axis.com>
14305
14306 * linux-cris-low.c: New file with support for CRIS.
14307 * linux-crisv32-low.c: Ditto for CRISv32.
14308 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14309 (clean): Add reg-cris.c and reg-crisv32.c.
14310 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14311 reg-crisv32.o, and reg-crisv32.c to make rules.
14312 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14313 recognized targets.
14314
14315 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14316
14317 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14318 of sizeof (PTRACE_XFER_TYPE).
14319 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14320
14321 2005-05-12 Orjan Friberg <orjanf@axis.com>
14322
14323 * target.h (struct target_ops): Add insert_watchpoint,
14324 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14325 pointers for hardware watchpoint support.
14326 * linux-low.h (struct linux_target_ops): Ditto.
14327 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14328 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14329 to linux_target_ops.
14330 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14331 reply packet.
14332 * server.c (main): Recognize 'Z' and 'z' packets.
14333
14334 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14335
14336 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14337 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14338 (the_low_target): Add new members.
14339
14340 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14341
14342 * proc-service.c (ps_lgetregs): Search all_processes instead of
14343 all_threads.
14344
14345 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14346
14347 * server.c (start_inferior): Change return type to int.
14348 (attach_inferior): Change sigptr to int *.
14349 (handle_v_cont, handle_v_requests): Change signal to int *.
14350 (main): Change signal to int.
14351
14352 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14353
14354 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14355 * configure.srv: Add m32r*-*-linux*.
14356 * linux-m32r-low.c: New file.
14357
14358 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14359
14360 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14361
14362 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14365 Take unsigned long arguments for PIDs.
14366 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14367 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14368 (wait_for_sigstop, linux_resume_one_process)
14369 (regsets_fetch_inferior_registers, linux_send_signal)
14370 (linux_read_auxv): Likewise. Update the types of variables holding
14371 PIDs. Update format string specifiers.
14372 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14373 * remote-utils.c (prepare_resume_reply): Likewise.
14374 * server.c (cont_thread, general_thread, step_thread)
14375 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14376 unsigned long.
14377 (handle_query): Update format specifiers.
14378 (handle_v_cont, main): Use strtoul for thread IDs.
14379 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14380 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14381 (general_thread, step_thread, thread_from_wait)
14382 (old_thread_from_wait): Update.
14383 * target.h (struct thread_resume): Use unsigned long for THREAD.
14384 (struct target_ops): Use unsigned long for arguments to attach and
14385 thread_alive.
14386
14387 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * acinclude.m4: Include bfd/bfd.m4 directly.
14390 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14391 <agriffis@toolchain.org>.
14392 * aclocal.m4, configure: Regenerated.
14393
14394 2005-01-07 Andrew Cagney <cagney@gnu.org>
14395
14396 * configure.ac: Rename configure.in, require autoconf 2.59.
14397 * configure: Re-generate.
14398
14399 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14400
14401 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14402 LIBS when finished.
14403 * aclocal.m4: Regenerated.
14404 * configure: Regenerated.
14405
14406 2004-11-21 Andreas Schwab <schwab@suse.de>
14407
14408 * linux-m68k-low.c (m68k_num_gregs): Define.
14409 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14410 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14411 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14412 (m68k_breakpoint_at): New. Add to the_low_target.
14413
14414 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14415 srv_linux_thread_db to yes.
14416
14417 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14418
14419 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14420 (ARCH_SET_FS): Likewise.
14421 (ARCH_GET_FS): Likewise.
14422 (ARCH_GET_GS): Likewise.
14423
14424 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14425
14426 * linux-i386-low.c (ps_get_thread_area): New.
14427 * linux-x86-64-low.c (ps_get_thread_area): New.
14428 * linux-low.c: Include <sys/syscall.h>.
14429 (linux_kill_one_process): Don't kill the first thread here.
14430 (linux_kill): Kill the first thread here.
14431 (kill_lwp): New function.
14432 (send_sigstop, linux_send_signal): Use it.
14433 * proc-service.c: Clean up #ifdefs.
14434 (fpregset_info): Delete.
14435 (ps_lgetregs): Update and enable implementation.
14436 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14437 implementations.
14438 * remote-utils.c (struct sym_cache, symbol_cache): New.
14439 (input_interrupt): Print a clearer message.
14440 (async_io_enabled): New variable.
14441 (enable_async_io, disable_async_io): Use it. Update comments.
14442 (look_up_one_symbol): Use the symbol cache.
14443 * thread-db.c (thread_db_look_up_symbols): New function.
14444 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14445
14446 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14447
14448 * configure.in: Test for -rdynamic.
14449 * configure: Regenerated.
14450 * Makefile (INTERNAL_LDFLAGS): New.
14451 (gdbserver, gdbreplay): Use it.
14452
14453 2004-09-02 Andrew Cagney <cagney@gnu.org>
14454
14455 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14456
14457 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14458
14459 * linux-low.c (linux_wait): Clear all_processes list also.
14460
14461 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14462
14463 * linux-low.c: Include <errno.h>. Remove extern declaration of
14464 errno.
14465
14466 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14467
14468 * gdbreplay.c, server.h, utils.c: Update copyright years.
14469
14470 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14471
14472 * server.c (main): Print child status or termination signal from
14473 variable 'signal', not 'sig'.
14474
14475 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14476
14477 * linux-low.c (linux_read_memory): Change return type to
14478 int. Check for and return error from ptrace().
14479 * target.c (read_inferior_memory): Change return type to int. Pass
14480 back return status from the_target->read_memory().
14481 * target.h (struct target_ops): Adapt *read_memory() prototype.
14482 Update comment.
14483 (read_inferior_memory): Adapt prototype.
14484 * server.c (main): Return an error packet if
14485 read_inferior_memory() returns an error.
14486
14487 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14488
14489 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14490 Unify with other clean targets.
14491
14492 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14493
14494 * server.c (handle_v_cont): Call set_desired_inferior.
14495
14496 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14499
14500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14501
14502 * linux-low.c (linux_wait): Unblock async I/O.
14503 (linux_resume): Block and enable async I/O.
14504 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14505 * server.h (block_async_io, unblock_async_io): Add prototypes.
14506
14507 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14508
14509 * remote-utils.c (remote_open): Print a status notice after
14510 opening a TCP port.
14511 * server.c (attach_inferior): Print a status notice after
14512 attaching.
14513
14514 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14515
14516 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14517
14518 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14519
14520 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14521 error packet.
14522 * server.c, target.h: Update copyright years.
14523
14524 2004-02-25 Roland McGrath <roland@redhat.com>
14525
14526 * target.h (struct target_ops): New member `read_auxv'.
14527 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14528 * linux-low.c (linux_read_auxv): New function.
14529 (linux_target_ops): Initialize `read_auxv' member to that.
14530
14531 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14532
14533 Committed by Jim Blandy <jimb@redhat.com>.
14534
14535 * linux-s390-low.c (s390_num_regs): Update.
14536 (s390_regmap): Remove control registers. Use __s390x__ predefine
14537 instead of GPR_SIZE to distiguish s390 and s390x targets.
14538
14539 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14540
14541 * linux-low.c: Update copyright year.
14542 (check_removed_breakpoint): Clear pending_is_breakpoint.
14543 (linux_set_resume_request, linux_queue_one_thread)
14544 (resume_status_pending_p): New functions.
14545 (linux_continue_one_thread): Use process->resume.
14546 (linux_resume): Only resume threads if there are no pending events.
14547 * linux-low.h (struct process_info): Add resume request
14548 pointer.
14549
14550 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14551
14552 * regcache.c (new_register_cache): Clear the allocated register
14553 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14554
14555 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14556
14557 * linux-low.c (linux_resume): Take a struct thread_resume *
14558 argument.
14559 (linux_wait): Update call.
14560 (resume_ptr): New static variable.
14561 (linux_continue_one_thread): Renamed from
14562 linux_continue_one_process. Use resume_ptr.
14563 (linux_resume): Use linux_continue_one_thread.
14564 * server.c (handle_v_cont, handle_v_requests): New functions.
14565 (myresume): New function.
14566 (main): Handle 'v' case.
14567 * target.h (struct thread_resume): New type.
14568 (struct target_ops): Change argument of "resume" to struct
14569 thread_resume *.
14570 (myresume): Delete macro.
14571
14572 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14573
14574 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14575 (uninstall): Support DESTDIR.
14576
14577 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14578
14579 * configure.srv: Add xscale*linux copy of arm*linux entry.
14580
14581 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14582
14583 * linux-arm-low.c (arm_reinsert_addr): New function.
14584 (the_low_target): Add arm_reinsert_addr.
14585
14586 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14587
14588 * mem-break.c: Remove whitespace at end of file.
14589
14590 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14591
14592 * configure.in: Check whether we need to prototype strerror.
14593 * server.h: Optionally prototype strerror.
14594 * gdbreplay.c (perror_with_name): Use strerror.
14595 * linux-low.c (linux_attach_lwp): Use strerror.
14596 * utils.c (perror_with_name): Use strerror.
14597 * config.in, configure: Regenerated.
14598
14599 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14600
14601 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14602 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14603
14604 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14605
14606 * Makefile.in (SFILES): Update.
14607 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14608 low-sun3.c: Remove files.
14609
14610 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14611
14612 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14613 (linux_detach_one_process, linux_detach): New functions.
14614 (linux_target_ops): Add linux_detach.
14615 * server.c (main): Handle 'D' packet.
14616 * target.h (struct target_ops): Add "detach" member.
14617 (detach_inferior): Define.
14618
14619 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14620
14621 From Kelley Cook <kelleycook@wideopenwest.com>:
14622 * configure.srv: Accept i[34567]86 variants.
14623
14624 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14625
14626 * linux-low.c (linux_wait_for_event): Correct comment typos.
14627 (linux_resume_one_process): Call check_removed_breakpoint.
14628 (linux_send_signal): New function.
14629 (linux_target_ops): Add linux_send_signal.
14630 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14631 of kill.
14632 * target.h (struct target_ops): Add send_signal.
14633
14634 2003-05-29 Jim Blandy <jimb@redhat.com>
14635
14636 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14637 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14638 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14639 away part of the register's value.
14640
14641 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14642
14643 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14644 (linux_wait_for_event, linux_init_signals): Likewise.
14645
14646 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14647
14648 * configure.in: Check for stdlib.h.
14649 * configure: Regenerated.
14650 * config.in: Regenerated.
14651
14652 2003-01-04 Andreas Schwab <schwab@suse.de>
14653
14654 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14655
14656 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14657
14658 * Makefile.in: Remove obsolete code.
14659
14660 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14661
14662 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14663 defined(PT_FPR0_HI).
14664
14665 2002-11-17 Stuart Hughes <seh@zee2.com>
14666
14667 * linux-arm-low.c (arm_num_regs): Increase.
14668 (arm_regmap): Include status register.
14669
14670 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14671
14672 * linux-low.c (register_addr): Remove incorrect -1 check.
14673
14674 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14675
14676 * linux-low.c (linux_create_inferior): Call setpgid. Return
14677 the new PID.
14678 (unstopped_p, linux_signal_pid): Remove.
14679 (linux_target_ops): Remove linux_signal_pid.
14680 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14681 global instead of target method.
14682 * target.h (struct target_ops): Remove signal_pid. Update comment
14683 for create_inferior.
14684 * server.c (signal_pid): New variable.
14685 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14686 gdbserver. Set the child to be the foreground process group.
14687 (attach_inferior): Set signal_pid.
14688
14689 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14690
14691 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14692
14693 2002-08-20 Jim Blandy <jimb@redhat.com>
14694
14695 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14696 default for this.
14697
14698 2002-08-01 Andrew Cagney <cagney@redhat.com>
14699
14700 * Makefile.in: Make chill references obsolete.
14701
14702 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14703
14704 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14705 * configure: Regenerate.
14706 * config.in: Regenerate.
14707
14708 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14709
14710 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14711 (perror_with_name, remote_close, remote_open, expect, play): Static.
14712
14713 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14714
14715 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14716 byte offsets instead of an array of indexes.
14717 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14718
14719 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14720
14721 * regcache.c: Add comment.
14722
14723 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14724
14725 * thread-db.c: New file.
14726 * proc-service.c: New file.
14727 * acinclude.m4: New file.
14728 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14729 proc-service.o, and thread-db.o.
14730 (linux-low.o): Add USE_THREAD_DB.
14731 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14732 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14733 * aclocal.m4: Regenerated.
14734 * config.in: Regenerated.
14735 * configure: Regenerated.
14736 * configure.in: Check for proc_service.h, sys/procfs.h,
14737 thread_db.h, and linux/elf.h headrs.
14738 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14739 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14740 Check for -lthread_db and thread support.
14741 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14742 PowerPC, and SuperH.
14743 * i387-fp.c: Constify arguments.
14744 * i387-fp.h: Likewise.
14745 * inferiors.c: (struct thread_info): Renamed from
14746 `struct inferior_info'. Remove PID member. Use generic inferior
14747 list header. All uses updated.
14748 (inferiors, signal_pid): Removed.
14749 (all_threads): New variable.
14750 (get_thread): Define.
14751 (add_inferior_to_list): New function.
14752 (for_each_inferior): New function.
14753 (change_inferior_id): New function.
14754 (add_inferior): Removed.
14755 (remove_inferior): New function.
14756 (add_thread): New function.
14757 (free_one_thread): New function.
14758 (remove_thread): New function.
14759 (clear_inferiors): Use for_each_inferior and free_one_thread.
14760 (find_inferior): New function.
14761 (find_inferior_id): New function.
14762 (inferior_target_data): Update argument type.
14763 (set_inferior_target_data): Likewise.
14764 (inferior_regcache_data): Likewise.
14765 (set_inferior_regcache_data): Likewise.
14766 * linux-low.c (linux_bp_reinsert): Remove.
14767 (all_processes, stopping_threads, using_thrads)
14768 (struct pending_signals, debug_threads, pid_of): New.
14769 (inferior_pid): Replace with macro.
14770 (struct inferior_linux_data): Remove.
14771 (get_stop_pc, add_process): New functions.
14772 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14773 Use add_process and add_thread.
14774 (linux_attach_lwp): New function, based on old linux_attach. Use
14775 add_process and add_thread. Set stop_expected for new threads.
14776 (linux_attach): New function.
14777 (linux_kill_one_process): New function.
14778 (linux_kill): Kill all LWPs.
14779 (linux_thread_alive): Use find_inferior_id.
14780 (check_removed_breakpoints, status_pending_p): New functions.
14781 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14782 Update. Use WNOHANG. Wait for cloned processes also. Update process
14783 struct for the found process.
14784 (linux_wait_for_event): New function.
14785 (linux_wait): Use it. Support LWPs.
14786 (send_sigstop, wait_for_sigstop, stop_all_processes)
14787 (linux_resume_one_process, linux_continue_one_process): New functions.
14788 (linux_resume): Support LWPs.
14789 (REGISTER_RAW_SIZE): Remove.
14790 (fetch_register): Use register_size instead. Call supply_register.
14791 (usr_store_inferior_registers): Likewise. Call collect_register.
14792 Fix recursive case.
14793 (regsets_fetch_inferior_registers): Improve error message.
14794 (regsets_store_inferior_registers): Add debugging.
14795 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14796 (unstopped_p, linux_signal_pid): New functions.
14797 (linux_target_ops): Add linux_signal_pid.
14798 (linux_init_signals): New function.
14799 (initialize_low): Call it. Initialize using_threads.
14800 * regcache.c (inferior_regcache_data): Add valid
14801 flag.
14802 (get_regcache): Fetch registers lazily. Add fetch argument
14803 and update all callers.
14804 (regcache_invalidate_one, regcache_invalidate): New
14805 functions.
14806 (new_register_cache): Renamed from create_register_cache.
14807 Return the new regcache.
14808 (free_register_cache): Change argument to a void *.
14809 (registers_to_string, registers_from_string): Call get_regcache
14810 with fetch flag set.
14811 (register_data): Make static. Pass fetch flag to get_regcache.
14812 (supply_register): Call get_regcache with fetch flag clear.
14813 (collect_register): Call get_regcache with fetch flag set.
14814 (collect_register_as_string): New function.
14815 * regcache.h: Update.
14816 * remote-utils.c (putpkt): Flush after debug output and use
14817 stderr.
14818 Handle input interrupts while waiting for an ACK.
14819 (input_interrupt): Use signal_pid method.
14820 (getpkt): Flush after debug output and use stderr.
14821 (outreg): Use collect_register_as_string.
14822 (new_thread_notify, dead_thread_notify): New functions.
14823 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14824 and general_thread.
14825 (look_up_one_symbol): Flush after debug output.
14826 * server.c (step_thread, server_waiting): New variables.
14827 (start_inferior): Don't use signal_pid. Update call to mywait.
14828 (attach_inferior): Update call to mywait.
14829 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14830 (main): Don't fetch/store registers explicitly. Use
14831 set_desired_inferior. Support proposed ``Hs'' packet. Update
14832 calls to mywait.
14833 * server.h: Update.
14834 (struct inferior_list, struct_inferior_list_entry): New.
14835 * target.c (set_desired_inferior): New.
14836 (write_inferior_memory): Constify.
14837 (mywait): New function.
14838 * target.h: Update.
14839 (struct target_ops): New signal_pid method.
14840 (mywait): Removed macro, added prototype.
14841
14842 * linux-low.h (regset_func): Removed.
14843 (regset_fill_func, regset_store_func): New.
14844 (enum regset_type): New.
14845 (struct regset_info): Add type field. Use new operation types.
14846 (struct linux_target_ops): stop_pc renamed to get_pc.
14847 Add decr_pc_after_break and breakpoint_at.
14848 (get_process, get_thread_proess, get_process_thread)
14849 (strut process_info, all_processes, linux_attach_lwp)
14850 (thread_db_init): New.
14851
14852 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14853 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14854 (the_low_target): Add new members.
14855 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14856 (i386_store_fpxregset): Constify.
14857 (target_regsets): Add new kind identifier.
14858 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14859 (i386_set_pc): Add debugging.
14860 (i386_breakpoint_at): New function.
14861 (the_low_target): Add new members.
14862 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14863 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14864 (mips_breakpoint_at): New.
14865 (the_low_target): Add new members.
14866 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14867 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14868 (the_low_target): Add new members.
14869 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14870 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14871 (the_low_target): Add new members.
14872 * linux-x86-64-low.c (target_regsets): Add new kind
14873 identifier.
14874
14875 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14876
14877 From Martin Pool <mbp@samba.org>:
14878 * server.c (gdbserver_usage): New function.
14879 (main): Call it.
14880
14881 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14882
14883 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14884 stop_at -> stop_pc.
14885
14886 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14887
14888 * Makefile.in: Remove obsolete code.
14889
14890 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14891
14892 * linux-low.c (regsets_fetch_inferior_registers),
14893 (regsets_store_inferior_registers): Removed cast to int from
14894 ptrace() calls.
14895 * regcache.h: Added declaration of struct inferior_info.
14896
14897 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14898
14899 * inferiors.c (struct inferior_info): Add regcache_data.
14900 (add_inferior): Call create_register_cache.
14901 (clear_inferiors): Call free_register_cache.
14902 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14903 * regcache.c (struct inferior_regcache_data): New.
14904 (registers): Remove.
14905 (get_regcache): New function.
14906 (create_register_cache, free_register_cache): New functions.
14907 (set_register_cache): Don't initialize the register cache here.
14908 (registers_to_string, registers_from_string, register_data): Call
14909 get_regcache.
14910 * regcache.h: Add prototypes.
14911 * server.h: Likewise.
14912
14913 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14914
14915 * mem-break.c: New file.
14916 * mem-break.h: New file.
14917 * Makefile.in: Add mem-break.o rule; update server.h
14918 dependencies.
14919 * inferiors.c (struct inferior_info): Add target_data
14920 member.
14921 (clear_inferiors): Free target_data member if set.
14922 (inferior_target_data, set_inferior_target_data): New functions.
14923 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14924 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14925 * linux-low.c (linux_bp_reinsert): New variable.
14926 (struct inferior_linux_data): New.
14927 (linux_create_inferior): Use set_inferior_target_data.
14928 (linux_attach): Likewise. Call add_inferior.
14929 (linux_wait_for_one_inferior): New function.
14930 (linux_wait): Call it.
14931 (linux_write_memory): Add const.
14932 (initialize_low): Call set_breakpoint_data.
14933 * linux-low.h (struct linux_target_ops): Add breakpoint
14934 handling members.
14935 * server.c (attach_inferior): Remove extra add_inferior
14936 call.
14937 * server.h: Include mem-break.h. Update inferior.c
14938 prototypes.
14939 * target.c (read_inferior_memory)
14940 (write_inferior_memory): New functions.
14941 * target.h (read_inferior_memory)
14942 (write_inferior_memory): Change macros to prototypes.
14943 (struct target_ops): Update comments. Add const to write_memory
14944 definition.
14945
14946 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14947
14948 * linux-low.c (usr_store_inferior_registers): Support
14949 registers which are allowed to fail to store.
14950 * linux-low.h (linux_target_ops): Likewise.
14951 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14952 (ppc_cannot_store_register): FPSCR may not be storable.
14953
14954 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14955
14956 * server.h: Include <string.h> if HAVE_STRING_H.
14957 * ChangeLog: Correct paths in last ChangeLog entry.
14958
14959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14960
14961 * linux-low.h: Remove obsolete prototypes.
14962 (struct linux_target_ops): New.
14963 (extern the_low_target): New.
14964 * linux-low.c (num_regs, regmap): Remove declarations.
14965 (register_addr): Use the_low_target explicitly.
14966 (fetch_register): Likewise.
14967 (usr_fetch_inferior_registers): Likewise.
14968 (usr_store_inferior_registers): Likewise.
14969 * linux-arm-low.c (num_regs): Remove.
14970 (arm_num_regs): Define.
14971 (arm_regmap): Renamed from regmap, made static.
14972 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14973 made static.
14974 (arm_cannot_store_register): Renamed from cannot_store_register,
14975 made static.
14976 (the_low_target): New.
14977 * linux-i386-low.c (num_regs): Remove.
14978 (i386_num_regs): Define.
14979 (i386_regmap): Renamed from regmap, made static.
14980 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14981 made static.
14982 (i386_cannot_store_register): Renamed from cannot_store_register,
14983 made static.
14984 (the_low_target): New.
14985 * linux-ia64-low.c (num_regs): Remove.
14986 (ia64_num_regs): Define.
14987 (ia64_regmap): Renamed from regmap, made static.
14988 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14989 made static.
14990 (ia64_cannot_store_register): Renamed from cannot_store_register,
14991 made static.
14992 (the_low_target): New.
14993 * linux-m68k-low.c (num_regs): Remove.
14994 (m68k_num_regs): Define.
14995 (m68k_regmap): Renamed from regmap, made static.
14996 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14997 made static.
14998 (m68k_cannot_store_register): Renamed from cannot_store_register,
14999 made static.
15000 (the_low_target): New.
15001 * linux-mips-low.c (num_regs): Remove.
15002 (mips_num_regs): Define.
15003 (mips_regmap): Renamed from regmap, made static.
15004 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15005 made static.
15006 (mips_cannot_store_register): Renamed from cannot_store_register,
15007 made static.
15008 (the_low_target): New.
15009 * linux-ppc-low.c (num_regs): Remove.
15010 (ppc_num_regs): Define.
15011 (ppc_regmap): Renamed from regmap, made static.
15012 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15013 made static.
15014 (ppc_cannot_store_register): Renamed from cannot_store_register,
15015 made static.
15016 (the_low_target): New.
15017 * linux-s390-low.c (num_regs): Remove.
15018 (s390_num_regs): Define.
15019 (s390_regmap): Renamed from regmap, made static.
15020 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15021 made static.
15022 (s390_cannot_store_register): Renamed from cannot_store_register,
15023 made static.
15024 (the_low_target): New.
15025 * linux-sh-low.c (num_regs): Remove.
15026 (sh_num_regs): Define.
15027 (sh_regmap): Renamed from regmap, made static.
15028 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15029 made static.
15030 (sh_cannot_store_register): Renamed from cannot_store_register,
15031 made static.
15032 (the_low_target): New.
15033 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15034 (the_low_target): New.
15035
15036 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15037
15038 * Makefile.in: Add stamp-h target.
15039 * configure.in: Create stamp-h.
15040 * configure: Regenerated.
15041
15042 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15043
15044 * inferiors.c: New file.
15045 * target.c: New file.
15046 * target.h: New file.
15047 * Makefile.in: Add target.o and inferiors.o. Update
15048 dependencies.
15049 * linux-low.c (inferior_pid): New static variable,
15050 moved from server.c.
15051 (linux_create_inferior): Renamed from create_inferior.
15052 Call add_inferior. Return 0 on success instead of a PID.
15053 (linux_attach): Renamed from myattach.
15054 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15055 (linux_thread_alive): Renamed from mythread_alive.
15056 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15057 child dies.
15058 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15059 (regsets_store_inferior_registers): Correct error message.
15060 Add missing ``return 0''.
15061 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15062 (linux_store_registers): Renamed from store_inferior_registers.
15063 (linux_read_memory): Renamed from read_inferior_memory.
15064 (linux_write_memory): Renamed from write_inferior_memory.
15065 (linux_target_ops): New structure.
15066 (initialize_low): Call set_target_ops ().
15067 * remote-utils.c (unhexify): New function.
15068 (hexify): New function.
15069 (input_interrupt): Send signals to ``signal_pid''.
15070 * server.c (inferior_pid): Remove.
15071 (start_inferior): Update create_inferior call.
15072 (attach_inferior): Call add_inferior.
15073 (handle_query): New function.
15074 (main): Call handle_query for `q' packets.
15075 * server.h: Include "target.h". Remove obsolete prototypes.
15076 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15077
15078 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15079
15080 * Makefile.in: Add WARN_CFLAGS. Update configury
15081 dependencies.
15082 * configure.in: Check for <string.h>
15083 * configure: Regenerate.
15084 * config.in: Regenerate.
15085 * gdbreplay.c: Include needed system headers.
15086 (remote_open): Remove strchr prototype.
15087 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15088 * regcache.c (supply_register): Change buf argument to const void *.
15089 (supply_register_by_name): Likewise.
15090 (collect_register): Change buf argument to void *.
15091 (collect_register_by_name): Likewise.
15092 * regcache.h: Add missing prototypes.
15093 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15094 * server.c (handle_query): New function.
15095 (attached): New static variable, moved out of main.
15096 (main): Quiet longjmp clobber warnings.
15097 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15098 * utils.c (error): Remove NORETURN.
15099 (fatal): Likewise.
This page took 0.398273 seconds and 4 git commands to generate.