]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[GDBserver] unit test to i386_tdesc
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0a188386
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * linux-x86-tdesc.c: Include selftest.h.
4 (i386_tdesc_test): New function.
5 (initialize_low_tdesc): Call selftests::register_test.
6 * tdesc.h: Include regdef.h.
7 (target_desc): Override operator == and !=.
8
f49ff000
YQ
92017-09-05 Yao Qi <yao.qi@linaro.org>
10
11 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
12 (ipa_obj): Likewise.
13 * linux-i386-ipa.c: Include common/x86-xstate.h
14 (get_ipa_tdesc): Call i386_linux_read_description.
15 (initialize_low_tracepoint): Don't call init_registers_XXX
16 functions, call initialize_low_tdesc instead.
17 * linux-x86-low.c (x86_linux_read_description): Call
18 i386_linux_read_description.
19 (initialize_low_arch): Don't call init_registers_i386_XXX
20 functions, call initialize_low_tdesc.
21 * linux-x86-tdesc.c: New file.
22 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
23 (i386_get_ipa_tdesc_idx): Declare.
24 (i386_get_ipa_tdesc): Declare.
25 (initialize_low_tdesc): Declare.
26
2b68ef2f
YQ
272017-09-05 Yao Qi <yao.qi@linaro.org>
28
29 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
30 instead of 0.
31
f7000548
YQ
322017-09-05 Yao Qi <yao.qi@linaro.org>
33
34 * Makefile.in (IPA_OBJS): Add vec-ipa.o
35 * regcache.c (get_thread_regcache): Use VEC_length.
36 (init_register_cache): Likewise.
37 (regcache_cpy): Likewise.
38 (registers_to_string): Iterate reg_defs via VEC_iterate.
39 (find_regno): Likewise.
40 (find_register_by_number): Use VEC_index.
41 (register_size): Call find_register_by_number.
42 (register_data): Call find_register_by_number.
43 (supply_regblock): Use VEC_length.
44 (regcache_raw_read_unsigned): Likewise.
45 * tdesc.c (init_target_desc): Iterate reg_defs via
46 VEC_iterate.
47 (default_description): Update initializer.
48 (copy_target_description): Don't update field num_registers.
49 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
50 <num_registers>: Remove.
51
50a421ac
SM
522017-09-04 Simon Marchi <simon.marchi@ericsson.com>
53
54 * Makefile.in (.SECONDARY): Define target.
55
23fdd69e
SM
562017-09-03 Simon Marchi <simon.marchi@ericsson.com>
57
58 * linux-low.c (linux_wait_1): Adjust.
59 * server.c (queue_stop_reply_callback): Adjust.
60
0a2dde4a
SDJ
612017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
62
63 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
64 QEnvironmentUnset and QEnvironmentReset packets.
65 (handle_query): Inform remote that QEnvironmentHexEncoded,
66 QEnvironmentUnset and QEnvironmentReset are supported.
67
6afd337d
SM
682017-08-25 Simon Marchi <simon.marchi@ericsson.com>
69
70 * inferiors.h (inferior_target_data): Rename to ...
71 (thread_target_data): ... this.
72 (inferior_regcache_data): Rename to ...
73 (thread_regcache_data): ... this.
74 (set_inferior_regcache_data): Rename to ...
75 (set_thread_regcache_data): ... this.
76 * inferiors.c (inferior_target_data): Rename to ...
77 (thread_target_data): ... this.
78 (inferior_regcache_data): Rename to ...
79 (thread_regcache_data): ... this.
80 (set_inferior_regcache_data): Rename to ...
81 (set_thread_regcache_data): ... this.
82 (free_one_thread): Update.
83 * linux-low.h (get_thread_lwp): Update.
84 * regcache.c (get_thread_regcache): Update.
85 (regcache_invalidate_thread): Update.
86 (free_register_cache_thread): Update.
87 * win32-i386-low.c (update_debug_registers_callback): Update.
88 (win32_get_current_dr): Update.
89 * win32-low.c (thread_rec): Update.
90 (delete_thread_info): Update.
91 (continue_one_thread): Update.
92 (suspend_one_thread): Update.
93
a160cc46
SM
942017-08-24 Simon Marchi <simon.marchi@ericsson.com>
95
96 * inferiors.c (set_inferior_target_data): Remove.
97 * inferiors.h (set_inferior_target_data): Remove.
98
6d580b63
YQ
992017-08-18 Yao Qi <yao.qi@linaro.org>
100
101 * Makefile.in (OBS): Add selftest.o.
102 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
103 * configure, config.in: Re-generated.
104 * server.c: Include common/sefltest.h.
105 (captured_main): Handle option --selftest.
106
f5a29eb0
YQ
1072017-08-09 Yao Qi <yao.qi@linaro.org>
108
109 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
110 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
111 i386-avx-mpx.o and i386-mmx.o.
112 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
113 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
114 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
115 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
116 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
117 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
118 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
119 i386/amd64-avx-mpx.xml.
120
57757c2f
YQ
1212017-08-09 Yao Qi <yao.qi@linaro.org>
122
123 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
124 and x32-avx-avx512.o.
125 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
126 i386/x32-avx-avx512.xml.
127
229d26fc
SM
1282017-07-26 Simon Marchi <simon.marchi@ericsson.com>
129
130 * tracepoint.h (enum class fast_tpoint_collect_result): New
131 enumeration.
132 (fast_tracepoint_collecting): Change return type to
133 fast_tpoint_collect_result.
134 * tracepoint.c (fast_tracepoint_collecting): Likewise.
135 * linux-low.h: Include tracepoint.h.
136 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
137 fast_tpoint_collect_result.
138 * linux-low.c (handle_tracepoints): Adjust.
139 (linux_fast_tracepoint_collecting): Change return type to
140 fast_tpoint_collect_result.
141 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
142 linux_wait_1, stuck_in_jump_pad_callback,
143 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
144 proceed_one_lwp): Adjust to type change.
145
2e1e43e1
YQ
1462017-07-10 Yao Qi <yao.qi@linaro.org>
147
148 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
149
adc764e7
YQ
1502017-06-29 Yao Qi <yao.qi@linaro.org>
151
152 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
153 Remove.
154 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
155
a206891a
SM
1562017-06-20 Simon Marchi <simon.marchi@ericsson.com>
157
158 * Makefile.in (IPA_OBJS): Sort and format one item per line.
159
9a6c7d9c
SDJ
1602017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
161
162 * linux-low.c (linux_create_inferior): Adjust code to access the
163 environment information via 'gdb_environ' class.
164 * lynx-low.c (lynx_create_inferior): Likewise.
165 * server.c (our_environ): Make it an instance of 'gdb_environ'.
166 (get_environ): Return a pointer to 'our_environ'.
167 (captured_main): Initialize 'our_environ'.
168 * server.h (get_environ): Adjust prototype.
169 * spu-low.c (spu_create_inferior): Adjust code to access the
170 environment information via 'gdb_environ' class.
171
ae3e2ccf
SM
1722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
173
174 * linux-low.c (linux_read_memory, linux_write_memory): Remove
175 usage of "register" keyword.
176
3e019bdc
SM
1772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
178
179 * configure: Re-generate.
180
8465943a
SM
1812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
182
183 * configure: Re-generate.
184
cf0dd6f0
SM
1852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
186
187 * Makefile.in (COMPILE.pre): Add "-x c++".
188
9845682b
SDJ
1892017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
190
191 * fork-child.c: Conditionally include <signal.h>.
192
aefd8b33
SDJ
1932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
194
195 * server.c (handle_general_set): Handle new packet
196 "QStartupWithShell".
197 (handle_query): Add "QStartupWithShell" to the list of supported
198 packets.
199 (gdbserver_usage): Add help text explaining the
200 new "--startup-with-shell" and "--no-startup-with-shell" CLI
201 options.
202 (captured_main): Recognize and act upon the presence of the new
203 CLI options.
204
2090129c
SDJ
2052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
206 Pedro Alves <palves@redhat.com>
207
208 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
209 * configure: Regenerate.
210 * configure.srv (srv_linux_obj): Add "fork-child.o" and
211 "fork-inferior.o".
212 (i[34567]86-*-lynxos*): Likewise.
213 (spu*-*-*): Likewise.
214 * fork-child.c: New file.
215 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
216 and "environ.h".
217 (linux_ptrace_fun): New function.
218 (linux_create_inferior): Adjust function prototype to reflect
219 change on "target.h". Adjust function code to use
220 "fork_inferior".
221 (linux_request_interrupt): Delete "signal_pid".
222 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
223 (lynx_ptrace_fun): New function.
224 (lynx_create_inferior): Adjust function prototype to reflect
225 change on "target.h". Adjust function code to use
226 "fork_inferior".
227 * nto-low.c (nto_create_inferior): Adjust function prototype and
228 code to reflect change on "target.h". Update comments.
229 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
230 "common-terminal.h" and "environ.h".
231 (terminal_fd): Moved to fork-child.c.
232 (old_foreground_pgrp): Likewise.
233 (restore_old_foreground_pgrp): Likewise.
234 (last_status): Make it global.
235 (last_ptid): Likewise.
236 (our_environ): New variable.
237 (startup_with_shell): Likewise.
238 (program_name): Likewise.
239 (program_argv): Rename to...
240 (program_args): ...this.
241 (wrapper_argv): New variable.
242 (start_inferior): Delete function.
243 (get_exec_wrapper): New function.
244 (get_exec_file): Likewise.
245 (get_environ): Likewise.
246 (prefork_hook): Likewise.
247 (post_fork_inferior): Likewise.
248 (postfork_hook): Likewise.
249 (postfork_child_hook): Likewise.
250 (handle_v_run): Update code to deal with arguments coming from the
251 remote host. Update calls from "start_inferior" to
252 "create_inferior".
253 (captured_main): Likewise. Initialize environment variable. Call
254 "have_job_control".
255 * server.h (post_fork_inferior): New prototype.
256 (get_environ): Likewise.
257 (last_status): Declare.
258 (last_ptid): Likewise.
259 (signal_pid): Likewise.
260 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
261 (spu_ptrace_fun): New function.
262 (spu_create_inferior): Adjust function prototype to reflect change
263 on "target.h". Adjust function code to use "fork_inferior".
264 * target.c (target_terminal_init): New function.
265 (target_terminal_inferior): Likewise.
266 (target_terminal_ours): Likewise.
267 * target.h: Include <vector>.
268 (struct target_ops) <create_inferior>: Update prototype.
269 (create_inferior): Update macro.
270 * utils.c (gdb_flush_out_err): New function.
271 * win32-low.c (win32_create_inferior): Adjust function prototype
272 and code to reflect change on "target.h".
273
043a4934
SDJ
2742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
275
276 * inferiors.c (switch_to_thread): New function.
277
15652511
SDJ
2782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
279
280 * Makefile.in (SFILE): Add "common/job-control.c".
281 (OBS): Add "job-control.o".
282
21ea5acd
SDJ
2832017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
284
285 * Makefile: Remove "@host_makefile_frag@".
286
e13cb306
PA
2872017-05-05 Pedro Alves <palves@redhat.com>
288
289 * configure: Regenerate.
290
c94fee56
SDJ
2912017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
292
293 * configure: Regenerate.
294
a0ff9e1a
SM
2952017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
298 software_single_step change of return type to
299 std::vector<CORE_ADDR>.
300 * linux-low.c (install_software_single_step_breakpoints):
301 Likewise.
302 * linux-low.h (install_software_single_step_breakpoints):
303 Likewise.
304
be628ab8
SDJ
3052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * remote-utils.c: Include "gdb_termios.h" instead of
308 "terminal.h".
309 * terminal.h: Delete file.
310
7c5ded6a
SDJ
3112017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
312
313 * server.c: Include <vector>.
314 <program_argv, wrapper_argv>: Convert to std::vector.
315 (start_inferior): Rewrite function to use C++.
316 (handle_v_run): Likewise. Update code that calculates the argv
317 based on the vRun packet; use C++.
318 (captured_main): Likewise.
319
436252de
SM
3202017-04-06 Simon Marchi <simon.marchi@ericsson.com>
321
322 * server.c (handle_v_cont): Initialize thread_resume::thread
323 with null_ptid.
324
9bf2a700
PA
3252017-04-05 Pedro Alves <palves@redhat.com>
326
327 * configure: Regenerate.
328
a121b7c1
PA
3292017-04-05 Pedro Alves <palves@redhat.com>
330
331 * gdbreplay.c (sync_error): Constify.
332 * linux-x86-low.c (push_opcode): Constify.
333
21c8a587
PA
3342017-04-05 Pedro Alves <palves@redhat.com>
335
336 * win32-low.c (get_child_debug_event)
337 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
338 Report TARGET_WAITKIND_SPURIOUS instead.
339
fb32b4f7
PA
3402017-04-05 Pedro Alves <palves@redhat.com>
341
342 * remote-utils.c (remote_prepare, remote_open): Constify.
343 * remote-utils.h (remote_prepare, remote_open): Constify.
344 * server.c (captured_main): Constify 'port' handling.
345
65dd1e59
SM
3462017-04-04 Simon Marchi <simon.marchi@ericsson.com>
347
348 * Makefile.in (clean): Clear .deps.
349
8fa5b777
SM
3502017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
351
352 * .gitignore: Remove generated files, replace with wildcard.
353 * (clean): Replace removal of generated files with wildcard.
354 (version.c): Replace with...
355 (version-generated.c): ...this.
356 (xml-builtin.c): Replace with...
357 (xml-builtin-generated.c): ...this.
358 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
359 (%.c: *regformats*): Replace with...
360 (%-generated.c: *regformats*): ...this.
361
a12e714b
MF
3622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
363
364 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
365 (xtensa_fill_gregset): Call collect_register_by_name for
366 threadptr register.
367 (xtensa_store_gregset): Call supply_register_by_name for
368 threadptr register.
369
1a09b50a
MF
3702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
371
372 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
373 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
374 (xtensa_store_gregset): Call supply_register for all registers in
375 a0_regnum..a0_regnum + C0_NREGS range.
376
1a01e7c6
SM
3772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
378
379 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
380 (ax-ipa.o: ax.c): Remove.
381 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
382 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
383 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
384 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
385 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
386
36bc18a8
SM
3872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
388
389 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
390 (print-utils-ipa.o: ../common/print-utils.c): Remove.
391 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
392 (errors-ipa.o: ../common/errors.c): Remove.
393 (format-ipa.o: ../common/format.c): Remove.
394 (common-utils-ipa.o: ../common/common-utils.c): Remove.
395
a8ebe3d5
SM
3962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * Makefile.in (%-ipa.o: %.c): New rule.
399 (tracepoint-ipa.o: tracepoint.c): Remove.
400 (utils-ipa.o: utils.c): Remove.
401 (remote-utils-ipa.o: remote-utils.c): Remove.
402 (regcache-ipa.o: regcache.c): Remove.
403 (i386-linux-ipa.o: i386-linux.c): Remove.
404 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
405 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
406 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
407 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
408 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
409 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
410 (amd64-linux-ipa.o: amd64-linux.c): Remove.
411 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
412 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
413 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
414 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
415 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
416 (aarch64-ipa.o: aarch64.c): Remove.
417 (s390-linux32-ipa.o: s390-linux32.c): Remove.
418 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
419 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
420 (s390-linux64-ipa.o: s390-linux64.c): Remove.
421 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
422 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
423 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
424 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
425 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
426 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
427 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
428 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
429 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
430 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
431 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
432 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
433 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
434 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
435 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
436 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
437 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
438 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
439 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
440 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
441 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
442 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
443 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
444 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
445 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
446 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
447 (tdesc-ipa.o: tdesc.c): Remove.
448 (x32-linux-ipa.o: x32-linux.c): Remove.
449 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
450 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
451
50cfacb7
SM
4522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * Makefile.in (%.o: ../arch/%.c): New rule.
455 (arm.o: ../arch/arm.c): Remove.
456 (arm-linux.o: ../arch/arm-linux.c): Remove.
457 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
458 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
459
c5a22423
SM
4602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
461
462 * Makefile.in (%.o: ../nat/%.c): New rule.
463 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
464 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
465 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
466 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
467 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
468 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
469 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
470 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
471 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
472 (linux-personality.o: ../nat/linux-personality.c): Remove.
473 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
474 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
475 (x86-linux.o: ../nat/x86-linux.c): Remove.
476 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
477 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
478
6bda016b
SM
4792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
480
481 * Makefile.in (%.o: ../common/%.c): New rule.
482 (signals.o: ../common/signals.c): Remove.
483 (print-utils.o: ../common/print-utils.c): Remove.
484 (rsp-low.o: ../common/rsp-low.c): Remove.
485 (common-utils.o: ../common/common-utils.c): Remove.
486 (posix-strerror.o: ../common/posix-strerror.c): Remove.
487 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
488 (vec.o: ../common/vec.c): Remove.
489 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
490 (xml-utils.o: ../common/xml-utils.c): Remove.
491 (ptid.o: ../common/ptid.c): Remove.
492 (buffer.o: ../common/buffer.c): Remove.
493 (format.o: ../common/format.c): Remove.
494 (filestuff.o: ../common/filestuff.c): Remove.
495 (agent.o: ../common/agent.c): Remove.
496 (errors.o: ../common/errors.c): Remove.
497 (environ.o: ../common/environ.c): Remove.
498 (common-debug.o: ../common/common-debug.c): Remove.
499 (cleanups.o: ../common/cleanups.c): Remove.
500 (common-exceptions.o: ../common/common-exceptions.c): Remove.
501 (fileio.o: ../common/fileio.c): Remove.
502 (common-regcache.o: ../common/common-regcache.c): Remove.
503 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
504 (new-op.o: ../common/new-op.c): Remove.
505 (btrace-common.o: ../common/btrace-common.c): Remove.
506
21122961
SM
5072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
508
509 * Makefile.in (%.o: ../target/%.c): New rule.
510 (waitstatus.o: ../target/waitstatus.c): Remove.
511
c362e621
SM
5122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
513
514 * Makefile.in
515 (%.c: ../regformats/%.dat,
516 (%.c: ../regformats/arm/%.dat,
517 (%.c: ../regformats/i386/%.dat,
518 (%.c: ../regformats/rs6000/%.dat): New rules.
519 (aarch64.c): Remove.
520 (reg-arm.c): Remove.
521 (arm-with-iwmmxt.c): Remove.
522 (arm-with-vfpv2.c): Remove.
523 (arm-with-vfpv3.c): Remove.
524 (arm-with-neon.c): Remove.
525 (reg-bfin.c): Remove.
526 (reg-cris.c): Remove.
527 (reg-crisv32.c): Remove.
528 (i386.c): Remove.
529 (i386-linux.c): Remove.
530 (i386-avx.c): Remove.
531 (i386-avx-linux.c): Remove.
532 (i386-avx-avx512.c): Remove.
533 (i386-avx-avx512-linux.c): Remove.
534 (i386-mpx.c): Remove.
535 (i386-mpx-linux.c): Remove.
536 (i386-avx-mpx-avx512-pku.c): Remove.
537 (i386-avx-mpx-avx512-pku-linux.c): Remove.
538 (i386-avx-mpx.c): Remove.
539 (i386-avx-mpx-linux.c): Remove.
540 (i386-mmx.c): Remove.
541 (i386-mmx-linux.c): Remove.
542 (reg-ia64.c): Remove.
543 (reg-m32r.c): Remove.
544 (reg-m68k.c): Remove.
545 (reg-cf.c): Remove.
546 (mips-linux.c): Remove.
547 (mips-dsp-linux.c): Remove.
548 (mips64-linux.c): Remove.
549 (mips64-dsp-linux.c): Remove.
550 (nios2-linux.c): Remove.
551 (powerpc-32.c): Remove.
552 (powerpc-32l.c): Remove.
553 (powerpc-altivec32l.c): Remove.
554 (powerpc-cell32l.c): Remove.
555 (powerpc-vsx32l.c): Remove.
556 (powerpc-isa205-32l.c): Remove.
557 (powerpc-isa205-altivec32l.c): Remove.
558 (powerpc-isa205-vsx32l.c): Remove.
559 (powerpc-e500l.c): Remove.
560 (powerpc-64l.c): Remove.
561 (powerpc-altivec64l.c): Remove.
562 (powerpc-cell64l.c): Remove.
563 (powerpc-vsx64l.c): Remove.
564 (powerpc-isa205-64l.c): Remove.
565 (powerpc-isa205-altivec64l.c): Remove.
566 (powerpc-isa205-vsx64l.c): Remove.
567 (s390-linux32.c): Remove.
568 (s390-linux32v1.c): Remove.
569 (s390-linux32v2.c): Remove.
570 (s390-linux64.c): Remove.
571 (s390-linux64v1.c): Remove.
572 (s390-linux64v2.c): Remove.
573 (s390-te-linux64.c): Remove.
574 (s390-vx-linux64.c): Remove.
575 (s390-tevx-linux64.c): Remove.
576 (s390x-linux64.c): Remove.
577 (s390x-linux64v1.c): Remove.
578 (s390x-linux64v2.c): Remove.
579 (s390x-te-linux64.c): Remove.
580 (s390x-vx-linux64.c): Remove.
581 (s390x-tevx-linux64.c): Remove.
582 (tic6x-c64xp-linux.c): Remove.
583 (tic6x-c64x-linux.c): Remove.
584 (tic6x-c62x-linux.c): Remove.
585 (reg-sh.c): Remove.
586 (reg-sparc64.c): Remove.
587 (reg-spu.c): Remove.
588 (amd64.c): Remove.
589 (amd64-linux.c): Remove.
590 (amd64-avx.c): Remove.
591 (amd64-avx-linux.c): Remove.
592 (amd64-avx-avx512.c): Remove.
593 (amd64-avx-avx512-linux.c): Remove.
594 (amd64-mpx.c): Remove.
595 (amd64-mpx-linux.c): Remove.
596 (amd64-avx-mpx-avx512-pku.c): Remove.
597 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
598 (amd64-avx-mpx.c): Remove.
599 (amd64-avx-mpx-linux.c): Remove.
600 (x32.c): Remove.
601 (x32-linux.c): Remove.
602 (x32-avx.c): Remove.
603 (x32-avx-linux.c): Remove.
604 (x32-avx-avx512.c): Remove.
605 (x32-avx-avx512-linux.c): Remove.
606 (reg-xtensa.c): Remove.
607 (reg-tilegx.c): Remove.
608 (reg-tilegx32.c): Remove.
609
1672e0d9
SDJ
6102017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
611
612 * Makefile.in (SFILES): Add "common/environ.c".
613 (OBJS): Add "common/environ.h".
614
239b6d10
WT
6152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
616
617 * configure.ac: Check if the fs_base and gs_base members of
618 `struct user_regs_struct' exist.
619 * config.in: Regenerated.
620 * configure: Likewise.
621
694b382c
AT
6222017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
623
624 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
625 target_read_memory.
626 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
627 (get_next_pcs_syscall_next_pc): Likewise.
628
7dc53023
LM
6292016-12-23 Luis Machado <lgustavo@codesourcery.com>
630
631 * win32-i386-low.c: Fix incorrect reference to a couple source files.
632 * nto-x86-low.c: Likewise.
633
ad02e4fe
SM
6342016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * Makefile.in: Include disable-implicit-rules.mk.
637
dcb07cfa
PA
6382016-11-23 Pedro Alves <palves@redhat.com>
639
640 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
641 (debug_vprintf): Use std::chrono::steady_clock instead of
642 gettimeofday. Use '.' instead of ':'.
643 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
644 (get_timestamp): Use std::chrono::steady_clock instead of
645 gettimeofday.
646
8629c02c
SM
6472016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * Makefile.in: Fix whitespace formatting.
650
b593ecca
SM
6512016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
652
653 * Makefile.in (SFILES, OBS): Flatten list and order
654 alphabetically.
655
9986ba08
PA
6562016-11-23 Pedro Alves <palves@redhat.com>
657
658 * event-loop.c (handle_file_event): Use warning.
659 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
660 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
661 Use warning.
662
4eefa7bc
PA
6632016-11-23 Pedro Alves <palves@redhat.com>
664
665 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
666 output.
667 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
668 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
669 debug_printf and debug_flush for debug output.
670 * server.c (handle_general_set): Likewise.
671 * thread-db.c (try_thread_db_load): Use debug_printf for debug
672 output.
673
5443506e
SM
6742016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
675
676 * Makefile.in (.c.o): Replace rule with ...
677 (%.o: %.c): ... this one.
678
3b165252
SM
6792016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
682 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
683 make.
684 * configure.ac: Remove checks for the make program.
685 * configure: Re-generate.
686
0bcda685
PA
6872016-10-28 Pedro Alves <palves@redhat.com>
688
689 * Makefile.in (CXX_DIALECT): Get from configure.
690 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
691 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
692 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
693 * config.in: Regenerate.
694 * configure: Regenerate.
695
c3805894
YQ
6962016-10-27 Yao Qi <yao.qi@linaro.org>
697
698 * linux-low.c (linux_supports_range_stepping): Return true if
699 can_software_single_step return true.
700
89342618
YQ
7012016-10-27 Yao Qi <yao.qi@linaro.org>
702
703 * inferiors.c (find_inferior_in_random): New function.
704 * inferiors.h (find_inferior_in_random): Declare.
705 * linux-low.c (linux_wait_for_event_filtered): Call
706 find_inferior_in_random instead of find_inferior.
707
e3652c84
YQ
7082016-10-27 Yao Qi <yao.qi@linaro.org>
709
710 * linux-low.c (linux_wait_1): If single-step breakpoints are
711 inserted, remove them.
712
5a04c4cf
PA
7132016-10-26 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (handle_extended_wait): Link parent/child fork
716 threads.
717 (linux_wait_1): Unlink them.
718 (linux_set_resume_request): Ignore resume requests for
719 already-resumed and unhandled fork child threads.
720 * linux-low.h (struct lwp_info) <fork_relative>: New field.
721 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
722 New functions.
723 (handle_v_requests) <vCont>: Don't call require_running.
724 * server.h (in_queued_stop_replies): New declaration.
725
cb93dc7f
YQ
7262016-10-24 Yao Qi <yao.qi@linaro.org>
727
728 PR server/20733
729 * linux-aarch64-low.c (append_insns): Cast the return value to
730 'uint32_t *'.
731
a1078bea
YQ
7322016-10-10 Yao Qi <yao.qi@linaro.org>
733
734 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
735
1fb77080
SDJ
7362016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
737
738 * target.c (target_supports_multi_process): New function, moved
739 from...
740 * target.h (target_supports_multi_process): ... here. Remove
741 macro.
742
39b5a3b9
TT
7432016-10-05 Tom Tromey <tom@tromey.com>
744
745 PR remote/20655:
746 * tracepoint.c (handle_tracepoint_bkpts): Check
747 ipa_error_tracepoint, not ipa_stopping_tracepoint.
748
c1d0b70a
YQ
7492016-10-05 Yao Qi <yao.qi@linaro.org>
750
751 * configure.srv: Update the path of arm-*.xml files.
752
0a69eedb
YQ
7532016-10-05 Terry Guo <terry.guo@arm.com>
754 Yao Qi <yao.qi@linaro.org>
755
756 * Makefile.in: Adjust the path of rules.
757 * configure.srv: Update the path of xml files.
758 * regformats/arm-with-iwmmxt.dat: Regenerated.
759 * regformats/arm-with-neon.dat: Likewise.
760 * regformats/arm-with-vfpv2.dat: Likewise.
761 * regformats/arm-with-vfpv3.dat Likewise.
762
17e16485
YQ
7632016-09-30 Yao Qi <yao.qi@linaro.org>
764
765 PR gdbserver/20627
766 * target.c (target_stop_and_wait): Don't call
767 target_continue_no_signal, use resume_stop instead.
768
edeeb602
YQ
7692016-09-26 Yao Qi <yao.qi@linaro.org>
770
771 * linux-low.c (linux_wait_1): Call debug_exit.
772
503b1c39
PA
7732016-09-23 Pedro Alves <palves@redhat.com>
774
775 * Makefile.in (SFILES): Add common/new-op.c.
776 (OBS): Add common/new-op.o.
777 (new-op.o): New rule.
778
74172ecf
SM
7792016-09-21 Simon Marchi <simon.marchi@ericsson.com>
780
781 * .gitinore: Ignore more files.
782
fc6cda2e
YQ
7832016-09-21 Yao Qi <yao.qi@linaro.org>
784
785 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
786 23.
787
bc1e6c81
SDJ
7882016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
789
790 * server.c (start_inferior): Call target_mourn_inferior instead of
791 mourn_inferior; pass ptid_t argument to it.
792 (resume): Likewise.
793 (handle_target_event): Likewise.
794 * target.c (target_mourn_inferior): New function.
795 * target.h (mourn_inferior): Delete macro.
796
0e00e962
AA
7972016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
798
799 * linux-low.c (lwp_is_stepping): New function.
800
1d8cb77d
CL
8012016-09-06 Carl Love <cel@us.ibm.com>
802
803 * server.c (start_inferior): Fixed comment, requested comment change
804 didn't get updated correctly. Removed reference to ptrace () call as
805 it is only true on Linux systems.
806
7313bced
CL
8072016-09-06 Carl Love <cel@us.ibm.com>
808
809 * server.c (start_inferior): Do not call
810 function target_post_create_inferior () if the
811 inferior process has already exited.
812
cf6de44d
PA
8132016-09-05 Pedro Alves <palves@redhat.com>
814
815 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
816 (COMPILE.pre, CC_LD): Use CXX directly.
817 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
818 * acinclude.m4: Don't include build-with-cxx.m4.
819 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
820 * configure: Regenerate.
821
c1da6748
AT
8222016-09-02 Akash Trehan <akash.trehan123@gmail.com>
823
824 PR gdb/19495
825 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
826 call writing data to own_buf.
827
f2b9e3df
SDJ
8282016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
829
830 * target.c (mywait): Call target_wait instead of
831 the_target->wait.
832 (target_wait): New function.
833
049a8570
SDJ
8342016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
835
836 * server.c (start_inferior): New variable 'ptid'. Replace calls
837 to the_target->resume by target_continue{,_no_signal}, depending
838 on the case.
839 * target.c (target_stop_and_wait): Call target_continue_no_signal
840 instead of the_target->resume.
841 (target_continue): New function.
842
3aa5cfa0
AT
8432016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
844
845 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
846
754653a7
AZ
8472016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
848
849 PR server/20491
850 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
851 ps_prochandle.
852 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
853 * linux-arm-low.c (ps_get_thread_area): Likewise.
854 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
855 * linux-m68k-low.c (ps_get_thread_area): Likewise.
856 * linux-mips-low.c (ps_get_thread_area): Likewise.
857 * linux-nios2-low.c (ps_get_thread_area): Likewise.
858 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
859 * linux-x86-low.c (ps_get_thread_area): Likewise.
860 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
861
ed036b40
PA
8622016-08-19 Pedro Alves <palves@redhat.com>
863
864 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
865
c8ef42ee
PA
8662016-08-19 Pedro Alves <palves@redhat.com>
867
868 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
869 comment. Use memcpy instead of casting through unsigned long.
870
9c235a72
PA
8712016-08-19 Pedro Alves <palves@redhat.com>
872
873 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
874 allocating around 0x80000000.
875
201506da
PA
8762016-08-19 Pedro Alves <palves@redhat.com>
877
878 PR gdb/20415
879 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
880 (x32-avx512-linux-ipa.o): New rules.
881 * configure.ac (x86_64-*-linux*): New x32 check.
882 * configure.srv (ipa_x32_linux_regobj): New.
883 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
884 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
885 descriptions.
886 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
887 descriptions.
888 * configure: Regenerate.
889
f348d89a
PA
8902016-08-09 Pedro Alves <palves@redhat.com>
891
892 PR gdb/18653
893 * Makefile.in (OBS): Add signals-state-save-restore.o.
894 (signals-state-save-restore.o): New rule.
895 * config.in: Regenerate.
896 * configure: Regenerate.
897 * linux-low.c: Include "signals-state-save-restore.h".
898 (linux_create_inferior): Call
899 restore_original_signals_state.
900 * server.c: Include "dispositions-save-restore.h".
901 (captured_main): Call save_original_signals_state.
902
1baf5149
PA
9032016-08-05 Pedro Alves <palves@redhat.com>
904
905 * configure: Regenerate.
906
fcd4a73d
YQ
9072016-08-04 Yao Qi <yao.qi@linaro.org>
908
909 * linux-low.c (regsets_fetch_inferior_registers): Check
910 errno is ESRCH or not.
911
979659d0
YQ
9122016-08-02 Yao Qi <yao.qi@linaro.org>
913
914 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
915 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
916 (thread_db_load_search): Update.
917 (try_thread_db_load_1): Don't look for td_ta_event_addr,
918 td_ta_set_event and td_ta_event_getmsg.
919
6598661d
PA
9202016-07-26 Pedro Alves <palves@redhat.com>
921
922 PR server/20414
923 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
924 of unsigned long for 64-bit registers and use uint32_t instead of
925 unsigned int for 32-bit registers.
926
9cf12d57
PA
9272016-07-26 Pedro Alves <palves@redhat.com>
928
929 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
930 to 'ptrace'.
931
305450ed
TT
9322016-07-21 Tom Tromey <tom@tromey.com>
933
934 * configure: Rebuild.
935
2583da7c
YQ
9362016-07-21 Yao Qi <yao.qi@linaro.org>
937
938 * mem-break.c (find_gdb_breakpoint): Cast bp to
939 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
940
21536b36
YQ
9412016-07-21 Yao Qi <yao.qi@linaro.org>
942
943 * server.c (handle_v_requests): Support s and S actions
944 if target_supports_software_single_step return true.
945
8901d193
YQ
9462016-07-21 Yao Qi <yao.qi@linaro.org>
947
948 * linux-low.c (resume_stopped_resumed_lwps): If resume request
949 is resume_step, call maybe_hw_step.
950 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
951 and unstop them.
952 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
953 breakpoints or not.
954 (proceed_one_lwp): If resume request is resume_step, install
955 reinsert breakpoints and call maybe_hw_step.
956
0e9a339e
YQ
9572016-07-21 Yao Qi <yao.qi@linaro.org>
958
959 * linux-low.c (proceed_one_lwp): Declare.
960 (linux_resume_one_thread): Remove local variable 'step'.
961 Lift code enqueue signal. Call proceed_one_lwp instead of
962 linux_resume_one_lwp.
963
4281b351
YQ
9642016-07-21 Yao Qi <yao.qi@linaro.org>
965
966 * linux-low.c (linux_resume_one_thread): Call
967 enqueue_pending_signal.
968
984a2c04
YQ
9692016-07-21 Yao Qi <yao.qi@linaro.org>
970
971 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
972 * inferiors.c (do_restore_current_thread_cleanup): New function.
973 (make_cleanup_restore_current_thread): Likewise.
974 * linux-low.c (install_software_single_step_breakpoints): Call
975 make_cleanup_restore_current_thread. Switch current_thread to
976 thread.
977
bec903c9
YQ
9782016-07-21 Yao Qi <yao.qi@linaro.org>
979
980 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
981 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
982 (clone_one_breakpoint): Likewise.
983 (delete_reinsert_breakpoints): Change parameter to thread.
984 Callers updated.
985 (has_reinsert_breakpoints): Likewise.
986 (uninsert_reinsert_breakpoints): Likewise.
987 (reinsert_reinsert_breakpoints): Likewise.
988 * mem-break.h (set_reinsert_breakpoint): Update declaration.
989 (delete_reinsert_breakpoints): Likewise.
990 (reinsert_reinsert_breakpoints): Likewise.
991 (uninsert_reinsert_breakpoints): Likewise.
992 (has_reinsert_breakpoints): Likewise.
993
63c40ec7
YQ
9942016-07-21 Yao Qi <yao.qi@linaro.org>
995
996 * inferiors.c (get_thread_process): Make parameter const.
997 * inferiors.h (get_thread_process): Update declaration.
998 * mem-break.c (clone_all_breakpoints): Remove all parameters.
999 Add new parameters child_thread and parent_thread. Callers
1000 updated.
1001 * mem-break.h (clone_all_breakpoints): Update declaration.
1002
9aa76cd0
YQ
10032016-07-21 Yao Qi <yao.qi@linaro.org>
1004
1005 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1006 <command_list, handler>: Remove.
1007 (struct gdb_breakpoint): New.
1008 (struct other_breakpoint): New.
1009 (struct reinsert_breakpoint): New.
1010 (is_gdb_breakpoint): New function.
1011 (any_persistent_commands): Update command_list if
1012 is_gdb_breakpoint returns true.
1013 (set_breakpoint): Create breakpoints according to their types.
1014 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1015 (set_gdb_breakpoint_1): Likewise.
1016 (set_gdb_breakpoint): Likewise.
1017 (clear_breakpoint_conditions): Change parameter type to
1018 'struct gdb_breakpoint *'.
1019 (clear_breakpoint_commands): Likewise.
1020 (clear_breakpoint_conditions_and_commands): Likewise.
1021 (add_condition_to_breakpoint): Likewise.
1022 (add_breakpoint_condition): Likewise.
1023 (add_commands_to_breakpoint): Likewise.
1024 (check_breakpoints): Check other_breakpoint.
1025 (clone_one_breakpoint): Clone breakpopint according to its type.
1026 * mem-break.h (struct gdb_breakpoint): Declare.
1027 (set_gdb_breakpoint): Update declaration.
1028 (clear_breakpoint_conditions_and_commands): Likewise.
1029 (add_breakpoint_condition): Likewise.
1030 (add_breakpoint_commands): Likewise.
1031 * server.c (process_point_options): Change parameter type to
1032 'struct gdb_breakpoint *'.
1033
811f8301
YQ
10342016-07-21 Yao Qi <yao.qi@linaro.org>
1035
1036 * mem-break.c (set_breakpoint_at): Rename it to ...
1037 (set_breakpoint_type_at): ... it.
1038 (set_breakpoint_at): Call set_breakpoint_type_at.
1039 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1040 * mem-break.h (set_breakpoint_at): Update comments.
1041
b1c51e36
CLT
10422016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1043
1044 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1045 to buf parameter.
1046 (nios2_store_gregset): Likewise.
1047
ced2dffb
PA
10482016-07-01 Pedro Alves <palves@redhat.com>
1049 Antoine Tremblay <antoine.tremblay@ericsson.com>
1050
1051 * linux-low.c: Change interface to take the target lwp_info
1052 pointer directly and return void. Handle detaching from a zombie
1053 thread.
1054 (linux_detach_lwp_callback): New function.
1055 (linux_detach): Detach from the leader thread after detaching from
1056 the clone threads.
1057
2ac09a5b
YQ
10582016-06-28 Yao Qi <yao.qi@linaro.org>
1059
1060 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1061 for variable new_offset.
1062 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1063 (aarch64_ftrace_insn_reloc_cb): Likewise.
1064 (aarch64_ftrace_insn_reloc_tb): Likewise.
1065 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1066 PRIx64 instead of PRIx32.
1067
79e7fd4f
YQ
10682016-06-28 Yao Qi <yao.qi@linaro.org>
1069
1070 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1071 (the_low_target): Install arm_get_syscall_trapinfo.
1072
061fc021
YQ
10732016-06-28 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1076 function.
1077 (the_low_target): Install aarch64_get_syscall_trapinfo.
1078
4cc32bec
YQ
10792016-06-28 Yao Qi <yao.qi@linaro.org>
1080
1081 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1082 Callers updated.
1083 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1084 Remove parameter sysno.
1085 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1086 sysret.
1087
782c1122
AA
10882016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1089
1090 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1091 (s390_emit_ne_goto): Likewise.
1092 (s390_emit_lt_goto): Likewise.
1093 (s390_emit_le_goto): Likewise.
1094 (s390_emit_gt_goto): Likewise.
1095 (s390_emit_ge_goto): Likewise.
1096 (s390x_emit_eq_goto): Likewise.
1097 (s390x_emit_ne_goto): Likewise.
1098 (s390x_emit_lt_goto): Likewise.
1099 (s390x_emit_le_goto): Likewise.
1100 (s390x_emit_gt_goto): Likewise.
1101 (s390x_emit_ge_goto): Likewise.
1102 (s390_emit_ops_impl): Mark variable static.
1103 (s390x_emit_ops): Likewise.
1104
2e7b624b
YQ
11052016-06-17 Yao Qi <yao.qi@linaro.org>
1106
1107 * linux-low.c (handle_extended_wait): Call
1108 uninsert_reinsert_breakpoints for the parent process. Remove
1109 reinsert breakpoints from the child process. Reinsert them to
1110 the parent process when vfork is done.
1111 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1112 (reinsert_reinsert_breakpoints): New function.
1113 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1114 (reinsert_reinsert_breakpoints): Declare.
1115
8a81c5d7
YQ
11162016-06-17 Yao Qi <yao.qi@linaro.org>
1117
1118 * linux-low.c (handle_extended_wait): If the parent is doing
1119 step-over, remove the reinsert breakpoints from the forked child.
1120
f50bf8e5
YQ
11212016-06-17 Yao Qi <yao.qi@linaro.org>
1122
1123 * linux-low.c (unsuspend_all_lwps): Declare.
1124 (linux_low_filter_event): If thread exited, call finish_step_over.
1125 If step-over is finished, unsuspend other threads.
1126
8376a3cb
YQ
11272016-06-17 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (linux_resume_one_lwp_throw): Assert
1130 has_reinsert_breakpoints returns false.
1131 * mem-break.c (delete_disabled_breakpoints): Assert
1132 bp type isn't reinsert_breakpoint.
1133
f79b145d
YQ
11342016-06-17 Yao Qi <yao.qi@linaro.org>
1135
1136 * linux-low.c (maybe_hw_step): New function.
1137 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1138 (finish_step_over): Switch current_thread to lwp temporarily,
1139 and assert has_reinsert_breakpoints returns true.
1140 (proceed_one_lwp): Call maybe_hw_step.
1141 * mem-break.c (has_reinsert_breakpoints): New function.
1142 * mem-break.h (has_reinsert_breakpoints): Declare.
1143
0ae534d2
JT
11442016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1145
1146 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1147
fcdad592
YQ
11482016-05-17 Yao Qi <yao.qi@linaro.org>
1149
1150 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1151 instead of find_inferior.
1152
9e784964
YQ
11532016-05-05 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1156 Initialize res to zero.
1157
cf2ebb6e
YQ
11582016-05-05 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1161 to uint32_t.
1162
c1aebf87
UW
11632016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1164
1165 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1166 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1167 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1168
35fd2deb 11692016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1170 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1171
1172 * tracepoint.c (write_inferior_int8): New function.
1173 (cmd_qtenable_disable): Write enable flag using
1174 write_inferior_int8.
1175
484b3c32
YQ
11762016-04-25 Yao Qi <yao.qi@linaro.org>
1177
1178 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1179 (need_step_over_p): Return zero if the LWP has pending signals
1180 can be delivered on software single step target.
1181
85ba7d86
YQ
11822016-04-25 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1185 return instead of error.
1186
3539aa13
YQ
11872016-04-22 Yao Qi <yao.qi@linaro.org>
1188
1189 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1190 to 23.
1191
5b061e98
YQ
11922016-04-22 Yao Qi <yao.qi@linaro.org>
1193
1194 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1195 signal when stepping over breakpoint with software single
1196 step.
1197
3451269c
PA
11982016-04-21 Pedro Alves <palves@redhat.com>
1199
1200 * linux-s390-low.c (s390_collect_ptrace_register)
1201 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1202 add casts.
1203 (s390_check_regset): Use void * instead of gdb_byte *.
1204
a2358508
PA
12052016-04-20 Pedro Alves <palves@redhat.com>
1206
1207 * configure: Renegerate.
1208
6885166d
YQ
12092016-04-20 Yao Qi <yao.qi@linaro.org>
1210
1211 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1212 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1213 number 16.
1214 (arm_store_gregset): Likewise.
1215
2b863f51
WT
12162016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1217
1218 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1219 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1220 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1221 (amd64-avx-mpx-linux.c): New rules.
1222 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1223 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1224 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1225 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1226 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1227 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1228 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1229 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1230 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1231 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1232 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1233 * linux-x86-low.c (x86_linux_read_description): Add case for
1234 X86_XSTATE_AVX_MPX_MASK.
1235 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1236 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1237 init_registers_i386_avx_mpx_linux.
1238 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1239 (initialize_low_tracepoint): Call
1240 init_registers_i386_avx_mpx_linux.
1241 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1242 (initialize_low_tracepoint): Call
1243 init_registers_amd64_avx_mpx_linux.
1244 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1245 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1246 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1247 declarations.
1248
9b30624b
PA
12492016-04-18 Pedro Alves <palves@redhat.com>
1250
1251 * configure: Regenerate.
1252
45e3745e
AT
12532016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1254
1255 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1256 (aarch64_emit_sub): Likewise.
1257
2afc13ff
PA
12582016-04-12 Pedro Alves <palves@redhat.com>
1259
1260 * utils.c (prepare_to_throw_exception): Delete.
1261
6e774b13
SM
12622016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1263
1264 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1265
4dca19f8
MK
12662016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1267
1268 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1269
d0a9981f
MK
12702016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1271
1272 * linux-aarch64-ipa.c: Add <elf.h> include.
1273 * linux-ppc-ipa.c: Add <elf.h> include.
1274 * linux-s390-ipa.c: Add <elf.h> include.
1275
252db07e
MK
12762016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1277
1278 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1279 (get_raw_reg_ptr): Likewise.
1280 (get_trace_state_variable_value_ptr): Likewise.
1281 (set_trace_state_variable_value_ptr): Likewise.
1282 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1283 char *.
1284
14e2b6d9
MK
12852016-03-31 Wei-cheng Wang <cole945@gmail.com>
1286 Marcin Kościelnicki <koriakin@0x04.net>
1287
1288 PR/17221
1289 * linux-ppc-low.c (emit_insns): New function.
1290 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1291 (ppc_emit_prologue): New function.
1292 (ppc_emit_epilogue): New function.
1293 (ppc_emit_add): New function.
1294 (ppc_emit_sub): New function.
1295 (ppc_emit_mul): New function.
1296 (ppc_emit_lsh): New function.
1297 (ppc_emit_rsh_signed): New function.
1298 (ppc_emit_rsh_unsigned): New function.
1299 (ppc_emit_ext): New function.
1300 (ppc_emit_zero_ext): New function.
1301 (ppc_emit_log_not): New function.
1302 (ppc_emit_bit_and): New function.
1303 (ppc_emit_bit_or): New function.
1304 (ppc_emit_bit_xor): New function.
1305 (ppc_emit_bit_not): New function.
1306 (ppc_emit_equal): New function.
1307 (ppc_emit_less_signed): New function.
1308 (ppc_emit_less_unsigned): New function.
1309 (ppc_emit_ref): New function.
1310 (ppc_emit_const): New function.
1311 (ppc_emit_reg): New function.
1312 (ppc_emit_pop): New function.
1313 (ppc_emit_stack_flush): New function.
1314 (ppc_emit_swap): New function.
1315 (ppc_emit_stack_adjust): New function.
1316 (ppc_emit_call): New function.
1317 (ppc_emit_int_call_1): New function.
1318 (ppc_emit_void_call_2): New function.
1319 (ppc_emit_if_goto): New function.
1320 (ppc_emit_goto): New function.
1321 (ppc_emit_eq_goto): New function.
1322 (ppc_emit_ne_goto): New function.
1323 (ppc_emit_lt_goto): New function.
1324 (ppc_emit_le_goto): New function.
1325 (ppc_emit_gt_goto): New function.
1326 (ppc_emit_ge_goto): New function.
1327 (ppc_write_goto_address): New function.
1328 (ppc_emit_ops_impl): New static variable.
1329 (ppc64v1_emit_prologue): New function.
1330 (ppc64v2_emit_prologue): New function.
1331 (ppc64_emit_epilogue): New function.
1332 (ppc64_emit_add): New function.
1333 (ppc64_emit_sub): New function.
1334 (ppc64_emit_mul): New function.
1335 (ppc64_emit_lsh): New function.
1336 (ppc64_emit_rsh_signed): New function.
1337 (ppc64_emit_rsh_unsigned): New function.
1338 (ppc64_emit_ext): New function.
1339 (ppc64_emit_zero_ext): New function.
1340 (ppc64_emit_log_not): New function.
1341 (ppc64_emit_bit_and): New function.
1342 (ppc64_emit_bit_or): New function.
1343 (ppc64_emit_bit_xor): New function.
1344 (ppc64_emit_bit_not): New function.
1345 (ppc64_emit_equal): New function.
1346 (ppc64_emit_less_signed): New function.
1347 (ppc64_emit_less_unsigned): New function.
1348 (ppc64_emit_ref): New function.
1349 (ppc64_emit_const): New function.
1350 (ppc64v1_emit_reg): New function.
1351 (ppc64v2_emit_reg): New function.
1352 (ppc64_emit_pop): New function.
1353 (ppc64_emit_stack_flush): New function.
1354 (ppc64_emit_swap): New function.
1355 (ppc64v1_emit_call): New function.
1356 (ppc64v2_emit_call): New function.
1357 (ppc64v1_emit_int_call_1): New function.
1358 (ppc64v2_emit_int_call_1): New function.
1359 (ppc64v1_emit_void_call_2): New function.
1360 (ppc64v2_emit_void_call_2): New function.
1361 (ppc64_emit_if_goto): New function.
1362 (ppc64_emit_eq_goto): New function.
1363 (ppc64_emit_ne_goto): New function.
1364 (ppc64_emit_lt_goto): New function.
1365 (ppc64_emit_le_goto): New function.
1366 (ppc64_emit_gt_goto): New function.
1367 (ppc64_emit_ge_goto): New function.
1368 (ppc64v1_emit_ops_impl): New static variable.
1369 (ppc64v2_emit_ops_impl): New static variable.
1370 (ppc_emit_ops): New function.
1371 (linux_low_target): Wire in ppc_emit_ops.
1372
a2174ba4
MK
13732016-03-31 Wei-cheng Wang <cole945@gmail.com>
1374 Marcin Kościelnicki <koriakin@0x04.net>
1375
1376 PR/17221
1377 * Makefile.in: Add powerpc-*-ipa.o
1378 * configure.srv: Add ipa_obj for powerpc*-linux.
1379 * linux-ppc-ipa.c: New file.
1380 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1381 includes.
1382 (PPC_FIELD): New macro.
1383 (PPC_SEXT): New macro.
1384 (PPC_OP6): New macro.
1385 (PPC_BO): New macro.
1386 (PPC_LI): New macro.
1387 (PPC_BD): New macro.
1388 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1389 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1390 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1391 (ppc_get_thread_area): New function.
1392 (is_elfv2_inferior): New function.
1393 (gen_ds_form): New function.
1394 (GEN_STD): New macro.
1395 (GEN_STDU): New macro.
1396 (GEN_LD): New macro.
1397 (GEN_LDU): New macro.
1398 (gen_d_form): New function.
1399 (GEN_ADDI): New macro.
1400 (GEN_ADDIS): New macro.
1401 (GEN_LI): New macro.
1402 (GEN_LIS): New macro.
1403 (GEN_ORI): New macro.
1404 (GEN_ORIS): New macro.
1405 (GEN_LWZ): New macro.
1406 (GEN_STW): New macro.
1407 (GEN_STWU): New macro.
1408 (gen_xfx_form): New function.
1409 (GEN_MFSPR): New macro.
1410 (GEN_MTSPR): New macro.
1411 (GEN_MFCR): New macro.
1412 (GEN_MTCR): New macro.
1413 (GEN_SYNC): New macro.
1414 (GEN_LWSYNC): New macro.
1415 (gen_x_form): New function.
1416 (GEN_OR): New macro.
1417 (GEN_MR): New macro.
1418 (GEN_LWARX): New macro.
1419 (GEN_STWCX): New macro.
1420 (GEN_CMPW): New macro.
1421 (gen_md_form): New function.
1422 (GEN_RLDICL): New macro.
1423 (GEN_RLDICR): New macro.
1424 (gen_i_form): New function.
1425 (GEN_B): New macro.
1426 (GEN_BL): New macro.
1427 (gen_b_form): New function.
1428 (GEN_BNE): New macro.
1429 (GEN_LOAD): New macro.
1430 (GEN_STORE): New macro.
1431 (gen_limm): New function.
1432 (gen_atomic_xchg): New function.
1433 (gen_call): New function.
1434 (ppc_relocate_instruction): New function.
1435 (ppc_install_fast_tracepoint_jump_pad): New function.
1436 (ppc_get_min_fast_tracepoint_insn_len): New function.
1437 (ppc_get_ipa_tdesc_idx): New function.
1438 (the_low_target): Wire in the new functions.
1439 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1440 tdescs.
1441 * linux-ppc-tdesc.h: New file.
1442
a13c4696
MK
14432016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1444
1445 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1446 (alloc_jump_pad_buffer): New function.
1447 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1448 (alloc_jump_pad_buffer): New function.
1449 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1450 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1451 (alloc_jump_pad_buffer): New function.
1452 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1453 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1454 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1455 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1456
1cda1512
MK
14572016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1458
1459 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1460 * linux-amd64-ipa.c: Likewise.
1461 * linux-i386-ipa.c: Likewise.
1462 * linux-s390-ipa.c: Likewise.
1463 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1464 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1465 set_trace_state_variable_value_ptr.
1466 (struct ipa_sym_addresses): Likewise.
1467 (symbol_list): Likewise.
1468 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1469 accessing gdb_collect directly.
1470 (gdb_collect_ptr_type): New typedef.
1471 (get_raw_reg_ptr_type): New typedef.
1472 (get_trace_state_variable_value_ptr_type): New typedef.
1473 (set_trace_state_variable_value_ptr_type): New typedef.
1474 (gdb_collect_ptr): New global.
1475 (get_raw_reg_ptr): New global.
1476 (get_trace_state_variable_value_ptr): New global.
1477 (set_trace_state_variable_value_ptr): New global.
1478 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1479 accessing get_raw_reg directly.
1480 (get_get_tsv_func_addr): Likewise for
1481 get_trace_state_variable_value_ptr.
1482 (get_set_tsv_func_addr): Likewise for
1483 set_trace_state_variable_value_ptr.
1484 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1485
72fb5488
SM
14862016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1487
1488 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1489
28170b88
MK
14902016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1491
1492 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1493 packets.
1494 (relocate_instruction): Remove own_buf.
1495 * server.c (own_buf): Make global.
1496 (handle_v_requests): Make global.
1497 * server.h (own_buf): New declaration.
1498 (handle_v_requests): New prototype.
1499
f39e8743
MK
15002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1501
1502 PR 18377
1503 * linux-s390-low.c (add_insns): New function.
1504 (s390_emit_prologue): New function.
1505 (s390_emit_epilogue): New function.
1506 (s390_emit_add): New function.
1507 (s390_emit_sub): New function.
1508 (s390_emit_mul): New function.
1509 (s390_emit_lsh): New function.
1510 (s390_emit_rsh_signed): New function.
1511 (s390_emit_rsh_unsigned): New function.
1512 (s390_emit_ext): New function.
1513 (s390_emit_log_not): New function.
1514 (s390_emit_bit_and): New function.
1515 (s390_emit_bit_or): New function.
1516 (s390_emit_bit_xor): New function.
1517 (s390_emit_bit_not): New function.
1518 (s390_emit_equal): New function.
1519 (s390_emit_less_signed): New function.
1520 (s390_emit_less_unsigned): New function.
1521 (s390_emit_ref): New function.
1522 (s390_emit_if_goto): New function.
1523 (s390_emit_goto): New function.
1524 (s390_write_goto_address): New function.
1525 (s390_emit_litpool): New function.
1526 (s390_emit_const): New function.
1527 (s390_emit_call): New function.
1528 (s390_emit_reg): New function.
1529 (s390_emit_pop): New function.
1530 (s390_emit_stack_flush): New function.
1531 (s390_emit_zero_ext): New function.
1532 (s390_emit_swap): New function.
1533 (s390_emit_stack_adjust): New function.
1534 (s390_emit_set_r2): New function.
1535 (s390_emit_int_call_1): New function.
1536 (s390_emit_void_call_2): New function.
1537 (s390_emit_eq_goto): New function.
1538 (s390_emit_ne_goto): New function.
1539 (s390_emit_lt_goto): New function.
1540 (s390_emit_le_goto): New function.
1541 (s390_emit_gt_goto): New function.
1542 (s390_emit_ge_goto): New function.
1543 (s390x_emit_prologue): New function.
1544 (s390x_emit_epilogue): New function.
1545 (s390x_emit_add): New function.
1546 (s390x_emit_sub): New function.
1547 (s390x_emit_mul): New function.
1548 (s390x_emit_lsh): New function.
1549 (s390x_emit_rsh_signed): New function.
1550 (s390x_emit_rsh_unsigned): New function.
1551 (s390x_emit_ext): New function.
1552 (s390x_emit_log_not): New function.
1553 (s390x_emit_bit_and): New function.
1554 (s390x_emit_bit_or): New function.
1555 (s390x_emit_bit_xor): New function.
1556 (s390x_emit_bit_not): New function.
1557 (s390x_emit_equal): New function.
1558 (s390x_emit_less_signed): New function.
1559 (s390x_emit_less_unsigned): New function.
1560 (s390x_emit_ref): New function.
1561 (s390x_emit_if_goto): New function.
1562 (s390x_emit_const): New function.
1563 (s390x_emit_call): New function.
1564 (s390x_emit_reg): New function.
1565 (s390x_emit_pop): New function.
1566 (s390x_emit_stack_flush): New function.
1567 (s390x_emit_zero_ext): New function.
1568 (s390x_emit_swap): New function.
1569 (s390x_emit_stack_adjust): New function.
1570 (s390x_emit_int_call_1): New function.
1571 (s390x_emit_void_call_2): New function.
1572 (s390x_emit_eq_goto): New function.
1573 (s390x_emit_ne_goto): New function.
1574 (s390x_emit_lt_goto): New function.
1575 (s390x_emit_le_goto): New function.
1576 (s390x_emit_gt_goto): New function.
1577 (s390x_emit_ge_goto): New function.
1578 (s390_emit_ops): New function.
1579 (struct linux_target_ops): Fill in emit_ops hook.
1580
abd9baf9
MK
15812016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1582
1583 PR 18377
1584 * Makefile.in: Add s390 IPA files.
1585 * configure.srv: Build IPA for s390.
1586 * linux-s390-ipa.c: New file.
1587 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1588 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1589 (tdesc_s390_linux32): Likewise.
1590 (init_registers_s390_linux32v1): Likewise.
1591 (tdesc_s390_linux32v1): Likewise.
1592 (init_registers_s390_linux32v2): Likewise.
1593 (tdesc_s390_linux32v2): Likewise.
1594 (init_registers_s390_linux64): Likewise.
1595 (tdesc_s390_linux64): Likewise.
1596 (init_registers_s390_linux64v1): Likewise.
1597 (tdesc_s390_linux64v1): Likewise.
1598 (init_registers_s390_linux64v2): Likewise.
1599 (tdesc_s390_linux64v2): Likewise.
1600 (init_registers_s390_te_linux64): Likewise.
1601 (tdesc_s390_te_linux64): Likewise.
1602 (init_registers_s390_vx_linux64): Likewise.
1603 (tdesc_s390_vx_linux64): Likewise.
1604 (init_registers_s390_tevx_linux64): Likewise.
1605 (tdesc_s390_tevx_linux64): Likewise.
1606 (init_registers_s390x_linux64): Likewise.
1607 (tdesc_s390x_linux64): Likewise.
1608 (init_registers_s390x_linux64v1): Likewise.
1609 (tdesc_s390x_linux64v1): Likewise.
1610 (init_registers_s390x_linux64v2): Likewise.
1611 (tdesc_s390x_linux64v2): Likewise.
1612 (init_registers_s390x_te_linux64): Likewise.
1613 (tdesc_s390x_te_linux64): Likewise.
1614 (init_registers_s390x_vx_linux64): Likewise.
1615 (tdesc_s390x_vx_linux64): Likewise.
1616 (init_registers_s390x_tevx_linux64): Likewise.
1617 (tdesc_s390x_tevx_linux64): Likewise.
1618 (have_hwcap_s390_vx): New static variable.
1619 (s390_arch_setup): Fill have_hwcap_s390_vx.
1620 (s390_get_thread_area): New function.
1621 (s390_ft_entry_gpr_esa): New const.
1622 (s390_ft_entry_gpr_zarch): New const.
1623 (s390_ft_entry_misc): New const.
1624 (s390_ft_entry_fr): New const.
1625 (s390_ft_entry_vr): New const.
1626 (s390_ft_main_31): New const.
1627 (s390_ft_main_64): New const.
1628 (s390_ft_exit_fr): New const.
1629 (s390_ft_exit_vr): New const.
1630 (s390_ft_exit_misc): New const.
1631 (s390_ft_exit_gpr_esa): New const.
1632 (s390_ft_exit_gpr_zarch): New const.
1633 (append_insns): New function.
1634 (s390_relocate_instruction): New function.
1635 (s390_install_fast_tracepoint_jump_pad): New function.
1636 (s390_get_min_fast_tracepoint_insn_len): New function.
1637 (s390_get_ipa_tdesc_idx): New function.
1638 (struct linux_target_ops): Wire in the above functions.
1639 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1640 * linux-s390-tdesc.h: New file.
1641
a4105d04
MK
16422016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1643
1644 * linux-s390-low.c (s390_supports_tracepoints): New function.
1645 (struct linux_target_ops): Fill supports_tracepoints hook.
1646
35ac8b3e
YQ
16472016-03-18 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-low.c (lwp_signal_can_be_delivered): New function.
1650 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1651
94610ec4
YQ
16522016-03-18 Yao Qi <yao.qi@linaro.org>
1653
1654 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1655 0 if signal is enqueued. Remove 'signal' from one debugging
1656 message. Move one debugging message to some lines below.
1657 Remove code setting 'signal' to 0.
1658
80aea927
YQ
16592016-03-18 Yao Qi <yao.qi@linaro.org>
1660
1661 * linux-low.c (linux_low_filter_event): Remove redundant
1662 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1663
b04fd3be
MK
16642016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1665
1666 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1667 (struct linux_target_ops): Wire in the above.
1668
c40c8d4b
YQ
16692016-03-03 Yao Qi <yao.qi@linaro.org>
1670
1671 * linux-low.c: Update comments to start_step_over.
1672
0f8288ae
YQ
16732016-03-03 Yao Qi <yao.qi@linaro.org>
1674
1675 PR server/19736
1676 * linux-low.c (handle_extended_wait): Set child suspended
1677 if event_lwp->bp_reinsert isn't zero.
1678
fdbd04a8
YQ
16792016-03-02 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1682 enqueue_pending_signal.
1683
6896a8fa
MK
16842016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1685
1686 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1687 is actually loaded.
1688
ab503087
MK
16892016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1690
1691 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1692 (s390_regmap_3264) [!__s390x__]: New global.
1693 (s390_collect_ptrace_register): Skip map entries containing -1.
1694 (s390_supply_ptrace_register): Ditto.
1695 (s390_fill_gprs_high): New function.
1696 (s390_store_gprs_high): New function.
1697 (s390_regsets): Add NT_S390_HIGH_GPRS.
1698 (s390_get_hwcap): Enable on 31-bit.
1699 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1700 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1701 Detect NT_S390_HIGH_GPRS.
1702 (s390_usrregs_info_3264): Enable on 31-bit.
1703 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1704 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1705
ae91f625
MK
17062016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1707
1708 PR gdb/13808
1709 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1710 * configure.srv: Ditto.
1711 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1712 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1713 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1714 (init_registers_amd64_linux): Remove prototype.
1715 (tdesc_amd64_linux): Remove declaration.
1716 (get_ipa_tdesc): New function.
1717 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1718 initialize remaining tdescs.
1719 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1720 (init_registers_i386_linux): Remove prototype.
1721 (tdesc_i386_linux): Remove declaration.
1722 (get_ipa_tdesc): New function.
1723 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1724 initialize remaining tdescs.
1725 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1726 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1727 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1728 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1729 (x86_get_ipa_tdesc_idx): New function.
1730 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1731 * linux-x86-tdesc.h: New file.
1732 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1733 (target_get_ipa_tdesc_idx): New macro.
1734 * tracepoint.c (ipa_tdesc_idx): New macro.
1735 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1736 (symbol_list): Add ipa_tdesc_idx.
1737 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1738 (ipa_tdesc): Remove.
1739 (ipa_tdesc_idx): New variable.
1740 (get_context_regcache): Use get_ipa_tdesc.
1741 (gdb_collect): Ditto.
1742 (gdb_probe): Ditto.
1743 * tracepoint.h (get_ipa_tdesc): New prototype.
1744 (ipa_tdesc): Remove.
1745
e7ad2f14
PA
17462016-02-24 Pedro Alves <palves@redhat.com>
1747
1748 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1749 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1750 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1751 Factor out common code between the USE_SIGTRAP_SIGINFO and
1752 !USE_SIGTRAP_SIGINFO blocks.
1753 (linux_low_filter_event): Call save_stop_reason instead of
1754 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1755 Update comments.
1756 (linux_wait_1): Update comments.
1757
657f9cde
WW
17582016-02-24 Wei-cheng Wang <cole945@gmail.com>
1759
1760 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1761 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1762 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1763 ppc_insert_point, ppc_remove_point.
1764
b00b61e1
MK
17652016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1766
1767 * linux-s390-low.c (s390_supports_z_point_type): New function.
1768 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1769
553cb527
YQ
17702016-02-16 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1773 PC. Get pc from regcache_read_pc.
1774
a5652c21
YQ
17752016-02-12 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1778 or linux_get_pc_32bit.
1779 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1780
ed443b61
YQ
17812016-02-12 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1784 arm_linux_get_next_pcs_fixup.
1785
020ecd38
MK
17862016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1787
1788 * tracepoint.c (x_tracepoint_action_download): Change
1789 write_inferior_data_ptr to write_inferior_data_pointer.
1790 (cmd_qtstart): Likewise.
1791 (write_inferior_data_ptr): Remove.
1792 (download_agent_expr): Change write_inferior_data_ptr to
1793 write_inferior_data_pointer.
1794 (download_tracepoint_1): Likewise.
1795 (download_tracepoint): Likewise.
1796 (download_trace_state_variables): Likewise.
1797
7cae9051
WW
17982016-02-11 Wei-cheng Wang <cole945@gmail.com>
1799 Marcin Kościelnicki <koriakin@0x04.net>
1800
1801 * tracepoint.c (struct tracepoint_action_ops): Remove.
1802 (struct tracepoint_action): Remove ops.
1803 (m_tracepoint_action_download, r_tracepoint_action_download)
1804 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1805 size and offset accordingly.
1806 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1807 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1808 (tracepoint_action_send, tracepoint_action_download): New functions.
1809 Helpers for trace action handlers.
1810 (add_tracepoint_action): Remove setup actions ops.
1811 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1812
9f6a71b4
YQ
18132016-02-10 Yao Qi <yao.qi@linaro.org>
1814
1815 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1816
1e94266c
SM
18172016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1820 to AC_OUTPUT.
1821 * configure: Regenerate.
1822
8adce034
SM
18232016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1826 void * to gdb_byte *.
1827 * linux-low.c (siginfo_fixup): Likewise.
1828 (linux_xfer_siginfo): Likewise.
1829 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1830 Likewise.
1831 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1832
93813b37
WT
18332016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1834
1835 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1836 to srv_tgtobj.
1837 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1838 to srv_tgtobj.
1839 * linux-x86-low.c [__x86_64__]: Include
1840 "nat/amd64-linux-siginfo.h".
1841 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1842 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1843 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1844 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1845 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1846 (cpt_si_fd, si_timerid, si_overrun): Move from
1847 nat/amd64-linux-siginfo.c.
1848 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1849
8424cc97
SM
18502016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1851
1852 * server.c (skip_to_semicolon): Remove.
1853 (process_point_options): Use strchrnul instead of
1854 skip_to_semicolon.
1855
4d18591b
YQ
18562016-01-26 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1859 * linux-low.c (install_software_single_step_breakpoints): Don't
1860 call regcache_read_pc.
1861 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1862 argument pc.
1863
d8020970
YQ
18642016-01-26 Yao Qi <yao.qi@linaro.org>
1865
1866 * linux-low.c (install_software_single_step_breakpoints): Call
1867 regcache_read_pc instead of get_pc.
1868
8b207339
YQ
18692016-01-26 Yao Qi <yao.qi@linaro.org>
1870
1871 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1872 (unblock_async_io): Rename to ...
1873 (block_unblock_async_io): ... it. New function.
1874 (enable_async_io): Don't install SIGIO handler. Unblock it
1875 instead.
1876 (disable_async_io): Don't ignore SIGIO. Block it instead.
1877 (initialize_async_io): Install SIGIO handler. Don't call
1878 unblock_async_io.
1879
18879fef
YQ
18802016-01-26 Yao Qi <yao.qi@linaro.org>
1881
1882 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1883 first character is '\003', call *the_target->request_interrupt.
1884
a0f8e08a
YQ
18852016-01-25 Yao Qi <yao.qi@linaro.org>
1886
1887 * remote-utils.c (new_thread_notify): Remove.
1888 (dead_thread_notify): Likewise.
1889 * remote-utils.h (new_thread_notify): Remove declaration.
1890 (dead_thread_notify): Likewise.
1891
cc5fd9ab
MK
18922016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1893
1894 * gdb.trace/pending.exp: Fix expected message on continue.
1895
99e8eb11
MK
18962016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1897
1898 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1899 it works properly on big-endian machines where sizeof (CORE_ADDR)
1900 != sizeof (void *).
1901
a994041d
PA
19022016-01-21 Pedro Alves <palves@redhat.com>
1903
1904 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1905 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1906 * configure: Regenerate.
1907
f7a6a40d
YQ
19082016-01-21 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1911 is_thumb and set it according to CPSR saved on the stack.
1912 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1913 arm_sigreturn_next_pc.
1914
6f69e520
YQ
19152016-01-18 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-low.c (linux_set_pc_64bit): New function.
1918 (linux_get_pc_64bit): New function.
1919 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1920 Declare.
1921 * linux-sparc-low.c (debug_threads): Remove declaration.
1922 (sparc_get_pc): Remove.
1923 (the_low_target): Use linux_get_pc_64bit instead of
1924 sparc_get_pc.
1925 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1926 (the_low_target): Use linux_get_pc_64bit and
1927 linux_set_pc_64bit.
1928
276d4552
YQ
19292016-01-18 Yao Qi <yao.qi@linaro.org>
1930
1931 * linux-arm-low.c (debug_threads): Remove declaration.
1932 (arm_get_pc, arm_set_pc): Remove.
1933 (the_low_target): Use linux_get_pc_32bit and
1934 linux_set_pc_32bit.
1935 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1936 (the_low_target): Use linux_get_pc_32bit and
1937 linux_set_pc_32bit.
1938 * linux-cris-low.c (debug_threads): Remove declaration.
1939 (cris_get_pc, cris_set_pc,): Remove.
1940 (the_low_target): Use linux_get_pc_32bit and
1941 linux_set_pc_32bit.
1942 * linux-crisv32-low.c (debug_threads): Remove declaration.
1943 (cris_get_pc, cris_set_pc): Remove.
1944 (the_low_target): Use linux_get_pc_32bit and
1945 linux_set_pc_32bit.
1946 * linux-low.c: Include inttypes.h.
1947 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1948 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1949 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1950 (the_low_target): Use linux_get_pc_32bit and
1951 linux_set_pc_32bit.
1952 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1953 (the_low_target): Use linux_get_pc_32bit and
1954 linux_set_pc_32bit.
1955 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1956 (the_low_target): Use linux_get_pc_32bit and
1957 linux_set_pc_32bit.
1958 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1959 (the_low_target): Use linux_get_pc_32bit and
1960 linux_set_pc_32bit.
1961 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1962 (the_low_target): Use linux_get_pc_32bit and
1963 linux_set_pc_32bit.
1964
eb0edac8
GB
19652016-01-18 Gary Benson <gbenson@redhat.com>
1966
1967 * configure.ac (AC_FUNC_FORK): New check.
1968 * config.in: Regenerate.
1969 * configure: Likewise.
1970
1b451dda
YQ
19712016-01-14 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1974 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1975 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1976 arm_get_next_pcs_ctor.
1977
82075af2
JS
19782016-01-12 Josh Stone <jistone@redhat.com>
1979 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1980
1981 * inferiors.h: Include "gdb_vecs.h".
1982 (struct process_info): Add syscalls_to_catch.
1983 * inferiors.c (remove_process): Free syscalls_to_catch.
1984 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1985 syscall_return stops.
1986 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1987 * server.c (handle_general_set): Handle QCatchSyscalls.
1988 (handle_query): Report support for QCatchSyscalls.
1989 * target.h (struct target_ops): Add supports_catch_syscall.
1990 (target_supports_catch_syscall): New macro.
1991 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1992 (struct lwp_info): Add syscall_state.
1993 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1994 Maintain syscall_state and syscalls_to_catch across exec.
1995 (get_syscall_trapinfo): New function, proxy to the_low_target.
1996 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1997 (linux_low_filter_event): Toggle syscall_state entry/return for
1998 syscall traps, and set it ignored for all others.
1999 (gdb_catching_syscalls_p): New function.
2000 (gdb_catch_this_syscall_p): New function.
2001 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2002 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2003 (linux_supports_catch_syscall): New function.
2004 (linux_target_ops): Install it.
2005 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2006 (the_low_target): Install it.
2007
8f13a3ce
MF
20082016-01-12 Mike Frysinger <vapier@gentoo.org>
2009
2010 * acinclude.m4: Include new ../warning.m4 file.
2011 * configure: Regenerated.
2012 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2013
5b3da067
MF
20142016-01-12 Mike Frysinger <vapier@gentoo.org>
2015
2016 * ax.c (is_goto_target): Mark static.
2017 * linux-low.c (register_addr): Likewise.
2018 (linux_fetch_registers, linux_store_registers): Likewise.
2019 * mem-break.c (any_persistent_commands): Fix old prototype.
2020 (add_commands_to_breakpoint): Mark static.
2021 * regcache.c (find_register_by_name): Delete unused func.
2022 * remote-utils.c (hex_or_minus_one): Mark static.
2023 * server.c (monitor_show_help): Mark static.
2024 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2025 handle_v_requests): Likewise.
2026
bc504a31
PA
20272016-01-12 Pedro Alves <palves@redhat.com>
2028
2029 Remove use of the registered trademark symbol throughout.
2030
5a0dd67a
YQ
20312016-01-08 Yao Qi <yao.qi@linaro.org>
2032
2033 * remote-utils.c (getpkt): If c is '\003', call target hook
2034 request_interrupt.
2035
b2ca446f
YQ
20362016-01-06 Yao Qi <yao.qi@linaro.org>
2037
2038 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2039 linux-aarch32-low.c.
2040 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2041 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2042 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2043 (thumb2_breakpoint): Declare.
2044 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2045 linux-aarch32-low.h.
2046 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2047 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2048 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2049
edd88788
JB
20502016-01-01 Joel Brobecker <brobecker@adacore.com>
2051
2052 * gdbreplay.c (gdbreplay_version): Change copyright year in
2053 version message.
2054 * server.c (gdbserver_version): Likewise.
2055
65da7f14
PP
20562015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2057
2058 * server.c (crc32_table): Delete.
2059 (crc32): Use libiberty's xcrc32 function.
2060
4abd5ed2
JB
20612015-12-22 Joel Brobecker <brobecker@adacore.com>
2062
2063 * lynx-low.c (lynx_delete_thread_callback): New function.
2064 (lynx_mourn): Properly delete our process and all of its
2065 threads. Remove call to clear_inferiors.
2066
0e50fe5c
JB
20672015-12-22 Joel Brobecker <brobecker@adacore.com>
2068
2069 * target.c (thread_search_callback): Add check that
2070 the thread_stopped target callback is not NULL before
2071 calling it.
2072
35adc03f
YQ
20732015-12-21 Yao Qi <yao.qi@linaro.org>
2074
2075 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2076 arm breakpoint.
2077
bd2b2909
AT
20782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2079
2080 * server.c (handle_query): Call target_supports_software_single_step.
2081
7fe5e27e
AT
20822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2083
2084 * linux-low.c (single_step): New function.
2085 (linux_resume_one_lwp_throw): Call single_step.
2086 (start_step_over): Likewise.
2087
d9311bfa
AT
20882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2089
2090 * Makefile.in (SFILES): Append arch/arm-linux.c,
2091 arch/arm-get-next-pcs.c.
2092 (arm-linux.o): New rule.
2093 (arm-get-next-pcs.o): New rule.
2094 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2095 arm-linux.o.
2096 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2097 to linux-aarch32-low.c.
2098 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2099 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2100 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2101 (thumb2_breakpoint_len): Likewise.
2102 (arm_is_thumb_mode): Make non-static.
2103 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2104 from linux-aarch32-low.c.
2105 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2106 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2107 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2108 (thumb2_breakpoint_len): Likewise.
2109 (arm_is_thumb_mode): New declaration.
2110 * linux-arm-low.c: Include arch/arm-linux.h
2111 aarch/arm-get-next-pcs.h, sys/syscall.h.
2112 (get_next_pcs_ops): New struct.
2113 (get_next_pcs_addr_bits_remove): New function.
2114 (get_next_pcs_is_thumb): New function.
2115 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2116 (arm_sigreturn_next_pc): Likewise.
2117 (get_next_pcs_syscall_next_pc): Likewise.
2118 (arm_gdbserver_get_next_pcs): Likewise.
2119 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2120 Initialize.
2121 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2122 * server.h: Include gdb_vecs.h.
2123
68ce2059
AT
21242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2125
2126 * Makefile.in (SFILES): Append common/common-regcache.c.
2127 (OBS): Append common-regcache.o.
2128 (common-regcache.o): New rule.
2129 * regcache.c (init_register_cache): Initialize cache to
2130 REG_UNAVAILABLE.
2131 (regcache_raw_read_unsigned): New function.
2132 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2133 register_status enum.
2134
fa5308bd
AT
21352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2136
2137 * linux-aarch64-low.c (the_low_targets): Rename
2138 breakpoint_reinsert_addr to get_next_pcs.
2139 * linux-arm-low.c (the_low_targets): Likewise.
2140 * linux-bfin-low.c (the_low_targets): Likewise.
2141 * linux-cris-low.c (the_low_targets): Likewise.
2142 * linux-crisv32-low.c (the_low_targets): Likewise.
2143 * linux-low.c (can_software_single_step): Likewise.
2144 (install_software_single_step_breakpoints): New function.
2145 (start_step_over): Use install_software_single_step_breakpoints.
2146 * linux-low.h: New CORE_ADDR vector.
2147 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2148 get_next_pcs.
2149 * linux-mips-low.c (the_low_targets): Likewise.
2150 * linux-nios2-low.c (the_low_targets): Likewise.
2151 * linux-sparc-low.c (the_low_targets): Likewise.
2152
4a6ed09b
PA
21532015-12-17 Pedro Alves <palves@redhat.com>
2154
2155 * linux-low.c (linux_kill_one_lwp): Remove references to
2156 LinuxThreads.
2157 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2158 to 'kill'.
2159 (linux_init_signals): Delete.
2160 (initialize_low): Adjust.
2161 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2162
7544db95
PA
21632015-12-16 Pedro Alves <palves@redhat.com>
2164
2165 * configure.ac (compiler warning flags): When testing a
2166 -Wno-foo option, check whether -Wfoo works instead.
2167 * configure: Regenerate.
2168
8020350c
DB
21692015-12-11 Don Breazeal <donb@codesourcery.com>
2170
2171 * server.c (process_serial_event): Don't exit from gdbserver
2172 in remote mode if there are still active inferiors.
2173
db91f502
YQ
21742015-12-11 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2177 arm_breakpoint_at if the process is 32-bit.
2178
b37a6290
YQ
21792015-12-11 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2182 arm breakpoint.
2183
17b1509a
YQ
21842015-12-07 Yao Qi <yao.qi@linaro.org>
2185
2186 * configure.srv: Append arm.o to srv_tgtobj for
2187 aarch64*-*-linux* target.
2188 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2189 from linux-arm-low.c.
2190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2191 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2192 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2193 (thumb2_breakpoint_len): Likewise.
2194 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2195 (arm_breakpoint_kinds): Likewise.
2196 (arm_breakpoint_kind_from_pc): Likewise.
2197 (arm_sw_breakpoint_from_kind): Likewise.
2198 (arm_breakpoint_kind_from_current_state): Likewise.
2199 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2200 (arm_sw_breakpoint_from_kind): Declare.
2201 (arm_breakpoint_kind_from_current_state): Declare.
2202 (arm_breakpoint_at): Declare.
2203 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2204 arm_sw_breakpoint_from_kind if process is 32-bit.
2205 (aarch64_breakpoint_kind_from_pc): New function.
2206 (aarch64_breakpoint_kind_from_current_state): New function.
2207 (the_low_target): Initialize fields breakpoint_kind_from_pc
2208 and breakpoint_kind_from_current_state.
2209 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2210 linux-aarch32-low.c.
2211 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2212 (arm_breakpoint, arm_breakpoint_len): Likewise.
2213 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2214 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2215 (arm_is_thumb_mode): Likewise.
2216 (arm_breakpoint_at): Likewise.
2217 (arm_breakpoint_kind_from_pc): Likewise.
2218 (arm_sw_breakpoint_from_kind): Likewise.
2219 (arm_breakpoint_kind_from_current_state): Likewise.
2220
2221 Revert:
2222 2015-08-04 Yao Qi <yao.qi@linaro.org>
2223
2224 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2225 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2226 * server.c (extended_protocol): Remove "static".
2227 * server.h (extended_protocol): Declare it.
2228
ece66d65
JS
22292015-12-04 Josh Stone <jistone@redhat.com>
2230
2231 * target.h (struct target_ops) <arch_setup>: Rename to ...
2232 (struct target_ops) <post_create_inferior>: ... this.
2233 (target_arch_setup): Rename to ...
2234 (target_post_create_inferior): ... this, calling post_create_inferior.
2235 * server.c (start_inferior): Update target_arch_setup calls to
2236 target_post_create_inferior.
2237 * linux-low.c (linux_low_ptrace_options): Forward declare.
2238 (linux_arch_setup): Update its comment for general use.
2239 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2240 (struct linux_target_ops): Use linux_post_create_inferior.
2241 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2242 to post_create_inferior.
2243 * nto-low.c (struct nto_target_ops): Likewise.
2244 * spu-low.c (struct spu_target_ops): Likewise.
2245 * win32-low.c (struct win32_target_ops): Likewise.
2246
e58c48b4
AT
22472015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2248
2249 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2250
fbec8956
AT
22512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2252
2253 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2254 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2255 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2256 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2257 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2258 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2259 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2260 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2261 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2262 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2263 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2264 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2265
9b4c5f87
AT
22662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2267
2268 * linux-low.c (linux_look_up_symbols): Don't call
2269 linux_supports_traceclone.
2270 * linux-low.h (thread_db_init): Remove use_events argument.
2271 * thread-db.c (thread_db_use_event): Remove global variable.
2272 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2273 (struct thread_db) <td_create_bp>: Remove field.
2274 (thread_db_create_event): Remove function.
2275 (thread_db_enable_reporting): Likewise.
2276 (find_one_thread): Don't check for thread_db_use_events.
2277 (attach_thread): Likewise.
2278 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2279 (try_thread_db_load_1): Don't check for thread_db_use_events.
2280 (thread_db_init): Remove use_events argument and thread events
2281 handling.
2282 (remove_thread_event_breakpoints): Remove function.
2283 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2284
7d00775e
AT
22852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2286
2287 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2288 New function.
2289 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2290 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2291 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2292 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2293 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2294 Initialize.
2295 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2296 New function.
2297 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2298 * linux-low.c (can_hardware_single_step): Use
2299 supports_hardware_single_step.
2300 (can_software_single_step): New function.
2301 (start_step_over): Call can_software_single_step.
2302 (linux_supports_hardware_single_step): New function.
2303 (struct target_ops) <supports_software_single_step>: Initialize.
2304 * linux-low.h (struct linux_target_ops)
2305 <supports_hardware_single_step>: Initialize.
2306 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2307 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2308 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2309 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2310 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2311 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2312 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2313 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2314 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2315 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2316 Initialize.
2317 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2318 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2319 Initialize.
2320 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2321 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2322 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2323 New function.
2324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2325 * target.h (struct target_ops): <supports_software_single_step>:
2326 New field.
2327 (target_supports_software_single_step): New macro.
2328
2d97cd35
AT
23292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2330
2331 * linux-low.c (linux_wait_1): Fix pc advance condition.
2332 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2333 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2334
769ef81f
AT
23352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2336
2337 * linux-arm-low.c (arm_is_thumb_mode): New function.
2338 (arm_breakpoint_at): Use arm_is_thumb_mode.
2339 (arm_breakpoint_kind_from_current_state): New function.
2340 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2341 Initialize.
2342 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2343 (linux_breakpoint_kind_from_current_state): New function.
2344 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2345 * linux-low.h (struct linux_target_ops)
2346 <breakpoint_kind_from_current_state>: New field.
2347 * target.h (struct target_ops): Likewise.
2348 (target_breakpoint_kind_from_current_state): New macro.
2349
1bebeeca
PA
23502015-11-30 Pedro Alves <palves@redhat.com>
2351
2352 * linux-low.c (linux_resume): Wake up the event loop before
2353 returning.
2354
a67a9fae
PA
23552015-11-30 Pedro Alves <palves@redhat.com>
2356
2357 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2358 check.
2359 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2360 to -1.
2361 * target.c (struct thread_search): New structure.
2362 (thread_search_callback): New function.
2363 (prev_general_thread): New global.
2364 (prepare_to_access_memory, done_accessing_memory): New functions.
2365 * target.h (prepare_to_access_memory, done_accessing_memory):
2366 Replace macros with function declarations.
2367
f2faf941
PA
23682015-11-30 Pedro Alves <palves@redhat.com>
2369
2370 PR 14618
2371 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2372 report TARGET_WAITKIND_NO_RESUMED.
2373 * remote-utils.c (prepare_resume_reply): Handle
2374 TARGET_WAITKIND_NO_RESUMED.
2375 * server.c (report_no_resumed): New global.
2376 (handle_query) <qSupported>: Handle "no-resumed+". Report
2377 "no-resumed+" support.
2378 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2379 return error if the client doesn't support no-resumed events.
2380 (push_stop_notification): New function.
2381 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2382 events if the client supports them.
2383
a681f9c9
PA
23842015-11-30 Pedro Alves <palves@redhat.com>
2385
2386 * linux-low.c (thread_still_has_status_pending_p): Don't check
2387 vCont;t here.
2388 (lwp_resumed): New function.
2389 (status_pending_p_callback): Return early if the LWP is not
2390 supposed to be resumed.
2391
65706a29
PA
23922015-11-30 Pedro Alves <palves@redhat.com>
2393
2394 * linux-low.c (handle_extended_wait): Assert that the LWP's
2395 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2396 thread create events, leave the new child's status pending.
2397 (linux_low_filter_event): If GDB wants to hear about thread exit
2398 events, leave the LWP marked dead and don't delete it.
2399 (linux_wait_for_event_filtered): Don't check for thread exit.
2400 (filter_exit_event): New function.
2401 (linux_wait_1): Use it, when returning an exit event.
2402 (linux_resume_one_lwp_throw): Assert that the LWP's
2403 waitstatus is TARGET_WAITKIND_IGNORE.
2404 * remote-utils.c (prepare_resume_reply): Handle
2405 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2406 * server.c (report_thread_events): New global.
2407 (handle_general_set): Handle QThreadEvents.
2408 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2409 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2410 TARGET_WAITKIND_THREAD_EXITED.
2411 * server.h (report_thread_events): Declare.
2412
56cf4bed
PA
24132015-11-30 Pedro Alves <palves@redhat.com>
2414
2415 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2416 the thread's last_resume_kind was resume_stop.
2417
500c1d85
PA
24182015-11-30 Pedro Alves <palves@redhat.com>
2419
2420 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2421 before returning.
2422
de979965
PA
24232015-11-30 Pedro Alves <palves@redhat.com>
2424
2425 * server.c (handle_v_requests): Handle vCtrlC.
2426
34c65914
PA
24272015-11-30 Pedro Alves <palves@redhat.com>
2428
2429 * gdbthread.h (find_any_thread_of_pid): Declare.
2430 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2431 functions.
2432 * server.c (handle_query): If current_thread is NULL, look for
2433 another thread of the selected process.
2434
79efa585 24352015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2436 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2437
2438 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2439 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2440 name in reply.
2441 * target.h (struct target_ops) <thread_name>: New field.
2442 (target_thread_name): New macro.
2443
80d82c19
JB
24442015-11-23 Joel Brobecker <brobecker@adacore.com>
2445
2446 * regcache.h (regcache_invalidate_pid): Add declaration.
2447 * regcache.c (regcache_invalidate_pid): New function, extracted
2448 from regcache_invalidate.
2449 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2450 Add trivial documentation comment.
2451 * lynx-low.c: Use regcache_invalidate_pid instead of
2452 regcache_invalidate.
2453
64da5dd5
JB
24542015-11-23 Joel Brobecker <brobecker@adacore.com>
2455
2456 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2457 and Elf64_auxv_t if the target is Android.
2458
37ce4055
DE
24592015-11-22 Doug Evans <xdje42@gmail.com>
2460
2461 * target.h: #include <sys/types.h>.
2462
06e03fff
PA
24632015-11-19 Pedro Alves <palves@redhat.com>
2464
2465 * linux-low.c (linux_process_qsupported): Change prototype.
2466 Adjust.
2467 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2468 Change prototype.
2469 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2470 and adjust to loop over all features.
2471 * server.c (handle_query) <qSupported>: Adjust to call
2472 target_process_qsupported once, passing it a vector of unprocessed
2473 features.
2474 * target.h (struct target_ops) <process_qsupported>: Change
2475 prototype.
2476 (target_process_qsupported): Adjust.
2477
9a084706
PA
24782015-11-19 Pedro Alves <palves@redhat.com>
2479
2480 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2481 mode.
2482 * configure: Regenerate.
2483
dad44a1f
PA
24842015-11-19 Pedro Alves <palves@redhat.com>
2485
2486 * configure: Regenerate.
2487
231c0592
YQ
24882015-11-19 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2491 type to uint32_t.
2492
6c1c9a8b
YQ
24932015-11-19 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2496 (struct aarch64_operand): Move enum out.
2497
9caa3311
YQ
24982015-11-19 Yao Qi <yao.qi@linaro.org>
2499
2500 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2501 struct user_fpsimd_state *.
2502 (aarch64_store_fpregset): Likewise.
2503
6a69a054
YQ
25042015-11-19 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2507 struct user_pt_regs *.
2508 (aarch64_store_gregset): Likewise.
2509
1798301e
PA
25102015-11-18 Pedro Alves <palves@redhat.com>
2511
2512 * Makefile.in (all_object_files): Add $IPA_OBJS.
2513
ce7715e2
PA
25142015-11-17 Pedro Alves <palves@redhat.com>
2515
2516 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2517 GDB_SIGNAL_0 and gdb_signal_to_string.
2518
c0879059
PA
25192015-11-17 Pedro Alves <palves@redhat.com>
2520
2521 * win32-low.c (handle_output_debug_string): Remove parameter.
2522 (win32_kill): Remove our_status local and adjust call to
2523 handle_output_debug_string.
2524 (get_child_debug_event): Adjust call to
2525 handle_output_debug_string.
2526
1996e237
SM
25272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2528
2529 * linux-mips-low.c (mips_fill_gregset): Add cast.
2530 (mips_store_gregset): Likewise.
2531 (mips_fill_fpregset): Likewise.
2532 (mips_store_fpregset): Likewise.
2533
cbec665b
SM
25342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2535
2536 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2537 priv.
2538
eb3e3c67
SM
25392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2540
2541 * linux-mips-low.c (mips_linux_new_thread): Change type of
2542 watch_type to enum target_hw_bp_type.
2543
171de4b8
SM
25442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2545
2546 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2547 Change return type to arm_hwbp_type.
2548
04248ead
SM
25492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2550
2551 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2552 (arm_store_gregset): Likewise.
2553 * linux-arm-low.c (arm_get_hwcap): Likewise.
2554 (arm_read_description): Likewise.
2555
04b3479c
SM
25562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2557
2558 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2559
2bc84e8a
SM
25602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2561
2562 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2563 (ppc_fill_vsxregset): Likewise.
2564 (ppc_store_vsxregset): Likewise.
2565 (ppc_fill_vrregset): Likewise.
2566 (ppc_store_vrregset): Likewise.
2567 (ppc_fill_evrregset): Likewise.
2568 (ppc_store_evrregset): Likewise.
2569
e6c5bb05
SM
25702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2571
2572 * linux-ppc-low.c (ppc_usrregs_info): Remove
2573 forward-declaration.
2574 (ppc_arch_setup): Move lower in file.
2575
7ea45d72
SM
25762015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2579 (ps_pdwrite): Likewise.
2580
69291610
HW
25812015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2582
2583 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2584 to after assert checks.
2585
b42945fd
SM
25862015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2587
2588 * proc-service.c (ps_pdread): Add/adjust casts.
2589 (ps_pdwrite): Add/adjust casts.
2590
d6f85c84
SM
25912015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2592
2593 * server.c (handle_search_memory_1): Cast return value of
2594 memmem.
2595
f98cd059
SM
25962015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2597
2598 * server.c (write_qxfer_response): Change type of data to
2599 gdb_byte *.
2600
d2412fa5
PA
26012015-10-29 Pedro Alves <palves@redhat.com>
2602
2603 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2604
c17414a2
PA
26052015-10-29 Pedro Alves <palves@redhat.com>
2606
2607 * tracepoint.c (clear_installed_tracepoints): Add casts.
2608
e053fbc4
PA
26092015-10-29 Pedro Alves <palves@redhat.com>
2610
2611 * server.c (handle_v_cont, process_serial_event): Add enum
2612 gdb_signal casts to signal parsing code.
2613
add67df8
PA
26142015-10-29 Pedro Alves <palves@redhat.com>
2615
2616 * linux-low.h (NULL_REGSET): Define.
2617 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2618 * linux-arm-low.c (arm_regsets): Likewise.
2619 * linux-crisv32-low.c (cris_regsets): Likewise.
2620 * linux-m68k-low.c (m68k_regsets): Likewise.
2621 * linux-mips-low.c (mips_regsets): Likewise.
2622 * linux-nios2-low.c (nios2_regsets): Likewise.
2623 * linux-ppc-low.c (ppc_regsets): Likewise.
2624 * linux-s390-low.c (s390_regsets): Likewise.
2625 * linux-sh-low.c (sh_regsets): Likewise.
2626 * linux-sparc-low.c (sparc_regsets): Likewise.
2627 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2628 * linux-tile-low.c (tile_regsets): Likewise.
2629 * linux-x86-low.c (x86_regsets): Likewise.
2630 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2631
50bc912a
PA
26322015-10-29 Pedro Alves <palves@redhat.com>
2633
2634 * linux-low.h (NULL_REGSET): Define.
2635 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2636 * linux-arm-low.c (arm_regsets): Likewise.
2637 * linux-crisv32-low.c (cris_regsets): Likewise.
2638 * linux-m68k-low.c (m68k_regsets): Likewise.
2639 * linux-mips-low.c (mips_regsets): Likewise.
2640 * linux-nios2-low.c (nios2_regsets): Likewise.
2641 * linux-ppc-low.c (ppc_regsets): Likewise.
2642 * linux-s390-low.c (s390_regsets): Likewise.
2643 * linux-sh-low.c (sh_regsets): Likewise.
2644 * linux-sparc-low.c (sparc_regsets): Likewise.
2645 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2646 * linux-tile-low.c (tile_regsets): Likewise.
2647 * linux-x86-low.c (x86_regsets): Likewise.
2648 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2649
682b2546
DE
26502015-10-26 Doug Evans <dje@google.com>
2651
2652 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2653
963843d4
DE
26542015-10-26 Doug Evans <dje@google.com>
2655
2656 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2657
d41401ac
DE
26582015-10-26 Doug Evans <dje@google.com>
2659
2660 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2661 for debug_printf.
2662 (attach_thread, find_new_threads_callback): Ditto.
2663
3db28855
AT
26642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2665
2666 * mem-break.h (set_breakpoint_data): Remove.
2667
fb78e89c
AT
26682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2669
2670 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2671 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2672 (initialize_low): Remove set_breakpoint_data call.
2673 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2674 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2675 (initialize_low): Remove set_breakpoint_data call.
2676 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2677 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2678 (initialize_low): Remove set_breakpoint_data call.
2679
2e6ee069
AT
26802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2681
2682 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2683 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2684 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2685 * target.h (target_breakpoint_kind_from_pc): New macro.
2686
1652a986
AT
26872015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2688
2689 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2690 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2691 the default breakpoint kind.
2692
abeead09
AT
26932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2694
2695 * linux-arm-low.c (arm_supports_z_point_type): Add software
2696 breakpoint support.
2697
b0b4b501
AT
26982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2699
2700 * linux-arm-low.c: Refactor breakpoint definitions.
2701 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2702 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2703
8689682c
AT
27042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 * Makefile.in: Add arm.c/o.
2707 * configure.srv: Likewise.
2708 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2709 (arm_breakpoint_kind_from_pc): New function.
2710 (arm_sw_breakpoint_from_kind): Return proper kind.
2711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2712
27165294
AT
27132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2714
2715 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2716 removal.
2717 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2718 (struct raw_breakpoint) <size>: Remove.
2719 (struct raw_breakpoint) <kind>: Add.
2720 (bp_size): New function.
2721 (bp_opcode): Likewise.
2722 (find_raw_breakpoint_at): Adjust for kind.
2723 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2724 (remove_memory_breakpoint): Adjust for kind call bp_size.
2725 (set_raw_breakpoint_at): Adjust for kind.
2726 (set_breakpoint): Likewise.
2727 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2728 (delete_raw_breakpoint): Adjust for kind.
2729 (delete_breakpoint): Likewise.
2730 (find_gdb_breakpoint): Likewise.
2731 (set_gdb_breakpoint_1): Likewise.
2732 (set_gdb_breakpoint): Likewise.
2733 (delete_gdb_breakpoint_1): Likewise.
2734 (delete_gdb_breakpoint): Likewise.
2735 (uninsert_raw_breakpoint): Likewise.
2736 (reinsert_raw_breakpoint): Likewise.
2737 (set_breakpoint_data): Remove.
2738 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2739 (check_mem_read): Adjust for kind call bp_size.
2740 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2741 (clone_one_breakpoint): Adjust for kind.
2742 * mem-break.h (set_gdb_breakpoint): Likewise.
2743 (delete_gdb_breakpoint): Likewise.
2744 * server.c (process_serial_event): Likewise.
2745
dd373349
AT
27462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2747
2748 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2749 (struct linux_target_ops) <breakpoint>: Remove.
2750 (struct linux_target_ops) <breakpoint_len>: Remove.
2751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2753 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2754 (arm_sw_breakpoint_from_kind): New function.
2755 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2756 (struct linux_target_ops) <breakpoint>: Remove.
2757 (struct linux_target_ops) <breakpoint_len>: Remove.
2758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2760 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2761 (struct linux_target_ops) <breakpoint>: Remove.
2762 (struct linux_target_ops) <breakpoint_len>: Remove.
2763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2765 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2766 (struct linux_target_ops) <breakpoint>: Remove.
2767 (struct linux_target_ops) <breakpoint_len>: Remove.
2768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2770 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2771 and sw_breakpoint_from_kind to increment the pc.
2772 (linux_breakpoint_kind_from_pc): New function.
2773 (linux_sw_breakpoint_from_kind): New function.
2774 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2775 (initialize_low): Call breakpoint_kind_from_pc and
2776 sw_breakpoint_from_kind to replace breakpoint_data/len.
2777 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2778 New field.
2779 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2780 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2781 (struct linux_target_ops) <breakpoint>: Remove.
2782 (struct linux_target_ops) <breakpoint_len>: Remove.
2783 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2784 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2785 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2786 (struct linux_target_ops) <breakpoint>: Remove.
2787 (struct linux_target_ops) <breakpoint_len>: Remove.
2788 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2789 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2790 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2791 (struct linux_target_ops) <breakpoint>: Remove.
2792 (struct linux_target_ops) <breakpoint_len>: Remove.
2793 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2794 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2795 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2796 (struct linux_target_ops) <breakpoint>: Remove.
2797 (struct linux_target_ops) <breakpoint_len>: Remove.
2798 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2799 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2800 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2801 (struct linux_target_ops) <breakpoint>: Remove.
2802 (struct linux_target_ops) <breakpoint_len>: Remove.
2803 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2804 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2805 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2806 (struct linux_target_ops) <breakpoint>: Remove.
2807 (struct linux_target_ops) <breakpoint_len>: Remove.
2808 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2809 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2810 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2811 (struct linux_target_ops) <breakpoint>: Remove.
2812 (struct linux_target_ops) <breakpoint_len>: Remove.
2813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2814 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2815 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2816 (struct linux_target_ops) <breakpoint>: Remove.
2817 (struct linux_target_ops) <breakpoint_len>: Remove.
2818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2820 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2821 (struct linux_target_ops) <breakpoint>: Remove.
2822 (struct linux_target_ops) <breakpoint_len>: Remove.
2823 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2824 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2825 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2826 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2827 (struct linux_target_ops) <breakpoint>: Remove.
2828 (struct linux_target_ops) <breakpoint_len>: Remove.
2829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2831 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2832 (struct linux_target_ops) <breakpoint>: Remove.
2833 (struct linux_target_ops) <breakpoint_len>: Remove.
2834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2836
4cd98a19
AT
28372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2838
2839 * linux-cris-low.c (cris_get_pc): Remove void arg.
2840
774ee6d2
AR
28412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2842
2843 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2844 variable name.
2845
833dcd29
AR
28462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2847
2848 * inferiors.c (thread_pid_matches_callback): New function.
2849 (find_thread_process): New function.
2850 (remove_thread): Reset current_thread.
2851 (remove_process): Assert threads have been removed first.
2852
8d689ee5
YQ
28532015-10-15 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2856 if it is 3.
2857 (aarch64_remove_point): Likewise.
2858 * regcache.c (regcache_register_size): New function.
2859
1c2e1515
YQ
28602015-10-12 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-aarch64-low.c: Update all callers as emit_load_store
2863 is renamed to aarch64_emit_load_store.
2864
e1c587c3
YQ
28652015-10-12 Yao Qi <yao.qi@linaro.org>
2866
2867 * linux-aarch64-low.c: Update all callers of function renaming
2868 from emit_insn to aarch64_emit_insn.
2869
b6542f81
YQ
28702015-10-12 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2873 arch/aarch64-insn.h.
2874 (struct aarch64_memory_operand): Likewise.
2875 (ENCODE): Likewise.
2876 (emit_insn): Move to arch/aarch64-insn.c.
2877 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2878 (emit_load_store): Move to arch/aarch64-insn.c.
2879 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2880 (can_encode_int32): Remove.
2881
246994ce
YQ
28822015-10-12 Yao Qi <yao.qi@linaro.org>
2883
2884 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2885 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2886 (aarch64_relocate_instruction): Likewise.
2887 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2888 (struct aarch64_insn_visitor): Likewise.
2889
0badd99f
YQ
28902015-10-12 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2893 (struct aarch64_insn_visitor): New.
2894 (struct aarch64_insn_relocation_data): New.
2895 (aarch64_ftrace_insn_reloc_b): New function.
2896 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2897 (aarch64_ftrace_insn_reloc_cb): Likewise.
2898 (aarch64_ftrace_insn_reloc_tb): Likewise.
2899 (aarch64_ftrace_insn_reloc_adr): Likewise.
2900 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2901 (aarch64_ftrace_insn_reloc_others): Likewise.
2902 (visitor): New.
2903 (aarch64_relocate_instruction): Use visitor.
2904
dfaffe9d
YQ
29052015-10-12 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2908 int. Add argument buf.
2909 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2910 aarch64_relocate_instruction.
2911
70b439f0
YQ
29122015-10-12 Yao Qi <yao.qi@linaro.org>
2913
2914 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2915 argument insn. Remove local variable insn. Don't call
2916 target_read_uint32.
2917 (aarch64_install_fast_tracepoint_jump_pad): Call
2918 target_read_uint32.
2919
7781c06f
YQ
29202015-09-30 Yao Qi <yao.qi@linaro.org>
2921
2922 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2923 (emit_load_store_pair): Likewise.
2924
9a3c8263
SM
29252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2926
2927 * dll.c (match_dll): Add cast(s).
2928 (unloaded_dll): Likewise.
2929 * linux-low.c (second_thread_of_pid_p): Likewise.
2930 (delete_lwp_callback): Likewise.
2931 (count_events_callback): Likewise.
2932 (select_event_lwp_callback): Likewise.
2933 (linux_set_resume_request): Likewise.
2934 * server.c (accumulate_file_name_length): Likewise.
2935 (emit_dll_description): Likewise.
2936 (handle_qxfer_threads_worker): Likewise.
2937 (visit_actioned_threads): Likewise.
2938 * thread-db.c (any_thread_of): Likewise.
2939 * tracepoint.c (same_process_p): Likewise.
2940 (match_blocktype): Likewise.
2941 (build_traceframe_info_xml): Likewise.
2942
224c3ddb
SM
29432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2944
2945 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2946 assignment.
2947 (gdb_unparse_agent_expr): Likewise.
2948 * hostio.c (require_data): Likewise.
2949 (handle_pread): Likewise.
2950 * linux-low.c (disable_regset): Likewise.
2951 (fetch_register): Likewise.
2952 (store_register): Likewise.
2953 (get_dynamic): Likewise.
2954 (linux_qxfer_libraries_svr4): Likewise.
2955 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2956 (set_fast_tracepoint_jump): Likewise.
2957 (uninsert_fast_tracepoint_jumps_at): Likewise.
2958 (reinsert_fast_tracepoint_jumps_at): Likewise.
2959 (validate_inserted_breakpoint): Likewise.
2960 (clone_agent_expr): Likewise.
2961 * regcache.c (init_register_cache): Likewise.
2962 * remote-utils.c (putpkt_binary_1): Likewise.
2963 (decode_M_packet): Likewise.
2964 (decode_X_packet): Likewise.
2965 (look_up_one_symbol): Likewise.
2966 (relocate_instruction): Likewise.
2967 (monitor_output): Likewise.
2968 * server.c (handle_search_memory): Likewise.
2969 (handle_qxfer_exec_file): Likewise.
2970 (handle_qxfer_libraries): Likewise.
2971 (handle_qxfer): Likewise.
2972 (handle_query): Likewise.
2973 (handle_v_cont): Likewise.
2974 (handle_v_run): Likewise.
2975 (captured_main): Likewise.
2976 * target.c (write_inferior_memory): Likewise.
2977 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2978 * tracepoint.c (init_trace_buffer): Likewise.
2979 (add_tracepoint_action): Likewise.
2980 (add_traceframe): Likewise.
2981 (add_traceframe_block): Likewise.
2982 (cmd_qtdpsrc): Likewise.
2983 (cmd_qtdv): Likewise.
2984 (cmd_qtstatus): Likewise.
2985 (response_source): Likewise.
2986 (response_tsv): Likewise.
2987 (cmd_qtnotes): Likewise.
2988 (gdb_collect): Likewise.
2989 (initialize_tracepoint): Likewise.
2990
afbe19f8
PL
29912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2992
2993 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2994 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2995 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2996 <NOP>: New.
2997 (enum aarch64_condition_codes): New enum.
2998 (w0): New static global.
2999 (fp): Likewise.
3000 (lr): Likewise.
3001 (struct aarch64_memory_operand) <type>: New
3002 MEMORY_OPERAND_POSTINDEX type.
3003 (postindex_memory_operand): New helper function.
3004 (emit_ret): New function.
3005 (emit_load_store_pair): New function, factored out of emit_stp
3006 with support for MEMORY_OPERAND_POSTINDEX.
3007 (emit_stp): Rewrite using emit_load_store_pair.
3008 (emit_ldp): New function.
3009 (emit_load_store): Likewise.
3010 (emit_ldr): Mention post-index instruction in comment.
3011 (emit_ldrh): New function.
3012 (emit_ldrb): New function.
3013 (emit_ldrsw): Mention post-index instruction in comment.
3014 (emit_str): Likewise.
3015 (emit_subs): New function.
3016 (emit_cmp): Likewise.
3017 (emit_and): Likewise.
3018 (emit_orr): Likewise.
3019 (emit_orn): Likewise.
3020 (emit_eor): Likewise.
3021 (emit_mvn): Likewise.
3022 (emit_lslv): Likewise.
3023 (emit_lsrv): Likewise.
3024 (emit_asrv): Likewise.
3025 (emit_mul): Likewise.
3026 (emit_sbfm): Likewise.
3027 (emit_sbfx): Likewise.
3028 (emit_ubfm): Likewise.
3029 (emit_ubfx): Likewise.
3030 (emit_csinc): Likewise.
3031 (emit_cset): Likewise.
3032 (emit_nop): Likewise.
3033 (emit_ops_insns): New helper function.
3034 (emit_pop): Likewise.
3035 (emit_push): Likewise.
3036 (aarch64_emit_prologue): New function.
3037 (aarch64_emit_epilogue): Likewise.
3038 (aarch64_emit_add): Likewise.
3039 (aarch64_emit_sub): Likewise.
3040 (aarch64_emit_mul): Likewise.
3041 (aarch64_emit_lsh): Likewise.
3042 (aarch64_emit_rsh_signed): Likewise.
3043 (aarch64_emit_rsh_unsigned): Likewise.
3044 (aarch64_emit_ext): Likewise.
3045 (aarch64_emit_log_not): Likewise.
3046 (aarch64_emit_bit_and): Likewise.
3047 (aarch64_emit_bit_or): Likewise.
3048 (aarch64_emit_bit_xor): Likewise.
3049 (aarch64_emit_bit_not): Likewise.
3050 (aarch64_emit_equal): Likewise.
3051 (aarch64_emit_less_signed): Likewise.
3052 (aarch64_emit_less_unsigned): Likewise.
3053 (aarch64_emit_ref): Likewise.
3054 (aarch64_emit_if_goto): Likewise.
3055 (aarch64_emit_goto): Likewise.
3056 (aarch64_write_goto_address): Likewise.
3057 (aarch64_emit_const): Likewise.
3058 (aarch64_emit_call): Likewise.
3059 (aarch64_emit_reg): Likewise.
3060 (aarch64_emit_pop): Likewise.
3061 (aarch64_emit_stack_flush): Likewise.
3062 (aarch64_emit_zero_ext): Likewise.
3063 (aarch64_emit_swap): Likewise.
3064 (aarch64_emit_stack_adjust): Likewise.
3065 (aarch64_emit_int_call_1): Likewise.
3066 (aarch64_emit_void_call_2): Likewise.
3067 (aarch64_emit_eq_goto): Likewise.
3068 (aarch64_emit_ne_goto): Likewise.
3069 (aarch64_emit_lt_goto): Likewise.
3070 (aarch64_emit_le_goto): Likewise.
3071 (aarch64_emit_gt_goto): Likewise.
3072 (aarch64_emit_ge_got): Likewise.
3073 (aarch64_emit_ops_impl): New static global variable.
3074 (aarch64_emit_ops): New target function, return
3075 &aarch64_emit_ops_impl.
3076 (struct linux_target_ops): Install it.
3077
bb903df0
PL
30782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3079
3080 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3081 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3082 aarch64-ipa.o.
3083 * linux-aarch64-ipa.c: New file.
3084 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3085 and endian.h.
3086 (aarch64_get_thread_area): New target method.
3087 (extract_signed_bitfield): New helper function.
3088 (aarch64_decode_ldr_literal): New function.
3089 (enum aarch64_opcodes): New enum.
3090 (struct aarch64_register): New struct.
3091 (struct aarch64_operand): New struct.
3092 (x0): New static global.
3093 (x1): Likewise.
3094 (x2): Likewise.
3095 (x3): Likewise.
3096 (x4): Likewise.
3097 (w2): Likewise.
3098 (ip0): Likewise.
3099 (sp): Likewise.
3100 (xzr): Likewise.
3101 (aarch64_register): New helper function.
3102 (register_operand): Likewise.
3103 (immediate_operand): Likewise.
3104 (struct aarch64_memory_operand): New struct.
3105 (offset_memory_operand): New helper function.
3106 (preindex_memory_operand): Likewise.
3107 (enum aarch64_system_control_registers): New enum.
3108 (ENCODE): New macro.
3109 (emit_insn): New helper function.
3110 (emit_b): New function.
3111 (emit_bcond): Likewise.
3112 (emit_cb): Likewise.
3113 (emit_tb): Likewise.
3114 (emit_blr): Likewise.
3115 (emit_stp): Likewise.
3116 (emit_ldp_q_offset): Likewise.
3117 (emit_stp_q_offset): Likewise.
3118 (emit_load_store): Likewise.
3119 (emit_ldr): Likewise.
3120 (emit_ldrsw): Likewise.
3121 (emit_str): Likewise.
3122 (emit_ldaxr): Likewise.
3123 (emit_stxr): Likewise.
3124 (emit_stlr): Likewise.
3125 (emit_data_processing_reg): Likewise.
3126 (emit_data_processing): Likewise.
3127 (emit_add): Likewise.
3128 (emit_sub): Likewise.
3129 (emit_mov): Likewise.
3130 (emit_movk): Likewise.
3131 (emit_mov_addr): Likewise.
3132 (emit_mrs): Likewise.
3133 (emit_msr): Likewise.
3134 (emit_sevl): Likewise.
3135 (emit_wfe): Likewise.
3136 (append_insns): Likewise.
3137 (can_encode_int32_in): New helper function.
3138 (aarch64_relocate_instruction): New function.
3139 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3140 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3141 (struct linux_target_ops): Install aarch64_get_thread_area,
3142 aarch64_install_fast_tracepoint_jump_pad and
3143 aarch64_get_min_fast_tracepoint_insn_len.
3144
787749ea
PL
31452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3146
3147 * Makefile.in (aarch64-insn.o): New rule.
3148 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3149
9812b2e6
YQ
31502015-09-21 Yao Qi <yao.qi@linaro.org>
3151
3152 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3153
18fe412b
YQ
31542015-09-21 Yao Qi <yao.qi@linaro.org>
3155
3156 * tracepoint.c (max_jump_pad_size): Remove.
3157
a0cc84cd
YQ
31582015-09-18 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-aarch64-low.c: Don't include sys/uio.h.
3161 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3162
d78908cf
WW
31632015-09-16 Wei-cheng Wang <cole945@gmail.com>
3164
3165 * tracepoint.c (eval_result_type): Change prototype.
3166 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3167
d57e0d50
PA
31682015-09-15 Pedro Alves <palves@redhat.com>
3169
3170 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3171 Check whether to report exec events instead of checking whether
3172 multiprocess is enabled.
3173
5a676acc
PA
31742015-09-15 Pedro Alves <palves@redhat.com>
3175
3176 PR remote/18965
3177 * remote-utils.c (prepare_resume_reply): Merge
3178 TARGET_WAITKIND_VFORK_DONE switch case with the
3179 TARGET_WAITKIND_FORKED case.
3180
7c5d0fad
YQ
31812015-09-15 Yao Qi <yao.qi@linaro.org>
3182
3183 * server.c (handle_query): Check string comparison using
3184 "else if" instead of "if".
3185
750ce8d1
YQ
31862015-09-15 Yao Qi <yao.qi@linaro.org>
3187
3188 * server.c (vCont_supported): New global variable.
3189 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3190 matches. Append ";vContSupported+" to own_buf.
3191 (handle_v_requests): Append ";s;S" to own_buf if target supports
3192 hardware single step or vCont_supported is false.
3193 (capture_main): Set vCont_supported to zero.
3194
70b90b91
YQ
31952015-09-15 Yao Qi <yao.qi@linaro.org>
3196
3197 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3198 it to ...
3199 (linux_supports_hardware_single_step): ... New function.
3200 (linux_target_ops): Update.
3201 * lynx-low.c (lynx_target_ops): Set field
3202 supports_hardware_single_step to target_can_do_hardware_single_step.
3203 * nto-low.c (nto_target_ops): Likewise.
3204 * spu-low.c (spu_target_ops): Likewise.
3205 * win32-low.c (win32_target_ops): Likewise.
3206 * target.c (target_can_do_hardware_single_step): New function.
3207 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3208 Remove. <supports_hardware_single_step>: New field.
3209 (target_supports_conditional_breakpoints): Remove.
3210 (target_supports_hardware_single_step): New macro.
3211 (target_can_do_hardware_single_step): Declare.
3212 * server.c (handle_query): Use target_supports_hardware_single_step
3213 instead of target_supports_conditional_breakpoints.
3214
ade90bde
YQ
32152015-09-15 Yao Qi <yao.qi@linaro.org>
3216
3217 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3218 function.
3219 (struct linux_target_ops the_low_target): Install
3220 aarch64_linux_siginfo_fixup.
3221
94585166
DB
32222015-09-11 Don Breazeal <donb@codesourcery.com>
3223 Luis Machado <lgustavo@codesourcery.com>
3224
3225 * linux-low.c (linux_mourn): Static declaration.
3226 (linux_arch_setup): Move in front of
3227 handle_extended_wait.
3228 (linux_arch_setup_thread): New function.
3229 (handle_extended_wait): Handle exec events. Call
3230 linux_arch_setup_thread. Make event_lwp argument a
3231 pointer-to-a-pointer.
3232 (check_zombie_leaders): Do not check stopped threads.
3233 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3234 (linux_low_filter_event): Add lwp and thread for exec'ing
3235 non-leader thread if leader thread has been deleted.
3236 Refactor code into linux_arch_setup_thread and call it.
3237 Pass child lwp pointer by reference to handle_extended_wait.
3238 (linux_wait_for_event_filtered): Update comment.
3239 (linux_wait_1): Prevent clobbering exec event status.
3240 (linux_supports_exec_events): New function.
3241 (linux_target_ops) <supports_exec_events>: Initialize new member.
3242 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3243 new member.
3244 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3245 * server.c (report_exec_events): New global variable.
3246 (handle_query): Handle qSupported query for exec-events feature.
3247 (captured_main): Initialize report_exec_events.
3248 * server.h (report_exec_events): Declare new global variable.
3249 * target.h (struct target_ops) <supports_exec_events>: New
3250 member.
3251 (target_supports_exec_events): New macro.
3252 * win32-low.c (win32_target_ops) <supports_exec_events>:
3253 Initialize new member.
3254
0568462b
MM
32552015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3256
3257 * linux-low.c (linux_low_enable_btrace): Remove.
3258 (linux_target_ops): Replace linux_low_enable_btrace with
3259 linux_enable_btrace.
3260
39edd165
YQ
32612015-09-03 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-aarch64-low.c (aarch64_insert_point): Call
3264 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3265 returns true.
3266
1db33b5a
UW
32672015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3268
3269 * linux-low.c (check_stopped_by_breakpoint): Use
3270 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3271
ab290430
PA
32722015-08-27 Pedro Alves <palves@redhat.com>
3273
3274 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3275
8d749320
SM
32762015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3277
6711b7f8
SM
3278 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3279 the XNEW-family equivalent.
8d749320
SM
3280 (compile_bytecodes): Likewise.
3281 * dll.c (loaded_dll): Likewise.
3282 * event-loop.c (append_callback_event): Likewise.
3283 (create_file_handler): Likewise.
3284 (create_file_event): Likewise.
3285 * hostio.c (handle_open): Likewise.
3286 * inferiors.c (add_thread): Likewise.
3287 (add_process): Likewise.
3288 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3289 * linux-arm-low.c (arm_new_process): Likewise.
3290 (arm_new_thread): Likewise.
3291 * linux-low.c (add_to_pid_list): Likewise.
3292 (linux_add_process): Likewise.
3293 (handle_extended_wait): Likewise.
3294 (add_lwp): Likewise.
3295 (enqueue_one_deferred_signal): Likewise.
3296 (enqueue_pending_signal): Likewise.
3297 (linux_resume_one_lwp_throw): Likewise.
3298 (linux_resume_one_thread): Likewise.
3299 (linux_read_memory): Likewise.
3300 (linux_write_memory): Likewise.
3301 * linux-mips-low.c (mips_linux_new_process): Likewise.
3302 (mips_linux_new_thread): Likewise.
3303 (mips_add_watchpoint): Likewise.
3304 * linux-x86-low.c (initialize_low_arch): Likewise.
3305 * lynx-low.c (lynx_add_process): Likewise.
3306 * mem-break.c (set_raw_breakpoint_at): Likewise.
3307 (set_breakpoint): Likewise.
3308 (add_condition_to_breakpoint): Likewise.
3309 (add_commands_to_breakpoint): Likewise.
3310 (clone_agent_expr): Likewise.
3311 (clone_one_breakpoint): Likewise.
3312 * regcache.c (new_register_cache): Likewise.
3313 * remote-utils.c (look_up_one_symbol): Likewise.
3314 * server.c (queue_stop_reply): Likewise.
3315 (start_inferior): Likewise.
3316 (queue_stop_reply_callback): Likewise.
3317 (handle_target_event): Likewise.
3318 * spu-low.c (fetch_ppc_memory): Likewise.
3319 (store_ppc_memory): Likewise.
3320 * target.c (set_target_ops): Likewise.
3321 * thread-db.c (thread_db_load_search): Likewise.
3322 (try_thread_db_load_1): Likewise.
3323 * tracepoint.c (add_tracepoint): Likewise.
3324 (add_tracepoint_action): Likewise.
3325 (create_trace_state_variable): Likewise.
3326 (cmd_qtdpsrc): Likewise.
3327 (cmd_qtro): Likewise.
3328 (add_while_stepping_state): Likewise.
3329 * win32-low.c (child_add_thread): Likewise.
3330 (get_image_name): Likewise.
3331
ed8b7b42
YQ
33322015-08-25 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3335
db3cb7cb
YQ
33362015-08-25 Yao Qi <yao.qi@linaro.org>
3337
3338 * Makefile.in (aarch64-linux.o): New rule.
3339 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3340 srv_tgtobj.
3341 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3342 (aarch64_init_debug_reg_state): Make it extern.
3343 (aarch64_linux_prepare_to_resume): Remove.
3344
f6011a1c
YQ
33452015-08-25 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3348 lwp_arch_private_info and ptid_of_lwp.
3349
88e2cf7e
YQ
33502015-08-25 Yao Qi <yao.qi@linaro.org>
3351
3352 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3353 Find proc_info by find_process_pid. All callers updated.
3354
5e35436e
YQ
33552015-08-25 Yao Qi <yao.qi@linaro.org>
3356
3357 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3358 Remove.
3359 (debug_reg_change_callback): Remove.
3360 (aarch64_notify_debug_reg_change): Remove.
3361
4a8a7965
YQ
33622015-08-25 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3365 Call current_lwp_ptid.
3366
32a271ee
YQ
33672015-08-25 Yao Qi <yao.qi@linaro.org>
3368
3369 * linux-aarch64-low.c (debug_reg_change_callback): Use
3370 debug_printf.
3371
0d51c8d7
YQ
33722015-08-25 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3375
31a43dd5
YQ
33762015-08-25 Yao Qi <yao.qi@linaro.org>
3377
3378 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3379
8ee52567
YQ
33802015-08-25 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3383 the code.
3384
ff3f0f45
YQ
33852015-08-25 Yao Qi <yao.qi@linaro.org>
3386
3387 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3388 Remove.
3389 (debug_reg_change_callback): Remove argument entry and add argument
3390 lwp. Remove local variable thread. Don't print thread id in the
3391 debugging output. Don't check whether pid of thread equals to pid.
3392 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3393 iterate_over_lwps instead find_inferior.
3394
3d40fbb5
PA
33952015-08-24 Pedro Alves <palves@redhat.com>
3396
3397 * inferiors.c (get_first_process): New function.
3398 * inferiors.h (get_first_process): New declaration.
3399 * remote-utils.c (read_ptid): Default to the first process in the
3400 list, instead of to the current thread's process.
3401
438e1e42
PA
34022015-08-24 Pedro Alves <palves@redhat.com>
3403
3404 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3405 * event-loop.c: Likewise.
3406 * remote-utils.c: Likewise.
3407 * tracepoint.c: Likewise.
3408
a8c6d4fc
PA
34092015-08-24 Pedro Alves <palves@redhat.com>
3410
3411 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3412 ptid_get_lwp.
3413
99b0bb12
PA
34142015-08-21 Pedro Alves <palves@redhat.com>
3415
3416 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3417 instead of literal 1.
3418
f8904751
PA
34192015-08-21 Pedro Alves <palves@redhat.com>
3420
3421 * tdesc.c (default_description): Explicitly zero-initialize.
3422
465a859e
PA
34232015-08-21 Pedro Alves <palves@redhat.com>
3424
3425 PR gdb/18749
3426 * inferiors.c (remove_thread): Discard any pending stop reply for
3427 this thread.
3428 * server.c (remove_all_on_match_pid): Rename to ...
3429 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3430 instead of a pid.
3431 (discard_queued_stop_replies): Change parameter to a ptid. Now
3432 extern.
3433 (handle_v_kill, kill_inferior_callback, captured_main)
3434 (process_serial_event): Adjust.
3435 * server.h (discard_queued_stop_replies): Declare.
3436
f0db101d
PA
34372015-08-21 Pedro Alves <palves@redhat.com>
3438
3439 * linux-low.c (wait_for_sigstop): Always switch to no thread
3440 selected if the previously current thread dies.
3441 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3442 process instead of the current thread's.
3443 * remote-utils.c (input_interrupt): Don't check if there's no
3444 current thread.
3445 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3446 current thread to the general thread fails, error out.
3447 (handle_qxfer_auxv, handle_qxfer_libraries)
3448 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3449 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3450 (handle_query): Check if there's a thread selected instead of
3451 checking whether there's any thread in the thread list.
3452 (handle_qxfer_threads, handle_qxfer_btrace)
3453 (handle_qxfer_btrace_conf): Don't error out early if there's no
3454 thread in the thread list.
3455 (handle_v_cont, myresume): Don't set the current thread to the
3456 continue thread.
3457 (process_serial_event) <Hg handling>: Also set thread_id if the
3458 previous general thread is still alive.
3459 (process_serial_event) <g/G handling>: If setting the current
3460 thread to the general thread fails, error out.
3461 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3462 thread's lwp instead of the current thread's.
3463 * target.c (set_desired_thread): If the desired thread was not
3464 found, leave the current thread pointing to NULL. Return an int
3465 (boolean) indicating success.
3466 * target.h (set_desired_thread): Change return type to int.
3467
40045d91
MF
34682015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3469
3470 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3471 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3472 #includes.
3473 (ps_get_thread_area): New function.
3474
45face3b
GB
34752015-08-19 Gary Benson <gbenson@redhat.com>
3476
3477 * hostio.c (handle_pread): Do not attempt to read more data
3478 than hostio_reply_with_data can fit in a packet.
3479
16d5f642
JB
34802015-08-18 Joel Brobecker <brobecker@adacore.com>
3481
3482 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3483
a738da3a
MF
34842015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3485
3486 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3487
33ebda9d
PA
34882015-08-06 Pedro Alves <palves@redhat.com>
3489
3490 * tracepoint.c (expr_eval_result): Now an int.
3491
a44892be
PA
34922015-08-06 Pedro Alves <palves@redhat.com>
3493
3494 * gdbthread.h (struct regcache): Forward declare.
3495 (struct thread_info) <regcache_data>: Now a struct regcache
3496 pointer.
3497 * inferiors.c (inferior_regcache_data)
3498 (set_inferior_regcache_data): Now work with struct regcache
3499 pointers.
3500 * inferiors.h (struct regcache): Forward declare.
3501 (inferior_regcache_data, set_inferior_regcache_data): Now work
3502 with struct regcache pointers.
3503 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3504 (free_register_cache_thread): Remove struct regcache pointer
3505 casts.
3506
608a1e46
PA
35072015-08-06 Pedro Alves <palves@redhat.com>
3508
3509 * server.c (captured_main): On error, print the exception message
3510 to stderr, and if run_once is set, throw a quit.
3511
f0ce0d3a
PA
35122015-08-06 Pedro Alves <palves@redhat.com>
3513
3514 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3515 the current thread.
3516
bf47e248
PA
35172015-08-06 Pedro Alves <palves@redhat.com>
3518
3519 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3520 reading beyond the passed in buffer length.
3521
b6b9ffcc
PL
35222015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3523
3524 * tracepoint.c (symbol_list) <required>: Remove.
3525
863d01bd
PA
35262015-08-06 Pedro Alves <palves@redhat.com>
3527
3528 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3529 count if stopping and suspending threads.
3530 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3531 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3532 (linux_detach): Complete an ongoing step-over.
3533 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3534 throughout.
3535 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3536 (linux_wait_1): If passing a signal to the inferior after
3537 finishing a step-over, unsuspend and re-resume all lwps. If we
3538 see a single-step event but the thread should be continuing, don't
3539 pass the trap to gdb.
3540 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3541 internal_error instead of gdb_assert.
3542 (enqueue_pending_signal): New function.
3543 (check_ptrace_stopped_lwp_gone): Add debug output.
3544 (start_step_over): Use internal_error instead of gdb_assert.
3545 (complete_ongoing_step_over): New function.
3546 (linux_resume_one_thread): Don't resume a suspended thread.
3547 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3548 it stepping.
3549
00db26fa
PA
35502015-08-06 Pedro Alves <palves@redhat.com>
3551
3552 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3553 (linux_thread_alive): Use lwp_is_marked_dead.
3554 (extended_event_reported): Delete.
3555 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3556 instead of extended_event_reported.
3557 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3558 as well.
3559 (lwp_is_marked_dead): New function.
3560 (lwp_running): Use lwp_is_marked_dead.
3561 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3562 comment.
3563
ad071a30
PA
35642015-08-06 Pedro Alves <palves@redhat.com>
3565
3566 * linux-low.c (linux_wait_1): Move fork event output out of the
3567 !report_to_gdb check. Pass event_child->waitstatus to
3568 target_waitstatus_to_string instead of ourstatus.
3569
524b57e6
YQ
35702015-08-04 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3573 if current_thread is 32 bit.
3574
6085d6f6
YQ
35752015-08-04 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3578 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3579 * server.c (extended_protocol): Remove "static".
3580 * server.h (extended_protocol): Declare it.
3581
8a7e4587
YQ
35822015-08-04 Yao Qi <yao.qi@linaro.org>
3583
3584 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3585 both aarch64 and aarch32.
3586 (aarch64_set_pc): Likewise.
3587
3b53ae99
YQ
35882015-08-04 Yao Qi <yao.qi@linaro.org>
3589
3590 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3591 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3592 arm-with-neon.xml to srv_xmlfiles.
3593 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3594 (is_64bit_tdesc): New function.
3595 (aarch64_linux_read_description): New function.
3596 (aarch64_arch_setup): Call aarch64_linux_read_description.
3597 (regs_info): Rename to regs_info_aarch64.
3598 (aarch64_regs_info): Return right regs_info.
3599 (initialize_low_arch): Call initialize_low_arch_aarch32.
3600
bd9e6534
YQ
36012015-08-04 Yao Qi <yao.qi@linaro.org>
3602
3603 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3604 * linux-aarch32-low.c: New file.
3605 * linux-aarch32-low.h: New file.
3606 * linux-arm-low.c (arm_fill_gregset): Move it to
3607 linux-aarch32-low.c.
3608 (arm_store_gregset): Likewise.
3609 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3610 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3611 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3612 (regs_info): Rename to regs_info_arm.
3613 (arm_regs_info): Return regs_info_aarch32 if
3614 have_ptrace_getregset is 1 and target description is
3615 arm_with_neon or arm_with_vfpv3.
3616 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3617 Call initialize_low_arch_aarch32 instead.
3618
ded48a5e
YQ
36192015-08-04 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3622 * linux-low.c: ... here.
3623 * linux-low.h (have_ptrace_getregset): Declare it.
3624
96e9210f
PA
36252015-08-04 Pedro Alves <palves@redhat.com>
3626
3627 * thread-db.c (struct thread_db): Use new typedefs.
3628 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3629 CHK calls.
3630 (disable_thread_event_reporting): Cast result of dlsym to
3631 destination function pointer type.
3632 (thread_db_mourn): Use td_ta_delete_ftype.
3633
af60a1ef
SL
36342015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3635
3636 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3637 arch variant.
3638 (CDX_BREAKPOINT): Define for R2.
3639 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3640 (the_low_target): Add comments.
3641
e8b41681
YQ
36422015-07-30 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-arm-low.c (arm_hwcap): Remove it.
3645 (arm_read_description): New local variable arm_hwcap. Don't
3646 set arm_hwcap to zero.
3647
89abb039
YQ
36482015-07-30 Yao Qi <yao.qi@linaro.org>
3649
3650 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3651 Use regcache->tdesc instead.
3652 (arm_store_wmmxregset): Likewise.
3653 (arm_fill_vfpregset): Likewise.
3654 (arm_store_vfpregset): Likewise.
3655
deca266c
YQ
36562015-07-30 Yao Qi <yao.qi@linaro.org>
3657
3658 * linux-arm-low.c: Include arch/arm.h.
3659 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3660 (arm_store_gregset): Likewise.
3661
aa58a496
SM
36622015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3663
3664 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3665 ptrace's 4th parameter.
3666
50904b25
YQ
36672015-07-27 Yao Qi <yao.qi@linaro.org>
3668
3669 * configure.srv (case aarch64*-*-linux*): Don't set
3670 srv_linux_usrregs.
3671
5826e159
PA
36722015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3673
3674 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3675 sys/ptrace.h.
3676 * linux-arm-low.c: Likewise.
3677 * linux-cris-low.c: Likewise.
3678 * linux-crisv32-low.c: Likewise.
3679 * linux-low.c: Likewise.
3680 * linux-m68k-low.c: Likewise.
3681 * linux-mips-low.c: Likewise.
3682 * linux-nios2-low.c: Likewise.
3683 * linux-s390-low.c: Likewise.
3684 * linux-sparc-low.c: Likewise.
3685 * linux-tic6x-low.c: Likewise.
3686 * linux-tile-low.c: Likewise.
3687 * linux-x86-low.c: Likewise.
3688
54019719
PA
36892015-07-24 Pedro Alves <palves@redhat.com>
3690
3691 * config.in: Regenerate.
3692 * configure: Regenerate.
3693
eb7aa561
PA
36942015-07-24 Pedro Alves <palves@redhat.com>
3695
3696 * acinclude.m4: Include ../ptrace.m4.
3697 * configure.ac: Call GDB_AC_PTRACE.
3698 * config.in, configure: Regenerate.
3699
55d7b841
YQ
37002015-07-24 Yao Qi <yao.qi@linaro.org>
3701
3702 * linux-low.c (linux_create_inferior): Remove setting to
3703 proc->priv->new_inferior.
3704 (linux_attach): Likewise.
3705 (linux_low_filter_event): Likewise.
3706 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3707
c06cbd92
YQ
37082015-07-24 Yao Qi <yao.qi@linaro.org>
3709
3710 * linux-low.c (linux_arch_setup): New function.
3711 (linux_low_filter_event): If proc->tdesc is NULL and
3712 proc->attached is true, call the_low_target.arch_setup.
3713 Otherwise, keep status pending, and return.
3714 (linux_resume_one_lwp_throw): Don't call get_pc if
3715 thread->while_stepping isn't NULL. Don't call
3716 get_thread_regcache if proc->tdesc is NULL.
3717 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3718 (linux_target_ops): Install arch_setup.
3719 * server.c (start_inferior): Call the_target->arch_setup.
3720 * target.h (struct target_ops) <arch_setup>: New field.
3721 (target_arch_setup): New marco.
3722 * lynx-low.c (lynx_target_ops): Update.
3723 * nto-low.c (nto_target_ops): Update.
3724 * spu-low.c (spu_target_ops): Update.
3725 * win32-low.c (win32_target_ops): Update.
3726
5ae3ebba
YQ
37272015-07-24 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-low.c (linux_add_process): Don't set
3730 proc->priv->new_inferior.
3731 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3732 (linux_attach): Likewise.
3733
eb97750b
YQ
37342015-07-24 Yao Qi <yao.qi@linaro.org>
3735
3736 * server.c (start_inferior): Code refactor.
3737
51aee833
YQ
37382015-07-24 Yao Qi <yao.qi@linaro.org>
3739
3740 * server.c (process_serial_event): Set general_thread.
3741
af1b22f3
YQ
37422015-07-21 Yao Qi <yao.qi@linaro.org>
3743
3744 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3745 aarch64_linux_get_debug_reg_capacity.
3746
554717a3
YQ
37472015-07-17 Yao Qi <yao.qi@linaro.org>
3748
3749 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3750 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3751 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3752 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3753 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3754 (AARCH64_HWP_ALIGNMENT): Likewise.
3755 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3756 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3757 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3758 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3759 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3760 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3761 (struct aarch64_debug_reg_state): Likewise.
3762 (struct arch_lwp_info): Likewise.
3763 (aarch64_align_watchpoint): Likewise.
3764 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3765 (aarch64_watchpoint_length): Likewise.
3766 (aarch64_point_encode_ctrl_reg): Likewise
3767 (aarch64_point_is_aligned): Likewise.
3768 (aarch64_align_watchpoint): Likewise.
3769 (aarch64_linux_set_debug_regs):
3770 (aarch64_dr_state_insert_one_point): Likewise.
3771 (aarch64_dr_state_remove_one_point): Likewise.
3772 (aarch64_handle_breakpoint): Likewise.
3773 (aarch64_handle_aligned_watchpoint): Likewise.
3774 (aarch64_handle_unaligned_watchpoint): Likewise.
3775 (aarch64_handle_watchpoint): Likewise.
3776
c67ca4de
YQ
37772015-07-17 Yao Qi <yao.qi@linaro.org>
3778
3779 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3780 and don't aarch64_get_debug_reg_state. All callers update.
3781 (aarch64_handle_aligned_watchpoint): Likewise.
3782 (aarch64_handle_unaligned_watchpoint): Likewise.
3783 (aarch64_handle_watchpoint): Likewise.
3784 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3785 (aarch64_remove_point): Likewise.
3786
25abf979
YQ
37872015-07-17 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3790 debug_printf.
3791 (aarch64_handle_unaligned_watchpoint): Likewise.
3792
db1ff28b
JK
37932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3794
3795 Revert the previous 3 commits:
3796 Move gdb_regex* to common/
3797 Move linux_find_memory_regions_full & co.
3798 gdbserver build-id attribute generator
3799
700ca40f
JK
38002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3801 Jan Kratochvil <jan.kratochvil@redhat.com>
3802
3803 gdbserver build-id attribute generator.
3804 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3805 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3806 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3807 (find_phdr): New.
3808 (get_dynamic): Use find_pdhr to traverse program headers.
3809 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3810 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3811 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3812 (get_hex_build_id): New.
3813 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3814 to reply XML document.
3815
9904185c
JK
38162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3817 Jan Kratochvil <jan.kratochvil@redhat.com>
3818
3819 * target.c: Include target/target-utils.h and fcntl.h.
3820 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3821 (target_fileio_read_stralloc): New functions.
3822
6e5b4429
JK
38232015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3824
3825 * Makefile.in (OBS): Add gdb_regex.o.
3826 (gdb_regex.o): New.
3827 * config.in: Rebuilt.
3828 * configure: Rebuilt.
3829
ddc98fbf
JK
38302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3831 Jan Kratochvil <jan.kratochvil@redhat.com>
3832
3833 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3834 * Makefile.in (OBS): Add target-utils.o.
3835 (linux-maps.o, target-utils.o): New.
3836 * configure.srv (srv_linux_obj): Add linux-maps.o.
3837
e57bb7a0
PL
38382015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3839
3840 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3841 function, return 1.
3842 (the_low_target): Install it.
3843
586b02a9
PA
38442015-07-14 Pedro Alves <palves@redhat.com>
3845
3846 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3847 Instead, ignore ECHILD, and throw an error for other errnos.
3848
58c1b36c
PA
38492015-07-10 Pedro Alves <palves@redhat.com>
3850
3851 * event-loop.c (struct callback_event) <data>: Change type to
3852 gdb_client_data instance instead of gdb_client_data pointer.
3853 (append_callback_event): Adjust.
3854
421530db
PL
38552015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3856
3857 * linux-aarch64-low.c: Add comments for each linux_target_ops
3858 method. Remove comments already covered in target_ops and
3859 linux_target_ops definitions.
3860 (the_low_target): Add comments for each unimplemented method.
3861
c2d65f38
YQ
38622015-07-09 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_regmap): Remove.
3865 (aarch64_usrregs_info): Remove.
3866 (regs_info): Set field usrregs to NULL.
3867
b20a6524
MM
38682015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3869
3870 * linux-low.c: Include "rsp-low.h"
3871 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3872 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3873 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3874 (handle_btrace_enable_pt): New.
3875 (handle_btrace_general_set): Support "pt".
3876 (handle_btrace_conf_general_set): Support "pt:size".
3877
96c97461
PL
38782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3879
3880 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3881 Z_PACKET_SW_BP.
3882
37d66942
PL
38832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3884
3885 * linux-aarch64-low.c: Remove comment about endianness.
3886 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3887 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3888 memcmp.
3889
dc06243f
GB
38902015-06-24 Gary Benson <gbenson@redhat.com>
3891
3892 * linux-i386-ipa.c (stdint.h): Do not include.
3893 * lynx-i386-low.c (stdint.h): Likewise.
3894 * lynx-ppc-low.c (stdint.h): Likewise.
3895 * mem-break.c (stdint.h): Likewise.
3896 * thread-db.c (stdint.h): Likewise.
3897 * tracepoint.c (stdint.h): Likewise.
3898 * win32-low.c (stdint.h): Likewise.
3899
124e13d9
SM
39002015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3901
3902 * server.c (write_qxfer_response): Update call to
3903 remote_escape_output.
3904
909c2cda
JK
39052015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3906 Jan Kratochvil <jan.kratochvil@redhat.com>
3907
3908 Merge multiple hex conversions.
3909 * gdbreplay.c (tohex): Rename to 'fromhex'.
3910 (logchar): Use fromhex.
3911
24c05f46
JK
39122015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3913
3914 * server.c (handle_qxfer_libraries): Set `version' attribute for
3915 <library-list>.
3916
14d2069a
GB
39172015-06-10 Gary Benson <gbenson@redhat.com>
3918
3919 * target.h (struct target_ops) <multifs_open>: New field.
3920 <multifs_unlink>: Likewise.
3921 <multifs_readlink>: Likewise.
3922 * linux-low.c (nat/linux-namespaces.h): New include.
3923 (linux_target_ops): Initialize the_target->multifs_open,
3924 the_target->multifs_unlink and the_target->multifs_readlink.
3925 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3926 * hostio.c (hostio_fs_pid): New static variable.
3927 (hostio_handle_new_gdb_connection): New function.
3928 (handle_setfs): Likewise.
3929 (handle_open): Use the_target->multifs_open as appropriate.
3930 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3931 (handle_readlink): Use the_target->multifs_readlink as
3932 appropriate.
3933 (handle_vFile): Handle vFile:setfs packets.
3934 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3935 after target_handle_new_gdb_connection.
3936
4b8b5e72
GB
39372015-06-10 Gary Benson <gbenson@redhat.com>
3938
3939 * configure.ac (AC_CHECK_FUNCS): Add setns.
3940 * config.in: Regenerate.
3941 * configure: Likewise.
3942 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3943 (linux-namespaces.o): New rule.
3944 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3945
3ac2e371
GB
39462015-06-09 Gary Benson <gbenson@redhat.com>
3947
3948 * hostio.c (handle_open): Process mode argument with
3949 fileio_to_host_mode.
3950
ca9b78ce
YQ
39512015-06-01 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3954 * linux-x86-low.c: Likewise.
3955
bfacd19d
DB
39562015-05-28 Don Breazeal <donb@codesourcery.com>
3957
3958 * linux-low.c (handle_extended_wait): Initialize
3959 thread_info.last_resume_kind for new fork children.
3960
452003ef
PA
39612015-05-15 Pedro Alves <palves@redhat.com>
3962
3963 * target.h (target_handle_new_gdb_connection): Rewrite using if
3964 wrapped in do/while.
3965
1041a03c
JB
39662015-05-14 Joel Brobecker <brobecker@adacore.com>
3967
3968 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3969 * configure, config.in: Regenerate.
3970 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3971 Declare typedef.
3972
c269dbdb
DB
39732015-05-12 Don Breazeal <donb@codesourcery.com>
3974
3975 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3976 PTRACE_EVENT_VFORK_DONE.
3977 (linux_low_ptrace_options, extended_event_reported): Add vfork
3978 events.
3979 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3980 and "vforkdone" for RSP 'T' Stop Reply Packet.
3981 * server.h (report_vfork_events): Declare
3982 global variable.
3983
3a8a0396
DB
39842015-05-12 Don Breazeal <donb@codesourcery.com>
3985
3986 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3987 (the_low_target) <new_fork>: Initialize new member.
3988 * linux-arm-low.c (arm_new_fork): New function.
3989 (the_low_target) <new_fork>: Initialize new member.
3990 * linux-low.c (handle_extended_wait): Call new target function
3991 new_fork.
3992 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3993 * linux-mips-low.c (mips_add_watchpoint): New function
3994 extracted from mips_insert_point.
3995 (the_low_target) <new_fork>: Initialize new member.
3996 (mips_linux_new_fork): New function.
3997 (mips_insert_point): Call mips_add_watchpoint.
3998 * linux-x86-low.c (x86_linux_new_fork): New function.
3999 (the_low_target) <new_fork>: Initialize new member.
4000
de0d863e
DB
40012015-05-12 Don Breazeal <donb@codesourcery.com>
4002
4003 * linux-low.c (handle_extended_wait): Implement return value,
4004 rename argument 'event_child' to 'event_lwp', handle
4005 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4006 (linux_low_ptrace_options): New function.
4007 (linux_low_filter_event): Call linux_low_ptrace_options,
4008 use different argument fo linux_enable_event_reporting,
4009 use return value from handle_extended_wait.
4010 (extended_event_reported): New function.
4011 (linux_wait_1): Call extended_event_reported and set
4012 status to report fork events.
4013 (linux_write_memory): Add pid to debug message.
4014 (reset_lwp_ptrace_options_callback): New function.
4015 (linux_handle_new_gdb_connection): New function.
4016 (linux_target_ops): Initialize new structure member.
4017 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4018 * lynx-low.c: Initialize new structure member.
4019 * remote-utils.c (prepare_resume_reply): Implement stop reason
4020 "fork" for "T" stop message.
4021 * server.c (handle_query): Call handle_new_gdb_connection.
4022 * server.h (report_fork_events): Declare global flag.
4023 * target.h (struct target_ops) <handle_new_gdb_connection>:
4024 New member.
4025 (target_handle_new_gdb_connection): New macro.
4026 * win32-low.c: Initialize new structure member.
4027
ddcbc397
DB
40282015-05-12 Don Breazeal <donb@codesourcery.com>
4029
4030 * mem-break.c (APPEND_TO_LIST): Define macro.
4031 (clone_agent_expr): New function.
4032 (clone_one_breakpoint): New function.
4033 (clone_all_breakpoints): New function.
4034 * mem-break.h: Declare new functions.
4035
89245bc0
DB
40362015-05-12 Don Breazeal <donb@codesourcery.com>
4037
4038 * linux-low.c (linux_supports_fork_events): New function.
4039 (linux_supports_vfork_events): New function.
4040 (linux_target_ops): Initialize new structure members.
4041 (initialize_low): Call linux_check_ptrace_features.
4042 * lynx-low.c (lynx_target_ops): Initialize new structure
4043 members.
4044 * server.c (report_fork_events, report_vfork_events):
4045 New global flags.
4046 (handle_query): Add new features to qSupported packet and
4047 response.
4048 (captured_main): Initialize new global variables.
4049 * target.h (struct target_ops) <supports_fork_events>:
4050 New member.
4051 <supports_vfork_events>: New member.
4052 (target_supports_fork_events): New macro.
4053 (target_supports_vfork_events): New macro.
4054 * win32-low.c (win32_target_ops): Initialize new structure
4055 members.
4056
835205d0
GB
40572015-05-12 Gary Benson <gbenson@redhat.com>
4058
4059 * server.c (handle_qxfer_exec_file): Use current process
4060 if annex is empty.
4061
21e94bd9
SL
40622015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4063
4064 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4065 Remove HAVE_PTRACE_GETREGS conditionals.
4066 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4067 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4068
45614f15
YQ
40692015-05-08 Yao Qi <yao.qi@linaro.org>
4070
4071 * linux-low.c (linux_supports_conditional_breakpoints): New
4072 function.
4073 (linux_target_ops): Install new target method.
4074 * lynx-low.c (lynx_target_ops): Install NULL hook for
4075 supports_conditional_breakpoints.
4076 * nto-low.c (nto_target_ops): Likewise.
4077 * spu-low.c (spu_target_ops): Likewise.
4078 * win32-low.c (win32_target_ops): Likewise.
4079 * server.c (handle_query): Check
4080 target_supports_conditional_breakpoints.
4081 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4082 New field.
4083 (target_supports_conditional_breakpoints): New macro.
4084
80ad801e
PA
40852015-05-06 Pedro Alves <palves@redhat.com>
4086
4087 PR server/18081
4088 * server.c (start_inferior): If the process exits, mourn it.
4089
819843c7
GB
40902015-04-21 Gary Benson <gbenson@redhat.com>
4091
4092 * hostio.c (fileio_open_flags_to_host): Factored out to
4093 fileio_to_host_openflags in common/fileio.c. Single use
4094 updated.
4095
a2d5a9d7
MF
40962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4097
4098 * linux-xtensa-low.c (xtensa_fill_gregset)
4099 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4100 XCHAL_HAVE_LOOP.
4101
deb44829
MF
41022015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4103
4104 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4105 (regs_info): Replace usrregs pointer with NULL.
4106
e57f1de3
GB
41072015-04-17 Gary Benson <gbenson@redhat.com>
4108
4109 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4110 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4111 * server.c (handle_qxfer_exec_file): New function.
4112 (qxfer_packets): Add exec-file entry.
4113 (handle_query): Report qXfer:exec-file:read as supported packet.
4114
62828379
RN
41152015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4116
4117 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4118
b88bb450
GB
41192015-04-09 Gary Benson <gbenson@redhat.com>
4120
4121 * hostio-errno.c (errno_to_fileio_error): Remove function.
4122 Update caller to use remote_fileio_to_fio_error.
4123
c8f4bfdd
YQ
41242015-04-09 Yao Qi <yao.qi@linaro.org>
4125
4126 * linux-low.c (linux_insert_point): Call
4127 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4128 (linux_remove_point): Call remove_memory_breakpoint if type is
4129 raw_bkpt_type_sw.
4130 * linux-x86-low.c (x86_insert_point): Don't call
4131 insert_memory_breakpoint.
4132 (x86_remove_point): Don't call remove_memory_breakpoint.
4133
41f98f02
PA
41342015-04-01 Pedro Alves <palves@redhat.com>
4135 Cleber Rosa <crosa@redhat.com>
4136
4137 * server.c (gdbserver_usage): Reorganize and extend the usage
4138 message.
4139
2bf6fb9d
PA
41402015-03-24 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4143 output. Also dump TRAP_TRACE.
4144 (linux_low_filter_event): In debug output, distinguish a
4145 resume_stop SIGSTOP from a delayed SIGSTOP.
4146
369f6daa
GB
41472015-03-24 Gary Benson <gbenson@redhat.com>
4148
4149 * linux-x86-low.c (x86_linux_new_thread): Moved to
4150 nat/x86-linux.c.
4151 (x86_linux_prepare_to_resume): Likewise.
4152
8e5d4070
GB
41532015-03-24 Gary Benson <gbenson@redhat.com>
4154
4155 * Makefile.in (x86-linux-dregs.o): New rule.
4156 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4157 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4158 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4159 (x86_linux_dr_get): Likewise.
4160 (x86_linux_dr_set): Likewise.
4161 (update_debug_registers_callback): Likewise.
4162 (x86_linux_dr_set_addr): Likewise.
4163 (x86_linux_dr_get_addr): Likewise.
4164 (x86_linux_dr_set_control): Likewise.
4165 (x86_linux_dr_get_control): Likewise.
4166 (x86_linux_dr_get_status): Likewise.
4167 (x86_linux_update_debug_registers): Likewise.
4168
2b95d440
GB
41692015-03-24 Gary Benson <gbenson@redhat.com>
4170
4171 * linux-x86-low.c (x86_linux_update_debug_registers):
4172 New function, factored out from...
4173 (x86_linux_prepare_to_resume): ...this.
4174
14b0bc68
GB
41752015-03-24 Gary Benson <gbenson@redhat.com>
4176
4177 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4178 (x86_linux_dr_set): Likewise.
4179 (update_debug_registers_callback): Likewise.
4180 (x86_linux_dr_set_addr): Likewise.
4181 (x86_linux_dr_get_addr): Likewise.
4182 (x86_linux_dr_set_control): Likewise.
4183 (x86_linux_dr_get_control): Likewise.
4184 (x86_linux_dr_get_status): Likewise.
4185 (x86_linux_prepare_to_resume): Likewise.
4186
5dfe6ca8
GB
41872015-03-24 Gary Benson <gbenson@redhat.com>
4188
4189 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4190 Use perror_with_name. Pass string through gettext.
4191 (x86_linux_dr_set): Likewise.
4192
d33472ad
GB
41932015-03-24 Gary Benson <gbenson@redhat.com>
4194
4195 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4196 (x86_linux_dr_set_addr): ...this.
4197 (x86_dr_low_get_addr): Rename to...
4198 (x86_linux_dr_get_addr): ...this.
4199 (x86_dr_low_set_control): Rename to...
4200 (x86_linux_dr_set_control): ...this.
4201 (x86_dr_low_get_control): Rename to...
4202 (x86_linux_dr_get_control): ...this.
4203 (x86_dr_low_get_status): Rename to...
4204 (x86_linux_dr_get_status): ...this.
4205 (x86_dr_low): Update with new function names.
4206
4b134ca1
GB
42072015-03-24 Gary Benson <gbenson@redhat.com>
4208
4209 * Makefile.in (x86-linux.o): New rule.
4210 * configure.srv: Add x86-linux.o to relevant targets.
4211 * linux-low.c (lwp_set_arch_private_info): New function.
4212 (lwp_arch_private_info): Likewise.
4213 * linux-x86-low.c: Include nat/x86-linux.h.
4214 (arch_lwp_info): Removed structure.
4215 (update_debug_registers_callback):
4216 Use lwp_set_debug_registers_changed.
4217 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4218 and lwp_set_debug_registers_changed.
4219 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4220
34c703da
GB
42212015-03-24 Gary Benson <gbenson@redhat.com>
4222
4223 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4224 * linux-arm-low.c (arm_new_thread): Likewise.
4225 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4226 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4227 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4228 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4229
cff068da
GB
42302015-03-24 Gary Benson <gbenson@redhat.com>
4231
4232 * linux-low.c (ptid_of_lwp): New function.
4233 (lwp_is_stopped): Likewise.
4234 (lwp_stop_reason): Likewise.
4235 * linux-x86-low.c (update_debug_registers_callback):
4236 Use lwp_is_stopped.
4237 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4238 lwp_stop_reason.
4239
b2f7c7e8
GB
42402015-03-24 Gary Benson <gbenson@redhat.com>
4241
4242 * linux-low.h (linux_stop_lwp): Remove declaration.
4243
6d4ee8c6
GB
42442015-03-24 Gary Benson <gbenson@redhat.com>
4245
4246 * linux-low.h: Include nat/linux-nat.h.
4247 * linux-low.c (iterate_over_lwps_args): New structure.
4248 (iterate_over_lwps_filter): New function.
4249 (iterate_over_lwps): Likewise.
4250 * linux-x86-low.c (update_debug_registers_callback):
4251 Update signature to what iterate_over_lwps expects.
4252 Remove PID check that iterate_over_lwps now performs.
4253 (x86_dr_low_set_addr): Use iterate_over_lwps.
4254 (x86_dr_low_set_control): Likewise.
4255
70a0bb6b
GB
42562015-03-24 Gary Benson <gbenson@redhat.com>
4257
4258 * linux-x86-low.c (x86_debug_reg_state): New function.
4259 (x86_linux_prepare_to_resume): Use the above.
4260
7b669087
GB
42612015-03-24 Gary Benson <gbenson@redhat.com>
4262
4263 * linux-low.c (current_lwp_ptid): New function.
4264 * linux-x86-low.c: Include nat/linux-nat.h.
4265 (x86_dr_low_get_addr): Use current_lwp_ptid.
4266 (x86_dr_low_get_control): Likewise.
4267 (x86_dr_low_get_status): Likewise.
4268
eef49a3d
PA
42692015-03-20 Pedro Alves <palves@redhat.com>
4270
4271 * tracepoint.c (cmd_qtstatus): Make "str" const.
4272
b2333d22
PA
42732015-03-20 Pedro Alves <palves@redhat.com>
4274
4275 * server.c (handle_general_set): Make "req_str" const.
4276
23f238d3
PA
42772015-03-19 Pedro Alves <palves@redhat.com>
4278
4279 * linux-low.c (linux_resume_one_lwp): Rename to ...
4280 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4281 instead call perror_with_name.
4282 (check_ptrace_stopped_lwp_gone): New function.
4283 (linux_resume_one_lwp): Reimplement as wrapper around
4284 linux_resume_one_lwp_throw that swallows errors if the LWP is
4285 gone.
4286
91baf43f
PA
42872015-03-19 Pedro Alves <palves@redhat.com>
4288
4289 * linux-low.c (count_events_callback, select_event_lwp_callback):
4290 No longer check whether the thread has resume_stop as last resume
4291 kind.
4292
8bf3b159
PA
42932015-03-19 Pedro Alves <palves@redhat.com>
4294
4295 * linux-low.c (count_events_callback, select_event_lwp_callback):
4296 Use the lwp's status_pending_p field, not the thread's.
4297
b90fc188
PA
42982015-03-19 Pedro Alves <palves@redhat.com>
4299
4300 * linux-low.c (select_event_lwp_callback): Update comments to
4301 no longer mention SIGTRAP.
4302
464b0089
GB
43032015-03-18 Gary Benson <gbenson@redhat.com>
4304
4305 * server.c (handle_query): Do not report vFile:fstat as supported.
4306
aa9e327f
GB
43072015-03-11 Gary Benson <gbenson@redhat.com>
4308
4309 * hostio.c (sys/types.h): New include.
4310 (sys/stat.h): Likewise.
4311 (common-remote-fileio.h): Likewise.
4312 (handle_fstat): New function.
4313 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4314
791c0056
GB
43152015-03-11 Gary Benson <gbenson@redhat.com>
4316
4317 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4318 struct stat.st_blocks and struct stat.st_blksize.
4319 * configure: Regenerate.
4320 * config.in: Likewise.
4321 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4322 (OBS): Add common-remote-fileio.o.
4323 (common-remote-fileio.o): New rule.
4324
9a9df970
PA
43252015-03-09 Pedro Alves <palves@redhat.com>
4326
4327 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4328 'struct sockaddr' pointer in 'accept' call.
4329
9eb1356e
PA
43302015-03-09 Pedro Alves <palves@redhat.com>
4331
4332 Revert:
4333 2015-03-07 Pedro Alves <palves@redhat.com>
4334 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4335 or <winsock2.h> here. Instead include "gdb_socket.h".
4336 (remote_open): Use union gdb_sockaddr_u.
4337 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4338 or <winsock2.h> here. Instead include "gdb_socket.h".
4339 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4340 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4341 or <sys/un.h>.
4342 (init_named_socket, gdb_agent_helper_thread): Use union
4343 gdb_sockaddr_u.
4344
aac331e4
PA
43452015-03-07 Pedro Alves <palves@redhat.com>
4346
4347 * configure.ac (build_warnings): Move
4348 -Wdeclaration-after-statement to the C-specific set.
4349 * configure: Regenerate.
4350
366c75fc
PA
43512015-03-07 Pedro Alves <palves@redhat.com>
4352
4353 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4354 or <winsock2.h> here. Instead include "gdb_socket.h".
4355 (remote_open): Use union gdb_sockaddr_u.
4356 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4357 or <winsock2.h> here. Instead include "gdb_socket.h".
4358 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4359 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4360 or <sys/un.h>.
4361 (init_named_socket, gdb_agent_helper_thread): Use union
4362 gdb_sockaddr_u.
4363
492d29ea
PA
43642015-03-07 Pedro Alves <palves@redhat.com>
4365
4366 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4367 instead.
4368
60a191ed
YQ
43692015-03-06 Yao Qi <yao.qi@linaro.org>
4370
4371 * linux-aarch64-low.c (aarch64_insert_point): Use
4372 show_debug_regs as a boolean.
4373 (aarch64_remove_point): Likewise.
4374
f5771b1d
PA
43752015-03-05 Pedro Alves <palves@redhat.com>
4376
4377 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4378 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4379 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4380 * nto-low.c (nto_target_ops): Likewise.
4381 * spu-low.c (spu_target_ops): Likewise.
4382 * win32-low.c (win32_target_ops): Likewise.
4383
3e572f71
PA
43842015-03-04 Pedro Alves <palves@redhat.com>
4385
72f4393d 4386 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4387 Decide whether a breakpoint triggered based on the SIGTRAP's
4388 siginfo.si_code.
72f4393d
L
4389 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4390 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4391 (linux_low_filter_event): Check for breakpoints before checking
4392 watchpoints.
4393 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4394 siginfo.si_code.
72f4393d
L
4395 (linux_stopped_by_sw_breakpoint)
4396 (linux_supports_stopped_by_sw_breakpoint)
4397 (linux_stopped_by_hw_breakpoint)
4398 (linux_supports_stopped_by_hw_breakpoint): New functions.
4399 (linux_target_ops): Install new target methods.
3e572f71 4400
1ec68e26
PA
44012015-03-04 Pedro Alves <palves@redhat.com>
4402
4403 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4404 * server.c (swbreak_feature, hwbreak_feature): New globals.
4405 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4406 (captured_main): Clear swbreak_feature and hwbreak_feature.
4407 * server.h (swbreak_feature, hwbreak_feature): Declare.
4408 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4409 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4410 supports_stopped_by_hw_breakpoint>: New fields.
4411 (target_supports_stopped_by_sw_breakpoint)
4412 (target_stopped_by_sw_breakpoint)
4413 (target_supports_stopped_by_hw_breakpoint)
4414 (target_stopped_by_hw_breakpoint): Declare.
4415
15c66dd6
PA
44162015-03-04 Pedro Alves <palves@redhat.com>
4417
4418 enum lwp_stop_reason -> enum target_stop_reason
4419 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4420 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4421 (linux_wait_1, stuck_in_jump_pad_callback)
4422 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4423 (linux_stopped_by_watchpoint):
4424 * linux-low.h (enum lwp_stop_reason): Delete.
4425 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4426 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4427
98fc70d6
YQ
44282015-03-04 Yao Qi <yao.qi@linaro.org>
4429
4430 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4431
dd2ac174
GB
44322015-03-03 Gary Benson <gbenson@redhat.com>
4433
4434 * hostio.c (handle_vFile): Fix prefix lengths.
4435
d68e53f4
MM
44362015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4437
4438 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4439 ptr_bits.
4440
bf2d68ab
AA
44412015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4442
4443 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4444 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4445 (clean): Add "rm -f" for above C files.
4446 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4447 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4448 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4449 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4450 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4451 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4452 (init_registers_s390x_vx_linux64)
4453 (init_registers_s390x_tevx_linux64)
4454 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4455 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4456 declarations.
4457 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4458 (s390_store_vxrs_high): New functions.
4459 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4460 NT_S390_VXRS_HIGH.
4461 (s390_arch_setup): Add logic for selecting one of the new target
4462 descriptions. Activate the new vector regsets if applicable.
4463 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4464 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4465 and init_registers_s390x_tevx_linux64.
4466
c966a859
PA
44672015-03-01 Pedro Alves <palves@redhat.com>
4468
4469 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4470 parameter.
4471
4180215b
PA
44722015-02-27 Pedro Alves <palves@redhat.com>
4473
4474 * linux-x86-low.c (u_debugreg_offset): New function.
4475 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4476
749bab01
PA
44772015-02-27 Pedro Alves <palves@redhat.com>
4478
4479 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4480 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4481 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4482 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4483 (ps_lsetfpregs, ps_getpid)
4484 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4485 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4486 (ps_lsetxregs, ps_plog): Declare.
4487
3c14e5a3
PA
44882015-02-27 Pedro Alves <palves@redhat.com>
4489
4490 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4491 IP_AGENT_EXPORT_FUNC.
4492 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4493 IP_AGENT_EXPORT_FUNC.
4494 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4495 (IP_AGENT_EXPORT): Delete.
4496 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4497 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4498 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4499 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4500 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4501 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4502 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4503 (traceframe_read_count, traceframe_write_count)
4504 (traceframes_created, trace_state_variables, get_raw_reg)
4505 (get_trace_state_variable_value, set_trace_state_variable_value)
4506 (ust_loaded, helper_thread_id, cmd_buf): Use
4507 IPA_SYM_EXPORTED_NAME.
4508 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4509 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4510 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4511 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4512 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4513 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4514 EXTERN_C_PUSH/EXTERN_C_POP.
4515 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4516 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4517 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4518 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4519 (traceframe_write_count, traceframe_read_count)
4520 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4521 (about_to_request_buffer_space, get_trace_state_variable_value)
4522 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4523 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4524 EXTERN_C_PUSH/EXTERN_C_POP.
4525 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4526 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4527 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4528 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4529 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4530 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4531 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4532 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4533 Define.
4534 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4535 (IP_AGENT_EXPORT_VAR_DECL): Define.
4536 (tracing): Declare.
4537 (gdb_agent_get_raw_reg): Declare.
4538
fe978cb0
PA
45392015-02-27 Tom Tromey <tromey@redhat.com>
4540 Pedro Alves <palves@redhat.com>
4541
4542 Rename symbols whose names are reserved C++ keywords throughout.
4543
3bc3d82a
PA
45442015-02-27 Pedro Alves <palves@redhat.com>
4545
4546 * Makefile.in (COMPILER): New, get it from autoconf.
4547 (CXX): Get from autoconf instead.
4548 (COMPILE.pre): Use COMPILER.
4549 (CC-LD): Rename to ...
4550 (CC_LD): ... this. Use COMPILER.
4551 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4552 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4553 * acinclude.m4: Include build-with-cxx.m4.
4554 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4555 Disable -Werror by default if building in C++ mode.
4556 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4557 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4558 the C++ compiler. Save/restore CXXFLAGS too.
4559 * configure: Regenerate.
4560
07697489
PA
45612015-02-27 Pedro Alves <palves@redhat.com>
4562
4563 * acinclude.m4: Include libiberty.m4.
4564 * configure.ac: Call libiberty_INIT.
4565 * config.in, configure: Regenerate.
4566
9beb7c4e
PA
45672015-02-26 Pedro Alves <palves@redhat.com>
4568
4569 * linux-low.c (linux_wait_1): When incrementing the PC past a
4570 program breakpoint always use the_low_target.breakpoint_len as
4571 increment, rather than the maximum between that and
4572 the_low_target.decr_pc_after_break.
4573
8090aef2
PA
45742015-02-23 Pedro Alves <palves@redhat.com>
4575
4576 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4577 thread was doing a step-over; always adjust the PC if
4578 we stepped over a permanent breakpoint.
4579 (linux_wait_1): If we stepped over breakpoint that was on top of a
4580 permanent breakpoint, manually advance the PC past it.
4581
bc9540e8
PA
45822015-02-23 Pedro Alves <palves@redhat.com>
4583
4584 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4585 modes.
4586 (x86_fill_gregset, x86_store_gregset): Use it when handling
4587 $orig_eax.
4588
2db9a427
PA
45892015-02-20 Pedro Alves <palves@redhat.com>
4590
4591 * thread-db.c: Include "nat/linux-procfs.h".
4592 (thread_db_init): Skip listing new threads if the kernel supports
4593 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4594
afa8d396
PA
45952015-02-20 Pedro Alves <palves@redhat.com>
4596
4597 * linux-low.c (status_pending_p_callback): Use ptid_match.
4598
c9587f88
AT
45992015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4600
4601 PR breakpoints/16812
4602 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4603 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4604 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4605
b05ec7a5
AT
46062015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4607
4608 PR breakpoints/15956
4609 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4610
d33501a5
MM
46112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4612
4613 * linux-low.c (linux_low_btrace_conf): Print size.
4614 * server.c (handle_btrace_conf_general_set): New.
4615 (hanle_general_set): Call handle_btrace_conf_general_set.
4616 (handle_query): Report Qbtrace-conf:bts:size as supported.
4617
f4abbc16
MM
46182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4619
4620 * linux-low.c (linux_low_enable_btrace): Update parameters.
4621 (linux_low_btrace_conf): New.
4622 (linux_target_ops)<to_btrace_conf>: Initialize.
4623 * server.c (current_btrace_conf): New.
4624 (handle_btrace_enable): Rename to ...
4625 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4626 to target_enable_btrace. Update comment. Update users.
4627 (handle_qxfer_btrace_conf): New.
4628 (qxfer_packets): Add btrace-conf entry.
4629 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4630 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4631 (target_ops)<read_btrace_conf>: New.
4632 (target_enable_btrace): Update parameters.
4633 (target_read_btrace_conf): New.
4634
043c3577
MM
46352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4636
4637 * server.c (handle_btrace_general_set): Remove call to
4638 target_supports_btrace.
4639 (supported_btrace_packets): New.
4640 (handle_query): Call supported_btrace_packets.
4641 * target.h: include btrace-common.h.
4642 (btrace_target_info): Removed.
4643 (supports_btrace, target_supports_btrace): Update parameters.
4644
734b0e4b
MM
46452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4646
4647 * Makefile.in (SFILES): Add common/btrace-common.c.
4648 (OBS): Add common/btrace-common.o.
4649 (btrace-common.o): Add build rules.
4650 * linux-low: Include btrace-common.h.
4651 (linux_low_read_btrace): Use struct btrace_data. Call
4652 btrace_data_init and btrace_data_fini.
4653
d6c146e9
PA
46542015-02-06 Pedro Alves <palves@redhat.com>
4655
4656 * thread-db.c (find_new_threads_callback): Add debug output.
4657
20ba1ce6
PA
46582015-02-04 Pedro Alves <palves@redhat.com>
4659
4660 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4661 (resume_stopped_resumed_lwps): New function.
4662 (linux_wait_for_event_filtered): Use it.
4663
8cc73a39
SDJ
46642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4665
4666 * Makefile.in (SFILES): Add linux-personality.c.
4667 (linux-personality.o): New rule.
4668 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4669 list of objects to be built.
4670 * linux-low.c: Include nat/linux-personality.h.
4671 (linux_create_inferior): Remove code to disable address space
4672 randomization (moved to ../nat/linux-personality.c). Create
4673 cleanup to disable address space randomization.
4674
fb23d554
SDJ
46752015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4676
4677 * Makefile.in (posix-strerror.o): New rule.
4678 (mingw-strerror.o): Likewise.
4679 * configure: Regenerated.
4680 * configure.ac: Source file ../common/common.host. Initialize new
4681 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4682
cdf43629
YQ
46832015-01-14 Yao Qi <yao@codesourcery.com>
4684
4685 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4686 (ppc-linux.o): New rule.
4687 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4688 * configure.ac: AC_CHECK_FUNCS(getauxval).
4689 * config.in: Re-generated.
4690 * configure: Re-generated.
4691 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4692 ppc64_64bit_inferior_p
4693
514c5338
YQ
46942015-01-14 Yao Qi <yao@codesourcery.com>
4695
4696 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4697 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4698 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4699 (PT_ORIG_R3, PT_TRAP): Likewise.
4700 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4701 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4702 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4703
3368c1e5
JB
47042015-01-10 Joel Brobecker <brobecker@adacore.com>
4705
4706 * i387-fp.c (i387_cache_to_xsave): In look over
4707 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4708 zmmh_low_space field by use of zmmh_high_space.
4709
582511be
PA
47102015-01-09 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (step_over_bkpt): Move higher up in the file.
4713 (handle_extended_wait): Don't store the stop_pc here.
4714 (get_stop_pc): Adjust comments and rename to ...
4715 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4716 stopped for a software breakpoint or hardware breakpoint.
4717 (thread_still_has_status_pending_p): New function.
4718 (status_pending_p_callback): Use
4719 thread_still_has_status_pending_p. If the event is no longer
4720 interesting, resume the LWP.
4721 (handle_tracepoints): Add assert.
4722 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4723 (wstatus_maybe_breakpoint): New function.
4724 (cancel_breakpoint): Delete function.
4725 (check_stopped_by_watchpoint): New function, factored out from
4726 linux_low_filter_event.
4727 (lp_status_maybe_breakpoint): Delete function.
4728 (linux_low_filter_event): Remove filter_ptid argument.
4729 Leave thread group exits pending here. Store the LWP's stop PC.
4730 Always leave events pending.
4731 (linux_wait_for_event_filtered): Pull all events out of the
4732 kernel, and leave them all pending.
4733 (count_events_callback, select_event_lwp_callback): Consider all
4734 events.
4735 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4736 (select_event_lwp): Only give preference to the stepping LWP in
4737 all-stop mode. Adjust comments.
4738 (ignore_event): New function.
4739 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4740 references to cancel_breakpoints. Adjust to renames. Also give
4741 equal priority to all LWPs that have had events in non-stop mode.
4742 If reporting a software breakpoint event, unadjust the LWP's PC.
4743 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4744 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4745 Adjust.
4746 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4747 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4748 (linux_stopped_by_watchpoint): Adjust.
4749 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4750 * linux-low.h (enum lwp_stop_reason): New.
4751 (struct lwp_info) <stop_pc>: Adjust comment.
4752 <stopped_by_watchpoint>: Delete field.
4753 <stop_reason>: New field.
4754 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4755 * mem-break.c (software_breakpoint_inserted_here)
4756 (hardware_breakpoint_inserted_here): New function.
4757 * mem-break.h (software_breakpoint_inserted_here)
4758 (hardware_breakpoint_inserted_here): Declare.
4759 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4760 (cancel_breakpoints): Delete.
4761 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4762 (upload_fast_traceframes): Remove references to
4763 cancel_breakpoints.
4764
a33e3959
PA
47652015-01-09 Pedro Alves <palves@redhat.com>
4766
4767 * thread-db.c (find_new_threads_callback): Ignore thread if the
4768 kernel thread ID is -1.
4769
8784d563
PA
47702015-01-09 Pedro Alves <palves@redhat.com>
4771
4772 * linux-low.c (linux_attach_fail_reason_string): Move to
4773 nat/linux-ptrace.c, and rename.
4774 (linux_attach_lwp): Update comment.
4775 (attach_proc_task_lwp_callback): New function.
4776 (linux_attach): Adjust to rename and use
4777 linux_proc_attach_tgid_threads.
4778 (linux_attach_fail_reason_string): Delete declaration.
4779
76f2b779
JB
47802015-01-01 Joel Brobecker <brobecker@adacore.com>
4781
4782 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4783 * server.c (gdbserver_version): Likewise.
4784
fafcc06a
SDJ
47852014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4786
4787 * remote-utils.c: Include ctype.h.
4788 (input_interrupt): Explicitly handle the case when the char
4789 received is the NUL byte. Improve the printing of non-ASCII
4790 characters.
4791
beed38b8
JB
47922014-12-16 Joel Brobecker <brobecker@adacore.com>
4793
4794 * linux-low.c (linux_low_filter_event): Update call to
4795 linux_enable_event_reporting following the addition of
4796 a new parameter to that function.
4797
bf330350
CU
47982014-12-16 Catalin Udma <catalin.udma@freescale.com>
4799
4800 PR server/17457
4801 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4802 (AARCH64_FPCR_REGNO): Likewise.
4803 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4804 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4805 (aarch64_store_fpregset): Likewise.
4806
5227d625
JB
48072014-12-15 Joel Brobecker <brobecker@adacore.com>
4808
4809 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4810 Remove FIXME comment about assumption about N.
4811
f93b65a0
JB
48122014-12-13 Joel Brobecker <brobecker@adacore.com>
4813
4814 * configure.ac: If large-file support is disabled in GDBserver,
4815 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4816 * configure: Regenerate.
4817
e5a9158d
AA
48182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4819
4820 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4821 warning upon ENODATA from ptrace.
4822 * linux-s390-low.c (s390_store_tdb): New.
4823 (s390_regsets): Add regset for NT_S390_TDB.
4824
feea5f36
AA
48252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4826
4827 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4828 without a fill_function.
4829 * linux-s390-low.c (s390_fill_last_break): Remove.
4830 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4831 (s390_arch_setup): Use regset's size instead of fill_function for
4832 loop end condition.
4833
098dbe61
AA
48342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4835
4836 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4837 the regset's store function when ptrace returned an error.
4838 * regcache.c (get_thread_regcache): Invalidate register cache
4839 before fetching inferior's registers.
4840
28eef672
AA
48412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4842
4843 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4844 while-loop as for-loop.
4845 (regsets_store_inferior_registers): Likewise.
4846
bdca27a2
YQ
48472014-11-28 Yao Qi <yao@codesourcery.com>
4848
4849 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4850 * config.in, configure: Re-generate.
4851 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4852 is defined.
4853
9c232dda
YQ
48542014-11-21 Yao Qi <yao@codesourcery.com>
4855
4856 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4857 (AC_CHECK_HEADERS): Remove malloc.h.
4858 * configure: Re-generated.
4859 * config.in: Re-generated.
4860 * server.h: Don't include alloca.h and malloc.h.
4861 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4862 Don't include malloc.h.
4863
43968415
JB
48642014-11-17 Joel Brobecker <brobecker@adacore.com>
4865
4866 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4867 corresponding ERRNO check in same block.
4868
40e91bc7
PA
48692014-11-12 Pedro Alves <palves@redhat.com>
4870
4871 * server.c (cont_thread): Update comment.
4872 (start_inferior, attach_inferior): No longer clear cont_thread.
4873 (handle_v_cont): No longer set cont_thread.
4874 (captured_main): Clear cont_thread each time a GDB connects.
4875
c2c118cf
PA
48762014-11-12 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4879 thread, and don't resume all threads if the Hc thread has exited.
4880
78708b7c
PA
48812014-11-12 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4884 the process group instead of to a specific LWP.
4885
a2abc7de
PA
48862014-10-15 Pedro Alves <palves@redhat.com>
4887
4888 PR server/17487
4889 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4890 parameter.
4891 (arm_set_thread_context): Delete.
4892 (the_low_target): Adjust.
4893 * win32-i386-low.c (debug_registers_changed)
4894 (debug_registers_used): Delete.
4895 (update_debug_registers_callback): New function.
4896 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4897 needing to update their debug registers.
4898 (win32_get_current_dr): New function.
4899 (x86_dr_low_get_addr, x86_dr_low_get_control)
4900 (x86_dr_low_get_status): Fetch the debug register from the thread
4901 record's context.
4902 (i386_initial_stuff): Adjust.
4903 (i386_get_thread_context): Remove current_event parameter. Don't
4904 clear debug_registers_changed nor copy DR values to
4905 debug_reg_state.
4906 (i386_set_thread_context): Delete.
4907 (i386_prepare_to_resume): New function.
4908 (i386_thread_added): Mark the thread as needing to update irs
4909 debug registers.
4910 (the_low_target): Remove i386_set_thread_context and install
4911 i386_prepare_to_resume.
4912 * win32-low.c (win32_get_thread_context): Adjust.
4913 (win32_set_thread_context): Use SetThreadContext
4914 directly.
4915 (win32_prepare_to_resume): New function.
4916 (win32_require_context): New function, factored out from ...
4917 (thread_rec): ... this.
4918 (continue_one_thread): Call win32_prepare_to_resume on each thread
4919 we're about to continue.
4920 (win32_resume): Call win32_prepare_to_resume on the event thread.
4921 * win32-low.h (struct win32_thread_info)
4922 <debug_registers_changed>: New field.
4923 (struct win32_target_ops): Change prototype of set_thread_context,
4924 delete set_thread_context and add prepare_to_resume.
4925 (win32_require_context): New declaration.
4926
a442d071
GB
49272014-10-08 Gary Benson <gbenson@redhat.com>
4928
4929 * server.h: Do not include common-exceptions.h.
4930
6f1947e8
GB
49312014-10-08 Gary Benson <gbenson@redhat.com>
4932
4933 * server.h: Do not include cleanups.h.
4934
63b434a4
JH
49352014-09-30 James Hogan <james.hogan@imgtec.com>
4936
4937 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4938 mips64-dsp-linux.c.
4939
c4d9ceb6
YQ
49402014-09-23 Yao Qi <yao@codesourcery.com>
4941
4942 * linux-low.c (lp_status_maybe_breakpoint): New function.
4943 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4944 (count_events_callback): Likewise.
4945 (select_event_lwp_callback): Likewise.
4946 (cancel_breakpoints_callback): Likewise.
4947
89a5711c
DB
49482014-09-19 Don Breazeal <donb@codesourcery.com>
4949
4950 * linux-low.c (handle_extended_wait): Call
4951 linux_ptrace_get_extended_event.
4952 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4953 linux_is_extended_waitstatus.
4954
bffc0964
JB
49552014-09-16 Joel Brobecker <brobecker@adacore.com>
4956
4957 * Makefile.in (CPPFLAGS): Define.
4958 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4959 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4960
0bfdf32f
GB
49612014-09-16 Gary Benson <gbenson@redhat.com>
4962
4963 * inferiors.h (current_inferior): Renamed as...
4964 (current_thread): New variable. All uses updated.
4965 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4966 (maybe_move_out_of_jump_pad): Likewise.
4967 (cancel_breakpoint): Likewise.
4968 (linux_low_filter_event): Likewise.
4969 (wait_for_sigstop): Likewise.
4970 (linux_resume_one_lwp): Likewise.
4971 (need_step_over_p): Likewise.
4972 (start_step_over): Likewise.
4973 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4974 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4975 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4976 and save_inferior as saved_thread.
4977 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4978 saved_thread.
4979 (regcache_invalidate_thread): Likewise.
4980 * remote-utils.c (prepare_resume_reply): Likewise.
4981 * thread-db.c (thread_db_get_tls_address): Likewise.
4982 (disable_thread_event_reporting): Likewise.
4983 (remove_thread_event_breakpoints): Likewise.
4984 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4985 as saved_thread.
4986 * target.h (set_desired_inferior): Renamed as...
4987 (set_desired_thread): New declaration. All uses updated.
4988 * server.c (myresume): Updated comment to reference thread instead
4989 of inferior.
4990 (handle_serial_event): Likewise.
4991 (handle_target_event): Likewise.
4992
361c8ade
GB
49932014-09-12 Tom Tromey <tromey@redhat.com>
4994 Gary Benson <gbenson@redhat.com>
4995
4996 * regcache.h: Include common-regcache.h.
4997 (regcache_read_pc): Don't declare.
4998 * regcache.c (get_thread_regcache_for_ptid): New function.
4999
bd9269f7
GB
50002014-09-11 Tom Tromey <tromey@redhat.com>
5001 Gary Benson <gbenson@redhat.com>
5002
5003 * symbol.c: New file.
5004 * Makefile.in (SFILES): Add symbol.c.
5005 (OBS): Add symbol.o.
5006
f8c1d06b
GB
50072014-09-11 Gary Benson <gbenson@redhat.com>
5008
5009 * target.c (target_stop_ptid, target_continue_ptid): New
5010 functions.
5011
721ec300
GB
50122014-09-11 Tom Tromey <tromey@redhat.com>
5013 Gary Benson <gbenson@redhat.com>
5014
5015 * target.h: Include target/target.h.
5016 * target.c (target_read_memory, target_read_uint32)
5017 (target_write_memory): New functions.
5018
c5e92cca
GB
50192014-09-11 Gary Benson <gbenson@redhat.com>
5020
5021 * server.h (debug_hw_points): Don't declare.
5022 * server.c (debug_hw_points): Don't define. Replace all uses
5023 with show_debug_regs.
5024 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5025 all uses with show_debug_regs.
5026
2e4bb98a
EBM
50272014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5028
5029 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5030 endianness into account.
5031 (ppc_supply_ptrace_register): Likewise.
5032
ac740bc7
JH
50332014-09-03 James Hogan <james.hogan@imgtec.com>
5034
5035 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5036 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5037
97ea6506
GB
50382014-09-03 Gary Benson <gbenson@redhat.com>
5039
5040 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5041 ALL_DEBUG_ADDRESS_REGISTERS.
5042
df7e5265
GB
50432014-09-02 Gary Benson <gbenson@redhat.com>
5044
5045 * i386-low.h: Renamed as...
5046 * x86-low.h: New file. All type, function and variable name
5047 prefixes changed from "i386_" to "x86_". All references updated.
5048 * i386-low.c: Renamed as...
5049 * x86-low.c: New file. All type, function and variable name
5050 prefixes changed from "i386_" to "x86_". All references updated.
5051
ed859da7
GB
50522014-09-02 Gary Benson <gbenson@redhat.com>
5053
5054 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5055 (x86_linux_new_thread): Likewise.
5056
860789c7
GB
50572014-08-29 Gary Benson <gbenson@redhat.com>
5058
5059 * server.h (setjmp.h): Do not include.
5060 (toplevel): Do not declare.
5061 (common-exceptions.h): Include.
5062 (cleanups.h): Likewise.
5063 * server.c (toplevel): Do not define.
5064 (exit_code): New static global.
5065 (detach_or_kill_for_exit_cleanup): New function.
5066 (main): New function. Original main renamed to...
5067 (captured_main): New function.
5068 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5069
ff55e1b5
GB
50702014-08-29 Gary Benson <gbenson@redhat.com>
5071
5072 * Makefile.in (SFILES): Add common/common-exceptions.c.
5073 (OBS): Add common-exceptions.o.
5074 (common-exceptions.o): New rule.
5075 * utils.c (prepare_to_throw_exception): New function.
5076
e9bcb658
GB
50772014-08-29 Gary Benson <gbenson@redhat.com>
5078
5079 * config.in: Regenerate.
5080 * configure: Likewise.
5081
e3180625
GB
50822014-08-29 Gary Benson <gbenson@redhat.com>
5083
5084 * Makefile.in (SFILES): Add common/cleanups.c.
5085 (OBS): cleanups.o.
5086 (cleanups.o): New rule.
5087
e3d6ba5d
GB
50882014-08-29 Gary Benson <gbenson@redhat.com>
5089
5090 * utils.c (internal_vwarning): New function.
5091
7096e886
GB
50922014-08-28 Gary Benson <gbenson@redhat.com>
5093
5094 * utils.h (fatal): Remove declaration.
5095 * utils.c (fatal): Remove function.
5096
14ce3192
GB
50972014-08-28 Gary Benson <gbenson@redhat.com>
5098
5099 * tracepoint.c (gdb_agent_init): Replace fatal with
5100 perror_with_name.
5101 (initialize_tracepoint): Likewise.
5102
50278d59
GB
51032014-08-28 Gary Benson <gbenson@redhat.com>
5104
5105 * remote-utils.c (remote_prepare): Replace fatal with error.
5106
aa96c426
GB
51072014-08-28 Gary Benson <gbenson@redhat.com>
5108
5109 * linux-low.c (linux_async): Replace fatal with warning.
5110 Tidy up and return.
5111 (linux_start_non_stop): Return -1 if linux_async failed.
5112
f7160e97
GB
51132014-08-28 Gary Benson <gbenson@redhat.com>
5114
5115 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5116 gdb_assert.
5117 (i386_dr_low_get_addr): Remove vague comment.
5118 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5119 gdb_assert.
5120
38e08fca
GB
51212014-08-28 Gary Benson <gbenson@redhat.com>
5122
5123 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5124 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5125 internal_error.
5126 (linux_resume_one_lwp): Likewise.
5127 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5128 gdb_assert.
5129 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5130 with internal_error.
5131 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5132 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5133 (find_register_by_name): Replace fatal with internal_error.
5134 (find_regno): Likewise.
5135 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5136 * thread-db.c (thread_db_create_event): Likewise.
5137 (thread_db_load_search): Likewise.
5138 (try_thread_db_load_1): Likewise.
5139 * tracepoint.c (get_jump_space_head): Replace fatal with
5140 internal_error.
5141 (claim_trampoline_space): Likewise.
5142 (have_fast_tracepoint_trampoline_buffer): Likewise.
5143 (cmd_qtstart): Likewise.
5144 (stop_tracing): Likewise.
5145 (fast_tracepoint_collecting): Likewise.
5146 (target_malloc): Likewise.
5147 (download_tracepoint): Likewise.
5148 (download_trace_state_variables): Replace check with gdb_assert.
5149 (upload_fast_traceframes): Replace fatal with internal_error.
5150
34abf635
GB
51512014-08-19 Tom Tromey <tromey@redhat.com>
5152 Gary Benson <gbenson@redhat.com>
5153
5154 * Makefile.in (SFILES): Add common/common-debug.c.
5155 (OBS): Add common-debug.o.
5156 (common-debug.o): New rule.
5157 * debug.h (debug_printf): Don't declare.
5158 * debug.c (debug_printf): Renamed and rewritten as...
5159 (debug_vprintf): New function.
5160
f6e94d78
GB
51612014-08-19 Gary Benson <gbenson@redhat.com>
5162
5163 * utils.h: Do not include print-utils.h.
5164
9239eeab
GB
51652014-08-19 Tom Tromey <tromey@redhat.com>
5166 Gary Benson <gbenson@redhat.com>
5167
5168 * server.h: Add static assertion.
5169 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5170
ef87c8bb
GB
51712014-08-19 Tom Tromey <tromey@redhat.com>
5172 Gary Benson <gbenson@redhat.com>
5173
5174 * Makefile.in (SFILES): Add common/errors.c.
5175 (OBS): Add errors.o.
5176 (IPA_OBS): Add errors-ipa.o.
5177 (errors.o): New rule.
5178 (errors-ipa.o): Likewise.
5179 * utils.h (perror_with_name, error, warning): Don't declare.
5180 * utils.c (warning): Renamed and rewritten as...
5181 (vwarning): New function.
5182 (error): Renamed and rewritten as...
5183 (verror): New function.
5184 (internal_error): Renamed and rewritten as...
5185 (internal_verror): New function.
5186
bb974a24
GB
51872014-08-07 Gary Benson <gbenson@redhat.com>
5188
5189 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5190 * configure: Regenerate.
5191 * config.in: Likewise.
5192 * server.h: Do not include errno.h.
5193 * event-loop.c: Likewise.
5194 * hostio-errno.c: Likewise.
5195 * linux-low.c: Likewise.
5196 * remote-utils.c: Likewise.
5197 * spu-low.c: Likewise.
5198 * utils.c: Likewise.
5199 * gdbreplay.c: Unconditionally include errno.h.
5200
6d3d12eb
GB
52012014-08-07 Gary Benson <gbenson@redhat.com>
5202
5203 * server.h: Do not include string.h.
5204 * event-loop.c: Likewise.
5205 * linux-low.c: Likewise.
5206 * regcache.c: Likewise.
5207 * remote-utils.c: Likewise.
5208 * spu-low.c: Likewise.
5209 * utils.c: Likewise.
5210
dccbb609
GB
52112014-08-07 Gary Benson <gbenson@redhat.com>
5212
5213 * server.h: Do not include gdb_assert.h.
5214
e76df0d0
GB
52152014-08-07 Gary Benson <gbenson@redhat.com>
5216
5217 * server.h: Do not include common-utils.h.
5218
4cb9c816
GB
52192014-08-07 Gary Benson <gbenson@redhat.com>
5220
5221 * server.h: Do not include ptid.h.
5222 * notif.h: Likewise.
5223
3995eeee
GB
52242014-08-07 Gary Benson <gbenson@redhat.com>
5225
5226 * server.h: Do not include gdb_locale.h.
5227
cb9f1a9b
GB
52282014-08-07 Gary Benson <gbenson@redhat.com>
5229
5230 * server.h: Do not include gdb/signals.h.
5231 * win32-low.c: Likewise.
5232
a5fceff8
GB
52332014-08-07 Gary Benson <gbenson@redhat.com>
5234
5235 * server.h: Do not include pathmax.h.
5236
b9391142
GB
52372014-08-07 Gary Benson <gbenson@redhat.com>
5238
5239 * server.h: Do not include libiberty.h.
5240 * linux-bfin-low.c: Likewise.
5241
0e443c87
GB
52422014-08-07 Gary Benson <gbenson@redhat.com>
5243
5244 * server.h: Do not include ansidecl.h.
5245
8ebb3f56
GB
52462014-08-07 Gary Benson <gbenson@redhat.com>
5247
5248 * linux-x86-low.c: Do not include stddef.h.
5249 * lynx-ppc-low.c: Likewise.
5250 * tracepoint.c: Likewise.
5251
8980bdf6
GB
52522014-08-07 Gary Benson <gbenson@redhat.com>
5253
5254 * server.h: Do not include stdarg.h.
5255 * nto-low.c: Likewise.
5256
d7096f71
GB
52572014-08-07 Gary Benson <gbenson@redhat.com>
5258
5259 * server.h: Do not include stdlib.h.
5260 * inferiors.c: Likewise.
5261 * linux-low.c: Likewise.
5262 * regcache.c: Likewise.
5263 * spu-low.c: Likewise.
5264 * tracepoint.c: Likewise.
5265 * utils.c: Likewise.
5266
d02f550d
GB
52672014-08-07 Gary Benson <gbenson@redhat.com>
5268
5269 * server.h: Do not include stdio.h.
5270 * linux-low.c: Likewise.
5271 * remote-utils.c: Likewise.
5272 * spu-low.c: Likewise.
5273 * utils.c: Likewise.
5274 * wincecompat.c: Likewise.
5275
87f6c4e3
GB
52762014-08-06 Gary Benson <gbenson@redhat.com>
5277
5278 * regcache.c (init_register_cache): Move conditionals inside if.
5279
7089dca4
GB
52802014-08-06 Gary Benson <gbenson@redhat.com>
5281
5282 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5283
462f517e
GB
52842014-07-31 Gary Benson <gbenson@redhat.com>
5285
5286 * ax.h: Do not include server.h.
5287 * gdbthread.h: Likewise.
5288 * lynx-low.h: Likewise.
5289 * notif.h: Likewise.
5290
976411d6
GB
52912014-07-30 Gary Benson <gbenson@redhat.com>
5292
5293 * server.h: Include common-defs.h.
5294 Do not include config.h or build-gnulib-gdbserver/config.h.
5295
d41f6d8e
GB
52962014-07-30 Gary Benson <gbenson@redhat.com>
5297
5298 * hostio-errno.c: Move server.h to top of includes list.
5299 * inferiors.c: Likewise.
5300 * linux-x86-low.c: Likewise.
5301 * notif.c: Include server.h.
5302
314c6a35
TT
53032014-07-24 Tom Tromey <tromey@redhat.com>
5304 Gary Benson <gbenson@redhat.com>
5305
5306 * server.h (CORE_ADDR): Now unsigned.
5307
69ff6be5
PA
53082014-07-16 Pedro Alves <palves@redhat.com>
5309
5310 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5311
ce9e3fe7
PA
53122014-07-15 Pedro Alves <palves@redhat.com>
5313
5314 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5315 copy.
5316
e76126e8
PA
53172014-07-11 Pedro Alves <palves@redhat.com>
5318
5319 * linux-low.c (kill_wait_lwp): New function, based on
5320 kill_one_lwp_callback, but use my_waitpid directly.
5321 (kill_one_lwp_callback, linux_kill): Use it.
5322
8e9db26e
PA
53232014-06-23 Pedro Alves <palves@redhat.com>
5324
5325 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5326 before setting DR0..DR3.
5327
698b3e08
GB
53282014-06-20 Gary Benson <gbenson@redhat.com>
5329
5330 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5331 * configure: Regenerated.
5332 * config.in: Likewise.
5333
125f8a3d
GB
53342014-06-20 Gary Benson <gbenson@redhat.com>
5335
5336 * Makefile.in (SFILES): Update locations for files moved
5337 from common to nat.
5338 (object file files): Reordered.
5339
42995dbd
GB
53402014-06-20 Gary Benson <gbenson@redhat.com>
5341
5342 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5343 (i386_dr_low_set_addr): Likewise.
5344 (i386_dr_low_get_addr): Likewise.
5345 (i386_dr_low_can_set_control): Likewise.
5346 (i386_dr_low_set_control): Likewise.
5347 (i386_dr_low_get_control): Likewise.
5348 (i386_dr_low_get_status): Likewise.
5349 (i386_get_debug_register_length): Likewise.
5350 * linux-x86-low.c (i386_dr_low_set_addr):
5351 Changed signature. Made static.
5352 (i386_dr_low_get_addr): Likewise.
5353 (i386_dr_low_set_control): Likewise.
5354 (i386_dr_low_get_control): Likewise.
5355 (i386_dr_low_get_status): Likewise.
5356 (i386_dr_low): New global variable.
5357 * win32-i386-low.c (i386_dr_low_set_addr):
5358 Changed signature. Made static.
5359 (i386_dr_low_get_addr): Likewise.
5360 (i386_dr_low_set_control): Likewise.
5361 (i386_dr_low_get_control): Likewise.
5362 (i386_dr_low_get_status): Likewise.
5363 (i386_dr_low): New global variable.
5364
e1d2394b
MS
53652014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5366
5367 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5368 * Makefile.in (AR, AR_FLAGS): Define.
5369 * configure: Regenerate.
5370
3a8ee006
GB
53712014-06-19 Gary Benson <gbenson@redhat.com>
5372
5373 * Makefile.in (i386-dregs.o): New rule.
5374 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5375 * i386-low.c (target.h): Remove include.
5376 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5377 (DR_CONTROL_SHIFT): Likewise.
5378 (DR_CONTROL_SIZE): Likewise.
5379 (DR_RW_EXECUTE): Likewise.
5380 (DR_RW_WRITE): Likewise.
5381 (DR_RW_READ): Likewise.
5382 (DR_RW_IORW): Likewise.
5383 (DR_LEN_1): Likewise.
5384 (DR_LEN_2): Likewise.
5385 (DR_LEN_4): Likewise.
5386 (DR_LEN_8): Likewise.
5387 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5388 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5389 (DR_ENABLE_SIZE): Likewise.
5390 (DR_LOCAL_SLOWDOWN): Likewise.
5391 (DR_GLOBAL_SLOWDOWN): Likewise.
5392 (DR_CONTROL_RESERVED): Likewise.
5393 (I386_DR_CONTROL_MASK): Likewise.
5394 (I386_DR_VACANT): Likewise.
5395 (I386_DR_LOCAL_ENABLE): Likewise.
5396 (I386_DR_GLOBAL_ENABLE): Likewise.
5397 (I386_DR_DISABLE): Likewise.
5398 (I386_DR_SET_RW_LEN): Likewise.
5399 (I386_DR_GET_RW_LEN): Likewise.
5400 (I386_DR_WATCH_HIT): Likewise.
5401 (i386_wp_op_t): Likewise.
5402 (i386_show_dr): Likewise.
5403 (i386_length_and_rw_bits): Likewise.
5404 (i386_insert_aligned_watchpoint): Likewise.
5405 (i386_remove_aligned_watchpoint): Likewise.
5406 (i386_handle_nonaligned_watchpoint): Likewise.
5407 i386_update_inferior_debug_regs(): Likewise.
5408 (i386_dr_insert_watchpoint): Likewise.
5409 (i386_dr_remove_watchpoint): Likewise.
5410 (i386_dr_region_ok_for_watchpoint): Likewise.
5411 (i386_dr_stopped_data_address): Likewise.
5412 (i386_dr_stopped_by_watchpoint): Likewise.
5413
8f26655c
GB
54142014-06-19 Gary Benson <gbenson@redhat.com>
5415
5416 * i386-low.c (i386_dr_show): Renamed to
5417 i386_show_dr and made static. All uses updated.
5418 (i386_dr_length_and_rw_bits): Renamed to
5419 i386_length_and_rw_bits and made static.
5420 All uses updated.
5421 (i386_dr_insert_aligned_watchpoint): Renamed to
5422 i386_insert_aligned_watchpoint and made static.
5423 All uses updated.
5424 (i386_dr_remove_aligned_watchpoint): Renamed to
5425 i386_remove_aligned_watchpoint and made static.
5426 All uses updated.
5427 (i386_dr_update_inferior_debug_regs): Renamed to
5428 i386_update_inferior_debug_regs and made static.
5429 All uses updated.
5430
b9228891
GB
54312014-06-18 Gary Benson <gbenson@redhat.com>
5432
5171def3
GB
5433 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5434 (i386_dr_low_can_set_control): Likewise.
5435 (i386_get_debug_register_length): Likewise.
5436 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5437 (i386_dr_low_can_set_control): Likewise.
5438 (i386_get_debug_register_length): Likewise.
5439
54402014-06-17 Gary Benson <gbenson@redhat.com>
5441
b9228891
GB
5442 * i386-low.h (i386-dregs.h): New include.
5443 (DR_FIRSTADDR): Now in i386-dregs.h.
5444 (DR_LASTADDR): Likewise.
5445 (DR_NADDR): Likewise.
5446 (DR_STATUS): Likewise.
5447 (DR_CONTROL): Likewise.
5448 (i386_debug_reg_state): Likewise.
5449 (i386_dr_insert_watchpoint): Likewise.
5450 (i386_dr_remove_watchpoint): Likewise.
5451 (i386_dr_region_ok_for_watchpoint): Likewise.
5452 (i386_dr_stopped_data_address): Likewise.
5453 (i386_dr_stopped_by_watchpoint): Likewise.
5454 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5455
4be83cc2
GB
54562014-06-18 Gary Benson <gbenson@redhat.com>
5457
5458 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5459 i386_dr_insert_watchpoint.
5460 (i386_low_remove_watchpoint): Renamed to
5461 i386_dr_remove_watchpoint.
5462 (i386_low_region_ok_for_watchpoint): Renamed to
5463 i386_dr_region_ok_for_watchpoint.
5464 (i386_low_stopped_data_address): Renamed to
5465 i386_dr_stopped_data_address.
5466 (i386_low_stopped_by_watchpoint): Renamed to
5467 i386_dr_stopped_by_watchpoint.
5468 * i386-low.c (i386_show_dr): Renamed to
5469 i386_dr_show and made nonstatic. All uses updated.
5470 (i386_length_and_rw_bits): Renamed to
5471 i386_dr_length_and_rw_bits and made nonstatic.
5472 All uses updated.
5473 (i386_insert_aligned_watchpoint): Renamed to
5474 i386_dr_insert_aligned_watchpoint and made nonstatic.
5475 All uses updated.
5476 (i386_remove_aligned_watchpoint): Renamed to
5477 i386_dr_remove_aligned_watchpoint and made nonstatic.
5478 All uses updated.
5479 (i386_update_inferior_debug_regs): Renamed to
5480 i386_dr_update_inferior_debug_regs and made nonstatic.
5481 All uses updated.
5482 (i386_low_insert_watchpoint): Renamed to
5483 i386_dr_insert_watchpoint. All uses updated.
5484 (i386_low_remove_watchpoint): Renamed to
5485 i386_dr_remove_watchpoint. All uses updated.
5486 (i386_low_region_ok_for_watchpoint): Renamed to
5487 i386_dr_region_ok_for_watchpoint. All uses updated.
5488 (i386_low_stopped_data_address): Renamed to
5489 i386_dr_stopped_data_address. All uses updated.
5490 (i386_low_stopped_by_watchpoint): Renamed to
5491 i386_dr_stopped_by_watchpoint. All uses updated.
5492
131aa0d4
GB
54932014-06-18 Gary Benson <gbenson@redhat.com>
5494
5495 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5496 (i386_dr_low_can_set_control): Likewise.
5497 (i386_insert_aligned_watchpoint): New check.
5498
d9305f7f
GB
54992014-06-18 Gary Benson <gbenson@redhat.com>
5500
5501 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5502 Renamed to state.
5503
e927c9fc
GB
55042014-06-18 Gary Benson <gbenson@redhat.com>
5505
5506 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5507 instead of fatal and error.
5508 (i386_handle_nonaligned_watchpoint): Likewise.
5509
1b6d4134
GB
55102014-06-18 Gary Benson <gbenson@redhat.com>
5511
5512 * i386-low.c (i386_get_debug_register_length): New macro.
5513 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5514 (i386_show_dr): Use debug_printf instead of fprintf. Use
5515 phex to format values.
5516
6e62758f
GB
55172014-06-18 Gary Benson <gbenson@redhat.com>
5518
5519 * i386-low.h: Comment changes.
5520 * i386-low.c: Likewise.
5521
fc6e2f03
GB
55222014-06-18 Gary Benson <gbenson@redhat.com>
5523
5524 * i386-low.c: Whitespace changes.
5525
f9d1eeed
TT
55262014-06-12 Tom Tromey <tromey@redhat.com>
5527
5528 * utils.c (freeargv): Remove.
5529
0b04e523
TT
55302014-06-12 Tom Tromey <tromey@redhat.com>
5531
5532 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5533 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5534 (parse_debug_format_options): Likewise.
5535 (gdbserver_usage): Likewise.
5536 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5537 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5538 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5539 against libiberty.
5540 ($(LIBGNU)): Depend on libiberty.
5541 (all-lib): Recurse into all subdirs.
5542 (install-only): Invoke "install" target in subdirs.
5543 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5544 targets.
5545 * configure: Rebuild.
5546 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5547 for vasprintf, vsnprintf, or gettimeofday.
5548 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5549 srv_tgtobj.
5550
270c9937
JB
55512014-06-05 Joel Brobecker <brobecker@adacore.com>
5552
5553 * development.sh: Delete.
5554 * Makefile.in (config.status): Adjust dependency on development.sh.
5555 * configure.ac: Adjust development.sh source call.
5556 * configure: Regenerate.
5557
0a261ed8
PA
55582014-06-02 Pedro Alves <palves@redhat.com>
5559
5560 * ax.c (gdb_free_agent_expr): New function.
5561 * ax.h (gdb_free_agent_expr): New declaration.
5562 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5563 list.
5564 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5565 static.
5566 (clear_breakpoint_conditions_and_commands): New function.
5567 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5568 (clear_breakpoint_conditions_and_commands): New declaration.
5569
e9dae05e
RR
55702014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5571
5572 * linux-aarch64-low.c (asm/ptrace.h): Include.
5573
5876f503
JK
55742014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5575
5576 Fix TLS access for -static -pthread.
5577 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5578 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5579 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5580
802e8e6d
PA
55812014-05-20 Pedro Alves <palves@redhat.com>
5582
5583 * linux-aarch64-low.c (aarch64_insert_point)
5584 (aarch64_remove_point): No longer check whether the type is
5585 supported here. Adjust to new interface.
5586 (the_low_target): Install aarch64_supports_z_point_type as
5587 supports_z_point_type method.
5588 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5589 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5590 instead of a Z packet char. Adjust.
5591 (arm_supports_z_point_type): New function.
5592 (arm_insert_point, arm_remove_point): Adjust to new interface.
5593 (the_low_target): Install arm_supports_z_point_type.
5594 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5595 (cris_insert_point, cris_remove_point): Adjust to new interface.
5596 Don't check whether the type is supported here.
5597 (the_low_target): Install cris_supports_z_point_type.
5598 * linux-low.c (linux_supports_z_point_type): New function.
5599 (linux_insert_point, linux_remove_point): Adjust to new interface.
5600 * linux-low.h (struct linux_target_ops) <insert_point,
5601 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5602 raw_breakpoint pointer parameter.
5603 <supports_z_point_type>: New method.
5604 * linux-mips-low.c (mips_supports_z_point_type): New function.
5605 (mips_insert_point, mips_remove_point): Adjust to new interface.
5606 Use mips_supports_z_point_type.
5607 (the_low_target): Install mips_supports_z_point_type.
5608 * linux-ppc-low.c (the_low_target): Install NULL as
5609 supports_z_point_type method.
5610 * linux-s390-low.c (the_low_target): Install NULL as
5611 supports_z_point_type method.
5612 * linux-sparc-low.c (the_low_target): Install NULL as
5613 supports_z_point_type method.
5614 * linux-x86-low.c (x86_supports_z_point_type): New function.
5615 (x86_insert_point): Adjust to new insert_point interface. Use
5616 insert_memory_breakpoint. Adjust to new
5617 i386_low_insert_watchpoint interface.
5618 (x86_remove_point): Adjust to remove_point interface. Use
5619 remove_memory_breakpoint. Adjust to new
5620 i386_low_remove_watchpoint interface.
5621 (the_low_target): Install x86_supports_z_point_type.
5622 * lynx-low.c (lynx_target_ops): Install NULL as
5623 supports_z_point_type callback.
5624 * nto-low.c (nto_supports_z_point_type): New.
5625 (nto_insert_point, nto_remove_point): Adjust to new interface.
5626 (nto_target_ops): Install nto_supports_z_point_type.
5627 * mem-break.c: Adjust intro comment.
5628 (struct raw_breakpoint) <raw_type, size>: New fields.
5629 <inserted>: Update comment.
5630 <shlib_disabled>: Delete field.
5631 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5632 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5633 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5634 (raw_bkpt_type_to_target_hw_bp_type): New function.
5635 (find_enabled_raw_code_breakpoint_at): New function.
5636 (find_raw_breakpoint_at): New type and size parameters. Use them.
5637 (insert_memory_breakpoint): New function, based off
5638 set_raw_breakpoint_at.
5639 (remove_memory_breakpoint): New function.
5640 (set_raw_breakpoint_at): Reimplement.
5641 (set_breakpoint): New, based on set_breakpoint_at.
5642 (set_breakpoint_at): Reimplement.
5643 (delete_raw_breakpoint): Go through the_target->remove_point
5644 instead of assuming memory breakpoints.
5645 (find_gdb_breakpoint_at): Delete.
5646 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5647 (find_gdb_breakpoint): New function.
5648 (set_gdb_breakpoint_at): Delete.
5649 (z_type_supported): New function.
5650 (set_gdb_breakpoint_1): New function, loosely based off
5651 set_gdb_breakpoint_at.
5652 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5653 (delete_gdb_breakpoint_at): Delete.
5654 (delete_gdb_breakpoint_1): New function, loosely based off
5655 delete_gdb_breakpoint_at.
5656 (delete_gdb_breakpoint): New function.
5657 (clear_gdb_breakpoint_conditions): Rename to ...
5658 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5659 breakpoint.
5660 (add_condition_to_breakpoint): Make static.
5661 (add_breakpoint_condition): Take a struct breakpoint pointer
5662 instead of an address. Adjust.
5663 (gdb_condition_true_at_breakpoint): Rename to ...
5664 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5665 z_type parameter.
5666 (gdb_condition_true_at_breakpoint): Reimplement.
5667 (add_breakpoint_commands): Take a struct breakpoint pointer
5668 instead of an address. Adjust.
5669 (gdb_no_commands_at_breakpoint): Rename to ...
5670 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5671 parameter. Return true if no breakpoint was found. Change debug
5672 output.
5673 (gdb_no_commands_at_breakpoint): Reimplement.
5674 (run_breakpoint_commands): Rename to ...
5675 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5676 and change return type to boolean.
5677 (run_breakpoint_commands): New function.
5678 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5679 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5680 breakpoint. Go through the_target->remove_point instead of
5681 assuming memory breakpoint.
5682 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5683 software and hardware breakpoints.
5684 (reinsert_raw_breakpoint): Go through the_target->insert_point
5685 instead of assuming memory breakpoint.
5686 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5687 software and hardware breakpoints.
5688 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5689 Check both software and hardware breakpoints.
5690 (validate_inserted_breakpoint): Assert the breakpoint is a
5691 software breakpoint. Set the inserted flag to -1 instead of
5692 setting shlib_disabled.
5693 (delete_disabled_breakpoints): Adjust.
5694 (validate_breakpoints): Only validate software breakpoints.
5695 Adjust to inserted flag change.
5696 (check_mem_read, check_mem_write): Skip breakpoint types other
5697 than software breakpoints. Adjust to inserted flag change.
5698 * mem-break.h (enum raw_bkpt_type): New enum.
5699 (raw_breakpoint, struct process_info): Forward declare.
5700 (Z_packet_to_target_hw_bp_type): Delete declaration.
5701 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5702 (set_gdb_breakpoint, delete_gdb_breakpoint)
5703 (clear_breakpoint_conditions): New declarations.
5704 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5705 (breakpoint_inserted_here): Update comment.
5706 (add_breakpoint_condition, add_breakpoint_commands): Replace
5707 address parameter with a breakpoint pointer parameter.
5708 (gdb_breakpoint_here): Update comment.
5709 (delete_gdb_breakpoint_at): Delete.
5710 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5711 * server.c (process_point_options): Take a struct breakpoint
5712 pointer instead of an address. Adjust.
5713 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5714 delete_gdb_breakpoint.
5715 * spu-low.c (spu_target_ops): Install NULL as
5716 supports_z_point_type method.
5717 * target.h: Include mem-break.h.
5718 (struct target_ops) <prepare_to_access_memory>: Update comment.
5719 <supports_z_point_type>: New field.
5720 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5721 instead of a char. Also take a raw breakpoint pointer.
5722 * win32-arm-low.c (the_low_target): Install NULL as
5723 supports_z_point_type.
5724 * win32-i386-low.c (i386_supports_z_point_type): New function.
5725 (i386_insert_point, i386_remove_point): Adjust to new interface.
5726 (the_low_target): Install i386_supports_z_point_type.
5727 * win32-low.c (win32_supports_z_point_type): New function.
5728 (win32_insert_point, win32_remove_point): Adjust to new interface.
5729 (win32_target_ops): Install win32_supports_z_point_type.
5730 * win32-low.h (struct win32_target_ops):
5731 <supports_z_point_type>: New method.
5732 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5733 instead of a char. Also take a raw breakpoint pointer.
5734
932539e3
PA
57352014-05-20 Pedro Alves <palves@redhat.com>
5736
5737 * mem-break.h: Include break-common.h.
5738 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5739 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5740 (Z_packet_to_target_hw_bp_type): New declaration.
5741 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5742 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5743 (Z_PACKET_ACCESS_WP): Delete macros.
5744 (Z_packet_to_hw_type): Delete function.
5745 * i386-low.h: Don't include break-common.h here.
5746 (Z_packet_to_hw_type): Delete declaration.
5747 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5748 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5749 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5750 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5751 * linux-aarch64-low.c: Don't include break-common.h here.
5752 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5753 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5754 (Z_packet_to_target_hw_bp_type): Delete function.
5755 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5756 function.
5757 (mips_insert_point, mips_remove_point): Use
5758 Z_packet_to_target_hw_bp_type.
5759
4ff0d3d8
PA
57602014-05-20 Pedro Alves <palves@redhat.com>
5761
5762 * linux-aarch64-low.c: Include break-common.h.
5763 (enum target_point_type): Delete.
5764 (Z_packet_to_point_type): Rename to ...
5765 (Z_packet_to_target_hw_bp_type): ... this, and return a
5766 target_hw_bp_type instead.
5767 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5768 instead of an enum target_point_type.
5769 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5770 breakpoint type.
5771 (aarch64_dr_state_insert_one_point)
5772 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5773 (aarch64_handle_aligned_watchpoint)
5774 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5775 Take an enum target_hw_bp_type instead of an enum
5776 target_point_type.
5777 (aarch64_supports_z_point_type): New function.
5778 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5779 use Z_packet_to_target_hw_bp_type.
5780
786dc519
JB
57812014-05-20 Joel Brobecker <brobecker@adacore.com>
5782
5783 * configure.ac: Only use -Werror by default when DEVELOPMENT
5784 is true.
5785 * configure: Regenerate.
5786
9e0aa64f
JK
57872014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5788
5789 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5790 * linux-x86-low.c (X86_64_USER_REGS): New.
5791 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5792
2b577b92
YQ
57932014-04-28 Yao Qi <yao@codesourcery.com>
5794
5795 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5796 name.
5797
94611da2
PA
57982014-04-25 Pedro Alves <palves@redhat.com>
5799
5800 PR server/16255
5801 * linux-low.c (linux_attach_fail_reason_string): New function.
5802 (linux_attach_lwp): Delete.
5803 (linux_attach_lwp_1): Rename to ...
5804 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5805 argument. Remove "initial" parameter. Return int instead of
5806 void. Don't error or warn here.
5807 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5808 failure to attach to the tgid. Call warning when failing to
5809 attach to an lwp.
5810 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5811 argument. Remove "initial" parameter. Return int instead of
5812 void. Don't error or warn here.
5813 (linux_attach_fail_reason_string): New declaration.
5814 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5815 interface change. Use linux_attach_fail_reason_string.
5816
01f9f808
MS
58172014-04-24 Michael Sturm <michael.sturm@mintel.com>
5818 Walfred Tedeschi <walfred.tedeschi@intel.com>
5819
5820 * Makefile.in: Added rules to handle new files
5821 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5822 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5823 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5824 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5825 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5826 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5827 x32-avx512-linux.o.
5828 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5829 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5830 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5831 i386/x32-avx512.xml.
5832 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5833 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5834 i386/x32-avx512-linux.xml.
5835 * i387-fp.c (num_avx512_k_registers): New constant for number
5836 of K registers.
5837 (num_avx512_zmmh_low_registers): New constant for number of
5838 lower ZMM registers (0-15).
5839 (num_avx512_zmmh_high_registers): New constant for number of
5840 higher ZMM registers (16-31).
5841 (num_avx512_ymmh_registers): New contant for number of higher
5842 YMM registers (ymm16-31 added by avx521 on x86_64).
5843 (num_avx512_xmm_registers): New constant for number of higher
5844 XMM registers (xmm16-31 added by AVX512 on x86_64).
5845 (struct i387_xsave): Add space for AVX512 registers.
5846 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5847 Add code to handle AVX512 registers.
5848 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5849 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5850 prototypei from generated file.
5851 (tdesc_amd64_avx512_linux): Likewise.
5852 (init_registers_x32_avx512_linux): Likewise.
5853 (tdesc_x32_avx512_linux): Likewise.
5854 (init_registers_i386_avx512_linux): Likewise.
5855 (tdesc_i386_avx512_linux): Likewise.
5856 (x86_64_regmap): Add AVX512 registers.
5857 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5858 mask.
5859 (initialize_low_arch): Add code to initialize AVX512 registers.
5860
51aa91f9
PA
58612014-04-23 Pedro Alves <palves@redhat.com>
5862
5863 * mem-break.c (find_gdb_breakpoint_at): Make static.
5864 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5865
a4165e94
PA
58662014-04-23 Pedro Alves <palves@redhat.com>
5867
5868 * i386-low.c: Don't include break-common.h here.
5869 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5870 prototype to take target_hw_bp_type as argument instead of a Z
5871 packet char.
5872 * i386-low.h: Include break-common.h here.
5873 (Z_packet_to_hw_type): Declare.
5874 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5875 prototypes.
5876 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5877 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5878 (x86_remove_point): Convert the packet number to a
5879 target_hw_bp_type before calling i386_low_remove_watchpoint.
5880 * win32-i386-low.c (i386_insert_point): Convert the packet number
5881 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5882 (i386_remove_point): Convert the packet number to a
5883 target_hw_bp_type before calling i386_low_remove_watchpoint.
5884
b8acf843
PA
58852014-04-23 Pedro Alves <palves@redhat.com>
5886
5887 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5888
d708bcd1
PA
58892014-04-10 Pedro Alves <palves@redhat.com>
5890
5891 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5892 Check if the condition or command is NULL before checking if the
5893 breakpoint is known. On success, return true.
5894 * mem-break.h (add_breakpoint_condition): Document return.
5895 (add_breakpoint_commands): Add describing comment.
5896 * server.c (skip_to_semicolon): New function.
5897 (process_point_options): Use it.
5898
2eec7d5b
PA
58992014-04-09 Pedro Alves <palves@redhat.com>
5900
5901 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5902 to lwpid_of.
5903
fa96cb38
PA
59042014-02-27 Pedro Alves <palves@redhat.com>
5905
5906 PR 12702
5907 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5908 macros.
5909 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5910 output.
5911 (last_thread_of_process_p): Take a PID argument instead of a
5912 thread pointer.
5913 (linux_wait_for_lwp): Delete.
5914 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5915 functions.
5916 (linux_low_filter_event): New function, party factored out from
5917 linux_wait_for_event.
5918 (linux_wait_for_event): Rename to ...
5919 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5920 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5921 sigsuspend. Check for zombie leaders.
5922 (linux_wait_for_event): Reimplement as wrapper around
5923 linux_wait_for_event_filtered.
5924 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5925 a normal or signal exit is seen, it's the whole process exiting.
5926 (wait_for_sigstop): No longer a for_each_inferior callback.
5927 Rewrite on top of linux_wait_for_event_filtered.
5928 (stop_all_lwps): Call wait_for_sigstop directly.
5929 * server.c (resume, handle_target_event): Handle
5930 TARGET_WAITKIND_NO_RESUMED.
5931
d763de10
JB
59322014-02-26 Joel Brobecker <brobecker@adacore.com>
5933
5934 * win32-low.c (psapi_get_dll_name,
5935 * win32_CreateToolhelp32Snapshot): Delete.
5936 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5937 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5938 Delete.
5939 (handle_load_dll): Add function description.
5940 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5941
850a0f76
JB
59422014-02-26 Joel Brobecker <brobecker@adacore.com>
5943
5944 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5945 Add comment.
5946 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5947 base address when calling win32_add_one_solib.
5948 (handle_load_dll): Delete local variable load_addr.
5949 Remove 0x1000 offset applied to DLL base address when calling
5950 win32_add_one_solib.
5951 (handle_unload_dll): Add comment.
5952
f25b3fc3
JB
59532014-02-26 Joel Brobecker <brobecker@adacore.com>
5954
5955 * win32-low.c (win32_add_all_dlls): Renames
5956 win32_ensure_ntdll_loaded. Rewrite function documentation.
5957 Adjust implementation to always load all DLLs.
5958 Add 0x1000 offset to DLL base address when calling
5959 win32_add_one_solib.
5960 (child_initialization_done): New static global.
5961 (do_initial_child_stuff): Set child_initialization_done to
5962 zero during child initialization, and 1 after. Replace call
5963 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5964 Add comment.
5965 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5966 (handle_unload_dll): Add function documentation.
5967 (get_child_debug_event): Ignore load and unload DLL events
5968 during child initialization.
5969
d86d4aaf
DE
59702014-02-20 Doug Evans <dje@google.com>
5971
3bc32da3 5972 Remove global all_lwps.
d86d4aaf
DE
5973 * inferiors.h (ptid_of): Move here from linux-low.h.
5974 (pid_of, lwpid_of): Ditto.
5975 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5976 parameter is a struct thread_info * now.
5977 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5978 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5979 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5980 directly.
5981 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5982 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5983 * linux-arm-low.c (update_registers_callback): Update, "entry"
5984 parameter is a struct thread_info * now.
5985 Fetch lwpid from current_inferior directly.
5986 (arm_insert_point): Pass &all_threads to find_inferior instead of
5987 &all_lwps.
5988 (arm_remove_point): Ditto.
5989 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5990 (arm_prepare_to_resume): Fetch pid from thread.
5991 (arm_read_description): Fetch lwpid from current_inferior directly.
5992 * linux-low.c (all_lwps): Delete.
5993 (delete_lwp): Delete call to remove_inferior.
5994 (handle_extended_wait): Fetch lwpid from thread.
5995 (add_lwp): Don't set lwp->entry.id. Remove call to
5996 add_inferior_to_list.
5997 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5998 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5999 (kill_one_lwp_callback): Ditto.
6000 (linux_kill): Don't dereference NULL pointer.
6001 Fetch ptid,lwpid from thread.
6002 (get_detach_signal): Fetch ptid from thread.
6003 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6004 Simplify call to regcache_invalidate_thread.
6005 (delete_lwp_callback): Update, "entry" parameter is a
6006 struct thread_info * now. Fetch pid from thread.
6007 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6008 (status_pending_p_callback): Update, "entry" parameter is a
6009 struct thread_info * now. Fetch ptid from thread.
6010 (find_lwp_pid): Update, "entry" parameter is a
6011 struct thread_info * now.
6012 (linux_wait_for_lwp): Fetch pid from thread.
6013 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6014 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6015 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6016 (dequeue_one_deferred_signal): Ditto.
6017 (cancel_breakpoint): Fetch ptid from current_inferior.
6018 (linux_wait_for_event): Pass &all_threads to find_inferior,
6019 not &all_lwps. Fetch ptid, lwpid from thread.
6020 (count_events_callback): Update, "entry" parameter is a
6021 struct thread_info * now.
6022 (select_singlestep_lwp_callback): Ditto.
6023 (select_event_lwp_callback): Ditto.
6024 (cancel_breakpoints_callback): Ditto.
6025 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6026 not &all_lwps.
6027 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6028 (unsuspend_one_lwp): Update, "entry" parameter is a
6029 struct thread_info * now.
6030 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6031 not &all_lwps.
6032 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6033 Fetch lwpid from thread, not lwp.
6034 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6035 Pass &all_threads to find_inferior, not &all_lwps.
6036 (send_sigstop): Fetch lwpid from thread, not lwp.
6037 (send_sigstop_callback): Update, "entry" parameter is a
6038 struct thread_info * now.
6039 (suspend_and_send_sigstop_callback): Ditto.
6040 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6041 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6042 struct thread_info * now.
6043 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6044 from thread, lwp.
6045 (lwp_running): Update, "entry" parameter is a
6046 struct thread_info * now.
6047 (stop_all_lwps): Fetch ptid from thread.
6048 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6049 (linux_resume_one_lwp): Fetch lwpid from thread.
6050 (linux_set_resume_request): Update, "entry" parameter is a
6051 struct thread_info * now. Fetch pid, lwpid from thread.
6052 (resume_status_pending_p): Update, "entry" parameter is a
6053 struct thread_info * now.
6054 (need_step_over_p): Ditto. Fetch lwpid from thread.
6055 (start_step_over): Fetch lwpid from thread.
6056 (linux_resume_one_thread): Update, "entry" parameter is a
6057 struct thread_info * now. Fetch lwpid from thread.
6058 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6059 (proceed_one_lwp): Update, "entry" parameter is a
6060 struct thread_info * now. Fetch lwpid from thread.
6061 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6062 struct thread_info * now.
6063 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6064 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6065 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6066 directly.
6067 (regsets_store_inferior_registers): Ditto.
6068 (fetch_register, store_register): Ditto.
6069 (linux_read_memory, linux_write_memory): Ditto.
6070 (linux_request_interrupt): Ditto.
6071 (linux_read_auxv): Ditto.
6072 (linux_xfer_siginfo): Ditto.
6073 (linux_qxfer_spu): Ditto.
6074 (linux_qxfer_libraries_svr4): Ditto.
6075 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6076 moved to inferiors.h.
6077 (get_lwp): Delete.
6078 (get_thread_lwp): Update.
6079 (struct lwp_info): Delete member "entry". Simplify comment for
6080 member "thread".
6081 (all_lwps): Delete.
6082 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6083 current_inferior directly.
6084 (update_watch_registers_callback): Update, "entry" parameter is a
6085 struct thread_info * now. Fetch pid from thread.
6086 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6087 (mips_insert_point): Fetch lwpid from current_inferior.
6088 Pass &all_threads to find_inferior, not &all_lwps.
6089 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6090 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6091 directly.
6092 (mips_stopped_data_address): Ditto.
6093 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6094 directly.
6095 * linux-tile-low.c (tile_arch_setup): Ditto.
6096 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6097 (update_debug_registers_callback): Update, "entry" parameter is a
6098 struct thread_info * now. Fetch pid from thread.
6099 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6100 Pass &all_threads to find_inferior, not &all_lwps.
6101 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6102 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6103 Pass &all_threads to find_inferior, not &all_lwps.
6104 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6105 (i386_dr_low_get_status): Ditto.
6106 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6107 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6108 (x86_linux_read_description): Ditto.
6109 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6110
3b8361aa
DE
61112014-02-20 Doug Evans <dje@google.com>
6112
6113 * inferiors.c (get_first_inferior): Fix buglet.
6114
f7667f0d
DE
61152014-02-19 Doug Evans <dje@google.com>
6116
6117 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6118 * inferiors.c (add_thread): Change result type to struct thread_info *.
6119 All callers updated.
6120 (add_lwp): Call add_thread here instead of in callers.
6121 All callers updated.
6122 * linux-low.h (get_lwp_thread): Rewrite.
6123 (struct lwp_info): New member "thread".
6124
b3312d80
DE
61252014-02-19 Doug Evans <dje@google.com>
6126
6127 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6128 All callers updated.
6129
ecc6f45c
DE
61302014-02-19 Doug Evans <dje@google.com>
6131
6132 * inferiors.c (add_thread): Fix whitespace.
6133
649ebbca
DE
61342014-02-19 Doug Evans <dje@google.com>
6135
6136 * dll.c (clear_dlls): Replace accessing list implemention details
6137 with API function.
6138 * gdbthread.h (get_first_thread): Declare.
6139 * inferiors.c (for_each_inferior_with_data): New function.
6140 (get_first_thread): New function.
6141 (find_thread_ptid): Simplify.
6142 (get_first_inferior): New function.
6143 (clear_list): Delete.
6144 (one_inferior_p): New function.
6145 (clear_inferior_list): New function.
6146 (clear_inferiors): Update.
6147 * inferiors.h (for_each_inferior_with_data): Declare.
6148 (clear_inferior_list): Declare.
6149 (one_inferior_p): Declare.
6150 (get_first_inferior): Declare.
6151 * linux-low.c (linux_wait_for_event): Replace accessing list
6152 implemention details with API function.
6153 * server.c (target_running): Ditto.
6154 (accumulate_file_name_length): New function.
6155 (emit_dll_description): New function.
6156 (handle_qxfer_libraries): Replace accessing list implemention
6157 details with API function.
6158 (handle_qxfer_threads_worker): New function.
6159 (handle_qxfer_threads_proper): Replace accessing list implemention
6160 details with API function.
6161 (handle_query): Ditto.
6162 (visit_actioned_threads_callback_ftype): New typedef.
6163 (visit_actioned_threads_data): New struct.
6164 (visit_actioned_threads): Rewrite to be find_inferior callback.
6165 (resume): Call find_inferior.
6166 (handle_status): Replace accessing list implemention
6167 details with API function.
6168 (process_serial_event): Replace accessing list implemention details
6169 with API function.
6170 * target.c (set_desired_inferior): Replace accessing list implemention
6171 details with API function.
6172 * tracepoint.c (same_process_p): New function.
6173 (gdb_agent_about_to_close): Replace accessing list implemention
6174 details with API function.
6175 * win32-low.c (child_delete_thread): Replace accessing list
6176 implemention details with API function.
6177 (match_dll_by_basename): New function.
6178 (dll_is_loaded_by_basename): New function.
6179 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6180 details call to dll_is_loaded_by_basename.
6181
80894984
DE
61822014-02-19 Doug Evans <dje@google.com>
6183
6184 * dll.h (struct dll_info): Add comment.
6185 * gdbthread.h (struct thread_info): Add comment.
6186 (current_ptid): Simplify.
6187 * inferiors.c (add_process): Update.
6188 (remove_process): Update.
6189 * inferiors.h (struct process_info): Rename member "head" to "entry".
6190 * linux-low.c (delete_lwp): Update.
6191 (add_lwp): Update.
6192 (last_thread_of_process_p): Update.
6193 (kill_one_lwp_callback, linux_kill): Update.
6194 (status_pending_p_callback): Update.
6195 (wait_for_sigstop): Update. Simplify read of ptid.
6196 (start_step_over): Update.
6197 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6198 (get_lwp_thread): Update.
6199 (struct lwp_info): Rename member "head" to "entry".
6200 * regcache.h (inferior_list_entry): Delete.
6201 * server.c (kill_inferior_callback): Update.
6202 (detach_or_kill_inferior_callback): Update.
6203 (print_started_pid): Update.
6204 (print_attached_pid): Update.
6205 (process_serial_event): Simplify read of ptid.
6206 * thread-db.c (thread_db_create_event): Update.
6207 (thread_db_get_tls_address): Update.
6208 * win32-low.c (current_inferior_ptid): Simplify.
6209
46917d26
TT
62102014-02-19 Tom Tromey <tromey@redhat.com>
6211
6212 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6213 argument.
6214 (target_supports_btrace): Update.
6215
0759a81e
YQ
62162014-02-14 Yao Qi <yao@codesourcery.com>
6217
6218 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6219 (rsp-low-ipa.o): New target.
6220
a7191e8b
TT
62212014-02-12 Tom Tromey <tromey@redhat.com>
6222
6223 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6224 convert_ascii_to_int.
6225 * regcache.c (registers_to_string): Likewise.
6226 * remote-utils.c (decode_M_packet): Likewise.
6227 * server.c (process_serial_event): Likewise.
6228
ff0e980e
TT
62292014-02-12 Tom Tromey <tromey@redhat.com>
6230
6231 * server.c (handle_query, handle_v_run): Use hex2bin, not
6232 unhexify.
6233 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6234
e9371aff
TT
62352014-02-12 Tom Tromey <tromey@redhat.com>
6236
6237 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6238 convert_int_to_ascii.
6239 * regcache.c (registers_to_string, collect_register_as_string):
6240 Likewise.
6241 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6242 Likewise.
6243 * server.c (process_serial_event): Likewise.
6244 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6245 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6246
971dc0b8
TT
62472014-02-12 Tom Tromey <tromey@redhat.com>
6248
6249 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6250 bin2hex, not hexify.
6251 * tracepoint.c (cmd_qtstatus): Likewise.
6252
0a822afb
TT
62532014-02-12 Tom Tromey <tromey@redhat.com>
6254
6255 * remote-utils.c (monitor_output): Pass explicit length to
6256 hexify.
6257
9c3d6531
TT
62582014-02-12 Tom Tromey <tromey@redhat.com>
6259
6260 * tracepoint.c: Include rsp-low.h.
6261 * server.c: Include rsp-low.h.
6262 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6263 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6264 declare.
6265 * remote-utils.c: Include rsp-low.h.
6266 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6267 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6268 (convert_int_to_ascii, convert_ascii_to_int): Move to
6269 common/rsp-low.c.
6270 * regcache.c: Include rsp-low.h.
6271 * ax.c: Include rsp-low.h.
6272 * Makefile.in (SFILES): Add common/rsp-low.c.
6273 (OBS): Add rsp-low.o.
6274 (rsp-low.o): New target.
6275
01fd3ea5
TT
62762014-02-12 Tom Tromey <tromey@redhat.com>
6277
6278 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6279 Include print-utils.h.
6280 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6281 (plongest, thirty_two, phex_nz): Remove.
6282 * Makefile.in (SFILES): Add common/print-utils.c.
6283 (OBS): Add print-utils.o.
6284 (print-utils-ipa.o): New target.
6285 (print-utils.o): New target.
6286 (IPA_OBJS): Add print-utils-ipa.o.
6287
e99dc820
TT
62882014-02-06 Tom Tromey <tromey@redhat.com>
6289
6290 * Makefile.in (SFILES): Fix indentation.
6291
ee1e2d4f
DE
62922014-02-05 Doug Evans <dje@google.com>
6293
6294 * linux-low.c (linux_wait_for_event): Improve comment.
6295 (linux_wait_1): Keep current_inferior in sync with event_child.
6296
f5a02773
DE
62972014-01-22 Doug Evans <dje@google.com>
6298
6299 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6300
87ce2a04
DE
63012014-01-22 Doug Evans <dje@google.com>
6302
6303 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6304 * configure: Regenerate.
6305 * config.in: Regenerate.
6306 * Makefile.in (SFILES): Add debug.c.
6307 (OBS): Add debug.o.
6308 * debug.c: New file.
6309 * debug.h: New file.
6310 * linux-aarch64-low.c (*): Update all debugging printfs to use
6311 debug_printf instead of fprintf.
6312 * linux-arm-low.c (*): Ditto.
6313 * linux-cris-low.c (*): Ditto.
6314 * linux-crisv32-low.c (*): Ditto.
6315 * linux-m32r-low.c (*): Ditto.
6316 * linux-sparc-low.c (*): Ditto.
6317 * linux-x86.c (*): Ditto.
6318 * linux-low.c (*): Ditto.
6319 (linux_wait_1): Add calls to debug_enter, debug_exit.
6320 (linux_wait): Remove redundant debugging printf.
6321 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6322 (linux_resume, unstop_all_lwps): Ditto.
6323 * mem-break.c (*): Update all debugging printfs to use
6324 debug_printf instead of fprintf.
6325 * remote-utils.c (*): Ditto.
6326 * thread-db.c (*): Ditto.
6327 * server.c #include <ctype.h>, "gdb_vecs.h".
6328 (debug_threads): Moved to debug.c.
6329 (*): Update all debugging printfs to use debug_printf instead of
6330 fprintf.
6331 (start_inferior): Replace call to fflush with call to debug_flush.
6332 (monitor_show_help): Mention set debug-format.
6333 (parse_debug_format_options): New function.
6334 (handle_monitor_command): Handle "monitor set debug-format".
6335 (gdbserver_usage): Mention --debug-format.
6336 (main): Parse --debug-format.
6337 * server.h (debug_threads): Declaration moved to debug.h.
6338 #include "debug.h".
6339 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6340 trace_debug_1 that uses debug_printf.
6341 (tracepoint_look_up_symbols): Update all debugging printfs to use
6342 debug_printf instead of fprintf.
6343
e671835b
BS
63442014-01-20 Baruch Siach <baruch@tkos.co.il>
6345
6346 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6347 sys/ptrace.h.
6348
b5737fa9
PA
63492014-01-17 Pedro Alves <palves@redhat.com>
6350
ea38d2a9 6351 PR build/16445
c7faa97a
PA
6352 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6353 defined after including gdb_proc_service.h.
b5737fa9 6354
40ed484e
DE
63552014-01-16 Doug Evans <dje@google.com>
6356
6357 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6358 (match_dll): Use it.
6359
969c39fb
MM
63602014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6361
6362 * target.h (target_ops) <read_btrace>: Change parameters and
6363 return type to allow error reporting.
6364 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6365 trace reading errors on.
6366 * linux-low.c (linux_low_read_btrace): Pass trace reading
6367 errors on.
6368 (linux_low_disable_btrace): New.
6369
ab7f45ba
DE
63702014-01-15 Doug Evans <dje@google.com>
6371
6372 * inferiors.c (thread_id_to_gdb_id): Delete.
6373 * inferiors.h (thread_id_to_gdb_id): Delete.
6374
66af0f44
EZ
63752014-01-13 Eli Zaretskii <eliz@gnu.org>
6376
6377 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6378 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6379 versions.
6380
9939e131
PA
63812014-01-08 Pedro Alves <palves@redhat.com>
6382
6383 * server.c (handle_status): Don't discard previous queued stop
6384 replies or thread's pending status here.
6385 (main) <disconnection>: Do it here instead.
6386
b7ea362b
PA
63872014-01-08 Pedro Alves <palves@redhat.com>
6388
6389 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6390 * server.c (visit_actioned_threads, handle_pending_status): New
6391 function.
6392 (handle_v_cont): Factor out parts to ...
6393 (resume): ... this new function. If in all-stop, and a thread
6394 being resumed has a pending status, report it without actually
6395 resuming.
6396 (myresume): Adjust to use the new 'resume' function.
6397 (clear_pending_status_callback, set_pending_status_callback)
6398 (find_status_pending_thread_callback): New functions.
6399 (handle_status): Handle the case of multiple threads having
6400 interesting statuses to report. Report threads' real last signal
6401 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6402 with an interesting thread to report the status for, instead of
6403 always reporting the status of the first thread.
6404
28498c42
JB
64052014-01-01 Joel Brobecker <brobecker@adacore.com>
6406
6407 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6408 * gdbreplay.c (gdbreplay_version): Likewise.
6409
f45c82da
YZ
64102013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6411
6412 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6413 iov.iov_len with the real length in use.
6414
379a5e2d
JB
64152013-12-13 Joel Brobecker <brobecker@adacore.com>
6416
6417 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6418 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6419 for all targets that use win32-low.c.
6420 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6421 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6422
4210d83e
PA
64232013-12-13 Pedro Alves <palves@redhat.com>
6424
6425 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6426 if equal to TARGET_WAITKIND_LOADED.
6427 * win32-low.c (cached_status): New static global.
6428 (win32_wait): Add declaration.
6429 (do_initial_child_stuff): Flush all initial pending debug events
6430 up to the initial breakpoint.
6431 (win32_wait): If CACHED_STATUS was set, return that instead
6432 of doing a real wait. Remove the code resuming the execution
6433 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6434 during the initial phase. Also remove the code changing
6435 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6436 TARGET_WAITKIND_STOPPED.
6437
e7f0d979
YQ
64382013-12-11 Yao Qi <yao@codesourcery.com>
6439
6440 * notif.c (handle_notif_ack): Return 0 if no notification
6441 matches.
6442
ebcf782c
DE
64432013-11-20 Doug Evans <dje@google.com>
6444
6445 * linux-low.c (linux_set_resume_request): Fix comment.
6446
20ad9378
DE
64472013-11-20 Doug Evans <dje@google.com>
6448
6449 * linux-low.c (resume_status_pending_p): Tweak comment.
6450
a196ebeb
WT
64512013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6452
6453 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6454 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6455 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6456 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6457 (srv_amd64_regobj): Add amd64-mpx.o.
6458 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6459 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6460 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6461 * i387-fp.c (num_pl_bnd_register) Added constant.
6462 (num_pl_bnd_cfg_registers) Added constant.
6463 (struct i387_xsave) Added reserved area and MPX fields.
6464 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6465 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6466 function.
6467 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6468 (init_registers_amd64_mpx_linux): Declare new function.
6469 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6470 (x86_64_regmap): Add MPX registers.
6471 (x86_linux_read_description): Add MPX case.
6472 (initialize_low_arch): Initialize MPX targets.
6473
0080a2f6
TT
64742013-11-18 Tom Tromey <tromey@redhat.com>
6475
6476 * configure: Rebuild.
6477 * configure.ac: Don't check for stdlib.h.
6478 * gdbreplay.c: Unconditionally include stdlib.h.
6479
2978b111
TT
64802013-11-18 Tom Tromey <tromey@redhat.com>
6481
6482 * config.in: Rebuild.
6483 * configure: Rebuild.
6484 * configure.ac: Don't use AC_HEADER_DIRENT.
6485
a3d08894
TT
64862013-11-18 Tom Tromey <tromey@redhat.com>
6487
6488 * server.h: Don't check HAVE_STRING_H.
6489 * gdbreplay.c: Don't check HAVE_STRING_H.
6490 * configure: Rebuild.
6491
0a5dd17d
TT
64922013-11-18 Tom Tromey <tromey@redhat.com>
6493
6494 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6495 LIBGNU.
6496
1bd2f0ba
TT
64972013-11-08 Tom Tromey <tromey@redhat.com>
6498
6499 * configure, config.in: Rebuild.
6500 * configure.ac: Remove unused configury.
6501
3266f10b
TT
65022013-11-08 Tom Tromey <tromey@redhat.com>
6503
6504 * acinclude.m4: Include common.m4, codeset.m4.
6505 * configure, config.in: Rebuild.
6506 * configure.ac: Use GDB_AC_COMMON.
6507
6682d959
AA
65082013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6509
6510 * linux-s390-low.c (HWCAP_S390_TE): New define.
6511 (s390_arch_setup): Consider the TE field in the HWCAP for
6512 determining 'have_regset_tdb'.
6513
fd0a4d76
SDJ
65142013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6515
6516 PR gdb/16014
6517 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6518 call to sizeof.
6519
1a3d890b
PA
65202013-10-02 Pedro Alves <palves@redhat.com>
6521
6522 * server.c (process_serial_event): Don't output "GDBserver
6523 exiting" if GDB is connected through stdio.
6524 * target.c (mywait): Likewise, be silent if GDB is connected
6525 through stdio.
6526
97ad4581
JB
65272013-10-01 Joel Brobecker <brobecker@adacore.com>
6528
6529 * lynx-low.c (lynx_add_threads_after_attach): New function.
6530 (lynx_attach): Remove call to add_thread. Add call to
6531 lynx_add_threads_after_attach instead.
6532
5b4e221c
MF
65332013-09-28 Mike Frysinger <vapier@gentoo.org>
6534
6535 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6536 * config.in, configure: Regenerated.
6537
ee47b2f8
YQ
65382013-09-18 Yao Qi <yao@codesourcery.com>
6539
6540 PR server/15959
6541 * server.c (start_inferior): Clear 'resume_info'.
6542
d6707650 65432013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6544
d6707650
JW
6545 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6546 for each register.
6547
9243dd0e 65482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6549
9243dd0e
JW
6550 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6551 linux-tile-low.o to srv_tgtobj.
6552
c623a6ef
WN
65532013-09-16 Will Newton <will.newton@linaro.org>
6554
6555 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6556 out regs.
6557
fb71d39e
PA
65582013-09-06 Pedro Alves <palves@redhat.com>
6559
6560 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6561 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6562 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6563 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6564 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6565 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6566
8e7e9910
PA
65672013-09-06 Pedro Alves <palves@redhat.com>
6568
6569 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6570 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6571
7c3a12ca
PA
65722013-09-06 Pedro Alves <palves@redhat.com>
6573
6574 * linux-amd64-ipa.c: Include tracepoint.h.
6575 * linux-i386-ipa.c: Include tracepoint.h.
6576
8eb3d7b6
RW
65772013-09-06 Ricard Wanderlof <ricardw@axis.com>
6578
6579 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6580 (ps_get_thread_area): New function.
6581
eddddb9d
RW
65822013-09-06 Ricard Wanderlof <ricardw@axis.com>
6583
6584 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6585 (initialize_low_arch): Call init_registers_crisv32 rather than
6586 init_register_crisv32.
6587
533b0600
PA
65882013-09-05 Pedro Alves <palves@redhat.com>
6589
6590 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6591 to ...
6592 * hostio.h: ... this new file.
6593 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6594 win32-low.c: Include hostio.h.
6595
0ce3d3b5
PA
65962013-09-05 Pedro Alves <palves@redhat.com>
6597
6598 * server.h (gdb_client_data, handler_func, callback_handler_func)
6599 (delete_file_handler, add_file_handler, append_callback_event)
6600 (delete_callback_event, start_event_loop, initialize_event_loop):
6601 Move to event-loop.h and include it.
6602 * event-loop.h: New file.
6603
799cdc37
PA
66042013-09-05 Pedro Alves <palves@redhat.com>
6605
6606 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6607 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6608 (loaded_dll, unloaded_dll): Move to ...
6609 * dll.h: ... this new file.
6610 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6611
6a6bbd9d
PA
66122013-09-05 Pedro Alves <palves@redhat.com>
6613
6614 * server.h (current_process, get_thread_process, all_processes)
6615 (add_inferior_to_list, for_each_inferior, current_inferior)
6616 (remove_inferior, add_process, remove_process, find_process_pid)
6617 (have_started_inferiors_p, have_attached_inferiors_p)
6618 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6619 (clear_inferiors, find_inferior, find_inferior_id)
6620 (inferior_target_data, set_inferior_target_data)
6621 (inferior_regcache_data, set_inferior_regcache_data): Move to
6622 inferiors.h, and include it.
6623 * inferiors.h: New file.
6624
f699aaba
PA
66252013-09-05 Pedro Alves <palves@redhat.com>
6626
6627 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6628 Move ...
72f4393d 6629 * ax.h: ... here.
f699aaba 6630
c144c7a0
PA
66312013-09-05 Pedro Alves <palves@redhat.com>
6632
6633 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6634 tracepoint.h.
6635 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6636 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6637 (handle_tracepoint_general_set, handle_tracepoint_query)
6638 (tracepoint_finished_step, tracepoint_was_hit)
6639 (release_while_stepping_state_list, current_traceframe)
6640 (in_readonly_region, traceframe_read_mem)
6641 (fetch_traceframe_registers, traceframe_read_sdata)
6642 (traceframe_read_info, struct fast_tpoint_collect_status)
6643 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6644 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6645 (supply_fast_tracepoint_registers)
6646 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6647 (ipa_tdesc, claim_trampoline_space)
6648 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6649 (agent_mem_read, agent_get_trace_state_variable_value)
6650 (agent_set_trace_state_variable_value, agent_tsv_read)
6651 (agent_mem_read_string, get_raw_reg_func_addr)
6652 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6653 * tracepoint.h: ... this new file.
6654
ff42e6ab
PA
66552013-09-05 Pedro Alves <palves@redhat.com>
6656
6657 * server.h (perror_with_name, error, fatal, warning, paddress)
6658 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6659 include it.
6660 * utils.h: New file.
6661
541af0f4
PA
66622013-09-05 Pedro Alves <palves@redhat.com>
6663
6664 * server.h (remote_debug, noack_mode, transport_is_reliable)
6665 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6666 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6667 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6668 (write_enn, initialize_async_io, enable_async_io)
6669 (disable_async_io, check_remote_input_interrupt_request)
6670 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6671 (dead_thread_notify, prepare_resume_reply)
6672 (decode_address_to_semicolon, decode_address, decode_m_packet)
6673 (decode_M_packet, decode_X_packet, decode_xfer_write)
6674 (decode_search_memory_packet, unhexify, hexify)
6675 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6676 (look_up_one_symbol, relocate_instruction)
6677 (monitor_output): Move to remote-utils.h, and include it.
6678 * remote-utils.h: New file.
6679
eebdf26b
PA
66802013-09-05 Pedro Alves <palves@redhat.com>
6681
6682 * server.h (_): Delete.
6683
3aafd2ff
PA
66842013-09-02 Pedro Alves <palves@redhat.com>
6685
6686 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6687 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6688 allocated.
6689 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6690
cee83bcb
PM
66912013-09-02 Pierre Muller <muller@sourceware.org>
6692
6693 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6694 or WriteProcessMemory complete successfully and handle
6695 ERROR_PARTIAL_COPY error.
6696
9a13b2fa
PA
66972013-09-02 Pedro Alves <palves@redhat.com>
6698
6699 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6700 error instead of EIO.
6701
602e3198
JK
67022013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6703
6704 PR server/15604
6705 * linux-low.c: Include filestuff.h.
6706 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6707 * lynx-low.c: Include filestuff.h.
6708 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6709 * server.c: Include filestuff.h.
6710 (main): Call notice_open_fds.
6711 * spu-low.c: Include filestuff.h.
6712 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6713
96d7229d
LM
67142013-08-22 Luis Machado <lgustavo@codesourcery.com>
6715
6716 * Makefile.in: Explain why ../target and ../nat are not
6717 listed as include file search paths.
6718 (linux-waitpid.o): New object file rule.
6719 * configure.srv (srv_native_linux_obj): New variable.
6720 Replace all occurrences of linux native object files with
6721 $srv_native_linux_obj.
6722 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6723 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6724 (linux_enable_event_reporting): Remove declaration.
6725 (my_waitpid): Moved to common/linux-waitpid.c.
6726 (linux_wait_for_event): Pass ptid when calling
6727 linux_enable_event_reporting.
6728 (linux_supports_tracefork_flag): Remove.
6729 (linux_enable_event_reporting): Likewise.
6730 (linux_tracefork_grandchild): Remove.
6731 (STACK_SIZE): Moved to common/linux-ptrace.c.
6732 (linux_tracefork_child): Remove.
6733 (linux_test_for_tracefork): Remove.
6734 (linux_look_up_symbols): Call linux_supports_traceclone.
6735 (initialize_low): Remove call to linux_test_for_tracefork.
6736 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6737 common/linux-ptrace.h.
6738 (PTRACE_TYPE_ARG4): Likewise.
6739 Include linux-ptrace.h.
6740
32940073
PA
67412013-08-21 Pedro Alves <palves@redhat.com>
6742
6743 * config.in: Renegerate.
6744
33b60d58 67452013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6746
33b60d58
LM
6747 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6748 (SFILES): Remove $(srcdir)/common/target-common.c and
6749 add $(srcdir)/target/waitstatus.c.
6750 (OBS): Remove target-common.o and add waitstatus.o.
6751 (server_h): Remove $(srcdir)/../common/target-common.h and
6752 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6753 and $(srcdir)/../target/waitstatus.h.
6754 (target-common.o): Remove.
6755 (waitstatus.o): New target object file.
6756 * target.h: Do not include target-common.h and
6757 include target/resume.h, target/wait.h and
6758 target/waitstatus.h.
6759
b8e1b30e
LM
67602013-08-13 Luis Machado <lgustavo@codesourcery.com>
6761
6762 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6763 to PTRACE_TYPE_ARG3.
6764 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6765 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6766 PTRACE_TYPE_ARG4.
6767 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6768 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6769
7a60ad40
YQ
67702013-07-27 Jie Zhang <jie@codesourcery.com>
6771 Daniel Jacobowitz <dan@codesourcery.com>
6772 Yao Qi <yao@codesourcery.com>
6773
6774 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6775 (mips-linux-watch.o): New rule.
6776 (mips_linux_watch_h): New variable.
6777 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6778 srv_tgtobj.
6779 * linux-mips-low.c: Include mips-linux-watch.h.
6780 (struct arch_process_info, struct arch_lwp_info): New.
6781 (update_watch_registers_callback): New function.
6782 (mips_linux_new_process, mips_linux_new_thread) New functions.
6783 (mips_linux_prepare_to_resume, mips_insert_point): New
6784 functions.
6785 (mips_remove_point, mips_stopped_by_watchpoint): New
6786 functions.
6787 (rsp_bp_type_to_target_hw_bp_type): New function.
6788 (mips_stopped_data_address): New function.
6789 (the_low_target): Add watchpoint support functions.
6790
de6f69ad
YQ
67912013-07-27 Yao Qi <yao@codesourcery.com>
6792
6793 * i386-low.c: Include break-common.h.
6794 (enum target_hw_bp_type): Remove.
6795
3360c0bf
LM
67962013-07-24 Luis Machado <lgustavo@codesourcery.com>
6797
6798 * Makefile.in (SFILES): /common/target-common.c.
6799 (OBS): Add target-common.o.
6800 (server_h): Add $(srcdir)/../common/target-common.h.
6801 (target-common.o): New target.
6802 * server.c (queue_stop_reply_callback): Free
6803 status string after use.
6804 * target.c (target_waitstatus_to_string): Remove.
6805 * target.h: Include target-common.h.
6806 (resume_kind): Likewise.
6807 (target_waitkind): Likewise.
6808 (target_waitstatus): Likewise.
6809 (TARGET_WNOHANG): Likewise.
6810
bd885420
YQ
68112013-07-04 Yao Qi <yao@codesourcery.com>
6812
6813 * Makefile.in (host_alias): Use @host_noncanonical@.
6814 (target_alias): Use @target_noncanonical@.
6815 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6816 ACX_NONCANONICAL_HOST.
6817 * configure: Regenerated.
6818
6819 Revert:
6820 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6821
6822 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6823 * configure: Rebuild.
6824 * Makefile.in (version_host, version_target): Get from configure.
6825 (version.c): Use $(version_host) and $(version_target).
6826
17ef446e
PA
68272013-07-03 Pedro Alves <palves@redhat.com>
6828
6829 * Makefile.in (config.status): Depend on development.sh.
6830 * acinclude.m4: Include libmcheck.m4.
6831 * configure: Regenerate.
6832
7a9a7487
MG
68332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6834
6835 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6836 attribute inside the parentheses.
6837 (winapi_DebugSetProcessKillOnExit): Ditto.
6838 (winapi_DebugBreakProcess): Ditto.
6839 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6840
49b64de6
MG
68412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6842
6843 * notif.h (notif_event): Add a dummy member to avoid compiler
6844 errors.
6845
d5749ee7
PA
68462013-07-01 Pedro Alves <palves@redhat.com>
6847
6848 * hostio.c (HOSTIO_PATH_MAX): Define.
6849 (require_filename, handle_open, handle_unlink, handle_readlink):
6850 Use it.
6851
d8d2a3ee
PA
68522013-07-01 Pedro Alves <palves@redhat.com>
6853
6854 * server.h: Include "pathmax.h".
6855 * linux-low.c: Don't include sys/param.h.
6856 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6857 MAXPATHLEN.
6858 * win32-low.c: Don't include sys/param.h.
6859 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6860
bc7dea8d
PA
68612013-07-01 Pedro Alves <palves@redhat.com>
6862
6863 * event-loop.c: Don't check HAVE_UNISTD_H before including
6864 <unistd.h>.
6865 * gdbreplay.c: Likewise.
6866 * remote-utils.c: Likewise.
6867 * server.c: Likewise.
6868 * configure.ac: Don't check for unistd.h.
6869 * configure: Regenerate.
6870
d6c2da54
TT
68712013-06-28 Tom Tromey <tromey@redhat.com>
6872
6873 * Makefile.in (version.c): Use version.in, not
6874 common/version.in.
6875
257b6bec
MG
68762013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6877
6878 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6879 * configure: Rebuild.
6880 * Makefile.in (version_host, version_target): Get from configure.
6881 (version.c): Use $(version_host) and $(version_target).
6882
86ebe149
DK
68832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6884
6885 Fix trace-status to output user name without trailing colon.
6886 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6887
f30aa5af
DK
68882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6889
6890 Fix trace-status to output proper start-time and stop-time.
6891 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6892 output start time and stop time in hex as gdb expects.
6893
28a93511
YQ
68942013-06-26 Pedro Alves <pedro@codesourcery.com>
6895
6896 * tracepoint.c (build_traceframe_info_xml): Output trace state
6897 variables present in the trace buffer.
6898
01208463
TT
68992013-06-24 Tom Tromey <tromey@redhat.com>
6900
6901 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6902 create-version.sh.
6903 (version.o): Remove.
6904 * gdbreplay.c: Include version.h.
6905 (version, host_name): Don't declare.
6906 * server.h: Include version.h.
6907 (version, host_name): Don't declare.
6908
760256f9
PA
69092013-06-12 Pedro Alves <palves@redhat.com>
6910
6911 * linux-x86-low.c (linux_is_elf64): Delete global.
6912 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6913 with local linux_pid_exe_is_elf_64_file use.
6914
030031ee
PA
69152013-06-11 Pedro Alves <palves@redhat.com>
6916
6917 * linux-low.c (regset_disabled, disable_regset): New functions.
6918 (regsets_fetch_inferior_registers)
6919 (regsets_store_inferior_registers): Use them.
6920 (initialize_regsets_info); Don't allocate the disabled_regsets
6921 array here.
6922 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6923 comment.
6924
5da6eb0a
PA
69252013-06-11 Pedro Alves <palves@redhat.com>
6926
6927 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6928 xmalloc.
6929
7e5aaa09
PA
69302013-06-11 Pedro Alves <palves@redhat.com>
6931
6932 * linux-x86-low.c (initialize_low_arch): Call
6933 init_registers_x32_avx_linux.
6934
d878444c
JK
69352013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6936
6937 Fix compatibility with Android Bionic.
6938 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6939 it is not empty.
6940
3aee8918
PA
69412013-06-07 Pedro Alves <palves@redhat.com>
6942
5f2b57b5 6943 PR server/14823
3aee8918
PA
6944 * Makefile.in (OBS): Add tdesc.o.
6945 (IPA_OBJS): Add tdesc-ipa.o.
6946 (tdesc-ipa.o): New rule.
6947 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6948 interface.
6949 * linux-low.c (new_inferior): Delete.
6950 (disabled_regsets, num_regsets): Delete.
6951 (linux_add_process): Adjust to set the new per-process
6952 new_inferior flag.
6953 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6954 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6955 was a stop. When calling arch_setup, switch the current inferior
6956 to the thread that got an event.
6957 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6958 (regsets_fetch_inferior_registers)
6959 (regsets_store_inferior_registers): New regsets_info parameter.
6960 Adjust to use it.
6961 (linux_register_in_regsets): New regs_info parameter. Adjust to
6962 use it.
6963 (register_addr, fetch_register, store_register): New usrregs_info
6964 parameter. Adjust to use it.
6965 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6966 parameter regs_info. Adjust to use it.
6967 (linux_fetch_registers): Get the current inferior's regs_info, and
6968 adjust to use it.
6969 (linux_store_registers): Ditto.
6970 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6971 (initialize_low): Don't initialize the target_regsets here. Call
6972 initialize_low_arch.
6973 * linux-low.h (target_regsets): Delete declaration.
6974 (struct regsets_info): New.
6975 (struct usrregs_info): New.
6976 (struct regs_info): New.
6977 (struct process_info_private) <new_inferior>: New field.
6978 (struct linux_target_ops): Delete the num_regs, regmap, and
6979 regset_bitmap fields. New field regs_info.
6980 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6981 * i387-fp.c (num_xmm_registers): Delete.
6982 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6983 calls to new interface.
6984 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6985 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6986 Infer the number of xmm registers from the regcache's target
6987 description.
6988 * i387-fp.h (num_xmm_registers): Delete.
6989 * inferiors.c (add_thread): Don't install the thread's regcache
6990 here.
6991 * proc-service.c (gregset_info): Fetch the current inferior's
6992 regs_info. Adjust to use it.
6993 * regcache.c: Include tdesc.h.
6994 (register_bytes, reg_defs, num_registers)
6995 (gdbserver_expedite_regs): Delete.
6996 (get_thread_regcache): If the thread doesn't have a regcache yet,
6997 create one, instead of aborting gdbserver.
6998 (regcache_invalidate_one): Rename to ...
6999 (regcache_invalidate_thread): ... this.
7000 (regcache_invalidate_one): New.
7001 (regcache_invalidate): Only invalidate registers of the current
7002 process.
7003 (init_register_cache): Add target_desc parameter, and use it.
7004 (new_register_cache): Ditto. Assert the target description has a
7005 non zero registers_size.
7006 (regcache_cpy): Add assertions. Adjust.
7007 (realloc_register_cache, set_register_cache): Delete.
7008 (registers_to_string, registers_from_string): Adjust.
7009 (find_register_by_name, find_regno, find_register_by_number)
7010 (register_cache_size): Add target_desc parameter, and use it.
7011 (free_register_cache_thread, free_register_cache_thread_one)
7012 (regcache_release, register_cache_size): New.
7013 (register_size): Add target_desc parameter, and use it.
7014 (register_data, supply_register, supply_register_zeroed)
7015 (supply_regblock, supply_register_by_name, collect_register)
7016 (collect_register_as_string, collect_register_by_name): Adjust.
7017 * regcache.h (struct target_desc): Forward declare.
7018 (struct regcache) <tdesc>: New field.
7019 (init_register_cache, new_register_cache): Add target_desc
7020 parameter.
7021 (regcache_invalidate_thread): Declare.
7022 (regcache_invalidate_one): Delete declaration.
7023 (regcache_release): Declare.
7024 (find_register_by_number, register_cache_size, register_size)
7025 (find_regno): Add target_desc parameter.
7026 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7027 declarations.
7028 * remote-utils.c: Include tdesc.h.
7029 (outreg, prepare_resume_reply): Adjust.
7030 * server.c: Include tdesc.h.
7031 (gdbserver_xmltarget): Delete declaration.
7032 (get_features_xml, process_serial_event): Adjust.
7033 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7034 declare.
7035 (struct process_info) <tdesc>: New field.
7036 (ipa_tdesc): Declare.
7037 * tdesc.c: New file.
7038 * tdesc.h: New file.
7039 * tracepoint.c: Include tdesc.h.
7040 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7041 (get_context_regcache): Adjust to pass ipa_tdesc down.
7042 (do_action_at_tracepoint): Adjust to get the register cache size
7043 from the context regcache's description.
7044 (traceframe_walk_blocks): Adjust to get the register cache size
7045 from the current trace frame's description.
7046 (traceframe_get_pc): Adjust to get current trace frame's
7047 description and pass it down.
7048 (gdb_collect): Adjust to get the register cache size from the
7049 IPA's description.
7050 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7051 (gdbserver_xmltarget): Delete.
7052 (initialize_low_tracepoint): Set the ipa's target description.
7053 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7054 (initialize_low_tracepoint): Set the ipa's target description.
7055 * linux-x86-low.c: Include tdesc.h.
7056 [__x86_64__] (is_64bit_tdesc): New.
7057 (ps_get_thread_area, x86_get_thread_area): Use it.
7058 (i386_cannot_store_register): Rename to ...
7059 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7060 (i386_cannot_fetch_register): Rename to ...
7061 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7062 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7063 to new interface.
7064 (target_regsets): Rename to ...
7065 (x86_regsets): ... this.
7066 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7067 interface.
7068 (x86_siginfo_fixup): Use is_64bit_tdesc.
7069 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7070 (tdesc_x32_avx_linux, tdesc_x32_linux)
7071 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7072 Declare.
7073 (x86_linux_update_xmltarget): Delete.
7074 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7075 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7076 (AMD64_LINUX_USER64_CS): New.
7077 (x86_linux_read_description): New, based on
7078 x86_linux_update_xmltarget.
7079 (same_process_callback): New.
7080 (x86_arch_setup_process_callback): New.
7081 (x86_linux_update_xmltarget): New.
7082 (x86_regsets_info): New.
7083 (amd64_linux_regs_info): New.
7084 (i386_linux_usrregs_info): New.
7085 (i386_linux_regs_info): New.
7086 (x86_linux_regs_info): New.
7087 (x86_arch_setup): Reimplement.
7088 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7089 (x86_emit_ops): Ditto.
7090 (the_low_target): Adjust. Install x86_linux_regs_info,
7091 x86_cannot_fetch_register, and x86_cannot_store_register.
7092 (initialize_low_arch): New.
7093 * linux-ia64-low.c (tdesc_ia64): Declare.
7094 (ia64_fetch_register): Adjust.
7095 (ia64_usrregs_info, regs_info): New globals.
7096 (ia64_regs_info): New function.
7097 (the_low_target): Adjust.
7098 (initialize_low_arch): New function.
7099 * linux-sparc-low.c (tdesc_sparc64): Declare.
7100 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7101 Adjust.
7102 (sparc_arch_setup): New function.
7103 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7104 (the_low_target): Adjust.
7105 (initialize_low_arch): New function.
7106 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7107 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7108 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7109 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7110 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7111 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7112 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7113 (tdesc_powerpc_isa205_vsx64l): Declare.
7114 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7115 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7116 (ppc_set_pc, ppc_get_hwcap): Adjust.
7117 (ppc_usrregs_info): Forward declare.
7118 (!__powerpc64__) ppc_regmap_adjusted: New global.
7119 (ppc_arch_setup): Adjust to the current process'es target
7120 description.
7121 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7122 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7123 (ppc_store_evrregset): Adjust.
7124 (target_regsets): Rename to ...
7125 (ppc_regsets): ... this, and make static.
7126 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7127 (ppc_regs_info): New function.
7128 (the_low_target): Adjust.
7129 (initialize_low_arch): New function.
7130 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7131 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7132 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7133 (tdesc_s390x_linux64v2): Declare.
7134 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7135 (s390_fill_gregset, s390_store_last_break): Adjust.
7136 (target_regsets): Rename to ...
7137 (s390_regsets): ... this, and make static.
7138 (s390_get_pc, s390_set_pc): Adjust.
7139 (s390_get_hwcap): New target_desc parameter, and use it.
7140 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7141 (s390_arch_setup): Adjust to set the current process'es target
7142 description. Don't adjust the regmap.
7143 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7144 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7145 (regs_info_3264): New globals.
7146 (s390_regs_info): New function.
7147 (the_low_target): Adjust.
7148 (initialize_low_arch): New function.
7149 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7150 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7151 [__mips64] (init_registers_mips_linux)
7152 (init_registers_mips_dsp_linux): Delete defines.
7153 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7154 (have_dsp): New global.
7155 (mips_read_description): New, based on mips_arch_setup.
7156 (mips_arch_setup): Reimplement.
7157 (get_usrregs_info): New function.
7158 (mips_cannot_fetch_register, mips_cannot_store_register)
7159 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7160 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7161 (target_regsets): Rename to ...
7162 (mips_regsets): ... this, and make static.
7163 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7164 (dsp_regs_info, regs_info): New globals.
7165 (mips_regs_info): New function.
7166 (the_low_target): Adjust.
7167 (initialize_low_arch): New function.
7168 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7169 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7170 Declare.
7171 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7172 (arm_read_description): New, with bits factored from
7173 arm_arch_setup.
7174 (arm_arch_setup): Reimplement.
7175 (target_regsets): Rename to ...
7176 (arm_regsets): ... this, and make static.
7177 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7178 (arm_regs_info): New function.
7179 (the_low_target): Adjust.
7180 (initialize_low_arch): New function.
7181 * linux-m68k-low.c (tdesc_m68k): Declare.
7182 (target_regsets): Rename to ...
7183 (m68k_regsets): ... this, and make static.
7184 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7185 (m68k_regs_info): New function.
7186 (m68k_arch_setup): New function.
7187 (the_low_target): Adjust.
7188 (initialize_low_arch): New function.
7189 * linux-sh-low.c (tdesc_sharch): Declare.
7190 (target_regsets): Rename to ...
7191 (sh_regsets): ... this, and make static.
7192 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7193 (sh_regs_info, sh_arch_setup): New functions.
7194 (the_low_target): Adjust.
7195 (initialize_low_arch): New function.
7196 * linux-bfin-low.c (tdesc_bfin): Declare.
7197 (bfin_arch_setup): New function.
7198 (bfin_usrregs_info, regs_info): New globals.
7199 (bfin_regs_info): New function.
7200 (the_low_target): Adjust.
7201 (initialize_low_arch): New function.
7202 * linux-cris-low.c (tdesc_cris): Declare.
7203 (cris_arch_setup): New function.
7204 (cris_usrregs_info, regs_info): New globals.
7205 (cris_regs_info): New function.
7206 (the_low_target): Adjust.
7207 (initialize_low_arch): New function.
7208 * linux-cris-low.c (tdesc_crisv32): Declare.
7209 (cris_arch_setup): New function.
7210 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7211 (cris_regs_info): New function.
7212 (the_low_target): Adjust.
7213 (initialize_low_arch): New function.
7214 * linux-m32r-low.c (tdesc_m32r): Declare.
7215 (m32r_arch_setup): New function.
7216 (m32r_usrregs_info, regs_info): New globals.
7217 (m32r_regs_info): Adjust.
7218 (initialize_low_arch): New function.
7219 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7220 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7221 (tic6x_usrregs_info): Forward declare.
7222 (tic6x_read_description): New function, based on ...
7223 (tic6x_arch_setup): ... this. Reimplement.
7224 (target_regsets): Rename to ...
7225 (tic6x_regsets): ... this, and make static.
7226 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7227 (tic6x_regs_info): New function.
7228 (the_low_target): Adjust.
7229 (initialize_low_arch): New function.
7230 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7231 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7232 (target_regsets): Rename to ...
7233 (xtensa_regsets): ... this, and make static.
7234 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7235 globals.
7236 (xtensa_arch_setup, xtensa_regs_info): New functions.
7237 (the_low_target): Adjust.
7238 (initialize_low_arch): New function.
7239 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7240 (nios2_arch_setup): Set the current process'es tdesc.
7241 (target_regsets): Rename to ...
7242 (nios2_regsets): ... this.
7243 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7244 (nios2_regs_info): New function.
7245 (the_low_target): Adjust.
7246 (initialize_low_arch): New function.
a261b8f5
PA
7247 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7248 (aarch64_arch_setup): Set the current process'es tdesc.
7249 (target_regsets): Rename to ...
7250 (aarch64_regsets): ... this.
7251 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7252 (aarch64_regs_info): New function.
7253 (the_low_target): Adjust.
7254 (initialize_low_arch): New function.
3aee8918
PA
7255 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7256 globals.
7257 (target_regsets): Rename to ...
7258 (tile_regsets): ... this.
7259 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7260 (tile_regs_info): New function.
7261 (tile_arch_setup): Set the current process'es tdesc.
7262 (the_low_target): Adjust.
7263 (initialize_low_arch): New function.
7264 * spu-low.c (tdesc_spu): Declare.
7265 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7266 * win32-arm-low.c (tdesc_arm): Declare.
7267 (arm_arch_setup): New function.
7268 (the_low_target): Install arm_arch_setup instead of
7269 init_registers_arm.
7270 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7271 (init_windows_x86): Rename to ...
7272 (i386_arch_setup): ... this. Set `win32_tdesc'.
7273 (the_low_target): Adjust.
7274 * win32-low.c (win32_tdesc): New global.
7275 (child_add_thread): Don't create the thread cache here.
7276 (do_initial_child_stuff): Set the new process'es tdesc.
7277 * win32-low.h (struct target_desc): Forward declare.
7278 (win32_tdesc): Declare.
7279 * lynx-i386-low.c (tdesc_i386): Declare global.
7280 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7281 * lynx-low.c (lynx_tdesc): New global.
7282 (lynx_add_process): Set the new process'es tdesc.
7283 * lynx-low.h (struct target_desc): Forward declare.
7284 (lynx_tdesc): Declare global.
7285 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7286 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7287 * nto-low.c (nto_tdesc): New global.
7288 (do_attach): Set the new process'es tdesc.
7289 * nto-low.h (struct target_desc): Forward declare.
7290 (nto_tdesc): Declare.
7291 * nto-x86-low.c (tdesc_i386): Declare.
7292 (nto_x86_arch_setup): Set `nto_tdesc'.
7293
b1fbec62
GB
72942013-06-04 Gary Benson <gbenson@redhat.com>
7295
7296 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7297 to qSupported response when appropriate.
7298 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7299 with nonzero-length annex.
7300 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7301 arguments supplied in annex.
7302
d1ec4ce7
DE
73032013-05-31 Doug Evans <dje@google.com>
7304
ac44adcb 7305 PR server/15594
d1ec4ce7
DE
7306 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7307 64 bits in 64-cross-32 environment.
7308
9b25f2d3
PA
73092013-05-28 Pedro Alves <palves@redhat.com>
7310
7311 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7312 (aarch64-without-fpu.c): Delete rule.
7313 * configure.srv (aarch64*-*-linux*): Remove references to
7314 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7315 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7316 declaration.
7317
6740dc9c
PA
73182013-05-24 Pedro Alves <palves@redhat.com>
7319
7320 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7321 instead of strchr/decode_address. Error if the range isn't split
7322 with a ','. Don't assume there's be a ':' in the action.
7323
c2d6af84
PA
73242013-05-23 Yao Qi <yao@codesourcery.com>
7325 Pedro Alves <palves@redhat.com>
7326
7327 * linux-low.c (lwp_in_step_range): New function.
7328 (linux_wait_1): If the thread was range stepping and stopped
7329 outside the stepping range, report the stop to GDB. Otherwise,
7330 continue stepping. Add range stepping debug output.
7331 (linux_set_resume_request): Copy the step range from the resume
7332 request to the lwp.
7333 (linux_supports_range_stepping): New.
7334 (linux_target_ops) <supports_range_stepping>: Set to
7335 linux_supports_range_stepping.
7336 * linux-low.h (struct linux_target_ops)
7337 <supports_range_stepping>: New field.
7338 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7339 * linux-x86-low.c (x86_supports_range_stepping): New.
7340 (the_low_target) <supports_range_stepping>: Set to
7341 x86_supports_range_stepping.
7342 * server.c (handle_v_cont): Handle 'r' action.
7343 (handle_v_requests): Append ";r" if the target supports range
7344 stepping.
7345 * target.h (struct thread_resume) <step_range_start,
7346 step_range_end>: New fields.
7347 (struct target_ops) <supports_range_stepping>:
7348 New field.
7349 (target_supports_range_stepping): New macro.
7350
58794e1a
JB
73512013-05-17 Joel Brobecker <brobecker@adacore.com>
7352
7353 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7354 confusion in comment.
7355
d631c5a7
JB
73562013-05-17 Joel Brobecker <brobecker@adacore.com>
7357
7358 * lynx-low.c (struct process_info_private): New type.
7359 (lynx_add_process): New function.
7360 (lynx_create_inferior, lynx_attach): Replace calls to
7361 add_process by calls to lynx_add_process.
7362 (lynx_resume): If PTID is null, then try using
7363 current_process()->private->last_wait_event_ptid.
7364 Add comments.
7365 (lynx_clear_inferiors): Delete. The contents of that function
7366 has been inlined in lynx_mourn;
7367 (lynx_wait_1): Save the ptid in the process's private data.
7368 (lynx_mourn): Free the process' private data. Replace call
7369 to lynx_clear_inferiors by call to clear_inferiors.
7370
96f7a20f
YQ
73712013-05-17 Yao Qi <yao@codesourcery.com>
7372
7373 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7374 the right place.
7375
db0dfaa0
LM
73762013-05-16 Luis Machado <lgustavo@codesourcery.com>
7377
7378 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7379 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7380 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7381 PT_TEXT_END_ADDR guards. Update comments.
7382 (linux_target_op) <read_offsets>: Conditionally define to
7383 linux_read_offsets if the target is UCLIBC and if it defines
7384 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7385
68f5f838
SL
73862013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7387 Andrew Jenner <andrew@codesourcery.com>
7388
7389 * Makefile.in (SFILES): Add linux-nios2-low.c.
7390 (clean): Add action to delete nios2-linux.c.
7391 (nios2-linux.c): New rule.
7392 * configure.srv: Add nios2*-*-linux*.
7393 * linux-nios2-low.c: New.
7394
1ebff1fd
HAQ
73952013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7396
7397 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7398
f6150862
HZ
73992013-04-25 Hui Zhu <hui@codesourcery.com>
7400
7401 PR gdb/15186
f6150862
HZ
7402 * ax.c (ax_printf): Add fflush.
7403
614c279d
TT
74042013-04-22 Tom Tromey <tromey@redhat.com>
7405
7406 * Makefile.in (SFILES): Add filestuff.c.
7407 (OBS): Add filestuff.o.
7408 (filestuff.o): New target.
7409 * config.in, configure: Rebuild.
7410 * configure.ac: Check for fdwalk, pipe2.
7411
7d4e5717
PA
74122013-04-17 Pedro Alves <palves@redhat.com>
7413
7414 * configure.ac (USE_THREAD_DB): Delete variable.
7415 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7416 Don't AC_SUBST USE_THREAD_DB.
7417 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7418 * config.in, configure: Regenerate.
7419
d5c93e41
PA
74202013-04-16 Pedro Alves <palves@redhat.com>
7421
7422 * linux-low.h (struct lwp_info) <thread_known>: Move under
7423 the USE_THREAD_DB #ifdef.
7424
04f5fe89
PA
74252013-04-16 Pedro Alves <palves@redhat.com>
7426
7427 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7428 (linux-low.o): Delete rule.
7429 * linux-low.h: Always include "gdb_thread_db.h" instead of
7430 conditionally including thread_db.h.
7431 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7432 HAVE_THREAD_DB_H.
7433
480b27bf
JK
74342013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7435
7436 * Makefile.in (install-only): Fix make install regression.
7437
43662968
JK
74382013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7439
7440 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7441 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7442 installation.
7443 * gdbserver.1: Remove.
7444
3e74e146
PA
74452013-03-22 Pedro Alves <palves@redhat.com>
7446
7447 * linux-low.c (handle_extended_wait): Don't call
7448 linux_enable_event_reporting.
7449
a8347a2a
TT
74502013-03-15 Tony Theodore <tonyt@logyst.com>
7451
7452 PR build/9098:
7453 * Makefile.in (SHELL): Use @SHELL@.
7454
eeb56fa7
SDJ
74552013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7456
7457 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7458 compiler warning.
7459
4fa7e2ff
JB
74602013-03-13 Joel Brobecker <brobecker@adacore.com>
7461
7462 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7463 Remove extraneous NULL element.
7464
8ddb1965
YQ
74652013-03-13 Yao Qi <yao@codesourcery.com>
7466
7467 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7468 'V' block in trace frame.
7469
9accd112
MM
74702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7471
7472 * target.h (struct target_ops): Add btrace ops.
7473 (target_supports_btrace): New macro.
7474 (target_enable_btrace): New macro.
7475 (target_disable_btrace): New macro.
7476 (target_read_btrace): New macro.
7477 * gdbthread.h (struct thread_info): Add btrace field.
7478 * server.c: Include btrace-common.h.
7479 (handle_btrace_general_set): New function.
7480 (handle_btrace_enable): New function.
7481 (handle_btrace_disable): New function.
7482 (handle_general_set): Call handle_btrace_general_set.
7483 (handle_qxfer_btrace): New function.
7484 (struct qxfer qxfer_packets[]): Add btrace entry.
7485 * inferiors.c (remove_thread): Disable btrace.
7486 * linux-low: Include linux-btrace.h.
7487 (linux_low_enable_btrace): New function.
7488 (linux_low_read_btrace): New function.
7489 (linux_target_ops): Add btrace ops.
7490 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7491 Add srv_linux_btrace=yes.
7492 (x86_64-*-linux*): Add linux-btrace.o.
7493 Add srv_linux_btrace=yes.
7494 * configure.ac: Define HAVE_LINUX_BTRACE.
7495 * config.in: Regenerated.
7496 * configure: Regenerated.
7497
5cc22e4c
MM
74982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7499
7500 * server.c (handle_qxfer): Preserve error message if -3 is
7501 returned.
7502 (qxfer): Document the -3 return value.
7503
7c97f91e
MM
75042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7505
7506 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7507 (linux_btrace_h): New variable.
7508 (linux-btrace.o): New rule.
7509
be9a119c 75102013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7511 Hafiz Abid Qadeer <abidh@codesourcery.com>
7512
7513 * tracepoint.c (trace_buffer_size): New global.
7514 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7515 (init_trace_buffer): Change to one-argument function. Allocate
7516 trace buffer memory.
7517 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7518 handle QTBuffer:size packet.
7519 (cmd_bigqtbuffer_size): New function.
7520 (initialize_tracepoint): Call init_trace_buffer with
7521 DEFAULT_TRACE_BUFFER_SIZE.
7522 * server.c (handle_query): Add QTBuffer:size in the
7523 supported packets.
7524
e64f7499
YQ
75252013-03-07 Yao Qi <yao@codesourcery.com>
7526
7527 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7528 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7529 of -1.
7530 (cmd_qtsp): Adjust condition. Do post increment.
7531 Set cur_action and cur_step_action back to 0.
7532
f0ae6fc3
PA
75332013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7534
7535 PR server/15236
7536 * linux-low.c (linux_write_memory): Return early success if LEN is
7537 zero.
7538
b5b0b0af
CV
75392013-03-05 Corinna Vinschen <vinschen@redhat.de>
7540
334ad4a8 7541 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7542
589bc927
TT
75432013-02-28 Tom Tromey <tromey@redhat.com>
7544
7545 * configure.ac: Invoke AC_SYS_LARGEFILE.
7546 * configure, config.in: Rebuild.
7547
dfe07582
CV
75482013-02-28 Corinna Vinschen <vinschen@redhat.com>
7549
7550 * win32-low.c: Throughout, fix format strings and casts of
7551 printf-like functions to avoid type related warnings on all
7552 platforms.
7553 (get_child_debug_event): Print dwDebugEventCode as hex since
7554 that's how it's usually documented.
7555
736cd585
YQ
75562013-02-28 Yao Qi <yao@codesourcery.com>
7557
7558 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7559 pulongest.
7560
e1f58301
JW
75612013-02-27 Jiong Wang <jiwang@tilera.com>
7562
7563 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7564 (reg-tilegx32.c): New rule.
7565 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7566 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7567 different register info initializer according to elf class.
7568 (init_registers_tilgx32): New function. The tilegx32 register info
7569 initializer.
7570 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7571 (tile_store_gregset): Likewise.
7572
d171ca78
YQ
75732013-02-27 Yao Qi <yao@codesourcery.com>
7574
7575 * server.c (process_point_options): Print debug message when
7576 debug_threads is true.
7577
282bbdf3
YQ
75782013-02-26 Yao Qi <yao@codesourcery.com>
7579
7580 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7581
aca22551
PA
75822013-02-19 Pedro Alves <palves@redhat.com>
7583 Kai Tietz <ktietz@redhat.com>
7584
7585 PR gdb/15161
7586
7587 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7588 instead of strtoul to extract address from packet.
7589 (process_serial_event) <'z'>: Likewise.
7590
4f3cee1c
YQ
75912013-02-18 Yao Qi <yao@codesourcery.com>
7592
7593 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7594
8e1d55a3
PA
75952013-02-14 Pedro Alves <palves@redhat.com>
7596
7597 Plug memory leak.
7598
7599 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7600 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7601
458820da
PA
76022013-02-14 Pedro Alves <palves@redhat.com>
7603
7604 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7605
baea0dae
PA
76062013-02-14 Pedro Alves <palves@redhat.com>
7607
7608 * tracepoint.c (save_string): Delete.
7609 (add_tracepoint_action): Use savestring instead of save_string.
7610
0b1afbb3
PA
76112013-02-12 Pedro Alves <palves@redhat.com>
7612
7613 * linux-xtensa-low.c: Ditto.
7614 * xtensa-xtregs.c: Ditto.
7615
8a4ac37e
PA
76162013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7617
7618 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7619 thread_db.
7620
148de6bb
MS
76212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7622
7623 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7624 aarch64_num_wp_regs and aarch64_num_bp_regs to
7625 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7626
55fac6e0
MS
76272013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7628
7629 * linux-aarch64-low.c (ps_get_thread_area): Replace
7630 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7631
176eb98c
MS
76322013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7633 Marcus Shawcroft <marcus.shawcroft@arm.com>
7634 Nigel Stephens <nigel.stephens@arm.com>
7635 Yufeng Zhang <yufeng.zhang@arm.com>
7636
7637 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7638 (aarch64.c, aarch64-without-fpu.c): New targets.
7639 * configure.srv (aarch64*-*-linux*): New.
7640 * linux-aarch64-low.c: New file.
7641
56f7af9c
MS
76422013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7643
43aaf8b6 7644 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7645 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7646 (dequeue_one_deferred_signal, linux_resume_one_thread)
7647 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7648 (linux_tracefork_grandchild, linux_test_for_tracefork)
7649 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7650 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7651 where the argument is 0.
7652
60f662b0
YQ
76532013-01-25 Yao Qi <yao@codesourcery.com>
7654
7655 * event-loop.c: Include "queue.h".
7656 (gdb_event_p): New typedef.
7657 (struct gdb_event) <next_event>: Remove.
7658 (event_queue): Change to QUEUE(gdb_event_p).
7659 (async_queue_event): Remove.
7660 (gdb_event_xfree): New.
7661 (initialize_event_loop): New.
7662 (process_event): Use API from QUEUE.
7663 (wait_for_event): Likewise.
7664 * server.c (main): Call initialize_event_loop.
7665 * server.h (initialize_event_loop): Declare.
7666
5ae4861a
YQ
76672013-01-18 Yao Qi <yao@codesourcery.com>
7668
7669 * ax.h (struct eval_agent_expr_context): New.
7670 (gdb_eval_agent_expr): Update declaration.
7671 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7672 TFRAME. Add new argument CTX.
7673 * server.h (struct eval_agent_expr_context): Declare.
7674 (agent_mem_read, agent_tsv_read): Update declaration.
7675 (agent_mem_read_string): Likewise.
7676 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7677 (add_traceframe_block): Add new argument TPOINT.
7678 Increase TPOINT->traceframe_usage.
7679 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7680 eval_tracepoint_agent_expr.
7681 (condition_true_at_tracepoint): Likewise.
7682 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7683 (agent_mem_read_string, agent_tsv_read): Likewise.
7684
85e00e85
YQ
76852013-01-16 Yao Qi <yao@codesourcery.com>
7686
7687 * linux-low.c (linux_resume_one_lwp): Don't check
7688 'lwp->bp_reinsert != 0'.
7689
4039cf45
JB
76902013-01-07 Joel Brobecker <brobecker@adacore.com>
7691 Pedro Alves <palves@redhat.com>
7692
7693 * lynx-low.c (ptrace_request_to_str): Define a temporary
7694 macro and use it to simplify this function's implementation.
7695
9044dee2
JB
76962013-01-07 Joel Brobecker <brobecker@adacore.com>
7697
7698 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7699 sets errno.
7700
e6352c8f
JB
77012013-01-07 Joel Brobecker <brobecker@adacore.com>
7702
7703 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7704
50681a27
JB
77052013-01-07 Joel Brobecker <brobecker@adacore.com>
7706
7707 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7708
3f6e77ef
JB
77092013-01-07 Joel Brobecker <brobecker@adacore.com>
7710
7711 * lynx-low.c (lynx_resume): Use the resume_info parameter
7712 to determine the ptid for the lynx_ptrace call, unless
7713 it is equal to minus_one_ptid, in which case we use the
7714 ptid of the current_inferior.
7715 (lynx_wait_1): After having received a thread create/exit
7716 event, resume the inferior's execution using the signaling
7717 thread's ptid, rather than the old ptid.
7718
7fda33ae
JB
77192013-01-07 Joel Brobecker <brobecker@adacore.com>
7720
7721 * lynx-low.c (lynx_resume): Delete variable ret.
7722
b9786c74
JB
77232013-01-01 Joel Brobecker <brobecker@adacore.com>
7724
7725 * gdbreplay.c (gdbreplay_version): Update copyright year.
7726 * server.c (gdbserver_version): Likewise.
7727
8b93d60f
JB
77282012-12-17 Joel Brobecker <brobecker@adacore.com>
7729
7730 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7731 new thread.
7732
037335a7
JB
77332012-12-17 Joel Brobecker <brobecker@adacore.com>
7734
7735 * lynx-low.c (ptrace_request_to_str): Add handling for
7736 PTRACE_GETTRACESIG.
7737
52d4cbd8
JB
77382012-12-17 Joel Brobecker <brobecker@adacore.com>
7739
7740 * lynx-low.c (lynx_attach): Delete variable new_process.
7741
ab8f6ca9
JB
77422012-12-17 Joel Brobecker <brobecker@adacore.com>
7743
7744 * lynx-low.c (lynx_create_inferior): Delete variable
7745 new_process.
7746
78cbc024
JB
77472012-12-17 Joel Brobecker <brobecker@adacore.com>
7748
7749 * lynx-low.c (ptrace_request_to_str): Do not handle
7750 PTRACE_GETTHREADLIST if this macro does not exist.
7751
14a00470
YQ
77522012-12-15 Yao Qi <yao@codesourcery.com>
7753
7754 * Makefile.in (OBS): Add notif.o.
7755 * notif.c, notif.h: New.
7756 * server.c: Include "notif.h".
7757 (struct vstop_notif) <next>: Remove.
7758 <base>: New field.
7759 (queue_stop_reply): Update.
7760 (push_event, send_next_stop_reply): Remove.
7761 (discard_queued_stop_replies): Update.
7762 (notif_stop): New variable.
7763 (handle_v_stopped): Remove.
7764 (handle_v_requests): Don't call handle_v_stopped. Call
7765 handle_ack_notif instead.
7766 (queue_stop_reply_callback): Call notif_event_enque instead
7767 of queue_stop_reply.
7768 (handle_status): Don't call send_next_stop_reply, call
7769 notif_write_event instead.
7770 (kill_inferior_callback): Likewise.
7771 (detach_or_kill_inferior_callback): Likewise.
7772 (main): Call initialize_notif.
7773 (process_serial_event): Call QUEUE_is_empty.
7774 (handle_target_event): Call notif_push instead of push event.
7775 * server.h (push_event): Remove declaration.
7776
61c125b9
TT
77772012-12-10 Tom Tromey <tromey@redhat.com>
7778
7779 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7780 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7781 macros.
7782 (.c.o): Rewrite.
7783 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7784 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7785 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7786 (amd64-linux-ipa.o, ax.o): Rewrite.
7787 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7788 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7789 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7790 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7791 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7792 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7793 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7794 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7795 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7796 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7797 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7798 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7799 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7800 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7801 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7802 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7803 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7804 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7805 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7806 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7807 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7808 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7809 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7810 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7811 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7812 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7813 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7814 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7815 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7816 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7817 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7818 (reg-tilegx.o): Remove.
7819 (all_object_files): New macro.
7820 Include .deps files.
7821 * aclocal.m4, configure: Rebuild.
7822 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7823 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7824 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7825
e90e9ad9
TT
78262012-12-05 Tom Tromey <tromey@redhat.com>
7827
7828 PR gdb/14917:
7829 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7830
02d403bf 78312012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7832
7833 * configure.ac: Check for linux/perf_event.h.
7834 * config.in: Regenerated.
7835 * configure: Regenerated.
7836
0270a750
PA
78372012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7838
7839 * hostio.c (handle_readlink): Decrease buffer size
7840 parameter passed to readlink by one byte.
7841
8c29b58e
YQ
78422012-11-26 Yao Qi <yao@codesourcery.com>
7843
7844 * configure.ac (build_warnings): Append '-Wempty-body'.
7845 * configure: Regenerated.
7846 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7847 body.
7848
8bdce1ff
PM
78492012-11-15 Pierre Muller <muller@sourceware.org>
7850
7851 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7852 * config.in: Regenerate.
7853 * configure: Regenerate.
7854 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7855 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7856 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7857 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7858 header.
7859 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7860 instead of <sys/wait.h> header.
7861 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7862
02d403bf 78632012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7864
7865 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7866 (various make rules): Remove -DGDBSERVER
7867
fbd5db48
YQ
78682012-11-09 Yao Qi <yao@codesourcery.com>
7869
7870 * spu-low.c (current_ptid): Move it to ..
7871 * gdbthread.h: ... here. New.
7872 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7873 * server.c (myresume, process_serial_event): Likewise.
7874 * thread-db.c (thread_db_find_new_threads): Likewise.
7875 * tracepoint.c (run_inferior_command): Likewise.
7876
b3dc46ff
AB
78772012-10-01 Andrew Burgess <aburgess@broadcom.com>
7878
7879 * server.c (handle_search_memory_1): Include access length in
7880 warning message.
7881
07c04788
HPN
78822012-09-05 Michael Brandt <michael.brandt@axis.com>
7883
7884 * linux-crisv32-low.c: Fix compile errors.
7885
918d227b
YQ
78862012-09-04 Yao Qi <yao@codesourcery.com>
7887
7888 * tracepoint.c (cmd_qtsv): Adjust debug message.
7889 Don't check CUR_TPOINT.
7890
18c1b81a
YQ
78912012-08-28 Yao Qi <yao@codesourcery.com>
7892
7893 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7894 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7895 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7896 Remove declarations of xmalloc, xreallloc, xstrdup and
7897 freeargv.
7898 * Makefile.in (libiberty_h): New.
7899 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7900 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7901
dc82f37b
YQ
79022012-08-23 Yao Qi <yao@codesourcery.com>
7903
7904 * server.h: Remove declaration of 'xsnprintf'.
7905
406b1477
KS
79062012-08-22 Keith Seitz <keiths@redhat.com>
7907
7908 * server.h: Include build-gnulib-gbserver/config.h.
7909 * gdbreplay.c: Likewise.
7910
e6712ff1
DE
79112012-08-08 Doug Evans <dje@google.com>
7912
7913 * Makefile.in (SFILES): Add gdb_vecs.c.
7914 (OBS): Add gdb_vecs.o.
7915 (gdb_vecs_h, host_defs_h): New variables.
7916 (thread-db.o): Add $(gdb_vecs_h) dependency.
7917 (gdb_vecs.o): New rule.
7918 * thread-db.c: #include "gdb_vecs.h".
7919 (thread_db_load_search): Use a vector to iterate over path elements.
7920 Handle text appearing after "$pdir".
7921
7922 * configure.ac: Add check for strstr.
7923 * config.in: Regenerate.
7924 * configure: Regenerate.
7925
7c3270ae
UW
79262012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7927
7928 * hostio.c (handle_pread): If pread fails, fall back to attempting
7929 lseek/read.
7930 (handle_pwrite): Likewise for pwrite.
7931
b62e2b27
UW
79322012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7933
7934 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7935 between unsupported TYPE and unimplementable ADDR/LEN combination.
7936 (arm_insert_point): Act on new return value.
7937
78a99e91
PA
79382012-07-31 Pedro Alves <palves@redhat.com>
7939
7940 * server.c (process_point_options): Only skip tokens if we find
7941 one that is unrecognized. Don't treat 'X' specially while
7942 skipping unrecognized tokens.
7943
fcf303ab
UW
79442012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7945
7946 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7947 to 4-byte-align HW breakpoint addresses for Thumb.
7948
7255706c
YQ
79492012-07-27 Yao Qi <yao@codesourcery.com>
7950
7951 PR remote/14161.
7952
7953 * server.h: Declare gdb_agent_about_to_close.
7954 * target.c (kill_inferior): Include "agent.h".
7955 New. Send command 'kill'.
7956 * target.h (kill_inferior): Removed macro.
7957 * tracepoint.c (gdb_agent_about_to_close): New.
7958 (gdb_agent_helper_thread): Handle command 'close'.
7959 Wait endlessly until the inferior stops.
7960 Install gdb_agent_remove_socket to atexit hook.
7961 (agent_socket_name): New static variable.
7962 (gdb_agent_socket_init): Replace local variable 'name' with
7963 'agent_socket_name'.
7964 (gdb_agent_remove_socket): New.
7965
5a3f286f
YQ
79662012-07-27 Yao Qi <yao@codesourcery.com>
7967
7968 * server.c (process_point_options): Stop at 'X' when parsing.
7969
961bd387
ME
79702012-07-19 Michael Eager <eager@eagercon.com>
7971
a261b8f5 7972 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7973 to hw_execute.
7974 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7975 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7976 hardware breakpoint.
7977
aa7c7447
JK
79782012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7979
7980 * gdbserver/linux-low.c (initialize_low): Call
7981 linux_ptrace_init_warnings.
7982
7f216e7c
DE
79832012-07-02 Doug Evans <dje@google.com>
7984
7985 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7986 pointer to int.
7987
d3ce09f5
SS
79882012-07-02 Stan Shebs <stan@codesourcery.com>
7989
7990 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7991 (ax.o): Add it to build rule.
7992 (ax-ipa.o): Ditto.
7993 (OBS): Add format.o.
7994 (IPA_OBS): Add format.o.
7995 * server.c (handle_query): Claim support for breakpoint commands.
7996 (process_point_options): Add command case.
7997 (process_serial_event): Leave running if there are printfs in
7998 effect.
7999 * mem-break.h (any_persistent_commands): Declare.
8000 (add_breakpoint_commands): Declare.
8001 (gdb_no_commands_at_breakpoint): Declare.
8002 (run_breakpoint_commands): Declare.
8003 * mem-break.c (struct point_command_list): New struct.
8004 (struct breakpoint): New field command_list.
8005 (any_persistent_commands): New function.
8006 (add_commands_to_breakpoint): New function.
8007 (add_breakpoint_commands): New function.
8008 (gdb_no_commands_at_breakpoint): New function.
8009 (run_breakpoint_commands): New function.
8010 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8011 locally.
8012 * ax.c: Include format.h.
8013 (ax_printf): New function.
8014 (gdb_eval_agent_expr): Add printf opcode.
8015
2f8f6aed
YQ
80162012-06-13 Yao Qi <yao@codesourcery.com>
8017
8018 * server.c (start_inferior): Remove duplicated writes to fields
8019 'last_resume_kind' and 'last_status' of 'current_inferior'.
8020
0c9070b3
YQ
80212012-06-12 Yao Qi <yao@codesourcery.com>
8022 Pedro Alves <palves@redhat.com>
8023
8024 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8025 comment.
8026 * server.c (handle_v_cont): Extend comment.
8027
c52daf70
YQ
80282012-06-11 Yao Qi <yao@codesourcery.com>
8029
8030 * linux-low.c (linux_attach): Add 'static'.
8031
d38bbb0a
YQ
80322012-06-06 Yao Qi <yao@codesourcery.com>
8033
8034 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8035
89dc0afd
JK
80362012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8037
8038 Fix gcc -flto compilation warning.
8039 * server.c (main): Make variable multi_mode and attach volatile.
8040
75f62ce7
TJB
80412012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8042
8043 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8044 if the platform doesn't know about it.
8045
65f479b6
PA
80462012-05-30 Jeff Kenton <jkenton@tilera.com>
8047
8048 * Makefile.in (SFILES): Add linux-tile-low.c.
8049 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8050 * configure.srv: Handle tilegx-*-linux*.
8051 * linux-tile-low.c: New file.
8052
0c5bf5a9
JK
80532012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8054
8055 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8056
a493e3e2
PA
80572012-05-24 Pedro Alves <palves@redhat.com>
8058
8059 PR gdb/7205
8060
43aaf8b6 8061 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8062
2ea28649
PA
80632012-05-24 Pedro Alves <palves@redhat.com>
8064
8065 PR gdb/7205
8066
8067 Replace target_signal with gdb_signal throughout.
8068
8d409d16
MR
80692012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8070
8071 * linux-low.c (linux_store_registers): Avoid the copying sequence
8072 when no data has been retrieved by ptrace.
8073
23512c01
MGD
80742012-05-22 Will Deacon <will.deacon@arm.com>
8075
8076 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8077 Include asm/ptrace.h.
8078 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8079 already defined.
8080
4934b29e
MR
80812012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8082
8083 * linux-low.c (linux_store_registers): Don't re-retrieve data
8084 with ptrace that has already been obtained from /proc. Always
8085 copy any data retrieved with ptrace to the buffer supplied.
8086
bde24c0a
PA
80872012-05-11 Yao Qi <yao@codesourcery.com>
8088 Pedro Alves <palves@redhat.com>
8089
8090 * linux-low.c (enum stopping_threads_kind): New.
8091 (stopping_threads): Change type to `enum stopping_threads_kind'.
8092 (handle_extended_wait): If stopping and suspending threads, leave
8093 the new_lwp suspended too.
8094 (linux_wait_for_event): Adjust.
8095 (stop_all_lwps): Set `stopping_threads' to
8096 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8097 whether we're suspending threads or just stopping them. Assert no
8098 recursion happens.
8099
623b6bdf
YQ
81002012-04-29 Yao Qi <yao@codesourcery.com>
8101
8102 * server.h: Move some code to ...
8103 * gdbthread.h: ... here. New.
8104 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8105 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8106 (nto-low.o, win32-low.o): Likewise.
8107 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8108 * regcache.c, remote-utils.c, server.c: Likewise.
8109 * target.c, tracepoint.c, win32-low.c: Likewise.
8110
f15f9948
TJB
81112012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8112
8113 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8114 (PTRACE_ARG4_TYPE): Likewise.
8115 (PTRACE_XFER_TYPE): Likewise.
8116 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8117 ptrace to PTRACE_ARG3_TYPE.
8118 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8119 (PTRACE_ARG4_TYPE): Likewise.
8120 (PTRACE_XFER_TYPE): Likewise.
8121 (linux_detach_one_lwp): Cast fourth argument of
8122 ptrace to long then PTRACE_ARG4_TYPE.
8123 (regsets_fetch_inferior_registers): Cast third argument of
8124 ptrace to long then PTRACE_ARG3_TYPE.
8125 (regsets_store_inferior_registers): Likewise.
8126
38ea300a
PA
81272012-04-20 Pedro Alves <palves@redhat.com>
8128
8129 * configure: Regenerate.
8130
c971b7fa
PA
81312012-04-19 Pedro Alves <palves@redhat.com>
8132
43aaf8b6 8133 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8134 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8135 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8136 (all, install-only, uninstall, clean-info, all-lib, clean): No
8137 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8138 (maintainer-clean realclean distclean): Use subdir_do.
8139 (subdir_do): New.
8140 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8141 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8142 * acinclude.m4: Include acx_configure_dir.m4.
8143 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8144 calls. Call AC_PROG_RANLIB. Configure gnulib using
8145 ACX_CONFIGURE_DIR.
8146 (GNULIB): New.
8147 (GNULIB_STDINT_H): Adjust.
8148 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8149 * gdbreplay.c: Include build-gnulib/config.h.
8150 * server.h: Likewise.
8151 * aclocal.m4: Regenerate.
8152 * config.in: Regenerate.
8153 * configure: Regenerate.
c971b7fa 8154
809277f8
PA
81552012-04-19 Pedro Alves <palves@redhat.com>
8156
8157 * Makefile.in (LIBGNU, INCGNU): Adjust.
8158 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8159 (all, install-only, uninstall, clean-info, all-lib, clean)
8160 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8161 * configure.ac: Adjust AC_OUTPUT output.
8162 * aclocal.m4: Regenerate.
8163 * configure: Regenerate.
8164
fd9bb8b8
PA
81652012-04-19 Pedro Alves <palves@redhat.com>
8166
8167 * Makefile.in (generated_files): New.
8168 (server_h): Remove the explicit dependency on config.h, and depend
8169 on $generated_files.
8170
1c298c66
PA
81712012-04-19 Pedro Alves <palves@redhat.com>
8172
8173 * Makefile.in (INCGNU): Add -Ignulib.
8174
57c4b50b
PA
81752012-04-19 Pedro Alves <palves@redhat.com>
8176
8177 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8178 (INCGNU): ... this, and spell out -I here.
8179 (GNULIB_LIB): Rename to ...
8180 (LIBGNU): ... this.
8181 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8182
1030e047
PA
81832012-04-19 Pedro Alves <palves@redhat.com>
8184
8185 * config.in: Regenerate.
8186
447d4319
PA
81872012-04-19 Pedro Alves <palves@redhat.com>
8188
8189 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8190 * server.h (memmem): Remove declaration.
8191 * config.in: Regenerate.
8192 * configure: Regenerate.
8193
aad9eab9
YQ
81942012-04-19 Yao Qi <yao@codesourcery.com>
8195
8196 * Makefile.in (SFILES): Add common/vec.c.
8197 (OBS): Add vec.o.
8198 (vec.o): New rule.
8199
3e10640f
YQ
82002012-04-19 Yao Qi <yao@codesourcery.com>
8201
8202 * remote-utils.c (prepare_resume_reply): Replace with macro
8203 target_core_of_thread.
8204 * server.c (handle_qxfer_threads_proper): Likewise.
8205 * target.h (traget_core_of_thread): New macro.
8206
71622373
PA
82072012-04-18 Pedro Alves <palves@redhat.com>
8208
8209 * aclocal.m4: Regenerate.
8210 * configure: Regenerate.
8211
80d26939
YQ
82122012-04-16 Yao Qi <yao@codesourcery.com>
8213
8214 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8215 duplicated on address.
8216
42476b70
YQ
82172012-04-16 Yao Qi <yao@codesourcery.com>
8218
8219 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8220 (struct tracepoint_action_ops) <send>: New field.
8221 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8222 (agent_expr_send, x_tracepoint_action_send): New.
8223 (l_tracepoint_action_send): New.
8224 (cmd_qtdp): Download and install tracepoint
8225 according to `use_agent'.
8226 (run_inferior_command): Add one more parameter `len'.
8227 Update callers.
8228 (tracepoint_send_agent): New.
8229 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8230
7bc83639
YQ
82312012-04-16 Yao Qi <yao@codesourcery.com>
8232
8233 * tracepoint.c (download_tracepoints): Moved to ...
8234 (cmd_qtstart): ... here.
8235
5f18041e
YQ
82362012-04-14 Yao Qi <yao@codesourcery.com>
8237
8238 * tracepoint.c: Include inttypes.h.
8239 (struct collect_memory_action): Use sized types.
8240 (struct tracepoint): Likewise.
8241 (cmd_qtdp, stop_tracing): Update print specifiers.
8242 (cmd_qtp, response_tracepoint): Likewise.
8243 (collect_data_at_tracepoint): Likewise.
8244 (collect_data_at_step): Likewise.
8245
55a8c076
YQ
82462012-04-14 Yao Qi <yao@codesourcery.com>
8247
8248 Import gnulib module inttypes.
8249 * aclocal.m4, config.in, configure: Regenerated.
8250
dc750257
YQ
82512012-04-14 Yao Qi <yao@codesourcery.com>
8252
8253 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8254 Makefile and config.status at last.
8255
0ab5faf9
YQ
82562012-04-13 Yao Qi <yao@codesourcery.com>
8257
8258 * tracepoint.c: Include stdint.h unconditionally.
8259
18f5fd81
TJB
82602012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8261
8262 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8263 on BFD_HAVE_SYS_PROCFS_TYPE.
8264 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8265 * configure: Regenerate.
8266 * config.in: Likewise.
8267
4d47af5c
L
82682012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8269
8270 * Makefile.in (clean): Also remove x32.c x32-linux.c
8271 x32-avx.c x32-avx-linux.c.
8272 (x32.o): New target.
8273 (x32.c): Likewise.
8274 (x32-linux.o): Likewise.
8275 (x32-linux.c): Likewise.
8276 (x32-avx.o): Likewise.
8277 (x32-avx.c): Likewise.
8278 (x32-avx-linux.o): Likewise.
8279 (x32-avx-linux.c): Likewise.
8280
8281 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8282 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8283 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8284 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8285 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8286 i386/x32-avx-linux.xml.
8287
8288 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8289 (init_registers_x32_avx_linux): Likwise.
8290 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8291 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8292
ecedbe58
PA
82932012-04-13 Pedro Alves <palves@redhat.com>
8294
8295 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8296 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8297 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8298 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8299 the sub-make.
8300
c92b5177
L
83012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8302
8303 * linux-x86-low.c (compat_x32_clock_t): New.
8304 (compat_x32_siginfo_t): Likewise.
8305 (compat_x32_siginfo_from_siginfo): Likewise.
8306 (siginfo_from_compat_x32_siginfo): Likewise.
8307 (linux_is_elf64): Likewise.
8308 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8309 and siginfo_from_compat_x32_siginfo for x32.
8310 (x86_arch_setup): Set linux_is_elf64.
8311
214d508e
L
83122012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8313
8314 PR gdb/13969
8315 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8316 e_machine field.
8317 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8318 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8319 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8320 compatible with process.
8321
c9a1864a
YQ
83222012-04-12 Yao Qi <yao@codesourcery.com>
8323
8324 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8325 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8326 (install-only, install-info, clean): Handle sub dir gnulib.
8327 (all-lib, am--refresh): New targets.
8328 (memmem.o): Remove target.
8329 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8330 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8331 (AC_REPLACE_FUNCS): Remove memmem.
8332 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8333 (AC_OUTPUT): Generate Makefile in gnulib/.
8334 * aclocal.m4, config.in, configure: Regenerated.
8335
367ba2c2
MR
83362012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8337
8338 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8339
9d236627
PA
83402012-04-05 Pedro Alves <palves@redhat.com>
8341
8342 -Werror=strict-aliasing
8343
8344 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8345 pointer.
8346
111217b3
PA
83472012-04-04 Pedro Alves <palves@redhat.com>
8348
8349 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8350 (sparc_store_gregset_from_stack, sparc_store_gregset)
8351 (sparc_breakpoint_at): Fix formatting.
8352
8365dcf5
TJB
83532012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8354
8355 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8356 are available.
8357 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8358 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8359 * config.in: Regenerate.
8360 * configure: Likewise.
8361
689cc2ae
PA
83622012-03-29 Pedro Alves <palves@redhat.com>
8363
8364 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8365 Correct ptrace arguments.
8366
c14dfd32
PA
83672012-03-28 Pedro Alves <palves@redhat.com>
8368
8369 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8370 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8371 (IA64_FR1_REGNUM): New defines.
8372 (ia64_fetch_register): New.
8373 (the_low_target): Install it.
8374 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8375 field.
8376 * linux-low.c (linux_fetch_registers): Try the
8377 the_low_target.fetch_register hook first.
8378
8379 * linux-arm-low.c (the_low_target): Adjust.
8380 * linux-bfin-low.c (the_low_target): Adjust.
8381 * linux-cris-low.c (the_low_target): Adjust.
8382 * linux-crisv32-low.c (the_low_target): Adjust.
8383 * linux-m32r-low.c (the_low_target): Adjust.
8384 * linux-m68k-low.c (the_low_target): Adjust.
8385 * linux-mips-low.c (the_low_target): Adjust.
8386 * linux-ppc-low.c (the_low_target): Adjust.
8387 * linux-s390-low.c (the_low_target): Adjust.
8388 * linux-sh-low.c (the_low_target): Adjust.
8389 * linux-sparc-low.c (the_low_target): Adjust.
8390 * linux-tic6x-low.c (the_low_target): Adjust.
8391 * linux-x86-low.c (the_low_target): Adjust.
8392 * linux-xtensa-low.c (the_low_target): Adjust.
8393
63c88e13
PA
83942012-03-26 Pedro Alves <palves@redhat.com>
8395
8396 * server.c (handle_qxfer_libraries): Don't bail early if
8397 the_target->qxfer_libraries_svr4 is not NULL.
8398
fb723180
PA
83992012-03-26 Pedro Alves <palves@redhat.com>
8400
8401 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8402
0afae3cf
PA
84032012-03-23 Pedro Alves <palves@redhat.com>
8404
8405 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8406 "library-list-svr4" element's start tag when the the DSO list is
8407 empty.
8408
485f1ee4
PA
84092012-03-23 Pedro Alves <palves@redhat.com>
8410
8411 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8412 a variable whose type size is the same as the inferior's pointer
8413 size.
8414
a5362b9a
TS
84152012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8416
8417 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8418 struct siginfo.
8419 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8420 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8421 * linux-low.h: Include <signal.h>.
8422 (struct siginfo): Remove forward declaration.
8423 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8424 struct siginfo.
8425
d226c142
MF
84262012-03-21 Mike Frysinger <vapier@gentoo.org>
8427
8428 * .gitignore: Ignore more files.
8429
122f36ef
PA
84302012-03-19 Pedro Alves <palves@redhat.com>
8431 Jan Kratochvil <jan.kratochvil@redhat.com>
8432
8433 * server.c (cont_thread, general_thread): Add describing comments.
8434 (start_inferior): Clear `cont_thread'.
8435 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8436 of a process.
8437
fc3e5175
YQ
84382012-03-15 Yao Qi <yao@codesourcery.com>
8439
8440 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8441 handling to ...
8442 (cmd_qtdp): ... here.
8443
8d0d92cd
YQ
84442012-03-15 Yao Qi <yao@codesourcery.com>
8445
8446 * tracepoint.c (struct tracepoint_action_ops): New.
8447 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8448 (m_tracepoint_action_download): New.
8449 (r_tracepoint_action_download): New.
8450 (x_tracepoint_action_download): New.
8451 (l_tracepoint_action_download): New.
8452 (add_tracepoint_action): Install `action->ops' according type.
8453 (download_tracepoint_1): Move code `download' function pointer
8454 of various tracepoint_action_ops.
8455
87b0bb13
JK
84562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8457
8458 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8459 linux_ptrace_attach_warnings.
8460
5f572dec
JK
84612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8462
8463 * Makefile.in (linux-ptrace.o): New.
8464 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8465 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8466 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8467 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8468 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8469 of these targets.
8470 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8471
f4647387
YQ
84722012-03-08 Yao Qi <yao@codesourcery.com>
8473 Pedro Alves <palves@redhat.com>
8474
8475 Fix PR server/13392.
8476 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8477 offset of JMP insn.
8478 * tracepoint.c (remove_tracepoint): New.
8479 (cmd_qtdp): Call remove_tracepoint when failed to install.
8480
9b224c5e
PA
84812012-03-07 Pedro Alves <palves@redhat.com>
8482
8483 * linux-low.c (get_detach_signal): New.
8484 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8485 Pass on pending signals to PTRACE_DETACH. Check the result of the
8486 ptrace call.
8487 * server.c (program_signals, program_signals_p): New.
8488 (handle_general_set): Handle QProgramSignals.
8489 * server.h (program_signals, program_signals_p): Declare.
8490
e237a7e2
JK
84912012-03-05 Pedro Alves <palves@redhat.com>
8492 Jan Kratochvil <jan.kratochvil@redhat.com>
8493
8494 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8495 New comment why.
8496
5808517f
YQ
84972012-03-03 Yao Qi <yao@codesourcery.com>
8498
8499 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8500 agent_look_up_symbols.
8501
58b4daa5
YQ
85022012-03-03 Yao Qi <yao@codesourcery.com>
8503
8504 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8505 (linux-x86-low.o): Likewise.
8506 * server.h: Remove in_process_agent_loaded.
8507 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8508 common/agent.c.
8509 Update callers.
8510
8ffcbaaf
YQ
85112012-03-03 Yao Qi <yao@codesourcery.com>
8512
8513 * tracepoint.c (gdb_agent_capability): New global.
8514 (in_process_agent_loaded_ust): Renamed to
8515 `in_process_agent_supports_ust'.
8516 Update callers.
8517 (in_process_agent_supports_ust): Call agent_capability_check.
8518 (clear_installed_tracepoints): Assert that agent supports
8519 agent.
8520
d1feda86
YQ
85212012-03-03 Yao Qi <yao@codesourcery.com>
8522
8523 * linux-low.c (linux_supports_agent): New.
8524 (linux_target_ops): Initialize field `supports_agent' with
8525 linux_supports_agent.
8526 * target.h (struct target_ops) <supports_agent>: New.
8527 (target_supports_agent): New macro.
8528 * server.c (handle_general_set): Handle packet 'QAgent'.
8529 (handle_query): Send `QAgent+'.
8530 * Makefile.in (server.o): Depends on agent.h.
8531
2fa291ac
YQ
85322012-03-03 Yao Qi <yao@codesourcery.com>
8533
8534 * Makefile.in (OBS): Add agent.o.
8535 Add new rule for agent.o.
8536 Track dependence of tracepoint.c on agent.h.
8537 * tracepoint.c (run_inferior_command_1):
8538 (run_inferior_command): Call agent_run_command.
8539 (gdb_ust_connect_sync_socket): Deleted. Move it to
8540 common/agent.c.
8541 (resume_thread, stop_thread): Likewise.
8542 (gdb_ust_socket_init): Renamed to ...
8543 (gdb_agent_socket_init): ... New.
8544 (gdb_ust_thread): Renamed to ...
8545 (gdb_agent_helper_thread): ... New.
8546 (gdb_ust_init): Move some code to ...
8547 (gdb_agent_init): ... here. New.
8548 [HAVE_UST]: Call gdb_ust_init.
8549 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8550 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8551 * config.in, configure: Regenerated.
8552
05044653
PA
85532012-03-02 Pedro Alves <palves@redhat.com>
8554
8555 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8556 * linux-low.c (struct simple_pid_list): New.
8557 (stopped_pids): New a struct simple_pid_list pointer.
8558 (add_to_pid_list, pull_pid_from_list): New.
8559 (handle_extended_wait): Don't assume the first signal new children
8560 report is SIGSTOP. Adjust call to pull_pid_from_list.
8561 (linux_wait_for_lwp): Adjust.
8562
8d00225b
YQ
85632012-03-02 Yao Qi <yao@codesourcery.com>
8564
8565 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8566 debug log.
8567
19560ba5
YQ
85682012-03-02 Yao Qi <yao@codesourcery.com>
8569
8570 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8571 `stop_pc' and `tpoint'. Update caller.
8572
1faeff08
MR
85732012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8574
8575 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8576 * linux-low.c (use_linux_regsets): New macro.
8577 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8578 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8579 (linux_register_in_regsets): New function.
8580 (usr_fetch_inferior_registers): Skip registers covered by
8581 regsets.
8582 (usr_store_inferior_registers): Likewise.
8583 (usr_fetch_inferior_registers): New macro.
8584 (usr_store_inferior_registers): Likewise.
8585 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8586 (linux_store_registers): Likewise.
8587 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8588 prototype.
8589 (init_registers_mips64_dsp_linux): Likewise.
8590 (init_registers_mips_linux): New macro.
8591 (init_registers_mips_dsp_linux): Likewise.
8592 (mips_dsp_num_regs): Likewise.
8593 (DSP_BASE, DSP_CONTROL): New fallback macros.
8594 (mips_base_regs): New macro.
8595 (mips_regmap): Use it. Fix the size.
8596 (mips_dsp_regmap): New variable.
8597 (mips_dsp_regset_bitmap): Likewise.
8598 (mips_arch_setup): New function.
8599 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8600 than mips_regmap.
8601 (mips_cannot_store_register): Likewise.
8602 (the_low_target): Update .arch_setup, .num_regs and .regmap
8603 initializers. Add .regset_bitmap initializer.
8604 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8605 initializer.
8606 * linux-bfin-low.c (the_low_target): Likewise.
8607 * linux-cris-low.c (the_low_target): Likewise.
8608 * linux-crisv32-low.c (the_low_target): Likewise.
8609 * linux-ia64-low.c (the_low_target): Likewise.
8610 * linux-m32r-low.c (the_low_target): Likewise.
8611 * linux-m68k-low.c (the_low_target): Likewise.
8612 * linux-ppc-low.c (the_low_target): Likewise.
8613 * linux-s390-low.c (the_low_target): Likewise.
8614 * linux-sh-low.c (the_low_target): Likewise.
8615 * linux-sparc-low.c (the_low_target): Likewise.
8616 * linux-tic6x-low.c (the_low_target): Likewise.
8617 * linux-x86-low.c (the_low_target): Likewise.
8618 * linux-xtensa-low.c (the_low_target): Likewise.
8619 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8620 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8621 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8622 srv_xmlfiles.
8623 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8624 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8625
c03e6ccc
YQ
86262012-02-29 Yao Qi <yao@codesourcery.com>
8627 Pedro Alves <palves@redhat.com>
8628
8629 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8630 `step_over_finished' is true.
8631
644cebc9
PA
86322012-02-27 Pedro Alves <palves@redhat.com>
8633
8634 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8635 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8636
c14d7ab2
PA
86372012-02-27 Pedro Alves <palves@redhat.com>
8638
8639 PR server/9684
8640 * linux-low.c (pid_is_stopped): New.
8641 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8642
412c89dd
LM
86432012-02-25 Luis Machado <lgustavo@codesourcery.com>
8644
8645 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8646 of conditions.
8647
b745defe
MR
86482012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8649
8650 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8651
9f3a5c85
LM
86522012-02-24 Luis Machado <lgustavo@codesourcery>
8653
8654 * server.c (handle_query): Advertise support for target-side
8655 breakpoint condition evaluation.
8656 (process_point_options): New function.
8657 (process_serial_event): When inserting a breakpoint, check for
8658 a target-side condition that should be evaluated.
8659
8660 * mem-break.c: Include regcache.h and ax.h.
8661 (point_cond_list_t): New data structure.
8662 (breakpoint) <cond_list>: New field.
8663 (find_gdb_breakpoint_at): Make non-static.
8664 (delete_gdb_breakpoint_at): Clear any target-side
8665 conditions.
8666 (clear_gdb_breakpoint_conditions): New function.
8667 (add_condition_to_breakpoint): Likewise.
8668 (add_breakpoint_condition): Likewise.
8669 (gdb_condition_true_at_breakpoint): Likewise.
8670 (gdb_breakpoint_here): Return result directly instead
8671 of going through a local variable.
8672
8673 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8674 (clear_gdb_breakpoint_conditions): Likewise.
8675 (add_breakpoint_condition): Likewise.
8676 (gdb_condition_true_at_breakpoint): Likewise.
8677
8678 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8679 (need_step_over_p): Take target-side breakpoint condition into
8680 consideration.
8681
5e1dc496
LM
86822012-02-24 Luis Machado <lgustavo@codesourcery>
8683
8684 * server.h: Include tracepoint.h.
8685 (agent_mem_read, agent_get_trace_state_variable_value,
8686 agent_set_trace_state_variable_value,
8687 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8688 get_set_tsv_func_addr): New prototypes.
8689
8690 * ax.h: New include file.
8691 * ax.c: New source file.
8692
8693 * tracepoint.c: Include ax.h.
8694 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8695 agent_expr, eval_result_type): Move to ax.h.
8696 (parse_agent_expr): Rename to ...
8697 (gdb_parse_agent_expr): ... this, make it non-static and move
8698 to ax.h.
8699 (unparse_agent_expr) Rename to ...
8700 (gdb_unparse_agent_expr): ... this, make it non-static and move
8701 to ax.h.
8702 (eval_agent_expr): Rename to ...
8703 (eval_tracepoint_agent_expr): ... this.
8704 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8705 forward declarations.
8706 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8707 (agent_get_trace_state_variable_value): New function.
8708 (agent_set_trace_state_variable_value): New function.
8709 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8710 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8711 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8712 (condition_true_at_tracepoint): Likewise.
8713 (parse_agent_expr): Rename to ...
8714 (gdb_parse_agent_expr): ... this and move to ax.c.
8715 (unparse_agent_expr): Rename to ...
8716 (gdb_unparse_agent_expr): ... this and move to ax.c.
8717 (gdb_agent_op_name): Move to ax.c.
8718 (eval_agent_expr): Rename to ...
8719 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8720 and move to ax.c.
8721 (eval_tracepoint_agent_expr): New function.
8722 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8723 non-static.
5e1dc496
LM
8724 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8725 ax.c.
8726 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8727 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8728 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8729 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8730 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8731 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8732 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8733 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8734 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8735 (compile_bytecodes): Remove forward declaration.
8736 (is_goto_target): Move to ax.c.
8737 (compile_bytecodes): Move to ax.c and call
8738 agent_get_trace_state_variable_value (...) and
8739 agent_set_trace_state_variable_value (...).
8740
8741 * Makefile.in: Update ax.c and IPA dependencies.
8742
277e4e52
PA
87432012-02-24 Pedro Alves <palves@redhat.com>
8744
8745 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8746 (cmd_bigqtbuffer_circular): ... this. Only handle
8747 'QTBuffer:circular:'.
8748 (handle_tracepoint_general_set): Adjust.
8749
bf4c19f7
YQ
87502012-02-16 Yao Qi <yao@codesourcery.com>
8751
8752 * inferiors.c: Move code to ...
8753 * dll.c: .... here. New.
8754 * server.h: Declare clear_dlls.
8755 * Makefile.in (SFILES): Add dll.c.
8756 (OBS): Add dll.o
8757 (dll.o): New rule.
8758
d73f2619
YQ
87592012-02-11 Yao Qi <yao@codesourcery.com>
8760
8761 * server.c: (handle_monitor_command): Add a new parameter
8762 `own_buf'.
8763 (handle_query): Update caller.
8764
f8255c2a
JB
87652012-02-09 Joel Brobecker <brobecker@adacore.com>
8766
8767 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8768 * configure, config.in: Regenerate.
8769 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8770 is not defined.
8771
da84f473
PA
87722012-02-02 Pedro Alves <palves@redhat.com>
8773
8774 Try SIGKILL first, then PTRACE_KILL.
8775 * linux-low.c (linux_kill_one_lwp): New.
8776 (linux_kill_one_lwp): Rename to ...
8777 (kill_one_lwp_callback): ... this. Use the new
8778 linux_kill_one_lwp.
8779
e886a173
PA
87802012-02-02 Pedro Alves <palves@redhat.com>
8781
8782 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8783 inferior.
8784
be07f1a2
PA
87852012-01-27 Pedro Alves <palves@redhat.com>
8786
8787 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8788 (elf_64_file_p): Make static.
8789 (linux_pid_exe_is_elf_64_file): New.
8790 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8791 Delete declarations.
8792 (linux_pid_exe_is_elf_64_file): Declare.
8793 * linux-x86-low.c (x86_arch_setup): Use
8794 linux_pid_exe_is_elf_64_file.
8795
d8301ad1
JK
87962012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8797
8798 * linux-low.c (linux_wait_for_event_1): Rename to ...
8799 (linux_wait_for_event): ... here and merge it with former
8800 linux_wait_for_event - new variable wait_ptid, use it.
8801 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8802
01b17894
PA
88032012-01-23 Pedro Alves <palves@redhat.com>
8804
8805 * server.c (main): Avoid yet another case of infinite loop while
8806 detaching/killing after a longjmp.
8807
e825046f
JK
88082012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8809
8810 Code cleanup.
8811 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8812
b9e7b9c3
UW
88132012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8814
8815 * hostio.c (handle_readlink): New function.
8816 (handle_vFile): Call it to handle "vFile:readlink" packets.
8817
901f9912
UW
88182012-01-20 Pedro Alves <palves@redhat.com>
8819 Ulrich Weigand <ulrich.weigand@linaro.org>
8820
8821 * server.c (handle_v_requests): Only support vAttach and vRun to
8822 start multiple processes when in extended protocol mode.
8823
fc1ab1a0
PA
88242012-01-17 Pedro Alves <palves@redhat.com>
8825
8826 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8827 memalign plus mprotect to allocate the scratch buffer.
8828
7d5d4e98
PA
88292012-01-13 Pedro Alves <palves@redhat.com>
8830
8831 * server.c (attach_inferior): Clear `cont_thread'.
8832
f128d5e9
PA
88332012-01-13 Pedro Alves <palves@redhat.com>
8834
8835 * server.c (main): Avoid infinite loop while detaching/killing
8836 after a longjmp.
8837
06db92f0
DE
88382012-01-09 Doug Evans <dje@google.com>
8839
8840 * server.c (start_inferior): Set last_ptid in --wrapper case.
8841
32d92999
YQ
88422012-01-06 Yao Qi <yao@codesourcery.com>
8843
8844 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8845 defined.
8846 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8847
5e0a92a9
YQ
88482012-01-04 Yao Qi <yao@codesourcery.com>
8849
8850 * tracepoint.c (cmd_qtdp): Print debug message
8851 for static tracepoint.
8852
ae639e8c
YQ
88532012-01-04 Yao Qi <yao@codesourcery.com>
8854
8855 * tracepoint.c (trace_vdebug): Differentiate debug message
8856 between gdbserver and IPA.
8857
f72429c5
YQ
88582012-01-03 Yao Qi <yao@codesourcery.com>
8859
8860 * tracepoint.c (tracepoint_was_hit): Don't collect for
8861 static tracepoint.
8862
12c3e59c
JB
88632012-01-02 Joel Brobecker <brobecker@adacore.com>
8864
8865 * terminal.h: Reformat copyright header.
8866
67827812
JB
88672012-01-02 Joel Brobecker <brobecker@adacore.com>
8868
8869 * server.c (gdbserver_version): Update copyright year.
8870 * gdbreplay.c (gdbreplay_version): Likewise.
8871
3e52c33d
JK
88722011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8873
8874 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8875
8876 Revert:
8877 2011-12-18 Hui Zhu <teawater@gmail.com>
8878 * linux-low.c (linux_create_inferior): Save return value to ret.
8879
66f1260e
HZ
88802011-12-18 Hui Zhu <teawater@gmail.com>
8881
8882 * linux-low.c (linux_create_inferior): Save return value to ret.
8883
e77616d7
DE
88842011-12-16 Doug Evans <dje@google.com>
8885
e7b06c57
DE
8886 * linux-low.c (linux_create_inferior): If stdio connection,
8887 redirect stdin from /dev/null, stdout to stderr.
8888 * remote-utils.c (remote_is_stdio): New static global.
8889 (remote_connection_is_stdio): New function.
8890 (remote_prepare): Handle stdio connection.
8891 (remote_open): Ditto.
8892 (remote_close): Don't close stdin for stdio connections.
8893 (read_prim,write_prim): New functions. Replace all calls to
8894 read/write to these.
8895 * server.c (main): Watch for "-" argument. Move call to
8896 remote_prepare before start_inferior.
8897 * server.h (STDIO_CONNECTION_NAME): New macro.
8898 (remote_connection_is_stdio): Declare.
8899
e77616d7
DE
8900 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8901 in debugging output.
8902
82067193
YQ
89032011-12-15 Yao Qi <yao@codesourcery.com>
8904
8905 * tracepoint.c: Include sys/syscall.h.
8906 (gdb_ust_thread): Remove preprocessor conditional.
8907
82bfbe7e
PA
89082011-12-14 Pedro Alves <pedro@codesourcery.com>
8909
8910 * linux-low.c (linux_detach_one_lwp): Call
8911 the_low_target.prepare_to_resume before detaching.
8912
712c6575
YQ
89132011-12-14 Yao Qi <yao@codesourcery.com>
8914
8915 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8916 of write.
8917
d54d1edf
YQ
89182011-12-14 Yao Qi <yao@codesourcery.com>
8919
8920 * i386-low.c (i386_low_stopped_data_address): Initialize local
8921 variable `control'.
8922
6210a125
PA
89232011-12-13 Pedro Alves <pedro@codesourcery.com>
8924
8925 PR remote/13492
8926
8927 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8928 DR_CONTROL unless necessary. Extend comments.
8929 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8930 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8931
2ece8244
YQ
89322011-12-13 Yao Qi <yao@codesourcery.com>
8933
8934 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8935 macros.
8936 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8937
784867a5
JK
89382011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8939
8940 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8941 Print new debug message for such case.
8942
6bf36717
JK
89432011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8944
8945 Fix overlapping memcpy.
8946 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8947 the read_inferior_memory transfer.
8948 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8949 write_inferior_memory transfer.
8950 (set_fast_tracepoint_jump): New variable buf. Use it for the
8951 read_inferior_memory and write_inferior_memory transfers.
8952 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8953 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8954 Use it for the write_inferior_memory transfer.
8955 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8956 buffers.
8957
50275556
MR
89582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8959
8960 * linux-low.c (fetch_register, store_register): Make code
8961 consistent, fix formatting.
8962
7325beb4
MR
89632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8964
8965 * linux-low.c (usr_store_inferior_registers): Factor out code
8966 to handle individual registers into...
8967 (store_register): ... this new function.
8968
c642a434
UW
89692011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8970
8971 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8972 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8973 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8974 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8975 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8976 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8977 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8978 (srv_xmlfiles): Add new XML files.
8979
8980 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8981 and <sys/uio.h>.
8982 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8983 (init_registers_s390_linux32v1): Add prototype.
8984 (init_registers_s390_linux32v2): Likewise.
8985 (init_registers_s390_linux64v1): Likewise.
8986 (init_registers_s390_linux64v2): Likewise.
8987 (init_registers_s390x_linux64v1): Likewise.
8988 (init_registers_s390x_linux64v2): Likewise.
8989 (s390_num_regs): Increment to 52.
8990 (s390_regmap): Add orig_r2 register.
8991 (s390_num_regs_3264): Increment to 68.
8992 (s390_regmap_3264): Add orig_r2 register.
8993 (s390_collect_ptrace_register): Handle orig_r2 register.
8994 (s390_supply_ptrace_register): Likewise.
8995 (s390_fill_last_break): New function.
8996 (s390_store_last_break): Likewise.
8997 (s390_fill_system_call): New function.
8998 (s390_store_system_call): Likewise.
8999 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9000 register sets.
9001 (s390_check_regset): New function.
9002 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9003 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9004 Update target_regsets for available register sets.
9005
2268b414
JK
90062011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9007 Jan Kratochvil <jan.kratochvil@redhat.com>
9008
9009 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9010 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9011 New.
9012 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9013 * linux-low.h (struct process_info_private): New member r_debug.
9014 * server.c (handle_qxfer_libraries): Call
9015 the_target->qxfer_libraries_svr4.
9016 (handle_qxfer_libraries_svr4): New function.
9017 (qxfer_packets): New entry "libraries-svr4".
9018 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9019 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9020 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9021 PACKET_qXfer_libraries_svr4.
9022
d6db1fab
UW
90232011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9024
9025 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9026 PSW address/mask between 8-byte and 16-byte formats.
9027 (s390_supply_ptrace_register): Likewise.
9028 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9029 basic addressing mode bit.
9030
242f5f1c
SS
90312011-11-24 Stan Shebs <stan@codesourcery.com>
9032
9033 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9034
f196051f
SS
90352011-11-17 Stan Shebs <stan@codesourcery.com>
9036
9037 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9038 (tracing_start_time): New global.
9039 (tracing_stop_time): New global.
9040 (tracing_user_name): New global.
9041 (tracing_notes): New global.
9042 (tracing_stop_note): New global.
9043 (cmd_qtstart): Set traceframe_usage, start_time.
9044 (stop_tracing): Set stop_time.
9045 (cmd_qtstatus): Report additional status.
9046 (cmd_qtp): New function.
9047 (handle_tracepoint_query): Call it.
9048 (cmd_qtnotes): New function.
9049 (handle_tracepoint_general_set): Call it.
9050 (get_timestamp): Rename from tsv_get_timestamp.
9051
405f8e94
SS
90522011-11-14 Stan Shebs <stan@codesourcery.com>
9053 Kwok Cheung Yeung <kcy@codesourcery.com>
9054
9055 * linux-x86-low.c (small_jump_insn): New.
9056 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9057 trampoline and error message, build a trampoline and issue a small
9058 jump instruction to it.
9059 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9060 trampoline and error message.
9061 (x86_get_min_fast_tracepoint_insn_len): New.
9062 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9063 * linux-low.h (struct linux_target_ops): Add arguments to
9064 install_fast_tracepoint_jump_pad operation, add new operation.
9065 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9066 arguments.
9067 (linux_get_min_fast_tracepoint_insn_len): New function.
9068 (linux_target_op): Add new operation.
9069 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9070 (gdb_trampoline_buffer_end): Ditto.
9071 (gdb_trampoline_buffer_error): Ditto.
9072 (struct ipa_sym_addresses): Add fields for new IPA variables.
9073 (symbol_list): Add entries for new IPA variables.
9074 (struct tracepoint): Add fields to hold the address range of the
9075 trampoline used by the tracepoint.
9076 (trampoline_buffer_head): New static variable.
9077 (trampoline_buffer_tail): Ditto.
9078 (claim_trampoline_space): New function.
9079 (have_fast_tracepoint_trampoline_buffer): New function.
9080 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9081 structure.
9082 (install_fast_tracepoint): Ditto, also add error buffer argument.
9083 (cmd_qtminftpilen): New function.
9084 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9085 (fast_tracepoint_from_trampoline_address): New function.
9086 (fast_tracepoint_collecting): Handle trampoline as part of jump
9087 pad space.
9088 (set_trampoline_buffer_space): New function.
9089 (initialize_tracepoint): Initialize new IPA variables.
9090 * target.h (struct target_ops): Add arguments to
9091 install_fast_tracepoint_jump_pad operation, add new
9092 get_min_fast_tracepoint_insn_len operation.
9093 (target_get_min_fast_tracepoint_insn_len): New.
9094 (install_fast_tracepoint_jump_pad): Add arguments.
9095 * server.h (IPA_BUFSIZ): Define.
9096 * linux-i386-ipa.c: Include extra header files.
9097 (initialize_fast_tracepoint_trampoline_buffer): New function.
9098 (initialize_low_tracepoint): Call it.
9099 * server.h (set_trampoline_buffer_space): Declare.
9100 (claim_trampoline_space): Ditto.
9101 (have_fast_tracepoint_trampoline_buffer): Ditto.
9102
1e4d1764
YQ
91032011-11-14 Yao Qi <yao@codesourcery.com>
9104
9105 * server.c (handle_query): Handle InstallInTrace for qSupported.
9106 * tracepoint.c (add_tracepoint): Sort list.
9107 (install_tracepoint, download_tracepoint): New.
9108 (cmd_qtdp): Call them to install and download tracepoints.
9109 (sort_tracepoints): Removed.
9110 (cmd_qtstart): Update.
9111
5c73ff4e
YQ
91122011-11-14 Yao Qi <yao@codesourcery.com>
9113
9114 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9115 * mem-break.h: Declare.
9116 * tracepoint.c (cmd_qtstart): Move some code to ...
9117 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9118 New.
9119 (download_tracepoints): Move some code to ...
9120 (download_tracepoint_1): ... here. New.
9121
86a30030
YQ
91222011-11-08 Yao Qi <yao@codesourcery.com>
9123
9124 * remote-utils.c (relocate_instruction): A comment fix.
9125
8d26e50c
JB
91262011-11-07 Joel Brobecker <brobecker@adacore.com>
9127
9128 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9129 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9130 dr_status_mirror and dr_control_mirror from debug_reg_state.
9131 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9132 (i386_initial_stuff): Remove use of deleted globals.
9133 (i386_get_thread_context, i386_set_thread_context,
9134 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9135 from debug_reg_state.
9136
a59306a3
YQ
91372011-11-05 Yao Qi <yao@codesourcery.com>
9138
9139 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9140 address as TPOINT's.
9141
3065dfb6
SS
91422011-11-02 Stan Shebs <stan@codesourcery.com>
9143
9144 * tracepoint.c (agent_mem_read_string): New function.
9145 (eval_agent_expr): Call it for tracenz.
9146 * server.c (handle_query): Report support for tracenz.
9147
fd0d8c7c
YQ
91482011-11-02 Yao Qi <yao@codesourcery.com>
9149
9150 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9151
609086b1
YQ
91522011-11-02 Yao Qi <yao@codesourcery.com>
9153
9154 * target.h: Fix a typo in comment.
9155
b9fd1791
PA
91562011-10-31 Pedro Alves <pedro@codesourcery.com>
9157
9158 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9159 clobber the breakpoints' shadows with fast tracepoint jumps.
9160 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9161 * target.c (write_inferior_memory): Also pass MYADDR down to
9162 check_mem_write.
9163
03583c20
UW
91642011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9165
9166 * configure.ac: Check support for personality routine.
9167 * configure: Regenerate.
9168 * config.in: Likewise.
9169 * linux-low.c: Include <sys/personality.h>.
9170 Define ADDR_NO_RANDOMIZE if necessary.
9171 (linux_create_inferior): Disable address space randomization when
9172 forking inferior, if requested.
9173 (linux_supports_disable_randomization): New function.
9174 (linux_target_ops): Install it.
9175 * server.h (disable_randomization): Declare.
9176 * server.c (disable_randomization): New global variable.
9177 (handle_general_set): Handle QDisableRandomization.
9178 (handle_query): Likewise for qSupported.
9179 (main): Support --disable-randomization and --no-disable-randomization
9180 command line arguments.
9181 * target.h (struct target_ops): Add supports_disable_randomization.
9182 (target_supports_disable_randomization): New macro.
9183
723b724b
MF
91842011-09-29 Mike Frysinger <vapier@gentoo.org>
9185
9186 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9187 ifdef check.
9188 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9189 [!PT_GETDSBT] (target_loadmap): New definition.
9190 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9191 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9192 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9193 and PT_GETDSBT to LINUX_LOADMAP.
9194 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9195 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9196
55329a5c 91972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9198
9199 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9200 (arm_linux_hwbp_cap): New static variable.
9201 (arm_linux_get_hwbp_cap): Replace by ...
9202 (arm_linux_init_hwbp_cap): ... this new function.
9203 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9204 (arm_linux_get_hw_watchpoint_count): Likewise.
9205 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9206 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9207 (arm_prepare_to_resume): Use perror_with_name instead of error.
9208
55329a5c 92092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9210
9211 * linux-arm-low.c: Include <signal.h>.
9212 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9213 (struct arm_linux_hwbp_cap): New data type.
9214 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9215 (struct arm_linux_hw_breakpoint): New data type.
9216 (MAX_BPTS, MAX_WPTS): Define.
9217 (struct arch_process_info, struct arch_lwp_info): New data types.
9218 (arm_linux_get_hwbp_cap): New function.
9219 (arm_linux_get_hw_breakpoint_count): Likewise.
9220 (arm_linux_get_hw_watchpoint_count): Likewise.
9221 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9222 (arm_hwbp_control_initialize): Likewise.
9223 (arm_hwbp_control_is_enabled): Likewise.
9224 (arm_hwbp_control_is_initialized): Likewise.
9225 (arm_hwbp_control_disable): Likewise.
9226 (arm_linux_hw_breakpoint_equal): Likewise.
9227 (arm_linux_hw_point_initialize): Likewise.
9228 (struct update_registers_data): New data structure.
9229 (update_registers_callback: New function.
9230 (arm_insert_point): Likewise.
9231 (arm_remove_point): Likewise.
9232 (arm_stopped_by_watchpoint): Likewise.
9233 (arm_stopped_data_address): Likewise.
9234 (arm_new_process): Likewise.
9235 (arm_new_thread): Likewise.
9236 (arm_prepare_to_resume): Likewise.
9237 (the_low_target): Register arm_insert_point, arm_remove_point,
9238 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9239 arm_new_thread, and arm_prepare_to_resume.
9240
6b9801d4
SS
92412011-09-15 Stan Shebs <stan@codesourcery.com>
9242
9243 * server.h (struct emit_ops): Add compare-goto fields.
9244 * tracepoint.c (gdb_agent_op_sizes): New table.
9245 (emit_eq_goto): New function.
9246 (emit_ne_goto): New function.
9247 (emit_lt_goto): New function.
9248 (emit_le_goto): New function.
9249 (emit_gt_goto): New function.
9250 (emit_ge_goto): New function.
9251 (is_goto_target): New function.
9252 (compile_bytecodes): Recognize special cases of compare-goto
9253 combinations and call specialized emitters for them.
9254 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9255 (amd64_emit_ne_goto): New function.
9256 (amd64_emit_lt_goto): New function.
9257 (amd64_emit_le_goto): New function.
9258 (amd64_emit_gt_goto): New function.
9259 (amd64_emit_ge_goto): New function.
9260 (amd64_emit_ops): Add the new functions.
9261 (i386_emit_eq_goto): New function.
9262 (i386_emit_ne_goto): New function.
9263 (i386_emit_lt_goto): New function.
9264 (i386_emit_le_goto): New function.
9265 (i386_emit_gt_goto): New function.
9266 (i386_emit_ge_goto): New function.
9267 (i386_emit_ops): Add the new functions.
9268
bf15cbda
SS
92692011-09-08 Stan Shebs <stan@codesourcery.com>
9270
9271 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9272 (i386_emit_epilogue): Restore %ebx.
9273
943ca1dd
JZ
92742011-08-31 Jie Zhang <jzhang918@gmail.com>
9275
9276 * server.c (step_thread): Remove definition.
9277 (process_serial_event): Don't handle Hs.
9278 * server.h (step_thread): Remove declaration.
9279 * target.c (set_desired_inferior): Remove use of step_thread.
9280
e3deef73
LM
92812011-08-24 Luis Machado <lgustavo@codesourcery.com>
9282
9283 * linux-low.c: Include linux-procfs.h.
9284 (linux_attach_lwp_1): Update comments.
9285 (linux_attach): Scan for existing threads when attaching to a
9286 process that is the tgid.
9287 * Makefile.in: Update dependencies.
9288
13da1c97
LM
92892011-08-24 Luis Machado <lgustavo@codesourcery.com>
9290
9291 * configure.srv: Add linux-procfs.o dependencies.
9292
881127c9
YQ
92932011-08-14 Yao Qi <yao@codesourcery.com>
9294
9295 * target.h (struct target_ops): Fix indent.
9296 * win32-low.c (win32_target_ops): Fix comment.
9297
58dbd541
YQ
92982011-08-14 Andrew Jenner <andrew@codesourcery.com>
9299 Yao Qi <yao@codesourcery.com>
9300
9301 * Makefile.in (clean): Remove tic6x-*.c files.
9302 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9303 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9304 (tic6x-c64xp-linux.c): Likewise.
9305 * configure.srv: Add support for tic6x-*-uclinux.
9306 * linux-tic6x-low.c: New.
9307 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9308
78d85199
YQ
93092011-08-14 Andrew Stubbs <ams@codesourcery.com>
9310 Yao Qi <yao@codesourcery.com>
9311
9312 * target.h (struct target_ops): Add read_loadmap.
9313 * linux-low.c (struct target_loadseg): New type.
9314 (struct target_loadmap): New type.
9315 (linux_read_loadmap): New function.
9316 (linux_target_ops): Add linux_read_loadmap.
9317 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9318 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9319 to NULL.
78d85199 9320
a959a88d
EZ
93212011-08-05 Eli Zaretskii <eliz@gnu.org>
9322
9323 * win32-low.c: Include <stdint.h>.
9324
1ced966e
PA
93252011-07-22 Pedro Alves <pedro@codesourcery.com>
9326
9327 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9328 to the inferior here.
9329 (i386_remove_aligned_watchpoint): Ditto.
9330 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9331 fit part of the watchpoint in the debug registers.
9332 (i386_update_inferior_debug_regs): New.
9333 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9334 registers, and only update the inferior on success.
9335 (i386_low_remove_watchpoint): Ditto.
9336
d26e3629
KY
93372011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9338
9339 * linux-low.c (compare_ints, unique, list_threads, show_process,
9340 linux_core_of_thread): Delete.
9341 (linux_target_ops): Change linux_core_of_thread to
9342 linux_common_core_of_thread.
9343 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9344 * utils.c (malloc_failure): Change type of argument.
9345 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9346 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9347 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9348 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9349 (IPA_OBJS): Add common-utils-ipa.o.
9350 (ptid_h, linux_osdata_h): New macros.
9351 (server_h): Add common/common-utils.h, common/xml-utils.h,
9352 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9353 common/ptid.h.
9354 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9355 ptid.o, buffer.o): New rules.
9356 (linux-low.o): Add common/linux-osdata.h as a dependency.
9357 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9358 * configure.ac: Add AC_HEADER_DIRENT check.
9359 * config.in: Regenerate.
9360 * configure: Regenerate.
9361 * remote-utils.c (xml_escape_text): Delete.
9362 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9363 buffer_xml_printf): Move to common/buffer.c.
9364 * server.c (main): Remove call to initialize_inferiors.
9365 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9366 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9367 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9368 internal_error, gdb_assert, gdb_assert_fail): Delete.
9369 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9370 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9371 common/buffer.h.
9372 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9373 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9374 initialize_inferiors): Delete.
9375
2275a1a7
PA
93762011-07-20 Pedro Alves <pedro@codesourcery.com>
9377
9378 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9379 symbol error.
9380
0a5b1e09
PA
93812011-05-31 Pedro Alves <pedro@codesourcery.com>
9382
9383 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9384 assertion.
9385 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9386
6938fd34
YQ
93872011-05-26 Yao Qi <yao@codesourcery.com>
9388
9389 * Makefile.in (thread-db.o): Track dependence to
9390 common/gdb_thread_db.h.
9391 * thread-db.c: include gdb_thread_db.h from right place.
9392
b481f9e0
TT
93932011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9394
9395 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9396 __FILE__ and __LINE__ to internal_error.
9397
98a5dd13
DE
93982011-05-13 Doug Evans <dje@google.com>
9399
9400 * thread-db.c (try_thread_db_load_from_sdir): New function.
9401 (try_thread_db_load_from_dir): New function.
9402 (thread_db_load_search): Handle $sdir, ignore $pdir.
9403 Remove trying of system directories if search of
9404 libthread-db-search-path fails, that is now done via $sdir.
9405
d248b706
KY
94062011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9407
9408 * server.c (handle_query): Add EnableDisableTracepoints to the list
9409 of supported features.
43aaf8b6 9410 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9411 tracepoints.
43aaf8b6
PA
9412 (cmd_qtenable_disable): New.
9413 (cmd_qtstart): Install tracepoints even if disabled.
9414 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9415 receiving a QTEnable or QTDisable packet.
9416 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9417 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9418 tracepoints.
9419 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9420
84e578fb
DE
94212011-05-10 Doug Evans <dje@google.com>
9422
9423 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9424
71f55dd8
DE
94252011-05-04 Doug Evans <dje@google.com>
9426
9427 * linux-low.c (linux_join): Skip process lookup.
9428 * spu-low.c (spu_join): Ditto.
9429 * server.c (join_inferiors_callback): Delete.
9430 (process_serial_event): For 'D' packet (detach) call join_inferior
9431 directly.
9432
4d393d60
JM
94332011-05-04 Joseph Myers <joseph@codesourcery.com>
9434
9435 * README: Don't mention xscale*-*-linux*.
9436 * configure.srv (xscale*-*-linux*): Don't handle target.
9437
b00ad6ff
NF
94382011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9439
9440 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9441 casting pointers.
9442 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9443 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9444 (i386_emit_void_call_2): Likewise.
9445
af96c192
YQ
94462011-04-26 Yao Qi <yao@codesourcery.com>
9447
43aaf8b6
PA
9448 * linux-low.c: Move common macros to linux-ptrace.h.
9449 Include linux-ptrace.h.
af96c192
YQ
9450 * Makefile.in (linux_ptrace_h): New.
9451 (linux-low.o): Depends on linux-ptrace.h.
9452
03f2bd59
JK
94532011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9454
9455 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9456 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9457 (remote_prepare): New function with most of the TCP code from ...
9458 (remote_open): ... here. Detect PORT here unconditionally. Move also
9459 setting transport_is_reliable.
9460 * server.c (run_once): New variable.
9461 (gdbserver_usage): Document it.
9462 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9463 the first run if RUN_ONCE.
9464 * server.h (run_once, remote_prepare): New declarations.
9465
7a9dd1b2
TT
94662011-04-19 Tom Tromey <tromey@redhat.com>
9467
9468 * win32-low.c (handle_load_dll): Remove duplicate "the".
9469
81239425
PM
94702011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9471
9472 Remove support for old Cygwin 1.5 versions.
9473 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9474 function to avoid warning.
9475 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9476 warning.
9477
9e0627f1
PM
94782011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9479
9480 * gdbserver/server.h (Macro _): Define it if not available.
9481
588eebee
MS
94822011-03-14 Michael Snyder <msnyder@vmware.com>
9483
348af9f7 9484 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9485
43f70d4c
JB
94862011-03-10 Joel Brobecker <brobecker@adacore.com>
9487
9488 * Makefile.in (maintainer-clean realclean distclean): Remove
9489 "make ... subdir_do" command.
9490
348af9f7
MS
94912011-03-10 Michael Snyder <msnyder@vmware.com>
9492
9493 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9494
9495 * server.c (handle_v_run): Free alloced buffer on early return.
9496
e637a4f5
YQ
94972011-03-09 Yao Qi <yao@codesourcery.com>
9498
9499 Revert:
9500 2011-03-04 Yao Qi <yao@codesourcery.com>
9501
9502 * Makefile.in: Remove GNU make feature --directory.
9503
9504 2011-03-05 Yao Qi <yao@codesourcery.com>
9505
9506 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9507 (subdir_do): New make target. Copied from gdb/Makefile.
9508 (maintainer-clean, realclean, distclean, clean): Call corresponding
9509 make targets in common/Makefile.
9510
9511 2011-02-11 Yao Qi <yao@codesourcery.com>
9512
9513 * configure.ac: Call AC_PROG_RANLIB.
9514 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9515 * configure: Regenerate.
9516
e6edda56
JK
95172011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9518
9519 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9520
e5141119
JB
95212011-03-06 Yao Qi <yao@codesourcery.com>
9522
9523 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9524
64794aa4
JB
95252011-03-05 Yao Qi <yao@codesourcery.com>
9526
9527 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9528 (subdir_do): New make target. Copied from gdb/Makefile.
9529 (maintainer-clean, realclean, distclean, clean): Call corresponding
9530 make targets in common/Makefile.
9531
7a762829
YQ
95322011-03-04 Yao Qi <yao@codesourcery.com>
9533
9534 * Makefile.in: Remove GNU make feature --directory.
9535
348af9f7
MS
95362011-03-04 Michael Snyder <msnyder@vmware.com>
9537
9538 * server.c (queue_stop_reply): Call xmalloc not malloc.
9539
95402011-03-02 Michael Snyder <msnyder@vmware.com>
9541
9542 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9543
9f72fee2
MS
95442011-02-28 Michael Snyder <msnyder@vmware.com>
9545
588eebee
MS
9546 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9547 (cmd_qtframe): Ditto.
9548 (cmd_qtbuffer): Ditto.
9549 (cmd_bigqtbuffer): Ditto.
9550
9f72fee2
MS
9551 * utils.c (decimal2str): Initialize 'width' to nine, then
9552 don't mess with it.
9553
8040bd49
UW
95542011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9555
9556 * hostio.c (require_data): Free *data, not data.
9557
7e52cbd0
JK
95582011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9559
9560 * hostio.c (require_data): Use free, not xfree.
9561
9130f83e
MS
95622011-02-27 Michael Snyder <msnyder@vmware.com>
9563
4b812f4e
MS
9564 * server.c (handle_query): Discard unused value.
9565
9130f83e
MS
9566 * hostio.c (require_data): Free malloc memory before returning
9567 error.
9568
69d37113
MS
95692011-02-26 Michael Snyder <msnyder@vmware.com>
9570
9571 * linux-low.c (list_threads): Call closedir for dirent.
9572
35f5825a
MS
95732011-02-27 Michael Snyder <msnyder@vmware.com>
9574
2a589cef
MS
9575 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9576 a case statement falls through.
9577
0adea5f7
MS
9578 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9579
35f5825a
MS
9580 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9581 in comparison.
9582
238f1c74
MS
95832011-02-26 Michael Snyder <msnyder@vmware.com>
9584
9585 * utils.c (decimal2str): Eliminate dead code and dead param.
9586 (pulongest): Drop dead param from call to decimal2str.
9587 (plongest): Ditto.
9588
633ff500
JB
95892011-02-24 Joel Brobecker <brobecker@adacore.com>
9590
9591 Revert the following patch (not approved yet):
9592 2011-02-21 Hui Zhu <teawater@gmail.com>
9593 * tracepoint.c (tp_printf): New function.
9594 (eval_agent_expr): Handle gdb_agent_op_printf.
9595
f9c6ff72
HZ
95962011-02-21 Hui Zhu <teawater@gmail.com>
9597
9598 * tracepoint.c (tp_printf): New function.
9599 (eval_agent_expr): Handle gdb_agent_op_printf.
9600
94d5e490
TT
96012011-02-18 Tom Tromey <tromey@redhat.com>
9602
9603 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9604 (tracepoint.o): Likewise.
9605 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9606 (gdb_agent_op_names): Likewise.
9607
c7f96d2b
TT
96082011-02-18 Tom Tromey <tromey@redhat.com>
9609
9610 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9611 gdb_agent_op_rot>: New constants.
9612 (gdb_agent_op_names): Add pick and roll.
9613 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9614 cases.
9615
0feedb2c
JK
96162011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9617
9618 * aclocal.m4: Regenerated with aclocal-1.11.1.
9619
b3b9301e
PA
96202011-02-14 Pedro Alves <pedro@codesourcery.com>
9621
9622 * server.c (handle_qxfer_traceframe_info): New.
9623 (qxfer_packets): Register "traceframe-info".
9624 (handle_query): Report support for qXfer:traceframe-info:read+.
9625 * tracepoint.c (match_blocktype): New.
9626 (traceframe_find_block_type): Rename to ...
9627 (traceframe_walk_blocks): ... this. Add callback filter argument,
9628 and use it.
9629 (traceframe_find_block_type): New, reimplemented on top of
9630 traceframe_walk_blocks.
9631 (build_traceframe_info_xml): New.
9632 (traceframe_read_info): New.
9633 * server.h (traceframe_read_info): Declare.
9634
4f3e6fb7
YQ
96352011-02-11 Yao Qi <yao@codesourcery.com>
9636
9637 * configure.ac: Call AC_PROG_RANLIB.
9638 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9639 * configure: Regenerate.
9640
764880b7
PA
96412011-02-07 Pedro Alves <pedro@codesourcery.com>
9642
9643 * server.c (gdb_read_memory): Change return semantics to allow
9644 partial transfers.
9645 (handle_search_memory_1): Adjust.
9646 (process_serial_event) <'m' packet>: Handle partial transfers.
9647 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9648
1c79eb8a
PA
96492011-01-28 Pedro Alves <pedro@codesourcery.com>
9650
9651 * regcache.c (init_register_cache): Initialize
9652 regcache->register_status.
9653 (free_register_cache): Release regcache->register_status.
9654 (regcache_cpy): Copy register_status.
9655 (registers_to_string): Print 'x's for unavailable registers.
9656 (supply_register): Mark the register's status valid or
9657 unavailable, depending on whether a buffer was passed in or not.
9658 (supply_register_zeroed): New.
9659 (supply_regblock): Mark the registers' status valid or
9660 unavailable, depending on whether a buffer was passed in or not.
9661 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9662 (struct regcache): New `register_status' field.
9663 (supply_register_zeroed): Declare.
9664 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9665 supply_register_zeroed, rather than passing a NULL buffer to
9666 supply_register.
9667 * tracepoint.c (fetch_traceframe_registers): Update comment.
9668
85724a0e
PA
96692011-01-28 Pedro Alves <pedro@codesourcery.com>
9670
9671 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9672 buffer explicit.
9673
d08aafef
PA
96742011-01-25 Pedro Alves <pedro@codesourcery.com>
9675
9676 * server.h (decode_xfer_write): Change prototype.
9677 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9678 and don't extract the annex here.
9679 * server.c (decode_xfer_read): Remove `annex' parameter,
9680 and don't extract the annex here.
9681 (decode_xfer): New.
9682 (struct qxfer): New.
9683 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9684 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9685 (handle_qxfer_statictrace): New functions, abstracted out from
9686 handle_query, and made to use the struct qxfer interface.
9687 (handle_threads_qxfer_proper): Rename to ...
9688 (handle_qxfer_threads_proper): ... this.
9689 (handle_threads_qxfer): Rename to ...
9690 (handle_qxfer_threads): ... this. Adjust.
9691 (qxfer_packets): New array.
9692 (handle_qxfer): New function.
9693 (handle_query): Use handle_qxfer.
9694
493e2a69
MS
96952011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9696
9697 * gdbreplay.c: Shorten lines of >= 80 columns.
9698 * linux-low.c: Ditto.
9699 * linux-ppc-low.c: Ditto.
9700 * linux-s390-low.c: Ditto.
9701 * linux-sparc-low.c: Ditto.
9702 * linux-x86-low.c: Ditto.
9703 * linux-xtensa-low.c: Ditto.
9704 * mem-break.c: Ditto.
9705 * nto-low.c: Ditto.
9706 * regcache.h: Ditto.
9707 * remote-utils.c: Ditto.
9708 * server.c: Ditto.
9709 * server.h: Ditto.
9710 * thread-db.c: Ditto.
9711 * tracepoint.c: Ditto.
9712 * utils.c: Ditto.
9713 * win32-low.h: Ditto.
9714
44944448
JB
97152011-01-05 Joel Brobecker <brobecker@adacore.com>
9716
9717 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9718 update.
9719
71ce852c
JB
97202011-01-01 Joel Brobecker <brobecker@adacore.com>
9721
9722 * server.c (gdbserver_version): Update copyright year in version
9723 output.
9724 * gdbreplay.c (gdbreplay_version): Ditto.
9725
eb826dc6
MF
97262010-12-29 Jie Zhang <jie.zhang@analog.com>
9727
9728 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9729 * linux-bfin-low.c: New file.
9730 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9731 PT_DATA_ADDR for BFIN targets.
9732 * Makefile.in (SFILES): Add linux-bfin-low.c.
9733 (clean): Remove reg-bfin.c.
9734 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9735 * README: Mention supported Blackfin targets.
9736
39ab222a
MF
97372010-12-23 Mike Frysinger <vapier@gentoo.org>
9738
9739 * .gitignore: New file.
9740
a1f2ce7d
MF
97412010-11-16 Mike Frysinger <vapier@gentoo.org>
9742
9743 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9744
f474844c
JZ
97452010-10-22 Jie Zhang <jie@codesourcery.com>
9746
9747 * Makefile.in: Add FLAGS_TO_PASS variable.
9748 (install): Remove dependency of install-only and recursively
9749 invoke make for install-only.
9750
f1048712
DE
97512010-10-04 Doug Evans <dje@google.com>
9752
9753 * Makefile.in (uninstall): Use $(DESTDIR).
9754
b53a1623
PA
97552010-09-24 Pedro Alves <pedro@codesourcery.com>
9756
e6ee044d
PA
9757 PR gdb/11842
9758
b53a1623
PA
9759 * linux-x86-low.c (compat_siginfo_from_siginfo)
9760 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9761 si_code is < 0. Check for si_code == SI_TIMER before checking for
9762 si_code < 0.
9763
fa1bd1e4
JB
97642010-09-13 Joel Brobecker <brobecker@adacore.com>
9765
9766 * lynx-i386-low.c: New file.
9767 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9768
47fac8f8
JB
97692010-09-13 Joel Brobecker <brobecker@adacore.com>
9770
9771 * lynx-low.c (ptrace_request_to_str): Remove handling for
9772 request values that have been removed in LynxOS 5.x.
9773
1adfc54d
JB
97742010-09-13 Joel Brobecker <brobecker@adacore.com>
9775
9776 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9777 <ptrace.h>
9778
c2a66c29
NS
97792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9780
9781 * configure.ac: Add --enable-inprocess-agent option.
9782 * configure: Rebuilt.
9783
32fcada3
YQ
97842010-09-06 Yao Qi <yao@codesourcery.com>
9785
9786 * linux-low.c (linux_kill): Remove unused variable.
9787 (linux_stabilize_threads): Likewise.
9788 * server.c (start_inferior): Likewise.
9789 (queue_stop_reply_callback): Likewise.
9790 * tracepoint.c (do_action_at_tracepoint): Likewise.
9791
0cccb683
YQ
97922010-09-06 Yao Qi <yao@codesourcery.com>
9793
9794 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9795 on return.
9796
423ec54c
JK
97972010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9798
9799 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9800
12ac6819
PA
98012010-09-06 Pedro Alves <pedro@codesourcery.com>
9802
9803 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9804 "$(IPA_DEPFILES)".
9805
8ed54b31
JB
98062010-09-01 Joel Brobecker <brobecker@adacore.com>
9807
9808 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9809 gdbserver/lynx-ppc-low.c: New files.
9810 * Makefile.in (lynx_low_h): New variable.
9811 (lynx-low.o, lynx-ppc-low.o): New rules.
9812 * configure.ac: On LynxOS, link with -lnetinet.
9813 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9814 * configure: regenerate.
9815
bb0116a4
JB
98162010-09-01 Joel Brobecker <brobecker@adacore.com>
9817
9818 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9819 * configure.ac: Add check for vasprintf and vsnprintf.
9820 * configure, config.in: Regenerate.
9821 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9822
a778ab81 98232010-09-01 Joel Brobecker <brobecker@adacore.com>
9824
9825 * gdbreplay.c: Move include of alloca.h up, next to include of
9826 malloc.h.
9827 * server.h: Add include of malloc.h.
9828 * mem-break.c: Remove include of malloc.h.
9829 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9830
8b034a19 98312010-09-01 Joel Brobecker <brobecker@adacore.com>
9832
9833 * Makefile.in (memmem.o): Build with -Wno-error.
9834
98352010-09-01 Joel Brobecker <brobecker@adacore.com>
9836
9837 * utils.c (xsnprintf): Make non-static.
9838 * server.h: Add xsnprintf declaration.
9839 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9840 replace calls to snprintf by calls to xsnprintf throughout.
9841
98422010-09-01 Joel Brobecker <brobecker@adacore.com>
9843
9844 * configure.ac: Add configure check for alloca.
9845 * configure, config.in: Regenerate.
9846 * server.h: Include alloca.h if it exists.
9847 * gdbreplay.c: Include alloca.h if it exists.
9848
1a981360
PA
98492010-08-28 Pedro Alves <pedro@codesourcery.com>
9850
9851 * linux-low.c (__SIGRTMIN): Define if not already defined.
9852 (linux_create_inferior): Check for __ANDROID__ rather than
9853 __SIGRTMIN.
9854 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9855 are already deferred.
9856 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9857 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9858 stopped and already has a pending signal to report.
9859 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9860 a pending signal to report or is moving out of a jump pad.
9861 (linux_init_signals): Check for __ANDROID__ rather than
9862 __SIGRTMIN.
9863
b4d51a55
PA
98642010-08-28 Pedro Alves <pedro@codesourcery.com>
9865
9866 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9867 debug_threads check. Avoid a linear search when not doing debug
9868 output.
9869
ec48365d
PA
98702010-08-27 Pedro Alves <pedro@codesourcery.com>
9871
9872 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9873 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9874 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9875 (process_event): Change local fd's type to gdb_fildes_t.
9876 (create_file_handler): Adjust prototype.
9877 (delete_file_handler): Adjust prototype.
9878 (handle_file_event): Adjust prototype. Use pfildes.
9879 (create_file_event): Adjsut prototype.
9880 * remote-utils.c (remote_desc, listen_desc): Change type to
9881 gdb_fildes_t.
9882 * server.h: New gdb_fildes_t typedef.
9883 [USE_WIN32API]: Include winsock2.h.
9884 (delete_file_handler, add_file_handler): Adjust prototypes.
9885 (pfildes): Declare.
9886 * utils.c (pfildes): New.
9887
854d88f0
PA
98882010-08-27 Pedro Alves <pedro@codesourcery.com>
9889
9890 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9891 * configure: Regenerate.
9892
0146f85b
PA
98932010-08-27 Pedro Alves <pedro@codesourcery.com>
9894
9895 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9896 (linux_done_accessing_memory): ... this.
9897 (linux_target_ops): Adjust.
9898 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9899 * nto-low.c (nto_target_ops): Adjust comment.
9900 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9901 * spu-low.c (spu_target_ops): Adjust comment.
9902 * target.h (target_ops): Rename unprepare_to_access_memory field
9903 to done_accessing_memory.
9904 (unprepare_to_access_memory): Rename to ...
9905 (done_accessing_memory): ... this.
9906
90d74c30
PA
99072010-08-26 Pedro Alves <pedro@codesourcery.com>
9908
9909 * linux-low.c (linux_prepare_to_access_memory): New.
9910 (linux_unprepare_to_access_memory): New.
9911 (linux_target_ops): Install them.
9912 * server.c (read_memory): Rename to ...
9913 (gdb_read_memory): ... this. Use
9914 prepare_to_access_memory/prepare_to_access_memory.
9915 (write_memory): Rename to ...
9916 (gdb_write_memory): ... this. Use
9917 prepare_to_access_memory/prepare_to_access_memory.
9918 (handle_search_memory_1): Adjust.
9919 (process_serial_event): Adjust.
9920 * target.h (struct target_ops): New fields
9921 prepare_to_access_memory and unprepare_to_access_memory.
9922 (prepare_to_access_memory, unprepare_to_access_memory): New.
9923 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9924 prepare_to_access_memory/prepare_to_access_memory.
9925 * nto-low.c (nto_target_ops): Adjust.
9926 * spu-low.c (spu_target_ops): Adjust.
9927 * win32-low.c (win32_target_ops): Adjust.
9928
fd467969
PA
99292010-08-26 Pedro Alves <pedro@codesourcery.com>
9930
9931 * Makefile.in (WARN_CFLAGS): Get it from configure.
9932 (WERROR_CFLAGS): New.
9933 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9934 * configure.ac: Introduce --enable-werror, which adds -Werror to
9935 the compiler command line. Enabled by default. Disable with
9936 --disable-werror. Add -Wdeclaration-after-statement
9937 Wpointer-arith and -Wformat-nonliteral to warning flags.
9938 * configure: Regenerate.
9939
331e2f5f
PA
99402010-08-26 Pedro Alves <pedro@codesourcery.com>
9941
9942 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9943
e581f2b4
PA
99442010-08-26 Pedro Alves <pedro@codesourcery.com>
9945
9946 * gdbreplay.c (remote_error): New.
9947 (gdbchar): New.
9948 (expect): Use gdbchar. Check for error reading from GDB.
9949 Clarify sync error output.
9950 (play): Check for errors writing to GDB.
9951 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9952 * remote-utils.c (getpkt): Check for errors writing to the remote
9953 descriptor.
9954
3c11dd79
PA
99552010-08-25 Pedro Alves <pedro@codesourcery.com>
9956
9957 * linux-low.c (linux_wait_1): Move non-debugging code out of
9958 `debug_threads' control.
9959
d20a8ad9
PA
99602010-08-25 Pedro Alves <pedro@codesourcery.com>
9961
9962 * linux-low.c (linux_wait_1): Don't set last_status here.
9963 * server.c (push_event, queue_stop_reply_callback): Assert we're
9964 not pushing a TARGET_WAITKIND_IGNORE event.
9965 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9966 (myresume, handle_target_event): Set the thread's last_resume_kind
9967 and last_status from the target returned status.
9968
964e4306
PA
99692010-08-25 Pedro Alves <pedro@codesourcery.com>
9970
9971 PR threads/10729
9972
9973 * linux-x86-low.c (update_debug_registers_callback): New.
9974 (i386_dr_low_set_addr): Use it.
9975 (i386_dr_low_get_addr): New.
9976 (i386_dr_low_set_control): Use update_debug_registers_callback.
9977 (i386_dr_low_get_control): New.
9978 (i386_dr_low_get_status): Adjust.
9979 * linux-low.c (linux_stop_lwp): New.
9980 * linux-low.h (linux_stop_lwp): Declare.
9981
9982 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9983 argument instead of a i386_debug_reg_state.
9984 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9985 a i386_debug_reg_state.
9986 (i386_insert_aligned_watchpoint): Adjust.
9987 (i386_remove_aligned_watchpoint): Adjust.
9988 (i386_low_stopped_data_address): Read the debug registers from the
9989 inferior instead of from the mirrors.
9990 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9991 (i386_dr_low_get_addr): Declare.
9992 (i386_dr_low_get_control): Declare.
9993 (i386_dr_low_get_status): Change prototype.
9994
9995 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9996 (i386_dr_low_get_addr): New.
9997 (i386_dr_low_get_control): New.
9998 (i386_dr_low_get_status): Adjust prototype. Return
9999 dr_status_mirror.
10000 (i386_initial_stuff): Clear dr_status_mirror and
10001 dr_control_mirror.
10002 (i386_get_thread_context): Adjust.
10003 (i386_set_thread_context): Adjust.
10004 (i386_thread_added): Adjust.
10005
5f21a75b
PA
100062010-08-24 Pedro Alves <pedro@codesourcery.com>
10007
10008 * linux-low.h (linux_thread_area): Delete declaration.
10009
3e4c1235
TS
100102010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10011
10012 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10013 after its termination.
10014
1971b033
PA
100152010-08-09 Pedro Alves <pedro@codesourcery.com>
10016
10017 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10018 (gdb_wants_all_stopped): Delete.
10019 (linux_wait_1): Don't call them.
10020 * server.c (handle_v_cont): Tag all threads as want-stopped.
10021 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10022 stopped as "client-wants-stopped".
10023
310444ac
PA
100242010-07-31 Pedro Alves <pedro@codesourcery.com>
10025
10026 * Makefile.in (signals_h): New.
10027 (server_h): Depend on it.
10028 (server.o): Don't depend on $(signals_def).
10029 (signals.o): Depend on $(signals_def).
10030
a19cae16
JK
100312010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10032
10033 * Makefile.in (signals_def): New.
10034 (server_h): Append include/gdb/signals.h and signals_def.
10035 (server.o): Append signals_def.
10036
30d50328
JK
100372010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10038
10039 * server.c (handle_target_event): Use target_signal_to_host for
10040 resume_info.sig initialization.
10041 * target.h (struct thread_resume) <sig>: New comment.
10042
5c3216e2
OS
100432010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10044
c6f46ca0
OS
10045 * server.c (handle_query): strcpy() the returned string from paddress()
10046 instead of sprintf().
5c3216e2
OS
10047 * utils.c (paddress): Return phex_nz().
10048
6bd31874
JB
100492010-07-07 Joel Brobecker <brobecker@adacore.com>
10050
10051 * server.c (handle_v_cont): Call mourn_inferior if process
10052 just exited.
10053 (myresume): Likewise.
10054
0fb4aa4b
PA
100552010-07-01 Pedro Alves <pedro@codesourcery.com>
10056
10057 Static tracepoints, and integration with UST.
10058
10059 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10060 * mem-break.c (uninsert_all_breakpoints)
10061 (reinsert_all_breakpoints): New.
10062 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10063 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10064 (gdb_agent_ust_loaded, helper_thread_id)
10065 (gdb_agent_helper_thread_id): New macros.
10066 (struct ipa_sym_addresses): Add addr_ust_loaded,
10067 addr_helper_thread_id, addr_cmd_buf.
10068 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10069 (in_process_agent_loaded_ust): New.
10070 (write_e_ust_not_loaded): New.
10071 (maybe_write_ipa_ust_not_loaded): New.
10072 (struct collect_static_trace_data_action): New.
10073 (enum tracepoint_type) <static_tracepoint>: New.
10074 (struct tracepoint) <handle>: Mention static tracepoints.
10075 (struct static_tracepoint_ctx): New.
10076 (CMD_BUF_SIZE): New.
10077 (add_tracepoint_action): Handle static tracepoint actions.
10078 (unprobe_marker_at): New.
10079 (clear_installed_tracepoints): Handle static tracepoints.
10080 (cmd_qtdp): Handle static tracepoints.
10081 (probe_marker_at): New.
10082 (cmd_qtstart): Handle static tracepoints.
10083 (response_tracepoint): Handle static tracepoints.
10084 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10085 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10086 (get_context_regcache): Handle static tracepoints.
10087 (do_action_at_tracepoint): Handle static tracepoint actions.
10088 (traceframe_find_block_type): Handle static trace data blocks.
10089 (traceframe_read_sdata): New.
10090 (download_tracepoints): Download static tracepoint actions.
10091 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10092 (GDB_PROBE_NAME): New.
10093 (ust_ops): New.
10094 (GET_UST_SYM): New.
10095 (USTF): New.
10096 (dlsym_ust): New.
10097 (ust_marker_to_static_tracepoint): New.
10098 (gdb_probe): New.
10099 (collect_ust_data_at_tracepoint): New.
10100 (gdb_ust_probe): New.
10101 (UNIX_PATH_MAX, SOCK_DIR): New.
10102 (gdb_ust_connect_sync_socket): New.
10103 (resume_thread, stop_thread): New.
10104 (run_inferior_command): New.
10105 (init_named_socket): New.
10106 (gdb_ust_socket_init): New.
10107 (cstr_to_hexstr): New.
10108 (next_st): New.
10109 (first_marker, next_marker): New.
10110 (response_ust_marker): New.
10111 (cmd_qtfstm, cmd_qtsstm): New.
10112 (unprobe_marker_at, probe_marker_at): New.
10113 (cmd_qtstmat, gdb_ust_thread): New.
10114 (gdb_ust_init): New.
10115 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10116 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10117 (ST_REGENTRY): New.
10118 (x86_64_st_collect_regmap): New.
10119 (X86_64_NUM_ST_COLLECT_GREGS): New.
10120 (AMD64_RIP_REGNUM): New.
10121 (supply_static_tracepoint_registers): New.
10122 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10123 (ST_REGENTRY): New.
10124 (i386_st_collect_regmap): New.
10125 (i386_NUM_ST_COLLECT_GREGS): New.
10126 (supply_static_tracepoint_registers): New.
10127 * server.c (handle_query): Handle qXfer:statictrace:read.
10128 <qSupported>: Report support for StaticTracepoints, and
10129 qXfer:statictrace:read features.
10130 * server.h (traceframe_read_sdata)
10131 (supply_static_tracepoint_registers): Declare.
10132 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10133 (unpack_varlen_hex): Include in IPA build.
10134 * Makefile.in (ustlibs, ustinc): New.
10135 (IPA_OBJS): Add remote-utils-ipa.o.
10136 ($(IPA_LIB)): Link -ldl and -lpthread.
10137 (UST_CFLAGS): New.
10138 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10139 * config.in, configure: Regenerate.
10140
9e4344e5
PA
101412010-06-20 Ian Lance Taylor <iant@google.com>
10142 Pedro Alves <pedro@codesourcery.com>
10143
10144 * linux-x86-low.c (always_true): Delete.
10145 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10146 trying to fool the compiler with always_true.
10147
c6beb2cb
PA
101482010-06-20 Pedro Alves <pedro@codesourcery.com>
10149
10150 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10151 conditions in gdbserver.
10152
d2ed6730
UW
101532010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10154
10155 * spu-low.c (spu_read_memory): Wrap around local store limit.
10156 (spu_write_memory): Likewise.
10157
4e29fb54
PA
101582010-06-15 Pedro Alves <pedro@codesourcery.com>
10159
10160 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10161 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10162 LONGEST uses.
10163 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10164 uses.
10165 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10166 uses with LONGEST uses.
10167
6a271cae
PA
101682010-06-14 Stan Shebs <stan@codesourcery.com>
10169 Pedro Alves <pedro@codesourcery.com>
10170
10171 Bytecode compiler.
10172
10173 * linux-x86-low.c: Include limits.h.
10174 (add_insns): New.
10175 (always_true): New.
10176 (EMIT_ASM): New.
10177 (EMIT_ASM32): New.
10178 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10179 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10180 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10181 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10182 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10183 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10184 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10185 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10186 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10187 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10188 (amd64_emit_void_call_2): New.
10189 (amd64_emit_ops): New.
10190 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10191 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10192 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10193 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10194 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10195 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10196 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10197 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10198 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10199 (i386_emit_stack_adjust, i386_emit_int_call_1)
10200 (i386_emit_void_call_2): New.
10201 (i386_emit_ops): New.
10202 (x86_emit_ops): New.
10203 (the_low_target): Install x86_emit_ops.
10204 * server.h (struct emit_ops): New.
10205 (get_raw_reg_func_addr): Declare.
10206 (current_insn_ptr, emit_error): Declare.
10207 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10208 (set_trace_state_variable_value): New defines.
10209 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10210 addr_get_trace_state_variable_value and
10211 addr_set_trace_state_variable_value.
10212 (symbol_list): New fields for get_raw_reg,
10213 get_trace_state_variable_value and set_trace_state_variable_value.
10214 (condfn): New typedef.
10215 (struct tracepoint): New field `compiled_cond'.
10216 (do_action_at_tracepoint): Clear compiled_cond.
10217 (get_trace_state_variable_value, set_trace_state_variable_value):
10218 Export in the IPA.
10219 (condition_true_at_tracepoint): If there's a compiled condition,
10220 run that.
10221 (current_insn_ptr, emit_error): New globals.
10222 (struct bytecode_address): New.
10223 (get_raw_reg_func_addr): New.
10224 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10225 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10226 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10227 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10228 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10229 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10230 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10231 (compile_tracepoint_condition, compile_bytecodes): New.
10232 * target.h (emit_ops): Forward declare.
10233 (struct target_ops): New field emit_ops.
10234 (target_emit_ops): New.
10235 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10236 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10237 * linux-low.c (linux_emit_ops): New.
10238 (linux_target_ops): Install it.
10239 * linux-low.h (struct linux_target_ops): New field emit_ops.
10240
92b72907
UW
102412010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10242
10243 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10244 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10245
fa593d66
PA
102462010-06-01 Pedro Alves <pedro@codesourcery.com>
10247 Stan Shebs <stan@codesourcery.com>
10248
10249 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10250 (all): Depend on $(extra_libraries).
10251 (install-only): Install the IPA.
10252 (IPA_OBJS, IPA_LIB): New.
10253 (clean): Remove the IPA lib.
10254 (IPAGENT_CFLAGS): New.
10255 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10256 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10257 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10258 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10259 * configure.ac: Check for atomic builtins support in the compiler.
10260 (IPA_DEPFILES, extra_libraries): Define.
10261 * configure.srv (ipa_obj): Add description.
10262 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10263 (i[34567]86-*-linux*): Set ipa_obj.
10264 (x86_64-*-linux*): Set ipa_obj.
10265 * linux-low.c (stabilizing_threads): New.
10266 (supports_fast_tracepoints): New.
10267 (linux_detach): Stabilize threads before detaching.
10268 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10269 the lwp is either not stabilizing, or is moving out of a jump pad.
10270 (linux_fast_tracepoint_collecting): New.
10271 (maybe_move_out_of_jump_pad): New.
10272 (enqueue_one_deferred_signal): New.
10273 (dequeue_one_deferred_signal): New.
10274 (linux_wait_for_event_1): If moving out of a jump pad, defer
10275 pending signals to later.
10276 (linux_stabilize_threads): New.
10277 (linux_wait_1): Check if threads need moving out of jump pads, and
10278 do it if so.
10279 (stuck_in_jump_pad_callback): New.
10280 (move_out_of_jump_pad_callback): New.
10281 (lwp_running): New.
10282 (linux_resume_one_lwp): Handle moving out of jump pads.
10283 (linux_set_resume_request): Dequeue deferred signals.
10284 (need_step_over_p): Also step over fast tracepoint jumps.
10285 (start_step_over): Also uninsert fast tracepoint jumps.
10286 (finish_step_over): Also reinsert fast tracepoint jumps.
10287 (linux_install_fast_tracepoint_jump): New.
10288 (linux_target_ops): Install linux_stabilize_threads and
10289 linux_install_fast_tracepoint_jump_pad.
10290 * linux-low.h (linux_target_ops) <get_thread_area,
10291 install_fast_tracepoint_jump_pad>: New fields.
10292 (struct lwp_info) <collecting_fast_tracepoint,
10293 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10294 (linux_get_thread_area): Declare.
10295 * linux-x86-low.c (jump_insn): New.
10296 (x86_get_thread_area): New.
10297 (append_insns): New.
10298 (push_opcode): New.
10299 (amd64_install_fast_tracepoint_jump_pad): New.
10300 (i386_install_fast_tracepoint_jump_pad): New.
10301 (x86_install_fast_tracepoint_jump_pad): New.
10302 (the_low_target): Install x86_get_thread_area and
10303 x86_install_fast_tracepoint_jump_pad.
10304 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10305 (struct fast_tracepoint_jump): New.
10306 (fast_tracepoint_jump_insn): New.
10307 (fast_tracepoint_jump_shadow): New.
10308 (find_fast_tracepoint_jump_at): New.
10309 (fast_tracepoint_jump_here): New.
10310 (delete_fast_tracepoint_jump): New.
10311 (set_fast_tracepoint_jump): New.
10312 (uninsert_fast_tracepoint_jumps_at): New.
10313 (reinsert_fast_tracepoint_jumps_at): New.
10314 (set_breakpoint_at): Use write_inferior_memory.
10315 (uninsert_raw_breakpoint): Use write_inferior_memory.
10316 (check_mem_read): Mask out fast tracepoint jumps.
10317 (check_mem_write): Mask out fast tracepoint jumps.
10318 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10319 (set_fast_tracepoint_jump): Declare.
10320 (delete_fast_tracepoint_jump)
10321 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10322 (reinsert_fast_tracepoint_jumps_at): Declare.
10323 * regcache.c: Don't compile many functions when building the
10324 in-process agent library.
10325 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10326 the register buffer in the heap.
10327 (free_register_cache): If the register buffer isn't owned by the
10328 regcache, don't free it.
10329 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10330 pre-existing register caches.
10331 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10332 type.
10333 (convert_ascii_to_int): : Constify `from' parameter type.
10334 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10335 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10336 the needed buffer in-place.
10337 (relocate_instruction): New.
10338 * server.c (handle_query) <qSymbols>: If the target supports
10339 tracepoints, give it a chance of looking up symbols. Report
10340 support for fast tracepoints.
10341 (handle_status): Stabilize threads.
10342 (process_serial_event): Adjust.
10343 * server.h (struct fast_tracepoint_jump): Forward declare.
10344 (struct process_info) <fast_tracepoint_jumps>: New field.
10345 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10346 (decode_X_packet, decode_M_packet): Adjust.
10347 (relocate_instruction): Declare.
10348 (in_process_agent_loaded): Declare.
10349 (tracepoint_look_up_symbols): Declare.
10350 (struct fast_tpoint_collect_status): Declare.
10351 (fast_tracepoint_collecting): Declare.
10352 (force_unlock_trace_buffer): Declare.
10353 (handle_tracepoint_bkpts): Declare.
10354 (initialize_low_tracepoint)
10355 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10356 * target.h (struct target_ops) <stabilize_threads,
10357 install_fast_tracepoint_jump_pad>: New fields.
10358 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10359 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10360 [HAVE_STDINT_H]: Include stdint.h.
10361 (trace_debug_1): Rename to ...
10362 (trace_vdebug): ... this.
10363 (trace_debug): Rename to ...
10364 (trace_debug_1): ... this. Add `level' parameter.
10365 (trace_debug): New.
10366 (ATTR_USED, ATTR_NOINLINE): New.
10367 (IP_AGENT_EXPORT): New.
10368 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10369 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10370 (about_to_request_buffer_space, trace_buffer_is_full)
10371 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10372 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10373 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10374 (traceframe_write_count, traceframes_created)
10375 (trace_state_variables)
10376 New renaming defines.
10377 (struct ipa_sym_addresses): New.
10378 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10379 (symbol_list): New.
10380 (ipa_sym_addrs): New.
10381 (all_tracepoint_symbols_looked_up): New.
10382 (in_process_agent_loaded): New.
10383 (write_e_ipa_not_loaded): New.
10384 (maybe_write_ipa_not_loaded): New.
10385 (tracepoint_look_up_symbols): New.
10386 (debug_threads) [IN_PROCESS_AGENT]: New.
10387 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10388 (UNKNOWN_SIDE_EFFECTS): New.
10389 (stop_tracing): New.
10390 (flush_trace_buffer): New.
10391 (stop_tracing_bkpt): New.
10392 (flush_trace_buffer_bkpt): New.
10393 (read_inferior_integer): New.
10394 (read_inferior_uinteger): New.
10395 (read_inferior_data_pointer): New.
10396 (write_inferior_data_pointer): New.
10397 (write_inferior_integer): New.
10398 (write_inferior_uinteger): New.
10399 (struct collect_static_trace_data_action): Delete.
10400 (enum tracepoint_type): New.
10401 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10402 <actions_str, step_actions, step_actions_str>: Only include in
10403 GDBserver.
fa593d66
PA
10404 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10405 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10406 (tracepoints): Use IP_AGENT_EXPORT.
10407 (last_tracepoint): Don't include in the IPA.
10408 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10409 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10410 (alloced_trace_state_variables): New.
10411 (trace_state_variables): Use IP_AGENT_EXPORT.
10412 (traceframe_t): Delete unused variable.
10413 (circular_trace_buffer): Don't include in the IPA.
10414 (trace_buffer_start): Delete.
10415 (struct trace_buffer_control): New.
10416 (trace_buffer_free): Delete.
10417 (struct ipa_trace_buffer_control): New.
10418 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10419 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10420 New.
10421 (trace_buffer_ctrl): New.
10422 (TRACE_BUFFER_CTRL_CURR): New.
10423 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10424 Reimplement as macros.
10425 (trace_buffer_wrap): Delete.
10426 (traceframe_write_count, traceframe_read_count)
10427 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10428 (struct tracepoint_hit_ctx) <type>: New field.
10429 (struct fast_tracepoint_ctx): New.
10430 (memory_barrier): New.
10431 (cmpxchg): New.
10432 (record_tracepoint_error): Update atomically in the IPA.
10433 (clear_inferior_trace_buffer): New.
10434 (about_to_request_buffer_space): New.
10435 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10436 updating the same buffer.
10437 (add_tracepoint): Default the tracepoint's type to trap
10438 tracepoint, and orig_size to -1.
10439 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10440 internal variables.
10441 (create_trace_state_variable): New parameter `gdb'. Handle it.
10442 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10443 (cmd_qtdp): Handle fast tracepoints.
10444 (cmd_qtdv): Adjust.
10445 (max_jump_pad_size): New.
10446 (gdb_jump_pad_head): New.
10447 (get_jump_space_head): New.
10448 (claim_jump_space): New.
10449 (sort_tracepoints): New.
10450 (MAX_JUMP_SIZE): New.
10451 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10452 IPA.
10453 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10454 support. Upload fast traceframes, and delete internal IPA
10455 breakpoints.
10456 (stop_tracing_handler): New.
10457 (flush_trace_buffer_handler): New.
10458 (cmd_qtstop): Upload fast tracepoints.
10459 (response_tracepoint): Handle fast tracepoints.
10460 (tracepoint_finished_step): Upload fast traceframes. Set the
10461 tracepoint hit context's tracepoint type.
10462 (handle_tracepoint_bkpts): New.
10463 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10464 type. Add comment about fast tracepoints.
10465 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10466 non-existing action_str field.
10467 (get_context_regcache): Handle fast tracepoints.
10468 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10469 to the regcache.
10470 (fast_tracepoint_from_jump_pad_address): New.
10471 (fast_tracepoint_from_ipa_tpoint_address): New.
10472 (collecting_t): New.
10473 (force_unlock_trace_buffer): New.
10474 (fast_tracepoint_collecting): New.
10475 (collecting): New.
10476 (gdb_collect): New.
10477 (write_inferior_data_ptr): New.
10478 (target_tp_heap): New.
10479 (target_malloc): New.
10480 (download_agent_expr): New.
10481 (UALIGN): New.
10482 (download_tracepoints): New.
10483 (download_trace_state_variables): New.
10484 (upload_fast_traceframes): New.
10485 (IPA_FIRST_TRACEFRAME): New.
10486 (IPA_NEXT_TRACEFRAME_1): New.
10487 (IPA_NEXT_TRACEFRAME): New.
10488 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10489 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10490 (gdb_jump_pad_buffer_end): New.
10491 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10492 (initialize_tracepoint): Adjust.
10493 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10494 buffer. Initialize the low module.
10495 * utils.c (PREFIX, TOOLNAME): New.
10496 (malloc_failure): Use PREFIX.
10497 (error): In the IPA, an error causes an exit.
10498 (fatal, warning): Use PREFIX.
10499 (internal_error): Use TOOLNAME.
10500 (NUMCELLS): Increase to 10.
10501 * configure, config.in: Regenerate.
10502
d149dd1d
PA
105032010-06-01 Pedro Alves <pedro@codesourcery.com>
10504
10505 * server.c (handle_query) <qSupported>: Do two passes over the
10506 qSupported string to avoid nesting strtok.
10507
f6528abd
JK
105082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10509
10510 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10511 (CDEPS): New.
10512 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10513 -Wl,--dynamic-list.
10514 * configure: Regenerate.
10515 * proc-service.list: New.
10516
ca2a87a0
JK
105172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10518
10519 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10520 New comment.
10521
363a6e9f
OS
105222010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10523
10524 * gdbreplay.c (remote_open): Check error return from socket() call by
10525 its equality to -1 not by it being negative.
10526 * remote-utils.c (remote_open): Likewise.
10527
d23b6cb1
PA
105282010-05-23 Pedro Alves <pedro@codesourcery.com>
10529
10530 * config.h: Regenerate.
10531
28d3cf85
MK
105322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10533
10534 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10535 doesn't provide PTRACE_GET_THREAD_AREA.
10536
fea36a59
MK
105372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10538
10539 * linux-m68k-low.c: Include <asm/ptrace.h>
10540 (ps_get_thread_area): Implement.
10541
24b066ba
DE
105422010-05-03 Doug Evans <dje@google.com>
10543
10544 * event-loop.c (struct callback_event): New struct.
10545 (callback_list): New global.
10546 (append_callback_event, delete_callback_event): New functions.
10547 (process_callback): New function.
10548 (start_event_loop): Call it.
10549 * remote-utils.c (NOT_SCHEDULED): Define.
10550 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10551 moved out of readchar.
10552 (readchar): Rewrite. Call reschedule before returning.
10553 (reset_readchar): New function.
10554 (remote_close): Call it.
10555 (process_remaining, reschedule): New functions.
10556 * server.h (callback_handler_func): New typedef.
10557 (append_callback_event, delete_callback_event): Declare.
10558
9836d6ea
PA
105592010-05-03 Pedro Alves <pedro@codesourcery.com>
10560
10561 * proc-service.c (ps_pglobal_lookup): Use
10562 thread_db_look_up_one_symbol.
10563 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10564 parameter. Use it instead of all_symbols_looked_up.
10565 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10566 field.
10567 (all_symbols_looked_up): Don't declare.
10568 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10569 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10570 field.
10571 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10572 Set all_symbols_looked_up here.
10573 (thread_db_look_up_one_symbol): New.
10574 (thread_db_get_tls_address): Adjust.
10575 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10576 thread_db object on the heap, and tentatively set it in the
10577 process structure.
10578 (thread_db_init): Don't set all_symbols_looked_up here.
10579 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10580
7984d532
PA
105812010-05-03 Pedro Alves <pedro@codesourcery.com>
10582
10583 * linux-low.c (linux_kill, linux_detach): Adjust.
10584 (status_pending_p_callback): Remove redundant statement. Check
10585 for !TARGET_WAITIKIND_IGNORE, instead of
10586 TARGET_WAITKIND_STOPPED.
10587 (handle_tracepoints): Make sure LWP is locked. Adjust.
10588 (linux_wait_for_event_1): Adjust.
10589 (linux_cancel_breakpoints): New.
10590 (unsuspend_one_lwp): New.
10591 (unsuspend_all_lwps): New.
10592 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10593 (send_sigstop_callback): Change return type to int, add new
10594 `except' parameter and handle it.
10595 (suspend_and_send_sigstop_callback): New.
10596 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10597 pass them down. If SUSPEND, also increment the lwp's suspend
10598 count.
10599 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10600 (need_step_over_p): Don't consider suspended LWPs.
10601 (start_step_over): Adjust.
10602 (proceed_one_lwp): Change return type to int, add new `except'
10603 parameter and handle it.
10604 (unsuspend_and_proceed_one_lwp): New.
10605 (proceed_all_lwps): Use find_inferior instead of
10606 for_each_inferior.
10607 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10608 also decrement the suspend count of LWPs. Pass `except' down,
10609 instead of hacking its suspend count.
10610 (linux_pause_all): Add `freeze' parameter. Adjust.
10611 (linux_unpause_all): New.
10612 (linux_target_ops): Install linux_unpause_all.
10613 * server.c (handle_status): Adjust.
10614 * target.h (struct target_ops): New fields `unpause_all' and
10615 `cancel_breakpoints'. Add new parameter to `pause_all'.
10616 (pause_all): Add new `freeze' parameter.
10617 (unpause_all): New.
10618 (cancel_breakpoints): New.
10619 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10620 cancel breakpoints.
10621 (cmd_qtstart): Pause threads.
10622 (stop_tracing): Pause threads, and cancel breakpoints.
10623 * win32-low.c (win32_target_ops): Adjust.
10624
e471f25b
PA
106252010-05-03 Pedro Alves <pedro@codesourcery.com>
10626
10627 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10628 the inferior right away from here...
10629 (linux_wait_1): ... to here, and adjust to check the thread's
10630 last_resume_kind instead of the lwp's step or stop_expected flags.
10631
1915ef4f
PA
106322010-05-02 Pedro Alves <pedro@codesourcery.com>
10633
10634 * README: Use consistent `GDB' and `GDBserver' spellings.
10635
f9e39928
PA
106362010-05-02 Pedro Alves <pedro@codesourcery.com>
10637
10638 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10639 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10640 (linux_detach_one_lwp): Assume the lwp is stopped.
10641 (any_thread_of): Delete.
10642 (linux_detach): Stop all lwps here. Don't blindly delete all
10643 breakpoints.
10644 (delete_lwp_callback): New.
10645 (linux_mourn): Delete all lwps of the process that is gone.
10646 (linux_wait_1): Don't delete the last lwp of the process here.
10647 * mem-break.h (mark_breakpoints_out): Declare.
10648 * mem-break.c (mark_breakpoints_out): New.
10649 (free_all_breakpoints): Use it.
10650 * server.c (handle_target_event): If the process is gone, mark
10651 breakpoints out.
10652 * thread-db.c (struct thread_db) <create_bp>: New field.
10653 (thread_db_enable_reporting): Fix prototype. Store a thread event
10654 breakpoint reference in the thread_db struct.
10655 (thread_db_load_search): Clear the thread_db object.
10656 (try_thread_db_load_1): Ditto.
10657 (switch_to_process): New.
10658 (disable_thread_event_reporting): Use it.
10659 (remove_thread_event_breakpoints): New.
10660 (thread_db_detach, thread_db_mourn): Use it.
10661
1e7fc18c
PA
106622010-05-01 Pedro Alves <pedro@codesourcery.com>
10663
10664 * linux-low.c (linux_enable_event_reporting): New.
10665 (linux_wait_for_event_1, handle_extended_wait): Use it.
10666
02fc4de7
PA
106672010-04-30 Pedro Alves <pedro@codesourcery.com>
10668
10669 * linux-low.c (linux_kill_one_lwp, linux_kill)
10670 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10671 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10672 SIGSTOP even if the LWP is stopped.
10673 (send_sigstop_callback): New.
10674 (stop_all_lwps): Use send_sigstop_callback instead.
10675 (linux_resume_one_thread): Adjust.
10676 (proceed_one_lwp): Still proceed an LWP that the client has
10677 requested to stop, if we haven't reported it as stopped yet. Make
10678 sure that LWPs the client want stopped, have a pending SIGSTOP.
10679
bc3b5632
DE
106802010-04-26 Doug Evans <dje@google.com>
10681
ae1ada35
DE
10682 * server.c (handle_general_set): Make static.
10683
bc3b5632
DE
10684 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10685 Print received char after testing for error/eof instead of before.
10686 (input_interrupt): Tweak comment.
10687
65730243
DE
106882010-04-23 Doug Evans <dje@google.com>
10689
10690 * server.c (start_inferior): Print inferior argv if --debug.
10691
a8ae7dc0
AR
106922010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10693
10694 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10695 * nto-x86-low.c: Include server.h
10696
1c07cc19
PM
106972010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10698
10699 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10700 be consistent with other sources of this directory.
10701 (init_registers_amd64): Correct name of source file of this function
10702 in the comment.
10703
e0a61e09
PM
107042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10705
10706 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10707 64-bit executables.
10708
54709339
PM
107092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10710
10711 * win32-i386-low.c: Add 64-bit support.
10712 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10713 (init_registers_amd64): Declare.
10714 (mappings): Add 64-bit version of array.
10715 (init_windows_x86): New function.
10716 (the_low_target): Change init_arch field to init_windows_x86.
10717
e8f0053d
PM
107182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10719
10720 * win32-low.c: Adapt to support also 64-bit architecture.
10721 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10722 (get_image_name): Use SIZE_T type for local variable `done'.
10723 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10724 (toolhelp_get_dll_name): Idem.
10725 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10726 Use uintptr_t typecast to avoid warning.
10727 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10728 (handle_exception): Use phex_nz to avoid warning.
10729 (win32_wait): Remove unused local variable `process'.
10730
c481e77e
PM
107312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10732
10733 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10734 `amd64-avx.o'.
10735
12ea4b69
PM
107362010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10737
10738 * configure.ac: Use `ws2_32' library for srv_mingw.
10739 * configure: Regenerate.
10740 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10741 * remote-utils.c: Likewise.
10742
f6d1620c
L
107432010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10744
10745 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10746 if __x86_64__ is defined.
10747
8e642873
PM
107482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10749
10750 * configure: Regenerate.
10751
711e434b
PM
107522010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10753
10754 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10755 * target.h (target_ops): New get_tib_address field.
10756 * win32-low.h (win32_thread_info): Add thread_local_base field.
10757 * win32-low.c (child_add_thread): Add tlb argument.
10758 Set thread_local_base field to TLB.
10759 (get_child_debug_event): Adapt to child_add_thread change.
10760 (win32_get_tib_address): New function.
10761 (win32_target_ops): Set get_tib_address field to
10762 win32_get_tib_address.
10763 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10764
505106cd
PA
107652010-04-12 Pedro Alves <pedro@codesourcery.com>
10766
505106cd
PA
10767 * linux-low.c (linux_mourn): Also remove the process.
10768 * server.c (handle_target_event): Don't remove the process here.
10769 * nto-low.c (nto_mourn): New.
10770 (nto_target_ops): Install it.
10771 * spu-low.c (spu_mourn): New.
10772 (spu_target_ops): Install it.
10773 * win32-low.c (win32_mourn): New.
10774 (win32_target_ops): Install it.
10775
e8470a06
PA
107762010-04-12 Pedro Alves <pedro@codesourcery.com>
10777
10778 * server.h (buffer_xml_printf): Remove redundant `;'.
10779
45ba0d02
PA
107802010-04-12 Pedro Alves <pedro@codesourcery.com>
10781
10782 * regcache.c (set_register_cache): Invalidate regcaches before
10783 changing the register cache layout.
10784 (regcache_invalidate_one): Allow a NULL regcache.
10785 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10786 regcaches before changing the register cache layout or the target
10787 regsets.
10788
59e04013
L
107892010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10790
10791 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10792 variable warning on Linux/x86-64.
10793
8336d594
PA
107942010-04-11 Pedro Alves <pedro@codesourcery.com>
10795
10796 GDBserver disconnected tracing support.
10797
10798 * linux-low.c (linux_remove_process): Delete.
10799 (add_lwp): Don't set last_resume_kind here.
10800 (linux_kill): Use `mourn'.
10801 (linux_detach): Use `thread_db_detach', and `mourn'.
10802 (linux_mourn): New.
10803 (linux_attach_lwp_1): Adjust comment.
10804 (linux_attach): last_resume_kind moved the thread_info; adjust.
10805 (status_pending_p_callback): Adjust.
10806 (linux_wait_for_event_1): Adjust.
10807 (count_events_callback, select_singlestep_lwp_callback)
10808 (select_event_lwp_callback, cancel_breakpoints_callback)
10809 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10810 (proceed_one_lwp): Adjust.
10811 (linux_async): Add debug output.
10812 (linux_thread_stopped): New.
10813 (linux_pause_all): New.
10814 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10815 linux_pause_all.
10816 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10817 (thread_db_free): Delete declaration.
10818 (thread_db_detach, thread_db_mourn): Declare.
10819 * thread-db.c (thread_db_init): Use thread_db_mourn.
10820 (thread_db_free): Delete, split in two.
10821 (disable_thread_event_reporting): New.
10822 (thread_db_detach): New.
10823 (thread_db_mourn): New.
10824
10825 * server.h (struct thread_info) <last_resume_kind>: New field.
10826 <attached>: Add comment.
10827 <gdb_detached>: New field.
10828 (handler_func): Change return type to int.
10829 (handle_serial_event, handle_target_event): Ditto.
10830 (gdb_connected): Declare.
10831 (tracing): Delete.
10832 (disconnected_tracing): Declare.
10833 (stop_tracing): Declare.
10834
10835 * server.c (handle_query) <qSupported>: Report support for
10836 disconnected tracing.
10837 (queue_stop_reply_callback): Account for running threads.
10838 (gdb_wants_thread_stopped): New.
10839 (gdb_wants_all_threads_stopped): New.
10840 (gdb_reattached_process): New.
10841 (handle_status): Clear the `gdb_detached' flag of all processes.
10842 In all-stop, stop all threads.
10843 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10844 (process_serial_event): If the remote connection breaks, or if an
10845 exit was forced with "monitor exit", force an event loop exit.
10846 Handle disconnected tracing on detach.
10847 (handle_serial_event): Adjust.
10848 (handle_target_event): If GDB isn't connected, forward events back
10849 to the inferior, unless the last process exited, in which case,
10850 exit gdbserver. Adjust interface.
10851
10852 * remote-utils.c (remote_open): Don't block in accept. Instead
10853 register an event loop source on the listen socket file
10854 descriptor. Refactor bits into ...
10855 (listen_desc): ... this new global.
10856 (gdb_connected): ... this new function.
10857 (enable_async_notification): ... this new function.
10858 (handle_accept_event): ... this new function.
10859 (remote_close): Clear remote_desc.
10860
10861 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10862
10863 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10864 New fields.
10865 (mourn_inferior): Define.
10866 (target_process_qsupported): Avoid the dangling else problem.
10867 (thread_stopped): Define.
10868 (pause_all): Define.
10869 (target_waitstatus_to_string): Declare.
10870 * target.c (target_waitstatus_to_string): New.
10871
10872 * tracepoint.c (tracing): Make extern.
10873 (disconnected_tracing): New.
10874 (stop_tracing): Make extern. Handle tracing stops due to GDB
10875 disconnecting.
10876 (cmd_qtdisconnected): New.
10877 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10878 (handle_tracepoint_general_set): Handle QTDisconnected.
10879
10880 * event-loop.c (event_handler_func): Change return type to int.
10881 (process_event): Bail out if the event handler wants the event
10882 loop to stop.
10883 (handle_file_event): Ditto.
10884 (start_event_loop): Bail out if the event handler wants the event
10885 loop to stop.
10886
10887 * nto-low.c (nto_target_ops): Adjust.
10888 * spu-low.c (spu_wait): Don't remove the process here.
10889 (spu_target_ops): Adjust.
10890 * win32-low.c (win32_wait): Don't remove the process here.
10891 (win32_target_ops): Adjust.
10892
5d267c4c
PA
108932010-04-11 Pedro Alves <pedro@codesourcery.com>
10894
10895 * regcache.c (realloc_register_cache): Invalidate inferior's
10896 regcache before recreating it.
10897
623ccd72
PA
108982010-04-09 Pedro Alves <pedro@codesourcery.com>
10899
10900 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10901
219f2f23
PA
109022010-04-09 Stan Shebs <stan@codesourcery.com>
10903 Pedro Alves <pedro@codesourcery.com>
10904
10905 * server.h (LONGEST): New.
10906 (struct thread_info) <while_stepping>: New field.
10907 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10908 Declare.
10909 (initialize_tracepoint, handle_tracepoint_general_set)
10910 (handle_tracepoint_query, tracepoint_finished_step)
10911 (tracepoint_was_hit, release_while_stepping_state_list):
10912 (current_traceframe): Declare.
10913 * server.c (handle_general_set): Handle tracepoint packets.
10914 (read_memory): New.
10915 (write_memory): New.
10916 (handle_search_memory_1): Use read_memory.
10917 (handle_query): Report support for conditional tracepoints, trace
10918 state variables, and tracepoint sources. Handle tracepoint
10919 queries.
10920 (main): Initialize the tracepoints module.
10921 (process_serial_event): Handle traceframe reads/writes.
10922
10923 * linux-low.c (handle_tracepoints): New.
10924 (linux_wait_1): Call it.
10925 (linux_resume_one_lwp): Handle while-stepping.
10926 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10927 (linux_target_ops): Install them.
10928 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10929 New field.
10930 * linux-x86-low.c (x86_supports_tracepoints): New.
10931 (the_low_target). Install it.
10932
10933 * mem-break.h (delete_breakpoint): Declare.
10934 * mem-break.c (delete_breakpoint): Make external.
10935
10936 * target.h (struct target_ops): Add `supports_tracepoints',
10937 `read_pc', and `write_pc' fields.
10938 (target_supports_tracepoints): Define.
10939 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10940 (phex_nz): New.
10941
10942 * regcache.h (struct regcache) <registers_owned>: New field.
10943 (init_register_cache, regcache_cpy): Declare.
10944 (regcache_read_pc, regcache_write_pc): Declare.
10945 (register_cache_size): Declare.
10946 (supply_regblock): Declare.
10947 * regcache.c (init_register_cache): New.
10948 (new_register_cache): Use it.
10949 (regcache_cpy): New.
10950 (register_cache_size): New.
10951 (supply_regblock): New.
10952 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10953
219f2f23
PA
10954 * tracepoint.c: New.
10955
10956 * Makefile.in (OBS): Add tracepoint.o.
10957 (tracepoint.o): New rule.
10958
3a13a53b
L
109592010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10960
10961 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10962 (i386-mmx.o): New.
10963 (i386-mmx.c): Likewise.
10964 (i386-mmx-linux.o): Likewise.
10965 (i386-mmx-linux.c): Likewise.
10966
10967 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10968 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10969 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10970 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10971
10972 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10973 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10974 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10975
1570b33e
L
109762010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10977
10978 * Makefile.in (clean): Updated.
10979 (i386-avx.o): New.
10980 (i386-avx.c): Likewise.
10981 (i386-avx-linux.o): Likewise.
10982 (i386-avx-linux.c): Likewise.
10983 (amd64-avx.o): Likewise.
10984 (amd64-avx.c): Likewise.
10985 (amd64-avx-linux.o): Likewise.
10986 (amd64-avx-linux.c): Likewise.
10987
10988 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10989 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10990 (srv_amd64_regobj): Add amd64-avx.o.
10991 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10992 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10993 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10994 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10995 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10996 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10997 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10998
10999 * i387-fp.c: Include "i386-xstate.h".
11000 (i387_xsave): New.
11001 (i387_cache_to_xsave): Likewise.
11002 (i387_xsave_to_cache): Likewise.
11003 (x86_xcr0): Likewise.
11004
11005 * i387-fp.h (i387_cache_to_xsave): Likewise.
11006 (i387_xsave_to_cache): Likewise.
11007 (x86_xcr0): Likewise.
11008
11009 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11010 * linux-crisv32-low.c (target_regsets): Likewise.
11011 * linux-m68k-low.c (target_regsets): Likewise.
11012 * linux-mips-low.c (target_regsets): Likewise.
11013 * linux-ppc-low.c (target_regsets): Likewise.
11014 * linux-s390-low.c (target_regsets): Likewise.
11015 * linux-sh-low.c (target_regsets): Likewise.
11016 * linux-sparc-low.c (target_regsets): Likewise.
11017 * linux-xtensa-low.c (target_regsets): Likewise.
11018
11019 * linux-low.c: Include <sys/uio.h>.
11020 (regsets_fetch_inferior_registers): Support nt_type.
11021 (regsets_store_inferior_registers): Likewise.
11022 (linux_process_qsupported): New.
11023 (linux_target_ops): Add linux_process_qsupported.
11024
11025 * linux-low.h (regset_info): Add nt_type.
11026 (linux_target_ops): Add process_qsupported.
11027
11028 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11029 and <sys/uio.h>.
11030 (init_registers_i386_avx_linux): New.
11031 (init_registers_amd64_avx_linux): Likewise.
11032 (xmltarget_i386_linux_no_xml): Likewise.
11033 (xmltarget_amd64_linux_no_xml): Likewise.
11034 (PTRACE_GETREGSET): Likewise.
11035 (PTRACE_SETREGSET): Likewise.
11036 (x86_fill_xstateregset): Likewise.
11037 (x86_store_xstateregset): Likewise.
11038 (use_xml): Likewise.
11039 (x86_linux_update_xmltarget): Likewise.
11040 (x86_linux_process_qsupported): Likewise.
11041 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11042 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11043 init_registers_i386_linux here. Call
11044 x86_linux_update_xmltarget.
11045 (the_low_target): Add x86_linux_process_qsupported.
11046
11047 * server.c (handle_query): Call target_process_qsupported.
11048
11049 * target.h (target_ops): Add process_qsupported.
11050 (target_process_qsupported): New.
11051
fc7238bb
PA
110522010-04-03 Pedro Alves <pedro@codesourcery.com>
11053
11054 * inferiors.c (add_thread): Set last_status kind to
11055 TARGET_WAITKIND_IGNORE.
11056 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11057 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11058 (linux_wait_1): Move `thread' local definition to block that uses
11059 it. Don't NULL initialize `event_child'.
11060 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11061 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11062 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11063
bdabb078
PA
110642010-04-01 Pedro Alves <pedro@codesourcery.com>
11065
11066 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11067 an extended waitstatus, or by a watchpoint.
11068 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11069 thread was stepping or has been stopped by a watchpoint.
11070
d3bbe7a0
PA
110712010-04-01 Pedro Alves <pedro@codesourcery.com>
11072
11073 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11074 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11075 of another, then delete the previous, and validate all
11076 breakpoints.
11077 (validate_inserted_breakpoint): New.
11078 (delete_disabled_breakpoints): New.
11079 (validate_breakpoints): New.
11080 (check_mem_read): Validate breakpoints before trusting their
11081 shadow. Delete disabled breakpoints.
11082 (check_mem_write): Validate breakpoints before trusting they
11083 should be inserted. Delete disabled breakpoints.
11084 * mem-break.h (validate_breakpoints):
11085 * server.c (handle_query): Validate breakpoints when we see a
11086 qSymbol query.
11087
8b07ae33
PA
110882010-04-01 Pedro Alves <pedro@codesourcery.com>
11089
11090 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11091 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11092 if we could tell there's a GDB breakpoint at stop_pc.
11093 (need_step_over_p): Don't do a step over if we find a GDB
11094 breakpoint at the resume PC.
11095
11096 * mem-break.c (struct raw_breakpoint): New.
11097 (enum bkpt_type): New type `gdb_breakpoint'.
11098 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11099 fields. New field `raw'.
11100 (find_raw_breakpoint_at): New.
11101 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11102 breakpoint instead.
11103 (set_breakpoint_at): Adjust.
11104 (delete_raw_breakpoint): New.
11105 (release_breakpoint): New.
11106 (delete_breakpoint): Rename to...
11107 (delete_breakpoint_1): ... this. Add proc parameter. Use
11108 release_breakpoint. Return ENOENT.
11109 (delete_breakpoint): Reimplement.
11110 (find_breakpoint_at): Delete.
11111 (find_gdb_breakpoint_at): New.
11112 (delete_breakpoint_at): Delete.
11113 (set_gdb_breakpoint_at): New.
11114 (delete_gdb_breakpoint_at): New.
11115 (gdb_breakpoint_here): New.
11116 (set_reinsert_breakpoint): Use release_breakpoint.
11117 (uninsert_breakpoint): Rename to ...
11118 (uninsert_raw_breakpoint): ... this.
11119 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11120 (reinsert_raw_breakpoint): Change parameter type to
11121 raw_breakpoint.
11122 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11123 instead.
11124 (check_breakpoints): Adjust. Use release_breakpoint.
11125 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11126 (breakpoint_inserted_here): Ditto.
11127 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11128 Don't trust the breakpoint's shadow if it is not inserted.
11129 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11130 (delete_all_breakpoints): Adjust.
11131 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11132 use delete_breakpoint_1.
11133
11134 * mem-break.h (breakpoints_supported): Delete declaration.
11135 (set_gdb_breakpoint_at): Declare.
11136 (gdb_breakpoint_here): Declare.
11137 (delete_breakpoint_at): Delete.
11138 (delete_gdb_breakpoint_at): Declare.
11139
11140 * server.h (struct raw_breakpoint): Forward declare.
11141 (struct process_info): New field `raw_breakpoints'.
11142
11143 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11144 breakpoints.
11145
6bf5e0ba
PA
111462010-03-24 Pedro Alves <pedro@codesourcery.com>
11147
11148 * linux-low.c (status_pending_p_callback): Fix comment.
11149 (linux_wait_for_event_1): Move most of the internal breakpoint
11150 handling from here...
11151 (linux_wait_1): ... to here.
11152 (count_events_callback): New.
11153 (select_singlestep_lwp_callback): New.
11154 (select_event_lwp_callback): New.
11155 (cancel_breakpoints_callback): New.
11156 (select_event_lwp): New.
11157 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11158 priority to all LWPs that have had events that should be reported
11159 to the client. Cancel breakpoints when about to reporting the
11160 event to the client, not while stopping lwps. No longer cancel
11161 finished single-steps here.
11162 (cancel_finished_single_step): Delete.
11163 (cancel_finished_single_steps): Delete.
11164
414a389f
PA
111652010-03-24 Pedro Alves <pedro@codesourcery.com>
11166
11167 * mem-break.c (enum bkpt_type): New.
11168 (struct breakpoint): New field `type'.
11169 (set_breakpoint_at): Change return type to struct breakpoint
11170 pointer. Set type to `other_breakpoint' by default.
11171 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11172 in the breakpoint list.
11173 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11174 (reinsert_breakpoint): Rename to ...
11175 (reinsert_raw_breakpoint): ... this.
11176 (reinsert_breakpoints_at): Adjust.
11177 * mem-break.h (struct breakpoint): Declare.
11178 (set_breakpoint_at): Change return type to struct breakpoint
11179 pointer.
11180
2280c721
PA
111812010-03-24 Pedro Alves <pedro@codesourcery.com>
11182
11183 * server.c (handle_query): Assign, not compare.
11184
d50171e4
PA
111852010-03-24 Pedro Alves <pedro@codesourcery.com>
11186
11187 Teach linux gdbserver to step-over-breakpoints.
11188
11189 * linux-low.c (can_hardware_single_step): New.
11190 (supports_breakpoints): New.
11191 (handle_extended_wait): If stopping threads, read the stop pc of
11192 the new cloned LWP.
11193 (get_pc): New.
11194 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11195 low target doesn't support retrieving the PC.
11196 (add_lwp): Set last_resume_kind to resume_continue.
11197 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11198 (linux_attach): Don't clear stop_expected. Set the lwp's
11199 last_resume_kind to resume_stop.
11200 (linux_detach_one_lwp): Don't check for removed breakpoints.
11201 (check_removed_breakpoint): Delete.
11202 (status_pending_p): Rename to ...
11203 (status_pending_p_callback): ... this. Don't check for removed
11204 breakpoints. Don't consider threads that are stopped from GDB's
11205 perspective.
11206 (linux_wait_for_lwp): Always read the stop_pc here.
11207 (cancel_breakpoint): New.
11208 (step_over_bkpt): New global.
11209 (linux_wait_for_event_1): Implement stepping over breakpoints.
11210 (gdb_wants_lwp_stopped): New.
11211 (gdb_wants_all_stopped): New.
11212 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11213 single-step traps here. Store the thread's last reported target
11214 wait status.
11215 (send_sigstop): Don't clear stop_expected. Always set it,
11216 instead.
11217 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11218 (cancel_finished_single_step): New.
11219 (cancel_finished_single_steps): New.
11220 (wait_for_sigstop): Don't cancel finished single-step traps here.
11221 (linux_resume_one_lwp): Don't check for removed breakpoints.
11222 Don't set `step' on non-hardware step archs.
11223 (linux_set_resume_request): Ignore resume_stop requests if already
11224 stopping or stopped. Set the lwp's last_resume_kind.
11225 (resume_status_pending_p): Don't check for removed breakpoints.
11226 (need_step_over_p): New.
11227 (start_step_over): New.
11228 (finish_step_over): New.
11229 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11230 requests. Clear the thread's last reported target waitstatus.
11231 Don't use the `suspended' flag. Don't consider pending breakpoints.
11232 (linux_resume): Start a step-over if necessary.
11233 (proceed_one_lwp): New.
11234 (proceed_all_lwps): New.
11235 (unstop_all_lwps): New.
11236 * linux-low.h (struct lwp_info): Rewrite comment for the
11237 `suspended' flag. Add the `stop_pc' field. Delete the
11238 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11239 Add `'last_resume_kind' and `need_step_over' fields.
11240 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11241 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11242 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11243 (set_raw_breakpoint_at): New.
11244 (set_breakpoint_at): Rewrite to use it.
11245 (reinsert_breakpoint_handler): Delete.
11246 (set_reinsert_breakpoint): New.
11247 (reinsert_breakpoint_by_bp): Delete.
11248 (delete_reinsert_breakpoints): New.
11249 (uninsert_breakpoint): Rewrite.
11250 (uninsert_breakpoints_at): New.
11251 (reinsert_breakpoint): Rewrite.
11252 (reinsert_breakpoints_at): New.
11253 (check_breakpoints): Rewrite.
11254 (breakpoint_here): New.
11255 (breakpoint_inserted_here): New.
11256 (check_mem_read): Adjust.
11257 * mem-break.h (breakpoints_supported, breakpoint_here)
11258 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11259 (reinsert_breakpoint_by_bp): Delete declaration.
11260 (delete_reinsert_breakpoints): Declare.
11261 (reinsert_breakpoint): Delete declaration.
11262 (reinsert_breakpoints_at): Declare.
11263 (uninsert_breakpoint): Delete declaration.
11264 (uninsert_breakpoints_at): Declare.
11265 (check_breakpoints): Adjust prototype.
11266 * server.h: Adjust include order.
11267 (struct thread_info): Declare here. Add a `last_status' field.
11268
30ba68cb
MS
112692010-03-23 Michael Snyder <msnyder@vmware.com>
11270
11271 * server.c (crc32): New function.
11272 (handle_query): Add handling for 'qCRC:' request.
11273
b9a881c2
PA
112742010-03-23 Pedro Alves <pedro@codesourcery.com>
11275
11276 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11277 lwp had been stopped by a watchpoint.
11278
e92d13d5
PA
112792010-03-16 Pedro Alves <pedro@codesourcery.com>
11280
11281 * server.h (internal_error): Declare.
11282 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11283 * utils.c (internal_error): New function.
11284
64daa791
AS
112852010-03-15 Andreas Schwab <schwab@redhat.com>
11286
11287 * configure.srv: Fix typo setting srv_regobj.
11288
f52cd8cd
PA
112892010-03-15 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (fetch_register): Avoid passing a non string literal
11292 format to `error'.
11293 (usr_store_inferior_registers): Ditto.
11294
93ae6fdc
PA
112952010-03-14 Pedro Alves <pedro@codesourcery.com>
11296
11297 * linux-low.c (linux_write_memory): Bail out early if peeking
11298 memory failed.
11299
c3adc08c
PA
113002010-03-14 Pedro Alves <pedro@codesourcery.com>
11301
11302 * linux-low.h (struct lwp_info): New fields
11303 `stopped_by_watchpoint' and `stopped_data_address'.
11304 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11305 here, and cache them in the lwp object.
11306 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11307 directly.
11308 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11309 field.
11310 (linux_stopped_by_watchpoint): Rewrite.
11311 (linux_stopped_data_address): Rewrite.
11312
bce522a2
PA
113132010-03-06 Simo Melenius <simo.melenius@iki.fi>
11314
11315 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11316 switching the current inferior, not before.
11317
90884b2b
L
113182010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11319
11320 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11321 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11322 i386-linux.c and amd64-linux.c.
11323 (reg-i386.o): Removed.
11324 (reg-i386.c): Likewise.
11325 (reg-i386-linux.o): Likewise.
11326 (reg-i386-linux.c): Likewise.
11327 (reg-x86-64.o): Likewise.
11328 (reg-x86-64.c): Likewise.
11329 (reg-x86-64-linux.o): Likewise.
11330 (reg-x86-64-linux.c): Likewise.
11331 (i386.o): New.
11332 (i386.c): Likewise.
11333 (i386-linux.o): Likewise.
11334 (i386-linux.c): Likewise.
11335 (amd64.o): Likewise.
11336 (amd64.c): Likewise.
11337 (amd64-linux.o): Likewise.
11338 (amd64-linux.c): Likewise.
11339
11340 * configure.srv (srv_i386_regobj): New.
11341 (srv_i386_linux_regobj): Likewise.
11342 (srv_amd64_regobj): Likewise.
11343 (srv_amd64_linux_regobj): Likewise.
11344 (srv_i386_32bit_xmlfiles): Likewise.
11345 (srv_i386_64bit_xmlfiles): Likewise.
11346 (srv_i386_xmlfiles): Likewise.
11347 (srv_amd64_xmlfiles): Likewise.
11348 (srv_i386_linux_xmlfiles): Likewise.
11349 (srv_amd64_linux_xmlfiles): Likewise.
11350 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11351 srv_xmlfiles to $srv_i386_xmlfiles.
11352 (i[34567]86-*-mingw32ce*): Likewise.
11353 (i[34567]86-*-mingw*): Likewise.
11354 (i[34567]86-*-nto*): Likewise.
11355 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11356 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11357 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11358 (x86_64-*-linux*): Likewise.
11359
11360 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11361 (init_registers_amd64_linux): New.
11362 (x86_arch_setup): Replace init_registers_x86_64_linux with
11363 init_registers_amd64_linux.
11364
193f13e6
MK
113652010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11366
11367 * configure.ac: Check for libdl. If it is not available link against
11368 static libthread_db.
11369 * configure: Regenerate.
11370
85d721b8
PA
113712010-02-22 Pedro Alves <pedro@codesourcery.com>
11372
11373 PR9605
11374
11375 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11376 handing a read watchpoint.
11377 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11378
6076632b
DE
113792010-02-12 Doug Evans <dje@google.com>
11380
11381 * linux-low.c (linux_supports_tracefork_flag): Document.
11382 (linux_look_up_symbols): Add comment.
11383
3327ccf7
L
113842010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11385
11386 * regcache.c (supply_register): Clear regcache if buf is NULL.
11387
0718675c 113882010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11389 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11390
11391 * inferiors.c (find_inferior): Add function documentation.
11392 (unloaded_dll): Handle the case where the unloaded dll has not
11393 been previously registered in the dll list.
11394
177321bd
DJ
113952010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11396
11397 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11398 (thumb2_breakpoint): New.
11399 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11400
2b009048
DJ
114012010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11402
11403 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11404 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11405 breakpoints.
11406
3be029c7
PA
114072010-01-21 Pedro Alves <pedro@codesourcery.com>
11408
11409 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11410
18f5de3b
JK
114112010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11412
11413 * linux-s390-low.c (s390_collect_ptrace_register)
11414 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11415
3743bb4f
DE
114162010-01-21 Doug Evans <dje@google.com>
11417
14ce3065
DE
11418 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11419 (PTRACE_ARG4_TYPE): New macro.
11420 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11421 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11422 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11423 (usr_store_inferior_registers): Ditto.
11424 (linux_read_memory, linux_write_memory): Ditto.
11425 (linux_test_for_tracefork): Ditto.
11426
3743bb4f
DE
11427 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11428 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11429
8b315be5
PA
114302010-01-21 Pedro Alves <pedro@codesourcery.com>
11431
11432 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11433 target.
11434
85492558
PA
114352010-01-21 Pedro Alves <pedro@codesourcery.com>
11436
11437 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11438 prototype to take a regcache. Adjust.
11439
442ea881
PA
114402010-01-20 Pedro Alves <pedro@codesourcery.com>
11441
11442 * regcache.h (struct thread_info): Forward declare.
11443 (struct regcache): New.
11444 (new_register_cache): Adjust prototype.
11445 (get_thread_regcache): Declare.
11446 (free_register_cache): Adjust prototype.
11447 (registers_to_string, registers_from_string): Ditto.
11448 (supply_register, supply_register_by_name, collect_register)
11449 (collect_register_as_string, collect_register_by_name): Ditto.
11450 * regcache.c (struct inferior_regcache_data): Delete.
11451 (get_regcache): Rename to ...
11452 (get_thread_regcache): ... this. Adjust. Switch inferior before
11453 fetching registers.
11454 (regcache_invalidate_one): Adjust.
11455 (regcache_invalidate): Fix prototype.
11456 (new_register_cache): Return the new register cache.
11457 (free_register_cache): Change prototype.
11458 (realloc_register_cache): Adjust.
11459 (registers_to_string): Change prototype to take a regcache. Adjust.
11460 (registers_from_string): Ditto.
11461 (register_data): Ditto.
11462 (supply_register): Ditto.
11463 (supply_register_by_name): Ditto.
11464 (collect_register): Ditto.
11465 (collect_register_as_string): Ditto.
11466 (collect_register_by_name): Ditto.
11467 * server.c (process_serial_event): Adjust.
11468 * linux-low.h (regset_fill_func, regset_store_func): Change
11469 prototype.
11470 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11471 Change prototype.
11472 * linux-low.c (get_stop_pc): Adjust.
11473 (check_removed_breakpoint): Adjust.
11474 (linux_wait_for_event): Adjust.
11475 (linux_resume_one_lwp): Adjust.
11476 (fetch_register): Add regcache parameter. Adjust.
11477 (usr_store_inferior_registers): Ditto.
11478 (regsets_fetch_inferior_registers): Ditto.
11479 (regsets_store_inferior_registers): Ditto.
11480 (linux_fetch_registers, linux_store_registers): Ditto.
11481 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11482 regcache. Adjust.
43aaf8b6
PA
11483 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11484 Ditto.
442ea881
PA
11485 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11486 prototype to take a regcache.
11487 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11488 * remote-utils.c (convert_ascii_to_int, outreg)
11489 (prepare_resume_reply): Change prototype to take a regcache.
11490 Adjust.
11491 * target.h (struct target_ops) <fetch_registers, store_registers>:
11492 Change prototype to take a regcache.
11493 (fetch_inferior_registers, store_inferior_registers): Change
11494 prototype to take a regcache. Adjust.
11495 * proc-service.c (ps_lgetregs): Adjust.
11496 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11497 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11498 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11499 take a regcache. Adjust.
11500 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11501 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11502 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11503 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11504 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11505 (cris_cannot_fetch_register):
11506 (cris_breakpoint_at): Change prototype to take a regcache.
11507 Adjust.
11508 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11509 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11510 to take a regcache. Adjust.
11511 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11512 Adjust.
11513 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11514 take a regcache. Adjust.
11515 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11516 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11517 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11518 * linux-mips-low.c (mips_get_pc):
11519 (mips_set_pc): Change prototype to take a regcache. Adjust.
11520 (mips_reinsert_addr): Adjust.
11521 (mips_collect_register): Change prototype to take a regcache.
11522 Adjust.
11523 (mips_supply_register):
11524 (mips_collect_register_32bit, mips_supply_register_32bit)
11525 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11526 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11527 * linux-ppc-low.c (ppc_supply_ptrace_register)
11528 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11529 (parse_spufs_run): Adjust.
11530 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11531 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11532 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11533 take a regcache. Adjust.
11534 * linux-s390-low.c (s390_collect_ptrace_register)
11535 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11536 (s390_set_pc): Change prototype to take a regcache. Adjust.
11537 (s390_arch_setup): Adjust.
11538 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11539 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11540 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11541 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11542 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11543 regcache. Adjust.
11544 (sparc_breakpoint_at): Adjust.
11545 * linux-xtensa-low.c (xtensa_fill_gregset):
11546 (xtensa_store_gregset):
11547 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11548 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11549 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11550 prototype to take a regcache. Adjust.
11551 * win32-arm-low.c (arm_fetch_inferior_register)
11552 (arm_store_inferior_register): Change prototype to take a
11553 regcache. Adjust.
11554 * win32-i386-low.c (i386_fetch_inferior_register)
11555 (i386_store_inferior_register): Change prototype to take a
11556 regcache. Adjust.
11557 * win32-low.c (child_fetch_inferior_registers)
11558 (child_store_inferior_registers): Change prototype to take a
11559 regcache. Adjust.
11560 (win32_wait): Adjust.
11561 (win32_fetch_inferior_registers): Change prototype to take a
11562 regcache. Adjust.
11563 (win32_store_inferior_registers): Adjust.
11564 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11565 store_inferior_register>: Change prototype to take a regcache.
11566
60c3d7b0
DE
115672010-01-20 Doug Evans <dje@google.com>
11568
11569 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11570 #ifdef.
11571 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11572 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11573
dc146f7c
VP
115742010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11575
11576 * linux-low.c (linux_core_of_thread): New.
11577 (compare_ints, show_process, list_threads): New.
11578 (linux_qxfer_osdata): Report threads and cores.
11579 (linux_target_op): Register linux_core_of_thread.
11580 * remote-utils.c (prepare_resume_reply): Report the core.
11581 (buffer_xml_printf): Support %d specifier.
11582 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11583 New.
11584 (handle_query): Handle qXfer:threads. Announce availability
11585 thereof.
11586 * target.h (struct target_ops): New field core_of_thread.
11587
7803799a
UW
115882010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11589
11590 * Makefile.in (clean): Remove new generated files.
11591 (reg-s390.o, reg-s390.c): Remove rules.
11592 (reg-s390x.o, reg-s390x.c): Likewise.
11593 (s390-linux32.o, s390-linux32.c): Add rules.
11594 (s390-linux64.o, s390-linux64.c): Likewise.
11595 (s390x-linux64.o, s390x-linux64.c): Likewise.
11596 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11597 * linux-s390-low.c: Include <elf.h>.
11598 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11599 (init_registers_s390): Remove prototype.
11600 (init_registers_s390x): Likewise.
11601 (init_registers_s390_linux32): Add prototype.
11602 (init_registers_s390_linux64): Likewise.
11603 (init_registers_s390x_linux64): Likewise.
11604 (s390_num_regs_3264): New define.
11605 (s390_regmap_3264): New global variable.
11606 (s390_cannot_fetch_register): Remove obsolete check.
11607 (s390_cannot_store_register): Likewise.
11608 (s390_collect_ptrace_register): Handle upper/lower register halves.
11609 (s390_supply_ptrace_register): Likewise.
11610 (s390_fill_gregset): Update to register number changes.
11611 (s390_get_hwcap): New routine.
11612 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11613 Install appropriate regmap and register set.
11614
6e7ffa39
JB
116152010-01-01 Joel Brobecker <brobecker@adacore.com>
11616
11617 * server.c (gdbserver_version): Update copyright year to 2010.
11618 * gdbreplay.c (gdbreplay_version): Likewise.
11619
957f3f49
DE
116202009-12-28 Doug Evans <dje@google.com>
11621
11622 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11623 elf/external.h. Include <elf.h> instead but only if necessary.
11624
ca5c370d
PA
116252009-12-28 Pedro Alves <pedro@codesourcery.com>
11626
11627 * linux-low.c (linux_remove_process): Remove `detaching'
11628 parameter. Don't release/detach from thread_db here.
11629 (linux_kill): Release/detach from thread_db here, ...
11630 (linux_detach): ... and here, before actually detaching.
11631 (linux_wait_1): ... and here, when a process exits.
11632 * thread-db.c (any_thread_of): New.
11633 (thread_db_free): Switch the current inferior to a thread of the
11634 passed in process.
11635
4ee62156
DE
116362009-12-21 Doug Evans <dje@google.com>
11637
d90e6a88
DE
11638 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11639
c5f62d5f
DE
11640 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11641 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11642 warning ifndef __NR_tkill. Move setting of errno there too.
11643 Delete unnecessary resetting of errno after syscall.
11644 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11645
10e86dd7
DE
11646 * configure.ac: Check for dladdr.
11647 * config.in: Regenerate.
11648 * configure: Regenerate.
11649 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11650 (try_thread_db_load): Update.
11651
4ee62156
DE
11652 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11653
00f515da
DE
116542009-12-18 Doug Evans <dje@google.com>
11655
e9464885
DE
11656 * event-loop.c: Include unistd.h if it exists.
11657
07d4f67e
DE
11658 * linux-low.c (my_waitpid): Move definition away from being in
11659 between linux_tracefork_child/linux_test_for_tracefork.
11660
00f515da
DE
11661 * gdb_proc_service.h (psaddr_t): Fix type.
11662 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11663 signature to match glibc.
11664
1de1badb
DE
116652009-12-16 Doug Evans <dje@google.com>
11666
11667 * linux-low.c (linux_read_memory): Fix argument to read.
11668
aeeb81d1
PA
116692009-11-26 Pedro Alves <pedro@codesourcery.com>
11670
11671 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11672 events, don't leave current_inferior pointing at null.
11673
10357975
PA
116742009-11-26 Pedro Alves <pedro@codesourcery.com>
11675
11676 * win32-low.c (LOG): Delete.
11677 (OUTMSG): Output to stderr.
11678 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11679 on compile time LOG macro.
11680 (win32_wait): Fix debug output.
11681
cf6e3471
PA
116822009-11-26 Pedro Alves <pedro@codesourcery.com>
11683
11684 * win32-low.c (win32_add_one_solib): If the dll name is
11685 "ntdll.dll", prepend the system directory to the dll path.
11686
0c85e18e
MK
116872009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11688
11689 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11690
9ac544ce 116912009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11692 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11693
11694 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11695 * configure.ac: Check for __mcoldfire__ and set
11696 gdb_cv_m68k_is_coldfire.
11697 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11698 reg-cf.o and reg-m68k.o.
11699 * configure: Regenerated.
11700
fd7dd3e6
PA
117012009-11-16 Pedro Alves <pedro@codesourcery.com>
11702
11703 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11704 Pass it to thread_db_free.
11705 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11706 proper `detaching' argument to linux_remove_process.
11707 * linux-low.h (thread_db_free): Add `detaching' parameter.
11708 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11709 to thread_db_free.
11710 (thread_db_free): Add `detaching' parameter. Only
11711 call td_ta_clear_event if detaching from process.
11712
75aa492e
MK
117132009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11714
11715 * thread-db.c (thread_db_free): Fix typo.
11716
21e1bee4
PP
117172009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11718
11719 PR gdb/10838
11720 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11721
8838b45e
NS
117222009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11723
11724 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11725 with an i686 compiler.
11726 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11727 needed.
11728 * configure: Rebuilt.
11729
8a35fb51
SL
117302009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11731
11732 PR gdb/10783
11733
11734 * server.c (handle_search_memory_1): Correct read_addr initialization
11735 in loop for searching subsequent chunks.
11736
96f15937
PP
117372009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11738
11739 * configure.ac: New --with-libthread-db option.
11740 * thread-db.c: Allow direct dependence on libthread_db.
11741 (thread_db_free): Adjust.
11742 * config.in: Regenerate.
11743 * configure: Likewise.
889bf7c5 11744
5f7d1694
PP
117452009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11746
11747 PR gdb/10757
11748 * thread-db.c (attach_thread): New function.
11749 (maybe_attach_thread): Return success/failure.
11750 (find_new_threads_callback): Adjust.
889bf7c5
PA
11751 (thread_db_find_new_threads): Loop until no new threads.
11752
88e3b899
PA
117532009-10-13 Pedro Alves <pedro@codesourcery.com>
11754
11755 * proc-service.c (ps_lgetregs): Formatting.
11756
cdbfd419
PP
117572009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11758
11759 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11760 * configure.ac: Adjust.
11761 * linux-low.h (struct process_info_private): Move members to struct
11762 thread_db.
11763 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11764 * linux-low.c (linux_remove_process): Adjust.
11765 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11766 * server.c (handle_query): Move code ...
11767 (handle_monitor_command): ... here. New function.
11768 * target.h (struct target_ops): New member.
11769 * thread-db.c (struct thread_db): New.
11770 (libthread_db_search_path): New variable.
11771 (thread_db_create_event, thread_db_enable_reporting)
11772 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11773 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11774 (try_thread_db_load_1, dladdr_to_soname): New functions.
11775 (try_thread_db_load, thread_db_load_search): New functions.
11776 (thread_db_init): Search for libthread_db.
11777 (thread_db_free): New function.
11778 (thread_db_handle_monitor_command): Likewise.
11779 * config.in: Regenerate.
11780 * configure: Regenerate.
889bf7c5 11781
4168d2d6
UW
117822009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11783
11784 * spu-low.c (spu_kill): Wait for inferior to terminate.
11785 Call clear_inferiors.
11786 (spu_detach): Call clear_inferiors.
11787
81ecdfbb
RW
117882009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11789
11790 * aclocal.m4: Regenerate.
11791 * config.in: Likewise.
11792 * configure: Likewise.
11793
0b9ff2c0
UW
117942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11795
11796 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11797 (parse_spufs_run): New function.
11798 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11799 (ppc_breakpoint_at): Handle SPU breakpoints.
11800
efcbbd14
UW
118012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11802
11803 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11804 (SPUFS_MAGIC): Define.
11805 (spu_enumerate_spu_ids): New function.
11806 (linux_qxfer_spu): New function.
11807 (linux_target_ops): Install linux_qxfer_spu.
11808
f4d9bade
UW
118092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11810
11811 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11812 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11813 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11814 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11815 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11816 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11817 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11818 (init_registers_powerpc_cell32l): Add prototype.
11819 (init_registers_powerpc_cell64l): Likewise.
11820 (ppc_arch_setup): Detect Cell/B.E. architecture.
11821
96e946ca
RW
118222009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11823
11824 * Makefile.in (datarootdir): New variable.
11825
58d6951d
DJ
118262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11827
11828 * linux-low.c (linux_write_memory): Update debugging output.
11829 * Makefile.in (clean): Add new descriptions.
11830 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11831 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11832 * configure.srv: Add new files for arm*-*-linux*.
11833 * linux-arm-low.c: Add new declarations.
11834 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11835 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11836 (HWCAP_VFPv3D16): New.
11837 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11838 instead of __IWMMXT__.
11839 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11840 (arm_arch_setup): New.
11841 (target_regsets): Remove #ifdef. Add VFP regset.
11842 (the_low_target): Use arm_arch_setup.
11843
12b42a12
DJ
118442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11845
11846 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11847 the main thread again.
11848
ac8c974e
AR
118492009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11850
11851 Adding Neutrino gdbserver.
11852 * configure: Regenerated.
11853 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11854 * configure.srv (i[34567]86-*-nto*): New target.
11855 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11856 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11857 (nto_comctrl) [__QNX__]: New function.
11858 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11859
4424e0c3 118602009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11861
11862 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11863 srv_tgtobj.
11864
912cf4ba
PA
118652009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11866 Pedro Alves <pedro@codesourcery.com>
11867
11868 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11869 don't support CONTEXT_EXTENDED_REGISTERS.
11870 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11871 (the_low_target): Install them.
11872 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11873 failing with ERROR_PIPE_NOT_CONNECTED.
11874
aa5ca48f
DE
118752009-06-30 Doug Evans <dje@google.com>
11876 Pierre Muller <muller@ics.u-strasbg.fr>
11877
11878 Add h/w watchpoint support to x86-linux, win32-i386.
11879 * Makefile.in (SFILES): Add i386-low.c
11880 (i386_low_h): Define.
11881 (i386-low.o): Add dependencies.
11882 (linux-x86-low.o): Add i386-low.h dependency.
11883 (win32-i386-low.o): Ditto.
11884 * i386-low.c: New file.
11885 * i386-low.h: New file.
11886 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11887 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11888 * linux-low.c (linux_add_process): Initialize arch_private.
11889 (linux_remove_process): Free arch_private.
11890 (add_lwp): Initialize arch_private.
11891 (delete_lwp): Free arch_private.
11892 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11893 provided.
11894 * linux-low.h (process_info_private): New member arch_private.
11895 (lwp_info): New member arch_private.
11896 (linux_target_ops): New members new_process, new_thread,
11897 prepare_to_resume.
11898 (ptid_of): New macro.
11899 * linux-x86-low.c: Include stddef.h, i386-low.h.
11900 (arch_process_info): New struct.
11901 (arch_lwp_info): New struct.
11902 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11903 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11904 (i386_dr_low_get_status): New function.
11905 (x86_insert_point, x86_remove_point): New functions.
11906 (x86_stopped_by_watchpoint): New function.
11907 (x86_stopped_data_address): New function.
11908 (x86_linux_new_process, x86_linux_new_thread): New functions.
11909 (x86_linux_prepare_to_resume): New function.
11910 (the_low_target): Add entries for insert_point, remove_point,
11911 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11912 prepare_to_resume.
11913 * server.c (debug_hw_points): New global.
11914 (monitor_show_help): Document set debug-hw-points.
11915 (handle_query): Process "set debug-hw-points".
11916 * server.h (debug_hw_points): Declare.
11917 (paddress): Declare.
11918 * utils.c (NUMCELLS, CELLSIZE): New macros.
11919 (get_sell, xsnprintf, paddress): New functions.
11920 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11921 remove_point, stopped_by_watchpoint, stopped_data_address.
11922 * win32-i386-low.c: Include i386-low.h.
11923 (debug_reg_state): Replaces dr.
11924 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11925 (i386_dr_low_get_status): New function.
11926 (i386_insert_point, i386_remove_point): New functions.
11927 (i386_stopped_by_watchpoint): New function.
11928 (i386_stopped_data_address): New function.
11929 (i386_initial_stuff): Update.
11930 (get_thread_context,set_thread_context,i386_thread_added): Update.
11931 (the_low_target): Add entries for insert_point,
11932 remove_point, stopped_by_watchpoint, stopped_data_address.
11933 * win32-low.c (win32_insert_watchpoint): New function.
11934 (win32_remove_watchpoint): New function.
11935 (win32_stopped_by_watchpoint): New function.
11936 (win32_stopped_data_address): New function.
11937 (win32_target_ops): Add entries for insert_watchpoint,
11938 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11939 * win32-low.h (win32_target_ops): New members insert_point,
11940 remove_point, stopped_by_watchpoint, stopped_data_address.
11941
d993e290
PA
119422009-06-25 Pedro Alves <pedro@codesourcery.com>
11943
11944 * server.c (process_serial_event): Re-return unsupported, not
11945 error, if the type isn't recognized. Re-allow supporting only
11946 insert or remove packets. Also call require_running for
11947 breakpoints. Add missing break statement to default case. Tidy.
11948 * target.h (struct target_ops): Rename insert_watchpoint to
11949 insert_point, and remove_watchpoint to remove_point.
11950
11951 * linux-low.h (struct linux_target_ops): Likewise.
11952 * linux-low.c (linux_insert_watchpoint): Rename to ...
11953 (linux_insert_point): ... this. Adjust.
11954 (linux_remove_watchpoint): Rename to ...
11955 (linux_remove_point): ... this. Adjust.
11956 (linux_target_ops): Adjust.
11957 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11958 (cris_insert_point): ... this.
11959 (cris_remove_watchpoint): Rename to ...
11960 (cris_remove_point): ... this.
11961 (the_low_target): Adjust.
11962
0f54c268
PM
119632009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11964
11965 * server.c (handle_v_kill): Pass signal_pid to
11966 kill_inferior if multi_process is zero.
11967
c6314022
AR
119682009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11969
11970 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11971 * target.h (target_ops): Comment for *_watchpoint to make it clear
11972 the functions can get types '0' and '1'.
11973
4463ce24
AR
119742009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11975
11976 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11977 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11978 * regcache.c (get_regcache): Likewise.
11979 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11980 * win32-low.c (child_fetch_inferior_registers): Remove check for
11981 regno 0.
11982
cf8fd78b
PA
119832009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11984 Pedro Alves <pedro@codesourcery.com>
11985
11986 * target.h (struct target_ops) <supports_multi_process>: New
11987 callback.
11988 (target_supports_multi_process): New.
11989 * server.c (handle_query): Even if GDB reports support, only
11990 enable multi-process if the target also supports it. Report
11991 multi-process support only if the target backend supports it.
11992 * linux-low.c (linux_supports_multi_process): New function.
11993 (linux_target_ops): Install it as target_supports_multi_process
11994 callback.
11995
47c0c975
DE
119962009-05-24 Doug Evans <dje@google.com>
11997
e09875d4
DE
11998 Global renaming of find_thread_pid to find_thread_ptid.
11999 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12000 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12001 All callers updated.
12002
e27d73f6
DE
12003 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12004 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12005 directly.
12006
47c0c975
DE
12007 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12008 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12009 (linux_resume_one_lwp): Ditto.
12010
2acc282a
DE
120112009-05-23 Doug Evans <dje@google.com>
12012
12013 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12014 from struct inferior_list_entry * to struct lwp_info *.
12015 All callers updated.
12016
9f1036c1
DE
120172009-05-13 Doug Evans <dje@google.com>
12018
12019 * linux-x86-low.c: Don't include assert.h.
12020 (x86_siginfo_fixup): Use fatal, not assert.
12021 (x86_arch_setup): Fix comment.
12022
d0722149
DE
120232009-05-12 Doug Evans <dje@google.com>
12024
12025 Biarch support for i386/amd64 gdbserver.
12026 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12027 Add linux-x86-low.c.
12028 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12029 (linux-x86-low.o): Add.
12030 * linux-x86-64-low.c: Delete.
12031 * linux-i386-low.c: Delete.
12032 * linux-x86-low.c: New file.
12033 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12034 linux-x86-low.o.
12035 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12036 linux-x86-low.o.
12037 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12038 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12039 (linux_child_pid_to_exec_file): New function.
12040 (elf_64_header_p, elf_64_file_p): New functions.
12041 (siginfo_fixup): New function.
12042 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12043 give target a chance to convert layout.
12044 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12045 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12046
fdeb2a12
DE
120472009-05-07 Doug Evans <dje@google.com>
12048
12049 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12050 (regsets_store_inferior_registers): Ditto.
12051
a6dbe5df
PA
120522009-05-06 Pedro Alves <pedro@codesourcery.com>
12053
12054 PR server/10048
12055
12056 * linux-low.c (must_set_ptrace_flags): Delete.
12057 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12058 of the global.
12059 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12060 `lwp->must_set_ptrace_flags' instead.
ba42693b 12061 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12062 (linux_wait_1): ... not here.
12063
5091eb23
DE
120642009-04-30 Doug Evans <dje@google.com>
12065
9f767825
DE
12066 * inferiors.c (started_inferior_callback): New function.
12067 (attached_inferior_callback): New function.
12068 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12069 * server.c (print_started_pid, print_attached_pid): New functions.
12070 (detach_or_kill_for_exit): New function.
12071 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12072 * server.h (have_started_inferiors_p): Declare.
12073 (have_attached_inferiors_p): Declare.
12074
5091eb23
DE
12075 * inferiors.c (remove_process): Fix memory leak, free process.
12076 * linux-low.c (linux_remove_process): New function.
12077 (linux_kill): Call it instead of remove_process.
12078 (linux_detach, linux_wait_1): Ditto.
12079
155c8968
PA
120802009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12081
12082 * configure.srv: Add x86 Windows CE target.
12083
7fe519cb
UW
120842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12085
12086 * inferiors.c (get_thread_process): Make global.
12087 * server.h (get_thread_process): Add prototype.
12088 * thread-db.c (find_one_thread): Use get_thread_process
12089 instead of current_process.
12090 (thread_db_get_tls_address): Do not crash if called when
12091 thread layer is not yet initialized.
12092
5472f405
UW
120932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12094
12095 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12096 * spu-low.c (current_tid): Rename to ...
12097 (current_ptid): ... this.
12098 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12099 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12100 ptid_get_lwp (current_ptid) instead of current_tid.
12101 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12102 instead of current_tid. Use find_process_pid to verify pid
12103 argument is valid. Pass proper argument to remove_process.
12104 (spu_thread_alive): Compare current_ptid instead of current_tid.
12105 (spu_resume): Likewise.
12106
55ac2b99
PA
121072009-04-02 Pedro Alves <pedro@codesourcery.com>
12108
12109 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12110 variable.
12111
95954743
PA
121122009-04-01 Pedro Alves <pedro@codesourcery.com>
12113
12114 Implement the multiprocess extensions, and add linux multiprocess
12115 support.
12116
12117 * server.h (ULONGEST): Declare.
12118 (struct ptid, ptid_t): New.
12119 (minus_one_ptid, null_ptid): Declare.
12120 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12121 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12122 (struct inferior_list_entry): Change `id' type from unsigned from
12123 to ptid_t.
12124 (struct sym_cache, struct breakpoint, struct
12125 process_info_private): Forward declare.
12126 (struct process_info): Declare.
12127 (current_process): Declare.
12128 (all_processes): Declare.
12129 (initialize_inferiors): Declare.
12130 (add_thread): Adjust to use ptid_t.
12131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12132 (add_process, remove_process, find_thread_pid): Declare.
12133 (find_inferior_id): Adjust to use ptid_t.
12134 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12135 (multi_process): Declare.
12136 (push_event): Adjust to use ptid_t.
12137 (read_ptid, write_ptid): Declare.
12138 (prepare_resume_reply): Adjust to use ptid_t.
12139 (clear_symbol_cache): Declare.
12140 * inferiors.c (all_processes): New.
12141 (null_ptid, minus_one_ptid): New.
12142 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12143 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12144 (add_thread): Change unsigned long to ptid. Remove gdb_id
12145 parameter. Adjust.
12146 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12147 (gdb_id_to_thread): Rename to ...
12148 (find_thread_pid): ... this. Change unsigned long to ptid.
12149 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12150 (loaded_dll, pull_pid_from_list): Adjust.
12151 (add_process, remove_process, find_process_pid)
12152 (get_thread_process, current_process, initialize_inferiors): New.
12153 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12154 (struct target_waitstatus) <related_pid>: Ditto.
12155 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12156 return type to int.
12157 (struct target_ops) <join>: Add `pid' argument.
12158 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12159 (struct target_ops) <wait>: Add `ptid' field. Change return type
12160 to ptid.
12161 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12162 (mywait): Add `ptid' argument. Change return type to ptid_t.
12163 (target_pid_to_str): Declare.
12164 * target.c (set_desired_inferior): Adjust to use ptids.
12165 (mywait): Add new `ptid' argument. Adjust.
12166 (target_pid_to_str): New.
12167 * mem-break.h (free_all_breakpoints): Declare.
12168 * mem-break.c (breakpoints): Delelete.
12169 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12170 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12171 to use per-process breakpoint list.
12172 (free_all_breakpoints): New.
12173 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12174 (symbol_cache, all_symbols_looked_up): Delete.
12175 (hexchars): New.
12176 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12177 read_ptid): New.
12178 (prepare_resume_reply): Change ptid argument's type from unsigned
12179 long to ptid_t. Adjust. Implement W;process and X;process.
12180 (free_sym_cache, clear_symbol_cache): New.
12181 (look_up_one_symbol): Adjust to per-process symbol cache. *
12182 * server.c (cont_thread, general_thread, step_thread): Change type
12183 to ptid_t.
12184 (attached): Delete.
12185 (multi_process): New.
12186 (last_ptid): Change type to ptid_t.
12187 (struct vstop_notif) <ptid>: Change type to ptid_t.
12188 (queue_stop_reply, push_event): Change `ptid' argument's type to
12189 ptid_t.
12190 (discard_queued_stop_replies): Add `pid' argument.
12191 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12192 changes. Don't reference the `attached' global.
12193 (attach_inferior): Adjust to mywait interface changes.
12194 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12195 features. Handle and report "multiprocess+". Handle
12196 "qAttached:PID".
12197 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12198 changes.
12199 (handle_v_kill): New.
12200 (handle_v_stopped): Adjust to use target_pid_to_str.
12201 (handle_v_requests): Allow multiple attaches and runs when
12202 multiprocess extensions are in effect. Handle "vKill".
12203 (myresume): Adjust to use ptids.
12204 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12205 (handle_status): Adjust to discard_queued_stop_replies interface
12206 change.
12207 (first_thread_of, kill_inferior_callback)
12208 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12209 (main): Call initialize_inferiors. Adjust to use ptids, killing
12210 and detaching from all inferiors. Handle multiprocess packet
12211 variants.
12212 * linux-low.h: Include gdb_proc_service.h.
12213 (struct process_info_private): New.
12214 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12215 <lwpid_of>: Use ptid_get_lwp.
12216 (get_lwp_thread): Adjust.
12217 (struct lwp_info): Add `dead' member.
12218 (find_lwp_pid): Declare.
12219 * linux-low.c (thread_db_active): Delete.
12220 (new_inferior): Adjust comment.
12221 (inferior_pid): Delete.
12222 (linux_add_process): New.
12223 (handle_extended_wait): Adjust.
12224 (add_lwp): Change unsigned long to ptid.
12225 (linux_create_inferior): Add process to processes table. Adjust
12226 to use ptids. Don't set new_inferior here.
12227 (linux_attach_lwp): Rename to ...
12228 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12229 it. Adjust to use ptids.
12230 (linux_attach_lwp): New.
12231 (linux_attach): Add process to processes table. Don't set
12232 new_inferior here.
12233 (struct counter): New.
12234 (second_thread_of_pid_p, last_thread_of_process_p): New.
12235 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12236 multiple processes.
12237 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12238 processes. Remove process from process table.
12239 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12240 to multiple processes.
12241 (any_thread_of): New.
12242 (linux_detach): Add `pid' argument, and handle it. Remove process
12243 from processes table.
12244 (linux_join): Add `pid' argument. Handle it.
12245 (linux_thread_alive): Change unsighed long argument to ptid_t.
12246 Consider dead lwps as not being alive.
12247 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12248 threads we're not interested in.
12249 (same_lwp, find_lwp_pid): New.
12250 (linux_wait_for_lwp): Change `pid' argument's type from int to
12251 ptid_t. Adjust.
12252 (linux_wait_for_event): Rename to ...
12253 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12254 from int to ptid_t. Adjust.
12255 (linux_wait_for_event): New.
12256 (linux_wait_1): Add `ptid' argument. Change return type to
12257 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12258 that exit from the process table.
12259 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12260 Adjust.
12261 (mark_lwp_dead): New.
12262 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12263 stopping all threads, mark its main lwp as dead.
12264 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12265 ptids.
12266 (fetch_register, usr_store_inferior_registers)
12267 (regsets_fetch_inferior_registers)
12268 (regsets_store_inferior_registers, linux_read_memory)
12269 (linux_write_memory): Inline `inferior_pid'.
12270 (linux_look_up_symbols): Adjust to use per-process
12271 `thread_db_active'.
12272 (linux_request_interrupt): Adjust to use ptids.
12273 (linux_read_auxv): Inline `inferior_pid'.
12274 (initialize_low): Don't reference thread_db_active.
12275 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12276 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12277 (ps_getpid): Return the pid of the current inferior.
12278 * thread-db.c (proc_handle, thread_agent): Delete.
12279 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12280 per-process data.
12281 (find_one_thread): Change argument type to ptid_t. Adjust to
12282 per-process data.
12283 (maybe_attach_thread): Adjust to per-process data and ptids.
12284 (thread_db_find_new_threads): Ditto.
12285 (thread_db_init): Ditto.
12286 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12287 processes table. Adjust to use ptids.
12288 (spu_kill, spu_detach): Adjust interface. Remove process from
12289 processes table.
12290 (spu_join, spu_thread_alive): Adjust interface.
12291 (spu_wait): Adjust interface. Remove process from processes
12292 table. Adjust to use ptids.
12293 * win32-low.c (current_inferior_tid): Delete.
12294 (current_inferior_ptid): New.
12295 (debug_event_ptid): New.
12296 (thread_rec): Take a ptid. Adjust.
12297 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12298 (child_delete_thread): Ditto.
12299 (do_initial_child_stuff): Add `attached' argument. Add process to
12300 processes table.
12301 (child_fetch_inferior_registers, child_store_inferior_registers):
12302 Adjust.
12303 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12304 (win32_attach): Pass 1 to do_initial_child_stuff.
12305 (win32_kill): Adjust interface. Remove process from processes
12306 table.
12307 (win32_detach): Ditto.
12308 (win32_join): Adjust interface.
12309 (win32_thread_alive): Take a ptid.
12310 (win32_resume): Adjust to use ptids.
12311 (get_child_debug_event): Ditto.
12312 (win32_wait): Adjust interface. Remove exiting process from
12313 processes table.
12314
bd99dc85
PA
123152009-04-01 Pedro Alves <pedro@codesourcery.com>
12316
12317 Non-stop mode support.
12318
12319 * server.h (non_stop): Declare.
12320 (gdb_client_data, handler_func): Declare.
12321 (delete_file_handler, add_file_handler, start_event_loop):
12322 Declare.
12323 (handle_serial_event, handle_target_event, push_event)
12324 (putpkt_notif): Declare.
12325 * target.h (enum resume_kind): New.
12326 (struct thread_resume): Replace `step' field by `kind' field.
12327 (TARGET_WNOHANG): Define.
12328 (struct target_ops) <wait>: Add `options' argument.
12329 <supports_non_stop, async, start_non_stop>: New fields.
12330 (target_supports_non_stop, target_async): New.
12331 (start_non_stop): Declare.
12332 (mywait): Add `options' argument.
12333 * target.c (mywait): Add `options' argument. Print child exit
12334 notifications here.
12335 (start_non_stop): New.
12336 * server.c (non_stop, own_buf, mem_buf): New globals.
12337 (struct vstop_notif): New.
12338 (notif_queue): New global.
12339 (queue_stop_reply, push_event, discard_queued_stop_replies)
12340 (send_next_stop_reply): New.
12341 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12342 interface changes.
12343 (attach_inferior): In non-stop mode, don't wait for the target
12344 here.
12345 (handle_general_set): Handle QNonStop.
12346 (handle_query): When handling qC, return the current general
12347 thread, instead of the first thread of the list.
12348 (handle_query): If the backend supports non-stop mode, include
12349 QNonStop+ in the qSupported query response.
12350 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12351 and non-stop mode.
12352 (handle_v_attach, handle_v_run): Handle non-stop mode.
12353 (handle_v_stopped): New.
12354 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12355 (myresume): Adjust to use resume_kind. Handle non-stop.
12356 (queue_stop_reply_callback): New.
12357 (handle_status): Handle non-stop mode.
12358 (main): Clear non_stop flag on reconnection. Use the event-loop.
12359 Refactor serial protocol handling from here ...
12360 (process_serial_event): ... to this new function. When GDB
12361 selects any thread, select one here. In non-stop mode, wait until
12362 GDB acks all pending events before exiting.
12363 (handle_serial_event, handle_target_event): New.
12364 * remote-utils.c (remote_open): Install remote_desc in the event
12365 loop.
12366 (remote_close): Remove remote_desc from the event loop.
12367 (putpkt_binary): Rename to...
12368 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12369 (putpkt_binary): New as wrapper around putpkt_binary_1.
12370 (putpkt_notif): New.
12371 (prepare_resume_reply): In non-stop mode, don't change the
12372 general_thread.
12373 * event-loop.c: New.
12374 * Makefile.in (OBJ): Add event-loop.o.
12375 (event-loop.o): New rule.
12376
12377 * linux-low.h (pid_of): Moved here.
12378 (lwpid_of): New.
12379 (get_lwp_thread): Use lwpid_of.
12380 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12381 * linux-low.c (pid_of): Delete.
12382 (inferior_pid): Use lwpid_of.
12383 (linux_event_pipe): New.
12384 (target_is_async_p): New.
12385 (delete_lwp): New.
12386 (handle_extended_wait): Use lwpid_of.
12387 (add_lwp): Don't set lwpid field.
12388 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12389 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12390 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12391 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12392 first. Adjust to linux_wait_for_event interface changes. Use
12393 lwpid_of.
12394 (linux_detach): Don't delete the main lwp here.
12395 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12396 (status_pending_p): Don't consider explicitly suspended lwps.
12397 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12398 pointer. Add OPTIONS argument. Change return type to int. Use
12399 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12400 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12401 pointer. Add status pointer argument. Return a pid instead of a
12402 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12403 changes. In non-stop mode, don't switch to a random thread.
12404 (linux_wait): Rename to...
12405 (linux_wait_1): ... this. Add target_options argument, and handle
12406 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12407 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12408 clean exit and signal exit code. Don't stop all threads in
12409 non-stop mode. In all-stop mode, only stop all threads when
12410 reporting a stop to GDB. Handle explicit thread stop requests.
12411 (async_file_flush, async_file_mark): New.
12412 (linux_wait): New.
12413 (send_sigstop): Use lwpid_of.
12414 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12415 interface changes. In non-stop mode, don't switch to a random
12416 thread.
12417 (linux_resume_one_lwp): Use lwpid_of.
12418 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12419 (linux_resume_one_thread): ... this. Handle resume_stop. In
12420 non-stop mode, don't look for pending flag in all threads.
12421 (resume_status_pending_p): Don't consider explicitly suspended
12422 threads.
12423 (my_waitpid): Reimplement. Emulate __WALL.
12424 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12425 Use lwpid_of.
12426 (sigchld_handler, linux_supports_non_stop, linux_async)
12427 (linux_start_non_stop): New.
12428 (linux_target_ops): Register linux_supports_non_stop, linux_async
12429 and linux_start_non_stop.
12430 (initialize_low): Install SIGCHLD handler.
12431 * thread-db.c (thread_db_create_event, find_one_thread)
12432 (thread_db_get_tls_address): Use lwpid_of.
12433 * win32-low.c (win32_detach): Adjust to use resume_kind.
12434 (win32_wait): Add `options' argument.
12435 * spu-low.c (spu_resume): Adjust to use resume_kind.
12436 (spu_wait): Add `options' argument.
12437
5b1c542e
PA
124382009-04-01 Pedro Alves <pedro@codesourcery.com>
12439
12440 Decouple target code from remote protocol.
12441
12442 * target.h (enum target_waitkind): New.
12443 (struct target_waitstatus): New.
12444 (struct target_ops) <wait>: Return an unsigned long. Take a
12445 target_waitstatus pointer instead of a char pointer.
12446 (mywait): Likewise.
12447 * target.c (mywait): Change prototype to return an unsigned long.
12448 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12449 * server.h (thread_from_wait, old_thread_from_wait): Delete
12450 declarations.
12451 (prepare_resume_reply): Change prototype to take a
12452 target_waitstatus.
12453 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12454 (last_status, last_ptid): New.
12455 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12456 pid instead of a signal.
12457 (attach_inferior): Remove "status" and "signal" parameters.
12458 Adjust.
12459 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12460 not as an address.
12461 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12462 (handle_v_requests, myresume): Remove "status" and "signal"
12463 parameters. Adjust.
12464 (handle_status): New.
12465 (main): Delete local `status'. Adjust.
12466 * remote-utils.c: Include target.h.
12467 (prepare_resume_reply): Change prototype to take a
12468 target_waitstatus. Adjust.
12469
12470 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12471 interface.
12472 * spu-low.c (spu_wait): Adjust.
12473 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12474 Delete.
12475 (win32_wait): Adjust.
12476
2bd7c093
PA
124772009-04-01 Pedro Alves <pedro@codesourcery.com>
12478
12479 * target.h (struct thread_resume): Delete leave_stopped member.
12480 (struct target_ops): Add a `n' argument to the `resume' callback.
12481 * server.c (start_inferior): Adjust.
12482 (handle_v_cont, myresume): Adjust.
12483 * linux-low.c (check_removed_breakpoint): Adjust to resume
12484 interface change, and to removed leave_stopped field.
12485 (resume_ptr): Delete.
12486 (struct thread_resume_array): New.
12487 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12488 resume interface change.
12489 (linux_continue_one_thread, linux_queue_one_thread)
12490 (resume_status_pending_p): Check if the resume field is NULL
12491 instead of checking the leave_stopped member.
12492 (linux_resume): Adjust to the target resume interface change.
12493 * spu-low.c (spu_resume): Adjust to the target resume interface
12494 change.
12495 * win32-low.c (win32_detach, win32_resume): Ditto.
12496
c35fafde
PA
124972009-04-01 Pedro Alves <pedro@codesourcery.com>
12498
12499 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12500 flag.
12501 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12502 pending.
12503 (linux_continue_one_thread): Only preserve the stepping flag if
12504 there's a pending breakpoint.
12505
0a59d50b
PA
125062009-03-31 Pedro Alves <pedro@codesourcery.com>
12507
12508 * server.c (main): After the inferior having exited, call
12509 remote_close before exiting gdbserver.
12510
f04c6d38
TJB
125112009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12512
12513 Fix size of FPSCR in Power 7 processors.
12514 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12515 (PPC_FEATURE_HAS_DFP): New #define.
12516 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12517 size of the FPSCR.
12518
78e5cee6
PA
125192009-03-23 Pedro Alves <pedro@codesourcery.com>
12520
12521 * server.c (handle_query) Whitespace and formatting.
12522
1b3f6016
PA
125232009-03-22 Pedro Alves <pedro@codesourcery.com>
12524
12525 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12526 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12527 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12528 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12529 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12530 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12531 Makefile.in, configure.ac: Fix whitespace throughout.
12532 * configure: Regenerate.
12533
a07b2135
PA
125342009-03-22 Pedro Alves <pedro@codesourcery.com>
12535
12536 * inferiors.c (find_inferior): Make it safe for the callback
12537 function to delete the currently iterated inferior.
12538
67cc2626
PA
125392009-03-22 Pedro Alves <pedro@codesourcery.com>
12540
12541 * Makefile.in (linuw_low_h): Move higher.
12542 (thread-db.o): Depend on $(linux_low_h).
12543
54a0b537
PA
125442009-03-17 Pedro Alves <pedro@codesourcery.com>
12545
12546 Rename "process" to "lwp" throughout.
12547
12548 * linux-low.c (all_processes): Rename to...
12549 (all_lwps): ... this.
12550 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12551 (add_process): Rename to ...
12552 (add_lwp): ... this. Adjust.
12553 (linux_create_inferior): Adjust.
12554 (linux_attach_lwp): Adjust.
12555 (linux_attach): Adjust.
12556 (linux_kill_one_process): Rename to ...
12557 (linux_kill_one_lwp): ... this. Adjust.
12558 (linux_kill): Adjust.
12559 (linux_detach_one_process): Rename to ...
12560 (linux_detach_one_lwp): ... this. Adjust.
12561 (linux_detach): Adjust.
12562 (check_removed_breakpoint): Adjust.
12563 (status_pending_p): Adjust.
12564 (linux_wait_for_process): Rename to ...
12565 (linux_wait_for_lwp): ... this. Adjust.
12566 (linux_wait_for_event): Adjust.
12567 (send_sigstop): Adjust.
12568 (wait_for_sigstop): Adjust.
12569 (stop_all_processes): Rename to ...
12570 (stop_all_lwps): ... this.
12571 (linux_resume_one_process): Rename to ...
12572 (linux_resume_one_lwp): ... this. Adjust.
12573 (linux_set_resume_request, linux_continue_one_thread)
12574 (linux_queue_one_thread, resume_status_pending_p)
12575 (usr_store_inferior_registers, regsets_store_inferior_registers)
12576 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12577 Adjust.
12578 * linux-low.h (get_process): Rename to ...
12579 (get_lwp): ... this. Adjust.
12580 (get_thread_process): Rename to ...
12581 (get_thread_lwp): ... this. Adjust.
12582 (get_process_thread): Rename to ...
12583 (get_lwp_thread): ... this. Adjust.
12584 (struct process_info): Rename to ...
12585 (struct lwp_info): ... this.
12586 (all_processes): Rename to ...
12587 (all_lwps): ... this.
12588 * proc-service.c (ps_lgetregs): Adjust.
12589 * thread-db.c (thread_db_create_event, find_one_thread)
12590 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12591
0b16c5cf
PA
125922009-03-14 Pedro Alves <pedro@codesourcery.com>
12593
12594 * server.c (handle_query): Handle "qAttached".
12595
32de4b9d
NS
125962009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12597
12598 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12599 GPLv3, update license URL.
12600
2aecd87f
DE
126012009-03-01 Doug Evans <dje@google.com>
12602
93efd302 12603 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12604 (server_h): Add gdb_signals.h.
12605 (signals.o): Update.
12606 * server.h (target_signal_from_host,target_signal_to_host_p)
12607 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12608
86b1f9c5
PM
126092009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12610
12611 * remote-utils.c (getpkt): Also generate remote-debug
12612 information if noack_mode is set.
12613
4aa995e1
PA
126142009-02-06 Pedro Alves <pedro@codesourcery.com>
12615
12616 * server.c (handle_query): Report qXfer:siginfo:read and
12617 qXfer:siginfo:write as supported and handle them.
12618 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12619 * linux-low.c (linux_xfer_siginfo): New.
12620 (linux_target_ops): Set it.
12621
62709adf
PA
126222009-01-26 Pedro Alves <pedro@codesourcery.com>
12623
12624 * server.c (gdbserver_usage): Mention --remote-debug.
12625 (main): Accept '--remote-debug' switch.
12626
aef93bd7
DE
126272009-01-18 Doug Evans <dje@google.com>
12628
12629 * regcache.c (new_register_cache): No need to check result of xcalloc.
12630 * server.c (handle_search_memory): Back out calls to xmalloc,
12631 result is checked and error is returned to user upon failure.
12632 (handle_query): Ditto. Add more checks for result of malloc.
12633 (handle_v_cont): Check result of malloc, report error back to
12634 user upon failure.
12635 (handle_v_run): Ditto. Call freeargv.
12636 * server.h (freeargv): Declare.
12637 * utils.c (freeargv): New fn.
12638
54363045
DE
126392009-01-15 Doug Evans <dje@google.com>
12640
f626972c
DE
12641 * gdbreplay.c (perror_with_name): Make arg const char *.
12642 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12643 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12644 * utils.c (perror_with_name): Make arg const char *.
54363045 12645
18aae699
PA
126462009-01-14 Pedro Alves <pedro@codesourcery.com>
12647
12648 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12649 when handling a EXIT_PROCESS_DEBUG_EVENT.
12650
ff703abe
JB
126512009-01-06 Joel Brobecker <brobecker@adacore.com>
12652
12653 * gdbreplay.c (gdbreplay_version): Update copyright year.
12654 * server.c (gdbserver_version): Likewise.
12655
f21cc1a2 126562009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12657
12658 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12659 (handle_extended_wait): Improve comment.
0e21c1ec 12660
bca929d3
DE
126612008-12-13 Doug Evans <dje@google.com>
12662
12663 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12664 * server.h (ATTR_MALLOC): New macro.
12665 (xmalloc,xcalloc,xstrdup): Declare.
12666 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12667 * inferiors.c: Ditto.
12668 * linux-low.c: Ditto.
12669 * mem-break.c: Ditto.
12670 * regcache.c: Ditto.
12671 * remote-utils.c: Ditto.
12672 * server.c: Ditto.
12673 * target.c: Ditto.
12674 * win32-low.c: Ditto.
12675
97438e3f
DE
126762008-12-12 Doug Evans <dje@google.com>
12677
896c7fbb
DE
12678 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12679 in debugging printf.
12680
97438e3f
DE
12681 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12682
e3b886f8
DE
126832008-12-09 Doug Evans <dje@google.com>
12684
12685 * linux-low.h (struct process_info): Delete member tid, unused.
12686 * thread-db.c (find_one_thread): Update.
12687 (maybe_attach_thread): Update.
12688
07e059b5
VP
126892008-12-02 Pedro Alves <pedro@codesourcery.com>
12690
889bf7c5
PA
12691 * target.h (struct target_ops): Add qxfer_osdata member.
12692 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12693 and dirent.h.
12694 (linux_qxfer_osdata): New functions.
12695 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12696 callback.
12697 * server.c (handle_query): Handle "qXfer:osdata:read:".
12698 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12699 (buffer_xml_printf): New functions.
12700 * server.h (struct buffer): New.
12701 (buffer_grow_str, buffer_grow_str0): New macros.
12702 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12703 (buffer_xml_printf): Declare.
07e059b5 12704
4cab47ab
DE
127052008-11-24 Doug Evans <dje@google.com>
12706
12707 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12708
f142445f
DJ
127092008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12710
12711 * server.c (handle_v_run): Always use the supplied argument list.
12712
d0107bb6 127132008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12714
d0107bb6
BW
12715 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12716 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12717
2c4ad781
TJB
127182008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12719
12720 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12721 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12722 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12723 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12724 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12725 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12726 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12727 XML target descriptions.
12728 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12729 when inferior is running on an ISA 2.05 or later processor. Add
12730 special case to return offset for full 64-bit slot of FPSCR when
12731 in 32-bits.
12732
dfb64f85
DJ
127332008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12734
12735 * Makefile.in (SFILES, clean): Added sparc64 files.
12736 (reg-sparc64.o, reg-sparc64.c): New.
12737 * configure.srv (sparc*-*-linux*): New configuration.
12738 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12739 syscall arguments for SPARC.
12740 (regsets_store_inferior_registers): Likewise.
12741 * linux-sparc-low.c: New file.
12742
66b6e1dd
DE
127432008-10-21 Doug Evans <dje@google.com>
12744
12745 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12746 (READLINE_DIR,READLINE_DEP): Delete.
12747 (INTERNAL_CFLAGS): Update.
12748 (LINTFLAGS): Update.
12749
9b710a42
PA
127502008-10-10 Pedro Alves <pedro@codesourcery.com>
12751
12752 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12753 whole argv from the last run, not just argv[0].
12754
5822d809
PA
127552008-09-08 Pedro Alves <pedro@codesourcery.com>
12756
12757 * regcache.c (new_register_cache): Return NULL if the register
12758 cache size isn't known yet.
12759 (free_register_cache): Avoid dereferencing a NULL regcache.
12760
74aac56f
DJ
127612008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * configure.srv: Merge MIPS and MIPS64.
12764
400b20f5
MR
127652008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12766
12767 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12768
677c5bb1
LM
127692008-08-18 Luis Machado <luisgpm@br.ibm.com>
12770
12771 * Makefile.in: Add required vsx dependencies.
12772
12773 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12774 Declare init_registers_powerpc_vsx32l.
12775 Declare init_registers_powerpc_vsx64l.
12776 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12777 (ppc_arch_setup): Check for VSX in hwcap.
12778 (ppc_fill_vsxregset): New function.
12779 (ppc_store_vsxregset): New function.
12780 Add new VSX entry in regset_info target_regsets.
12781
12782 * configure.srv: Add new VSX dependencies.
12783
a6f3e723
SL
127842008-08-12 Pedro Alves <pedro@codesourcery.com>
12785
12786 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12787 (remote_open): Set or clear transport_is_reliable.
12788 (putpkt_binary): Don't expect acks in noack mode.
12789 (getpkt): Don't send ack/nac in noack mode.
12790 * server.c (handle_general_set): Handle QStartNoAckMode.
12791 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12792 qSupported.
12793 (main): Reset noack_mode on every connection.
12794 * server.h (noack_mode): Declare.
12795
a417dc56
RW
127962008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12797
12798 * Makefile.in (GDBREPLAY_OBS): New variable.
12799 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12800
3221518c
UW
128012008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12802 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12805 (usr_store_inferior_registers): Likewise.
12806 (regsets_store_inferior_registers): Likewise.
12807
ec56be1b
PA
128082008-07-31 Rolf Jansen <rj@surtec.com>
12809 Pedro Alves <pedro@codesourcery.com>
12810
12811 * configure.ac: Check for memmem declaration.
12812 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12813 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12814 (disable_packet_qfThreadInfo): Unconditionally compile.
12815 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12816 * configure, config.in: Regenerate.
12817
2fe5e3ff
DE
128182008-07-28 Doug Kwan <dougkwan@google.com>
12819
12820 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12821 (linux_write_memory): Remove declaration of errno.
12822
836acd6d
UW
128232008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12824
12825 * linux-low.c (handle_extended_wait): Do not use "status"
12826 variable uninitialized.
12827
aeba519e
PA
128282008-07-07 Pedro Alves <pedro@codesourcery.com>
12829
12830 * server.c (handle_v_attach): Inhibit reporting dll changes.
12831
db42f210
PA
128322008-06-27 Pedro Alves <pedro@codesourcery.com>
12833
12834 * remote-utils.c (prepare_resume_reply): If requested, don't
12835 output "thread:TID" in the T stop reply.
12836
12837 * server.c (disable_packet_vCont, disable_packet_Tthread)
12838 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12839 (handle_query): If requested, disable support for qC, qfThreadInfo
12840 and qsThreadInfo.
12841 (handle_v_requests): If requested, disable support for vCont.
12842 (gdbserver_show_disableable): New.
12843 (main): Handle --disable-packet and --disable-packet=LIST.
12844
12845 * server.h (disable_packet_vCont, disable_packet_Tthread)
12846 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12847
8e4c5421
CD
128482008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12849
12850 * server.c (gdbserver_usage): Mention --version.
12851
6e23a804
DJ
128522008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12853
12854 * Makefile.in (gdbreplay.o): New rule.
12855
90aa6a40
JM
128562008-06-06 Joseph Myers <joseph@codesourcery.com>
12857
12858 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12859 message, not gdbserver.
12860
c16158bc 128612008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12862 Nathan Sidwell <nathan@codesourcery.com>
12863 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12864
12865 * acinclude.m4: Include ../../config/acx.m4.
12866 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12867 * configure, config.in: Regenerate.
12868 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12869 * server.c (gdbserver_version): Print PKGVERSION.
12870 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12871 (main): Adjust gdbserver_usage calls.
12872 * gdbreplay.c (version, host_name): Add declarations.
12873 (gdbreplay_version, gdbreplay_usage): New.
12874 (main): Accept --version and --help options.
12875
aeb75bf5
DJ
128762008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12879 (arm_breakpoint_at): Handle Thumb.
12880 (the_low_target): Add comment.
12881
76b233dd
UW
128822008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12883
12884 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12885
08388c79
DE
128862008-05-09 Doug Evans <dje@google.com>
12887
a3c83fae
DE
12888 * server.h (decode_search_memory_packet): Declare.
12889 * remote-utils.c (decode_search_memory_packet): New fn.
12890 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12891 (handle_search_memory): New fn.
12892 (handle_query): Process qSearch:memory packets.
12893
bb9c3d36
UW
128942008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12895
12896 * regcache.c (registers_length): Remove.
12897 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12898 full register packet.
12899 * regcache.h (registers_length): Remove prototype.
12900 * server.h (PBUFSIZ): Define to 16384.
12901
7284e1be
UW
129022008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12903
12904 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12905 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12906 powerpc-64l.o, and powerpc-altivec64l.o.
12907 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12908 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12909 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12910 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12911 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12912 to srv_xmlfiles.
12913
12914 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12915 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12916 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12917 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12918 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12919 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12920 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12921 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12922 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12923 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12924 (clean): Update.
12925
12926 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12927 (init_registers_powerpc_32l): ... this new prototype.
12928 (init_registers_powerpc_32): Remove, replace by ...
12929 (init_registers_powerpc_altivec32l): ... this new prototype.
12930 (init_registers_powerpc_e500): Remove, replace by ...
12931 (init_registers_powerpc_e500l): ... this new prototype.
12932 (init_registers_ppc64): Remove, replace by ...
12933 (init_registers_powerpc_64l): ... this new prototype.
12934 (init_registers_powerpc_64): Remove, replace by ...
12935 (init_registers_powerpc_altivec64l): ... this new prototype.
12936 (ppc_num_regs): Set to 73.
12937 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12938 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12939 (ppc_cannot_store_register): Handle orig_r3 and trap.
12940 (ppc_arch_setup): Update init_registers_... calls.
12941 (ppc_fill_gregset): Handle orig_r3 and trap.
12942
12943 * inferiors.c (clear_inferiors): Reset current_inferior.
12944
fdc59709
PB
129452008-04-23 Paolo Bonzini <bonzini@gnu.org>
12946
889bf7c5
PA
12947 * acinclude.m4: Add override.m4.
12948 * configure: Regenerate.
fdc59709 12949
c9b2f845
UW
129502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12951
12952 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12953 initial call to init_register_ppc64.
12954
550512b8
UW
129552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12956
43aaf8b6
PA
12957 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12958 single powerpc*-*-linux* case.
550512b8
UW
12959 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12960
b6430ec3
UW
129612008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12962
12963 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12964 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12965 from reg_xmlfiles.
12966 * linux-ppc-low.c: Include <elf.h>.
12967 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12968 (ppc_hwcap): New global variable.
12969 (ppc_regmap): Remove __SPE__ #ifdef sections.
12970 (ppc_regmap_e500): New global variable.
12971 (ppc_cannot_store_register): Update __SPE__ special case.
12972 (ppc_get_hwcap): New function.
12973 (ppc_arch_setup): Use it to determine whether inferior supports
12974 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12975 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12976 Do not access registers if target does not support AltiVec.
12977 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12978 Do not access registers if target does not support SPE.
12979 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12980
52fa2412
UW
129812008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12982
12983 * linux-low.c (disabled_regsets, num_regsets): New.
12984 (use_regsets_p): Delete.
12985 (linux_wait_for_process): Clear disabled_regsets.
12986 (regsets_fetch_inferior_registers): Check and set it.
12987 (regsets_store_inferior_registers): Likewise.
12988 (linux_fetch_registers, linux_store_registers): Do not use
12989 use_regsets_p.
12990 (initialize_low): Allocate disabled_regsets.
12991
e28b3332
DJ
129922008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * Makefile.in (LIBOBJS): New.
12995 (OBS): Use LIBOBJS.
12996 (memmem.o): New rule.
12997 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12998 * configure: Regenerated.
12999
4536995d
UW
130002008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13001
13002 * server.c (handle_query): Never return "unsupported" for
13003 qXfer:features:read queries.
13004
221c031f
UW
130052008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * server.c (get_features_xml): Fix inverted condition.
13008 (handle_query): Always support qXfer:feature:read.
13009
ccd213ac
DJ
130102008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13011
13012 * server.c (wrapper_argv): New.
13013 (start_inferior): Handle wrapper_argv. If set, expect an extra
13014 trap.
13015 (gdbserver_usage): Document --wrapper.
13016 (main): Parse --wrapper.
13017
6fe305f7
UW
130182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13019
13020 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13021 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13022 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13023 (ppc_set_pc): Likewise.
13024 (ppc_arch_setup): New function.
13025 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13026 of collect_register.
889bf7c5 13027 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13028
5b0a002e
UW
130292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13030
13031 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13032 instead of linux-ppc64-low.o.
13033 * linux-ppc64-low.c: Remove file.
13034 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13035 (linux-ppc64-low.o): Remove rule.
13036
13037 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13038 (init_registers_powerpc_64): Likewise.
13039 (ppc_regmap): Conditionally define depending on __powerpc64__.
13040 (ppc_cannot_store_register): Do not special-case "fpscr" when
13041 compiled on __powerpc64__.
13042 (ppc_collect_ptrace_register): New function.
13043 (ppc_supply_ptrace_register): New function.
13044 (ppc_breakpoint): Change type to "unsigned int".
13045 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13046 (the_low_target): Conditionally provide initializers for the
889bf7c5 13047 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13048 collect_ptrace_register and supply_ptrace_register members.
13049
9b4b61c8
UW
130502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13051
13052 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13053 * server.c (gdbserver_xmltarget): Define.
13054 (get_features_xml): Use it to replace "target.xml" and arch_string.
13055
13056 * configure.srv: Remove srv_xmltarget. Add XML files that were
13057 mentioned there to srv_xmlfiles instead. Remove conditional tests
13058 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13059 srv_xmlfiles and srv_regobj to include all possible choices.
13060 * configure.ac (srv_xmltarget): Remove.
13061 (srv_xmlfiles): Do not add "target.xml".
13062 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13063 checks for supplementary target information.
13064 * configure: Regenerate.
13065 * Makefile.in (XML_TARGET): Remove.
13066 (target.xml): Remove rule.
13067 (clean): Do not clean up target.xml.
13068 (.PRECIOUS): Do not mention target.xml.
13069
13070 * target.h (struct target_ops): Remove arch_string member.
13071 * linux-low.c (linux_arch_string): Remove.
13072 (linux_target_ops): Remove arch_string initializer.
13073 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13074 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13075 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13076 * spu-low.c (spu_arch_string): Remove.
13077 (spu_target_ops): Remove arch_string initializer.
13078 * win32-low.c (win32_arch_string): Remove.
13079 (win32_target_ops): Remove arch_string initializer.
13080 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13081 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13082 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13083
ee1a7ae4
UW
130842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13085
13086 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13087 by collect_ptrace_register and supply_ptrace_register hooks.
13088 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13089 instead of checking for the_low_target.left_pad_xfer.
13090 (usr_store_inferior_registers): Use collect_ptrace_register callback
13091 instead of checking for the_low_target.left_pad_xfer.
13092
13093 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13094 (s390_supply_ptrace_register): Likewise.
13095 (s390_fill_gregset): Call s390_collect_ptrace_register.
13096 (the_low_target): Update.
13097
13098 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13099 (ppc_supply_ptrace_register): Likewise.
13100 (the_low_target): Update.
13101
13102 * linux-i386-low.c (the_low_target): Update.
13103 * linux-x86-64-low.c (the_low_target): Update.
13104
d61ddec4
UW
131052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13106
13107 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13108 reg-s390.o and reg-s390x.o.
13109
13110 * linux-low.c (new_inferior): New global variable.
13111 (linux_create_inferior, linux_attach): Set it.
13112 (linux_wait_for_process): Call the_low_target.arch_setup after the
13113 target has stopped for the first time.
13114 (initialize_low): Do not call the_low_target.arch_setup.
13115
13116 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13117 (s390_set_pc): Likewise.
13118 (s390_arch_setup): New function.
13119 (the_low_target): Use s390_arch_setup as arch_setup routine.
13120
13121 * regcache.c (realloc_register_cache): New function.
13122 (set_register_cache): Call it for each existing regcache.
13123
d05b4ac3
UW
131242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13125
13126 * server.h (init_registers): Remove prototype.
13127
13128 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13129 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13130 instead of init_registers ().
13131 * linux-arm-low.c (init_registers_arm): Add prototype.
13132 (init_registers_arm_with_iwmmxt): Likewise.
13133 (the_low_target): Add initializer for arch_setup field.
13134 * linux-cris-low.c (init_registers_cris): Add prototype.
13135 (the_low_target): Add initializer for arch_setup field.
13136 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13137 (the_low_target): Add initializer for arch_setup field.
13138 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13139 (the_low_target): Add initializer for arch_setup field.
13140 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13141 (the_low_target): Add initializer for arch_setup field.
13142 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13143 (the_low_target): Add initializer for arch_setup field.
13144 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13145 (the_low_target): Add initializer for arch_setup field.
13146 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13147 (init_registers_mips64_linux): Likewise.
13148 (the_low_target): Add initializer for arch_setup field.
13149 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13150 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13151 (the_low_target): Add initializer for arch_setup field.
13152 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13153 (init_registers_powerpc_64): Likewise.
13154 (the_low_target): Add initializer for arch_setup field.
13155 * linux-s390-low.c (init_registers_s390): Add prototype.
13156 (init_registers_s390x): Likewise.
13157 (the_low_target): Add initializer for arch_setup field.
13158 * linux-sh-low.c (init_registers_sh): Add prototype.
13159 (the_low_target): Add initializer for arch_setup field.
13160 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13161 (the_low_target): Add initializer for arch_setup field.
13162 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13163 (the_low_target): Add initializer for arch_setup field.
13164
13165 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13166 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13167 instead of init_registers ().
13168 * win32-arm-low.c (init_registers_arm): Add prototype.
13169 (the_low_target): Add initializer for arch_setup field.
13170 * win32-i386-low.c (init_registers_i386): Add prototype.
13171 (the_low_target): Add initializer for arch_setup field.
13172
13173 * spu-low.c (init_registers_spu): Add prototype.
13174 (initialize_low): Call initialie_registers_spu () instead of
13175 initialize_registers ().
13176
fd96d250
PA
131772008-02-19 Pedro Alves <pedro@codesourcery.com>
13178
13179 * server.c (handle_v_requests): When handling the vRun and vAttach
13180 packets, if already debugging a process, don't kill it. Return an
13181 error instead.
13182
d41b6bb4
DJ
131832008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13184
13185 * server.c (handle_query): Correct length check.
13186
5ac588cf
PA
131872008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13188
13189 * win32-low.c (do_initial_child_stuff): Add process handle
13190 parameter. Set current_process_handle and current_process_id from the
13191 parameters. Clear globals.
13192 (win32_create_inferior): Don't set current_process_handle and
13193 current_process_id here. Instead pass them on the call to
13194 do_initial_child_stuff.
13195 (win32_attach): Likewise.
13196 (win32_clear_inferiors): New.
13197 (win32_kill): Don't close the current process handle or the
13198 current thread handle here. Instead call win32_clear_inferiors.
13199 (win32_detach): Don't open a new handle to the process. Call
13200 win32_clear_inferiors.
13201 (win32_join): Don't rely on current_process_handle; open a new
13202 handle using the process id.
13203 (win32_wait): Call win32_clear_inferiors when the inferior process
13204 has exited.
13205
ecd7ecbc
DJ
132062008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * server.c (monitor_show_help): Add "exit".
13209
1525d545
MG
132102008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13211
ecd7ecbc 13212 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13213 (clean): Add reg-xtensa.c.
13214 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13215 * configure.srv (xtensa*-*-linux*) New target.
13216 * linux-xtensa-low.c: New.
13217 * xtensa-xtregs.c: New.
1525d545 13218
59a016f0
PA
132192008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13220
13221 * hostio.c: Don't include errno.h.
13222 (errno_to_fileio_errno): Move to hostio-errno.
13223 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13224 error number outputting to the target->hostio_last_error callback.
13225 (hostio_packet_error): Use FILEIO_EINVAL directly.
13226 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13227 calls to hostio_error.
13228 * hostio-errno.c: New.
13229 * server.h (hostio_last_error_from_errno): Declare.
13230 * target.h (target_ops): Add hostio_last_error member.
13231 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13232 as hostio_last_error handler.
889bf7c5 13233 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13234 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13235 (wince_hostio_last_error): New functions.
13236 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13237 as hostio_last_error handler.
13238 (win32_target_ops) [!_WIN32_WCE]: Register
13239 hostio_last_error_from_errno as hostio_last_error handler.
13240 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13241 (hostio-errno.o): New rule.
13242 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13243 * configure.srv (srv_hostio_err_objs): New variable. Default to
13244 hostio-errno.o.
13245 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13246 * configure: Regenerate.
13247
2d717e4f
DJ
132482008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13249
13250 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13251 (linux_kill, linux_detach): Clean up the process list.
13252 * remote-utils.c (remote_open): Improve port number parsing.
13253 (putpkt_binary, input_interrupt): Only send interrupts if the target
13254 is running.
13255 * server.c (extended_protocol): Make static.
13256 (attached): Define earlier.
13257 (exit_requested, response_needed, program_argv): New variables.
13258 (target_running): New.
13259 (start_inferior): Clear attached here.
13260 (attach_inferior): Set attached here.
13261 (require_running): Define.
13262 (handle_query): Use require_running and target_running. Implement
13263 "monitor exit".
13264 (handle_v_attach, handle_v_run): New.
13265 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13266 (gdbserver_usage): Update.
13267 (main): Redo argument parsing. Handle --debug and --multi. Handle
13268 --attach along with other options or after the port. Save
13269 program_argv. Support no initial program. Resynchronize
13270 communication with GDB after an error. Handle "monitor exit".
13271 Use require_running and target_running. Always allow the extended
13272 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13273 restart in extended mode.
13274 * README: Refer to the GDB manual. Update --attach usage.
13275
7407e2de
AS
132762007-12-20 Andreas Schwab <schwab@suse.de>
13277
13278 * linux-low.c (STACK_SIZE): Define.
13279 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13280 (linux_test_for_tracefork): Likewise.
13281
b65d95c5
DJ
132822007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13283
13284 * linux-low.c (linux_wait_for_event): Update messages. Do not
13285 reinsert auto-delete breakpoints.
13286 * mem-break.c (struct breakpoint): Change return type of handler to
13287 int.
13288 (set_breakpoint_at): Update handler type.
13289 (reinsert_breakpoint_handler): Return 1 instead of calling
13290 delete_breakpoint.
13291 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13292 setting a new one.
13293 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13294 * mem-break.h (set_breakpoint_at): Update handler type.
13295 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13296 * win32-low.c (auto_delete_breakpoint): New.
13297 (get_child_debug_event): Use it.
13298
4e799345
DJ
132992007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13300
13301 * configure.ac: Check for pread and pwrite.
13302 * hostio.c (handle_pread): Fall back to lseek and read.
13303 (handle_pwrite): Fall back to lseek and write.
13304 * config.in, configure: Regenerated.
13305
27524b67
DJ
133062007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * server.c (myresume): Add own_buf argument.
13309 (main): Update calls.
13310
a20d5e98
DJ
133112007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13314 * remote-utils.c (remote_open): Do not call disable_async_io.
13315 (block_async_io): Delete.
13316 (unblock_async_io): Make static.
13317 (initialize_async_io): New.
13318 * server.c (handle_v_cont): Handle async I/O here.
13319 (myresume): Likewise. Move other common resume tasks here...
13320 (main): ... from here. Call initialize_async_io. Disable async
13321 I/O before the main loop.
13322 * server.h (initialize_async_io): Declare.
13323 (block_async_io, unblock_async_io): Delete prototypes.
13324 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13325
b79d787e
DJ
133262007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13327
13328 * remote-utils.c (readchar): Allow binary data in received messages.
13329
d97903b2
PA
133302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13331
13332 * win32-low.c (attaching): New global.
13333 (win32_create_inferior): Clear the `attaching' global.
13334 (win32_attach): Set the `attaching' global.
13335 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13336 attaching. Only set a breakpoint at the entry point if not
13337 attaching.
13338
311de423
PA
133392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13340
13341 * server.c (main): Don't report dll events on the initial
13342 connection on attaches.
13343
6c2d16d2
PA
133442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13345
13346 * server.c (main): Relax numerical bases supported for the pid of
13347 the --attach command line argument.
13348
5ca906e6
PA
133492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13350
13351 * win32-low.c (win32_attach): Call OpenProcess before
13352 DebugActiveProcess, not after. Add last error output to error
13353 call.
13354
9c6c8194
PA
133552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13356
13357 * win32-low.c (win32_get_thread_context)
13358 (win32_set_thread_context): New functions.
13359 (thread_rec): Use win32_get_thread_context.
13360 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13361 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13362 field.
13363
4d5d1aaa
PA
133642007-12-03 Leo Zayas
13365 Pedro Alves <pedro_alves@portugalmail.pt>
13366
13367 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13368 global variables.
13369 (child_add_thread): Minor cleanup.
13370 (child_continue): Resume artificially suspended threads before
13371 calling ContinueDebugEvent.
13372 (suspend_one_thread): New.
13373 (fake_breakpoint_event): New.
13374 (get_child_debug_event): Change return type to int. Check here if
13375 gdb sent an interrupt request. If a soft interrupt was requested,
13376 fake a breakpoint event. Return 0 if there is no event to handle,
13377 and 1 otherwise.
13378 (win32_wait): Don't check here if gdb sent an interrupt request.
13379 Ensure there is a valid event to handle.
13380 (win32_request_interrupt): Add soft interruption method as last
13381 resort.
13382
c436e841
PA
133832007-12-03 Leo Zayas
13384 Pedro Alves <pedro_alves@portugalmail.pt>
13385
13386 * win32-low.h (win32_thread_info): Add descriptions to the
13387 structure members. Replace `suspend_count' counter by a
13388 `suspended' flag.
13389 * win32-low.c (thread_rec): Update condition of when to get the
13390 context from the inferior. Rely on ContextFlags being set if it
13391 has already been retrieved. Only suspend the inferior thread if
13392 we haven't already. Warn if that fails.
13393 (continue_one_thread): s/suspend_count/suspended/. Only call
13394 ResumeThread once. Warn if that fails.
13395
e7b5fa67
PA
133962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13397
13398 * win32-low.c (win32_wait): Don't read from the inferior when it
13399 has already exited.
13400
a385171d
PA
134012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13402
13403 * Makefile.in (win32_low_h): New variable.
13404 (win32-low.o): Add dependency on $(win32_low_h).
13405 (win32-arm-low.o, win32-i386-low.o): New rules.
13406
f80c84b3
DJ
134072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13408
13409 * hostio.c: Correct copyright year.
13410
a6b151f1
DJ
134112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * Makefile.in (OBS): Add hostio.o.
13414 (hostio.o): New rule.
13415 * server.h (handle_vFile): Declare.
13416 * hostio.c: New file.
13417 * server.c (handle_v_requests): Take packet_len and new_packet_len
13418 for binary packets. Call handle_vFile.
13419 (main): Update call to handle_v_requests.
13420
f9387fc3
DJ
134212007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13422
13423 * linux-low.c: Include <sched.h>.
13424
51c2684e
DJ
134252007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13426
13427 * linux-low.c (linux_tracefork_grandchild): New.
13428 (linux_tracefork_child): Use clone.
13429 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13430
75f83163
JB
134312007-10-31 Joel Brobecker <brobecker@adacore.com>
13432
13433 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13434
da5898ce
DJ
134352007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13438
24a09b5f
DJ
134392007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13440
13441 * inferiors.c (change_inferior_id): Delete.
13442 (add_pid_to_list, pull_pid_from_list): New.
13443 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13444 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13445 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13446 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13447 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13448 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13449 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13450 (using_threads): Always set to 1.
13451 (handle_extended_wait): New.
13452 (add_process): Do not set TID.
13453 (linux_create_inferior): Set must_set_ptrace_flags.
13454 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13455 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13456 (linux_thread_alive): Rename TID argument to LWPID.
13457 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13458 (linux_wait_for_event): Do not use TID or check using_threads. Update
13459 call to dead_thread_notify. Call handle_extended_wait.
13460 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13461 (send_sigstop): Delete sigstop_sent.
13462 (wait_for_sigstop): Avoid TID.
13463 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13464 (linux_test_for_tracefork): New.
13465 (linux_lookup_signals): Use thread_db_active and
13466 linux_supports_tracefork_flag.
13467 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13468 * linux-low.h (get_process_thread): Avoid TID.
13469 (struct process_ifo): Move thread_known and tid to the end. Remove
13470 sigstop_sent.
13471 (linux_attach_lwp, thread_db_init): Update prototypes.
13472 * server.h (change_inferior_id): Delete prototype.
13473 (add_pid_to_list, pull_pid_from_list): New prototypes.
13474 * thread-db.c (thread_db_use_events): New.
13475 (find_first_thread): Rename to...
13476 (find_one_thread): ...this. Update callers and messages. Do not
13477 call fatal. Check thread_db_use_events. Do not call
13478 change_inferior_id or new_thread_notify.
13479 (maybe_attach_thread): Update. Do not call new_thread_notify.
13480 (thread_db_init): Set thread_db_use_events. Check use_events.
13481 * utils.c (fatal, warning): Correct message prefix.
13482
30ed0a8f
DJ
134832007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13484
13485 * Makefile.in (clean): Remove new files.
13486 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13487 (powerpc-64.o, powerpc-64.c): New rules.
13488 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13489 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13490 with SPE.
13491 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13492 SPE targets.
13493 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13494 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13495 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13496 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13497 (target_regsets): Add AltiVec and SPE register sets.
13498 * configure.ac: Check for AltiVec and SPE.
13499 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13500 (ppc_fill_vrregset, ppc_store_vrregset): New.
13501 (target_regsets): Add AltiVec register set.
13502 * configure: Regenerated.
13503
fd462a61
DJ
135042007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13505
13506 * linux-low.c (O_LARGEFILE): Define.
13507 (linux_read_memory): Use /proc/PID/mem.
13508 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13509 * configure, config.in: Regenerated.
13510
69f223ed
DJ
135112007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13512
13513 * linux-low.c (linux_wait_for_event): Do not pass signals while
13514 single-stepping.
13515
aec18585
PA
135162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13517
13518 * win32-low.c (create_process): New.
13519 (win32_create_inferior): Use create_process instead of
13520 CreateProcess. If create_process failed retry appending an ".exe"
13521 suffix. Store the GetLastError result immediatelly after
13522 create_process calls and use it on the call to error.
13523
34d86ddd
PA
135242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13525
13526 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13527
5a0e3bd0
JB
135282007-08-23 Joel Brobecker <brobecker@adacore.com>
13529
13530 * configure.ac: Switch license to GPLv3.
13531
f88c79e6
MS
135322007-08-01 Michael Snyder <msnyder@access-company.com>
13533
13534 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13535
6b3d9b83
PA
135362007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13537
13538 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13539 typedef.
13540 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13541 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13542 CloseToolhelp32Snapshot.
13543 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13544 CloseToolhelp32Snapshot.
13545
c588c53c
MS
135462007-07-27 Michael Snyder <michael.snyder@access-company.com>
13547
13548 * server.c (main): Check for inferior exit before main loop.
13549
aa0403d9
PA
135502007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13551
13552 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13553 instead of on tmp_desc.
13554
255e7678
DJ
135552007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13556 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13559 (add_thread): Minor cleanups.
13560 (clear_inferiors): Move lower in the file. Clear the DLL
13561 list.
13562 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13563 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13564 (xml_escape_text): New.
13565 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13566 for qSupported.
13567 (handle_v_cont): Report errors.
13568 (gdbserver_version): Update.
13569 (main): Correct size of own_buf. Do not report initial DLL events.
13570 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13571 (unloaded_dll, xml_escape_text): New.
13572 * win32-low.c (enum target_waitkind): Update comments.
13573 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13574 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13575 (win32_EnumProcessModules, win32_GetModuleInformation)
13576 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13577 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13578 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13579 (win32_Module32First, win32_Module32Next, load_toolhelp)
13580 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13581 (get_child_debug_event): Handle DLL events.
13582 (win32_wait): Likewise.
13583
0d37add9
DJ
135842007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13587 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13588
45e2715e
PA
135892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13590
13591 * win32-low.c (handle_output_debug_string): Ignore event if not
13592 waiting.
13593
c5674cf1
PA
135942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13595
13596 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13597
2bbe3cc1
DJ
135982007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13601
ae13219e
DJ
136022007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * inferiors.c (change_inferior_id): Add comment.
13605 * linux-low.c (check_removed_breakpoint): Add an early
13606 prototype. Improve debug output.
13607 (linux_attach): Doc update.
13608 (linux_detach_one_process, linux_detach): Clean up before releasing
13609 each process.
13610 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13611 * linux-low.h (struct process_info): Doc improvement.
13612 * mem-break.c (delete_all_breakpoints): New.
13613 * mem-break.h (delete_all_breakpoints): New prototype.
13614 * thread-db.c (find_first_thread): New.
13615 (thread_db_create_event): Call it instead of
13616 thread_db_find_new_threads. Clean up unused variables.
13617 (maybe_attach_thread): Remove first thread handling.
13618 (thread_db_find_new_threads): Use find_first_thread.
13619 (thread_db_get_tls_address): Likewise.
13620
4105de34
DJ
136212007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13622
13623 * thread-db.c (thread_db_find_new_threads): Add prototype.
13624 (thread_db_create_event): Check for the main thread before adding
13625 a new thread.
13626 (maybe_attach_thread): Only enable event reporting if TID == 0.
13627 (thread_db_get_tls_address): Check for new threads.
13628
2b876972
DJ
136292007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * linux-low.c (linux_create_inferior): Try execv before execvp.
13632 * spu-low.c (spu_create_inferior): Likewise.
13633
7a245884
DJ
136342007-06-13 Mike Frysinger <vapier@gentoo.org>
13635
13636 * linux-low.c (linux_create_inferior): Change execv to execvp.
13637 * spu-low.c (spu_create_inferior): Likewies.
13638
117ce543
DJ
136392007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13640
13641 * Makefile.in (clean): Clean new files instead of deleted ones.
13642 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13643 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13644 rules.
13645 * configure.srv: Specify XML files and new regformats for MIPS and
13646 MIPS64 GNU/Linux.
13647 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13648 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13649 an entry for the restart register.
13650 (mips_cannot_fetch_register, mips_cannot_store_register)
13651 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13652 register names to match the XML descriptions.
13653 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13654 restart register instead of $0.
13655
0e7f50da
UW
136562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13657 Markus Deuling <deuling@de.ibm.com>
13658
13659 * remote-utils.c (decode_xfer_write): New function.
13660 * server.h (decode_xfer_write): Add prototype.
13661 * server.c (handle_query): Add PACKET_LEN argument. Support
13662 qXfer:spu:read and qXfer:spu:write packets.
13663 (main): Pass packet_len to handle_query.
13664 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13665 * target.h (target_ops): Add qxfer_spu.
13666
374c1d38
UW
136672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13668
13669 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13670 accessing non-seekable spufs files.
13671
bb63802a
UW
136722007-05-16 Markus Deuling <deuling@de.ibm.com>
13673
889bf7c5 13674 * server.c (handle_query): Add reply for qC packet.
bb63802a 13675
7390519e
PA
136762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13677 Leo Zayas <lerele@champenstudios@com>
13678
13679 * server.h (check_remote_input_interrupt_request): New function.
13680 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13681 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13682 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13683 (check_remote_input_interrupt_request): New function.
13684 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13685 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13686 winapi_GenerateConsoleCtrlEvent): New typedefs.
13687 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13688 to 250 ms.
13689 (win32_wait): Check for remote interrupt request
13690 with check_remote_input_interrupt_request.
13691 (win32_request_interrupt): New function.
13692 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13693
34b34921
PA
136942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13695
13696 * win32-low.c (debug_registers_changed,
13697 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13698 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13699 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13700 (thread_rec): Get context using the low target.
13701 (child_add_thread): Call thread_added on the low target,
13702 which does the same thing.
13703 (regptr): Delete.
13704 (do_initial_child_stuff): Remove debug registers references.
13705 Set context using the low target. Resume threads after
13706 setting the contexts.
13707 (child_continue): Remove dead variable. Remove debug
13708 registers references.
13709 (child_fetch_inferior_registers): Go through the low target.
13710 (do_child_store_inferior_registers): Remove.
13711 (child_store_inferior_registers): Go through the low target.
13712 (win32_resume): Remove debug registers references.
13713 Set context using the low target.
13714 (handle_exception): Change return type to void. Don't record
13715 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13716 first chance exception.
889bf7c5 13717 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13718 goto loop. Always return after waiting for debug event.
13719 (win32_wait): Convert to switch statement. Handle spurious
13720 events.
13721
13722 * win32-i386-low.c (debug_registers_changed,
13723 debug_registers_used): New.
13724 (initial_stuff): Rename to ...
13725 (i386_initial_stuff): ... this. Clear debug registers
13726 state variables.
13727 (store_debug_registers): Delete.
13728 (i386_get_thread_context): New.
13729 (load_debug_registers): Delete.
13730 (i386_set_thread_context): New.
13731 (i386_thread_added): New.
13732 (single_step): Rename to ...
13733 (i386_single_step): ... this.
13734 (do_fetch_inferior_registers): Rename to ...
13735 (i386_fetch_inferior_register): ... this.
13736 (i386_store_inferior_register): New.
13737 (the_low_target): Adapt to new interface.
13738
13739 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13740 (arm_get_thread_context): New.
13741 (arm_set_thread_context): New.
13742 (regptr): New.
13743 (do_fetch_inferior_registers): Rename to ...
13744 (arm_fetch_inferior_register): ... this.
13745 (arm_store_inferior_register): New.
13746 (arm_wince_breakpoint): Reimplement as unsigned long.
13747 (arm_wince_breakpoint_len): Define.
13748 (the_low_target): Adapt to new interface.
13749
13750 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13751 load_debug_registers. Add get_thread_context, set_thread_context,
13752 thread_added and store_inferior_register. Rename
13753 fetch_inferior_registers to fetch_inferior_register.
13754 (regptr): Remove declaration.
13755
dd6953e1
PA
137562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13757
13758 * linux-low.c (linux_detach): Change return type to int. Return 0.
13759 * spu-low.c (spu_detach): Likewise.
13760
444d6139
PA
137612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13762
13763 * target.h (target_ops): Change return type of detach to int.
13764 Add join.
13765 (join_inferior): New.
13766 * server.c (main): Don't skip detach support on mingw32.
13767 If the inferior doesn't support detaching return error.
13768 Call join_inferior instead of using waitpid.
13769 * linux-low.c (linux_join): New.
13770 (linux_target_op): Add linux_join.
13771 * spu-low.c (spu_join): New.
13772 (spu_target_ops): Add spu_join.
13773 * win32-low.c (win32_detach): Adapt to new interface.
13774 Reopen current_process_handle before detaching. Issue a child
13775 resume before detaching.
13776 (win32_join): New.
13777 (win32_target_op): Add win32_join.
13778
1d5315fe
PA
137792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13780
13781 * win32-low.c (win32-attach): Fix return value.
13782 * target.h (target_ops): Describe ATTACH return values.
13783
bf914831
PA
137842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13785
13786 * win32-low.c (GETPROCADDRESS): Define.
13787 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13788 (winapi_DebugSetProcessKillOnExit): Likewise.
13789 (win32_create_inferior): Force usage of ansi CreateProcessA.
13790 (win32_attach): Use GETPROCADDRESS.
13791 (win32_detach): Likewise.
13792
f72f3e60
PA
137932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13794
13795 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13796
ed50f18f
PA
137972007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13798
13799 * win32-low.c: Commit leftover changes from 2007-03-29.
13800
0c2ead7e
DJ
138012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13802
13803 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13804 fields short instead of int. Add explicit padding.
13805 (i387_cache_to_fsave): Remove unnecessary casts.
13806 (i387_fsave_to_cache): Doc fix.
13807 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13808
73725ff3
DJ
138092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13812 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13813
d99f33d8
PA
138142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13815
13816 * configure.srv (arm*-*-mingw32ce*): Move near the other
13817 arm targets.
13818
68070c10
PA
138192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13820
2482afc6 13821 * configure.ac: Add errno checking.
68070c10
PA
13822 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13823 sys/file.h and malloc.h.
13824 (AC_CHECK_DECLS): Add perror.
13825 (srv_mingwce): Handle.
2482afc6 13826 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13827 win32-i386-low.o to srv_tgtobj.
13828 (i[34567]86-*-mingw*): Likewise.
13829 (arm*-*-mingw32ce*): Add case.
13830 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13831 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13832 [__MINGW32CE__] (strerror): New function.
13833 [__MINGW32CE__] (errno): Define to GetLastError.
13834 [__MINGW32CE__] (COUNTOF): New macro.
13835 (remote_open): Remove extra close call.
13836 * mem-break.c (delete_breakpoint_at): New function.
13837 * mem-break.h (delete_breakpoint_at): Declare.
13838 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13839 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13840 [USE_WIN32API] (read, write): Add char* casts.
13841 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13842 * server.h: Include wincecompat.h on Windows CE.
13843 [HAVE_ERRNO_H]: Check.
13844 (perror): Declare if not declared.
13845 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13846 (perror_with_name): Remove errno declaration.
13847 * wincecompat.h: New.
13848 * wincecompat.c: New.
13849 * win32-low.h: New.
13850 * win32-arm-low.c: New.
13851 * win32-i386-low.c: New.
13852 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13853 (OUTMSG2): Make it safe.
13854 (_T): New macro.
13855 (COUNTOF): New macro.
13856 (NUM_REGS): Get it from the low target.
13857 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13858 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13859 (thread_rec): Let low target handle debug registers.
13860 (child_add_thread): Likewise.
13861 (child_init_thread_list): Likewise.
13862 (continue_one_thread): Likewise.
13863 (regptr): New.
13864 (do_child_fetch_inferior_registers): Move to ...
13865 * win32-i386-low.c: ... here, and rename to ...
13866 (do_fetch_inferior_registers): ... this.
889bf7c5 13867 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13868 Go through the low target.
13869 (do_child_store_inferior_registers): Use regptr.
13870 (strwinerror): New function.
13871 (win32_create_inferior): Handle Windows CE.
13872 Use strwinerror instead of strerror on Windows error
13873 codes. Add program to the error output.
13874 Don't close the main thread handle on Windows CE.
13875 (win32_attach): Use coredll.dll on Windows CE.
13876 (win32_kill): Close current process and current
13877 thread handles.
13878 (win32_detach): Use coredll.dll on Windows CE.
13879 (win32_resume): Let low target handle debug registers, and
13880 step request.
13881 (handle_exception): Add/Remove initial breakpoint. Avoid
13882 non-existant WSTOPSIG on Windows CE.
13883 (win32_read_inferior_memory): Cast to remove warning.
13884 (win32_arch_string): Go through the low target.
13885 (initialize_low): Call set_breakpoint_data with the low
13886 target's breakpoint.
13887 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13888 FOP_REGNUM, mappings): Move to ...
13889 * win32-i386-low.c: ... here.
13890 * win32-low.c (win32_thread_info): Move to ...
13891 * win32-low.h: ... here.
13892 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13893 win32-arm-low.c and wincecompat.c.
13894 (all:): Add $EXEEXT.
13895 (install-only:): Likewise.
13896 (gdbserver:): Likewise.
13897 (gdbreplay:): Likewise.
13898 * config.in: Regenerate.
13899 * configure: Regenerate.
13900
41093d81
PA
139012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * win32-low.c: Rename typedef thread_info to
13904 win32_thread_info throughout.
13905
544afa54
PA
139062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13907
13908 * win32-i386-low.c: Rename to ...
13909 * win32-low.c: ... this.
13910 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13911 * Makefile.in: Likewise.
13912
bce7165d
PA
139132007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13914
13915 * remote-utils.c (monitor_output): Constify msg parameter.
13916 * server.h (monitor_output): Likewise.
13917 * win32-i386-low.c (handle_output_debug_string): New.
13918 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13919 handle_output_debug_string.
13920 (get_child_debug_event): Likewise.
13921
506c7aa0
DJ
139222007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13923
13924 * server.c (main): Correct strtoul check.
13925
42c81e2a
DJ
139262007-03-27 Jon Ringle <jon@ringle.org>
13927
13928 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13929
9453113a
DJ
139302007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13931
13932 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13933
64a69107
DJ
139342007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13935
13936 * terminal.h: Check HAVE_SGTTY_H.
13937
139382007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13939
13940 * remote-utils.c (remote_open): Print out the assigned port number.
13941
c74d0ad8
DJ
139422007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * remote-utils.c (monitor_output): New function.
13945 * server.c (debug_threads): Define here.
13946 (monitor_show_help): New function.
13947 (handle_query): Handle qRcmd.
13948 (main): Do not handle 'd' packet.
13949 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13950 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13951 of debug_threads.
13952
de7c3b4a
PA
139532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13954
13955 * Makefile.in (EXEEXT): New.
13956 (clean): Use $(EXEEXT).
13957
ef57601b
PA
139582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13959
13960 * target.h (target_ops): Rename send_signal to request_interrupt,
13961 and remove enum target_signal parameter.
13962 * linux-low.c (linux_request_interrupt): Rename from
13963 linux_send_signal, and always send SIGINT.
13964 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13965 and always send SIGINT.
13966 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13967 of send_signal.
13968 (input_interrupt): Likewise.
13969
820f2bda
PA
139702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13971
13972 * server.c (get_features_xml): Check if target implemented
13973 arch_string.
13974 * win32-i386-low.c (win32_arch_string): New.
13975 (win32_target_ops): Add win32_arch_string as arch_string member.
13976
ab39bf24
UW
139772007-02-22 Markus Deuling <deuling@de.ibm.com>
13978
13979 * spu-low.c (spu_arch_string): New.
13980 (spu_target_ops): Add spu_arch_string.
13981
61ff6e04
DJ
139822007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13985 * configure.ac: Do not check for terminal.h.
13986 * configure, config.in: Regenerated.
13987
fb1e4ffc
DJ
139882007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13989
13990 * Makefile.in (OBS): Add $(XML_BUILTIN).
13991 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13992 (clean): Update.
13993 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13994 (arm-with-iwmmxt.c): New.
13995 * config.in, configure: Regenerate.
13996 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13997 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13998 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13999 (arm*-*-linux*): Add iWMMXt and regset support.
14000 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14001 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14002 (arm_store_wmmxregset, target_regsets): New.
14003 * server.c (get_features_xml): Take annex argument. Check builtin
14004 XML documents.
14005 (handle_query): Handle multiple annexes.
14006
0f48aa01
DJ
140072007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * remote-utils.c [USE_WIN32API] (read, write): Define.
14010 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14011 write.
14012
23181151
DJ
140132007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * linux-i386-low.c (the_low_target): Set arch_string.
14016 * linux-x86-64-low.c (the_low_target): Likewise.
14017 * linux-low.c (linux_arch_string): New.
14018 (linux_target_ops): Add it.
14019 * linux-low.h (struct linux_target_ops): Add arch_string.
14020 * server.c (write_qxfer_response): Use const void * for DATA.
14021 (get_features_xml): New.
14022 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14023 * target.h (struct target_ops): Add arch_string method.
14024
9d606399
DJ
140252007-01-03 Denis Pilat <denis.pilat@st.com>
14026 Daniel Jacobowitz <dan@codesourcery.com>
14027
14028 * linux-low.c (linux_kill): Handle being called with no threads.
14029 * win32-i386-low.c (win32_kill): Likewise.
14030 (get_child_debug_event): Clear current_process_handle.
14031
140322006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14033 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * remote-utils.c (remote_open): Check the type of specified
14036 serial port devices before opening them.
14037 * server.c (main): Kill the inferior if an error occurs during
14038 the first remote_open.
14039
a5e13d24
DJ
140402006-12-05 Markus Deuling <deuling@de.ibm.com>
14041
14042 * README: Update supported targets.
14043
186947f7
DJ
140442006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14045
14046 * Makefile.in (clean): Remove reg-mips64.c.
14047 (reg-mips64.c, reg-mips64.o): New rules.
14048 * configure.srv: Handle mips64. Include regset support for mips.
14049 * linux-mips-low.c (union mips_register): New.
14050 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14051 (mips_breakpoint, mips_breakpoint_at): Use int.
14052 (mips_collect_register, mips_supply_register)
14053 (mips_collect_register_32bit, mips_supply_register_32bit)
14054 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14055 (mips_store_fpregset, target_regsets): New.
14056 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14057
a13e2c95
UW
140582006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14059
14060 * configure.srv: Add target "spu*-*-*".
14061 * Makefile.in (clean): Remove reg-spu.c.
14062 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14063 * spu-low.c: New file.
14064
cb7283db
DJ
140652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * configure.ac: Correct td_thr_tls_get_addr test.
14068 * configure: Regenerated.
14069
89be2091
DJ
140702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14071
14072 * linux-low.c (linux_wait_for_event): Reformat. Use the
14073 pass_signals array.
14074 * remote-utils.c (decode_address_to_semicolon): New.
14075 * server.c (pass_signals, handle_general_set): New.
14076 (handle_query): Mention QPassSignals for qSupported.
14077 (main): Call handle_general_set.
14078 * server.h (pass_signals, decode_address_to_semicolon): New.
14079
000ef4f0
DJ
140802006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * server.c (handle_query): Correct error handling for read_auxv.
14083
b7149293
UW
140842005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14085
14086 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14087 and srv_linux_thread_db to yes.
14088 * linux-s390-low.c (s390_fill_gregset): New function.
14089 (target_regsets): Define data structure.
14090
dae5f5cf
DJ
140912006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14092
14093 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14094 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14095 * config.in, configure: Regenerated.
14096 * inferiors.c (gdb_id_to_thread): New function.
14097 (gdb_id_to_thread_id): Use it.
14098 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14099 * linux-low.h (struct process_info): Add th member.
14100 (thread_db_get_tls_address): New prototype.
14101 * remote-utils.c (decode_address): Make non-static.
14102 * server.c (handle_query): Handle qGetTLSAddr.
14103 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14104 * target.h (struct target_ops): Add get_tls_address.
14105 * thread-db.c (maybe_attach_thread): Save the thread handle.
14106 (thread_db_get_tls_address): New.
14107
32ca6d61
DJ
141082006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14111 (linux_resume_one_process): Take a siginfo_t *. Update all
14112 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14113 (struct pending_signals): Add a siginfo_t.
14114 (linux_wait_for_process): Always set last_status.
14115 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14116 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14117 * linux-low.h (struct process_info): Add last_status.
14118
5ffff7c1
DJ
141192006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * remote-utils.c (try_rle): New function.
14122 (putpkt_binary): Use it.
14123
8695c747
DJ
141242006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14127 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14128 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14129 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14130 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14131 point registers.
14132
290fadea
RS
141332006-08-08 Richard Sandiford <richard@codesourcery.com>
14134
14135 * server.c (terminal_fd): New variable.
14136 (old_foreground_pgrp): Likewise.
14137 (restore_old_foreground_pgrp): New function.
14138 (start_inferior): Record the terminal file descriptor in terminal_fd
14139 and its original foreground group in old_foreground_pgrp. Register
14140 restore_old_foreground_pgrp with atexit().
14141
9f2e1e63
DJ
141422006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14143
14144 * server.c (handle_query): Correct qPart to qXfer.
14145
b80864fb
DJ
141462006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * configure.ac: Check for more headers which are missing on
14149 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14150 * configure.srv: Add Cygwin and mingw32.
14151 * remote-utils.c: Don't include headers unconditionally which
14152 are missing on mingw32. Include <winsock.h> for mingw32.
14153 (remote_open): Adjust for mingw32 support. Flush
14154 standard error after writing to it.
14155 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14156 (unblock_async_io, enable_async_io, disable_async_io)
14157 (readchar, getpkt): Update for Winsock support.
14158 (prepare_resume_reply): Expect a protocol signal number.
14159 * server.c: Disable <sys/wait.h> on mingw32.
14160 (start_inferior): Adjust for mingw32 support. Flush
14161 standard error after writing to it.
14162 (attach_inferior): Likewise. Use protocol signal
14163 numbers.
14164 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14165 and names.
14166 * win32-i386-low.c: New file.
14167 * Makefile.in (XM_CLIBS): Set.
14168 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14169 (win32-i386-low.o): New dependency rule.
14170 * linux-low.c (linux_wait): Use target signal numbers.
14171 * target.h (struct target_ops): Doc fix.
14172 * server.h (target_signal_to_name): New prototype.
14173 * gdbreplay.c: Don't include headers unconditionally which
14174 are missing on mingw32. Include <winsock.h> for mingw32.
14175 (remote_close, remote_open): Adjust for Winsock support.
14176 * configure, config.in: Regenerated.
14177
0876f84a
DJ
141782006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * server.c (decode_xfer_read, write_qxfer_response): New.
14181 (handle_query): Take a packet length argument. Handle
14182 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14183 the qSupported response.
14184 (main): Update call to handle_query.
14185
01f9e8fa
DJ
141862006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14187
14188 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14189 (putpkt_binary): Renamed from putpkt and adjusted for binary
14190 data.
14191 (putpkt): New wrapper for putpkt_binary.
14192 (readchar): Don't mask off the high bit.
14193 (decode_X_packet): New function.
14194 * server.c (main): Call putpkt_binary if a handler sets the packet
14195 length. Save the length of the incoming packet. Handle 'X'.
14196 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14197
be2a5f71
DJ
141982006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * server.c (handle_query): Handle qSupported.
14201
ea025f5f
DJ
142022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * remote-utils.c (all_symbols_looked_up): New variable.
14205 (look_up_one_symbol): Check it.
14206 * server.h (look_up_one_symbol): New declaration.
14207 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14208
9308fc88
DJ
142092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14210
14211 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14212 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14213 (PTRACE_GET_THREAD_AREA): Define.
14214 (ps_get_thread_area): New function.
14215
52fb6437
NS
142162006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14217
14218 * configure.srv (m68k*-*-uclinux*): New target.
14219 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14220 (linux_resume_one_process): Remove extraneous cast.
14221 (linux_read_offsets): New.
14222 (linux_target_op): Add linux_read_offsets on mmuless systems.
14223 * server.c (handle_query): Add qOffsets logic.
14224 * target.h (struct target_ops): Add read_offsets.
14225
21b0f40c
DJ
142262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14229 (PTRACE_GET_THREAD_AREA): Define.
14230 (ps_get_thread_area): New function.
14231 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14232 (linux-x86-64-low.o): Update.
14233
0050a760
DJ
142342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14235
14236 * configure.ac: Remove checks for prfpregset_t.
14237 * gdb_proc_service.h: New file.
14238 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14239 new "gdb_proc_service.h".
14240 * proc-service.c: Likewise.
14241 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14242 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14243 * Makefile.in (gdb_proc_service_h): Updated.
14244 * configure, config.in: Regenerated.
14245
b92a518e
DJ
142462006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * remote-utils.c (prepare_resume_reply): Move declaration
14249 of gdb_id_from_wait to the top of the block.
14250
545587ee
DJ
142512006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * linux-low.c (regsets_store_inferior_registers): Read the regset
14254 from the target before filling it.
14255
9db87ebd
DJ
142562006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14257
14258 * server.c (attach_inferior): Return SIGTRAP for a successful
14259 attach.
14260
dd24457d
DJ
142612006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * Makefile.in (OBS): Add version.o.
14264 (STAGESTUFF): Delete.
14265 (version.o): Add dependencies.
14266 (version.c): Replace rule.
14267 (clean): Remove version.c.
14268 * server.c (gdbserver_version): New.
14269 (gdbserver_usage): Use printf.
14270 (main): Handle --version and --help.
14271 * server.h (version, host_name): Add declarations.
14272
6f0f660e
EZ
142732005-12-23 Eli Zaretskii <eliz@gnu.org>
14274
889bf7c5
PA
14275 * linux-arm-low.c:
14276 * linux-arm-low.c:
14277 * inferiors.c:
14278 * i387-fp.h:
14279 * i387-fp.c:
14280 * gdbreplay.c:
14281 * regcache.c:
14282 * proc-service.c:
14283 * mem-break.h:
14284 * mem-break.c:
14285 * linux-x86-64-low.c:
14286 * linux-sh-low.c:
14287 * linux-s390-low.c:
14288 * linux-ppc64-low.c:
14289 * linux-ppc-low.c:
14290 * linux-mips-low.c:
14291 * linux-m68k-low.c:
14292 * linux-m32r-low.c:
14293 * linux-low.h:
14294 * linux-low.c:
14295 * linux-ia64-low.c:
14296 * linux-i386-low.c:
14297 * linux-crisv32-low.c:
14298 * thread-db.c:
14299 * terminal.h:
14300 * target.h:
14301 * target.c:
14302 * server.h:
14303 * server.c:
14304 * remote-utils.c:
14305 * regcache.h:
14306 * utils.c:
14307 * Makefile.in:
14308 * configure.ac:
6f0f660e
EZ
14309 * gdbserver.1: Add (C) after Copyright. Update the FSF
14310 address.
14311
9d1fb177
DJ
143122005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14313
14314 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14315 (arm_breakpoint_at): Recognize both breakpoints.
14316 (the_low_target): Use the correct breakpoint instruction.
14317
011a70c2
DJ
143182005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14321 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14322 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14323 (the_low_target): Update.
14324
7fb85e41
AS
143252005-10-25 Andreas Schwab <schwab@suse.de>
14326
14327 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14328
14329 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14330 (ia64_num_regs): Reduce to 462.
14331
3db0444b
DJ
143322005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14333
14334 * acinclude.m4: Correct quoting.
14335 * aclocal.m4: Regenerated.
14336
14337 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14338 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14339 (thread_db_init): Call thread_db_err_str.
14340 * configure.ac: Check for TD_VERSION.
14341 * config.in, configure: Regenerated.
14342
bee0189a
DJ
143432005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14344
14345 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14346
e9d25b98
DJ
143472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14350 is not available. Define HAVE_PTRACE_GETREGS if it is.
14351 * config.in, configure: Regenerated.
14352 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14353 * linux-i386-low.c, linux-m68k-low.c: Update to use
14354 HAVE_PTRACE_GETREGS.
14355 * linux-low.c (regsets_fetch_inferior_registers)
14356 (regsets_store_inferior_registers): Only return 0 if we processed
14357 GENERAL_REGS.
14358 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14359 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14360
a06660f7
DJ
143612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * inferiors.c (struct thread_info): Add gdb_id.
14364 (add_thread): Add gdb_id argument.
14365 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14366 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14367 calls to add_thread.
14368 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14369 * server.c (handle_query): Use thread_to_gdb_id.
14370 (handle_v_cont, main): Use gdb_id_to_thread_id.
14371 * server.h (add_thread): Update prototype.
14372 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14373 prototypes.
14374
5a1f5858
DJ
143752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14376
14377 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14378 left-padded registers.
14379 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14380 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14381
e122f1f5
SE
143822005-07-01 Steve Ellcey <sje@cup.hp.com>
14383
14384 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14385 * configure: Regenerate.
14386 * config.in: Regenerate.
14387 * server.h (NEED_DECLARATION_STRERROR):
14388 Replace with !HAVE_DECL_STRERROR.
14389
d592fa2f
DJ
143902005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14391
14392 * linux-low.c (linux_wait, linux_send_signal): Don't test
14393 an unsigned long variable for > 0 if it could be MAX_ULONG.
14394 * server.c (myresume): Likewise.
14395 * target.c (set_desired_inferior): Likewise.
14396
ccbd4912
MK
143972005-06-13 Mark Kettenis <kettenis@gnu.org>
14398
14399 * configure.ac: Simplify and improve check for socklen_t.
14400 * configure, config.in: Regenerate.
14401
f450004a
DJ
144022005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14403
14404 * acconfig.h: Remove.
14405 * configure.ac: Add a test for socklen_t. Use three-argument
14406 AC_DEFINE throughout.
14407 * config.in: Regenerated using autoheader 2.59.
14408 * configure: Regenerated.
14409
14410 * gdbreplay.c (socklen_t): Provide a default.
14411 (remote_open): Use socklen_t.
14412 * remote-utils.c (socklen_t): Provide a default.
14413 (remote_open): Use socklen_t.
14414 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14415 unsigned char.
14416
14417 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14418 char for buffers.
14419 * linux-low.c (linux_read_memory, linux_write_memory)
14420 (linux_read_auxv): Likewise.
14421 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14422 (check_mem_write): Likewise.
14423 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14424 Likewise.
14425 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14426 (registers_from_string, register_data): Likewise.
14427 * server.c (handle_query, main): Likewise.
14428 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14429 (decode_M_packet): Likewise.
14430 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14431 * target.h (struct target_ops): Update read_memory, write_memory,
14432 and read_auxv.
14433 (read_inferior_memory, write_inferior_memory): Update.
14434 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14435 to unsigned char *.
14436 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14437 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14438 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14439 linux-s390-low.c, linux-sh-low.c: Update for changes in
14440 read_inferior_memory and the_low_target->breakpoint.
14441
eee84df1
DJ
144422005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14443
14444 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14445 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14446 * configure.srv: Add powerpc64-*-linux*.
14447 * linux-ppc64-low.c: New file.
14448
45b134e5
OF
144492005-05-23 Orjan Friberg <orjanf@axis.com>
14450
14451 * linux-cris-low.c: New file with support for CRIS.
14452 * linux-crisv32-low.c: Ditto for CRISv32.
14453 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14454 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14455 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14456 reg-crisv32.o, and reg-crisv32.c to make rules.
14457 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14458 recognized targets.
14459
48d93c75
UW
144602005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14461
14462 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14463 of sizeof (PTRACE_XFER_TYPE).
14464 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14465
e013ee27
OF
144662005-05-12 Orjan Friberg <orjanf@axis.com>
14467
889bf7c5 14468 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14469 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14470 pointers for hardware watchpoint support.
14471 * linux-low.h (struct linux_target_ops): Ditto.
14472 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14473 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14474 to linux_target_ops.
14475 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14476 reply packet.
14477 * server.c (main): Recognize 'Z' and 'z' packets.
14478
b0ded00b
UW
144792005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14480
14481 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14482 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14483 (the_low_target): Add new members.
14484
8643e2ad
DJ
144852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * proc-service.c (ps_lgetregs): Search all_processes instead of
14488 all_threads.
14489
fc620387
DJ
144902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * server.c (start_inferior): Change return type to int.
14493 (attach_inferior): Change sigptr to int *.
14494 (handle_v_cont, handle_v_requests): Change signal to int *.
14495 (main): Change signal to int.
14496
144972005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14498
14499 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14500 * configure.srv: Add m32r*-*-linux*.
14501 * linux-m32r-low.c: New file.
14502
e0e76420
DJ
145032005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14506
a1928bad
DJ
145072005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14508
14509 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14510 Take unsigned long arguments for PIDs.
14511 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14512 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14513 (wait_for_sigstop, linux_resume_one_process)
14514 (regsets_fetch_inferior_registers, linux_send_signal)
14515 (linux_read_auxv): Likewise. Update the types of variables holding
14516 PIDs. Update format string specifiers.
14517 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14518 * remote-utils.c (prepare_resume_reply): Likewise.
14519 * server.c (cont_thread, general_thread, step_thread)
14520 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14521 unsigned long.
14522 (handle_query): Update format specifiers.
14523 (handle_v_cont, main): Use strtoul for thread IDs.
14524 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14525 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14526 (general_thread, step_thread, thread_from_wait)
14527 (old_thread_from_wait): Update.
14528 * target.h (struct thread_resume): Use unsigned long for THREAD.
14529 (struct target_ops): Use unsigned long for arguments to attach and
14530 thread_alive.
14531
dcdb98d2
DJ
145322005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * acinclude.m4: Include bfd/bfd.m4 directly.
14535 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14536 <agriffis@toolchain.org>.
14537 * aclocal.m4, configure: Regenerated.
14538
bec39cab
AC
145392005-01-07 Andrew Cagney <cagney@gnu.org>
14540
14541 * configure.ac: Rename configure.in, require autoconf 2.59.
14542 * configure: Re-generate.
14543
434c4c77
DJ
145442004-12-08 Daniel Jacobowitz <dan@debian.org>
14545
14546 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14547 LIBS when finished.
14548 * aclocal.m4: Regenerated.
14549 * configure: Regenerated.
14550
db1d3e1b
AS
145512004-11-21 Andreas Schwab <schwab@suse.de>
14552
14553 * linux-m68k-low.c (m68k_num_gregs): Define.
14554 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14555 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14556 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14557 (m68k_breakpoint_at): New. Add to the_low_target.
14558
14559 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14560 srv_linux_thread_db to yes.
14561
43360365
JB
145622004-10-20 Joel Brobecker <brobecker@gnat.com>
14563
14564 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14565 (ARCH_SET_FS): Likewise.
14566 (ARCH_GET_FS): Likewise.
14567 (ARCH_GET_GS): Likewise.
14568
fd500816
DJ
145692004-10-16 Daniel Jacobowitz <dan@debian.org>
14570
14571 * linux-i386-low.c (ps_get_thread_area): New.
14572 * linux-x86-64-low.c (ps_get_thread_area): New.
14573 * linux-low.c: Include <sys/syscall.h>.
14574 (linux_kill_one_process): Don't kill the first thread here.
14575 (linux_kill): Kill the first thread here.
14576 (kill_lwp): New function.
14577 (send_sigstop, linux_send_signal): Use it.
14578 * proc-service.c: Clean up #ifdefs.
14579 (fpregset_info): Delete.
14580 (ps_lgetregs): Update and enable implementation.
14581 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14582 implementations.
14583 * remote-utils.c (struct sym_cache, symbol_cache): New.
14584 (input_interrupt): Print a clearer message.
14585 (async_io_enabled): New variable.
14586 (enable_async_io, disable_async_io): Use it. Update comments.
14587 (look_up_one_symbol): Use the symbol cache.
14588 * thread-db.c (thread_db_look_up_symbols): New function.
14589 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14590
f6de3c42
DJ
145912004-10-16 Daniel Jacobowitz <dan@debian.org>
14592
14593 * configure.in: Test for -rdynamic.
14594 * configure: Regenerated.
14595 * Makefile (INTERNAL_LDFLAGS): New.
14596 (gdbserver, gdbreplay): Use it.
14597
2c0fc042
AC
145982004-09-02 Andrew Cagney <cagney@gnu.org>
14599
14600 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14601
075b3282
DJ
146022004-03-23 Daniel Jacobowitz <drow@mvista.com>
14603
14604 * linux-low.c (linux_wait): Clear all_processes list also.
14605
fa6a77dc
DJ
146062004-03-12 Daniel Jacobowitz <drow@mvista.com>
14607
14608 * linux-low.c: Include <errno.h>. Remove extern declaration of
14609 errno.
14610
6d782a97
DJ
146112004-03-12 Daniel Jacobowitz <drow@mvista.com>
14612
14613 * gdbreplay.c, server.h, utils.c: Update copyright years.
14614
3a7fb99b
DJ
146152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14616
14617 * server.c (main): Print child status or termination signal from
14618 variable 'signal', not 'sig'.
14619
c3e735a6
DJ
146202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14621
14622 * linux-low.c (linux_read_memory): Change return type to
14623 int. Check for and return error from ptrace().
14624 * target.c (read_inferior_memory): Change return type to int. Pass
14625 back return status from the_target->read_memory().
14626 * target.h (struct target_ops): Adapt *read_memory() prototype.
14627 Update comment.
14628 (read_inferior_memory): Adapt prototype.
14629 * server.c (main): Return an error packet if
14630 read_inferior_memory() returns an error.
14631
a59d1c82
DJ
146322004-03-04 Daniel Jacobowitz <drow@mvista.com>
14633
14634 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14635 Unify with other clean targets.
14636
dc3f8883
DJ
146372004-02-29 Daniel Jacobowitz <drow@mvista.com>
14638
14639 * server.c (handle_v_cont): Call set_desired_inferior.
14640
89a208da
DJ
146412004-02-29 Daniel Jacobowitz <drow@mvista.com>
14642
14643 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14644
62ea82f5
DJ
146452004-02-29 Daniel Jacobowitz <drow@mvista.com>
14646
14647 * linux-low.c (linux_wait): Unblock async I/O.
14648 (linux_resume): Block and enable async I/O.
14649 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14650 * server.h (block_async_io, unblock_async_io): Add prototypes.
14651
6910d122
DJ
146522004-02-29 Daniel Jacobowitz <drow@mvista.com>
14653
14654 * remote-utils.c (remote_open): Print a status notice after
14655 opening a TCP port.
14656 * server.c (attach_inferior): Print a status notice after
14657 attaching.
14658
146592004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14660
14661 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14662
c89dc5d4
DJ
146632004-02-26 Daniel Jacobowitz <drow@mvista.com>
14664
14665 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14666 error packet.
14667 * server.c, target.h: Update copyright years.
14668
4b8dad4a
RM
146692004-02-25 Roland McGrath <roland@redhat.com>
14670
14671 * target.h (struct target_ops): New member `read_auxv'.
14672 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14673 * linux-low.c (linux_read_auxv): New function.
14674 (linux_target_ops): Initialize `read_auxv' member to that.
14675
d7446758
JB
146762004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14677
14678 Committed by Jim Blandy <jimb@redhat.com>.
14679
14680 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14681 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14682 instead of GPR_SIZE to distiguish s390 and s390x targets.
14683
5544ad89
DJ
146842004-01-31 Daniel Jacobowitz <drow@mvista.com>
14685
14686 * linux-low.c: Update copyright year.
14687 (check_removed_breakpoint): Clear pending_is_breakpoint.
14688 (linux_set_resume_request, linux_queue_one_thread)
14689 (resume_status_pending_p): New functions.
14690 (linux_continue_one_thread): Use process->resume.
14691 (linux_resume): Only resume threads if there are no pending events.
14692 * linux-low.h (struct process_info): Add resume request
14693 pointer.
14694
2a68b70e
DJ
146952004-01-30 Daniel Jacobowitz <drow@mvista.com>
14696
14697 * regcache.c (new_register_cache): Clear the allocated register
14698 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14699
64386c31
DJ
147002003-10-13 Daniel Jacobowitz <drow@mvista.com>
14701
14702 * linux-low.c (linux_resume): Take a struct thread_resume *
14703 argument.
14704 (linux_wait): Update call.
14705 (resume_ptr): New static variable.
14706 (linux_continue_one_thread): Renamed from
14707 linux_continue_one_process. Use resume_ptr.
14708 (linux_resume): Use linux_continue_one_thread.
14709 * server.c (handle_v_cont, handle_v_requests): New functions.
14710 (myresume): New function.
14711 (main): Handle 'v' case.
14712 * target.h (struct thread_resume): New type.
14713 (struct target_ops): Change argument of "resume" to struct
14714 thread_resume *.
14715 (myresume): Delete macro.
14716
c938e9b0
L
147172003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14718
14719 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14720 (uninstall): Support DESTDIR.
14721
7f313d07
BC
14722Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14723
14724 * configure.srv: Add xscale*linux copy of arm*linux entry.
14725
3b2fc2ea
DJ
147262003-07-24 Daniel Jacobowitz <drow@mvista.com>
14727
14728 * linux-arm-low.c (arm_reinsert_addr): New function.
14729 (the_low_target): Add arm_reinsert_addr.
14730
1c0a559e
MK
147312003-07-08 Mark Kettenis <kettenis@gnu.org>
14732
14733 * mem-break.c: Remove whitespace at end of file.
14734
43d5792c
DJ
147352003-06-28 Daniel Jacobowitz <drow@mvista.com>
14736
14737 * configure.in: Check whether we need to prototype strerror.
14738 * server.h: Optionally prototype strerror.
14739 * gdbreplay.c (perror_with_name): Use strerror.
14740 * linux-low.c (linux_attach_lwp): Use strerror.
14741 * utils.c (perror_with_name): Use strerror.
14742 * config.in, configure: Regenerated.
14743
c8a86edf
DJ
147442003-06-28 Daniel Jacobowitz <drow@mvista.com>
14745
14746 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14747 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14748
73d37363
DJ
147492003-06-20 Daniel Jacobowitz <drow@mvista.com>
14750
14751 * Makefile.in (SFILES): Update.
14752 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14753 low-sun3.c: Remove files.
14754
6ad8ae5c
DJ
147552003-06-17 Daniel Jacobowitz <drow@mvista.com>
14756
14757 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14758 (linux_detach_one_process, linux_detach): New functions.
14759 (linux_target_ops): Add linux_detach.
14760 * server.c (main): Handle 'D' packet.
14761 * target.h (struct target_ops): Add "detach" member.
14762 (detach_inferior): Define.
14763
1581182a
MK
147642003-06-13 Mark Kettenis <kettenis@gnu.org>
14765
14766 From Kelley Cook <kelleycook@wideopenwest.com>:
14767 * configure.srv: Accept i[34567]86 variants.
14768
e5379b03
DJ
147692003-06-05 Daniel Jacobowitz <drow@mvista.com>
14770
14771 * linux-low.c (linux_wait_for_event): Correct comment typos.
14772 (linux_resume_one_process): Call check_removed_breakpoint.
14773 (linux_send_signal): New function.
14774 (linux_target_ops): Add linux_send_signal.
14775 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14776 of kill.
14777 * target.h (struct target_ops): Add send_signal.
14778
2ff29de4
JB
147792003-05-29 Jim Blandy <jimb@redhat.com>
14780
14781 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14782 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14783 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14784 away part of the register's value.
14785
254787d4
DJ
147862003-03-26 Daniel Jacobowitz <drow@mvista.com>
14787
14788 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14789 (linux_wait_for_event, linux_init_signals): Likewise.
14790
94e10508
DJ
147912003-03-17 Daniel Jacobowitz <drow@mvista.com>
14792
14793 * configure.in: Check for stdlib.h.
14794 * configure: Regenerated.
14795 * config.in: Regenerated.
14796
4c0711e0
DJ
147972003-01-04 Andreas Schwab <schwab@suse.de>
14798
14799 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14800
ef66e766
AC
148012003-01-02 Andrew Cagney <ac131313@redhat.com>
14802
14803 * Makefile.in: Remove obsolete code.
14804
a1358604
DJ
148052002-11-20 Daniel Jacobowitz <drow@mvista.com>
14806
14807 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14808 defined(PT_FPR0_HI).
14809
23ce3b1c
DJ
148102002-11-17 Stuart Hughes <seh@zee2.com>
14811
14812 * linux-arm-low.c (arm_num_regs): Increase.
14813 (arm_regmap): Include status register.
14814
148152002-11-17 Daniel Jacobowitz <drow@mvista.com>
14816
14817 * linux-low.c (register_addr): Remove incorrect -1 check.
14818
a9fa9f7d
DJ
148192002-08-29 Daniel Jacobowitz <drow@mvista.com>
14820
14821 * linux-low.c (linux_create_inferior): Call setpgid. Return
14822 the new PID.
14823 (unstopped_p, linux_signal_pid): Remove.
14824 (linux_target_ops): Remove linux_signal_pid.
14825 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14826 global instead of target method.
14827 * target.h (struct target_ops): Remove signal_pid. Update comment
14828 for create_inferior.
14829 * server.c (signal_pid): New variable.
14830 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14831 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14832 (attach_inferior): Set signal_pid.
14833
17574093
DJ
148342002-08-23 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14837
148382002-08-20 Jim Blandy <jimb@redhat.com>
14839
14840 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14841 default for this.
14842
148432002-08-01 Andrew Cagney <cagney@redhat.com>
14844
14845 * Makefile.in: Make chill references obsolete.
14846
148472002-07-24 Kevin Buettner <kevinb@redhat.com>
14848
14849 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14850 * configure: Regenerate.
14851 * config.in: Regenerate.
14852
148532002-07-09 David O'Brien <obrien@FreeBSD.org>
14854
14855 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14856 (perror_with_name, remote_close, remote_open, expect, play): Static.
14857
148582002-07-04 Michal Ludvig <mludvig@suse.cz>
14859
4b8dad4a 14860 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14861 byte offsets instead of an array of indexes.
14862 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14863
148642002-06-13 Daniel Jacobowitz <drow@mvista.com>
14865
14866 * regcache.c: Add comment.
14867
148682002-06-11 Daniel Jacobowitz <drow@mvista.com>
14869
14870 * thread-db.c: New file.
14871 * proc-service.c: New file.
14872 * acinclude.m4: New file.
14873 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14874 proc-service.o, and thread-db.o.
14875 (linux-low.o): Add USE_THREAD_DB.
14876 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14877 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14878 * aclocal.m4: Regenerated.
14879 * config.in: Regenerated.
14880 * configure: Regenerated.
14881 * configure.in: Check for proc_service.h, sys/procfs.h,
14882 thread_db.h, and linux/elf.h headrs.
14883 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14884 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14885 Check for -lthread_db and thread support.
14886 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14887 PowerPC, and SuperH.
14888 * i387-fp.c: Constify arguments.
14889 * i387-fp.h: Likewise.
14890 * inferiors.c: (struct thread_info): Renamed from
14891 `struct inferior_info'. Remove PID member. Use generic inferior
14892 list header. All uses updated.
14893 (inferiors, signal_pid): Removed.
14894 (all_threads): New variable.
14895 (get_thread): Define.
14896 (add_inferior_to_list): New function.
14897 (for_each_inferior): New function.
14898 (change_inferior_id): New function.
14899 (add_inferior): Removed.
14900 (remove_inferior): New function.
14901 (add_thread): New function.
14902 (free_one_thread): New function.
14903 (remove_thread): New function.
14904 (clear_inferiors): Use for_each_inferior and free_one_thread.
14905 (find_inferior): New function.
14906 (find_inferior_id): New function.
14907 (inferior_target_data): Update argument type.
14908 (set_inferior_target_data): Likewise.
14909 (inferior_regcache_data): Likewise.
14910 (set_inferior_regcache_data): Likewise.
14911 * linux-low.c (linux_bp_reinsert): Remove.
14912 (all_processes, stopping_threads, using_thrads)
14913 (struct pending_signals, debug_threads, pid_of): New.
14914 (inferior_pid): Replace with macro.
14915 (struct inferior_linux_data): Remove.
14916 (get_stop_pc, add_process): New functions.
14917 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14918 Use add_process and add_thread.
14919 (linux_attach_lwp): New function, based on old linux_attach. Use
14920 add_process and add_thread. Set stop_expected for new threads.
14921 (linux_attach): New function.
14922 (linux_kill_one_process): New function.
14923 (linux_kill): Kill all LWPs.
14924 (linux_thread_alive): Use find_inferior_id.
14925 (check_removed_breakpoints, status_pending_p): New functions.
14926 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14927 Update. Use WNOHANG. Wait for cloned processes also. Update process
14928 struct for the found process.
14929 (linux_wait_for_event): New function.
14930 (linux_wait): Use it. Support LWPs.
14931 (send_sigstop, wait_for_sigstop, stop_all_processes)
14932 (linux_resume_one_process, linux_continue_one_process): New functions.
14933 (linux_resume): Support LWPs.
14934 (REGISTER_RAW_SIZE): Remove.
14935 (fetch_register): Use register_size instead. Call supply_register.
14936 (usr_store_inferior_registers): Likewise. Call collect_register.
14937 Fix recursive case.
14938 (regsets_fetch_inferior_registers): Improve error message.
14939 (regsets_store_inferior_registers): Add debugging.
14940 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14941 (unstopped_p, linux_signal_pid): New functions.
14942 (linux_target_ops): Add linux_signal_pid.
14943 (linux_init_signals): New function.
14944 (initialize_low): Call it. Initialize using_threads.
14945 * regcache.c (inferior_regcache_data): Add valid
14946 flag.
14947 (get_regcache): Fetch registers lazily. Add fetch argument
14948 and update all callers.
14949 (regcache_invalidate_one, regcache_invalidate): New
14950 functions.
14951 (new_register_cache): Renamed from create_register_cache.
14952 Return the new regcache.
14953 (free_register_cache): Change argument to a void *.
14954 (registers_to_string, registers_from_string): Call get_regcache
14955 with fetch flag set.
14956 (register_data): Make static. Pass fetch flag to get_regcache.
14957 (supply_register): Call get_regcache with fetch flag clear.
14958 (collect_register): Call get_regcache with fetch flag set.
14959 (collect_register_as_string): New function.
14960 * regcache.h: Update.
14961 * remote-utils.c (putpkt): Flush after debug output and use
14962 stderr.
14963 Handle input interrupts while waiting for an ACK.
14964 (input_interrupt): Use signal_pid method.
14965 (getpkt): Flush after debug output and use stderr.
14966 (outreg): Use collect_register_as_string.
14967 (new_thread_notify, dead_thread_notify): New functions.
14968 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14969 and general_thread.
14970 (look_up_one_symbol): Flush after debug output.
14971 * server.c (step_thread, server_waiting): New variables.
14972 (start_inferior): Don't use signal_pid. Update call to mywait.
14973 (attach_inferior): Update call to mywait.
14974 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14975 (main): Don't fetch/store registers explicitly. Use
14976 set_desired_inferior. Support proposed ``Hs'' packet. Update
14977 calls to mywait.
14978 * server.h: Update.
14979 (struct inferior_list, struct_inferior_list_entry): New.
14980 * target.c (set_desired_inferior): New.
14981 (write_inferior_memory): Constify.
14982 (mywait): New function.
14983 * target.h: Update.
14984 (struct target_ops): New signal_pid method.
14985 (mywait): Removed macro, added prototype.
14986
14987 * linux-low.h (regset_func): Removed.
14988 (regset_fill_func, regset_store_func): New.
14989 (enum regset_type): New.
14990 (struct regset_info): Add type field. Use new operation types.
14991 (struct linux_target_ops): stop_pc renamed to get_pc.
14992 Add decr_pc_after_break and breakpoint_at.
14993 (get_process, get_thread_proess, get_process_thread)
14994 (strut process_info, all_processes, linux_attach_lwp)
14995 (thread_db_init): New.
14996
14997 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14998 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14999 (the_low_target): Add new members.
15000 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15001 (i386_store_fpxregset): Constify.
15002 (target_regsets): Add new kind identifier.
15003 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15004 (i386_set_pc): Add debugging.
15005 (i386_breakpoint_at): New function.
15006 (the_low_target): Add new members.
15007 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15008 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15009 (mips_breakpoint_at): New.
15010 (the_low_target): Add new members.
15011 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15012 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15013 (the_low_target): Add new members.
15014 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15015 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15016 (the_low_target): Add new members.
15017 * linux-x86-64-low.c (target_regsets): Add new kind
15018 identifier.
15019
150202002-05-15 Daniel Jacobowitz <drow@mvista.com>
15021
15022 From Martin Pool <mbp@samba.org>:
15023 * server.c (gdbserver_usage): New function.
15024 (main): Call it.
15025
150262002-05-14 Daniel Jacobowitz <drow@mvista.com>
15027
15028 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15029 stop_at -> stop_pc.
15030
150312002-05-04 Andrew Cagney <ac131313@redhat.com>
15032
15033 * Makefile.in: Remove obsolete code.
15034
150352002-04-24 Michal Ludvig <mludvig@suse.cz>
15036
15037 * linux-low.c (regsets_fetch_inferior_registers),
15038 (regsets_store_inferior_registers): Removed cast to int from
15039 ptrace() calls.
15040 * regcache.h: Added declaration of struct inferior_info.
15041
150422002-04-20 Daniel Jacobowitz <drow@mvista.com>
15043
15044 * inferiors.c (struct inferior_info): Add regcache_data.
15045 (add_inferior): Call create_register_cache.
15046 (clear_inferiors): Call free_register_cache.
15047 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15048 * regcache.c (struct inferior_regcache_data): New.
15049 (registers): Remove.
15050 (get_regcache): New function.
15051 (create_register_cache, free_register_cache): New functions.
15052 (set_register_cache): Don't initialize the register cache here.
15053 (registers_to_string, registers_from_string, register_data): Call
15054 get_regcache.
15055 * regcache.h: Add prototypes.
15056 * server.h: Likewise.
15057
150582002-04-20 Daniel Jacobowitz <drow@mvista.com>
15059
15060 * mem-break.c: New file.
15061 * mem-break.h: New file.
15062 * Makefile.in: Add mem-break.o rule; update server.h
15063 dependencies.
15064 * inferiors.c (struct inferior_info): Add target_data
15065 member.
15066 (clear_inferiors): Free target_data member if set.
15067 (inferior_target_data, set_inferior_target_data): New functions.
15068 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15069 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15070 * linux-low.c (linux_bp_reinsert): New variable.
15071 (struct inferior_linux_data): New.
15072 (linux_create_inferior): Use set_inferior_target_data.
15073 (linux_attach): Likewise. Call add_inferior.
15074 (linux_wait_for_one_inferior): New function.
15075 (linux_wait): Call it.
15076 (linux_write_memory): Add const.
15077 (initialize_low): Call set_breakpoint_data.
15078 * linux-low.h (struct linux_target_ops): Add breakpoint
15079 handling members.
15080 * server.c (attach_inferior): Remove extra add_inferior
15081 call.
15082 * server.h: Include mem-break.h. Update inferior.c
15083 prototypes.
15084 * target.c (read_inferior_memory)
15085 (write_inferior_memory): New functions.
15086 * target.h (read_inferior_memory)
15087 (write_inferior_memory): Change macros to prototypes.
15088 (struct target_ops): Update comments. Add const to write_memory
15089 definition.
15090
150912002-04-11 Daniel Jacobowitz <drow@mvista.com>
15092
15093 * linux-low.c (usr_store_inferior_registers): Support
15094 registers which are allowed to fail to store.
15095 * linux-low.h (linux_target_ops): Likewise.
15096 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15097 (ppc_cannot_store_register): FPSCR may not be storable.
15098
150992002-04-09 Daniel Jacobowitz <drow@mvista.com>
15100
15101 * server.h: Include <string.h> if HAVE_STRING_H.
15102 * ChangeLog: Correct paths in last ChangeLog entry.
15103
151042002-04-09 Daniel Jacobowitz <drow@mvista.com>
15105
15106 * linux-low.h: Remove obsolete prototypes.
15107 (struct linux_target_ops): New.
15108 (extern the_low_target): New.
15109 * linux-low.c (num_regs, regmap): Remove declarations.
15110 (register_addr): Use the_low_target explicitly.
15111 (fetch_register): Likewise.
15112 (usr_fetch_inferior_registers): Likewise.
15113 (usr_store_inferior_registers): Likewise.
15114 * linux-arm-low.c (num_regs): Remove.
15115 (arm_num_regs): Define.
15116 (arm_regmap): Renamed from regmap, made static.
15117 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15118 made static.
15119 (arm_cannot_store_register): Renamed from cannot_store_register,
15120 made static.
15121 (the_low_target): New.
15122 * linux-i386-low.c (num_regs): Remove.
15123 (i386_num_regs): Define.
15124 (i386_regmap): Renamed from regmap, made static.
15125 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15126 made static.
15127 (i386_cannot_store_register): Renamed from cannot_store_register,
15128 made static.
15129 (the_low_target): New.
15130 * linux-ia64-low.c (num_regs): Remove.
15131 (ia64_num_regs): Define.
15132 (ia64_regmap): Renamed from regmap, made static.
15133 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15134 made static.
15135 (ia64_cannot_store_register): Renamed from cannot_store_register,
15136 made static.
15137 (the_low_target): New.
15138 * linux-m68k-low.c (num_regs): Remove.
15139 (m68k_num_regs): Define.
15140 (m68k_regmap): Renamed from regmap, made static.
15141 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15142 made static.
15143 (m68k_cannot_store_register): Renamed from cannot_store_register,
15144 made static.
15145 (the_low_target): New.
15146 * linux-mips-low.c (num_regs): Remove.
15147 (mips_num_regs): Define.
15148 (mips_regmap): Renamed from regmap, made static.
15149 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15150 made static.
15151 (mips_cannot_store_register): Renamed from cannot_store_register,
15152 made static.
15153 (the_low_target): New.
15154 * linux-ppc-low.c (num_regs): Remove.
15155 (ppc_num_regs): Define.
15156 (ppc_regmap): Renamed from regmap, made static.
15157 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15158 made static.
15159 (ppc_cannot_store_register): Renamed from cannot_store_register,
15160 made static.
15161 (the_low_target): New.
15162 * linux-s390-low.c (num_regs): Remove.
15163 (s390_num_regs): Define.
15164 (s390_regmap): Renamed from regmap, made static.
15165 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15166 made static.
15167 (s390_cannot_store_register): Renamed from cannot_store_register,
15168 made static.
15169 (the_low_target): New.
15170 * linux-sh-low.c (num_regs): Remove.
15171 (sh_num_regs): Define.
15172 (sh_regmap): Renamed from regmap, made static.
15173 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15174 made static.
15175 (sh_cannot_store_register): Renamed from cannot_store_register,
15176 made static.
15177 (the_low_target): New.
15178 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15179 (the_low_target): New.
15180
151812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15182
15183 * Makefile.in: Add stamp-h target.
15184 * configure.in: Create stamp-h.
15185 * configure: Regenerated.
15186
151872002-04-09 Daniel Jacobowitz <drow@mvista.com>
15188
15189 * inferiors.c: New file.
15190 * target.c: New file.
15191 * target.h: New file.
15192 * Makefile.in: Add target.o and inferiors.o. Update
15193 dependencies.
15194 * linux-low.c (inferior_pid): New static variable,
15195 moved from server.c.
15196 (linux_create_inferior): Renamed from create_inferior.
15197 Call add_inferior. Return 0 on success instead of a PID.
15198 (linux_attach): Renamed from myattach.
15199 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15200 (linux_thread_alive): Renamed from mythread_alive.
15201 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15202 child dies.
15203 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15204 (regsets_store_inferior_registers): Correct error message.
15205 Add missing ``return 0''.
15206 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15207 (linux_store_registers): Renamed from store_inferior_registers.
15208 (linux_read_memory): Renamed from read_inferior_memory.
15209 (linux_write_memory): Renamed from write_inferior_memory.
15210 (linux_target_ops): New structure.
15211 (initialize_low): Call set_target_ops ().
15212 * remote-utils.c (unhexify): New function.
15213 (hexify): New function.
15214 (input_interrupt): Send signals to ``signal_pid''.
15215 * server.c (inferior_pid): Remove.
15216 (start_inferior): Update create_inferior call.
15217 (attach_inferior): Call add_inferior.
15218 (handle_query): New function.
15219 (main): Call handle_query for `q' packets.
15220 * server.h: Include "target.h". Remove obsolete prototypes.
15221 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15222
152232002-04-09 Daniel Jacobowitz <drow@mvista.com>
15224
15225 * Makefile.in: Add WARN_CFLAGS. Update configury
15226 dependencies.
15227 * configure.in: Check for <string.h>
15228 * configure: Regenerate.
15229 * config.in: Regenerate.
15230 * gdbreplay.c: Include needed system headers.
15231 (remote_open): Remove strchr prototype.
15232 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15233 * regcache.c (supply_register): Change buf argument to const void *.
15234 (supply_register_by_name): Likewise.
15235 (collect_register): Change buf argument to void *.
15236 (collect_register_by_name): Likewise.
15237 * regcache.h: Add missing prototypes.
15238 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15239 * server.c (handle_query): New function.
15240 (attached): New static variable, moved out of main.
15241 (main): Quiet longjmp clobber warnings.
15242 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15243 * utils.c (error): Remove NORETURN.
15244 (fatal): Likewise.