Fix build breakage on GNU/Linux AArch64, take 2
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a059f00c
SDJ
12017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * regcache.c (get_thread_regcache): Guard calls to "memset"
4 with "!VEC_empty".
5
cc397f3a
SDJ
62017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7
8 * linux-low.c (handle_extended_wait): Use
9 "allocate_target_description" instead of "XNEW".
10 * linux-x86-low.c (initialize_low_arch): Likewise.
11
22916b07
YQ
122017-09-05 Yao Qi <yao.qi@linaro.org>
13
14 * configure.srv (srv_i386_regobj): Remove.
15 (srv_amd64_regobj): Remove.
16 (srv_regobj): Set it to "" for x86 non-linux targets.
17 * linux-x86-tdesc.c (i386_linux_read_description):
18 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
19 (init_registers_i386): Remove the declaration.
20 (tdesc_i386): Remove the declaration.
21 (lynx_i386_arch_setup): Call i386_create_target_description.
22 * nto-x86-low.c: Likewise.
23 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
24 [!__x86_64__]: include arch/i386.h.
25 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
26
38602d55
YQ
272017-09-05 Yao Qi <yao.qi@linaro.org>
28
29 * configure.srv (srv_amd64_linux_xmlfiles): Remove
30 i386/amd64-XXX-linux from it.
31
44b886ff
YQ
322017-09-05 Yao Qi <yao.qi@linaro.org>
33
34 * configure.srv: Empty srv_amd64_linux_regobj if $development is
35 false.
36 (ipa_amd64_linux_regobj): Remove.
37 (ipa_x32_linux_regobj): Remove.
38
b4570e4b
YQ
392017-09-05 Yao Qi <yao.qi@linaro.org>
40
41 * Makefile.in (arch-amd64.o): New rule.
42 * configure.srv: Append arch-amd64.o.
43 * linux-amd64-ipa.c: Include common/x86-xstate.h.
44 (get_ipa_tdesc): Call amd64_linux_read_description.
45 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
46 and init_registers_amd64_XXX.
47 * linux-x86-low.c (x86_linux_read_description): Call
48 amd64_linux_read_description.
49 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
50 (initialize_low_arch): Don't call init_registers_x32_XXX and
51 init_registers_amd64_XXX.
52 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
53 and tdesc_amd64_XXX.
54 [__x86_64__] (amd64_tdesc_test): New function.
55 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
56 and init_registers_amd64_XXX.
57 * linux-x86-tdesc.c: Include arch/amd64.h.
58 (xcr0_to_tdesc_idx): New function.
59 (i386_linux_read_description): New function.
60 (amd64_get_ipa_tdesc_idx): New function.
61 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
62 (amd64_get_ipa_tdesc): Declare.
63
d1f28ea2
YQ
642017-09-05 Yao Qi <yao.qi@linaro.org>
65
66 * configure.srv (srv_i386_linux_xmlfiles): Remove
67 i386/i386-XXX-linux.xml from it.
68
25a93583
YQ
692017-09-05 Yao Qi <yao.qi@linaro.org>
70
71 * configure.srv: Set srv_i386_linux_regobj empty if $development
72 is false.
73 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
74 initialize_low_tdesc.
75 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
76 with #if initialize_low_tdesc.
77 * linux-x86-tdesc-selftest.c: New file.
78 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
79
5f035c07
YQ
802017-09-05 Yao Qi <yao.qi@linaro.org>
81
82 * Makefile.in (arch-i386.o): New rule.
83 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
84 (x86_64-*-linux*): Likewise.
85 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
86 include arch/i386.h.
87 (i386_linux_read_description): Remove code and call
88 i386_create_target_description.
89 * tdesc.c (allocate_target_description): New function.
90 * tdesc.h (set_tdesc_architecture): Remove declaration.
91 (set_tdesc_osabi): Likewise.
92
0abe8a89
YQ
932017-09-05 Yao Qi <yao.qi@linaro.org>
94
95 * linux-x86-tdesc.c: Don't include <inttypes.h>.
96 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
97 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
98 .xmltarget.
99 * server.c (get_features_xml): Call tdesc_get_features_xml.
100 * tdesc.c (set_tdesc_architecture): New function.
101 (set_tdesc_osabi): New function.
102 (tdesc_get_features_xml): New function.
103 (tdesc_create_feature): Add an argument.
104 * tdesc.h (struct target_desc) <features>: New field.
105 <arch, osabi>: New field.
106 (~target_desc): xfree features, arch, and osabi.
107 (target_desc::oerator==): Don't compare .xmltarget.
108 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
109 (set_tdesc_osabi): Likewise.
110 (tdesc_get_features_xml): Likewise.
111
0a188386
YQ
1122017-09-05 Yao Qi <yao.qi@linaro.org>
113
114 * linux-x86-tdesc.c: Include selftest.h.
115 (i386_tdesc_test): New function.
116 (initialize_low_tdesc): Call selftests::register_test.
117 * tdesc.h: Include regdef.h.
118 (target_desc): Override operator == and !=.
119
f49ff000
YQ
1202017-09-05 Yao Qi <yao.qi@linaro.org>
121
122 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
123 (ipa_obj): Likewise.
124 * linux-i386-ipa.c: Include common/x86-xstate.h
125 (get_ipa_tdesc): Call i386_linux_read_description.
126 (initialize_low_tracepoint): Don't call init_registers_XXX
127 functions, call initialize_low_tdesc instead.
128 * linux-x86-low.c (x86_linux_read_description): Call
129 i386_linux_read_description.
130 (initialize_low_arch): Don't call init_registers_i386_XXX
131 functions, call initialize_low_tdesc.
132 * linux-x86-tdesc.c: New file.
133 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
134 (i386_get_ipa_tdesc_idx): Declare.
135 (i386_get_ipa_tdesc): Declare.
136 (initialize_low_tdesc): Declare.
137
2b68ef2f
YQ
1382017-09-05 Yao Qi <yao.qi@linaro.org>
139
140 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
141 instead of 0.
142
f7000548
YQ
1432017-09-05 Yao Qi <yao.qi@linaro.org>
144
145 * Makefile.in (IPA_OBJS): Add vec-ipa.o
146 * regcache.c (get_thread_regcache): Use VEC_length.
147 (init_register_cache): Likewise.
148 (regcache_cpy): Likewise.
149 (registers_to_string): Iterate reg_defs via VEC_iterate.
150 (find_regno): Likewise.
151 (find_register_by_number): Use VEC_index.
152 (register_size): Call find_register_by_number.
153 (register_data): Call find_register_by_number.
154 (supply_regblock): Use VEC_length.
155 (regcache_raw_read_unsigned): Likewise.
156 * tdesc.c (init_target_desc): Iterate reg_defs via
157 VEC_iterate.
158 (default_description): Update initializer.
159 (copy_target_description): Don't update field num_registers.
160 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
161 <num_registers>: Remove.
162
50a421ac
SM
1632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
164
165 * Makefile.in (.SECONDARY): Define target.
166
23fdd69e
SM
1672017-09-03 Simon Marchi <simon.marchi@ericsson.com>
168
169 * linux-low.c (linux_wait_1): Adjust.
170 * server.c (queue_stop_reply_callback): Adjust.
171
0a2dde4a
SDJ
1722017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
175 QEnvironmentUnset and QEnvironmentReset packets.
176 (handle_query): Inform remote that QEnvironmentHexEncoded,
177 QEnvironmentUnset and QEnvironmentReset are supported.
178
6afd337d
SM
1792017-08-25 Simon Marchi <simon.marchi@ericsson.com>
180
181 * inferiors.h (inferior_target_data): Rename to ...
182 (thread_target_data): ... this.
183 (inferior_regcache_data): Rename to ...
184 (thread_regcache_data): ... this.
185 (set_inferior_regcache_data): Rename to ...
186 (set_thread_regcache_data): ... this.
187 * inferiors.c (inferior_target_data): Rename to ...
188 (thread_target_data): ... this.
189 (inferior_regcache_data): Rename to ...
190 (thread_regcache_data): ... this.
191 (set_inferior_regcache_data): Rename to ...
192 (set_thread_regcache_data): ... this.
193 (free_one_thread): Update.
194 * linux-low.h (get_thread_lwp): Update.
195 * regcache.c (get_thread_regcache): Update.
196 (regcache_invalidate_thread): Update.
197 (free_register_cache_thread): Update.
198 * win32-i386-low.c (update_debug_registers_callback): Update.
199 (win32_get_current_dr): Update.
200 * win32-low.c (thread_rec): Update.
201 (delete_thread_info): Update.
202 (continue_one_thread): Update.
203 (suspend_one_thread): Update.
204
a160cc46
SM
2052017-08-24 Simon Marchi <simon.marchi@ericsson.com>
206
207 * inferiors.c (set_inferior_target_data): Remove.
208 * inferiors.h (set_inferior_target_data): Remove.
209
6d580b63
YQ
2102017-08-18 Yao Qi <yao.qi@linaro.org>
211
212 * Makefile.in (OBS): Add selftest.o.
213 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
214 * configure, config.in: Re-generated.
215 * server.c: Include common/sefltest.h.
216 (captured_main): Handle option --selftest.
217
f5a29eb0
YQ
2182017-08-09 Yao Qi <yao.qi@linaro.org>
219
220 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
221 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
222 i386-avx-mpx.o and i386-mmx.o.
223 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
224 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
225 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
226 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
227 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
228 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
229 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
230 i386/amd64-avx-mpx.xml.
231
57757c2f
YQ
2322017-08-09 Yao Qi <yao.qi@linaro.org>
233
234 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
235 and x32-avx-avx512.o.
236 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
237 i386/x32-avx-avx512.xml.
238
229d26fc
SM
2392017-07-26 Simon Marchi <simon.marchi@ericsson.com>
240
241 * tracepoint.h (enum class fast_tpoint_collect_result): New
242 enumeration.
243 (fast_tracepoint_collecting): Change return type to
244 fast_tpoint_collect_result.
245 * tracepoint.c (fast_tracepoint_collecting): Likewise.
246 * linux-low.h: Include tracepoint.h.
247 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
248 fast_tpoint_collect_result.
249 * linux-low.c (handle_tracepoints): Adjust.
250 (linux_fast_tracepoint_collecting): Change return type to
251 fast_tpoint_collect_result.
252 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
253 linux_wait_1, stuck_in_jump_pad_callback,
254 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
255 proceed_one_lwp): Adjust to type change.
256
2e1e43e1
YQ
2572017-07-10 Yao Qi <yao.qi@linaro.org>
258
259 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
260
adc764e7
YQ
2612017-06-29 Yao Qi <yao.qi@linaro.org>
262
263 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
264 Remove.
265 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
266
a206891a
SM
2672017-06-20 Simon Marchi <simon.marchi@ericsson.com>
268
269 * Makefile.in (IPA_OBJS): Sort and format one item per line.
270
9a6c7d9c
SDJ
2712017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
272
273 * linux-low.c (linux_create_inferior): Adjust code to access the
274 environment information via 'gdb_environ' class.
275 * lynx-low.c (lynx_create_inferior): Likewise.
276 * server.c (our_environ): Make it an instance of 'gdb_environ'.
277 (get_environ): Return a pointer to 'our_environ'.
278 (captured_main): Initialize 'our_environ'.
279 * server.h (get_environ): Adjust prototype.
280 * spu-low.c (spu_create_inferior): Adjust code to access the
281 environment information via 'gdb_environ' class.
282
ae3e2ccf
SM
2832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
284
285 * linux-low.c (linux_read_memory, linux_write_memory): Remove
286 usage of "register" keyword.
287
3e019bdc
SM
2882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
289
290 * configure: Re-generate.
291
8465943a
SM
2922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
293
294 * configure: Re-generate.
295
cf0dd6f0
SM
2962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
297
298 * Makefile.in (COMPILE.pre): Add "-x c++".
299
9845682b
SDJ
3002017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * fork-child.c: Conditionally include <signal.h>.
303
aefd8b33
SDJ
3042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
305
306 * server.c (handle_general_set): Handle new packet
307 "QStartupWithShell".
308 (handle_query): Add "QStartupWithShell" to the list of supported
309 packets.
310 (gdbserver_usage): Add help text explaining the
311 new "--startup-with-shell" and "--no-startup-with-shell" CLI
312 options.
313 (captured_main): Recognize and act upon the presence of the new
314 CLI options.
315
2090129c
SDJ
3162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
317 Pedro Alves <palves@redhat.com>
318
319 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
320 * configure: Regenerate.
321 * configure.srv (srv_linux_obj): Add "fork-child.o" and
322 "fork-inferior.o".
323 (i[34567]86-*-lynxos*): Likewise.
324 (spu*-*-*): Likewise.
325 * fork-child.c: New file.
326 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
327 and "environ.h".
328 (linux_ptrace_fun): New function.
329 (linux_create_inferior): Adjust function prototype to reflect
330 change on "target.h". Adjust function code to use
331 "fork_inferior".
332 (linux_request_interrupt): Delete "signal_pid".
333 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
334 (lynx_ptrace_fun): New function.
335 (lynx_create_inferior): Adjust function prototype to reflect
336 change on "target.h". Adjust function code to use
337 "fork_inferior".
338 * nto-low.c (nto_create_inferior): Adjust function prototype and
339 code to reflect change on "target.h". Update comments.
340 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
341 "common-terminal.h" and "environ.h".
342 (terminal_fd): Moved to fork-child.c.
343 (old_foreground_pgrp): Likewise.
344 (restore_old_foreground_pgrp): Likewise.
345 (last_status): Make it global.
346 (last_ptid): Likewise.
347 (our_environ): New variable.
348 (startup_with_shell): Likewise.
349 (program_name): Likewise.
350 (program_argv): Rename to...
351 (program_args): ...this.
352 (wrapper_argv): New variable.
353 (start_inferior): Delete function.
354 (get_exec_wrapper): New function.
355 (get_exec_file): Likewise.
356 (get_environ): Likewise.
357 (prefork_hook): Likewise.
358 (post_fork_inferior): Likewise.
359 (postfork_hook): Likewise.
360 (postfork_child_hook): Likewise.
361 (handle_v_run): Update code to deal with arguments coming from the
362 remote host. Update calls from "start_inferior" to
363 "create_inferior".
364 (captured_main): Likewise. Initialize environment variable. Call
365 "have_job_control".
366 * server.h (post_fork_inferior): New prototype.
367 (get_environ): Likewise.
368 (last_status): Declare.
369 (last_ptid): Likewise.
370 (signal_pid): Likewise.
371 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
372 (spu_ptrace_fun): New function.
373 (spu_create_inferior): Adjust function prototype to reflect change
374 on "target.h". Adjust function code to use "fork_inferior".
375 * target.c (target_terminal_init): New function.
376 (target_terminal_inferior): Likewise.
377 (target_terminal_ours): Likewise.
378 * target.h: Include <vector>.
379 (struct target_ops) <create_inferior>: Update prototype.
380 (create_inferior): Update macro.
381 * utils.c (gdb_flush_out_err): New function.
382 * win32-low.c (win32_create_inferior): Adjust function prototype
383 and code to reflect change on "target.h".
384
043a4934
SDJ
3852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
386
387 * inferiors.c (switch_to_thread): New function.
388
15652511
SDJ
3892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 * Makefile.in (SFILE): Add "common/job-control.c".
392 (OBS): Add "job-control.o".
393
21ea5acd
SDJ
3942017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
395
396 * Makefile: Remove "@host_makefile_frag@".
397
e13cb306
PA
3982017-05-05 Pedro Alves <palves@redhat.com>
399
400 * configure: Regenerate.
401
c94fee56
SDJ
4022017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
403
404 * configure: Regenerate.
405
a0ff9e1a
SM
4062017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
409 software_single_step change of return type to
410 std::vector<CORE_ADDR>.
411 * linux-low.c (install_software_single_step_breakpoints):
412 Likewise.
413 * linux-low.h (install_software_single_step_breakpoints):
414 Likewise.
415
be628ab8
SDJ
4162017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
417
418 * remote-utils.c: Include "gdb_termios.h" instead of
419 "terminal.h".
420 * terminal.h: Delete file.
421
7c5ded6a
SDJ
4222017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
423
424 * server.c: Include <vector>.
425 <program_argv, wrapper_argv>: Convert to std::vector.
426 (start_inferior): Rewrite function to use C++.
427 (handle_v_run): Likewise. Update code that calculates the argv
428 based on the vRun packet; use C++.
429 (captured_main): Likewise.
430
436252de
SM
4312017-04-06 Simon Marchi <simon.marchi@ericsson.com>
432
433 * server.c (handle_v_cont): Initialize thread_resume::thread
434 with null_ptid.
435
9bf2a700
PA
4362017-04-05 Pedro Alves <palves@redhat.com>
437
438 * configure: Regenerate.
439
a121b7c1
PA
4402017-04-05 Pedro Alves <palves@redhat.com>
441
442 * gdbreplay.c (sync_error): Constify.
443 * linux-x86-low.c (push_opcode): Constify.
444
21c8a587
PA
4452017-04-05 Pedro Alves <palves@redhat.com>
446
447 * win32-low.c (get_child_debug_event)
448 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
449 Report TARGET_WAITKIND_SPURIOUS instead.
450
fb32b4f7
PA
4512017-04-05 Pedro Alves <palves@redhat.com>
452
453 * remote-utils.c (remote_prepare, remote_open): Constify.
454 * remote-utils.h (remote_prepare, remote_open): Constify.
455 * server.c (captured_main): Constify 'port' handling.
456
65dd1e59
SM
4572017-04-04 Simon Marchi <simon.marchi@ericsson.com>
458
459 * Makefile.in (clean): Clear .deps.
460
8fa5b777
SM
4612017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
462
463 * .gitignore: Remove generated files, replace with wildcard.
464 * (clean): Replace removal of generated files with wildcard.
465 (version.c): Replace with...
466 (version-generated.c): ...this.
467 (xml-builtin.c): Replace with...
468 (xml-builtin-generated.c): ...this.
469 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
470 (%.c: *regformats*): Replace with...
471 (%-generated.c: *regformats*): ...this.
472
a12e714b
MF
4732017-03-27 Max Filippov <jcmvbkbc@gmail.com>
474
475 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
476 (xtensa_fill_gregset): Call collect_register_by_name for
477 threadptr register.
478 (xtensa_store_gregset): Call supply_register_by_name for
479 threadptr register.
480
1a09b50a
MF
4812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
482
483 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
484 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
485 (xtensa_store_gregset): Call supply_register for all registers in
486 a0_regnum..a0_regnum + C0_NREGS range.
487
1a01e7c6
SM
4882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
489
490 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
491 (ax-ipa.o: ax.c): Remove.
492 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
493 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
494 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
495 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
496 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
497
36bc18a8
SM
4982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
499
500 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
501 (print-utils-ipa.o: ../common/print-utils.c): Remove.
502 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
503 (errors-ipa.o: ../common/errors.c): Remove.
504 (format-ipa.o: ../common/format.c): Remove.
505 (common-utils-ipa.o: ../common/common-utils.c): Remove.
506
a8ebe3d5
SM
5072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
508
509 * Makefile.in (%-ipa.o: %.c): New rule.
510 (tracepoint-ipa.o: tracepoint.c): Remove.
511 (utils-ipa.o: utils.c): Remove.
512 (remote-utils-ipa.o: remote-utils.c): Remove.
513 (regcache-ipa.o: regcache.c): Remove.
514 (i386-linux-ipa.o: i386-linux.c): Remove.
515 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
516 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
517 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
518 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
519 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
520 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
521 (amd64-linux-ipa.o: amd64-linux.c): Remove.
522 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
523 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
524 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
525 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
526 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
527 (aarch64-ipa.o: aarch64.c): Remove.
528 (s390-linux32-ipa.o: s390-linux32.c): Remove.
529 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
530 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
531 (s390-linux64-ipa.o: s390-linux64.c): Remove.
532 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
533 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
534 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
535 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
536 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
537 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
538 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
539 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
540 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
541 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
542 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
543 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
544 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
545 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
546 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
547 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
548 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
549 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
550 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
551 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
552 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
553 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
554 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
555 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
556 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
557 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
558 (tdesc-ipa.o: tdesc.c): Remove.
559 (x32-linux-ipa.o: x32-linux.c): Remove.
560 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
561 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
562
50cfacb7
SM
5632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
564
565 * Makefile.in (%.o: ../arch/%.c): New rule.
566 (arm.o: ../arch/arm.c): Remove.
567 (arm-linux.o: ../arch/arm-linux.c): Remove.
568 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
569 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
570
c5a22423
SM
5712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
572
573 * Makefile.in (%.o: ../nat/%.c): New rule.
574 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
575 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
576 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
577 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
578 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
579 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
580 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
581 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
582 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
583 (linux-personality.o: ../nat/linux-personality.c): Remove.
584 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
585 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
586 (x86-linux.o: ../nat/x86-linux.c): Remove.
587 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
588 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
589
6bda016b
SM
5902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
591
592 * Makefile.in (%.o: ../common/%.c): New rule.
593 (signals.o: ../common/signals.c): Remove.
594 (print-utils.o: ../common/print-utils.c): Remove.
595 (rsp-low.o: ../common/rsp-low.c): Remove.
596 (common-utils.o: ../common/common-utils.c): Remove.
597 (posix-strerror.o: ../common/posix-strerror.c): Remove.
598 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
599 (vec.o: ../common/vec.c): Remove.
600 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
601 (xml-utils.o: ../common/xml-utils.c): Remove.
602 (ptid.o: ../common/ptid.c): Remove.
603 (buffer.o: ../common/buffer.c): Remove.
604 (format.o: ../common/format.c): Remove.
605 (filestuff.o: ../common/filestuff.c): Remove.
606 (agent.o: ../common/agent.c): Remove.
607 (errors.o: ../common/errors.c): Remove.
608 (environ.o: ../common/environ.c): Remove.
609 (common-debug.o: ../common/common-debug.c): Remove.
610 (cleanups.o: ../common/cleanups.c): Remove.
611 (common-exceptions.o: ../common/common-exceptions.c): Remove.
612 (fileio.o: ../common/fileio.c): Remove.
613 (common-regcache.o: ../common/common-regcache.c): Remove.
614 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
615 (new-op.o: ../common/new-op.c): Remove.
616 (btrace-common.o: ../common/btrace-common.c): Remove.
617
21122961
SM
6182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
619
620 * Makefile.in (%.o: ../target/%.c): New rule.
621 (waitstatus.o: ../target/waitstatus.c): Remove.
622
c362e621
SM
6232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
624
625 * Makefile.in
626 (%.c: ../regformats/%.dat,
627 (%.c: ../regformats/arm/%.dat,
628 (%.c: ../regformats/i386/%.dat,
629 (%.c: ../regformats/rs6000/%.dat): New rules.
630 (aarch64.c): Remove.
631 (reg-arm.c): Remove.
632 (arm-with-iwmmxt.c): Remove.
633 (arm-with-vfpv2.c): Remove.
634 (arm-with-vfpv3.c): Remove.
635 (arm-with-neon.c): Remove.
636 (reg-bfin.c): Remove.
637 (reg-cris.c): Remove.
638 (reg-crisv32.c): Remove.
639 (i386.c): Remove.
640 (i386-linux.c): Remove.
641 (i386-avx.c): Remove.
642 (i386-avx-linux.c): Remove.
643 (i386-avx-avx512.c): Remove.
644 (i386-avx-avx512-linux.c): Remove.
645 (i386-mpx.c): Remove.
646 (i386-mpx-linux.c): Remove.
647 (i386-avx-mpx-avx512-pku.c): Remove.
648 (i386-avx-mpx-avx512-pku-linux.c): Remove.
649 (i386-avx-mpx.c): Remove.
650 (i386-avx-mpx-linux.c): Remove.
651 (i386-mmx.c): Remove.
652 (i386-mmx-linux.c): Remove.
653 (reg-ia64.c): Remove.
654 (reg-m32r.c): Remove.
655 (reg-m68k.c): Remove.
656 (reg-cf.c): Remove.
657 (mips-linux.c): Remove.
658 (mips-dsp-linux.c): Remove.
659 (mips64-linux.c): Remove.
660 (mips64-dsp-linux.c): Remove.
661 (nios2-linux.c): Remove.
662 (powerpc-32.c): Remove.
663 (powerpc-32l.c): Remove.
664 (powerpc-altivec32l.c): Remove.
665 (powerpc-cell32l.c): Remove.
666 (powerpc-vsx32l.c): Remove.
667 (powerpc-isa205-32l.c): Remove.
668 (powerpc-isa205-altivec32l.c): Remove.
669 (powerpc-isa205-vsx32l.c): Remove.
670 (powerpc-e500l.c): Remove.
671 (powerpc-64l.c): Remove.
672 (powerpc-altivec64l.c): Remove.
673 (powerpc-cell64l.c): Remove.
674 (powerpc-vsx64l.c): Remove.
675 (powerpc-isa205-64l.c): Remove.
676 (powerpc-isa205-altivec64l.c): Remove.
677 (powerpc-isa205-vsx64l.c): Remove.
678 (s390-linux32.c): Remove.
679 (s390-linux32v1.c): Remove.
680 (s390-linux32v2.c): Remove.
681 (s390-linux64.c): Remove.
682 (s390-linux64v1.c): Remove.
683 (s390-linux64v2.c): Remove.
684 (s390-te-linux64.c): Remove.
685 (s390-vx-linux64.c): Remove.
686 (s390-tevx-linux64.c): Remove.
687 (s390x-linux64.c): Remove.
688 (s390x-linux64v1.c): Remove.
689 (s390x-linux64v2.c): Remove.
690 (s390x-te-linux64.c): Remove.
691 (s390x-vx-linux64.c): Remove.
692 (s390x-tevx-linux64.c): Remove.
693 (tic6x-c64xp-linux.c): Remove.
694 (tic6x-c64x-linux.c): Remove.
695 (tic6x-c62x-linux.c): Remove.
696 (reg-sh.c): Remove.
697 (reg-sparc64.c): Remove.
698 (reg-spu.c): Remove.
699 (amd64.c): Remove.
700 (amd64-linux.c): Remove.
701 (amd64-avx.c): Remove.
702 (amd64-avx-linux.c): Remove.
703 (amd64-avx-avx512.c): Remove.
704 (amd64-avx-avx512-linux.c): Remove.
705 (amd64-mpx.c): Remove.
706 (amd64-mpx-linux.c): Remove.
707 (amd64-avx-mpx-avx512-pku.c): Remove.
708 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
709 (amd64-avx-mpx.c): Remove.
710 (amd64-avx-mpx-linux.c): Remove.
711 (x32.c): Remove.
712 (x32-linux.c): Remove.
713 (x32-avx.c): Remove.
714 (x32-avx-linux.c): Remove.
715 (x32-avx-avx512.c): Remove.
716 (x32-avx-avx512-linux.c): Remove.
717 (reg-xtensa.c): Remove.
718 (reg-tilegx.c): Remove.
719 (reg-tilegx32.c): Remove.
720
1672e0d9
SDJ
7212017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
722
723 * Makefile.in (SFILES): Add "common/environ.c".
724 (OBJS): Add "common/environ.h".
725
239b6d10
WT
7262017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
727
728 * configure.ac: Check if the fs_base and gs_base members of
729 `struct user_regs_struct' exist.
730 * config.in: Regenerated.
731 * configure: Likewise.
732
694b382c
AT
7332017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
734
735 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
736 target_read_memory.
737 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
738 (get_next_pcs_syscall_next_pc): Likewise.
739
7dc53023
LM
7402016-12-23 Luis Machado <lgustavo@codesourcery.com>
741
742 * win32-i386-low.c: Fix incorrect reference to a couple source files.
743 * nto-x86-low.c: Likewise.
744
ad02e4fe
SM
7452016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
746
747 * Makefile.in: Include disable-implicit-rules.mk.
748
dcb07cfa
PA
7492016-11-23 Pedro Alves <palves@redhat.com>
750
751 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
752 (debug_vprintf): Use std::chrono::steady_clock instead of
753 gettimeofday. Use '.' instead of ':'.
754 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
755 (get_timestamp): Use std::chrono::steady_clock instead of
756 gettimeofday.
757
8629c02c
SM
7582016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
759
760 * Makefile.in: Fix whitespace formatting.
761
b593ecca
SM
7622016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
763
764 * Makefile.in (SFILES, OBS): Flatten list and order
765 alphabetically.
766
9986ba08
PA
7672016-11-23 Pedro Alves <palves@redhat.com>
768
769 * event-loop.c (handle_file_event): Use warning.
770 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
771 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
772 Use warning.
773
4eefa7bc
PA
7742016-11-23 Pedro Alves <palves@redhat.com>
775
776 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
777 output.
778 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
779 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
780 debug_printf and debug_flush for debug output.
781 * server.c (handle_general_set): Likewise.
782 * thread-db.c (try_thread_db_load): Use debug_printf for debug
783 output.
784
5443506e
SM
7852016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
786
787 * Makefile.in (.c.o): Replace rule with ...
788 (%.o: %.c): ... this one.
789
3b165252
SM
7902016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
791
792 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
793 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
794 make.
795 * configure.ac: Remove checks for the make program.
796 * configure: Re-generate.
797
0bcda685
PA
7982016-10-28 Pedro Alves <palves@redhat.com>
799
800 * Makefile.in (CXX_DIALECT): Get from configure.
801 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
802 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
803 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
804 * config.in: Regenerate.
805 * configure: Regenerate.
806
c3805894
YQ
8072016-10-27 Yao Qi <yao.qi@linaro.org>
808
809 * linux-low.c (linux_supports_range_stepping): Return true if
810 can_software_single_step return true.
811
89342618
YQ
8122016-10-27 Yao Qi <yao.qi@linaro.org>
813
814 * inferiors.c (find_inferior_in_random): New function.
815 * inferiors.h (find_inferior_in_random): Declare.
816 * linux-low.c (linux_wait_for_event_filtered): Call
817 find_inferior_in_random instead of find_inferior.
818
e3652c84
YQ
8192016-10-27 Yao Qi <yao.qi@linaro.org>
820
821 * linux-low.c (linux_wait_1): If single-step breakpoints are
822 inserted, remove them.
823
5a04c4cf
PA
8242016-10-26 Pedro Alves <palves@redhat.com>
825
826 * linux-low.c (handle_extended_wait): Link parent/child fork
827 threads.
828 (linux_wait_1): Unlink them.
829 (linux_set_resume_request): Ignore resume requests for
830 already-resumed and unhandled fork child threads.
831 * linux-low.h (struct lwp_info) <fork_relative>: New field.
832 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
833 New functions.
834 (handle_v_requests) <vCont>: Don't call require_running.
835 * server.h (in_queued_stop_replies): New declaration.
836
cb93dc7f
YQ
8372016-10-24 Yao Qi <yao.qi@linaro.org>
838
839 PR server/20733
840 * linux-aarch64-low.c (append_insns): Cast the return value to
841 'uint32_t *'.
842
a1078bea
YQ
8432016-10-10 Yao Qi <yao.qi@linaro.org>
844
845 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
846
1fb77080
SDJ
8472016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
848
849 * target.c (target_supports_multi_process): New function, moved
850 from...
851 * target.h (target_supports_multi_process): ... here. Remove
852 macro.
853
39b5a3b9
TT
8542016-10-05 Tom Tromey <tom@tromey.com>
855
856 PR remote/20655:
857 * tracepoint.c (handle_tracepoint_bkpts): Check
858 ipa_error_tracepoint, not ipa_stopping_tracepoint.
859
c1d0b70a
YQ
8602016-10-05 Yao Qi <yao.qi@linaro.org>
861
862 * configure.srv: Update the path of arm-*.xml files.
863
0a69eedb
YQ
8642016-10-05 Terry Guo <terry.guo@arm.com>
865 Yao Qi <yao.qi@linaro.org>
866
867 * Makefile.in: Adjust the path of rules.
868 * configure.srv: Update the path of xml files.
869 * regformats/arm-with-iwmmxt.dat: Regenerated.
870 * regformats/arm-with-neon.dat: Likewise.
871 * regformats/arm-with-vfpv2.dat: Likewise.
872 * regformats/arm-with-vfpv3.dat Likewise.
873
17e16485
YQ
8742016-09-30 Yao Qi <yao.qi@linaro.org>
875
876 PR gdbserver/20627
877 * target.c (target_stop_and_wait): Don't call
878 target_continue_no_signal, use resume_stop instead.
879
edeeb602
YQ
8802016-09-26 Yao Qi <yao.qi@linaro.org>
881
882 * linux-low.c (linux_wait_1): Call debug_exit.
883
503b1c39
PA
8842016-09-23 Pedro Alves <palves@redhat.com>
885
886 * Makefile.in (SFILES): Add common/new-op.c.
887 (OBS): Add common/new-op.o.
888 (new-op.o): New rule.
889
74172ecf
SM
8902016-09-21 Simon Marchi <simon.marchi@ericsson.com>
891
892 * .gitinore: Ignore more files.
893
fc6cda2e
YQ
8942016-09-21 Yao Qi <yao.qi@linaro.org>
895
896 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
897 23.
898
bc1e6c81
SDJ
8992016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
900
901 * server.c (start_inferior): Call target_mourn_inferior instead of
902 mourn_inferior; pass ptid_t argument to it.
903 (resume): Likewise.
904 (handle_target_event): Likewise.
905 * target.c (target_mourn_inferior): New function.
906 * target.h (mourn_inferior): Delete macro.
907
0e00e962
AA
9082016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
909
910 * linux-low.c (lwp_is_stepping): New function.
911
1d8cb77d
CL
9122016-09-06 Carl Love <cel@us.ibm.com>
913
914 * server.c (start_inferior): Fixed comment, requested comment change
915 didn't get updated correctly. Removed reference to ptrace () call as
916 it is only true on Linux systems.
917
7313bced
CL
9182016-09-06 Carl Love <cel@us.ibm.com>
919
920 * server.c (start_inferior): Do not call
921 function target_post_create_inferior () if the
922 inferior process has already exited.
923
cf6de44d
PA
9242016-09-05 Pedro Alves <palves@redhat.com>
925
926 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
927 (COMPILE.pre, CC_LD): Use CXX directly.
928 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
929 * acinclude.m4: Don't include build-with-cxx.m4.
930 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
931 * configure: Regenerate.
932
c1da6748
AT
9332016-09-02 Akash Trehan <akash.trehan123@gmail.com>
934
935 PR gdb/19495
936 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
937 call writing data to own_buf.
938
f2b9e3df
SDJ
9392016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
940
941 * target.c (mywait): Call target_wait instead of
942 the_target->wait.
943 (target_wait): New function.
944
049a8570
SDJ
9452016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
946
947 * server.c (start_inferior): New variable 'ptid'. Replace calls
948 to the_target->resume by target_continue{,_no_signal}, depending
949 on the case.
950 * target.c (target_stop_and_wait): Call target_continue_no_signal
951 instead of the_target->resume.
952 (target_continue): New function.
953
3aa5cfa0
AT
9542016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
955
956 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
957
754653a7
AZ
9582016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
959
960 PR server/20491
961 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
962 ps_prochandle.
963 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
964 * linux-arm-low.c (ps_get_thread_area): Likewise.
965 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
966 * linux-m68k-low.c (ps_get_thread_area): Likewise.
967 * linux-mips-low.c (ps_get_thread_area): Likewise.
968 * linux-nios2-low.c (ps_get_thread_area): Likewise.
969 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
970 * linux-x86-low.c (ps_get_thread_area): Likewise.
971 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
972
ed036b40
PA
9732016-08-19 Pedro Alves <palves@redhat.com>
974
975 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
976
c8ef42ee
PA
9772016-08-19 Pedro Alves <palves@redhat.com>
978
979 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
980 comment. Use memcpy instead of casting through unsigned long.
981
9c235a72
PA
9822016-08-19 Pedro Alves <palves@redhat.com>
983
984 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
985 allocating around 0x80000000.
986
201506da
PA
9872016-08-19 Pedro Alves <palves@redhat.com>
988
989 PR gdb/20415
990 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
991 (x32-avx512-linux-ipa.o): New rules.
992 * configure.ac (x86_64-*-linux*): New x32 check.
993 * configure.srv (ipa_x32_linux_regobj): New.
994 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
995 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
996 descriptions.
997 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
998 descriptions.
999 * configure: Regenerate.
1000
f348d89a
PA
10012016-08-09 Pedro Alves <palves@redhat.com>
1002
1003 PR gdb/18653
1004 * Makefile.in (OBS): Add signals-state-save-restore.o.
1005 (signals-state-save-restore.o): New rule.
1006 * config.in: Regenerate.
1007 * configure: Regenerate.
1008 * linux-low.c: Include "signals-state-save-restore.h".
1009 (linux_create_inferior): Call
1010 restore_original_signals_state.
1011 * server.c: Include "dispositions-save-restore.h".
1012 (captured_main): Call save_original_signals_state.
1013
1baf5149
PA
10142016-08-05 Pedro Alves <palves@redhat.com>
1015
1016 * configure: Regenerate.
1017
fcd4a73d
YQ
10182016-08-04 Yao Qi <yao.qi@linaro.org>
1019
1020 * linux-low.c (regsets_fetch_inferior_registers): Check
1021 errno is ESRCH or not.
1022
979659d0
YQ
10232016-08-02 Yao Qi <yao.qi@linaro.org>
1024
1025 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1026 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1027 (thread_db_load_search): Update.
1028 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1029 td_ta_set_event and td_ta_event_getmsg.
1030
6598661d
PA
10312016-07-26 Pedro Alves <palves@redhat.com>
1032
1033 PR server/20414
1034 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1035 of unsigned long for 64-bit registers and use uint32_t instead of
1036 unsigned int for 32-bit registers.
1037
9cf12d57
PA
10382016-07-26 Pedro Alves <palves@redhat.com>
1039
1040 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1041 to 'ptrace'.
1042
305450ed
TT
10432016-07-21 Tom Tromey <tom@tromey.com>
1044
1045 * configure: Rebuild.
1046
2583da7c
YQ
10472016-07-21 Yao Qi <yao.qi@linaro.org>
1048
1049 * mem-break.c (find_gdb_breakpoint): Cast bp to
1050 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1051
21536b36
YQ
10522016-07-21 Yao Qi <yao.qi@linaro.org>
1053
1054 * server.c (handle_v_requests): Support s and S actions
1055 if target_supports_software_single_step return true.
1056
8901d193
YQ
10572016-07-21 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1060 is resume_step, call maybe_hw_step.
1061 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1062 and unstop them.
1063 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1064 breakpoints or not.
1065 (proceed_one_lwp): If resume request is resume_step, install
1066 reinsert breakpoints and call maybe_hw_step.
1067
0e9a339e
YQ
10682016-07-21 Yao Qi <yao.qi@linaro.org>
1069
1070 * linux-low.c (proceed_one_lwp): Declare.
1071 (linux_resume_one_thread): Remove local variable 'step'.
1072 Lift code enqueue signal. Call proceed_one_lwp instead of
1073 linux_resume_one_lwp.
1074
4281b351
YQ
10752016-07-21 Yao Qi <yao.qi@linaro.org>
1076
1077 * linux-low.c (linux_resume_one_thread): Call
1078 enqueue_pending_signal.
1079
984a2c04
YQ
10802016-07-21 Yao Qi <yao.qi@linaro.org>
1081
1082 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1083 * inferiors.c (do_restore_current_thread_cleanup): New function.
1084 (make_cleanup_restore_current_thread): Likewise.
1085 * linux-low.c (install_software_single_step_breakpoints): Call
1086 make_cleanup_restore_current_thread. Switch current_thread to
1087 thread.
1088
bec903c9
YQ
10892016-07-21 Yao Qi <yao.qi@linaro.org>
1090
1091 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1092 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1093 (clone_one_breakpoint): Likewise.
1094 (delete_reinsert_breakpoints): Change parameter to thread.
1095 Callers updated.
1096 (has_reinsert_breakpoints): Likewise.
1097 (uninsert_reinsert_breakpoints): Likewise.
1098 (reinsert_reinsert_breakpoints): Likewise.
1099 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1100 (delete_reinsert_breakpoints): Likewise.
1101 (reinsert_reinsert_breakpoints): Likewise.
1102 (uninsert_reinsert_breakpoints): Likewise.
1103 (has_reinsert_breakpoints): Likewise.
1104
63c40ec7
YQ
11052016-07-21 Yao Qi <yao.qi@linaro.org>
1106
1107 * inferiors.c (get_thread_process): Make parameter const.
1108 * inferiors.h (get_thread_process): Update declaration.
1109 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1110 Add new parameters child_thread and parent_thread. Callers
1111 updated.
1112 * mem-break.h (clone_all_breakpoints): Update declaration.
1113
9aa76cd0
YQ
11142016-07-21 Yao Qi <yao.qi@linaro.org>
1115
1116 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1117 <command_list, handler>: Remove.
1118 (struct gdb_breakpoint): New.
1119 (struct other_breakpoint): New.
1120 (struct reinsert_breakpoint): New.
1121 (is_gdb_breakpoint): New function.
1122 (any_persistent_commands): Update command_list if
1123 is_gdb_breakpoint returns true.
1124 (set_breakpoint): Create breakpoints according to their types.
1125 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1126 (set_gdb_breakpoint_1): Likewise.
1127 (set_gdb_breakpoint): Likewise.
1128 (clear_breakpoint_conditions): Change parameter type to
1129 'struct gdb_breakpoint *'.
1130 (clear_breakpoint_commands): Likewise.
1131 (clear_breakpoint_conditions_and_commands): Likewise.
1132 (add_condition_to_breakpoint): Likewise.
1133 (add_breakpoint_condition): Likewise.
1134 (add_commands_to_breakpoint): Likewise.
1135 (check_breakpoints): Check other_breakpoint.
1136 (clone_one_breakpoint): Clone breakpopint according to its type.
1137 * mem-break.h (struct gdb_breakpoint): Declare.
1138 (set_gdb_breakpoint): Update declaration.
1139 (clear_breakpoint_conditions_and_commands): Likewise.
1140 (add_breakpoint_condition): Likewise.
1141 (add_breakpoint_commands): Likewise.
1142 * server.c (process_point_options): Change parameter type to
1143 'struct gdb_breakpoint *'.
1144
811f8301
YQ
11452016-07-21 Yao Qi <yao.qi@linaro.org>
1146
1147 * mem-break.c (set_breakpoint_at): Rename it to ...
1148 (set_breakpoint_type_at): ... it.
1149 (set_breakpoint_at): Call set_breakpoint_type_at.
1150 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1151 * mem-break.h (set_breakpoint_at): Update comments.
1152
b1c51e36
CLT
11532016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1154
1155 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1156 to buf parameter.
1157 (nios2_store_gregset): Likewise.
1158
ced2dffb
PA
11592016-07-01 Pedro Alves <palves@redhat.com>
1160 Antoine Tremblay <antoine.tremblay@ericsson.com>
1161
1162 * linux-low.c: Change interface to take the target lwp_info
1163 pointer directly and return void. Handle detaching from a zombie
1164 thread.
1165 (linux_detach_lwp_callback): New function.
1166 (linux_detach): Detach from the leader thread after detaching from
1167 the clone threads.
1168
2ac09a5b
YQ
11692016-06-28 Yao Qi <yao.qi@linaro.org>
1170
1171 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1172 for variable new_offset.
1173 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1174 (aarch64_ftrace_insn_reloc_cb): Likewise.
1175 (aarch64_ftrace_insn_reloc_tb): Likewise.
1176 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1177 PRIx64 instead of PRIx32.
1178
79e7fd4f
YQ
11792016-06-28 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1182 (the_low_target): Install arm_get_syscall_trapinfo.
1183
061fc021
YQ
11842016-06-28 Yao Qi <yao.qi@linaro.org>
1185
1186 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1187 function.
1188 (the_low_target): Install aarch64_get_syscall_trapinfo.
1189
4cc32bec
YQ
11902016-06-28 Yao Qi <yao.qi@linaro.org>
1191
1192 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1193 Callers updated.
1194 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1195 Remove parameter sysno.
1196 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1197 sysret.
1198
782c1122
AA
11992016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1200
1201 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1202 (s390_emit_ne_goto): Likewise.
1203 (s390_emit_lt_goto): Likewise.
1204 (s390_emit_le_goto): Likewise.
1205 (s390_emit_gt_goto): Likewise.
1206 (s390_emit_ge_goto): Likewise.
1207 (s390x_emit_eq_goto): Likewise.
1208 (s390x_emit_ne_goto): Likewise.
1209 (s390x_emit_lt_goto): Likewise.
1210 (s390x_emit_le_goto): Likewise.
1211 (s390x_emit_gt_goto): Likewise.
1212 (s390x_emit_ge_goto): Likewise.
1213 (s390_emit_ops_impl): Mark variable static.
1214 (s390x_emit_ops): Likewise.
1215
2e7b624b
YQ
12162016-06-17 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-low.c (handle_extended_wait): Call
1219 uninsert_reinsert_breakpoints for the parent process. Remove
1220 reinsert breakpoints from the child process. Reinsert them to
1221 the parent process when vfork is done.
1222 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1223 (reinsert_reinsert_breakpoints): New function.
1224 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1225 (reinsert_reinsert_breakpoints): Declare.
1226
8a81c5d7
YQ
12272016-06-17 Yao Qi <yao.qi@linaro.org>
1228
1229 * linux-low.c (handle_extended_wait): If the parent is doing
1230 step-over, remove the reinsert breakpoints from the forked child.
1231
f50bf8e5
YQ
12322016-06-17 Yao Qi <yao.qi@linaro.org>
1233
1234 * linux-low.c (unsuspend_all_lwps): Declare.
1235 (linux_low_filter_event): If thread exited, call finish_step_over.
1236 If step-over is finished, unsuspend other threads.
1237
8376a3cb
YQ
12382016-06-17 Yao Qi <yao.qi@linaro.org>
1239
1240 * linux-low.c (linux_resume_one_lwp_throw): Assert
1241 has_reinsert_breakpoints returns false.
1242 * mem-break.c (delete_disabled_breakpoints): Assert
1243 bp type isn't reinsert_breakpoint.
1244
f79b145d
YQ
12452016-06-17 Yao Qi <yao.qi@linaro.org>
1246
1247 * linux-low.c (maybe_hw_step): New function.
1248 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1249 (finish_step_over): Switch current_thread to lwp temporarily,
1250 and assert has_reinsert_breakpoints returns true.
1251 (proceed_one_lwp): Call maybe_hw_step.
1252 * mem-break.c (has_reinsert_breakpoints): New function.
1253 * mem-break.h (has_reinsert_breakpoints): Declare.
1254
0ae534d2
JT
12552016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1256
1257 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1258
fcdad592
YQ
12592016-05-17 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1262 instead of find_inferior.
1263
9e784964
YQ
12642016-05-05 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1267 Initialize res to zero.
1268
cf2ebb6e
YQ
12692016-05-05 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1272 to uint32_t.
1273
c1aebf87
UW
12742016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1275
1276 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1277 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1278 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1279
35fd2deb 12802016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1281 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1282
1283 * tracepoint.c (write_inferior_int8): New function.
1284 (cmd_qtenable_disable): Write enable flag using
1285 write_inferior_int8.
1286
484b3c32
YQ
12872016-04-25 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1290 (need_step_over_p): Return zero if the LWP has pending signals
1291 can be delivered on software single step target.
1292
85ba7d86
YQ
12932016-04-25 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1296 return instead of error.
1297
3539aa13
YQ
12982016-04-22 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1301 to 23.
1302
5b061e98
YQ
13032016-04-22 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1306 signal when stepping over breakpoint with software single
1307 step.
1308
3451269c
PA
13092016-04-21 Pedro Alves <palves@redhat.com>
1310
1311 * linux-s390-low.c (s390_collect_ptrace_register)
1312 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1313 add casts.
1314 (s390_check_regset): Use void * instead of gdb_byte *.
1315
a2358508
PA
13162016-04-20 Pedro Alves <palves@redhat.com>
1317
1318 * configure: Renegerate.
1319
6885166d
YQ
13202016-04-20 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1323 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1324 number 16.
1325 (arm_store_gregset): Likewise.
1326
2b863f51
WT
13272016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1328
1329 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1330 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1331 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1332 (amd64-avx-mpx-linux.c): New rules.
1333 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1334 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1335 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1336 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1337 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1338 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1339 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1340 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1341 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1342 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1343 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1344 * linux-x86-low.c (x86_linux_read_description): Add case for
1345 X86_XSTATE_AVX_MPX_MASK.
1346 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1347 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1348 init_registers_i386_avx_mpx_linux.
1349 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1350 (initialize_low_tracepoint): Call
1351 init_registers_i386_avx_mpx_linux.
1352 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1353 (initialize_low_tracepoint): Call
1354 init_registers_amd64_avx_mpx_linux.
1355 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1356 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1357 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1358 declarations.
1359
9b30624b
PA
13602016-04-18 Pedro Alves <palves@redhat.com>
1361
1362 * configure: Regenerate.
1363
45e3745e
AT
13642016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1365
1366 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1367 (aarch64_emit_sub): Likewise.
1368
2afc13ff
PA
13692016-04-12 Pedro Alves <palves@redhat.com>
1370
1371 * utils.c (prepare_to_throw_exception): Delete.
1372
6e774b13
SM
13732016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1376
4dca19f8
MK
13772016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1378
1379 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1380
d0a9981f
MK
13812016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1382
1383 * linux-aarch64-ipa.c: Add <elf.h> include.
1384 * linux-ppc-ipa.c: Add <elf.h> include.
1385 * linux-s390-ipa.c: Add <elf.h> include.
1386
252db07e
MK
13872016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1388
1389 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1390 (get_raw_reg_ptr): Likewise.
1391 (get_trace_state_variable_value_ptr): Likewise.
1392 (set_trace_state_variable_value_ptr): Likewise.
1393 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1394 char *.
1395
14e2b6d9
MK
13962016-03-31 Wei-cheng Wang <cole945@gmail.com>
1397 Marcin Kościelnicki <koriakin@0x04.net>
1398
1399 PR/17221
1400 * linux-ppc-low.c (emit_insns): New function.
1401 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1402 (ppc_emit_prologue): New function.
1403 (ppc_emit_epilogue): New function.
1404 (ppc_emit_add): New function.
1405 (ppc_emit_sub): New function.
1406 (ppc_emit_mul): New function.
1407 (ppc_emit_lsh): New function.
1408 (ppc_emit_rsh_signed): New function.
1409 (ppc_emit_rsh_unsigned): New function.
1410 (ppc_emit_ext): New function.
1411 (ppc_emit_zero_ext): New function.
1412 (ppc_emit_log_not): New function.
1413 (ppc_emit_bit_and): New function.
1414 (ppc_emit_bit_or): New function.
1415 (ppc_emit_bit_xor): New function.
1416 (ppc_emit_bit_not): New function.
1417 (ppc_emit_equal): New function.
1418 (ppc_emit_less_signed): New function.
1419 (ppc_emit_less_unsigned): New function.
1420 (ppc_emit_ref): New function.
1421 (ppc_emit_const): New function.
1422 (ppc_emit_reg): New function.
1423 (ppc_emit_pop): New function.
1424 (ppc_emit_stack_flush): New function.
1425 (ppc_emit_swap): New function.
1426 (ppc_emit_stack_adjust): New function.
1427 (ppc_emit_call): New function.
1428 (ppc_emit_int_call_1): New function.
1429 (ppc_emit_void_call_2): New function.
1430 (ppc_emit_if_goto): New function.
1431 (ppc_emit_goto): New function.
1432 (ppc_emit_eq_goto): New function.
1433 (ppc_emit_ne_goto): New function.
1434 (ppc_emit_lt_goto): New function.
1435 (ppc_emit_le_goto): New function.
1436 (ppc_emit_gt_goto): New function.
1437 (ppc_emit_ge_goto): New function.
1438 (ppc_write_goto_address): New function.
1439 (ppc_emit_ops_impl): New static variable.
1440 (ppc64v1_emit_prologue): New function.
1441 (ppc64v2_emit_prologue): New function.
1442 (ppc64_emit_epilogue): New function.
1443 (ppc64_emit_add): New function.
1444 (ppc64_emit_sub): New function.
1445 (ppc64_emit_mul): New function.
1446 (ppc64_emit_lsh): New function.
1447 (ppc64_emit_rsh_signed): New function.
1448 (ppc64_emit_rsh_unsigned): New function.
1449 (ppc64_emit_ext): New function.
1450 (ppc64_emit_zero_ext): New function.
1451 (ppc64_emit_log_not): New function.
1452 (ppc64_emit_bit_and): New function.
1453 (ppc64_emit_bit_or): New function.
1454 (ppc64_emit_bit_xor): New function.
1455 (ppc64_emit_bit_not): New function.
1456 (ppc64_emit_equal): New function.
1457 (ppc64_emit_less_signed): New function.
1458 (ppc64_emit_less_unsigned): New function.
1459 (ppc64_emit_ref): New function.
1460 (ppc64_emit_const): New function.
1461 (ppc64v1_emit_reg): New function.
1462 (ppc64v2_emit_reg): New function.
1463 (ppc64_emit_pop): New function.
1464 (ppc64_emit_stack_flush): New function.
1465 (ppc64_emit_swap): New function.
1466 (ppc64v1_emit_call): New function.
1467 (ppc64v2_emit_call): New function.
1468 (ppc64v1_emit_int_call_1): New function.
1469 (ppc64v2_emit_int_call_1): New function.
1470 (ppc64v1_emit_void_call_2): New function.
1471 (ppc64v2_emit_void_call_2): New function.
1472 (ppc64_emit_if_goto): New function.
1473 (ppc64_emit_eq_goto): New function.
1474 (ppc64_emit_ne_goto): New function.
1475 (ppc64_emit_lt_goto): New function.
1476 (ppc64_emit_le_goto): New function.
1477 (ppc64_emit_gt_goto): New function.
1478 (ppc64_emit_ge_goto): New function.
1479 (ppc64v1_emit_ops_impl): New static variable.
1480 (ppc64v2_emit_ops_impl): New static variable.
1481 (ppc_emit_ops): New function.
1482 (linux_low_target): Wire in ppc_emit_ops.
1483
a2174ba4
MK
14842016-03-31 Wei-cheng Wang <cole945@gmail.com>
1485 Marcin Kościelnicki <koriakin@0x04.net>
1486
1487 PR/17221
1488 * Makefile.in: Add powerpc-*-ipa.o
1489 * configure.srv: Add ipa_obj for powerpc*-linux.
1490 * linux-ppc-ipa.c: New file.
1491 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1492 includes.
1493 (PPC_FIELD): New macro.
1494 (PPC_SEXT): New macro.
1495 (PPC_OP6): New macro.
1496 (PPC_BO): New macro.
1497 (PPC_LI): New macro.
1498 (PPC_BD): New macro.
1499 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1500 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1501 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1502 (ppc_get_thread_area): New function.
1503 (is_elfv2_inferior): New function.
1504 (gen_ds_form): New function.
1505 (GEN_STD): New macro.
1506 (GEN_STDU): New macro.
1507 (GEN_LD): New macro.
1508 (GEN_LDU): New macro.
1509 (gen_d_form): New function.
1510 (GEN_ADDI): New macro.
1511 (GEN_ADDIS): New macro.
1512 (GEN_LI): New macro.
1513 (GEN_LIS): New macro.
1514 (GEN_ORI): New macro.
1515 (GEN_ORIS): New macro.
1516 (GEN_LWZ): New macro.
1517 (GEN_STW): New macro.
1518 (GEN_STWU): New macro.
1519 (gen_xfx_form): New function.
1520 (GEN_MFSPR): New macro.
1521 (GEN_MTSPR): New macro.
1522 (GEN_MFCR): New macro.
1523 (GEN_MTCR): New macro.
1524 (GEN_SYNC): New macro.
1525 (GEN_LWSYNC): New macro.
1526 (gen_x_form): New function.
1527 (GEN_OR): New macro.
1528 (GEN_MR): New macro.
1529 (GEN_LWARX): New macro.
1530 (GEN_STWCX): New macro.
1531 (GEN_CMPW): New macro.
1532 (gen_md_form): New function.
1533 (GEN_RLDICL): New macro.
1534 (GEN_RLDICR): New macro.
1535 (gen_i_form): New function.
1536 (GEN_B): New macro.
1537 (GEN_BL): New macro.
1538 (gen_b_form): New function.
1539 (GEN_BNE): New macro.
1540 (GEN_LOAD): New macro.
1541 (GEN_STORE): New macro.
1542 (gen_limm): New function.
1543 (gen_atomic_xchg): New function.
1544 (gen_call): New function.
1545 (ppc_relocate_instruction): New function.
1546 (ppc_install_fast_tracepoint_jump_pad): New function.
1547 (ppc_get_min_fast_tracepoint_insn_len): New function.
1548 (ppc_get_ipa_tdesc_idx): New function.
1549 (the_low_target): Wire in the new functions.
1550 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1551 tdescs.
1552 * linux-ppc-tdesc.h: New file.
1553
a13c4696
MK
15542016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1555
1556 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1557 (alloc_jump_pad_buffer): New function.
1558 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1559 (alloc_jump_pad_buffer): New function.
1560 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1561 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1562 (alloc_jump_pad_buffer): New function.
1563 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1564 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1565 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1566 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1567
1cda1512
MK
15682016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1569
1570 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1571 * linux-amd64-ipa.c: Likewise.
1572 * linux-i386-ipa.c: Likewise.
1573 * linux-s390-ipa.c: Likewise.
1574 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1575 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1576 set_trace_state_variable_value_ptr.
1577 (struct ipa_sym_addresses): Likewise.
1578 (symbol_list): Likewise.
1579 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1580 accessing gdb_collect directly.
1581 (gdb_collect_ptr_type): New typedef.
1582 (get_raw_reg_ptr_type): New typedef.
1583 (get_trace_state_variable_value_ptr_type): New typedef.
1584 (set_trace_state_variable_value_ptr_type): New typedef.
1585 (gdb_collect_ptr): New global.
1586 (get_raw_reg_ptr): New global.
1587 (get_trace_state_variable_value_ptr): New global.
1588 (set_trace_state_variable_value_ptr): New global.
1589 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1590 accessing get_raw_reg directly.
1591 (get_get_tsv_func_addr): Likewise for
1592 get_trace_state_variable_value_ptr.
1593 (get_set_tsv_func_addr): Likewise for
1594 set_trace_state_variable_value_ptr.
1595 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1596
72fb5488
SM
15972016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1600
28170b88
MK
16012016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1602
1603 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1604 packets.
1605 (relocate_instruction): Remove own_buf.
1606 * server.c (own_buf): Make global.
1607 (handle_v_requests): Make global.
1608 * server.h (own_buf): New declaration.
1609 (handle_v_requests): New prototype.
1610
f39e8743
MK
16112016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1612
1613 PR 18377
1614 * linux-s390-low.c (add_insns): New function.
1615 (s390_emit_prologue): New function.
1616 (s390_emit_epilogue): New function.
1617 (s390_emit_add): New function.
1618 (s390_emit_sub): New function.
1619 (s390_emit_mul): New function.
1620 (s390_emit_lsh): New function.
1621 (s390_emit_rsh_signed): New function.
1622 (s390_emit_rsh_unsigned): New function.
1623 (s390_emit_ext): New function.
1624 (s390_emit_log_not): New function.
1625 (s390_emit_bit_and): New function.
1626 (s390_emit_bit_or): New function.
1627 (s390_emit_bit_xor): New function.
1628 (s390_emit_bit_not): New function.
1629 (s390_emit_equal): New function.
1630 (s390_emit_less_signed): New function.
1631 (s390_emit_less_unsigned): New function.
1632 (s390_emit_ref): New function.
1633 (s390_emit_if_goto): New function.
1634 (s390_emit_goto): New function.
1635 (s390_write_goto_address): New function.
1636 (s390_emit_litpool): New function.
1637 (s390_emit_const): New function.
1638 (s390_emit_call): New function.
1639 (s390_emit_reg): New function.
1640 (s390_emit_pop): New function.
1641 (s390_emit_stack_flush): New function.
1642 (s390_emit_zero_ext): New function.
1643 (s390_emit_swap): New function.
1644 (s390_emit_stack_adjust): New function.
1645 (s390_emit_set_r2): New function.
1646 (s390_emit_int_call_1): New function.
1647 (s390_emit_void_call_2): New function.
1648 (s390_emit_eq_goto): New function.
1649 (s390_emit_ne_goto): New function.
1650 (s390_emit_lt_goto): New function.
1651 (s390_emit_le_goto): New function.
1652 (s390_emit_gt_goto): New function.
1653 (s390_emit_ge_goto): New function.
1654 (s390x_emit_prologue): New function.
1655 (s390x_emit_epilogue): New function.
1656 (s390x_emit_add): New function.
1657 (s390x_emit_sub): New function.
1658 (s390x_emit_mul): New function.
1659 (s390x_emit_lsh): New function.
1660 (s390x_emit_rsh_signed): New function.
1661 (s390x_emit_rsh_unsigned): New function.
1662 (s390x_emit_ext): New function.
1663 (s390x_emit_log_not): New function.
1664 (s390x_emit_bit_and): New function.
1665 (s390x_emit_bit_or): New function.
1666 (s390x_emit_bit_xor): New function.
1667 (s390x_emit_bit_not): New function.
1668 (s390x_emit_equal): New function.
1669 (s390x_emit_less_signed): New function.
1670 (s390x_emit_less_unsigned): New function.
1671 (s390x_emit_ref): New function.
1672 (s390x_emit_if_goto): New function.
1673 (s390x_emit_const): New function.
1674 (s390x_emit_call): New function.
1675 (s390x_emit_reg): New function.
1676 (s390x_emit_pop): New function.
1677 (s390x_emit_stack_flush): New function.
1678 (s390x_emit_zero_ext): New function.
1679 (s390x_emit_swap): New function.
1680 (s390x_emit_stack_adjust): New function.
1681 (s390x_emit_int_call_1): New function.
1682 (s390x_emit_void_call_2): New function.
1683 (s390x_emit_eq_goto): New function.
1684 (s390x_emit_ne_goto): New function.
1685 (s390x_emit_lt_goto): New function.
1686 (s390x_emit_le_goto): New function.
1687 (s390x_emit_gt_goto): New function.
1688 (s390x_emit_ge_goto): New function.
1689 (s390_emit_ops): New function.
1690 (struct linux_target_ops): Fill in emit_ops hook.
1691
abd9baf9
MK
16922016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1693
1694 PR 18377
1695 * Makefile.in: Add s390 IPA files.
1696 * configure.srv: Build IPA for s390.
1697 * linux-s390-ipa.c: New file.
1698 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1699 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1700 (tdesc_s390_linux32): Likewise.
1701 (init_registers_s390_linux32v1): Likewise.
1702 (tdesc_s390_linux32v1): Likewise.
1703 (init_registers_s390_linux32v2): Likewise.
1704 (tdesc_s390_linux32v2): Likewise.
1705 (init_registers_s390_linux64): Likewise.
1706 (tdesc_s390_linux64): Likewise.
1707 (init_registers_s390_linux64v1): Likewise.
1708 (tdesc_s390_linux64v1): Likewise.
1709 (init_registers_s390_linux64v2): Likewise.
1710 (tdesc_s390_linux64v2): Likewise.
1711 (init_registers_s390_te_linux64): Likewise.
1712 (tdesc_s390_te_linux64): Likewise.
1713 (init_registers_s390_vx_linux64): Likewise.
1714 (tdesc_s390_vx_linux64): Likewise.
1715 (init_registers_s390_tevx_linux64): Likewise.
1716 (tdesc_s390_tevx_linux64): Likewise.
1717 (init_registers_s390x_linux64): Likewise.
1718 (tdesc_s390x_linux64): Likewise.
1719 (init_registers_s390x_linux64v1): Likewise.
1720 (tdesc_s390x_linux64v1): Likewise.
1721 (init_registers_s390x_linux64v2): Likewise.
1722 (tdesc_s390x_linux64v2): Likewise.
1723 (init_registers_s390x_te_linux64): Likewise.
1724 (tdesc_s390x_te_linux64): Likewise.
1725 (init_registers_s390x_vx_linux64): Likewise.
1726 (tdesc_s390x_vx_linux64): Likewise.
1727 (init_registers_s390x_tevx_linux64): Likewise.
1728 (tdesc_s390x_tevx_linux64): Likewise.
1729 (have_hwcap_s390_vx): New static variable.
1730 (s390_arch_setup): Fill have_hwcap_s390_vx.
1731 (s390_get_thread_area): New function.
1732 (s390_ft_entry_gpr_esa): New const.
1733 (s390_ft_entry_gpr_zarch): New const.
1734 (s390_ft_entry_misc): New const.
1735 (s390_ft_entry_fr): New const.
1736 (s390_ft_entry_vr): New const.
1737 (s390_ft_main_31): New const.
1738 (s390_ft_main_64): New const.
1739 (s390_ft_exit_fr): New const.
1740 (s390_ft_exit_vr): New const.
1741 (s390_ft_exit_misc): New const.
1742 (s390_ft_exit_gpr_esa): New const.
1743 (s390_ft_exit_gpr_zarch): New const.
1744 (append_insns): New function.
1745 (s390_relocate_instruction): New function.
1746 (s390_install_fast_tracepoint_jump_pad): New function.
1747 (s390_get_min_fast_tracepoint_insn_len): New function.
1748 (s390_get_ipa_tdesc_idx): New function.
1749 (struct linux_target_ops): Wire in the above functions.
1750 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1751 * linux-s390-tdesc.h: New file.
1752
a4105d04
MK
17532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1754
1755 * linux-s390-low.c (s390_supports_tracepoints): New function.
1756 (struct linux_target_ops): Fill supports_tracepoints hook.
1757
35ac8b3e
YQ
17582016-03-18 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-low.c (lwp_signal_can_be_delivered): New function.
1761 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1762
94610ec4
YQ
17632016-03-18 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1766 0 if signal is enqueued. Remove 'signal' from one debugging
1767 message. Move one debugging message to some lines below.
1768 Remove code setting 'signal' to 0.
1769
80aea927
YQ
17702016-03-18 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (linux_low_filter_event): Remove redundant
1773 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1774
b04fd3be
MK
17752016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1776
1777 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1778 (struct linux_target_ops): Wire in the above.
1779
c40c8d4b
YQ
17802016-03-03 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-low.c: Update comments to start_step_over.
1783
0f8288ae
YQ
17842016-03-03 Yao Qi <yao.qi@linaro.org>
1785
1786 PR server/19736
1787 * linux-low.c (handle_extended_wait): Set child suspended
1788 if event_lwp->bp_reinsert isn't zero.
1789
fdbd04a8
YQ
17902016-03-02 Yao Qi <yao.qi@linaro.org>
1791
1792 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1793 enqueue_pending_signal.
1794
6896a8fa
MK
17952016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1796
1797 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1798 is actually loaded.
1799
ab503087
MK
18002016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1801
1802 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1803 (s390_regmap_3264) [!__s390x__]: New global.
1804 (s390_collect_ptrace_register): Skip map entries containing -1.
1805 (s390_supply_ptrace_register): Ditto.
1806 (s390_fill_gprs_high): New function.
1807 (s390_store_gprs_high): New function.
1808 (s390_regsets): Add NT_S390_HIGH_GPRS.
1809 (s390_get_hwcap): Enable on 31-bit.
1810 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1811 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1812 Detect NT_S390_HIGH_GPRS.
1813 (s390_usrregs_info_3264): Enable on 31-bit.
1814 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1815 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1816
ae91f625
MK
18172016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1818
1819 PR gdb/13808
1820 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1821 * configure.srv: Ditto.
1822 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1823 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1824 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1825 (init_registers_amd64_linux): Remove prototype.
1826 (tdesc_amd64_linux): Remove declaration.
1827 (get_ipa_tdesc): New function.
1828 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1829 initialize remaining tdescs.
1830 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1831 (init_registers_i386_linux): Remove prototype.
1832 (tdesc_i386_linux): Remove declaration.
1833 (get_ipa_tdesc): New function.
1834 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1835 initialize remaining tdescs.
1836 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1837 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1838 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1839 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1840 (x86_get_ipa_tdesc_idx): New function.
1841 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1842 * linux-x86-tdesc.h: New file.
1843 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1844 (target_get_ipa_tdesc_idx): New macro.
1845 * tracepoint.c (ipa_tdesc_idx): New macro.
1846 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1847 (symbol_list): Add ipa_tdesc_idx.
1848 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1849 (ipa_tdesc): Remove.
1850 (ipa_tdesc_idx): New variable.
1851 (get_context_regcache): Use get_ipa_tdesc.
1852 (gdb_collect): Ditto.
1853 (gdb_probe): Ditto.
1854 * tracepoint.h (get_ipa_tdesc): New prototype.
1855 (ipa_tdesc): Remove.
1856
e7ad2f14
PA
18572016-02-24 Pedro Alves <palves@redhat.com>
1858
1859 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1860 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1861 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1862 Factor out common code between the USE_SIGTRAP_SIGINFO and
1863 !USE_SIGTRAP_SIGINFO blocks.
1864 (linux_low_filter_event): Call save_stop_reason instead of
1865 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1866 Update comments.
1867 (linux_wait_1): Update comments.
1868
657f9cde
WW
18692016-02-24 Wei-cheng Wang <cole945@gmail.com>
1870
1871 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1872 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1873 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1874 ppc_insert_point, ppc_remove_point.
1875
b00b61e1
MK
18762016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1877
1878 * linux-s390-low.c (s390_supports_z_point_type): New function.
1879 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1880
553cb527
YQ
18812016-02-16 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1884 PC. Get pc from regcache_read_pc.
1885
a5652c21
YQ
18862016-02-12 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1889 or linux_get_pc_32bit.
1890 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1891
ed443b61
YQ
18922016-02-12 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1895 arm_linux_get_next_pcs_fixup.
1896
020ecd38
MK
18972016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1898
1899 * tracepoint.c (x_tracepoint_action_download): Change
1900 write_inferior_data_ptr to write_inferior_data_pointer.
1901 (cmd_qtstart): Likewise.
1902 (write_inferior_data_ptr): Remove.
1903 (download_agent_expr): Change write_inferior_data_ptr to
1904 write_inferior_data_pointer.
1905 (download_tracepoint_1): Likewise.
1906 (download_tracepoint): Likewise.
1907 (download_trace_state_variables): Likewise.
1908
7cae9051
WW
19092016-02-11 Wei-cheng Wang <cole945@gmail.com>
1910 Marcin Kościelnicki <koriakin@0x04.net>
1911
1912 * tracepoint.c (struct tracepoint_action_ops): Remove.
1913 (struct tracepoint_action): Remove ops.
1914 (m_tracepoint_action_download, r_tracepoint_action_download)
1915 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1916 size and offset accordingly.
1917 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1918 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1919 (tracepoint_action_send, tracepoint_action_download): New functions.
1920 Helpers for trace action handlers.
1921 (add_tracepoint_action): Remove setup actions ops.
1922 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1923
9f6a71b4
YQ
19242016-02-10 Yao Qi <yao.qi@linaro.org>
1925
1926 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1927
1e94266c
SM
19282016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1929
1930 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1931 to AC_OUTPUT.
1932 * configure: Regenerate.
1933
8adce034
SM
19342016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1935
1936 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1937 void * to gdb_byte *.
1938 * linux-low.c (siginfo_fixup): Likewise.
1939 (linux_xfer_siginfo): Likewise.
1940 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1941 Likewise.
1942 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1943
93813b37
WT
19442016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1945
1946 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1947 to srv_tgtobj.
1948 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1949 to srv_tgtobj.
1950 * linux-x86-low.c [__x86_64__]: Include
1951 "nat/amd64-linux-siginfo.h".
1952 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1953 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1954 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1955 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1956 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1957 (cpt_si_fd, si_timerid, si_overrun): Move from
1958 nat/amd64-linux-siginfo.c.
1959 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1960
8424cc97
SM
19612016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * server.c (skip_to_semicolon): Remove.
1964 (process_point_options): Use strchrnul instead of
1965 skip_to_semicolon.
1966
4d18591b
YQ
19672016-01-26 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1970 * linux-low.c (install_software_single_step_breakpoints): Don't
1971 call regcache_read_pc.
1972 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1973 argument pc.
1974
d8020970
YQ
19752016-01-26 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-low.c (install_software_single_step_breakpoints): Call
1978 regcache_read_pc instead of get_pc.
1979
8b207339
YQ
19802016-01-26 Yao Qi <yao.qi@linaro.org>
1981
1982 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1983 (unblock_async_io): Rename to ...
1984 (block_unblock_async_io): ... it. New function.
1985 (enable_async_io): Don't install SIGIO handler. Unblock it
1986 instead.
1987 (disable_async_io): Don't ignore SIGIO. Block it instead.
1988 (initialize_async_io): Install SIGIO handler. Don't call
1989 unblock_async_io.
1990
18879fef
YQ
19912016-01-26 Yao Qi <yao.qi@linaro.org>
1992
1993 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1994 first character is '\003', call *the_target->request_interrupt.
1995
a0f8e08a
YQ
19962016-01-25 Yao Qi <yao.qi@linaro.org>
1997
1998 * remote-utils.c (new_thread_notify): Remove.
1999 (dead_thread_notify): Likewise.
2000 * remote-utils.h (new_thread_notify): Remove declaration.
2001 (dead_thread_notify): Likewise.
2002
cc5fd9ab
MK
20032016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2004
2005 * gdb.trace/pending.exp: Fix expected message on continue.
2006
99e8eb11
MK
20072016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2008
2009 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2010 it works properly on big-endian machines where sizeof (CORE_ADDR)
2011 != sizeof (void *).
2012
a994041d
PA
20132016-01-21 Pedro Alves <palves@redhat.com>
2014
2015 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2016 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2017 * configure: Regenerate.
2018
f7a6a40d
YQ
20192016-01-21 Yao Qi <yao.qi@linaro.org>
2020
2021 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2022 is_thumb and set it according to CPSR saved on the stack.
2023 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2024 arm_sigreturn_next_pc.
2025
6f69e520
YQ
20262016-01-18 Yao Qi <yao.qi@linaro.org>
2027
2028 * linux-low.c (linux_set_pc_64bit): New function.
2029 (linux_get_pc_64bit): New function.
2030 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2031 Declare.
2032 * linux-sparc-low.c (debug_threads): Remove declaration.
2033 (sparc_get_pc): Remove.
2034 (the_low_target): Use linux_get_pc_64bit instead of
2035 sparc_get_pc.
2036 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2037 (the_low_target): Use linux_get_pc_64bit and
2038 linux_set_pc_64bit.
2039
276d4552
YQ
20402016-01-18 Yao Qi <yao.qi@linaro.org>
2041
2042 * linux-arm-low.c (debug_threads): Remove declaration.
2043 (arm_get_pc, arm_set_pc): Remove.
2044 (the_low_target): Use linux_get_pc_32bit and
2045 linux_set_pc_32bit.
2046 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2047 (the_low_target): Use linux_get_pc_32bit and
2048 linux_set_pc_32bit.
2049 * linux-cris-low.c (debug_threads): Remove declaration.
2050 (cris_get_pc, cris_set_pc,): Remove.
2051 (the_low_target): Use linux_get_pc_32bit and
2052 linux_set_pc_32bit.
2053 * linux-crisv32-low.c (debug_threads): Remove declaration.
2054 (cris_get_pc, cris_set_pc): Remove.
2055 (the_low_target): Use linux_get_pc_32bit and
2056 linux_set_pc_32bit.
2057 * linux-low.c: Include inttypes.h.
2058 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2059 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2060 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2061 (the_low_target): Use linux_get_pc_32bit and
2062 linux_set_pc_32bit.
2063 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2064 (the_low_target): Use linux_get_pc_32bit and
2065 linux_set_pc_32bit.
2066 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2067 (the_low_target): Use linux_get_pc_32bit and
2068 linux_set_pc_32bit.
2069 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2070 (the_low_target): Use linux_get_pc_32bit and
2071 linux_set_pc_32bit.
2072 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2073 (the_low_target): Use linux_get_pc_32bit and
2074 linux_set_pc_32bit.
2075
eb0edac8
GB
20762016-01-18 Gary Benson <gbenson@redhat.com>
2077
2078 * configure.ac (AC_FUNC_FORK): New check.
2079 * config.in: Regenerate.
2080 * configure: Likewise.
2081
1b451dda
YQ
20822016-01-14 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2085 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2086 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2087 arm_get_next_pcs_ctor.
2088
82075af2
JS
20892016-01-12 Josh Stone <jistone@redhat.com>
2090 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2091
2092 * inferiors.h: Include "gdb_vecs.h".
2093 (struct process_info): Add syscalls_to_catch.
2094 * inferiors.c (remove_process): Free syscalls_to_catch.
2095 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2096 syscall_return stops.
2097 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2098 * server.c (handle_general_set): Handle QCatchSyscalls.
2099 (handle_query): Report support for QCatchSyscalls.
2100 * target.h (struct target_ops): Add supports_catch_syscall.
2101 (target_supports_catch_syscall): New macro.
2102 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2103 (struct lwp_info): Add syscall_state.
2104 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2105 Maintain syscall_state and syscalls_to_catch across exec.
2106 (get_syscall_trapinfo): New function, proxy to the_low_target.
2107 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2108 (linux_low_filter_event): Toggle syscall_state entry/return for
2109 syscall traps, and set it ignored for all others.
2110 (gdb_catching_syscalls_p): New function.
2111 (gdb_catch_this_syscall_p): New function.
2112 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2113 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2114 (linux_supports_catch_syscall): New function.
2115 (linux_target_ops): Install it.
2116 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2117 (the_low_target): Install it.
2118
8f13a3ce
MF
21192016-01-12 Mike Frysinger <vapier@gentoo.org>
2120
2121 * acinclude.m4: Include new ../warning.m4 file.
2122 * configure: Regenerated.
2123 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2124
5b3da067
MF
21252016-01-12 Mike Frysinger <vapier@gentoo.org>
2126
2127 * ax.c (is_goto_target): Mark static.
2128 * linux-low.c (register_addr): Likewise.
2129 (linux_fetch_registers, linux_store_registers): Likewise.
2130 * mem-break.c (any_persistent_commands): Fix old prototype.
2131 (add_commands_to_breakpoint): Mark static.
2132 * regcache.c (find_register_by_name): Delete unused func.
2133 * remote-utils.c (hex_or_minus_one): Mark static.
2134 * server.c (monitor_show_help): Mark static.
2135 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2136 handle_v_requests): Likewise.
2137
bc504a31
PA
21382016-01-12 Pedro Alves <palves@redhat.com>
2139
2140 Remove use of the registered trademark symbol throughout.
2141
5a0dd67a
YQ
21422016-01-08 Yao Qi <yao.qi@linaro.org>
2143
2144 * remote-utils.c (getpkt): If c is '\003', call target hook
2145 request_interrupt.
2146
b2ca446f
YQ
21472016-01-06 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2150 linux-aarch32-low.c.
2151 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2152 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2153 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2154 (thumb2_breakpoint): Declare.
2155 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2156 linux-aarch32-low.h.
2157 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2158 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2159 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2160
edd88788
JB
21612016-01-01 Joel Brobecker <brobecker@adacore.com>
2162
2163 * gdbreplay.c (gdbreplay_version): Change copyright year in
2164 version message.
2165 * server.c (gdbserver_version): Likewise.
2166
65da7f14
PP
21672015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2168
2169 * server.c (crc32_table): Delete.
2170 (crc32): Use libiberty's xcrc32 function.
2171
4abd5ed2
JB
21722015-12-22 Joel Brobecker <brobecker@adacore.com>
2173
2174 * lynx-low.c (lynx_delete_thread_callback): New function.
2175 (lynx_mourn): Properly delete our process and all of its
2176 threads. Remove call to clear_inferiors.
2177
0e50fe5c
JB
21782015-12-22 Joel Brobecker <brobecker@adacore.com>
2179
2180 * target.c (thread_search_callback): Add check that
2181 the thread_stopped target callback is not NULL before
2182 calling it.
2183
35adc03f
YQ
21842015-12-21 Yao Qi <yao.qi@linaro.org>
2185
2186 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2187 arm breakpoint.
2188
bd2b2909
AT
21892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2190
2191 * server.c (handle_query): Call target_supports_software_single_step.
2192
7fe5e27e
AT
21932015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2194
2195 * linux-low.c (single_step): New function.
2196 (linux_resume_one_lwp_throw): Call single_step.
2197 (start_step_over): Likewise.
2198
d9311bfa
AT
21992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2200
2201 * Makefile.in (SFILES): Append arch/arm-linux.c,
2202 arch/arm-get-next-pcs.c.
2203 (arm-linux.o): New rule.
2204 (arm-get-next-pcs.o): New rule.
2205 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2206 arm-linux.o.
2207 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2208 to linux-aarch32-low.c.
2209 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2210 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2211 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2212 (thumb2_breakpoint_len): Likewise.
2213 (arm_is_thumb_mode): Make non-static.
2214 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2215 from linux-aarch32-low.c.
2216 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2217 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2218 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2219 (thumb2_breakpoint_len): Likewise.
2220 (arm_is_thumb_mode): New declaration.
2221 * linux-arm-low.c: Include arch/arm-linux.h
2222 aarch/arm-get-next-pcs.h, sys/syscall.h.
2223 (get_next_pcs_ops): New struct.
2224 (get_next_pcs_addr_bits_remove): New function.
2225 (get_next_pcs_is_thumb): New function.
2226 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2227 (arm_sigreturn_next_pc): Likewise.
2228 (get_next_pcs_syscall_next_pc): Likewise.
2229 (arm_gdbserver_get_next_pcs): Likewise.
2230 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2231 Initialize.
2232 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2233 * server.h: Include gdb_vecs.h.
2234
68ce2059
AT
22352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2236
2237 * Makefile.in (SFILES): Append common/common-regcache.c.
2238 (OBS): Append common-regcache.o.
2239 (common-regcache.o): New rule.
2240 * regcache.c (init_register_cache): Initialize cache to
2241 REG_UNAVAILABLE.
2242 (regcache_raw_read_unsigned): New function.
2243 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2244 register_status enum.
2245
fa5308bd
AT
22462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2247
2248 * linux-aarch64-low.c (the_low_targets): Rename
2249 breakpoint_reinsert_addr to get_next_pcs.
2250 * linux-arm-low.c (the_low_targets): Likewise.
2251 * linux-bfin-low.c (the_low_targets): Likewise.
2252 * linux-cris-low.c (the_low_targets): Likewise.
2253 * linux-crisv32-low.c (the_low_targets): Likewise.
2254 * linux-low.c (can_software_single_step): Likewise.
2255 (install_software_single_step_breakpoints): New function.
2256 (start_step_over): Use install_software_single_step_breakpoints.
2257 * linux-low.h: New CORE_ADDR vector.
2258 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2259 get_next_pcs.
2260 * linux-mips-low.c (the_low_targets): Likewise.
2261 * linux-nios2-low.c (the_low_targets): Likewise.
2262 * linux-sparc-low.c (the_low_targets): Likewise.
2263
4a6ed09b
PA
22642015-12-17 Pedro Alves <palves@redhat.com>
2265
2266 * linux-low.c (linux_kill_one_lwp): Remove references to
2267 LinuxThreads.
2268 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2269 to 'kill'.
2270 (linux_init_signals): Delete.
2271 (initialize_low): Adjust.
2272 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2273
7544db95
PA
22742015-12-16 Pedro Alves <palves@redhat.com>
2275
2276 * configure.ac (compiler warning flags): When testing a
2277 -Wno-foo option, check whether -Wfoo works instead.
2278 * configure: Regenerate.
2279
8020350c
DB
22802015-12-11 Don Breazeal <donb@codesourcery.com>
2281
2282 * server.c (process_serial_event): Don't exit from gdbserver
2283 in remote mode if there are still active inferiors.
2284
db91f502
YQ
22852015-12-11 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2288 arm_breakpoint_at if the process is 32-bit.
2289
b37a6290
YQ
22902015-12-11 Yao Qi <yao.qi@linaro.org>
2291
2292 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2293 arm breakpoint.
2294
17b1509a
YQ
22952015-12-07 Yao Qi <yao.qi@linaro.org>
2296
2297 * configure.srv: Append arm.o to srv_tgtobj for
2298 aarch64*-*-linux* target.
2299 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2300 from linux-arm-low.c.
2301 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2302 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2303 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2304 (thumb2_breakpoint_len): Likewise.
2305 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2306 (arm_breakpoint_kinds): Likewise.
2307 (arm_breakpoint_kind_from_pc): Likewise.
2308 (arm_sw_breakpoint_from_kind): Likewise.
2309 (arm_breakpoint_kind_from_current_state): Likewise.
2310 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2311 (arm_sw_breakpoint_from_kind): Declare.
2312 (arm_breakpoint_kind_from_current_state): Declare.
2313 (arm_breakpoint_at): Declare.
2314 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2315 arm_sw_breakpoint_from_kind if process is 32-bit.
2316 (aarch64_breakpoint_kind_from_pc): New function.
2317 (aarch64_breakpoint_kind_from_current_state): New function.
2318 (the_low_target): Initialize fields breakpoint_kind_from_pc
2319 and breakpoint_kind_from_current_state.
2320 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2321 linux-aarch32-low.c.
2322 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2323 (arm_breakpoint, arm_breakpoint_len): Likewise.
2324 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2325 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2326 (arm_is_thumb_mode): Likewise.
2327 (arm_breakpoint_at): Likewise.
2328 (arm_breakpoint_kind_from_pc): Likewise.
2329 (arm_sw_breakpoint_from_kind): Likewise.
2330 (arm_breakpoint_kind_from_current_state): Likewise.
2331
2332 Revert:
2333 2015-08-04 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2336 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2337 * server.c (extended_protocol): Remove "static".
2338 * server.h (extended_protocol): Declare it.
2339
ece66d65
JS
23402015-12-04 Josh Stone <jistone@redhat.com>
2341
2342 * target.h (struct target_ops) <arch_setup>: Rename to ...
2343 (struct target_ops) <post_create_inferior>: ... this.
2344 (target_arch_setup): Rename to ...
2345 (target_post_create_inferior): ... this, calling post_create_inferior.
2346 * server.c (start_inferior): Update target_arch_setup calls to
2347 target_post_create_inferior.
2348 * linux-low.c (linux_low_ptrace_options): Forward declare.
2349 (linux_arch_setup): Update its comment for general use.
2350 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2351 (struct linux_target_ops): Use linux_post_create_inferior.
2352 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2353 to post_create_inferior.
2354 * nto-low.c (struct nto_target_ops): Likewise.
2355 * spu-low.c (struct spu_target_ops): Likewise.
2356 * win32-low.c (struct win32_target_ops): Likewise.
2357
e58c48b4
AT
23582015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2359
2360 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2361
fbec8956
AT
23622015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2363
2364 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2365 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2366 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2367 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2368 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2370 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2372 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2374 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2375 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2376
9b4c5f87
AT
23772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2378
2379 * linux-low.c (linux_look_up_symbols): Don't call
2380 linux_supports_traceclone.
2381 * linux-low.h (thread_db_init): Remove use_events argument.
2382 * thread-db.c (thread_db_use_event): Remove global variable.
2383 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2384 (struct thread_db) <td_create_bp>: Remove field.
2385 (thread_db_create_event): Remove function.
2386 (thread_db_enable_reporting): Likewise.
2387 (find_one_thread): Don't check for thread_db_use_events.
2388 (attach_thread): Likewise.
2389 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2390 (try_thread_db_load_1): Don't check for thread_db_use_events.
2391 (thread_db_init): Remove use_events argument and thread events
2392 handling.
2393 (remove_thread_event_breakpoints): Remove function.
2394 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2395
7d00775e
AT
23962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2397
2398 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2399 New function.
2400 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2401 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2402 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2403 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2404 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2405 Initialize.
2406 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2407 New function.
2408 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2409 * linux-low.c (can_hardware_single_step): Use
2410 supports_hardware_single_step.
2411 (can_software_single_step): New function.
2412 (start_step_over): Call can_software_single_step.
2413 (linux_supports_hardware_single_step): New function.
2414 (struct target_ops) <supports_software_single_step>: Initialize.
2415 * linux-low.h (struct linux_target_ops)
2416 <supports_hardware_single_step>: Initialize.
2417 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2418 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2419 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2420 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2421 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2423 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2424 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2425 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2426 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2427 Initialize.
2428 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2429 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2430 Initialize.
2431 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2432 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2433 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2434 New function.
2435 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2436 * target.h (struct target_ops): <supports_software_single_step>:
2437 New field.
2438 (target_supports_software_single_step): New macro.
2439
2d97cd35
AT
24402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2441
2442 * linux-low.c (linux_wait_1): Fix pc advance condition.
2443 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2444 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2445
769ef81f
AT
24462015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2447
2448 * linux-arm-low.c (arm_is_thumb_mode): New function.
2449 (arm_breakpoint_at): Use arm_is_thumb_mode.
2450 (arm_breakpoint_kind_from_current_state): New function.
2451 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2452 Initialize.
2453 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2454 (linux_breakpoint_kind_from_current_state): New function.
2455 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2456 * linux-low.h (struct linux_target_ops)
2457 <breakpoint_kind_from_current_state>: New field.
2458 * target.h (struct target_ops): Likewise.
2459 (target_breakpoint_kind_from_current_state): New macro.
2460
1bebeeca
PA
24612015-11-30 Pedro Alves <palves@redhat.com>
2462
2463 * linux-low.c (linux_resume): Wake up the event loop before
2464 returning.
2465
a67a9fae
PA
24662015-11-30 Pedro Alves <palves@redhat.com>
2467
2468 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2469 check.
2470 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2471 to -1.
2472 * target.c (struct thread_search): New structure.
2473 (thread_search_callback): New function.
2474 (prev_general_thread): New global.
2475 (prepare_to_access_memory, done_accessing_memory): New functions.
2476 * target.h (prepare_to_access_memory, done_accessing_memory):
2477 Replace macros with function declarations.
2478
f2faf941
PA
24792015-11-30 Pedro Alves <palves@redhat.com>
2480
2481 PR 14618
2482 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2483 report TARGET_WAITKIND_NO_RESUMED.
2484 * remote-utils.c (prepare_resume_reply): Handle
2485 TARGET_WAITKIND_NO_RESUMED.
2486 * server.c (report_no_resumed): New global.
2487 (handle_query) <qSupported>: Handle "no-resumed+". Report
2488 "no-resumed+" support.
2489 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2490 return error if the client doesn't support no-resumed events.
2491 (push_stop_notification): New function.
2492 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2493 events if the client supports them.
2494
a681f9c9
PA
24952015-11-30 Pedro Alves <palves@redhat.com>
2496
2497 * linux-low.c (thread_still_has_status_pending_p): Don't check
2498 vCont;t here.
2499 (lwp_resumed): New function.
2500 (status_pending_p_callback): Return early if the LWP is not
2501 supposed to be resumed.
2502
65706a29
PA
25032015-11-30 Pedro Alves <palves@redhat.com>
2504
2505 * linux-low.c (handle_extended_wait): Assert that the LWP's
2506 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2507 thread create events, leave the new child's status pending.
2508 (linux_low_filter_event): If GDB wants to hear about thread exit
2509 events, leave the LWP marked dead and don't delete it.
2510 (linux_wait_for_event_filtered): Don't check for thread exit.
2511 (filter_exit_event): New function.
2512 (linux_wait_1): Use it, when returning an exit event.
2513 (linux_resume_one_lwp_throw): Assert that the LWP's
2514 waitstatus is TARGET_WAITKIND_IGNORE.
2515 * remote-utils.c (prepare_resume_reply): Handle
2516 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2517 * server.c (report_thread_events): New global.
2518 (handle_general_set): Handle QThreadEvents.
2519 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2520 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2521 TARGET_WAITKIND_THREAD_EXITED.
2522 * server.h (report_thread_events): Declare.
2523
56cf4bed
PA
25242015-11-30 Pedro Alves <palves@redhat.com>
2525
2526 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2527 the thread's last_resume_kind was resume_stop.
2528
500c1d85
PA
25292015-11-30 Pedro Alves <palves@redhat.com>
2530
2531 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2532 before returning.
2533
de979965
PA
25342015-11-30 Pedro Alves <palves@redhat.com>
2535
2536 * server.c (handle_v_requests): Handle vCtrlC.
2537
34c65914
PA
25382015-11-30 Pedro Alves <palves@redhat.com>
2539
2540 * gdbthread.h (find_any_thread_of_pid): Declare.
2541 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2542 functions.
2543 * server.c (handle_query): If current_thread is NULL, look for
2544 another thread of the selected process.
2545
79efa585 25462015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2547 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2548
2549 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2550 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2551 name in reply.
2552 * target.h (struct target_ops) <thread_name>: New field.
2553 (target_thread_name): New macro.
2554
80d82c19
JB
25552015-11-23 Joel Brobecker <brobecker@adacore.com>
2556
2557 * regcache.h (regcache_invalidate_pid): Add declaration.
2558 * regcache.c (regcache_invalidate_pid): New function, extracted
2559 from regcache_invalidate.
2560 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2561 Add trivial documentation comment.
2562 * lynx-low.c: Use regcache_invalidate_pid instead of
2563 regcache_invalidate.
2564
64da5dd5
JB
25652015-11-23 Joel Brobecker <brobecker@adacore.com>
2566
2567 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2568 and Elf64_auxv_t if the target is Android.
2569
37ce4055
DE
25702015-11-22 Doug Evans <xdje42@gmail.com>
2571
2572 * target.h: #include <sys/types.h>.
2573
06e03fff
PA
25742015-11-19 Pedro Alves <palves@redhat.com>
2575
2576 * linux-low.c (linux_process_qsupported): Change prototype.
2577 Adjust.
2578 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2579 Change prototype.
2580 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2581 and adjust to loop over all features.
2582 * server.c (handle_query) <qSupported>: Adjust to call
2583 target_process_qsupported once, passing it a vector of unprocessed
2584 features.
2585 * target.h (struct target_ops) <process_qsupported>: Change
2586 prototype.
2587 (target_process_qsupported): Adjust.
2588
9a084706
PA
25892015-11-19 Pedro Alves <palves@redhat.com>
2590
2591 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2592 mode.
2593 * configure: Regenerate.
2594
dad44a1f
PA
25952015-11-19 Pedro Alves <palves@redhat.com>
2596
2597 * configure: Regenerate.
2598
231c0592
YQ
25992015-11-19 Yao Qi <yao.qi@linaro.org>
2600
2601 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2602 type to uint32_t.
2603
6c1c9a8b
YQ
26042015-11-19 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2607 (struct aarch64_operand): Move enum out.
2608
9caa3311
YQ
26092015-11-19 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2612 struct user_fpsimd_state *.
2613 (aarch64_store_fpregset): Likewise.
2614
6a69a054
YQ
26152015-11-19 Yao Qi <yao.qi@linaro.org>
2616
2617 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2618 struct user_pt_regs *.
2619 (aarch64_store_gregset): Likewise.
2620
1798301e
PA
26212015-11-18 Pedro Alves <palves@redhat.com>
2622
2623 * Makefile.in (all_object_files): Add $IPA_OBJS.
2624
ce7715e2
PA
26252015-11-17 Pedro Alves <palves@redhat.com>
2626
2627 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2628 GDB_SIGNAL_0 and gdb_signal_to_string.
2629
c0879059
PA
26302015-11-17 Pedro Alves <palves@redhat.com>
2631
2632 * win32-low.c (handle_output_debug_string): Remove parameter.
2633 (win32_kill): Remove our_status local and adjust call to
2634 handle_output_debug_string.
2635 (get_child_debug_event): Adjust call to
2636 handle_output_debug_string.
2637
1996e237
SM
26382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2639
2640 * linux-mips-low.c (mips_fill_gregset): Add cast.
2641 (mips_store_gregset): Likewise.
2642 (mips_fill_fpregset): Likewise.
2643 (mips_store_fpregset): Likewise.
2644
cbec665b
SM
26452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2648 priv.
2649
eb3e3c67
SM
26502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2651
2652 * linux-mips-low.c (mips_linux_new_thread): Change type of
2653 watch_type to enum target_hw_bp_type.
2654
171de4b8
SM
26552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2658 Change return type to arm_hwbp_type.
2659
04248ead
SM
26602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2663 (arm_store_gregset): Likewise.
2664 * linux-arm-low.c (arm_get_hwcap): Likewise.
2665 (arm_read_description): Likewise.
2666
04b3479c
SM
26672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2668
2669 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2670
2bc84e8a
SM
26712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2674 (ppc_fill_vsxregset): Likewise.
2675 (ppc_store_vsxregset): Likewise.
2676 (ppc_fill_vrregset): Likewise.
2677 (ppc_store_vrregset): Likewise.
2678 (ppc_fill_evrregset): Likewise.
2679 (ppc_store_evrregset): Likewise.
2680
e6c5bb05
SM
26812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2682
2683 * linux-ppc-low.c (ppc_usrregs_info): Remove
2684 forward-declaration.
2685 (ppc_arch_setup): Move lower in file.
2686
7ea45d72
SM
26872015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2688
2689 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2690 (ps_pdwrite): Likewise.
2691
69291610
HW
26922015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2693
2694 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2695 to after assert checks.
2696
b42945fd
SM
26972015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * proc-service.c (ps_pdread): Add/adjust casts.
2700 (ps_pdwrite): Add/adjust casts.
2701
d6f85c84
SM
27022015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2703
2704 * server.c (handle_search_memory_1): Cast return value of
2705 memmem.
2706
f98cd059
SM
27072015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2708
2709 * server.c (write_qxfer_response): Change type of data to
2710 gdb_byte *.
2711
d2412fa5
PA
27122015-10-29 Pedro Alves <palves@redhat.com>
2713
2714 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2715
c17414a2
PA
27162015-10-29 Pedro Alves <palves@redhat.com>
2717
2718 * tracepoint.c (clear_installed_tracepoints): Add casts.
2719
e053fbc4
PA
27202015-10-29 Pedro Alves <palves@redhat.com>
2721
2722 * server.c (handle_v_cont, process_serial_event): Add enum
2723 gdb_signal casts to signal parsing code.
2724
add67df8
PA
27252015-10-29 Pedro Alves <palves@redhat.com>
2726
2727 * linux-low.h (NULL_REGSET): Define.
2728 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2729 * linux-arm-low.c (arm_regsets): Likewise.
2730 * linux-crisv32-low.c (cris_regsets): Likewise.
2731 * linux-m68k-low.c (m68k_regsets): Likewise.
2732 * linux-mips-low.c (mips_regsets): Likewise.
2733 * linux-nios2-low.c (nios2_regsets): Likewise.
2734 * linux-ppc-low.c (ppc_regsets): Likewise.
2735 * linux-s390-low.c (s390_regsets): Likewise.
2736 * linux-sh-low.c (sh_regsets): Likewise.
2737 * linux-sparc-low.c (sparc_regsets): Likewise.
2738 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2739 * linux-tile-low.c (tile_regsets): Likewise.
2740 * linux-x86-low.c (x86_regsets): Likewise.
2741 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2742
50bc912a
PA
27432015-10-29 Pedro Alves <palves@redhat.com>
2744
2745 * linux-low.h (NULL_REGSET): Define.
2746 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2747 * linux-arm-low.c (arm_regsets): Likewise.
2748 * linux-crisv32-low.c (cris_regsets): Likewise.
2749 * linux-m68k-low.c (m68k_regsets): Likewise.
2750 * linux-mips-low.c (mips_regsets): Likewise.
2751 * linux-nios2-low.c (nios2_regsets): Likewise.
2752 * linux-ppc-low.c (ppc_regsets): Likewise.
2753 * linux-s390-low.c (s390_regsets): Likewise.
2754 * linux-sh-low.c (sh_regsets): Likewise.
2755 * linux-sparc-low.c (sparc_regsets): Likewise.
2756 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2757 * linux-tile-low.c (tile_regsets): Likewise.
2758 * linux-x86-low.c (x86_regsets): Likewise.
2759 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2760
682b2546
DE
27612015-10-26 Doug Evans <dje@google.com>
2762
2763 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2764
963843d4
DE
27652015-10-26 Doug Evans <dje@google.com>
2766
2767 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2768
d41401ac
DE
27692015-10-26 Doug Evans <dje@google.com>
2770
2771 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2772 for debug_printf.
2773 (attach_thread, find_new_threads_callback): Ditto.
2774
3db28855
AT
27752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2776
2777 * mem-break.h (set_breakpoint_data): Remove.
2778
fb78e89c
AT
27792015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2780
2781 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2782 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2783 (initialize_low): Remove set_breakpoint_data call.
2784 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2785 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2786 (initialize_low): Remove set_breakpoint_data call.
2787 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2788 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2789 (initialize_low): Remove set_breakpoint_data call.
2790
2e6ee069
AT
27912015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2792
2793 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2794 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2795 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2796 * target.h (target_breakpoint_kind_from_pc): New macro.
2797
1652a986
AT
27982015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799
2800 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2801 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2802 the default breakpoint kind.
2803
abeead09
AT
28042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * linux-arm-low.c (arm_supports_z_point_type): Add software
2807 breakpoint support.
2808
b0b4b501
AT
28092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2810
2811 * linux-arm-low.c: Refactor breakpoint definitions.
2812 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2813 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2814
8689682c
AT
28152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2816
2817 * Makefile.in: Add arm.c/o.
2818 * configure.srv: Likewise.
2819 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2820 (arm_breakpoint_kind_from_pc): New function.
2821 (arm_sw_breakpoint_from_kind): Return proper kind.
2822 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2823
27165294
AT
28242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2825
2826 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2827 removal.
2828 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2829 (struct raw_breakpoint) <size>: Remove.
2830 (struct raw_breakpoint) <kind>: Add.
2831 (bp_size): New function.
2832 (bp_opcode): Likewise.
2833 (find_raw_breakpoint_at): Adjust for kind.
2834 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2835 (remove_memory_breakpoint): Adjust for kind call bp_size.
2836 (set_raw_breakpoint_at): Adjust for kind.
2837 (set_breakpoint): Likewise.
2838 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2839 (delete_raw_breakpoint): Adjust for kind.
2840 (delete_breakpoint): Likewise.
2841 (find_gdb_breakpoint): Likewise.
2842 (set_gdb_breakpoint_1): Likewise.
2843 (set_gdb_breakpoint): Likewise.
2844 (delete_gdb_breakpoint_1): Likewise.
2845 (delete_gdb_breakpoint): Likewise.
2846 (uninsert_raw_breakpoint): Likewise.
2847 (reinsert_raw_breakpoint): Likewise.
2848 (set_breakpoint_data): Remove.
2849 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2850 (check_mem_read): Adjust for kind call bp_size.
2851 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2852 (clone_one_breakpoint): Adjust for kind.
2853 * mem-break.h (set_gdb_breakpoint): Likewise.
2854 (delete_gdb_breakpoint): Likewise.
2855 * server.c (process_serial_event): Likewise.
2856
dd373349
AT
28572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2858
2859 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2860 (struct linux_target_ops) <breakpoint>: Remove.
2861 (struct linux_target_ops) <breakpoint_len>: Remove.
2862 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2863 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2864 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2865 (arm_sw_breakpoint_from_kind): New function.
2866 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2867 (struct linux_target_ops) <breakpoint>: Remove.
2868 (struct linux_target_ops) <breakpoint_len>: Remove.
2869 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2870 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2871 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2872 (struct linux_target_ops) <breakpoint>: Remove.
2873 (struct linux_target_ops) <breakpoint_len>: Remove.
2874 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2875 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2876 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2877 (struct linux_target_ops) <breakpoint>: Remove.
2878 (struct linux_target_ops) <breakpoint_len>: Remove.
2879 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2880 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2881 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2882 and sw_breakpoint_from_kind to increment the pc.
2883 (linux_breakpoint_kind_from_pc): New function.
2884 (linux_sw_breakpoint_from_kind): New function.
2885 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2886 (initialize_low): Call breakpoint_kind_from_pc and
2887 sw_breakpoint_from_kind to replace breakpoint_data/len.
2888 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2889 New field.
2890 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2891 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2892 (struct linux_target_ops) <breakpoint>: Remove.
2893 (struct linux_target_ops) <breakpoint_len>: Remove.
2894 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2895 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2896 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2897 (struct linux_target_ops) <breakpoint>: Remove.
2898 (struct linux_target_ops) <breakpoint_len>: Remove.
2899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2900 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2901 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2902 (struct linux_target_ops) <breakpoint>: Remove.
2903 (struct linux_target_ops) <breakpoint_len>: Remove.
2904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2906 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2907 (struct linux_target_ops) <breakpoint>: Remove.
2908 (struct linux_target_ops) <breakpoint_len>: Remove.
2909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2910 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2911 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2912 (struct linux_target_ops) <breakpoint>: Remove.
2913 (struct linux_target_ops) <breakpoint_len>: Remove.
2914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2916 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2917 (struct linux_target_ops) <breakpoint>: Remove.
2918 (struct linux_target_ops) <breakpoint_len>: Remove.
2919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2921 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2922 (struct linux_target_ops) <breakpoint>: Remove.
2923 (struct linux_target_ops) <breakpoint_len>: Remove.
2924 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2925 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2926 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2927 (struct linux_target_ops) <breakpoint>: Remove.
2928 (struct linux_target_ops) <breakpoint_len>: Remove.
2929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2931 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2932 (struct linux_target_ops) <breakpoint>: Remove.
2933 (struct linux_target_ops) <breakpoint_len>: Remove.
2934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2936 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2937 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2938 (struct linux_target_ops) <breakpoint>: Remove.
2939 (struct linux_target_ops) <breakpoint_len>: Remove.
2940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2942 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2943 (struct linux_target_ops) <breakpoint>: Remove.
2944 (struct linux_target_ops) <breakpoint_len>: Remove.
2945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2947
4cd98a19
AT
29482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2949
2950 * linux-cris-low.c (cris_get_pc): Remove void arg.
2951
774ee6d2
AR
29522015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2953
2954 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2955 variable name.
2956
833dcd29
AR
29572015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2958
2959 * inferiors.c (thread_pid_matches_callback): New function.
2960 (find_thread_process): New function.
2961 (remove_thread): Reset current_thread.
2962 (remove_process): Assert threads have been removed first.
2963
8d689ee5
YQ
29642015-10-15 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2967 if it is 3.
2968 (aarch64_remove_point): Likewise.
2969 * regcache.c (regcache_register_size): New function.
2970
1c2e1515
YQ
29712015-10-12 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-aarch64-low.c: Update all callers as emit_load_store
2974 is renamed to aarch64_emit_load_store.
2975
e1c587c3
YQ
29762015-10-12 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-aarch64-low.c: Update all callers of function renaming
2979 from emit_insn to aarch64_emit_insn.
2980
b6542f81
YQ
29812015-10-12 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2984 arch/aarch64-insn.h.
2985 (struct aarch64_memory_operand): Likewise.
2986 (ENCODE): Likewise.
2987 (emit_insn): Move to arch/aarch64-insn.c.
2988 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2989 (emit_load_store): Move to arch/aarch64-insn.c.
2990 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2991 (can_encode_int32): Remove.
2992
246994ce
YQ
29932015-10-12 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2996 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2997 (aarch64_relocate_instruction): Likewise.
2998 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2999 (struct aarch64_insn_visitor): Likewise.
3000
0badd99f
YQ
30012015-10-12 Yao Qi <yao.qi@linaro.org>
3002
3003 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3004 (struct aarch64_insn_visitor): New.
3005 (struct aarch64_insn_relocation_data): New.
3006 (aarch64_ftrace_insn_reloc_b): New function.
3007 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3008 (aarch64_ftrace_insn_reloc_cb): Likewise.
3009 (aarch64_ftrace_insn_reloc_tb): Likewise.
3010 (aarch64_ftrace_insn_reloc_adr): Likewise.
3011 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3012 (aarch64_ftrace_insn_reloc_others): Likewise.
3013 (visitor): New.
3014 (aarch64_relocate_instruction): Use visitor.
3015
dfaffe9d
YQ
30162015-10-12 Yao Qi <yao.qi@linaro.org>
3017
3018 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3019 int. Add argument buf.
3020 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3021 aarch64_relocate_instruction.
3022
70b439f0
YQ
30232015-10-12 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3026 argument insn. Remove local variable insn. Don't call
3027 target_read_uint32.
3028 (aarch64_install_fast_tracepoint_jump_pad): Call
3029 target_read_uint32.
3030
7781c06f
YQ
30312015-09-30 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3034 (emit_load_store_pair): Likewise.
3035
9a3c8263
SM
30362015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3037
3038 * dll.c (match_dll): Add cast(s).
3039 (unloaded_dll): Likewise.
3040 * linux-low.c (second_thread_of_pid_p): Likewise.
3041 (delete_lwp_callback): Likewise.
3042 (count_events_callback): Likewise.
3043 (select_event_lwp_callback): Likewise.
3044 (linux_set_resume_request): Likewise.
3045 * server.c (accumulate_file_name_length): Likewise.
3046 (emit_dll_description): Likewise.
3047 (handle_qxfer_threads_worker): Likewise.
3048 (visit_actioned_threads): Likewise.
3049 * thread-db.c (any_thread_of): Likewise.
3050 * tracepoint.c (same_process_p): Likewise.
3051 (match_blocktype): Likewise.
3052 (build_traceframe_info_xml): Likewise.
3053
224c3ddb
SM
30542015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3057 assignment.
3058 (gdb_unparse_agent_expr): Likewise.
3059 * hostio.c (require_data): Likewise.
3060 (handle_pread): Likewise.
3061 * linux-low.c (disable_regset): Likewise.
3062 (fetch_register): Likewise.
3063 (store_register): Likewise.
3064 (get_dynamic): Likewise.
3065 (linux_qxfer_libraries_svr4): Likewise.
3066 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3067 (set_fast_tracepoint_jump): Likewise.
3068 (uninsert_fast_tracepoint_jumps_at): Likewise.
3069 (reinsert_fast_tracepoint_jumps_at): Likewise.
3070 (validate_inserted_breakpoint): Likewise.
3071 (clone_agent_expr): Likewise.
3072 * regcache.c (init_register_cache): Likewise.
3073 * remote-utils.c (putpkt_binary_1): Likewise.
3074 (decode_M_packet): Likewise.
3075 (decode_X_packet): Likewise.
3076 (look_up_one_symbol): Likewise.
3077 (relocate_instruction): Likewise.
3078 (monitor_output): Likewise.
3079 * server.c (handle_search_memory): Likewise.
3080 (handle_qxfer_exec_file): Likewise.
3081 (handle_qxfer_libraries): Likewise.
3082 (handle_qxfer): Likewise.
3083 (handle_query): Likewise.
3084 (handle_v_cont): Likewise.
3085 (handle_v_run): Likewise.
3086 (captured_main): Likewise.
3087 * target.c (write_inferior_memory): Likewise.
3088 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3089 * tracepoint.c (init_trace_buffer): Likewise.
3090 (add_tracepoint_action): Likewise.
3091 (add_traceframe): Likewise.
3092 (add_traceframe_block): Likewise.
3093 (cmd_qtdpsrc): Likewise.
3094 (cmd_qtdv): Likewise.
3095 (cmd_qtstatus): Likewise.
3096 (response_source): Likewise.
3097 (response_tsv): Likewise.
3098 (cmd_qtnotes): Likewise.
3099 (gdb_collect): Likewise.
3100 (initialize_tracepoint): Likewise.
3101
afbe19f8
PL
31022015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3103
3104 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3105 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3106 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3107 <NOP>: New.
3108 (enum aarch64_condition_codes): New enum.
3109 (w0): New static global.
3110 (fp): Likewise.
3111 (lr): Likewise.
3112 (struct aarch64_memory_operand) <type>: New
3113 MEMORY_OPERAND_POSTINDEX type.
3114 (postindex_memory_operand): New helper function.
3115 (emit_ret): New function.
3116 (emit_load_store_pair): New function, factored out of emit_stp
3117 with support for MEMORY_OPERAND_POSTINDEX.
3118 (emit_stp): Rewrite using emit_load_store_pair.
3119 (emit_ldp): New function.
3120 (emit_load_store): Likewise.
3121 (emit_ldr): Mention post-index instruction in comment.
3122 (emit_ldrh): New function.
3123 (emit_ldrb): New function.
3124 (emit_ldrsw): Mention post-index instruction in comment.
3125 (emit_str): Likewise.
3126 (emit_subs): New function.
3127 (emit_cmp): Likewise.
3128 (emit_and): Likewise.
3129 (emit_orr): Likewise.
3130 (emit_orn): Likewise.
3131 (emit_eor): Likewise.
3132 (emit_mvn): Likewise.
3133 (emit_lslv): Likewise.
3134 (emit_lsrv): Likewise.
3135 (emit_asrv): Likewise.
3136 (emit_mul): Likewise.
3137 (emit_sbfm): Likewise.
3138 (emit_sbfx): Likewise.
3139 (emit_ubfm): Likewise.
3140 (emit_ubfx): Likewise.
3141 (emit_csinc): Likewise.
3142 (emit_cset): Likewise.
3143 (emit_nop): Likewise.
3144 (emit_ops_insns): New helper function.
3145 (emit_pop): Likewise.
3146 (emit_push): Likewise.
3147 (aarch64_emit_prologue): New function.
3148 (aarch64_emit_epilogue): Likewise.
3149 (aarch64_emit_add): Likewise.
3150 (aarch64_emit_sub): Likewise.
3151 (aarch64_emit_mul): Likewise.
3152 (aarch64_emit_lsh): Likewise.
3153 (aarch64_emit_rsh_signed): Likewise.
3154 (aarch64_emit_rsh_unsigned): Likewise.
3155 (aarch64_emit_ext): Likewise.
3156 (aarch64_emit_log_not): Likewise.
3157 (aarch64_emit_bit_and): Likewise.
3158 (aarch64_emit_bit_or): Likewise.
3159 (aarch64_emit_bit_xor): Likewise.
3160 (aarch64_emit_bit_not): Likewise.
3161 (aarch64_emit_equal): Likewise.
3162 (aarch64_emit_less_signed): Likewise.
3163 (aarch64_emit_less_unsigned): Likewise.
3164 (aarch64_emit_ref): Likewise.
3165 (aarch64_emit_if_goto): Likewise.
3166 (aarch64_emit_goto): Likewise.
3167 (aarch64_write_goto_address): Likewise.
3168 (aarch64_emit_const): Likewise.
3169 (aarch64_emit_call): Likewise.
3170 (aarch64_emit_reg): Likewise.
3171 (aarch64_emit_pop): Likewise.
3172 (aarch64_emit_stack_flush): Likewise.
3173 (aarch64_emit_zero_ext): Likewise.
3174 (aarch64_emit_swap): Likewise.
3175 (aarch64_emit_stack_adjust): Likewise.
3176 (aarch64_emit_int_call_1): Likewise.
3177 (aarch64_emit_void_call_2): Likewise.
3178 (aarch64_emit_eq_goto): Likewise.
3179 (aarch64_emit_ne_goto): Likewise.
3180 (aarch64_emit_lt_goto): Likewise.
3181 (aarch64_emit_le_goto): Likewise.
3182 (aarch64_emit_gt_goto): Likewise.
3183 (aarch64_emit_ge_got): Likewise.
3184 (aarch64_emit_ops_impl): New static global variable.
3185 (aarch64_emit_ops): New target function, return
3186 &aarch64_emit_ops_impl.
3187 (struct linux_target_ops): Install it.
3188
bb903df0
PL
31892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3190
3191 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3192 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3193 aarch64-ipa.o.
3194 * linux-aarch64-ipa.c: New file.
3195 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3196 and endian.h.
3197 (aarch64_get_thread_area): New target method.
3198 (extract_signed_bitfield): New helper function.
3199 (aarch64_decode_ldr_literal): New function.
3200 (enum aarch64_opcodes): New enum.
3201 (struct aarch64_register): New struct.
3202 (struct aarch64_operand): New struct.
3203 (x0): New static global.
3204 (x1): Likewise.
3205 (x2): Likewise.
3206 (x3): Likewise.
3207 (x4): Likewise.
3208 (w2): Likewise.
3209 (ip0): Likewise.
3210 (sp): Likewise.
3211 (xzr): Likewise.
3212 (aarch64_register): New helper function.
3213 (register_operand): Likewise.
3214 (immediate_operand): Likewise.
3215 (struct aarch64_memory_operand): New struct.
3216 (offset_memory_operand): New helper function.
3217 (preindex_memory_operand): Likewise.
3218 (enum aarch64_system_control_registers): New enum.
3219 (ENCODE): New macro.
3220 (emit_insn): New helper function.
3221 (emit_b): New function.
3222 (emit_bcond): Likewise.
3223 (emit_cb): Likewise.
3224 (emit_tb): Likewise.
3225 (emit_blr): Likewise.
3226 (emit_stp): Likewise.
3227 (emit_ldp_q_offset): Likewise.
3228 (emit_stp_q_offset): Likewise.
3229 (emit_load_store): Likewise.
3230 (emit_ldr): Likewise.
3231 (emit_ldrsw): Likewise.
3232 (emit_str): Likewise.
3233 (emit_ldaxr): Likewise.
3234 (emit_stxr): Likewise.
3235 (emit_stlr): Likewise.
3236 (emit_data_processing_reg): Likewise.
3237 (emit_data_processing): Likewise.
3238 (emit_add): Likewise.
3239 (emit_sub): Likewise.
3240 (emit_mov): Likewise.
3241 (emit_movk): Likewise.
3242 (emit_mov_addr): Likewise.
3243 (emit_mrs): Likewise.
3244 (emit_msr): Likewise.
3245 (emit_sevl): Likewise.
3246 (emit_wfe): Likewise.
3247 (append_insns): Likewise.
3248 (can_encode_int32_in): New helper function.
3249 (aarch64_relocate_instruction): New function.
3250 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3251 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3252 (struct linux_target_ops): Install aarch64_get_thread_area,
3253 aarch64_install_fast_tracepoint_jump_pad and
3254 aarch64_get_min_fast_tracepoint_insn_len.
3255
787749ea
PL
32562015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3257
3258 * Makefile.in (aarch64-insn.o): New rule.
3259 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3260
9812b2e6
YQ
32612015-09-21 Yao Qi <yao.qi@linaro.org>
3262
3263 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3264
18fe412b
YQ
32652015-09-21 Yao Qi <yao.qi@linaro.org>
3266
3267 * tracepoint.c (max_jump_pad_size): Remove.
3268
a0cc84cd
YQ
32692015-09-18 Yao Qi <yao.qi@linaro.org>
3270
3271 * linux-aarch64-low.c: Don't include sys/uio.h.
3272 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3273
d78908cf
WW
32742015-09-16 Wei-cheng Wang <cole945@gmail.com>
3275
3276 * tracepoint.c (eval_result_type): Change prototype.
3277 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3278
d57e0d50
PA
32792015-09-15 Pedro Alves <palves@redhat.com>
3280
3281 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3282 Check whether to report exec events instead of checking whether
3283 multiprocess is enabled.
3284
5a676acc
PA
32852015-09-15 Pedro Alves <palves@redhat.com>
3286
3287 PR remote/18965
3288 * remote-utils.c (prepare_resume_reply): Merge
3289 TARGET_WAITKIND_VFORK_DONE switch case with the
3290 TARGET_WAITKIND_FORKED case.
3291
7c5d0fad
YQ
32922015-09-15 Yao Qi <yao.qi@linaro.org>
3293
3294 * server.c (handle_query): Check string comparison using
3295 "else if" instead of "if".
3296
750ce8d1
YQ
32972015-09-15 Yao Qi <yao.qi@linaro.org>
3298
3299 * server.c (vCont_supported): New global variable.
3300 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3301 matches. Append ";vContSupported+" to own_buf.
3302 (handle_v_requests): Append ";s;S" to own_buf if target supports
3303 hardware single step or vCont_supported is false.
3304 (capture_main): Set vCont_supported to zero.
3305
70b90b91
YQ
33062015-09-15 Yao Qi <yao.qi@linaro.org>
3307
3308 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3309 it to ...
3310 (linux_supports_hardware_single_step): ... New function.
3311 (linux_target_ops): Update.
3312 * lynx-low.c (lynx_target_ops): Set field
3313 supports_hardware_single_step to target_can_do_hardware_single_step.
3314 * nto-low.c (nto_target_ops): Likewise.
3315 * spu-low.c (spu_target_ops): Likewise.
3316 * win32-low.c (win32_target_ops): Likewise.
3317 * target.c (target_can_do_hardware_single_step): New function.
3318 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3319 Remove. <supports_hardware_single_step>: New field.
3320 (target_supports_conditional_breakpoints): Remove.
3321 (target_supports_hardware_single_step): New macro.
3322 (target_can_do_hardware_single_step): Declare.
3323 * server.c (handle_query): Use target_supports_hardware_single_step
3324 instead of target_supports_conditional_breakpoints.
3325
ade90bde
YQ
33262015-09-15 Yao Qi <yao.qi@linaro.org>
3327
3328 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3329 function.
3330 (struct linux_target_ops the_low_target): Install
3331 aarch64_linux_siginfo_fixup.
3332
94585166
DB
33332015-09-11 Don Breazeal <donb@codesourcery.com>
3334 Luis Machado <lgustavo@codesourcery.com>
3335
3336 * linux-low.c (linux_mourn): Static declaration.
3337 (linux_arch_setup): Move in front of
3338 handle_extended_wait.
3339 (linux_arch_setup_thread): New function.
3340 (handle_extended_wait): Handle exec events. Call
3341 linux_arch_setup_thread. Make event_lwp argument a
3342 pointer-to-a-pointer.
3343 (check_zombie_leaders): Do not check stopped threads.
3344 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3345 (linux_low_filter_event): Add lwp and thread for exec'ing
3346 non-leader thread if leader thread has been deleted.
3347 Refactor code into linux_arch_setup_thread and call it.
3348 Pass child lwp pointer by reference to handle_extended_wait.
3349 (linux_wait_for_event_filtered): Update comment.
3350 (linux_wait_1): Prevent clobbering exec event status.
3351 (linux_supports_exec_events): New function.
3352 (linux_target_ops) <supports_exec_events>: Initialize new member.
3353 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3354 new member.
3355 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3356 * server.c (report_exec_events): New global variable.
3357 (handle_query): Handle qSupported query for exec-events feature.
3358 (captured_main): Initialize report_exec_events.
3359 * server.h (report_exec_events): Declare new global variable.
3360 * target.h (struct target_ops) <supports_exec_events>: New
3361 member.
3362 (target_supports_exec_events): New macro.
3363 * win32-low.c (win32_target_ops) <supports_exec_events>:
3364 Initialize new member.
3365
0568462b
MM
33662015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3367
3368 * linux-low.c (linux_low_enable_btrace): Remove.
3369 (linux_target_ops): Replace linux_low_enable_btrace with
3370 linux_enable_btrace.
3371
39edd165
YQ
33722015-09-03 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch64-low.c (aarch64_insert_point): Call
3375 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3376 returns true.
3377
1db33b5a
UW
33782015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3379
3380 * linux-low.c (check_stopped_by_breakpoint): Use
3381 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3382
ab290430
PA
33832015-08-27 Pedro Alves <palves@redhat.com>
3384
3385 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3386
8d749320
SM
33872015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3388
6711b7f8
SM
3389 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3390 the XNEW-family equivalent.
8d749320
SM
3391 (compile_bytecodes): Likewise.
3392 * dll.c (loaded_dll): Likewise.
3393 * event-loop.c (append_callback_event): Likewise.
3394 (create_file_handler): Likewise.
3395 (create_file_event): Likewise.
3396 * hostio.c (handle_open): Likewise.
3397 * inferiors.c (add_thread): Likewise.
3398 (add_process): Likewise.
3399 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3400 * linux-arm-low.c (arm_new_process): Likewise.
3401 (arm_new_thread): Likewise.
3402 * linux-low.c (add_to_pid_list): Likewise.
3403 (linux_add_process): Likewise.
3404 (handle_extended_wait): Likewise.
3405 (add_lwp): Likewise.
3406 (enqueue_one_deferred_signal): Likewise.
3407 (enqueue_pending_signal): Likewise.
3408 (linux_resume_one_lwp_throw): Likewise.
3409 (linux_resume_one_thread): Likewise.
3410 (linux_read_memory): Likewise.
3411 (linux_write_memory): Likewise.
3412 * linux-mips-low.c (mips_linux_new_process): Likewise.
3413 (mips_linux_new_thread): Likewise.
3414 (mips_add_watchpoint): Likewise.
3415 * linux-x86-low.c (initialize_low_arch): Likewise.
3416 * lynx-low.c (lynx_add_process): Likewise.
3417 * mem-break.c (set_raw_breakpoint_at): Likewise.
3418 (set_breakpoint): Likewise.
3419 (add_condition_to_breakpoint): Likewise.
3420 (add_commands_to_breakpoint): Likewise.
3421 (clone_agent_expr): Likewise.
3422 (clone_one_breakpoint): Likewise.
3423 * regcache.c (new_register_cache): Likewise.
3424 * remote-utils.c (look_up_one_symbol): Likewise.
3425 * server.c (queue_stop_reply): Likewise.
3426 (start_inferior): Likewise.
3427 (queue_stop_reply_callback): Likewise.
3428 (handle_target_event): Likewise.
3429 * spu-low.c (fetch_ppc_memory): Likewise.
3430 (store_ppc_memory): Likewise.
3431 * target.c (set_target_ops): Likewise.
3432 * thread-db.c (thread_db_load_search): Likewise.
3433 (try_thread_db_load_1): Likewise.
3434 * tracepoint.c (add_tracepoint): Likewise.
3435 (add_tracepoint_action): Likewise.
3436 (create_trace_state_variable): Likewise.
3437 (cmd_qtdpsrc): Likewise.
3438 (cmd_qtro): Likewise.
3439 (add_while_stepping_state): Likewise.
3440 * win32-low.c (child_add_thread): Likewise.
3441 (get_image_name): Likewise.
3442
ed8b7b42
YQ
34432015-08-25 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3446
db3cb7cb
YQ
34472015-08-25 Yao Qi <yao.qi@linaro.org>
3448
3449 * Makefile.in (aarch64-linux.o): New rule.
3450 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3451 srv_tgtobj.
3452 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3453 (aarch64_init_debug_reg_state): Make it extern.
3454 (aarch64_linux_prepare_to_resume): Remove.
3455
f6011a1c
YQ
34562015-08-25 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3459 lwp_arch_private_info and ptid_of_lwp.
3460
88e2cf7e
YQ
34612015-08-25 Yao Qi <yao.qi@linaro.org>
3462
3463 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3464 Find proc_info by find_process_pid. All callers updated.
3465
5e35436e
YQ
34662015-08-25 Yao Qi <yao.qi@linaro.org>
3467
3468 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3469 Remove.
3470 (debug_reg_change_callback): Remove.
3471 (aarch64_notify_debug_reg_change): Remove.
3472
4a8a7965
YQ
34732015-08-25 Yao Qi <yao.qi@linaro.org>
3474
3475 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3476 Call current_lwp_ptid.
3477
32a271ee
YQ
34782015-08-25 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-aarch64-low.c (debug_reg_change_callback): Use
3481 debug_printf.
3482
0d51c8d7
YQ
34832015-08-25 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3486
31a43dd5
YQ
34872015-08-25 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3490
8ee52567
YQ
34912015-08-25 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3494 the code.
3495
ff3f0f45
YQ
34962015-08-25 Yao Qi <yao.qi@linaro.org>
3497
3498 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3499 Remove.
3500 (debug_reg_change_callback): Remove argument entry and add argument
3501 lwp. Remove local variable thread. Don't print thread id in the
3502 debugging output. Don't check whether pid of thread equals to pid.
3503 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3504 iterate_over_lwps instead find_inferior.
3505
3d40fbb5
PA
35062015-08-24 Pedro Alves <palves@redhat.com>
3507
3508 * inferiors.c (get_first_process): New function.
3509 * inferiors.h (get_first_process): New declaration.
3510 * remote-utils.c (read_ptid): Default to the first process in the
3511 list, instead of to the current thread's process.
3512
438e1e42
PA
35132015-08-24 Pedro Alves <palves@redhat.com>
3514
3515 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3516 * event-loop.c: Likewise.
3517 * remote-utils.c: Likewise.
3518 * tracepoint.c: Likewise.
3519
a8c6d4fc
PA
35202015-08-24 Pedro Alves <palves@redhat.com>
3521
3522 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3523 ptid_get_lwp.
3524
99b0bb12
PA
35252015-08-21 Pedro Alves <palves@redhat.com>
3526
3527 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3528 instead of literal 1.
3529
f8904751
PA
35302015-08-21 Pedro Alves <palves@redhat.com>
3531
3532 * tdesc.c (default_description): Explicitly zero-initialize.
3533
465a859e
PA
35342015-08-21 Pedro Alves <palves@redhat.com>
3535
3536 PR gdb/18749
3537 * inferiors.c (remove_thread): Discard any pending stop reply for
3538 this thread.
3539 * server.c (remove_all_on_match_pid): Rename to ...
3540 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3541 instead of a pid.
3542 (discard_queued_stop_replies): Change parameter to a ptid. Now
3543 extern.
3544 (handle_v_kill, kill_inferior_callback, captured_main)
3545 (process_serial_event): Adjust.
3546 * server.h (discard_queued_stop_replies): Declare.
3547
f0db101d
PA
35482015-08-21 Pedro Alves <palves@redhat.com>
3549
3550 * linux-low.c (wait_for_sigstop): Always switch to no thread
3551 selected if the previously current thread dies.
3552 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3553 process instead of the current thread's.
3554 * remote-utils.c (input_interrupt): Don't check if there's no
3555 current thread.
3556 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3557 current thread to the general thread fails, error out.
3558 (handle_qxfer_auxv, handle_qxfer_libraries)
3559 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3560 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3561 (handle_query): Check if there's a thread selected instead of
3562 checking whether there's any thread in the thread list.
3563 (handle_qxfer_threads, handle_qxfer_btrace)
3564 (handle_qxfer_btrace_conf): Don't error out early if there's no
3565 thread in the thread list.
3566 (handle_v_cont, myresume): Don't set the current thread to the
3567 continue thread.
3568 (process_serial_event) <Hg handling>: Also set thread_id if the
3569 previous general thread is still alive.
3570 (process_serial_event) <g/G handling>: If setting the current
3571 thread to the general thread fails, error out.
3572 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3573 thread's lwp instead of the current thread's.
3574 * target.c (set_desired_thread): If the desired thread was not
3575 found, leave the current thread pointing to NULL. Return an int
3576 (boolean) indicating success.
3577 * target.h (set_desired_thread): Change return type to int.
3578
40045d91
MF
35792015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3580
3581 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3582 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3583 #includes.
3584 (ps_get_thread_area): New function.
3585
45face3b
GB
35862015-08-19 Gary Benson <gbenson@redhat.com>
3587
3588 * hostio.c (handle_pread): Do not attempt to read more data
3589 than hostio_reply_with_data can fit in a packet.
3590
16d5f642
JB
35912015-08-18 Joel Brobecker <brobecker@adacore.com>
3592
3593 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3594
a738da3a
MF
35952015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3596
3597 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3598
33ebda9d
PA
35992015-08-06 Pedro Alves <palves@redhat.com>
3600
3601 * tracepoint.c (expr_eval_result): Now an int.
3602
a44892be
PA
36032015-08-06 Pedro Alves <palves@redhat.com>
3604
3605 * gdbthread.h (struct regcache): Forward declare.
3606 (struct thread_info) <regcache_data>: Now a struct regcache
3607 pointer.
3608 * inferiors.c (inferior_regcache_data)
3609 (set_inferior_regcache_data): Now work with struct regcache
3610 pointers.
3611 * inferiors.h (struct regcache): Forward declare.
3612 (inferior_regcache_data, set_inferior_regcache_data): Now work
3613 with struct regcache pointers.
3614 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3615 (free_register_cache_thread): Remove struct regcache pointer
3616 casts.
3617
608a1e46
PA
36182015-08-06 Pedro Alves <palves@redhat.com>
3619
3620 * server.c (captured_main): On error, print the exception message
3621 to stderr, and if run_once is set, throw a quit.
3622
f0ce0d3a
PA
36232015-08-06 Pedro Alves <palves@redhat.com>
3624
3625 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3626 the current thread.
3627
bf47e248
PA
36282015-08-06 Pedro Alves <palves@redhat.com>
3629
3630 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3631 reading beyond the passed in buffer length.
3632
b6b9ffcc
PL
36332015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3634
3635 * tracepoint.c (symbol_list) <required>: Remove.
3636
863d01bd
PA
36372015-08-06 Pedro Alves <palves@redhat.com>
3638
3639 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3640 count if stopping and suspending threads.
3641 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3642 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3643 (linux_detach): Complete an ongoing step-over.
3644 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3645 throughout.
3646 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3647 (linux_wait_1): If passing a signal to the inferior after
3648 finishing a step-over, unsuspend and re-resume all lwps. If we
3649 see a single-step event but the thread should be continuing, don't
3650 pass the trap to gdb.
3651 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3652 internal_error instead of gdb_assert.
3653 (enqueue_pending_signal): New function.
3654 (check_ptrace_stopped_lwp_gone): Add debug output.
3655 (start_step_over): Use internal_error instead of gdb_assert.
3656 (complete_ongoing_step_over): New function.
3657 (linux_resume_one_thread): Don't resume a suspended thread.
3658 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3659 it stepping.
3660
00db26fa
PA
36612015-08-06 Pedro Alves <palves@redhat.com>
3662
3663 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3664 (linux_thread_alive): Use lwp_is_marked_dead.
3665 (extended_event_reported): Delete.
3666 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3667 instead of extended_event_reported.
3668 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3669 as well.
3670 (lwp_is_marked_dead): New function.
3671 (lwp_running): Use lwp_is_marked_dead.
3672 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3673 comment.
3674
ad071a30
PA
36752015-08-06 Pedro Alves <palves@redhat.com>
3676
3677 * linux-low.c (linux_wait_1): Move fork event output out of the
3678 !report_to_gdb check. Pass event_child->waitstatus to
3679 target_waitstatus_to_string instead of ourstatus.
3680
524b57e6
YQ
36812015-08-04 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3684 if current_thread is 32 bit.
3685
6085d6f6
YQ
36862015-08-04 Yao Qi <yao.qi@linaro.org>
3687
3688 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3689 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3690 * server.c (extended_protocol): Remove "static".
3691 * server.h (extended_protocol): Declare it.
3692
8a7e4587
YQ
36932015-08-04 Yao Qi <yao.qi@linaro.org>
3694
3695 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3696 both aarch64 and aarch32.
3697 (aarch64_set_pc): Likewise.
3698
3b53ae99
YQ
36992015-08-04 Yao Qi <yao.qi@linaro.org>
3700
3701 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3702 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3703 arm-with-neon.xml to srv_xmlfiles.
3704 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3705 (is_64bit_tdesc): New function.
3706 (aarch64_linux_read_description): New function.
3707 (aarch64_arch_setup): Call aarch64_linux_read_description.
3708 (regs_info): Rename to regs_info_aarch64.
3709 (aarch64_regs_info): Return right regs_info.
3710 (initialize_low_arch): Call initialize_low_arch_aarch32.
3711
bd9e6534
YQ
37122015-08-04 Yao Qi <yao.qi@linaro.org>
3713
3714 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3715 * linux-aarch32-low.c: New file.
3716 * linux-aarch32-low.h: New file.
3717 * linux-arm-low.c (arm_fill_gregset): Move it to
3718 linux-aarch32-low.c.
3719 (arm_store_gregset): Likewise.
3720 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3721 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3722 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3723 (regs_info): Rename to regs_info_arm.
3724 (arm_regs_info): Return regs_info_aarch32 if
3725 have_ptrace_getregset is 1 and target description is
3726 arm_with_neon or arm_with_vfpv3.
3727 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3728 Call initialize_low_arch_aarch32 instead.
3729
ded48a5e
YQ
37302015-08-04 Yao Qi <yao.qi@linaro.org>
3731
3732 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3733 * linux-low.c: ... here.
3734 * linux-low.h (have_ptrace_getregset): Declare it.
3735
96e9210f
PA
37362015-08-04 Pedro Alves <palves@redhat.com>
3737
3738 * thread-db.c (struct thread_db): Use new typedefs.
3739 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3740 CHK calls.
3741 (disable_thread_event_reporting): Cast result of dlsym to
3742 destination function pointer type.
3743 (thread_db_mourn): Use td_ta_delete_ftype.
3744
af60a1ef
SL
37452015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3746
3747 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3748 arch variant.
3749 (CDX_BREAKPOINT): Define for R2.
3750 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3751 (the_low_target): Add comments.
3752
e8b41681
YQ
37532015-07-30 Yao Qi <yao.qi@linaro.org>
3754
3755 * linux-arm-low.c (arm_hwcap): Remove it.
3756 (arm_read_description): New local variable arm_hwcap. Don't
3757 set arm_hwcap to zero.
3758
89abb039
YQ
37592015-07-30 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3762 Use regcache->tdesc instead.
3763 (arm_store_wmmxregset): Likewise.
3764 (arm_fill_vfpregset): Likewise.
3765 (arm_store_vfpregset): Likewise.
3766
deca266c
YQ
37672015-07-30 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-arm-low.c: Include arch/arm.h.
3770 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3771 (arm_store_gregset): Likewise.
3772
aa58a496
SM
37732015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3774
3775 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3776 ptrace's 4th parameter.
3777
50904b25
YQ
37782015-07-27 Yao Qi <yao.qi@linaro.org>
3779
3780 * configure.srv (case aarch64*-*-linux*): Don't set
3781 srv_linux_usrregs.
3782
5826e159
PA
37832015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3784
3785 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3786 sys/ptrace.h.
3787 * linux-arm-low.c: Likewise.
3788 * linux-cris-low.c: Likewise.
3789 * linux-crisv32-low.c: Likewise.
3790 * linux-low.c: Likewise.
3791 * linux-m68k-low.c: Likewise.
3792 * linux-mips-low.c: Likewise.
3793 * linux-nios2-low.c: Likewise.
3794 * linux-s390-low.c: Likewise.
3795 * linux-sparc-low.c: Likewise.
3796 * linux-tic6x-low.c: Likewise.
3797 * linux-tile-low.c: Likewise.
3798 * linux-x86-low.c: Likewise.
3799
54019719
PA
38002015-07-24 Pedro Alves <palves@redhat.com>
3801
3802 * config.in: Regenerate.
3803 * configure: Regenerate.
3804
eb7aa561
PA
38052015-07-24 Pedro Alves <palves@redhat.com>
3806
3807 * acinclude.m4: Include ../ptrace.m4.
3808 * configure.ac: Call GDB_AC_PTRACE.
3809 * config.in, configure: Regenerate.
3810
55d7b841
YQ
38112015-07-24 Yao Qi <yao.qi@linaro.org>
3812
3813 * linux-low.c (linux_create_inferior): Remove setting to
3814 proc->priv->new_inferior.
3815 (linux_attach): Likewise.
3816 (linux_low_filter_event): Likewise.
3817 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3818
c06cbd92
YQ
38192015-07-24 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-low.c (linux_arch_setup): New function.
3822 (linux_low_filter_event): If proc->tdesc is NULL and
3823 proc->attached is true, call the_low_target.arch_setup.
3824 Otherwise, keep status pending, and return.
3825 (linux_resume_one_lwp_throw): Don't call get_pc if
3826 thread->while_stepping isn't NULL. Don't call
3827 get_thread_regcache if proc->tdesc is NULL.
3828 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3829 (linux_target_ops): Install arch_setup.
3830 * server.c (start_inferior): Call the_target->arch_setup.
3831 * target.h (struct target_ops) <arch_setup>: New field.
3832 (target_arch_setup): New marco.
3833 * lynx-low.c (lynx_target_ops): Update.
3834 * nto-low.c (nto_target_ops): Update.
3835 * spu-low.c (spu_target_ops): Update.
3836 * win32-low.c (win32_target_ops): Update.
3837
5ae3ebba
YQ
38382015-07-24 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-low.c (linux_add_process): Don't set
3841 proc->priv->new_inferior.
3842 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3843 (linux_attach): Likewise.
3844
eb97750b
YQ
38452015-07-24 Yao Qi <yao.qi@linaro.org>
3846
3847 * server.c (start_inferior): Code refactor.
3848
51aee833
YQ
38492015-07-24 Yao Qi <yao.qi@linaro.org>
3850
3851 * server.c (process_serial_event): Set general_thread.
3852
af1b22f3
YQ
38532015-07-21 Yao Qi <yao.qi@linaro.org>
3854
3855 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3856 aarch64_linux_get_debug_reg_capacity.
3857
554717a3
YQ
38582015-07-17 Yao Qi <yao.qi@linaro.org>
3859
3860 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3861 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3862 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3863 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3864 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3865 (AARCH64_HWP_ALIGNMENT): Likewise.
3866 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3867 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3868 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3869 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3870 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3871 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3872 (struct aarch64_debug_reg_state): Likewise.
3873 (struct arch_lwp_info): Likewise.
3874 (aarch64_align_watchpoint): Likewise.
3875 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3876 (aarch64_watchpoint_length): Likewise.
3877 (aarch64_point_encode_ctrl_reg): Likewise
3878 (aarch64_point_is_aligned): Likewise.
3879 (aarch64_align_watchpoint): Likewise.
3880 (aarch64_linux_set_debug_regs):
3881 (aarch64_dr_state_insert_one_point): Likewise.
3882 (aarch64_dr_state_remove_one_point): Likewise.
3883 (aarch64_handle_breakpoint): Likewise.
3884 (aarch64_handle_aligned_watchpoint): Likewise.
3885 (aarch64_handle_unaligned_watchpoint): Likewise.
3886 (aarch64_handle_watchpoint): Likewise.
3887
c67ca4de
YQ
38882015-07-17 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3891 and don't aarch64_get_debug_reg_state. All callers update.
3892 (aarch64_handle_aligned_watchpoint): Likewise.
3893 (aarch64_handle_unaligned_watchpoint): Likewise.
3894 (aarch64_handle_watchpoint): Likewise.
3895 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3896 (aarch64_remove_point): Likewise.
3897
25abf979
YQ
38982015-07-17 Yao Qi <yao.qi@linaro.org>
3899
3900 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3901 debug_printf.
3902 (aarch64_handle_unaligned_watchpoint): Likewise.
3903
db1ff28b
JK
39042015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3905
3906 Revert the previous 3 commits:
3907 Move gdb_regex* to common/
3908 Move linux_find_memory_regions_full & co.
3909 gdbserver build-id attribute generator
3910
700ca40f
JK
39112015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3912 Jan Kratochvil <jan.kratochvil@redhat.com>
3913
3914 gdbserver build-id attribute generator.
3915 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3916 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3917 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3918 (find_phdr): New.
3919 (get_dynamic): Use find_pdhr to traverse program headers.
3920 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3921 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3922 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3923 (get_hex_build_id): New.
3924 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3925 to reply XML document.
3926
9904185c
JK
39272015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3928 Jan Kratochvil <jan.kratochvil@redhat.com>
3929
3930 * target.c: Include target/target-utils.h and fcntl.h.
3931 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3932 (target_fileio_read_stralloc): New functions.
3933
6e5b4429
JK
39342015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3935
3936 * Makefile.in (OBS): Add gdb_regex.o.
3937 (gdb_regex.o): New.
3938 * config.in: Rebuilt.
3939 * configure: Rebuilt.
3940
ddc98fbf
JK
39412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3942 Jan Kratochvil <jan.kratochvil@redhat.com>
3943
3944 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3945 * Makefile.in (OBS): Add target-utils.o.
3946 (linux-maps.o, target-utils.o): New.
3947 * configure.srv (srv_linux_obj): Add linux-maps.o.
3948
e57bb7a0
PL
39492015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3950
3951 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3952 function, return 1.
3953 (the_low_target): Install it.
3954
586b02a9
PA
39552015-07-14 Pedro Alves <palves@redhat.com>
3956
3957 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3958 Instead, ignore ECHILD, and throw an error for other errnos.
3959
58c1b36c
PA
39602015-07-10 Pedro Alves <palves@redhat.com>
3961
3962 * event-loop.c (struct callback_event) <data>: Change type to
3963 gdb_client_data instance instead of gdb_client_data pointer.
3964 (append_callback_event): Adjust.
3965
421530db
PL
39662015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3967
3968 * linux-aarch64-low.c: Add comments for each linux_target_ops
3969 method. Remove comments already covered in target_ops and
3970 linux_target_ops definitions.
3971 (the_low_target): Add comments for each unimplemented method.
3972
c2d65f38
YQ
39732015-07-09 Yao Qi <yao.qi@linaro.org>
3974
3975 * linux-aarch64-low.c (aarch64_regmap): Remove.
3976 (aarch64_usrregs_info): Remove.
3977 (regs_info): Set field usrregs to NULL.
3978
b20a6524
MM
39792015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3980
3981 * linux-low.c: Include "rsp-low.h"
3982 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3983 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3984 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3985 (handle_btrace_enable_pt): New.
3986 (handle_btrace_general_set): Support "pt".
3987 (handle_btrace_conf_general_set): Support "pt:size".
3988
96c97461
PL
39892015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3990
3991 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3992 Z_PACKET_SW_BP.
3993
37d66942
PL
39942015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3995
3996 * linux-aarch64-low.c: Remove comment about endianness.
3997 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3998 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3999 memcmp.
4000
dc06243f
GB
40012015-06-24 Gary Benson <gbenson@redhat.com>
4002
4003 * linux-i386-ipa.c (stdint.h): Do not include.
4004 * lynx-i386-low.c (stdint.h): Likewise.
4005 * lynx-ppc-low.c (stdint.h): Likewise.
4006 * mem-break.c (stdint.h): Likewise.
4007 * thread-db.c (stdint.h): Likewise.
4008 * tracepoint.c (stdint.h): Likewise.
4009 * win32-low.c (stdint.h): Likewise.
4010
124e13d9
SM
40112015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4012
4013 * server.c (write_qxfer_response): Update call to
4014 remote_escape_output.
4015
909c2cda
JK
40162015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4017 Jan Kratochvil <jan.kratochvil@redhat.com>
4018
4019 Merge multiple hex conversions.
4020 * gdbreplay.c (tohex): Rename to 'fromhex'.
4021 (logchar): Use fromhex.
4022
24c05f46
JK
40232015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4024
4025 * server.c (handle_qxfer_libraries): Set `version' attribute for
4026 <library-list>.
4027
14d2069a
GB
40282015-06-10 Gary Benson <gbenson@redhat.com>
4029
4030 * target.h (struct target_ops) <multifs_open>: New field.
4031 <multifs_unlink>: Likewise.
4032 <multifs_readlink>: Likewise.
4033 * linux-low.c (nat/linux-namespaces.h): New include.
4034 (linux_target_ops): Initialize the_target->multifs_open,
4035 the_target->multifs_unlink and the_target->multifs_readlink.
4036 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4037 * hostio.c (hostio_fs_pid): New static variable.
4038 (hostio_handle_new_gdb_connection): New function.
4039 (handle_setfs): Likewise.
4040 (handle_open): Use the_target->multifs_open as appropriate.
4041 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4042 (handle_readlink): Use the_target->multifs_readlink as
4043 appropriate.
4044 (handle_vFile): Handle vFile:setfs packets.
4045 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4046 after target_handle_new_gdb_connection.
4047
4b8b5e72
GB
40482015-06-10 Gary Benson <gbenson@redhat.com>
4049
4050 * configure.ac (AC_CHECK_FUNCS): Add setns.
4051 * config.in: Regenerate.
4052 * configure: Likewise.
4053 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4054 (linux-namespaces.o): New rule.
4055 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4056
3ac2e371
GB
40572015-06-09 Gary Benson <gbenson@redhat.com>
4058
4059 * hostio.c (handle_open): Process mode argument with
4060 fileio_to_host_mode.
4061
ca9b78ce
YQ
40622015-06-01 Yao Qi <yao.qi@linaro.org>
4063
4064 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4065 * linux-x86-low.c: Likewise.
4066
bfacd19d
DB
40672015-05-28 Don Breazeal <donb@codesourcery.com>
4068
4069 * linux-low.c (handle_extended_wait): Initialize
4070 thread_info.last_resume_kind for new fork children.
4071
452003ef
PA
40722015-05-15 Pedro Alves <palves@redhat.com>
4073
4074 * target.h (target_handle_new_gdb_connection): Rewrite using if
4075 wrapped in do/while.
4076
1041a03c
JB
40772015-05-14 Joel Brobecker <brobecker@adacore.com>
4078
4079 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4080 * configure, config.in: Regenerate.
4081 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4082 Declare typedef.
4083
c269dbdb
DB
40842015-05-12 Don Breazeal <donb@codesourcery.com>
4085
4086 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4087 PTRACE_EVENT_VFORK_DONE.
4088 (linux_low_ptrace_options, extended_event_reported): Add vfork
4089 events.
4090 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4091 and "vforkdone" for RSP 'T' Stop Reply Packet.
4092 * server.h (report_vfork_events): Declare
4093 global variable.
4094
3a8a0396
DB
40952015-05-12 Don Breazeal <donb@codesourcery.com>
4096
4097 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4098 (the_low_target) <new_fork>: Initialize new member.
4099 * linux-arm-low.c (arm_new_fork): New function.
4100 (the_low_target) <new_fork>: Initialize new member.
4101 * linux-low.c (handle_extended_wait): Call new target function
4102 new_fork.
4103 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4104 * linux-mips-low.c (mips_add_watchpoint): New function
4105 extracted from mips_insert_point.
4106 (the_low_target) <new_fork>: Initialize new member.
4107 (mips_linux_new_fork): New function.
4108 (mips_insert_point): Call mips_add_watchpoint.
4109 * linux-x86-low.c (x86_linux_new_fork): New function.
4110 (the_low_target) <new_fork>: Initialize new member.
4111
de0d863e
DB
41122015-05-12 Don Breazeal <donb@codesourcery.com>
4113
4114 * linux-low.c (handle_extended_wait): Implement return value,
4115 rename argument 'event_child' to 'event_lwp', handle
4116 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4117 (linux_low_ptrace_options): New function.
4118 (linux_low_filter_event): Call linux_low_ptrace_options,
4119 use different argument fo linux_enable_event_reporting,
4120 use return value from handle_extended_wait.
4121 (extended_event_reported): New function.
4122 (linux_wait_1): Call extended_event_reported and set
4123 status to report fork events.
4124 (linux_write_memory): Add pid to debug message.
4125 (reset_lwp_ptrace_options_callback): New function.
4126 (linux_handle_new_gdb_connection): New function.
4127 (linux_target_ops): Initialize new structure member.
4128 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4129 * lynx-low.c: Initialize new structure member.
4130 * remote-utils.c (prepare_resume_reply): Implement stop reason
4131 "fork" for "T" stop message.
4132 * server.c (handle_query): Call handle_new_gdb_connection.
4133 * server.h (report_fork_events): Declare global flag.
4134 * target.h (struct target_ops) <handle_new_gdb_connection>:
4135 New member.
4136 (target_handle_new_gdb_connection): New macro.
4137 * win32-low.c: Initialize new structure member.
4138
ddcbc397
DB
41392015-05-12 Don Breazeal <donb@codesourcery.com>
4140
4141 * mem-break.c (APPEND_TO_LIST): Define macro.
4142 (clone_agent_expr): New function.
4143 (clone_one_breakpoint): New function.
4144 (clone_all_breakpoints): New function.
4145 * mem-break.h: Declare new functions.
4146
89245bc0
DB
41472015-05-12 Don Breazeal <donb@codesourcery.com>
4148
4149 * linux-low.c (linux_supports_fork_events): New function.
4150 (linux_supports_vfork_events): New function.
4151 (linux_target_ops): Initialize new structure members.
4152 (initialize_low): Call linux_check_ptrace_features.
4153 * lynx-low.c (lynx_target_ops): Initialize new structure
4154 members.
4155 * server.c (report_fork_events, report_vfork_events):
4156 New global flags.
4157 (handle_query): Add new features to qSupported packet and
4158 response.
4159 (captured_main): Initialize new global variables.
4160 * target.h (struct target_ops) <supports_fork_events>:
4161 New member.
4162 <supports_vfork_events>: New member.
4163 (target_supports_fork_events): New macro.
4164 (target_supports_vfork_events): New macro.
4165 * win32-low.c (win32_target_ops): Initialize new structure
4166 members.
4167
835205d0
GB
41682015-05-12 Gary Benson <gbenson@redhat.com>
4169
4170 * server.c (handle_qxfer_exec_file): Use current process
4171 if annex is empty.
4172
21e94bd9
SL
41732015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4174
4175 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4176 Remove HAVE_PTRACE_GETREGS conditionals.
4177 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4178 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4179
45614f15
YQ
41802015-05-08 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-low.c (linux_supports_conditional_breakpoints): New
4183 function.
4184 (linux_target_ops): Install new target method.
4185 * lynx-low.c (lynx_target_ops): Install NULL hook for
4186 supports_conditional_breakpoints.
4187 * nto-low.c (nto_target_ops): Likewise.
4188 * spu-low.c (spu_target_ops): Likewise.
4189 * win32-low.c (win32_target_ops): Likewise.
4190 * server.c (handle_query): Check
4191 target_supports_conditional_breakpoints.
4192 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4193 New field.
4194 (target_supports_conditional_breakpoints): New macro.
4195
80ad801e
PA
41962015-05-06 Pedro Alves <palves@redhat.com>
4197
4198 PR server/18081
4199 * server.c (start_inferior): If the process exits, mourn it.
4200
819843c7
GB
42012015-04-21 Gary Benson <gbenson@redhat.com>
4202
4203 * hostio.c (fileio_open_flags_to_host): Factored out to
4204 fileio_to_host_openflags in common/fileio.c. Single use
4205 updated.
4206
a2d5a9d7
MF
42072015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4208
4209 * linux-xtensa-low.c (xtensa_fill_gregset)
4210 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4211 XCHAL_HAVE_LOOP.
4212
deb44829
MF
42132015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4214
4215 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4216 (regs_info): Replace usrregs pointer with NULL.
4217
e57f1de3
GB
42182015-04-17 Gary Benson <gbenson@redhat.com>
4219
4220 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4221 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4222 * server.c (handle_qxfer_exec_file): New function.
4223 (qxfer_packets): Add exec-file entry.
4224 (handle_query): Report qXfer:exec-file:read as supported packet.
4225
62828379
RN
42262015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4227
4228 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4229
b88bb450
GB
42302015-04-09 Gary Benson <gbenson@redhat.com>
4231
4232 * hostio-errno.c (errno_to_fileio_error): Remove function.
4233 Update caller to use remote_fileio_to_fio_error.
4234
c8f4bfdd
YQ
42352015-04-09 Yao Qi <yao.qi@linaro.org>
4236
4237 * linux-low.c (linux_insert_point): Call
4238 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4239 (linux_remove_point): Call remove_memory_breakpoint if type is
4240 raw_bkpt_type_sw.
4241 * linux-x86-low.c (x86_insert_point): Don't call
4242 insert_memory_breakpoint.
4243 (x86_remove_point): Don't call remove_memory_breakpoint.
4244
41f98f02
PA
42452015-04-01 Pedro Alves <palves@redhat.com>
4246 Cleber Rosa <crosa@redhat.com>
4247
4248 * server.c (gdbserver_usage): Reorganize and extend the usage
4249 message.
4250
2bf6fb9d
PA
42512015-03-24 Pedro Alves <palves@redhat.com>
4252
4253 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4254 output. Also dump TRAP_TRACE.
4255 (linux_low_filter_event): In debug output, distinguish a
4256 resume_stop SIGSTOP from a delayed SIGSTOP.
4257
369f6daa
GB
42582015-03-24 Gary Benson <gbenson@redhat.com>
4259
4260 * linux-x86-low.c (x86_linux_new_thread): Moved to
4261 nat/x86-linux.c.
4262 (x86_linux_prepare_to_resume): Likewise.
4263
8e5d4070
GB
42642015-03-24 Gary Benson <gbenson@redhat.com>
4265
4266 * Makefile.in (x86-linux-dregs.o): New rule.
4267 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4268 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4269 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4270 (x86_linux_dr_get): Likewise.
4271 (x86_linux_dr_set): Likewise.
4272 (update_debug_registers_callback): Likewise.
4273 (x86_linux_dr_set_addr): Likewise.
4274 (x86_linux_dr_get_addr): Likewise.
4275 (x86_linux_dr_set_control): Likewise.
4276 (x86_linux_dr_get_control): Likewise.
4277 (x86_linux_dr_get_status): Likewise.
4278 (x86_linux_update_debug_registers): Likewise.
4279
2b95d440
GB
42802015-03-24 Gary Benson <gbenson@redhat.com>
4281
4282 * linux-x86-low.c (x86_linux_update_debug_registers):
4283 New function, factored out from...
4284 (x86_linux_prepare_to_resume): ...this.
4285
14b0bc68
GB
42862015-03-24 Gary Benson <gbenson@redhat.com>
4287
4288 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4289 (x86_linux_dr_set): Likewise.
4290 (update_debug_registers_callback): Likewise.
4291 (x86_linux_dr_set_addr): Likewise.
4292 (x86_linux_dr_get_addr): Likewise.
4293 (x86_linux_dr_set_control): Likewise.
4294 (x86_linux_dr_get_control): Likewise.
4295 (x86_linux_dr_get_status): Likewise.
4296 (x86_linux_prepare_to_resume): Likewise.
4297
5dfe6ca8
GB
42982015-03-24 Gary Benson <gbenson@redhat.com>
4299
4300 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4301 Use perror_with_name. Pass string through gettext.
4302 (x86_linux_dr_set): Likewise.
4303
d33472ad
GB
43042015-03-24 Gary Benson <gbenson@redhat.com>
4305
4306 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4307 (x86_linux_dr_set_addr): ...this.
4308 (x86_dr_low_get_addr): Rename to...
4309 (x86_linux_dr_get_addr): ...this.
4310 (x86_dr_low_set_control): Rename to...
4311 (x86_linux_dr_set_control): ...this.
4312 (x86_dr_low_get_control): Rename to...
4313 (x86_linux_dr_get_control): ...this.
4314 (x86_dr_low_get_status): Rename to...
4315 (x86_linux_dr_get_status): ...this.
4316 (x86_dr_low): Update with new function names.
4317
4b134ca1
GB
43182015-03-24 Gary Benson <gbenson@redhat.com>
4319
4320 * Makefile.in (x86-linux.o): New rule.
4321 * configure.srv: Add x86-linux.o to relevant targets.
4322 * linux-low.c (lwp_set_arch_private_info): New function.
4323 (lwp_arch_private_info): Likewise.
4324 * linux-x86-low.c: Include nat/x86-linux.h.
4325 (arch_lwp_info): Removed structure.
4326 (update_debug_registers_callback):
4327 Use lwp_set_debug_registers_changed.
4328 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4329 and lwp_set_debug_registers_changed.
4330 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4331
34c703da
GB
43322015-03-24 Gary Benson <gbenson@redhat.com>
4333
4334 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4335 * linux-arm-low.c (arm_new_thread): Likewise.
4336 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4337 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4338 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4339 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4340
cff068da
GB
43412015-03-24 Gary Benson <gbenson@redhat.com>
4342
4343 * linux-low.c (ptid_of_lwp): New function.
4344 (lwp_is_stopped): Likewise.
4345 (lwp_stop_reason): Likewise.
4346 * linux-x86-low.c (update_debug_registers_callback):
4347 Use lwp_is_stopped.
4348 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4349 lwp_stop_reason.
4350
b2f7c7e8
GB
43512015-03-24 Gary Benson <gbenson@redhat.com>
4352
4353 * linux-low.h (linux_stop_lwp): Remove declaration.
4354
6d4ee8c6
GB
43552015-03-24 Gary Benson <gbenson@redhat.com>
4356
4357 * linux-low.h: Include nat/linux-nat.h.
4358 * linux-low.c (iterate_over_lwps_args): New structure.
4359 (iterate_over_lwps_filter): New function.
4360 (iterate_over_lwps): Likewise.
4361 * linux-x86-low.c (update_debug_registers_callback):
4362 Update signature to what iterate_over_lwps expects.
4363 Remove PID check that iterate_over_lwps now performs.
4364 (x86_dr_low_set_addr): Use iterate_over_lwps.
4365 (x86_dr_low_set_control): Likewise.
4366
70a0bb6b
GB
43672015-03-24 Gary Benson <gbenson@redhat.com>
4368
4369 * linux-x86-low.c (x86_debug_reg_state): New function.
4370 (x86_linux_prepare_to_resume): Use the above.
4371
7b669087
GB
43722015-03-24 Gary Benson <gbenson@redhat.com>
4373
4374 * linux-low.c (current_lwp_ptid): New function.
4375 * linux-x86-low.c: Include nat/linux-nat.h.
4376 (x86_dr_low_get_addr): Use current_lwp_ptid.
4377 (x86_dr_low_get_control): Likewise.
4378 (x86_dr_low_get_status): Likewise.
4379
eef49a3d
PA
43802015-03-20 Pedro Alves <palves@redhat.com>
4381
4382 * tracepoint.c (cmd_qtstatus): Make "str" const.
4383
b2333d22
PA
43842015-03-20 Pedro Alves <palves@redhat.com>
4385
4386 * server.c (handle_general_set): Make "req_str" const.
4387
23f238d3
PA
43882015-03-19 Pedro Alves <palves@redhat.com>
4389
4390 * linux-low.c (linux_resume_one_lwp): Rename to ...
4391 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4392 instead call perror_with_name.
4393 (check_ptrace_stopped_lwp_gone): New function.
4394 (linux_resume_one_lwp): Reimplement as wrapper around
4395 linux_resume_one_lwp_throw that swallows errors if the LWP is
4396 gone.
4397
91baf43f
PA
43982015-03-19 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c (count_events_callback, select_event_lwp_callback):
4401 No longer check whether the thread has resume_stop as last resume
4402 kind.
4403
8bf3b159
PA
44042015-03-19 Pedro Alves <palves@redhat.com>
4405
4406 * linux-low.c (count_events_callback, select_event_lwp_callback):
4407 Use the lwp's status_pending_p field, not the thread's.
4408
b90fc188
PA
44092015-03-19 Pedro Alves <palves@redhat.com>
4410
4411 * linux-low.c (select_event_lwp_callback): Update comments to
4412 no longer mention SIGTRAP.
4413
464b0089
GB
44142015-03-18 Gary Benson <gbenson@redhat.com>
4415
4416 * server.c (handle_query): Do not report vFile:fstat as supported.
4417
aa9e327f
GB
44182015-03-11 Gary Benson <gbenson@redhat.com>
4419
4420 * hostio.c (sys/types.h): New include.
4421 (sys/stat.h): Likewise.
4422 (common-remote-fileio.h): Likewise.
4423 (handle_fstat): New function.
4424 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4425
791c0056
GB
44262015-03-11 Gary Benson <gbenson@redhat.com>
4427
4428 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4429 struct stat.st_blocks and struct stat.st_blksize.
4430 * configure: Regenerate.
4431 * config.in: Likewise.
4432 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4433 (OBS): Add common-remote-fileio.o.
4434 (common-remote-fileio.o): New rule.
4435
9a9df970
PA
44362015-03-09 Pedro Alves <palves@redhat.com>
4437
4438 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4439 'struct sockaddr' pointer in 'accept' call.
4440
9eb1356e
PA
44412015-03-09 Pedro Alves <palves@redhat.com>
4442
4443 Revert:
4444 2015-03-07 Pedro Alves <palves@redhat.com>
4445 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4446 or <winsock2.h> here. Instead include "gdb_socket.h".
4447 (remote_open): Use union gdb_sockaddr_u.
4448 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4449 or <winsock2.h> here. Instead include "gdb_socket.h".
4450 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4451 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4452 or <sys/un.h>.
4453 (init_named_socket, gdb_agent_helper_thread): Use union
4454 gdb_sockaddr_u.
4455
aac331e4
PA
44562015-03-07 Pedro Alves <palves@redhat.com>
4457
4458 * configure.ac (build_warnings): Move
4459 -Wdeclaration-after-statement to the C-specific set.
4460 * configure: Regenerate.
4461
366c75fc
PA
44622015-03-07 Pedro Alves <palves@redhat.com>
4463
4464 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4465 or <winsock2.h> here. Instead include "gdb_socket.h".
4466 (remote_open): Use union gdb_sockaddr_u.
4467 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4468 or <winsock2.h> here. Instead include "gdb_socket.h".
4469 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4470 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4471 or <sys/un.h>.
4472 (init_named_socket, gdb_agent_helper_thread): Use union
4473 gdb_sockaddr_u.
4474
492d29ea
PA
44752015-03-07 Pedro Alves <palves@redhat.com>
4476
4477 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4478 instead.
4479
60a191ed
YQ
44802015-03-06 Yao Qi <yao.qi@linaro.org>
4481
4482 * linux-aarch64-low.c (aarch64_insert_point): Use
4483 show_debug_regs as a boolean.
4484 (aarch64_remove_point): Likewise.
4485
f5771b1d
PA
44862015-03-05 Pedro Alves <palves@redhat.com>
4487
4488 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4489 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4490 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4491 * nto-low.c (nto_target_ops): Likewise.
4492 * spu-low.c (spu_target_ops): Likewise.
4493 * win32-low.c (win32_target_ops): Likewise.
4494
3e572f71
PA
44952015-03-04 Pedro Alves <palves@redhat.com>
4496
72f4393d 4497 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4498 Decide whether a breakpoint triggered based on the SIGTRAP's
4499 siginfo.si_code.
72f4393d
L
4500 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4501 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4502 (linux_low_filter_event): Check for breakpoints before checking
4503 watchpoints.
4504 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4505 siginfo.si_code.
72f4393d
L
4506 (linux_stopped_by_sw_breakpoint)
4507 (linux_supports_stopped_by_sw_breakpoint)
4508 (linux_stopped_by_hw_breakpoint)
4509 (linux_supports_stopped_by_hw_breakpoint): New functions.
4510 (linux_target_ops): Install new target methods.
3e572f71 4511
1ec68e26
PA
45122015-03-04 Pedro Alves <palves@redhat.com>
4513
4514 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4515 * server.c (swbreak_feature, hwbreak_feature): New globals.
4516 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4517 (captured_main): Clear swbreak_feature and hwbreak_feature.
4518 * server.h (swbreak_feature, hwbreak_feature): Declare.
4519 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4520 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4521 supports_stopped_by_hw_breakpoint>: New fields.
4522 (target_supports_stopped_by_sw_breakpoint)
4523 (target_stopped_by_sw_breakpoint)
4524 (target_supports_stopped_by_hw_breakpoint)
4525 (target_stopped_by_hw_breakpoint): Declare.
4526
15c66dd6
PA
45272015-03-04 Pedro Alves <palves@redhat.com>
4528
4529 enum lwp_stop_reason -> enum target_stop_reason
4530 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4531 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4532 (linux_wait_1, stuck_in_jump_pad_callback)
4533 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4534 (linux_stopped_by_watchpoint):
4535 * linux-low.h (enum lwp_stop_reason): Delete.
4536 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4537 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4538
98fc70d6
YQ
45392015-03-04 Yao Qi <yao.qi@linaro.org>
4540
4541 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4542
dd2ac174
GB
45432015-03-03 Gary Benson <gbenson@redhat.com>
4544
4545 * hostio.c (handle_vFile): Fix prefix lengths.
4546
d68e53f4
MM
45472015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4548
4549 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4550 ptr_bits.
4551
bf2d68ab
AA
45522015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4553
4554 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4555 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4556 (clean): Add "rm -f" for above C files.
4557 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4558 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4559 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4560 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4561 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4562 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4563 (init_registers_s390x_vx_linux64)
4564 (init_registers_s390x_tevx_linux64)
4565 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4566 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4567 declarations.
4568 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4569 (s390_store_vxrs_high): New functions.
4570 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4571 NT_S390_VXRS_HIGH.
4572 (s390_arch_setup): Add logic for selecting one of the new target
4573 descriptions. Activate the new vector regsets if applicable.
4574 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4575 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4576 and init_registers_s390x_tevx_linux64.
4577
c966a859
PA
45782015-03-01 Pedro Alves <palves@redhat.com>
4579
4580 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4581 parameter.
4582
4180215b
PA
45832015-02-27 Pedro Alves <palves@redhat.com>
4584
4585 * linux-x86-low.c (u_debugreg_offset): New function.
4586 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4587
749bab01
PA
45882015-02-27 Pedro Alves <palves@redhat.com>
4589
4590 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4591 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4592 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4593 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4594 (ps_lsetfpregs, ps_getpid)
4595 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4596 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4597 (ps_lsetxregs, ps_plog): Declare.
4598
3c14e5a3
PA
45992015-02-27 Pedro Alves <palves@redhat.com>
4600
4601 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4602 IP_AGENT_EXPORT_FUNC.
4603 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4604 IP_AGENT_EXPORT_FUNC.
4605 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4606 (IP_AGENT_EXPORT): Delete.
4607 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4608 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4609 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4610 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4611 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4612 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4613 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4614 (traceframe_read_count, traceframe_write_count)
4615 (traceframes_created, trace_state_variables, get_raw_reg)
4616 (get_trace_state_variable_value, set_trace_state_variable_value)
4617 (ust_loaded, helper_thread_id, cmd_buf): Use
4618 IPA_SYM_EXPORTED_NAME.
4619 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4620 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4621 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4622 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4623 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4624 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4625 EXTERN_C_PUSH/EXTERN_C_POP.
4626 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4627 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4628 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4629 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4630 (traceframe_write_count, traceframe_read_count)
4631 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4632 (about_to_request_buffer_space, get_trace_state_variable_value)
4633 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4634 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4635 EXTERN_C_PUSH/EXTERN_C_POP.
4636 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4637 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4638 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4639 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4640 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4641 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4642 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4643 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4644 Define.
4645 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4646 (IP_AGENT_EXPORT_VAR_DECL): Define.
4647 (tracing): Declare.
4648 (gdb_agent_get_raw_reg): Declare.
4649
fe978cb0
PA
46502015-02-27 Tom Tromey <tromey@redhat.com>
4651 Pedro Alves <palves@redhat.com>
4652
4653 Rename symbols whose names are reserved C++ keywords throughout.
4654
3bc3d82a
PA
46552015-02-27 Pedro Alves <palves@redhat.com>
4656
4657 * Makefile.in (COMPILER): New, get it from autoconf.
4658 (CXX): Get from autoconf instead.
4659 (COMPILE.pre): Use COMPILER.
4660 (CC-LD): Rename to ...
4661 (CC_LD): ... this. Use COMPILER.
4662 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4663 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4664 * acinclude.m4: Include build-with-cxx.m4.
4665 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4666 Disable -Werror by default if building in C++ mode.
4667 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4668 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4669 the C++ compiler. Save/restore CXXFLAGS too.
4670 * configure: Regenerate.
4671
07697489
PA
46722015-02-27 Pedro Alves <palves@redhat.com>
4673
4674 * acinclude.m4: Include libiberty.m4.
4675 * configure.ac: Call libiberty_INIT.
4676 * config.in, configure: Regenerate.
4677
9beb7c4e
PA
46782015-02-26 Pedro Alves <palves@redhat.com>
4679
4680 * linux-low.c (linux_wait_1): When incrementing the PC past a
4681 program breakpoint always use the_low_target.breakpoint_len as
4682 increment, rather than the maximum between that and
4683 the_low_target.decr_pc_after_break.
4684
8090aef2
PA
46852015-02-23 Pedro Alves <palves@redhat.com>
4686
4687 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4688 thread was doing a step-over; always adjust the PC if
4689 we stepped over a permanent breakpoint.
4690 (linux_wait_1): If we stepped over breakpoint that was on top of a
4691 permanent breakpoint, manually advance the PC past it.
4692
bc9540e8
PA
46932015-02-23 Pedro Alves <palves@redhat.com>
4694
4695 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4696 modes.
4697 (x86_fill_gregset, x86_store_gregset): Use it when handling
4698 $orig_eax.
4699
2db9a427
PA
47002015-02-20 Pedro Alves <palves@redhat.com>
4701
4702 * thread-db.c: Include "nat/linux-procfs.h".
4703 (thread_db_init): Skip listing new threads if the kernel supports
4704 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4705
afa8d396
PA
47062015-02-20 Pedro Alves <palves@redhat.com>
4707
4708 * linux-low.c (status_pending_p_callback): Use ptid_match.
4709
c9587f88
AT
47102015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4711
4712 PR breakpoints/16812
4713 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4714 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4715 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4716
b05ec7a5
AT
47172015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4718
4719 PR breakpoints/15956
4720 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4721
d33501a5
MM
47222015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4723
4724 * linux-low.c (linux_low_btrace_conf): Print size.
4725 * server.c (handle_btrace_conf_general_set): New.
4726 (hanle_general_set): Call handle_btrace_conf_general_set.
4727 (handle_query): Report Qbtrace-conf:bts:size as supported.
4728
f4abbc16
MM
47292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4730
4731 * linux-low.c (linux_low_enable_btrace): Update parameters.
4732 (linux_low_btrace_conf): New.
4733 (linux_target_ops)<to_btrace_conf>: Initialize.
4734 * server.c (current_btrace_conf): New.
4735 (handle_btrace_enable): Rename to ...
4736 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4737 to target_enable_btrace. Update comment. Update users.
4738 (handle_qxfer_btrace_conf): New.
4739 (qxfer_packets): Add btrace-conf entry.
4740 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4741 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4742 (target_ops)<read_btrace_conf>: New.
4743 (target_enable_btrace): Update parameters.
4744 (target_read_btrace_conf): New.
4745
043c3577
MM
47462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4747
4748 * server.c (handle_btrace_general_set): Remove call to
4749 target_supports_btrace.
4750 (supported_btrace_packets): New.
4751 (handle_query): Call supported_btrace_packets.
4752 * target.h: include btrace-common.h.
4753 (btrace_target_info): Removed.
4754 (supports_btrace, target_supports_btrace): Update parameters.
4755
734b0e4b
MM
47562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4757
4758 * Makefile.in (SFILES): Add common/btrace-common.c.
4759 (OBS): Add common/btrace-common.o.
4760 (btrace-common.o): Add build rules.
4761 * linux-low: Include btrace-common.h.
4762 (linux_low_read_btrace): Use struct btrace_data. Call
4763 btrace_data_init and btrace_data_fini.
4764
d6c146e9
PA
47652015-02-06 Pedro Alves <palves@redhat.com>
4766
4767 * thread-db.c (find_new_threads_callback): Add debug output.
4768
20ba1ce6
PA
47692015-02-04 Pedro Alves <palves@redhat.com>
4770
4771 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4772 (resume_stopped_resumed_lwps): New function.
4773 (linux_wait_for_event_filtered): Use it.
4774
8cc73a39
SDJ
47752015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4776
4777 * Makefile.in (SFILES): Add linux-personality.c.
4778 (linux-personality.o): New rule.
4779 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4780 list of objects to be built.
4781 * linux-low.c: Include nat/linux-personality.h.
4782 (linux_create_inferior): Remove code to disable address space
4783 randomization (moved to ../nat/linux-personality.c). Create
4784 cleanup to disable address space randomization.
4785
fb23d554
SDJ
47862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4787
4788 * Makefile.in (posix-strerror.o): New rule.
4789 (mingw-strerror.o): Likewise.
4790 * configure: Regenerated.
4791 * configure.ac: Source file ../common/common.host. Initialize new
4792 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4793
cdf43629
YQ
47942015-01-14 Yao Qi <yao@codesourcery.com>
4795
4796 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4797 (ppc-linux.o): New rule.
4798 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4799 * configure.ac: AC_CHECK_FUNCS(getauxval).
4800 * config.in: Re-generated.
4801 * configure: Re-generated.
4802 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4803 ppc64_64bit_inferior_p
4804
514c5338
YQ
48052015-01-14 Yao Qi <yao@codesourcery.com>
4806
4807 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4808 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4809 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4810 (PT_ORIG_R3, PT_TRAP): Likewise.
4811 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4812 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4813 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4814
3368c1e5
JB
48152015-01-10 Joel Brobecker <brobecker@adacore.com>
4816
4817 * i387-fp.c (i387_cache_to_xsave): In look over
4818 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4819 zmmh_low_space field by use of zmmh_high_space.
4820
582511be
PA
48212015-01-09 Pedro Alves <palves@redhat.com>
4822
4823 * linux-low.c (step_over_bkpt): Move higher up in the file.
4824 (handle_extended_wait): Don't store the stop_pc here.
4825 (get_stop_pc): Adjust comments and rename to ...
4826 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4827 stopped for a software breakpoint or hardware breakpoint.
4828 (thread_still_has_status_pending_p): New function.
4829 (status_pending_p_callback): Use
4830 thread_still_has_status_pending_p. If the event is no longer
4831 interesting, resume the LWP.
4832 (handle_tracepoints): Add assert.
4833 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4834 (wstatus_maybe_breakpoint): New function.
4835 (cancel_breakpoint): Delete function.
4836 (check_stopped_by_watchpoint): New function, factored out from
4837 linux_low_filter_event.
4838 (lp_status_maybe_breakpoint): Delete function.
4839 (linux_low_filter_event): Remove filter_ptid argument.
4840 Leave thread group exits pending here. Store the LWP's stop PC.
4841 Always leave events pending.
4842 (linux_wait_for_event_filtered): Pull all events out of the
4843 kernel, and leave them all pending.
4844 (count_events_callback, select_event_lwp_callback): Consider all
4845 events.
4846 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4847 (select_event_lwp): Only give preference to the stepping LWP in
4848 all-stop mode. Adjust comments.
4849 (ignore_event): New function.
4850 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4851 references to cancel_breakpoints. Adjust to renames. Also give
4852 equal priority to all LWPs that have had events in non-stop mode.
4853 If reporting a software breakpoint event, unadjust the LWP's PC.
4854 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4855 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4856 Adjust.
4857 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4858 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4859 (linux_stopped_by_watchpoint): Adjust.
4860 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4861 * linux-low.h (enum lwp_stop_reason): New.
4862 (struct lwp_info) <stop_pc>: Adjust comment.
4863 <stopped_by_watchpoint>: Delete field.
4864 <stop_reason>: New field.
4865 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4866 * mem-break.c (software_breakpoint_inserted_here)
4867 (hardware_breakpoint_inserted_here): New function.
4868 * mem-break.h (software_breakpoint_inserted_here)
4869 (hardware_breakpoint_inserted_here): Declare.
4870 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4871 (cancel_breakpoints): Delete.
4872 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4873 (upload_fast_traceframes): Remove references to
4874 cancel_breakpoints.
4875
a33e3959
PA
48762015-01-09 Pedro Alves <palves@redhat.com>
4877
4878 * thread-db.c (find_new_threads_callback): Ignore thread if the
4879 kernel thread ID is -1.
4880
8784d563
PA
48812015-01-09 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (linux_attach_fail_reason_string): Move to
4884 nat/linux-ptrace.c, and rename.
4885 (linux_attach_lwp): Update comment.
4886 (attach_proc_task_lwp_callback): New function.
4887 (linux_attach): Adjust to rename and use
4888 linux_proc_attach_tgid_threads.
4889 (linux_attach_fail_reason_string): Delete declaration.
4890
76f2b779
JB
48912015-01-01 Joel Brobecker <brobecker@adacore.com>
4892
4893 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4894 * server.c (gdbserver_version): Likewise.
4895
fafcc06a
SDJ
48962014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4897
4898 * remote-utils.c: Include ctype.h.
4899 (input_interrupt): Explicitly handle the case when the char
4900 received is the NUL byte. Improve the printing of non-ASCII
4901 characters.
4902
beed38b8
JB
49032014-12-16 Joel Brobecker <brobecker@adacore.com>
4904
4905 * linux-low.c (linux_low_filter_event): Update call to
4906 linux_enable_event_reporting following the addition of
4907 a new parameter to that function.
4908
bf330350
CU
49092014-12-16 Catalin Udma <catalin.udma@freescale.com>
4910
4911 PR server/17457
4912 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4913 (AARCH64_FPCR_REGNO): Likewise.
4914 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4915 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4916 (aarch64_store_fpregset): Likewise.
4917
5227d625
JB
49182014-12-15 Joel Brobecker <brobecker@adacore.com>
4919
4920 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4921 Remove FIXME comment about assumption about N.
4922
f93b65a0
JB
49232014-12-13 Joel Brobecker <brobecker@adacore.com>
4924
4925 * configure.ac: If large-file support is disabled in GDBserver,
4926 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4927 * configure: Regenerate.
4928
e5a9158d
AA
49292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4930
4931 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4932 warning upon ENODATA from ptrace.
4933 * linux-s390-low.c (s390_store_tdb): New.
4934 (s390_regsets): Add regset for NT_S390_TDB.
4935
feea5f36
AA
49362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4937
4938 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4939 without a fill_function.
4940 * linux-s390-low.c (s390_fill_last_break): Remove.
4941 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4942 (s390_arch_setup): Use regset's size instead of fill_function for
4943 loop end condition.
4944
098dbe61
AA
49452014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4946
4947 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4948 the regset's store function when ptrace returned an error.
4949 * regcache.c (get_thread_regcache): Invalidate register cache
4950 before fetching inferior's registers.
4951
28eef672
AA
49522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4953
4954 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4955 while-loop as for-loop.
4956 (regsets_store_inferior_registers): Likewise.
4957
bdca27a2
YQ
49582014-11-28 Yao Qi <yao@codesourcery.com>
4959
4960 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4961 * config.in, configure: Re-generate.
4962 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4963 is defined.
4964
9c232dda
YQ
49652014-11-21 Yao Qi <yao@codesourcery.com>
4966
4967 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4968 (AC_CHECK_HEADERS): Remove malloc.h.
4969 * configure: Re-generated.
4970 * config.in: Re-generated.
4971 * server.h: Don't include alloca.h and malloc.h.
4972 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4973 Don't include malloc.h.
4974
43968415
JB
49752014-11-17 Joel Brobecker <brobecker@adacore.com>
4976
4977 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4978 corresponding ERRNO check in same block.
4979
40e91bc7
PA
49802014-11-12 Pedro Alves <palves@redhat.com>
4981
4982 * server.c (cont_thread): Update comment.
4983 (start_inferior, attach_inferior): No longer clear cont_thread.
4984 (handle_v_cont): No longer set cont_thread.
4985 (captured_main): Clear cont_thread each time a GDB connects.
4986
c2c118cf
PA
49872014-11-12 Pedro Alves <palves@redhat.com>
4988
4989 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4990 thread, and don't resume all threads if the Hc thread has exited.
4991
78708b7c
PA
49922014-11-12 Pedro Alves <palves@redhat.com>
4993
4994 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4995 the process group instead of to a specific LWP.
4996
a2abc7de
PA
49972014-10-15 Pedro Alves <palves@redhat.com>
4998
4999 PR server/17487
5000 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5001 parameter.
5002 (arm_set_thread_context): Delete.
5003 (the_low_target): Adjust.
5004 * win32-i386-low.c (debug_registers_changed)
5005 (debug_registers_used): Delete.
5006 (update_debug_registers_callback): New function.
5007 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5008 needing to update their debug registers.
5009 (win32_get_current_dr): New function.
5010 (x86_dr_low_get_addr, x86_dr_low_get_control)
5011 (x86_dr_low_get_status): Fetch the debug register from the thread
5012 record's context.
5013 (i386_initial_stuff): Adjust.
5014 (i386_get_thread_context): Remove current_event parameter. Don't
5015 clear debug_registers_changed nor copy DR values to
5016 debug_reg_state.
5017 (i386_set_thread_context): Delete.
5018 (i386_prepare_to_resume): New function.
5019 (i386_thread_added): Mark the thread as needing to update irs
5020 debug registers.
5021 (the_low_target): Remove i386_set_thread_context and install
5022 i386_prepare_to_resume.
5023 * win32-low.c (win32_get_thread_context): Adjust.
5024 (win32_set_thread_context): Use SetThreadContext
5025 directly.
5026 (win32_prepare_to_resume): New function.
5027 (win32_require_context): New function, factored out from ...
5028 (thread_rec): ... this.
5029 (continue_one_thread): Call win32_prepare_to_resume on each thread
5030 we're about to continue.
5031 (win32_resume): Call win32_prepare_to_resume on the event thread.
5032 * win32-low.h (struct win32_thread_info)
5033 <debug_registers_changed>: New field.
5034 (struct win32_target_ops): Change prototype of set_thread_context,
5035 delete set_thread_context and add prepare_to_resume.
5036 (win32_require_context): New declaration.
5037
a442d071
GB
50382014-10-08 Gary Benson <gbenson@redhat.com>
5039
5040 * server.h: Do not include common-exceptions.h.
5041
6f1947e8
GB
50422014-10-08 Gary Benson <gbenson@redhat.com>
5043
5044 * server.h: Do not include cleanups.h.
5045
63b434a4
JH
50462014-09-30 James Hogan <james.hogan@imgtec.com>
5047
5048 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5049 mips64-dsp-linux.c.
5050
c4d9ceb6
YQ
50512014-09-23 Yao Qi <yao@codesourcery.com>
5052
5053 * linux-low.c (lp_status_maybe_breakpoint): New function.
5054 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5055 (count_events_callback): Likewise.
5056 (select_event_lwp_callback): Likewise.
5057 (cancel_breakpoints_callback): Likewise.
5058
89a5711c
DB
50592014-09-19 Don Breazeal <donb@codesourcery.com>
5060
5061 * linux-low.c (handle_extended_wait): Call
5062 linux_ptrace_get_extended_event.
5063 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5064 linux_is_extended_waitstatus.
5065
bffc0964
JB
50662014-09-16 Joel Brobecker <brobecker@adacore.com>
5067
5068 * Makefile.in (CPPFLAGS): Define.
5069 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5070 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5071
0bfdf32f
GB
50722014-09-16 Gary Benson <gbenson@redhat.com>
5073
5074 * inferiors.h (current_inferior): Renamed as...
5075 (current_thread): New variable. All uses updated.
5076 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5077 (maybe_move_out_of_jump_pad): Likewise.
5078 (cancel_breakpoint): Likewise.
5079 (linux_low_filter_event): Likewise.
5080 (wait_for_sigstop): Likewise.
5081 (linux_resume_one_lwp): Likewise.
5082 (need_step_over_p): Likewise.
5083 (start_step_over): Likewise.
5084 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5085 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5086 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5087 and save_inferior as saved_thread.
5088 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5089 saved_thread.
5090 (regcache_invalidate_thread): Likewise.
5091 * remote-utils.c (prepare_resume_reply): Likewise.
5092 * thread-db.c (thread_db_get_tls_address): Likewise.
5093 (disable_thread_event_reporting): Likewise.
5094 (remove_thread_event_breakpoints): Likewise.
5095 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5096 as saved_thread.
5097 * target.h (set_desired_inferior): Renamed as...
5098 (set_desired_thread): New declaration. All uses updated.
5099 * server.c (myresume): Updated comment to reference thread instead
5100 of inferior.
5101 (handle_serial_event): Likewise.
5102 (handle_target_event): Likewise.
5103
361c8ade
GB
51042014-09-12 Tom Tromey <tromey@redhat.com>
5105 Gary Benson <gbenson@redhat.com>
5106
5107 * regcache.h: Include common-regcache.h.
5108 (regcache_read_pc): Don't declare.
5109 * regcache.c (get_thread_regcache_for_ptid): New function.
5110
bd9269f7
GB
51112014-09-11 Tom Tromey <tromey@redhat.com>
5112 Gary Benson <gbenson@redhat.com>
5113
5114 * symbol.c: New file.
5115 * Makefile.in (SFILES): Add symbol.c.
5116 (OBS): Add symbol.o.
5117
f8c1d06b
GB
51182014-09-11 Gary Benson <gbenson@redhat.com>
5119
5120 * target.c (target_stop_ptid, target_continue_ptid): New
5121 functions.
5122
721ec300
GB
51232014-09-11 Tom Tromey <tromey@redhat.com>
5124 Gary Benson <gbenson@redhat.com>
5125
5126 * target.h: Include target/target.h.
5127 * target.c (target_read_memory, target_read_uint32)
5128 (target_write_memory): New functions.
5129
c5e92cca
GB
51302014-09-11 Gary Benson <gbenson@redhat.com>
5131
5132 * server.h (debug_hw_points): Don't declare.
5133 * server.c (debug_hw_points): Don't define. Replace all uses
5134 with show_debug_regs.
5135 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5136 all uses with show_debug_regs.
5137
2e4bb98a
EBM
51382014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5139
5140 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5141 endianness into account.
5142 (ppc_supply_ptrace_register): Likewise.
5143
ac740bc7
JH
51442014-09-03 James Hogan <james.hogan@imgtec.com>
5145
5146 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5147 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5148
97ea6506
GB
51492014-09-03 Gary Benson <gbenson@redhat.com>
5150
5151 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5152 ALL_DEBUG_ADDRESS_REGISTERS.
5153
df7e5265
GB
51542014-09-02 Gary Benson <gbenson@redhat.com>
5155
5156 * i386-low.h: Renamed as...
5157 * x86-low.h: New file. All type, function and variable name
5158 prefixes changed from "i386_" to "x86_". All references updated.
5159 * i386-low.c: Renamed as...
5160 * x86-low.c: New file. All type, function and variable name
5161 prefixes changed from "i386_" to "x86_". All references updated.
5162
ed859da7
GB
51632014-09-02 Gary Benson <gbenson@redhat.com>
5164
5165 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5166 (x86_linux_new_thread): Likewise.
5167
860789c7
GB
51682014-08-29 Gary Benson <gbenson@redhat.com>
5169
5170 * server.h (setjmp.h): Do not include.
5171 (toplevel): Do not declare.
5172 (common-exceptions.h): Include.
5173 (cleanups.h): Likewise.
5174 * server.c (toplevel): Do not define.
5175 (exit_code): New static global.
5176 (detach_or_kill_for_exit_cleanup): New function.
5177 (main): New function. Original main renamed to...
5178 (captured_main): New function.
5179 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5180
ff55e1b5
GB
51812014-08-29 Gary Benson <gbenson@redhat.com>
5182
5183 * Makefile.in (SFILES): Add common/common-exceptions.c.
5184 (OBS): Add common-exceptions.o.
5185 (common-exceptions.o): New rule.
5186 * utils.c (prepare_to_throw_exception): New function.
5187
e9bcb658
GB
51882014-08-29 Gary Benson <gbenson@redhat.com>
5189
5190 * config.in: Regenerate.
5191 * configure: Likewise.
5192
e3180625
GB
51932014-08-29 Gary Benson <gbenson@redhat.com>
5194
5195 * Makefile.in (SFILES): Add common/cleanups.c.
5196 (OBS): cleanups.o.
5197 (cleanups.o): New rule.
5198
e3d6ba5d
GB
51992014-08-29 Gary Benson <gbenson@redhat.com>
5200
5201 * utils.c (internal_vwarning): New function.
5202
7096e886
GB
52032014-08-28 Gary Benson <gbenson@redhat.com>
5204
5205 * utils.h (fatal): Remove declaration.
5206 * utils.c (fatal): Remove function.
5207
14ce3192
GB
52082014-08-28 Gary Benson <gbenson@redhat.com>
5209
5210 * tracepoint.c (gdb_agent_init): Replace fatal with
5211 perror_with_name.
5212 (initialize_tracepoint): Likewise.
5213
50278d59
GB
52142014-08-28 Gary Benson <gbenson@redhat.com>
5215
5216 * remote-utils.c (remote_prepare): Replace fatal with error.
5217
aa96c426
GB
52182014-08-28 Gary Benson <gbenson@redhat.com>
5219
5220 * linux-low.c (linux_async): Replace fatal with warning.
5221 Tidy up and return.
5222 (linux_start_non_stop): Return -1 if linux_async failed.
5223
f7160e97
GB
52242014-08-28 Gary Benson <gbenson@redhat.com>
5225
5226 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5227 gdb_assert.
5228 (i386_dr_low_get_addr): Remove vague comment.
5229 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5230 gdb_assert.
5231
38e08fca
GB
52322014-08-28 Gary Benson <gbenson@redhat.com>
5233
5234 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5235 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5236 internal_error.
5237 (linux_resume_one_lwp): Likewise.
5238 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5239 gdb_assert.
5240 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5241 with internal_error.
5242 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5243 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5244 (find_register_by_name): Replace fatal with internal_error.
5245 (find_regno): Likewise.
5246 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5247 * thread-db.c (thread_db_create_event): Likewise.
5248 (thread_db_load_search): Likewise.
5249 (try_thread_db_load_1): Likewise.
5250 * tracepoint.c (get_jump_space_head): Replace fatal with
5251 internal_error.
5252 (claim_trampoline_space): Likewise.
5253 (have_fast_tracepoint_trampoline_buffer): Likewise.
5254 (cmd_qtstart): Likewise.
5255 (stop_tracing): Likewise.
5256 (fast_tracepoint_collecting): Likewise.
5257 (target_malloc): Likewise.
5258 (download_tracepoint): Likewise.
5259 (download_trace_state_variables): Replace check with gdb_assert.
5260 (upload_fast_traceframes): Replace fatal with internal_error.
5261
34abf635
GB
52622014-08-19 Tom Tromey <tromey@redhat.com>
5263 Gary Benson <gbenson@redhat.com>
5264
5265 * Makefile.in (SFILES): Add common/common-debug.c.
5266 (OBS): Add common-debug.o.
5267 (common-debug.o): New rule.
5268 * debug.h (debug_printf): Don't declare.
5269 * debug.c (debug_printf): Renamed and rewritten as...
5270 (debug_vprintf): New function.
5271
f6e94d78
GB
52722014-08-19 Gary Benson <gbenson@redhat.com>
5273
5274 * utils.h: Do not include print-utils.h.
5275
9239eeab
GB
52762014-08-19 Tom Tromey <tromey@redhat.com>
5277 Gary Benson <gbenson@redhat.com>
5278
5279 * server.h: Add static assertion.
5280 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5281
ef87c8bb
GB
52822014-08-19 Tom Tromey <tromey@redhat.com>
5283 Gary Benson <gbenson@redhat.com>
5284
5285 * Makefile.in (SFILES): Add common/errors.c.
5286 (OBS): Add errors.o.
5287 (IPA_OBS): Add errors-ipa.o.
5288 (errors.o): New rule.
5289 (errors-ipa.o): Likewise.
5290 * utils.h (perror_with_name, error, warning): Don't declare.
5291 * utils.c (warning): Renamed and rewritten as...
5292 (vwarning): New function.
5293 (error): Renamed and rewritten as...
5294 (verror): New function.
5295 (internal_error): Renamed and rewritten as...
5296 (internal_verror): New function.
5297
bb974a24
GB
52982014-08-07 Gary Benson <gbenson@redhat.com>
5299
5300 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5301 * configure: Regenerate.
5302 * config.in: Likewise.
5303 * server.h: Do not include errno.h.
5304 * event-loop.c: Likewise.
5305 * hostio-errno.c: Likewise.
5306 * linux-low.c: Likewise.
5307 * remote-utils.c: Likewise.
5308 * spu-low.c: Likewise.
5309 * utils.c: Likewise.
5310 * gdbreplay.c: Unconditionally include errno.h.
5311
6d3d12eb
GB
53122014-08-07 Gary Benson <gbenson@redhat.com>
5313
5314 * server.h: Do not include string.h.
5315 * event-loop.c: Likewise.
5316 * linux-low.c: Likewise.
5317 * regcache.c: Likewise.
5318 * remote-utils.c: Likewise.
5319 * spu-low.c: Likewise.
5320 * utils.c: Likewise.
5321
dccbb609
GB
53222014-08-07 Gary Benson <gbenson@redhat.com>
5323
5324 * server.h: Do not include gdb_assert.h.
5325
e76df0d0
GB
53262014-08-07 Gary Benson <gbenson@redhat.com>
5327
5328 * server.h: Do not include common-utils.h.
5329
4cb9c816
GB
53302014-08-07 Gary Benson <gbenson@redhat.com>
5331
5332 * server.h: Do not include ptid.h.
5333 * notif.h: Likewise.
5334
3995eeee
GB
53352014-08-07 Gary Benson <gbenson@redhat.com>
5336
5337 * server.h: Do not include gdb_locale.h.
5338
cb9f1a9b
GB
53392014-08-07 Gary Benson <gbenson@redhat.com>
5340
5341 * server.h: Do not include gdb/signals.h.
5342 * win32-low.c: Likewise.
5343
a5fceff8
GB
53442014-08-07 Gary Benson <gbenson@redhat.com>
5345
5346 * server.h: Do not include pathmax.h.
5347
b9391142
GB
53482014-08-07 Gary Benson <gbenson@redhat.com>
5349
5350 * server.h: Do not include libiberty.h.
5351 * linux-bfin-low.c: Likewise.
5352
0e443c87
GB
53532014-08-07 Gary Benson <gbenson@redhat.com>
5354
5355 * server.h: Do not include ansidecl.h.
5356
8ebb3f56
GB
53572014-08-07 Gary Benson <gbenson@redhat.com>
5358
5359 * linux-x86-low.c: Do not include stddef.h.
5360 * lynx-ppc-low.c: Likewise.
5361 * tracepoint.c: Likewise.
5362
8980bdf6
GB
53632014-08-07 Gary Benson <gbenson@redhat.com>
5364
5365 * server.h: Do not include stdarg.h.
5366 * nto-low.c: Likewise.
5367
d7096f71
GB
53682014-08-07 Gary Benson <gbenson@redhat.com>
5369
5370 * server.h: Do not include stdlib.h.
5371 * inferiors.c: Likewise.
5372 * linux-low.c: Likewise.
5373 * regcache.c: Likewise.
5374 * spu-low.c: Likewise.
5375 * tracepoint.c: Likewise.
5376 * utils.c: Likewise.
5377
d02f550d
GB
53782014-08-07 Gary Benson <gbenson@redhat.com>
5379
5380 * server.h: Do not include stdio.h.
5381 * linux-low.c: Likewise.
5382 * remote-utils.c: Likewise.
5383 * spu-low.c: Likewise.
5384 * utils.c: Likewise.
5385 * wincecompat.c: Likewise.
5386
87f6c4e3
GB
53872014-08-06 Gary Benson <gbenson@redhat.com>
5388
5389 * regcache.c (init_register_cache): Move conditionals inside if.
5390
7089dca4
GB
53912014-08-06 Gary Benson <gbenson@redhat.com>
5392
5393 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5394
462f517e
GB
53952014-07-31 Gary Benson <gbenson@redhat.com>
5396
5397 * ax.h: Do not include server.h.
5398 * gdbthread.h: Likewise.
5399 * lynx-low.h: Likewise.
5400 * notif.h: Likewise.
5401
976411d6
GB
54022014-07-30 Gary Benson <gbenson@redhat.com>
5403
5404 * server.h: Include common-defs.h.
5405 Do not include config.h or build-gnulib-gdbserver/config.h.
5406
d41f6d8e
GB
54072014-07-30 Gary Benson <gbenson@redhat.com>
5408
5409 * hostio-errno.c: Move server.h to top of includes list.
5410 * inferiors.c: Likewise.
5411 * linux-x86-low.c: Likewise.
5412 * notif.c: Include server.h.
5413
314c6a35
TT
54142014-07-24 Tom Tromey <tromey@redhat.com>
5415 Gary Benson <gbenson@redhat.com>
5416
5417 * server.h (CORE_ADDR): Now unsigned.
5418
69ff6be5
PA
54192014-07-16 Pedro Alves <palves@redhat.com>
5420
5421 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5422
ce9e3fe7
PA
54232014-07-15 Pedro Alves <palves@redhat.com>
5424
5425 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5426 copy.
5427
e76126e8
PA
54282014-07-11 Pedro Alves <palves@redhat.com>
5429
5430 * linux-low.c (kill_wait_lwp): New function, based on
5431 kill_one_lwp_callback, but use my_waitpid directly.
5432 (kill_one_lwp_callback, linux_kill): Use it.
5433
8e9db26e
PA
54342014-06-23 Pedro Alves <palves@redhat.com>
5435
5436 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5437 before setting DR0..DR3.
5438
698b3e08
GB
54392014-06-20 Gary Benson <gbenson@redhat.com>
5440
5441 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5442 * configure: Regenerated.
5443 * config.in: Likewise.
5444
125f8a3d
GB
54452014-06-20 Gary Benson <gbenson@redhat.com>
5446
5447 * Makefile.in (SFILES): Update locations for files moved
5448 from common to nat.
5449 (object file files): Reordered.
5450
42995dbd
GB
54512014-06-20 Gary Benson <gbenson@redhat.com>
5452
5453 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5454 (i386_dr_low_set_addr): Likewise.
5455 (i386_dr_low_get_addr): Likewise.
5456 (i386_dr_low_can_set_control): Likewise.
5457 (i386_dr_low_set_control): Likewise.
5458 (i386_dr_low_get_control): Likewise.
5459 (i386_dr_low_get_status): Likewise.
5460 (i386_get_debug_register_length): Likewise.
5461 * linux-x86-low.c (i386_dr_low_set_addr):
5462 Changed signature. Made static.
5463 (i386_dr_low_get_addr): Likewise.
5464 (i386_dr_low_set_control): Likewise.
5465 (i386_dr_low_get_control): Likewise.
5466 (i386_dr_low_get_status): Likewise.
5467 (i386_dr_low): New global variable.
5468 * win32-i386-low.c (i386_dr_low_set_addr):
5469 Changed signature. Made static.
5470 (i386_dr_low_get_addr): Likewise.
5471 (i386_dr_low_set_control): Likewise.
5472 (i386_dr_low_get_control): Likewise.
5473 (i386_dr_low_get_status): Likewise.
5474 (i386_dr_low): New global variable.
5475
e1d2394b
MS
54762014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5477
5478 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5479 * Makefile.in (AR, AR_FLAGS): Define.
5480 * configure: Regenerate.
5481
3a8ee006
GB
54822014-06-19 Gary Benson <gbenson@redhat.com>
5483
5484 * Makefile.in (i386-dregs.o): New rule.
5485 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5486 * i386-low.c (target.h): Remove include.
5487 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5488 (DR_CONTROL_SHIFT): Likewise.
5489 (DR_CONTROL_SIZE): Likewise.
5490 (DR_RW_EXECUTE): Likewise.
5491 (DR_RW_WRITE): Likewise.
5492 (DR_RW_READ): Likewise.
5493 (DR_RW_IORW): Likewise.
5494 (DR_LEN_1): Likewise.
5495 (DR_LEN_2): Likewise.
5496 (DR_LEN_4): Likewise.
5497 (DR_LEN_8): Likewise.
5498 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5499 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5500 (DR_ENABLE_SIZE): Likewise.
5501 (DR_LOCAL_SLOWDOWN): Likewise.
5502 (DR_GLOBAL_SLOWDOWN): Likewise.
5503 (DR_CONTROL_RESERVED): Likewise.
5504 (I386_DR_CONTROL_MASK): Likewise.
5505 (I386_DR_VACANT): Likewise.
5506 (I386_DR_LOCAL_ENABLE): Likewise.
5507 (I386_DR_GLOBAL_ENABLE): Likewise.
5508 (I386_DR_DISABLE): Likewise.
5509 (I386_DR_SET_RW_LEN): Likewise.
5510 (I386_DR_GET_RW_LEN): Likewise.
5511 (I386_DR_WATCH_HIT): Likewise.
5512 (i386_wp_op_t): Likewise.
5513 (i386_show_dr): Likewise.
5514 (i386_length_and_rw_bits): Likewise.
5515 (i386_insert_aligned_watchpoint): Likewise.
5516 (i386_remove_aligned_watchpoint): Likewise.
5517 (i386_handle_nonaligned_watchpoint): Likewise.
5518 i386_update_inferior_debug_regs(): Likewise.
5519 (i386_dr_insert_watchpoint): Likewise.
5520 (i386_dr_remove_watchpoint): Likewise.
5521 (i386_dr_region_ok_for_watchpoint): Likewise.
5522 (i386_dr_stopped_data_address): Likewise.
5523 (i386_dr_stopped_by_watchpoint): Likewise.
5524
8f26655c
GB
55252014-06-19 Gary Benson <gbenson@redhat.com>
5526
5527 * i386-low.c (i386_dr_show): Renamed to
5528 i386_show_dr and made static. All uses updated.
5529 (i386_dr_length_and_rw_bits): Renamed to
5530 i386_length_and_rw_bits and made static.
5531 All uses updated.
5532 (i386_dr_insert_aligned_watchpoint): Renamed to
5533 i386_insert_aligned_watchpoint and made static.
5534 All uses updated.
5535 (i386_dr_remove_aligned_watchpoint): Renamed to
5536 i386_remove_aligned_watchpoint and made static.
5537 All uses updated.
5538 (i386_dr_update_inferior_debug_regs): Renamed to
5539 i386_update_inferior_debug_regs and made static.
5540 All uses updated.
5541
b9228891
GB
55422014-06-18 Gary Benson <gbenson@redhat.com>
5543
5171def3
GB
5544 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5545 (i386_dr_low_can_set_control): Likewise.
5546 (i386_get_debug_register_length): Likewise.
5547 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5548 (i386_dr_low_can_set_control): Likewise.
5549 (i386_get_debug_register_length): Likewise.
5550
55512014-06-17 Gary Benson <gbenson@redhat.com>
5552
b9228891
GB
5553 * i386-low.h (i386-dregs.h): New include.
5554 (DR_FIRSTADDR): Now in i386-dregs.h.
5555 (DR_LASTADDR): Likewise.
5556 (DR_NADDR): Likewise.
5557 (DR_STATUS): Likewise.
5558 (DR_CONTROL): Likewise.
5559 (i386_debug_reg_state): Likewise.
5560 (i386_dr_insert_watchpoint): Likewise.
5561 (i386_dr_remove_watchpoint): Likewise.
5562 (i386_dr_region_ok_for_watchpoint): Likewise.
5563 (i386_dr_stopped_data_address): Likewise.
5564 (i386_dr_stopped_by_watchpoint): Likewise.
5565 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5566
4be83cc2
GB
55672014-06-18 Gary Benson <gbenson@redhat.com>
5568
5569 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5570 i386_dr_insert_watchpoint.
5571 (i386_low_remove_watchpoint): Renamed to
5572 i386_dr_remove_watchpoint.
5573 (i386_low_region_ok_for_watchpoint): Renamed to
5574 i386_dr_region_ok_for_watchpoint.
5575 (i386_low_stopped_data_address): Renamed to
5576 i386_dr_stopped_data_address.
5577 (i386_low_stopped_by_watchpoint): Renamed to
5578 i386_dr_stopped_by_watchpoint.
5579 * i386-low.c (i386_show_dr): Renamed to
5580 i386_dr_show and made nonstatic. All uses updated.
5581 (i386_length_and_rw_bits): Renamed to
5582 i386_dr_length_and_rw_bits and made nonstatic.
5583 All uses updated.
5584 (i386_insert_aligned_watchpoint): Renamed to
5585 i386_dr_insert_aligned_watchpoint and made nonstatic.
5586 All uses updated.
5587 (i386_remove_aligned_watchpoint): Renamed to
5588 i386_dr_remove_aligned_watchpoint and made nonstatic.
5589 All uses updated.
5590 (i386_update_inferior_debug_regs): Renamed to
5591 i386_dr_update_inferior_debug_regs and made nonstatic.
5592 All uses updated.
5593 (i386_low_insert_watchpoint): Renamed to
5594 i386_dr_insert_watchpoint. All uses updated.
5595 (i386_low_remove_watchpoint): Renamed to
5596 i386_dr_remove_watchpoint. All uses updated.
5597 (i386_low_region_ok_for_watchpoint): Renamed to
5598 i386_dr_region_ok_for_watchpoint. All uses updated.
5599 (i386_low_stopped_data_address): Renamed to
5600 i386_dr_stopped_data_address. All uses updated.
5601 (i386_low_stopped_by_watchpoint): Renamed to
5602 i386_dr_stopped_by_watchpoint. All uses updated.
5603
131aa0d4
GB
56042014-06-18 Gary Benson <gbenson@redhat.com>
5605
5606 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5607 (i386_dr_low_can_set_control): Likewise.
5608 (i386_insert_aligned_watchpoint): New check.
5609
d9305f7f
GB
56102014-06-18 Gary Benson <gbenson@redhat.com>
5611
5612 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5613 Renamed to state.
5614
e927c9fc
GB
56152014-06-18 Gary Benson <gbenson@redhat.com>
5616
5617 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5618 instead of fatal and error.
5619 (i386_handle_nonaligned_watchpoint): Likewise.
5620
1b6d4134
GB
56212014-06-18 Gary Benson <gbenson@redhat.com>
5622
5623 * i386-low.c (i386_get_debug_register_length): New macro.
5624 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5625 (i386_show_dr): Use debug_printf instead of fprintf. Use
5626 phex to format values.
5627
6e62758f
GB
56282014-06-18 Gary Benson <gbenson@redhat.com>
5629
5630 * i386-low.h: Comment changes.
5631 * i386-low.c: Likewise.
5632
fc6e2f03
GB
56332014-06-18 Gary Benson <gbenson@redhat.com>
5634
5635 * i386-low.c: Whitespace changes.
5636
f9d1eeed
TT
56372014-06-12 Tom Tromey <tromey@redhat.com>
5638
5639 * utils.c (freeargv): Remove.
5640
0b04e523
TT
56412014-06-12 Tom Tromey <tromey@redhat.com>
5642
5643 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5644 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5645 (parse_debug_format_options): Likewise.
5646 (gdbserver_usage): Likewise.
5647 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5648 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5649 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5650 against libiberty.
5651 ($(LIBGNU)): Depend on libiberty.
5652 (all-lib): Recurse into all subdirs.
5653 (install-only): Invoke "install" target in subdirs.
5654 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5655 targets.
5656 * configure: Rebuild.
5657 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5658 for vasprintf, vsnprintf, or gettimeofday.
5659 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5660 srv_tgtobj.
5661
270c9937
JB
56622014-06-05 Joel Brobecker <brobecker@adacore.com>
5663
5664 * development.sh: Delete.
5665 * Makefile.in (config.status): Adjust dependency on development.sh.
5666 * configure.ac: Adjust development.sh source call.
5667 * configure: Regenerate.
5668
0a261ed8
PA
56692014-06-02 Pedro Alves <palves@redhat.com>
5670
5671 * ax.c (gdb_free_agent_expr): New function.
5672 * ax.h (gdb_free_agent_expr): New declaration.
5673 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5674 list.
5675 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5676 static.
5677 (clear_breakpoint_conditions_and_commands): New function.
5678 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5679 (clear_breakpoint_conditions_and_commands): New declaration.
5680
e9dae05e
RR
56812014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5682
5683 * linux-aarch64-low.c (asm/ptrace.h): Include.
5684
5876f503
JK
56852014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5686
5687 Fix TLS access for -static -pthread.
5688 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5689 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5690 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5691
802e8e6d
PA
56922014-05-20 Pedro Alves <palves@redhat.com>
5693
5694 * linux-aarch64-low.c (aarch64_insert_point)
5695 (aarch64_remove_point): No longer check whether the type is
5696 supported here. Adjust to new interface.
5697 (the_low_target): Install aarch64_supports_z_point_type as
5698 supports_z_point_type method.
5699 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5700 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5701 instead of a Z packet char. Adjust.
5702 (arm_supports_z_point_type): New function.
5703 (arm_insert_point, arm_remove_point): Adjust to new interface.
5704 (the_low_target): Install arm_supports_z_point_type.
5705 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5706 (cris_insert_point, cris_remove_point): Adjust to new interface.
5707 Don't check whether the type is supported here.
5708 (the_low_target): Install cris_supports_z_point_type.
5709 * linux-low.c (linux_supports_z_point_type): New function.
5710 (linux_insert_point, linux_remove_point): Adjust to new interface.
5711 * linux-low.h (struct linux_target_ops) <insert_point,
5712 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5713 raw_breakpoint pointer parameter.
5714 <supports_z_point_type>: New method.
5715 * linux-mips-low.c (mips_supports_z_point_type): New function.
5716 (mips_insert_point, mips_remove_point): Adjust to new interface.
5717 Use mips_supports_z_point_type.
5718 (the_low_target): Install mips_supports_z_point_type.
5719 * linux-ppc-low.c (the_low_target): Install NULL as
5720 supports_z_point_type method.
5721 * linux-s390-low.c (the_low_target): Install NULL as
5722 supports_z_point_type method.
5723 * linux-sparc-low.c (the_low_target): Install NULL as
5724 supports_z_point_type method.
5725 * linux-x86-low.c (x86_supports_z_point_type): New function.
5726 (x86_insert_point): Adjust to new insert_point interface. Use
5727 insert_memory_breakpoint. Adjust to new
5728 i386_low_insert_watchpoint interface.
5729 (x86_remove_point): Adjust to remove_point interface. Use
5730 remove_memory_breakpoint. Adjust to new
5731 i386_low_remove_watchpoint interface.
5732 (the_low_target): Install x86_supports_z_point_type.
5733 * lynx-low.c (lynx_target_ops): Install NULL as
5734 supports_z_point_type callback.
5735 * nto-low.c (nto_supports_z_point_type): New.
5736 (nto_insert_point, nto_remove_point): Adjust to new interface.
5737 (nto_target_ops): Install nto_supports_z_point_type.
5738 * mem-break.c: Adjust intro comment.
5739 (struct raw_breakpoint) <raw_type, size>: New fields.
5740 <inserted>: Update comment.
5741 <shlib_disabled>: Delete field.
5742 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5743 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5744 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5745 (raw_bkpt_type_to_target_hw_bp_type): New function.
5746 (find_enabled_raw_code_breakpoint_at): New function.
5747 (find_raw_breakpoint_at): New type and size parameters. Use them.
5748 (insert_memory_breakpoint): New function, based off
5749 set_raw_breakpoint_at.
5750 (remove_memory_breakpoint): New function.
5751 (set_raw_breakpoint_at): Reimplement.
5752 (set_breakpoint): New, based on set_breakpoint_at.
5753 (set_breakpoint_at): Reimplement.
5754 (delete_raw_breakpoint): Go through the_target->remove_point
5755 instead of assuming memory breakpoints.
5756 (find_gdb_breakpoint_at): Delete.
5757 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5758 (find_gdb_breakpoint): New function.
5759 (set_gdb_breakpoint_at): Delete.
5760 (z_type_supported): New function.
5761 (set_gdb_breakpoint_1): New function, loosely based off
5762 set_gdb_breakpoint_at.
5763 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5764 (delete_gdb_breakpoint_at): Delete.
5765 (delete_gdb_breakpoint_1): New function, loosely based off
5766 delete_gdb_breakpoint_at.
5767 (delete_gdb_breakpoint): New function.
5768 (clear_gdb_breakpoint_conditions): Rename to ...
5769 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5770 breakpoint.
5771 (add_condition_to_breakpoint): Make static.
5772 (add_breakpoint_condition): Take a struct breakpoint pointer
5773 instead of an address. Adjust.
5774 (gdb_condition_true_at_breakpoint): Rename to ...
5775 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5776 z_type parameter.
5777 (gdb_condition_true_at_breakpoint): Reimplement.
5778 (add_breakpoint_commands): Take a struct breakpoint pointer
5779 instead of an address. Adjust.
5780 (gdb_no_commands_at_breakpoint): Rename to ...
5781 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5782 parameter. Return true if no breakpoint was found. Change debug
5783 output.
5784 (gdb_no_commands_at_breakpoint): Reimplement.
5785 (run_breakpoint_commands): Rename to ...
5786 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5787 and change return type to boolean.
5788 (run_breakpoint_commands): New function.
5789 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5790 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5791 breakpoint. Go through the_target->remove_point instead of
5792 assuming memory breakpoint.
5793 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5794 software and hardware breakpoints.
5795 (reinsert_raw_breakpoint): Go through the_target->insert_point
5796 instead of assuming memory breakpoint.
5797 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5798 software and hardware breakpoints.
5799 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5800 Check both software and hardware breakpoints.
5801 (validate_inserted_breakpoint): Assert the breakpoint is a
5802 software breakpoint. Set the inserted flag to -1 instead of
5803 setting shlib_disabled.
5804 (delete_disabled_breakpoints): Adjust.
5805 (validate_breakpoints): Only validate software breakpoints.
5806 Adjust to inserted flag change.
5807 (check_mem_read, check_mem_write): Skip breakpoint types other
5808 than software breakpoints. Adjust to inserted flag change.
5809 * mem-break.h (enum raw_bkpt_type): New enum.
5810 (raw_breakpoint, struct process_info): Forward declare.
5811 (Z_packet_to_target_hw_bp_type): Delete declaration.
5812 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5813 (set_gdb_breakpoint, delete_gdb_breakpoint)
5814 (clear_breakpoint_conditions): New declarations.
5815 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5816 (breakpoint_inserted_here): Update comment.
5817 (add_breakpoint_condition, add_breakpoint_commands): Replace
5818 address parameter with a breakpoint pointer parameter.
5819 (gdb_breakpoint_here): Update comment.
5820 (delete_gdb_breakpoint_at): Delete.
5821 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5822 * server.c (process_point_options): Take a struct breakpoint
5823 pointer instead of an address. Adjust.
5824 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5825 delete_gdb_breakpoint.
5826 * spu-low.c (spu_target_ops): Install NULL as
5827 supports_z_point_type method.
5828 * target.h: Include mem-break.h.
5829 (struct target_ops) <prepare_to_access_memory>: Update comment.
5830 <supports_z_point_type>: New field.
5831 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5832 instead of a char. Also take a raw breakpoint pointer.
5833 * win32-arm-low.c (the_low_target): Install NULL as
5834 supports_z_point_type.
5835 * win32-i386-low.c (i386_supports_z_point_type): New function.
5836 (i386_insert_point, i386_remove_point): Adjust to new interface.
5837 (the_low_target): Install i386_supports_z_point_type.
5838 * win32-low.c (win32_supports_z_point_type): New function.
5839 (win32_insert_point, win32_remove_point): Adjust to new interface.
5840 (win32_target_ops): Install win32_supports_z_point_type.
5841 * win32-low.h (struct win32_target_ops):
5842 <supports_z_point_type>: New method.
5843 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5844 instead of a char. Also take a raw breakpoint pointer.
5845
932539e3
PA
58462014-05-20 Pedro Alves <palves@redhat.com>
5847
5848 * mem-break.h: Include break-common.h.
5849 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5850 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5851 (Z_packet_to_target_hw_bp_type): New declaration.
5852 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5853 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5854 (Z_PACKET_ACCESS_WP): Delete macros.
5855 (Z_packet_to_hw_type): Delete function.
5856 * i386-low.h: Don't include break-common.h here.
5857 (Z_packet_to_hw_type): Delete declaration.
5858 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5859 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5860 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5861 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5862 * linux-aarch64-low.c: Don't include break-common.h here.
5863 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5864 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5865 (Z_packet_to_target_hw_bp_type): Delete function.
5866 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5867 function.
5868 (mips_insert_point, mips_remove_point): Use
5869 Z_packet_to_target_hw_bp_type.
5870
4ff0d3d8
PA
58712014-05-20 Pedro Alves <palves@redhat.com>
5872
5873 * linux-aarch64-low.c: Include break-common.h.
5874 (enum target_point_type): Delete.
5875 (Z_packet_to_point_type): Rename to ...
5876 (Z_packet_to_target_hw_bp_type): ... this, and return a
5877 target_hw_bp_type instead.
5878 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5879 instead of an enum target_point_type.
5880 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5881 breakpoint type.
5882 (aarch64_dr_state_insert_one_point)
5883 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5884 (aarch64_handle_aligned_watchpoint)
5885 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5886 Take an enum target_hw_bp_type instead of an enum
5887 target_point_type.
5888 (aarch64_supports_z_point_type): New function.
5889 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5890 use Z_packet_to_target_hw_bp_type.
5891
786dc519
JB
58922014-05-20 Joel Brobecker <brobecker@adacore.com>
5893
5894 * configure.ac: Only use -Werror by default when DEVELOPMENT
5895 is true.
5896 * configure: Regenerate.
5897
9e0aa64f
JK
58982014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5899
5900 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5901 * linux-x86-low.c (X86_64_USER_REGS): New.
5902 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5903
2b577b92
YQ
59042014-04-28 Yao Qi <yao@codesourcery.com>
5905
5906 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5907 name.
5908
94611da2
PA
59092014-04-25 Pedro Alves <palves@redhat.com>
5910
5911 PR server/16255
5912 * linux-low.c (linux_attach_fail_reason_string): New function.
5913 (linux_attach_lwp): Delete.
5914 (linux_attach_lwp_1): Rename to ...
5915 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5916 argument. Remove "initial" parameter. Return int instead of
5917 void. Don't error or warn here.
5918 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5919 failure to attach to the tgid. Call warning when failing to
5920 attach to an lwp.
5921 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5922 argument. Remove "initial" parameter. Return int instead of
5923 void. Don't error or warn here.
5924 (linux_attach_fail_reason_string): New declaration.
5925 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5926 interface change. Use linux_attach_fail_reason_string.
5927
01f9f808
MS
59282014-04-24 Michael Sturm <michael.sturm@mintel.com>
5929 Walfred Tedeschi <walfred.tedeschi@intel.com>
5930
5931 * Makefile.in: Added rules to handle new files
5932 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5933 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5934 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5935 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5936 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5937 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5938 x32-avx512-linux.o.
5939 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5940 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5941 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5942 i386/x32-avx512.xml.
5943 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5944 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5945 i386/x32-avx512-linux.xml.
5946 * i387-fp.c (num_avx512_k_registers): New constant for number
5947 of K registers.
5948 (num_avx512_zmmh_low_registers): New constant for number of
5949 lower ZMM registers (0-15).
5950 (num_avx512_zmmh_high_registers): New constant for number of
5951 higher ZMM registers (16-31).
5952 (num_avx512_ymmh_registers): New contant for number of higher
5953 YMM registers (ymm16-31 added by avx521 on x86_64).
5954 (num_avx512_xmm_registers): New constant for number of higher
5955 XMM registers (xmm16-31 added by AVX512 on x86_64).
5956 (struct i387_xsave): Add space for AVX512 registers.
5957 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5958 Add code to handle AVX512 registers.
5959 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5960 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5961 prototypei from generated file.
5962 (tdesc_amd64_avx512_linux): Likewise.
5963 (init_registers_x32_avx512_linux): Likewise.
5964 (tdesc_x32_avx512_linux): Likewise.
5965 (init_registers_i386_avx512_linux): Likewise.
5966 (tdesc_i386_avx512_linux): Likewise.
5967 (x86_64_regmap): Add AVX512 registers.
5968 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5969 mask.
5970 (initialize_low_arch): Add code to initialize AVX512 registers.
5971
51aa91f9
PA
59722014-04-23 Pedro Alves <palves@redhat.com>
5973
5974 * mem-break.c (find_gdb_breakpoint_at): Make static.
5975 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5976
a4165e94
PA
59772014-04-23 Pedro Alves <palves@redhat.com>
5978
5979 * i386-low.c: Don't include break-common.h here.
5980 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5981 prototype to take target_hw_bp_type as argument instead of a Z
5982 packet char.
5983 * i386-low.h: Include break-common.h here.
5984 (Z_packet_to_hw_type): Declare.
5985 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5986 prototypes.
5987 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5988 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5989 (x86_remove_point): Convert the packet number to a
5990 target_hw_bp_type before calling i386_low_remove_watchpoint.
5991 * win32-i386-low.c (i386_insert_point): Convert the packet number
5992 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5993 (i386_remove_point): Convert the packet number to a
5994 target_hw_bp_type before calling i386_low_remove_watchpoint.
5995
b8acf843
PA
59962014-04-23 Pedro Alves <palves@redhat.com>
5997
5998 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5999
d708bcd1
PA
60002014-04-10 Pedro Alves <palves@redhat.com>
6001
6002 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6003 Check if the condition or command is NULL before checking if the
6004 breakpoint is known. On success, return true.
6005 * mem-break.h (add_breakpoint_condition): Document return.
6006 (add_breakpoint_commands): Add describing comment.
6007 * server.c (skip_to_semicolon): New function.
6008 (process_point_options): Use it.
6009
2eec7d5b
PA
60102014-04-09 Pedro Alves <palves@redhat.com>
6011
6012 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6013 to lwpid_of.
6014
fa96cb38
PA
60152014-02-27 Pedro Alves <palves@redhat.com>
6016
6017 PR 12702
6018 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6019 macros.
6020 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6021 output.
6022 (last_thread_of_process_p): Take a PID argument instead of a
6023 thread pointer.
6024 (linux_wait_for_lwp): Delete.
6025 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6026 functions.
6027 (linux_low_filter_event): New function, party factored out from
6028 linux_wait_for_event.
6029 (linux_wait_for_event): Rename to ...
6030 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6031 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6032 sigsuspend. Check for zombie leaders.
6033 (linux_wait_for_event): Reimplement as wrapper around
6034 linux_wait_for_event_filtered.
6035 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6036 a normal or signal exit is seen, it's the whole process exiting.
6037 (wait_for_sigstop): No longer a for_each_inferior callback.
6038 Rewrite on top of linux_wait_for_event_filtered.
6039 (stop_all_lwps): Call wait_for_sigstop directly.
6040 * server.c (resume, handle_target_event): Handle
6041 TARGET_WAITKIND_NO_RESUMED.
6042
d763de10
JB
60432014-02-26 Joel Brobecker <brobecker@adacore.com>
6044
6045 * win32-low.c (psapi_get_dll_name,
6046 * win32_CreateToolhelp32Snapshot): Delete.
6047 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6048 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6049 Delete.
6050 (handle_load_dll): Add function description.
6051 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6052
850a0f76
JB
60532014-02-26 Joel Brobecker <brobecker@adacore.com>
6054
6055 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6056 Add comment.
6057 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6058 base address when calling win32_add_one_solib.
6059 (handle_load_dll): Delete local variable load_addr.
6060 Remove 0x1000 offset applied to DLL base address when calling
6061 win32_add_one_solib.
6062 (handle_unload_dll): Add comment.
6063
f25b3fc3
JB
60642014-02-26 Joel Brobecker <brobecker@adacore.com>
6065
6066 * win32-low.c (win32_add_all_dlls): Renames
6067 win32_ensure_ntdll_loaded. Rewrite function documentation.
6068 Adjust implementation to always load all DLLs.
6069 Add 0x1000 offset to DLL base address when calling
6070 win32_add_one_solib.
6071 (child_initialization_done): New static global.
6072 (do_initial_child_stuff): Set child_initialization_done to
6073 zero during child initialization, and 1 after. Replace call
6074 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6075 Add comment.
6076 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6077 (handle_unload_dll): Add function documentation.
6078 (get_child_debug_event): Ignore load and unload DLL events
6079 during child initialization.
6080
d86d4aaf
DE
60812014-02-20 Doug Evans <dje@google.com>
6082
3bc32da3 6083 Remove global all_lwps.
d86d4aaf
DE
6084 * inferiors.h (ptid_of): Move here from linux-low.h.
6085 (pid_of, lwpid_of): Ditto.
6086 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6087 parameter is a struct thread_info * now.
6088 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6089 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6090 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6091 directly.
6092 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6093 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6094 * linux-arm-low.c (update_registers_callback): Update, "entry"
6095 parameter is a struct thread_info * now.
6096 Fetch lwpid from current_inferior directly.
6097 (arm_insert_point): Pass &all_threads to find_inferior instead of
6098 &all_lwps.
6099 (arm_remove_point): Ditto.
6100 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6101 (arm_prepare_to_resume): Fetch pid from thread.
6102 (arm_read_description): Fetch lwpid from current_inferior directly.
6103 * linux-low.c (all_lwps): Delete.
6104 (delete_lwp): Delete call to remove_inferior.
6105 (handle_extended_wait): Fetch lwpid from thread.
6106 (add_lwp): Don't set lwp->entry.id. Remove call to
6107 add_inferior_to_list.
6108 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6109 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6110 (kill_one_lwp_callback): Ditto.
6111 (linux_kill): Don't dereference NULL pointer.
6112 Fetch ptid,lwpid from thread.
6113 (get_detach_signal): Fetch ptid from thread.
6114 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6115 Simplify call to regcache_invalidate_thread.
6116 (delete_lwp_callback): Update, "entry" parameter is a
6117 struct thread_info * now. Fetch pid from thread.
6118 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6119 (status_pending_p_callback): Update, "entry" parameter is a
6120 struct thread_info * now. Fetch ptid from thread.
6121 (find_lwp_pid): Update, "entry" parameter is a
6122 struct thread_info * now.
6123 (linux_wait_for_lwp): Fetch pid from thread.
6124 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6125 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6126 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6127 (dequeue_one_deferred_signal): Ditto.
6128 (cancel_breakpoint): Fetch ptid from current_inferior.
6129 (linux_wait_for_event): Pass &all_threads to find_inferior,
6130 not &all_lwps. Fetch ptid, lwpid from thread.
6131 (count_events_callback): Update, "entry" parameter is a
6132 struct thread_info * now.
6133 (select_singlestep_lwp_callback): Ditto.
6134 (select_event_lwp_callback): Ditto.
6135 (cancel_breakpoints_callback): Ditto.
6136 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6137 not &all_lwps.
6138 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6139 (unsuspend_one_lwp): Update, "entry" parameter is a
6140 struct thread_info * now.
6141 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6142 not &all_lwps.
6143 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6144 Fetch lwpid from thread, not lwp.
6145 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6146 Pass &all_threads to find_inferior, not &all_lwps.
6147 (send_sigstop): Fetch lwpid from thread, not lwp.
6148 (send_sigstop_callback): Update, "entry" parameter is a
6149 struct thread_info * now.
6150 (suspend_and_send_sigstop_callback): Ditto.
6151 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6152 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6153 struct thread_info * now.
6154 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6155 from thread, lwp.
6156 (lwp_running): Update, "entry" parameter is a
6157 struct thread_info * now.
6158 (stop_all_lwps): Fetch ptid from thread.
6159 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6160 (linux_resume_one_lwp): Fetch lwpid from thread.
6161 (linux_set_resume_request): Update, "entry" parameter is a
6162 struct thread_info * now. Fetch pid, lwpid from thread.
6163 (resume_status_pending_p): Update, "entry" parameter is a
6164 struct thread_info * now.
6165 (need_step_over_p): Ditto. Fetch lwpid from thread.
6166 (start_step_over): Fetch lwpid from thread.
6167 (linux_resume_one_thread): Update, "entry" parameter is a
6168 struct thread_info * now. Fetch lwpid from thread.
6169 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6170 (proceed_one_lwp): Update, "entry" parameter is a
6171 struct thread_info * now. Fetch lwpid from thread.
6172 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6173 struct thread_info * now.
6174 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6175 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6176 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6177 directly.
6178 (regsets_store_inferior_registers): Ditto.
6179 (fetch_register, store_register): Ditto.
6180 (linux_read_memory, linux_write_memory): Ditto.
6181 (linux_request_interrupt): Ditto.
6182 (linux_read_auxv): Ditto.
6183 (linux_xfer_siginfo): Ditto.
6184 (linux_qxfer_spu): Ditto.
6185 (linux_qxfer_libraries_svr4): Ditto.
6186 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6187 moved to inferiors.h.
6188 (get_lwp): Delete.
6189 (get_thread_lwp): Update.
6190 (struct lwp_info): Delete member "entry". Simplify comment for
6191 member "thread".
6192 (all_lwps): Delete.
6193 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6194 current_inferior directly.
6195 (update_watch_registers_callback): Update, "entry" parameter is a
6196 struct thread_info * now. Fetch pid from thread.
6197 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6198 (mips_insert_point): Fetch lwpid from current_inferior.
6199 Pass &all_threads to find_inferior, not &all_lwps.
6200 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6201 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6202 directly.
6203 (mips_stopped_data_address): Ditto.
6204 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6205 directly.
6206 * linux-tile-low.c (tile_arch_setup): Ditto.
6207 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6208 (update_debug_registers_callback): Update, "entry" parameter is a
6209 struct thread_info * now. Fetch pid from thread.
6210 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6211 Pass &all_threads to find_inferior, not &all_lwps.
6212 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6213 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6214 Pass &all_threads to find_inferior, not &all_lwps.
6215 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6216 (i386_dr_low_get_status): Ditto.
6217 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6218 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6219 (x86_linux_read_description): Ditto.
6220 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6221
3b8361aa
DE
62222014-02-20 Doug Evans <dje@google.com>
6223
6224 * inferiors.c (get_first_inferior): Fix buglet.
6225
f7667f0d
DE
62262014-02-19 Doug Evans <dje@google.com>
6227
6228 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6229 * inferiors.c (add_thread): Change result type to struct thread_info *.
6230 All callers updated.
6231 (add_lwp): Call add_thread here instead of in callers.
6232 All callers updated.
6233 * linux-low.h (get_lwp_thread): Rewrite.
6234 (struct lwp_info): New member "thread".
6235
b3312d80
DE
62362014-02-19 Doug Evans <dje@google.com>
6237
6238 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6239 All callers updated.
6240
ecc6f45c
DE
62412014-02-19 Doug Evans <dje@google.com>
6242
6243 * inferiors.c (add_thread): Fix whitespace.
6244
649ebbca
DE
62452014-02-19 Doug Evans <dje@google.com>
6246
6247 * dll.c (clear_dlls): Replace accessing list implemention details
6248 with API function.
6249 * gdbthread.h (get_first_thread): Declare.
6250 * inferiors.c (for_each_inferior_with_data): New function.
6251 (get_first_thread): New function.
6252 (find_thread_ptid): Simplify.
6253 (get_first_inferior): New function.
6254 (clear_list): Delete.
6255 (one_inferior_p): New function.
6256 (clear_inferior_list): New function.
6257 (clear_inferiors): Update.
6258 * inferiors.h (for_each_inferior_with_data): Declare.
6259 (clear_inferior_list): Declare.
6260 (one_inferior_p): Declare.
6261 (get_first_inferior): Declare.
6262 * linux-low.c (linux_wait_for_event): Replace accessing list
6263 implemention details with API function.
6264 * server.c (target_running): Ditto.
6265 (accumulate_file_name_length): New function.
6266 (emit_dll_description): New function.
6267 (handle_qxfer_libraries): Replace accessing list implemention
6268 details with API function.
6269 (handle_qxfer_threads_worker): New function.
6270 (handle_qxfer_threads_proper): Replace accessing list implemention
6271 details with API function.
6272 (handle_query): Ditto.
6273 (visit_actioned_threads_callback_ftype): New typedef.
6274 (visit_actioned_threads_data): New struct.
6275 (visit_actioned_threads): Rewrite to be find_inferior callback.
6276 (resume): Call find_inferior.
6277 (handle_status): Replace accessing list implemention
6278 details with API function.
6279 (process_serial_event): Replace accessing list implemention details
6280 with API function.
6281 * target.c (set_desired_inferior): Replace accessing list implemention
6282 details with API function.
6283 * tracepoint.c (same_process_p): New function.
6284 (gdb_agent_about_to_close): Replace accessing list implemention
6285 details with API function.
6286 * win32-low.c (child_delete_thread): Replace accessing list
6287 implemention details with API function.
6288 (match_dll_by_basename): New function.
6289 (dll_is_loaded_by_basename): New function.
6290 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6291 details call to dll_is_loaded_by_basename.
6292
80894984
DE
62932014-02-19 Doug Evans <dje@google.com>
6294
6295 * dll.h (struct dll_info): Add comment.
6296 * gdbthread.h (struct thread_info): Add comment.
6297 (current_ptid): Simplify.
6298 * inferiors.c (add_process): Update.
6299 (remove_process): Update.
6300 * inferiors.h (struct process_info): Rename member "head" to "entry".
6301 * linux-low.c (delete_lwp): Update.
6302 (add_lwp): Update.
6303 (last_thread_of_process_p): Update.
6304 (kill_one_lwp_callback, linux_kill): Update.
6305 (status_pending_p_callback): Update.
6306 (wait_for_sigstop): Update. Simplify read of ptid.
6307 (start_step_over): Update.
6308 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6309 (get_lwp_thread): Update.
6310 (struct lwp_info): Rename member "head" to "entry".
6311 * regcache.h (inferior_list_entry): Delete.
6312 * server.c (kill_inferior_callback): Update.
6313 (detach_or_kill_inferior_callback): Update.
6314 (print_started_pid): Update.
6315 (print_attached_pid): Update.
6316 (process_serial_event): Simplify read of ptid.
6317 * thread-db.c (thread_db_create_event): Update.
6318 (thread_db_get_tls_address): Update.
6319 * win32-low.c (current_inferior_ptid): Simplify.
6320
46917d26
TT
63212014-02-19 Tom Tromey <tromey@redhat.com>
6322
6323 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6324 argument.
6325 (target_supports_btrace): Update.
6326
0759a81e
YQ
63272014-02-14 Yao Qi <yao@codesourcery.com>
6328
6329 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6330 (rsp-low-ipa.o): New target.
6331
a7191e8b
TT
63322014-02-12 Tom Tromey <tromey@redhat.com>
6333
6334 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6335 convert_ascii_to_int.
6336 * regcache.c (registers_to_string): Likewise.
6337 * remote-utils.c (decode_M_packet): Likewise.
6338 * server.c (process_serial_event): Likewise.
6339
ff0e980e
TT
63402014-02-12 Tom Tromey <tromey@redhat.com>
6341
6342 * server.c (handle_query, handle_v_run): Use hex2bin, not
6343 unhexify.
6344 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6345
e9371aff
TT
63462014-02-12 Tom Tromey <tromey@redhat.com>
6347
6348 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6349 convert_int_to_ascii.
6350 * regcache.c (registers_to_string, collect_register_as_string):
6351 Likewise.
6352 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6353 Likewise.
6354 * server.c (process_serial_event): Likewise.
6355 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6356 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6357
971dc0b8
TT
63582014-02-12 Tom Tromey <tromey@redhat.com>
6359
6360 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6361 bin2hex, not hexify.
6362 * tracepoint.c (cmd_qtstatus): Likewise.
6363
0a822afb
TT
63642014-02-12 Tom Tromey <tromey@redhat.com>
6365
6366 * remote-utils.c (monitor_output): Pass explicit length to
6367 hexify.
6368
9c3d6531
TT
63692014-02-12 Tom Tromey <tromey@redhat.com>
6370
6371 * tracepoint.c: Include rsp-low.h.
6372 * server.c: Include rsp-low.h.
6373 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6374 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6375 declare.
6376 * remote-utils.c: Include rsp-low.h.
6377 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6378 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6379 (convert_int_to_ascii, convert_ascii_to_int): Move to
6380 common/rsp-low.c.
6381 * regcache.c: Include rsp-low.h.
6382 * ax.c: Include rsp-low.h.
6383 * Makefile.in (SFILES): Add common/rsp-low.c.
6384 (OBS): Add rsp-low.o.
6385 (rsp-low.o): New target.
6386
01fd3ea5
TT
63872014-02-12 Tom Tromey <tromey@redhat.com>
6388
6389 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6390 Include print-utils.h.
6391 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6392 (plongest, thirty_two, phex_nz): Remove.
6393 * Makefile.in (SFILES): Add common/print-utils.c.
6394 (OBS): Add print-utils.o.
6395 (print-utils-ipa.o): New target.
6396 (print-utils.o): New target.
6397 (IPA_OBJS): Add print-utils-ipa.o.
6398
e99dc820
TT
63992014-02-06 Tom Tromey <tromey@redhat.com>
6400
6401 * Makefile.in (SFILES): Fix indentation.
6402
ee1e2d4f
DE
64032014-02-05 Doug Evans <dje@google.com>
6404
6405 * linux-low.c (linux_wait_for_event): Improve comment.
6406 (linux_wait_1): Keep current_inferior in sync with event_child.
6407
f5a02773
DE
64082014-01-22 Doug Evans <dje@google.com>
6409
6410 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6411
87ce2a04
DE
64122014-01-22 Doug Evans <dje@google.com>
6413
6414 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6415 * configure: Regenerate.
6416 * config.in: Regenerate.
6417 * Makefile.in (SFILES): Add debug.c.
6418 (OBS): Add debug.o.
6419 * debug.c: New file.
6420 * debug.h: New file.
6421 * linux-aarch64-low.c (*): Update all debugging printfs to use
6422 debug_printf instead of fprintf.
6423 * linux-arm-low.c (*): Ditto.
6424 * linux-cris-low.c (*): Ditto.
6425 * linux-crisv32-low.c (*): Ditto.
6426 * linux-m32r-low.c (*): Ditto.
6427 * linux-sparc-low.c (*): Ditto.
6428 * linux-x86.c (*): Ditto.
6429 * linux-low.c (*): Ditto.
6430 (linux_wait_1): Add calls to debug_enter, debug_exit.
6431 (linux_wait): Remove redundant debugging printf.
6432 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6433 (linux_resume, unstop_all_lwps): Ditto.
6434 * mem-break.c (*): Update all debugging printfs to use
6435 debug_printf instead of fprintf.
6436 * remote-utils.c (*): Ditto.
6437 * thread-db.c (*): Ditto.
6438 * server.c #include <ctype.h>, "gdb_vecs.h".
6439 (debug_threads): Moved to debug.c.
6440 (*): Update all debugging printfs to use debug_printf instead of
6441 fprintf.
6442 (start_inferior): Replace call to fflush with call to debug_flush.
6443 (monitor_show_help): Mention set debug-format.
6444 (parse_debug_format_options): New function.
6445 (handle_monitor_command): Handle "monitor set debug-format".
6446 (gdbserver_usage): Mention --debug-format.
6447 (main): Parse --debug-format.
6448 * server.h (debug_threads): Declaration moved to debug.h.
6449 #include "debug.h".
6450 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6451 trace_debug_1 that uses debug_printf.
6452 (tracepoint_look_up_symbols): Update all debugging printfs to use
6453 debug_printf instead of fprintf.
6454
e671835b
BS
64552014-01-20 Baruch Siach <baruch@tkos.co.il>
6456
6457 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6458 sys/ptrace.h.
6459
b5737fa9
PA
64602014-01-17 Pedro Alves <palves@redhat.com>
6461
ea38d2a9 6462 PR build/16445
c7faa97a
PA
6463 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6464 defined after including gdb_proc_service.h.
b5737fa9 6465
40ed484e
DE
64662014-01-16 Doug Evans <dje@google.com>
6467
6468 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6469 (match_dll): Use it.
6470
969c39fb
MM
64712014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6472
6473 * target.h (target_ops) <read_btrace>: Change parameters and
6474 return type to allow error reporting.
6475 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6476 trace reading errors on.
6477 * linux-low.c (linux_low_read_btrace): Pass trace reading
6478 errors on.
6479 (linux_low_disable_btrace): New.
6480
ab7f45ba
DE
64812014-01-15 Doug Evans <dje@google.com>
6482
6483 * inferiors.c (thread_id_to_gdb_id): Delete.
6484 * inferiors.h (thread_id_to_gdb_id): Delete.
6485
66af0f44
EZ
64862014-01-13 Eli Zaretskii <eliz@gnu.org>
6487
6488 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6489 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6490 versions.
6491
9939e131
PA
64922014-01-08 Pedro Alves <palves@redhat.com>
6493
6494 * server.c (handle_status): Don't discard previous queued stop
6495 replies or thread's pending status here.
6496 (main) <disconnection>: Do it here instead.
6497
b7ea362b
PA
64982014-01-08 Pedro Alves <palves@redhat.com>
6499
6500 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6501 * server.c (visit_actioned_threads, handle_pending_status): New
6502 function.
6503 (handle_v_cont): Factor out parts to ...
6504 (resume): ... this new function. If in all-stop, and a thread
6505 being resumed has a pending status, report it without actually
6506 resuming.
6507 (myresume): Adjust to use the new 'resume' function.
6508 (clear_pending_status_callback, set_pending_status_callback)
6509 (find_status_pending_thread_callback): New functions.
6510 (handle_status): Handle the case of multiple threads having
6511 interesting statuses to report. Report threads' real last signal
6512 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6513 with an interesting thread to report the status for, instead of
6514 always reporting the status of the first thread.
6515
28498c42
JB
65162014-01-01 Joel Brobecker <brobecker@adacore.com>
6517
6518 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6519 * gdbreplay.c (gdbreplay_version): Likewise.
6520
f45c82da
YZ
65212013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6522
6523 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6524 iov.iov_len with the real length in use.
6525
379a5e2d
JB
65262013-12-13 Joel Brobecker <brobecker@adacore.com>
6527
6528 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6529 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6530 for all targets that use win32-low.c.
6531 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6532 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6533
4210d83e
PA
65342013-12-13 Pedro Alves <palves@redhat.com>
6535
6536 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6537 if equal to TARGET_WAITKIND_LOADED.
6538 * win32-low.c (cached_status): New static global.
6539 (win32_wait): Add declaration.
6540 (do_initial_child_stuff): Flush all initial pending debug events
6541 up to the initial breakpoint.
6542 (win32_wait): If CACHED_STATUS was set, return that instead
6543 of doing a real wait. Remove the code resuming the execution
6544 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6545 during the initial phase. Also remove the code changing
6546 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6547 TARGET_WAITKIND_STOPPED.
6548
e7f0d979
YQ
65492013-12-11 Yao Qi <yao@codesourcery.com>
6550
6551 * notif.c (handle_notif_ack): Return 0 if no notification
6552 matches.
6553
ebcf782c
DE
65542013-11-20 Doug Evans <dje@google.com>
6555
6556 * linux-low.c (linux_set_resume_request): Fix comment.
6557
20ad9378
DE
65582013-11-20 Doug Evans <dje@google.com>
6559
6560 * linux-low.c (resume_status_pending_p): Tweak comment.
6561
a196ebeb
WT
65622013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6563
6564 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6565 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6566 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6567 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6568 (srv_amd64_regobj): Add amd64-mpx.o.
6569 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6570 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6571 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6572 * i387-fp.c (num_pl_bnd_register) Added constant.
6573 (num_pl_bnd_cfg_registers) Added constant.
6574 (struct i387_xsave) Added reserved area and MPX fields.
6575 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6576 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6577 function.
6578 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6579 (init_registers_amd64_mpx_linux): Declare new function.
6580 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6581 (x86_64_regmap): Add MPX registers.
6582 (x86_linux_read_description): Add MPX case.
6583 (initialize_low_arch): Initialize MPX targets.
6584
0080a2f6
TT
65852013-11-18 Tom Tromey <tromey@redhat.com>
6586
6587 * configure: Rebuild.
6588 * configure.ac: Don't check for stdlib.h.
6589 * gdbreplay.c: Unconditionally include stdlib.h.
6590
2978b111
TT
65912013-11-18 Tom Tromey <tromey@redhat.com>
6592
6593 * config.in: Rebuild.
6594 * configure: Rebuild.
6595 * configure.ac: Don't use AC_HEADER_DIRENT.
6596
a3d08894
TT
65972013-11-18 Tom Tromey <tromey@redhat.com>
6598
6599 * server.h: Don't check HAVE_STRING_H.
6600 * gdbreplay.c: Don't check HAVE_STRING_H.
6601 * configure: Rebuild.
6602
0a5dd17d
TT
66032013-11-18 Tom Tromey <tromey@redhat.com>
6604
6605 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6606 LIBGNU.
6607
1bd2f0ba
TT
66082013-11-08 Tom Tromey <tromey@redhat.com>
6609
6610 * configure, config.in: Rebuild.
6611 * configure.ac: Remove unused configury.
6612
3266f10b
TT
66132013-11-08 Tom Tromey <tromey@redhat.com>
6614
6615 * acinclude.m4: Include common.m4, codeset.m4.
6616 * configure, config.in: Rebuild.
6617 * configure.ac: Use GDB_AC_COMMON.
6618
6682d959
AA
66192013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6620
6621 * linux-s390-low.c (HWCAP_S390_TE): New define.
6622 (s390_arch_setup): Consider the TE field in the HWCAP for
6623 determining 'have_regset_tdb'.
6624
fd0a4d76
SDJ
66252013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6626
6627 PR gdb/16014
6628 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6629 call to sizeof.
6630
1a3d890b
PA
66312013-10-02 Pedro Alves <palves@redhat.com>
6632
6633 * server.c (process_serial_event): Don't output "GDBserver
6634 exiting" if GDB is connected through stdio.
6635 * target.c (mywait): Likewise, be silent if GDB is connected
6636 through stdio.
6637
97ad4581
JB
66382013-10-01 Joel Brobecker <brobecker@adacore.com>
6639
6640 * lynx-low.c (lynx_add_threads_after_attach): New function.
6641 (lynx_attach): Remove call to add_thread. Add call to
6642 lynx_add_threads_after_attach instead.
6643
5b4e221c
MF
66442013-09-28 Mike Frysinger <vapier@gentoo.org>
6645
6646 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6647 * config.in, configure: Regenerated.
6648
ee47b2f8
YQ
66492013-09-18 Yao Qi <yao@codesourcery.com>
6650
6651 PR server/15959
6652 * server.c (start_inferior): Clear 'resume_info'.
6653
d6707650 66542013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6655
d6707650
JW
6656 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6657 for each register.
6658
9243dd0e 66592013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6660
9243dd0e
JW
6661 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6662 linux-tile-low.o to srv_tgtobj.
6663
c623a6ef
WN
66642013-09-16 Will Newton <will.newton@linaro.org>
6665
6666 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6667 out regs.
6668
fb71d39e
PA
66692013-09-06 Pedro Alves <palves@redhat.com>
6670
6671 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6672 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6673 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6674 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6675 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6676 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6677
8e7e9910
PA
66782013-09-06 Pedro Alves <palves@redhat.com>
6679
6680 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6681 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6682
7c3a12ca
PA
66832013-09-06 Pedro Alves <palves@redhat.com>
6684
6685 * linux-amd64-ipa.c: Include tracepoint.h.
6686 * linux-i386-ipa.c: Include tracepoint.h.
6687
8eb3d7b6
RW
66882013-09-06 Ricard Wanderlof <ricardw@axis.com>
6689
6690 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6691 (ps_get_thread_area): New function.
6692
eddddb9d
RW
66932013-09-06 Ricard Wanderlof <ricardw@axis.com>
6694
6695 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6696 (initialize_low_arch): Call init_registers_crisv32 rather than
6697 init_register_crisv32.
6698
533b0600
PA
66992013-09-05 Pedro Alves <palves@redhat.com>
6700
6701 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6702 to ...
6703 * hostio.h: ... this new file.
6704 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6705 win32-low.c: Include hostio.h.
6706
0ce3d3b5
PA
67072013-09-05 Pedro Alves <palves@redhat.com>
6708
6709 * server.h (gdb_client_data, handler_func, callback_handler_func)
6710 (delete_file_handler, add_file_handler, append_callback_event)
6711 (delete_callback_event, start_event_loop, initialize_event_loop):
6712 Move to event-loop.h and include it.
6713 * event-loop.h: New file.
6714
799cdc37
PA
67152013-09-05 Pedro Alves <palves@redhat.com>
6716
6717 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6718 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6719 (loaded_dll, unloaded_dll): Move to ...
6720 * dll.h: ... this new file.
6721 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6722
6a6bbd9d
PA
67232013-09-05 Pedro Alves <palves@redhat.com>
6724
6725 * server.h (current_process, get_thread_process, all_processes)
6726 (add_inferior_to_list, for_each_inferior, current_inferior)
6727 (remove_inferior, add_process, remove_process, find_process_pid)
6728 (have_started_inferiors_p, have_attached_inferiors_p)
6729 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6730 (clear_inferiors, find_inferior, find_inferior_id)
6731 (inferior_target_data, set_inferior_target_data)
6732 (inferior_regcache_data, set_inferior_regcache_data): Move to
6733 inferiors.h, and include it.
6734 * inferiors.h: New file.
6735
f699aaba
PA
67362013-09-05 Pedro Alves <palves@redhat.com>
6737
6738 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6739 Move ...
72f4393d 6740 * ax.h: ... here.
f699aaba 6741
c144c7a0
PA
67422013-09-05 Pedro Alves <palves@redhat.com>
6743
6744 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6745 tracepoint.h.
6746 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6747 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6748 (handle_tracepoint_general_set, handle_tracepoint_query)
6749 (tracepoint_finished_step, tracepoint_was_hit)
6750 (release_while_stepping_state_list, current_traceframe)
6751 (in_readonly_region, traceframe_read_mem)
6752 (fetch_traceframe_registers, traceframe_read_sdata)
6753 (traceframe_read_info, struct fast_tpoint_collect_status)
6754 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6755 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6756 (supply_fast_tracepoint_registers)
6757 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6758 (ipa_tdesc, claim_trampoline_space)
6759 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6760 (agent_mem_read, agent_get_trace_state_variable_value)
6761 (agent_set_trace_state_variable_value, agent_tsv_read)
6762 (agent_mem_read_string, get_raw_reg_func_addr)
6763 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6764 * tracepoint.h: ... this new file.
6765
ff42e6ab
PA
67662013-09-05 Pedro Alves <palves@redhat.com>
6767
6768 * server.h (perror_with_name, error, fatal, warning, paddress)
6769 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6770 include it.
6771 * utils.h: New file.
6772
541af0f4
PA
67732013-09-05 Pedro Alves <palves@redhat.com>
6774
6775 * server.h (remote_debug, noack_mode, transport_is_reliable)
6776 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6777 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6778 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6779 (write_enn, initialize_async_io, enable_async_io)
6780 (disable_async_io, check_remote_input_interrupt_request)
6781 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6782 (dead_thread_notify, prepare_resume_reply)
6783 (decode_address_to_semicolon, decode_address, decode_m_packet)
6784 (decode_M_packet, decode_X_packet, decode_xfer_write)
6785 (decode_search_memory_packet, unhexify, hexify)
6786 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6787 (look_up_one_symbol, relocate_instruction)
6788 (monitor_output): Move to remote-utils.h, and include it.
6789 * remote-utils.h: New file.
6790
eebdf26b
PA
67912013-09-05 Pedro Alves <palves@redhat.com>
6792
6793 * server.h (_): Delete.
6794
3aafd2ff
PA
67952013-09-02 Pedro Alves <palves@redhat.com>
6796
6797 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6798 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6799 allocated.
6800 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6801
cee83bcb
PM
68022013-09-02 Pierre Muller <muller@sourceware.org>
6803
6804 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6805 or WriteProcessMemory complete successfully and handle
6806 ERROR_PARTIAL_COPY error.
6807
9a13b2fa
PA
68082013-09-02 Pedro Alves <palves@redhat.com>
6809
6810 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6811 error instead of EIO.
6812
602e3198
JK
68132013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6814
6815 PR server/15604
6816 * linux-low.c: Include filestuff.h.
6817 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6818 * lynx-low.c: Include filestuff.h.
6819 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6820 * server.c: Include filestuff.h.
6821 (main): Call notice_open_fds.
6822 * spu-low.c: Include filestuff.h.
6823 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6824
96d7229d
LM
68252013-08-22 Luis Machado <lgustavo@codesourcery.com>
6826
6827 * Makefile.in: Explain why ../target and ../nat are not
6828 listed as include file search paths.
6829 (linux-waitpid.o): New object file rule.
6830 * configure.srv (srv_native_linux_obj): New variable.
6831 Replace all occurrences of linux native object files with
6832 $srv_native_linux_obj.
6833 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6834 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6835 (linux_enable_event_reporting): Remove declaration.
6836 (my_waitpid): Moved to common/linux-waitpid.c.
6837 (linux_wait_for_event): Pass ptid when calling
6838 linux_enable_event_reporting.
6839 (linux_supports_tracefork_flag): Remove.
6840 (linux_enable_event_reporting): Likewise.
6841 (linux_tracefork_grandchild): Remove.
6842 (STACK_SIZE): Moved to common/linux-ptrace.c.
6843 (linux_tracefork_child): Remove.
6844 (linux_test_for_tracefork): Remove.
6845 (linux_look_up_symbols): Call linux_supports_traceclone.
6846 (initialize_low): Remove call to linux_test_for_tracefork.
6847 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6848 common/linux-ptrace.h.
6849 (PTRACE_TYPE_ARG4): Likewise.
6850 Include linux-ptrace.h.
6851
32940073
PA
68522013-08-21 Pedro Alves <palves@redhat.com>
6853
6854 * config.in: Renegerate.
6855
33b60d58 68562013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6857
33b60d58
LM
6858 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6859 (SFILES): Remove $(srcdir)/common/target-common.c and
6860 add $(srcdir)/target/waitstatus.c.
6861 (OBS): Remove target-common.o and add waitstatus.o.
6862 (server_h): Remove $(srcdir)/../common/target-common.h and
6863 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6864 and $(srcdir)/../target/waitstatus.h.
6865 (target-common.o): Remove.
6866 (waitstatus.o): New target object file.
6867 * target.h: Do not include target-common.h and
6868 include target/resume.h, target/wait.h and
6869 target/waitstatus.h.
6870
b8e1b30e
LM
68712013-08-13 Luis Machado <lgustavo@codesourcery.com>
6872
6873 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6874 to PTRACE_TYPE_ARG3.
6875 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6876 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6877 PTRACE_TYPE_ARG4.
6878 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6879 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6880
7a60ad40
YQ
68812013-07-27 Jie Zhang <jie@codesourcery.com>
6882 Daniel Jacobowitz <dan@codesourcery.com>
6883 Yao Qi <yao@codesourcery.com>
6884
6885 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6886 (mips-linux-watch.o): New rule.
6887 (mips_linux_watch_h): New variable.
6888 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6889 srv_tgtobj.
6890 * linux-mips-low.c: Include mips-linux-watch.h.
6891 (struct arch_process_info, struct arch_lwp_info): New.
6892 (update_watch_registers_callback): New function.
6893 (mips_linux_new_process, mips_linux_new_thread) New functions.
6894 (mips_linux_prepare_to_resume, mips_insert_point): New
6895 functions.
6896 (mips_remove_point, mips_stopped_by_watchpoint): New
6897 functions.
6898 (rsp_bp_type_to_target_hw_bp_type): New function.
6899 (mips_stopped_data_address): New function.
6900 (the_low_target): Add watchpoint support functions.
6901
de6f69ad
YQ
69022013-07-27 Yao Qi <yao@codesourcery.com>
6903
6904 * i386-low.c: Include break-common.h.
6905 (enum target_hw_bp_type): Remove.
6906
3360c0bf
LM
69072013-07-24 Luis Machado <lgustavo@codesourcery.com>
6908
6909 * Makefile.in (SFILES): /common/target-common.c.
6910 (OBS): Add target-common.o.
6911 (server_h): Add $(srcdir)/../common/target-common.h.
6912 (target-common.o): New target.
6913 * server.c (queue_stop_reply_callback): Free
6914 status string after use.
6915 * target.c (target_waitstatus_to_string): Remove.
6916 * target.h: Include target-common.h.
6917 (resume_kind): Likewise.
6918 (target_waitkind): Likewise.
6919 (target_waitstatus): Likewise.
6920 (TARGET_WNOHANG): Likewise.
6921
bd885420
YQ
69222013-07-04 Yao Qi <yao@codesourcery.com>
6923
6924 * Makefile.in (host_alias): Use @host_noncanonical@.
6925 (target_alias): Use @target_noncanonical@.
6926 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6927 ACX_NONCANONICAL_HOST.
6928 * configure: Regenerated.
6929
6930 Revert:
6931 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6932
6933 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6934 * configure: Rebuild.
6935 * Makefile.in (version_host, version_target): Get from configure.
6936 (version.c): Use $(version_host) and $(version_target).
6937
17ef446e
PA
69382013-07-03 Pedro Alves <palves@redhat.com>
6939
6940 * Makefile.in (config.status): Depend on development.sh.
6941 * acinclude.m4: Include libmcheck.m4.
6942 * configure: Regenerate.
6943
7a9a7487
MG
69442013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6945
6946 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6947 attribute inside the parentheses.
6948 (winapi_DebugSetProcessKillOnExit): Ditto.
6949 (winapi_DebugBreakProcess): Ditto.
6950 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6951
49b64de6
MG
69522013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6953
6954 * notif.h (notif_event): Add a dummy member to avoid compiler
6955 errors.
6956
d5749ee7
PA
69572013-07-01 Pedro Alves <palves@redhat.com>
6958
6959 * hostio.c (HOSTIO_PATH_MAX): Define.
6960 (require_filename, handle_open, handle_unlink, handle_readlink):
6961 Use it.
6962
d8d2a3ee
PA
69632013-07-01 Pedro Alves <palves@redhat.com>
6964
6965 * server.h: Include "pathmax.h".
6966 * linux-low.c: Don't include sys/param.h.
6967 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6968 MAXPATHLEN.
6969 * win32-low.c: Don't include sys/param.h.
6970 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6971
bc7dea8d
PA
69722013-07-01 Pedro Alves <palves@redhat.com>
6973
6974 * event-loop.c: Don't check HAVE_UNISTD_H before including
6975 <unistd.h>.
6976 * gdbreplay.c: Likewise.
6977 * remote-utils.c: Likewise.
6978 * server.c: Likewise.
6979 * configure.ac: Don't check for unistd.h.
6980 * configure: Regenerate.
6981
d6c2da54
TT
69822013-06-28 Tom Tromey <tromey@redhat.com>
6983
6984 * Makefile.in (version.c): Use version.in, not
6985 common/version.in.
6986
257b6bec
MG
69872013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6988
6989 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6990 * configure: Rebuild.
6991 * Makefile.in (version_host, version_target): Get from configure.
6992 (version.c): Use $(version_host) and $(version_target).
6993
86ebe149
DK
69942013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6995
6996 Fix trace-status to output user name without trailing colon.
6997 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6998
f30aa5af
DK
69992013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7000
7001 Fix trace-status to output proper start-time and stop-time.
7002 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7003 output start time and stop time in hex as gdb expects.
7004
28a93511
YQ
70052013-06-26 Pedro Alves <pedro@codesourcery.com>
7006
7007 * tracepoint.c (build_traceframe_info_xml): Output trace state
7008 variables present in the trace buffer.
7009
01208463
TT
70102013-06-24 Tom Tromey <tromey@redhat.com>
7011
7012 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7013 create-version.sh.
7014 (version.o): Remove.
7015 * gdbreplay.c: Include version.h.
7016 (version, host_name): Don't declare.
7017 * server.h: Include version.h.
7018 (version, host_name): Don't declare.
7019
760256f9
PA
70202013-06-12 Pedro Alves <palves@redhat.com>
7021
7022 * linux-x86-low.c (linux_is_elf64): Delete global.
7023 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7024 with local linux_pid_exe_is_elf_64_file use.
7025
030031ee
PA
70262013-06-11 Pedro Alves <palves@redhat.com>
7027
7028 * linux-low.c (regset_disabled, disable_regset): New functions.
7029 (regsets_fetch_inferior_registers)
7030 (regsets_store_inferior_registers): Use them.
7031 (initialize_regsets_info); Don't allocate the disabled_regsets
7032 array here.
7033 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7034 comment.
7035
5da6eb0a
PA
70362013-06-11 Pedro Alves <palves@redhat.com>
7037
7038 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7039 xmalloc.
7040
7e5aaa09
PA
70412013-06-11 Pedro Alves <palves@redhat.com>
7042
7043 * linux-x86-low.c (initialize_low_arch): Call
7044 init_registers_x32_avx_linux.
7045
d878444c
JK
70462013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7047
7048 Fix compatibility with Android Bionic.
7049 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7050 it is not empty.
7051
3aee8918
PA
70522013-06-07 Pedro Alves <palves@redhat.com>
7053
5f2b57b5 7054 PR server/14823
3aee8918
PA
7055 * Makefile.in (OBS): Add tdesc.o.
7056 (IPA_OBJS): Add tdesc-ipa.o.
7057 (tdesc-ipa.o): New rule.
7058 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7059 interface.
7060 * linux-low.c (new_inferior): Delete.
7061 (disabled_regsets, num_regsets): Delete.
7062 (linux_add_process): Adjust to set the new per-process
7063 new_inferior flag.
7064 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7065 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7066 was a stop. When calling arch_setup, switch the current inferior
7067 to the thread that got an event.
7068 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7069 (regsets_fetch_inferior_registers)
7070 (regsets_store_inferior_registers): New regsets_info parameter.
7071 Adjust to use it.
7072 (linux_register_in_regsets): New regs_info parameter. Adjust to
7073 use it.
7074 (register_addr, fetch_register, store_register): New usrregs_info
7075 parameter. Adjust to use it.
7076 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7077 parameter regs_info. Adjust to use it.
7078 (linux_fetch_registers): Get the current inferior's regs_info, and
7079 adjust to use it.
7080 (linux_store_registers): Ditto.
7081 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7082 (initialize_low): Don't initialize the target_regsets here. Call
7083 initialize_low_arch.
7084 * linux-low.h (target_regsets): Delete declaration.
7085 (struct regsets_info): New.
7086 (struct usrregs_info): New.
7087 (struct regs_info): New.
7088 (struct process_info_private) <new_inferior>: New field.
7089 (struct linux_target_ops): Delete the num_regs, regmap, and
7090 regset_bitmap fields. New field regs_info.
7091 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7092 * i387-fp.c (num_xmm_registers): Delete.
7093 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7094 calls to new interface.
7095 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7096 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7097 Infer the number of xmm registers from the regcache's target
7098 description.
7099 * i387-fp.h (num_xmm_registers): Delete.
7100 * inferiors.c (add_thread): Don't install the thread's regcache
7101 here.
7102 * proc-service.c (gregset_info): Fetch the current inferior's
7103 regs_info. Adjust to use it.
7104 * regcache.c: Include tdesc.h.
7105 (register_bytes, reg_defs, num_registers)
7106 (gdbserver_expedite_regs): Delete.
7107 (get_thread_regcache): If the thread doesn't have a regcache yet,
7108 create one, instead of aborting gdbserver.
7109 (regcache_invalidate_one): Rename to ...
7110 (regcache_invalidate_thread): ... this.
7111 (regcache_invalidate_one): New.
7112 (regcache_invalidate): Only invalidate registers of the current
7113 process.
7114 (init_register_cache): Add target_desc parameter, and use it.
7115 (new_register_cache): Ditto. Assert the target description has a
7116 non zero registers_size.
7117 (regcache_cpy): Add assertions. Adjust.
7118 (realloc_register_cache, set_register_cache): Delete.
7119 (registers_to_string, registers_from_string): Adjust.
7120 (find_register_by_name, find_regno, find_register_by_number)
7121 (register_cache_size): Add target_desc parameter, and use it.
7122 (free_register_cache_thread, free_register_cache_thread_one)
7123 (regcache_release, register_cache_size): New.
7124 (register_size): Add target_desc parameter, and use it.
7125 (register_data, supply_register, supply_register_zeroed)
7126 (supply_regblock, supply_register_by_name, collect_register)
7127 (collect_register_as_string, collect_register_by_name): Adjust.
7128 * regcache.h (struct target_desc): Forward declare.
7129 (struct regcache) <tdesc>: New field.
7130 (init_register_cache, new_register_cache): Add target_desc
7131 parameter.
7132 (regcache_invalidate_thread): Declare.
7133 (regcache_invalidate_one): Delete declaration.
7134 (regcache_release): Declare.
7135 (find_register_by_number, register_cache_size, register_size)
7136 (find_regno): Add target_desc parameter.
7137 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7138 declarations.
7139 * remote-utils.c: Include tdesc.h.
7140 (outreg, prepare_resume_reply): Adjust.
7141 * server.c: Include tdesc.h.
7142 (gdbserver_xmltarget): Delete declaration.
7143 (get_features_xml, process_serial_event): Adjust.
7144 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7145 declare.
7146 (struct process_info) <tdesc>: New field.
7147 (ipa_tdesc): Declare.
7148 * tdesc.c: New file.
7149 * tdesc.h: New file.
7150 * tracepoint.c: Include tdesc.h.
7151 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7152 (get_context_regcache): Adjust to pass ipa_tdesc down.
7153 (do_action_at_tracepoint): Adjust to get the register cache size
7154 from the context regcache's description.
7155 (traceframe_walk_blocks): Adjust to get the register cache size
7156 from the current trace frame's description.
7157 (traceframe_get_pc): Adjust to get current trace frame's
7158 description and pass it down.
7159 (gdb_collect): Adjust to get the register cache size from the
7160 IPA's description.
7161 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7162 (gdbserver_xmltarget): Delete.
7163 (initialize_low_tracepoint): Set the ipa's target description.
7164 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7165 (initialize_low_tracepoint): Set the ipa's target description.
7166 * linux-x86-low.c: Include tdesc.h.
7167 [__x86_64__] (is_64bit_tdesc): New.
7168 (ps_get_thread_area, x86_get_thread_area): Use it.
7169 (i386_cannot_store_register): Rename to ...
7170 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7171 (i386_cannot_fetch_register): Rename to ...
7172 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7173 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7174 to new interface.
7175 (target_regsets): Rename to ...
7176 (x86_regsets): ... this.
7177 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7178 interface.
7179 (x86_siginfo_fixup): Use is_64bit_tdesc.
7180 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7181 (tdesc_x32_avx_linux, tdesc_x32_linux)
7182 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7183 Declare.
7184 (x86_linux_update_xmltarget): Delete.
7185 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7186 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7187 (AMD64_LINUX_USER64_CS): New.
7188 (x86_linux_read_description): New, based on
7189 x86_linux_update_xmltarget.
7190 (same_process_callback): New.
7191 (x86_arch_setup_process_callback): New.
7192 (x86_linux_update_xmltarget): New.
7193 (x86_regsets_info): New.
7194 (amd64_linux_regs_info): New.
7195 (i386_linux_usrregs_info): New.
7196 (i386_linux_regs_info): New.
7197 (x86_linux_regs_info): New.
7198 (x86_arch_setup): Reimplement.
7199 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7200 (x86_emit_ops): Ditto.
7201 (the_low_target): Adjust. Install x86_linux_regs_info,
7202 x86_cannot_fetch_register, and x86_cannot_store_register.
7203 (initialize_low_arch): New.
7204 * linux-ia64-low.c (tdesc_ia64): Declare.
7205 (ia64_fetch_register): Adjust.
7206 (ia64_usrregs_info, regs_info): New globals.
7207 (ia64_regs_info): New function.
7208 (the_low_target): Adjust.
7209 (initialize_low_arch): New function.
7210 * linux-sparc-low.c (tdesc_sparc64): Declare.
7211 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7212 Adjust.
7213 (sparc_arch_setup): New function.
7214 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7215 (the_low_target): Adjust.
7216 (initialize_low_arch): New function.
7217 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7218 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7219 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7220 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7221 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7222 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7223 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7224 (tdesc_powerpc_isa205_vsx64l): Declare.
7225 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7226 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7227 (ppc_set_pc, ppc_get_hwcap): Adjust.
7228 (ppc_usrregs_info): Forward declare.
7229 (!__powerpc64__) ppc_regmap_adjusted: New global.
7230 (ppc_arch_setup): Adjust to the current process'es target
7231 description.
7232 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7233 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7234 (ppc_store_evrregset): Adjust.
7235 (target_regsets): Rename to ...
7236 (ppc_regsets): ... this, and make static.
7237 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7238 (ppc_regs_info): New function.
7239 (the_low_target): Adjust.
7240 (initialize_low_arch): New function.
7241 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7242 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7243 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7244 (tdesc_s390x_linux64v2): Declare.
7245 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7246 (s390_fill_gregset, s390_store_last_break): Adjust.
7247 (target_regsets): Rename to ...
7248 (s390_regsets): ... this, and make static.
7249 (s390_get_pc, s390_set_pc): Adjust.
7250 (s390_get_hwcap): New target_desc parameter, and use it.
7251 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7252 (s390_arch_setup): Adjust to set the current process'es target
7253 description. Don't adjust the regmap.
7254 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7255 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7256 (regs_info_3264): New globals.
7257 (s390_regs_info): New function.
7258 (the_low_target): Adjust.
7259 (initialize_low_arch): New function.
7260 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7261 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7262 [__mips64] (init_registers_mips_linux)
7263 (init_registers_mips_dsp_linux): Delete defines.
7264 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7265 (have_dsp): New global.
7266 (mips_read_description): New, based on mips_arch_setup.
7267 (mips_arch_setup): Reimplement.
7268 (get_usrregs_info): New function.
7269 (mips_cannot_fetch_register, mips_cannot_store_register)
7270 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7271 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7272 (target_regsets): Rename to ...
7273 (mips_regsets): ... this, and make static.
7274 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7275 (dsp_regs_info, regs_info): New globals.
7276 (mips_regs_info): New function.
7277 (the_low_target): Adjust.
7278 (initialize_low_arch): New function.
7279 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7280 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7281 Declare.
7282 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7283 (arm_read_description): New, with bits factored from
7284 arm_arch_setup.
7285 (arm_arch_setup): Reimplement.
7286 (target_regsets): Rename to ...
7287 (arm_regsets): ... this, and make static.
7288 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7289 (arm_regs_info): New function.
7290 (the_low_target): Adjust.
7291 (initialize_low_arch): New function.
7292 * linux-m68k-low.c (tdesc_m68k): Declare.
7293 (target_regsets): Rename to ...
7294 (m68k_regsets): ... this, and make static.
7295 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7296 (m68k_regs_info): New function.
7297 (m68k_arch_setup): New function.
7298 (the_low_target): Adjust.
7299 (initialize_low_arch): New function.
7300 * linux-sh-low.c (tdesc_sharch): Declare.
7301 (target_regsets): Rename to ...
7302 (sh_regsets): ... this, and make static.
7303 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7304 (sh_regs_info, sh_arch_setup): New functions.
7305 (the_low_target): Adjust.
7306 (initialize_low_arch): New function.
7307 * linux-bfin-low.c (tdesc_bfin): Declare.
7308 (bfin_arch_setup): New function.
7309 (bfin_usrregs_info, regs_info): New globals.
7310 (bfin_regs_info): New function.
7311 (the_low_target): Adjust.
7312 (initialize_low_arch): New function.
7313 * linux-cris-low.c (tdesc_cris): Declare.
7314 (cris_arch_setup): New function.
7315 (cris_usrregs_info, regs_info): New globals.
7316 (cris_regs_info): New function.
7317 (the_low_target): Adjust.
7318 (initialize_low_arch): New function.
7319 * linux-cris-low.c (tdesc_crisv32): Declare.
7320 (cris_arch_setup): New function.
7321 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7322 (cris_regs_info): New function.
7323 (the_low_target): Adjust.
7324 (initialize_low_arch): New function.
7325 * linux-m32r-low.c (tdesc_m32r): Declare.
7326 (m32r_arch_setup): New function.
7327 (m32r_usrregs_info, regs_info): New globals.
7328 (m32r_regs_info): Adjust.
7329 (initialize_low_arch): New function.
7330 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7331 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7332 (tic6x_usrregs_info): Forward declare.
7333 (tic6x_read_description): New function, based on ...
7334 (tic6x_arch_setup): ... this. Reimplement.
7335 (target_regsets): Rename to ...
7336 (tic6x_regsets): ... this, and make static.
7337 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7338 (tic6x_regs_info): New function.
7339 (the_low_target): Adjust.
7340 (initialize_low_arch): New function.
7341 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7342 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7343 (target_regsets): Rename to ...
7344 (xtensa_regsets): ... this, and make static.
7345 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7346 globals.
7347 (xtensa_arch_setup, xtensa_regs_info): New functions.
7348 (the_low_target): Adjust.
7349 (initialize_low_arch): New function.
7350 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7351 (nios2_arch_setup): Set the current process'es tdesc.
7352 (target_regsets): Rename to ...
7353 (nios2_regsets): ... this.
7354 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7355 (nios2_regs_info): New function.
7356 (the_low_target): Adjust.
7357 (initialize_low_arch): New function.
a261b8f5
PA
7358 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7359 (aarch64_arch_setup): Set the current process'es tdesc.
7360 (target_regsets): Rename to ...
7361 (aarch64_regsets): ... this.
7362 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7363 (aarch64_regs_info): New function.
7364 (the_low_target): Adjust.
7365 (initialize_low_arch): New function.
3aee8918
PA
7366 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7367 globals.
7368 (target_regsets): Rename to ...
7369 (tile_regsets): ... this.
7370 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7371 (tile_regs_info): New function.
7372 (tile_arch_setup): Set the current process'es tdesc.
7373 (the_low_target): Adjust.
7374 (initialize_low_arch): New function.
7375 * spu-low.c (tdesc_spu): Declare.
7376 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7377 * win32-arm-low.c (tdesc_arm): Declare.
7378 (arm_arch_setup): New function.
7379 (the_low_target): Install arm_arch_setup instead of
7380 init_registers_arm.
7381 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7382 (init_windows_x86): Rename to ...
7383 (i386_arch_setup): ... this. Set `win32_tdesc'.
7384 (the_low_target): Adjust.
7385 * win32-low.c (win32_tdesc): New global.
7386 (child_add_thread): Don't create the thread cache here.
7387 (do_initial_child_stuff): Set the new process'es tdesc.
7388 * win32-low.h (struct target_desc): Forward declare.
7389 (win32_tdesc): Declare.
7390 * lynx-i386-low.c (tdesc_i386): Declare global.
7391 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7392 * lynx-low.c (lynx_tdesc): New global.
7393 (lynx_add_process): Set the new process'es tdesc.
7394 * lynx-low.h (struct target_desc): Forward declare.
7395 (lynx_tdesc): Declare global.
7396 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7397 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7398 * nto-low.c (nto_tdesc): New global.
7399 (do_attach): Set the new process'es tdesc.
7400 * nto-low.h (struct target_desc): Forward declare.
7401 (nto_tdesc): Declare.
7402 * nto-x86-low.c (tdesc_i386): Declare.
7403 (nto_x86_arch_setup): Set `nto_tdesc'.
7404
b1fbec62
GB
74052013-06-04 Gary Benson <gbenson@redhat.com>
7406
7407 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7408 to qSupported response when appropriate.
7409 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7410 with nonzero-length annex.
7411 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7412 arguments supplied in annex.
7413
d1ec4ce7
DE
74142013-05-31 Doug Evans <dje@google.com>
7415
ac44adcb 7416 PR server/15594
d1ec4ce7
DE
7417 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7418 64 bits in 64-cross-32 environment.
7419
9b25f2d3
PA
74202013-05-28 Pedro Alves <palves@redhat.com>
7421
7422 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7423 (aarch64-without-fpu.c): Delete rule.
7424 * configure.srv (aarch64*-*-linux*): Remove references to
7425 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7426 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7427 declaration.
7428
6740dc9c
PA
74292013-05-24 Pedro Alves <palves@redhat.com>
7430
7431 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7432 instead of strchr/decode_address. Error if the range isn't split
7433 with a ','. Don't assume there's be a ':' in the action.
7434
c2d6af84
PA
74352013-05-23 Yao Qi <yao@codesourcery.com>
7436 Pedro Alves <palves@redhat.com>
7437
7438 * linux-low.c (lwp_in_step_range): New function.
7439 (linux_wait_1): If the thread was range stepping and stopped
7440 outside the stepping range, report the stop to GDB. Otherwise,
7441 continue stepping. Add range stepping debug output.
7442 (linux_set_resume_request): Copy the step range from the resume
7443 request to the lwp.
7444 (linux_supports_range_stepping): New.
7445 (linux_target_ops) <supports_range_stepping>: Set to
7446 linux_supports_range_stepping.
7447 * linux-low.h (struct linux_target_ops)
7448 <supports_range_stepping>: New field.
7449 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7450 * linux-x86-low.c (x86_supports_range_stepping): New.
7451 (the_low_target) <supports_range_stepping>: Set to
7452 x86_supports_range_stepping.
7453 * server.c (handle_v_cont): Handle 'r' action.
7454 (handle_v_requests): Append ";r" if the target supports range
7455 stepping.
7456 * target.h (struct thread_resume) <step_range_start,
7457 step_range_end>: New fields.
7458 (struct target_ops) <supports_range_stepping>:
7459 New field.
7460 (target_supports_range_stepping): New macro.
7461
58794e1a
JB
74622013-05-17 Joel Brobecker <brobecker@adacore.com>
7463
7464 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7465 confusion in comment.
7466
d631c5a7
JB
74672013-05-17 Joel Brobecker <brobecker@adacore.com>
7468
7469 * lynx-low.c (struct process_info_private): New type.
7470 (lynx_add_process): New function.
7471 (lynx_create_inferior, lynx_attach): Replace calls to
7472 add_process by calls to lynx_add_process.
7473 (lynx_resume): If PTID is null, then try using
7474 current_process()->private->last_wait_event_ptid.
7475 Add comments.
7476 (lynx_clear_inferiors): Delete. The contents of that function
7477 has been inlined in lynx_mourn;
7478 (lynx_wait_1): Save the ptid in the process's private data.
7479 (lynx_mourn): Free the process' private data. Replace call
7480 to lynx_clear_inferiors by call to clear_inferiors.
7481
96f7a20f
YQ
74822013-05-17 Yao Qi <yao@codesourcery.com>
7483
7484 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7485 the right place.
7486
db0dfaa0
LM
74872013-05-16 Luis Machado <lgustavo@codesourcery.com>
7488
7489 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7490 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7491 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7492 PT_TEXT_END_ADDR guards. Update comments.
7493 (linux_target_op) <read_offsets>: Conditionally define to
7494 linux_read_offsets if the target is UCLIBC and if it defines
7495 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7496
68f5f838
SL
74972013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7498 Andrew Jenner <andrew@codesourcery.com>
7499
7500 * Makefile.in (SFILES): Add linux-nios2-low.c.
7501 (clean): Add action to delete nios2-linux.c.
7502 (nios2-linux.c): New rule.
7503 * configure.srv: Add nios2*-*-linux*.
7504 * linux-nios2-low.c: New.
7505
1ebff1fd
HAQ
75062013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7507
7508 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7509
f6150862
HZ
75102013-04-25 Hui Zhu <hui@codesourcery.com>
7511
7512 PR gdb/15186
f6150862
HZ
7513 * ax.c (ax_printf): Add fflush.
7514
614c279d
TT
75152013-04-22 Tom Tromey <tromey@redhat.com>
7516
7517 * Makefile.in (SFILES): Add filestuff.c.
7518 (OBS): Add filestuff.o.
7519 (filestuff.o): New target.
7520 * config.in, configure: Rebuild.
7521 * configure.ac: Check for fdwalk, pipe2.
7522
7d4e5717
PA
75232013-04-17 Pedro Alves <palves@redhat.com>
7524
7525 * configure.ac (USE_THREAD_DB): Delete variable.
7526 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7527 Don't AC_SUBST USE_THREAD_DB.
7528 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7529 * config.in, configure: Regenerate.
7530
d5c93e41
PA
75312013-04-16 Pedro Alves <palves@redhat.com>
7532
7533 * linux-low.h (struct lwp_info) <thread_known>: Move under
7534 the USE_THREAD_DB #ifdef.
7535
04f5fe89
PA
75362013-04-16 Pedro Alves <palves@redhat.com>
7537
7538 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7539 (linux-low.o): Delete rule.
7540 * linux-low.h: Always include "gdb_thread_db.h" instead of
7541 conditionally including thread_db.h.
7542 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7543 HAVE_THREAD_DB_H.
7544
480b27bf
JK
75452013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7546
7547 * Makefile.in (install-only): Fix make install regression.
7548
43662968
JK
75492013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7550
7551 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7552 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7553 installation.
7554 * gdbserver.1: Remove.
7555
3e74e146
PA
75562013-03-22 Pedro Alves <palves@redhat.com>
7557
7558 * linux-low.c (handle_extended_wait): Don't call
7559 linux_enable_event_reporting.
7560
a8347a2a
TT
75612013-03-15 Tony Theodore <tonyt@logyst.com>
7562
7563 PR build/9098:
7564 * Makefile.in (SHELL): Use @SHELL@.
7565
eeb56fa7
SDJ
75662013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7567
7568 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7569 compiler warning.
7570
4fa7e2ff
JB
75712013-03-13 Joel Brobecker <brobecker@adacore.com>
7572
7573 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7574 Remove extraneous NULL element.
7575
8ddb1965
YQ
75762013-03-13 Yao Qi <yao@codesourcery.com>
7577
7578 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7579 'V' block in trace frame.
7580
9accd112
MM
75812013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7582
7583 * target.h (struct target_ops): Add btrace ops.
7584 (target_supports_btrace): New macro.
7585 (target_enable_btrace): New macro.
7586 (target_disable_btrace): New macro.
7587 (target_read_btrace): New macro.
7588 * gdbthread.h (struct thread_info): Add btrace field.
7589 * server.c: Include btrace-common.h.
7590 (handle_btrace_general_set): New function.
7591 (handle_btrace_enable): New function.
7592 (handle_btrace_disable): New function.
7593 (handle_general_set): Call handle_btrace_general_set.
7594 (handle_qxfer_btrace): New function.
7595 (struct qxfer qxfer_packets[]): Add btrace entry.
7596 * inferiors.c (remove_thread): Disable btrace.
7597 * linux-low: Include linux-btrace.h.
7598 (linux_low_enable_btrace): New function.
7599 (linux_low_read_btrace): New function.
7600 (linux_target_ops): Add btrace ops.
7601 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7602 Add srv_linux_btrace=yes.
7603 (x86_64-*-linux*): Add linux-btrace.o.
7604 Add srv_linux_btrace=yes.
7605 * configure.ac: Define HAVE_LINUX_BTRACE.
7606 * config.in: Regenerated.
7607 * configure: Regenerated.
7608
5cc22e4c
MM
76092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7610
7611 * server.c (handle_qxfer): Preserve error message if -3 is
7612 returned.
7613 (qxfer): Document the -3 return value.
7614
7c97f91e
MM
76152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7616
7617 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7618 (linux_btrace_h): New variable.
7619 (linux-btrace.o): New rule.
7620
be9a119c 76212013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7622 Hafiz Abid Qadeer <abidh@codesourcery.com>
7623
7624 * tracepoint.c (trace_buffer_size): New global.
7625 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7626 (init_trace_buffer): Change to one-argument function. Allocate
7627 trace buffer memory.
7628 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7629 handle QTBuffer:size packet.
7630 (cmd_bigqtbuffer_size): New function.
7631 (initialize_tracepoint): Call init_trace_buffer with
7632 DEFAULT_TRACE_BUFFER_SIZE.
7633 * server.c (handle_query): Add QTBuffer:size in the
7634 supported packets.
7635
e64f7499
YQ
76362013-03-07 Yao Qi <yao@codesourcery.com>
7637
7638 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7639 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7640 of -1.
7641 (cmd_qtsp): Adjust condition. Do post increment.
7642 Set cur_action and cur_step_action back to 0.
7643
f0ae6fc3
PA
76442013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7645
7646 PR server/15236
7647 * linux-low.c (linux_write_memory): Return early success if LEN is
7648 zero.
7649
b5b0b0af
CV
76502013-03-05 Corinna Vinschen <vinschen@redhat.de>
7651
334ad4a8 7652 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7653
589bc927
TT
76542013-02-28 Tom Tromey <tromey@redhat.com>
7655
7656 * configure.ac: Invoke AC_SYS_LARGEFILE.
7657 * configure, config.in: Rebuild.
7658
dfe07582
CV
76592013-02-28 Corinna Vinschen <vinschen@redhat.com>
7660
7661 * win32-low.c: Throughout, fix format strings and casts of
7662 printf-like functions to avoid type related warnings on all
7663 platforms.
7664 (get_child_debug_event): Print dwDebugEventCode as hex since
7665 that's how it's usually documented.
7666
736cd585
YQ
76672013-02-28 Yao Qi <yao@codesourcery.com>
7668
7669 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7670 pulongest.
7671
e1f58301
JW
76722013-02-27 Jiong Wang <jiwang@tilera.com>
7673
7674 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7675 (reg-tilegx32.c): New rule.
7676 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7677 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7678 different register info initializer according to elf class.
7679 (init_registers_tilgx32): New function. The tilegx32 register info
7680 initializer.
7681 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7682 (tile_store_gregset): Likewise.
7683
d171ca78
YQ
76842013-02-27 Yao Qi <yao@codesourcery.com>
7685
7686 * server.c (process_point_options): Print debug message when
7687 debug_threads is true.
7688
282bbdf3
YQ
76892013-02-26 Yao Qi <yao@codesourcery.com>
7690
7691 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7692
aca22551
PA
76932013-02-19 Pedro Alves <palves@redhat.com>
7694 Kai Tietz <ktietz@redhat.com>
7695
7696 PR gdb/15161
7697
7698 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7699 instead of strtoul to extract address from packet.
7700 (process_serial_event) <'z'>: Likewise.
7701
4f3cee1c
YQ
77022013-02-18 Yao Qi <yao@codesourcery.com>
7703
7704 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7705
8e1d55a3
PA
77062013-02-14 Pedro Alves <palves@redhat.com>
7707
7708 Plug memory leak.
7709
7710 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7711 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7712
458820da
PA
77132013-02-14 Pedro Alves <palves@redhat.com>
7714
7715 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7716
baea0dae
PA
77172013-02-14 Pedro Alves <palves@redhat.com>
7718
7719 * tracepoint.c (save_string): Delete.
7720 (add_tracepoint_action): Use savestring instead of save_string.
7721
0b1afbb3
PA
77222013-02-12 Pedro Alves <palves@redhat.com>
7723
7724 * linux-xtensa-low.c: Ditto.
7725 * xtensa-xtregs.c: Ditto.
7726
8a4ac37e
PA
77272013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7728
7729 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7730 thread_db.
7731
148de6bb
MS
77322013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7733
7734 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7735 aarch64_num_wp_regs and aarch64_num_bp_regs to
7736 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7737
55fac6e0
MS
77382013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7739
7740 * linux-aarch64-low.c (ps_get_thread_area): Replace
7741 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7742
176eb98c
MS
77432013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7744 Marcus Shawcroft <marcus.shawcroft@arm.com>
7745 Nigel Stephens <nigel.stephens@arm.com>
7746 Yufeng Zhang <yufeng.zhang@arm.com>
7747
7748 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7749 (aarch64.c, aarch64-without-fpu.c): New targets.
7750 * configure.srv (aarch64*-*-linux*): New.
7751 * linux-aarch64-low.c: New file.
7752
56f7af9c
MS
77532013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7754
43aaf8b6 7755 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7756 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7757 (dequeue_one_deferred_signal, linux_resume_one_thread)
7758 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7759 (linux_tracefork_grandchild, linux_test_for_tracefork)
7760 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7761 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7762 where the argument is 0.
7763
60f662b0
YQ
77642013-01-25 Yao Qi <yao@codesourcery.com>
7765
7766 * event-loop.c: Include "queue.h".
7767 (gdb_event_p): New typedef.
7768 (struct gdb_event) <next_event>: Remove.
7769 (event_queue): Change to QUEUE(gdb_event_p).
7770 (async_queue_event): Remove.
7771 (gdb_event_xfree): New.
7772 (initialize_event_loop): New.
7773 (process_event): Use API from QUEUE.
7774 (wait_for_event): Likewise.
7775 * server.c (main): Call initialize_event_loop.
7776 * server.h (initialize_event_loop): Declare.
7777
5ae4861a
YQ
77782013-01-18 Yao Qi <yao@codesourcery.com>
7779
7780 * ax.h (struct eval_agent_expr_context): New.
7781 (gdb_eval_agent_expr): Update declaration.
7782 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7783 TFRAME. Add new argument CTX.
7784 * server.h (struct eval_agent_expr_context): Declare.
7785 (agent_mem_read, agent_tsv_read): Update declaration.
7786 (agent_mem_read_string): Likewise.
7787 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7788 (add_traceframe_block): Add new argument TPOINT.
7789 Increase TPOINT->traceframe_usage.
7790 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7791 eval_tracepoint_agent_expr.
7792 (condition_true_at_tracepoint): Likewise.
7793 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7794 (agent_mem_read_string, agent_tsv_read): Likewise.
7795
85e00e85
YQ
77962013-01-16 Yao Qi <yao@codesourcery.com>
7797
7798 * linux-low.c (linux_resume_one_lwp): Don't check
7799 'lwp->bp_reinsert != 0'.
7800
4039cf45
JB
78012013-01-07 Joel Brobecker <brobecker@adacore.com>
7802 Pedro Alves <palves@redhat.com>
7803
7804 * lynx-low.c (ptrace_request_to_str): Define a temporary
7805 macro and use it to simplify this function's implementation.
7806
9044dee2
JB
78072013-01-07 Joel Brobecker <brobecker@adacore.com>
7808
7809 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7810 sets errno.
7811
e6352c8f
JB
78122013-01-07 Joel Brobecker <brobecker@adacore.com>
7813
7814 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7815
50681a27
JB
78162013-01-07 Joel Brobecker <brobecker@adacore.com>
7817
7818 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7819
3f6e77ef
JB
78202013-01-07 Joel Brobecker <brobecker@adacore.com>
7821
7822 * lynx-low.c (lynx_resume): Use the resume_info parameter
7823 to determine the ptid for the lynx_ptrace call, unless
7824 it is equal to minus_one_ptid, in which case we use the
7825 ptid of the current_inferior.
7826 (lynx_wait_1): After having received a thread create/exit
7827 event, resume the inferior's execution using the signaling
7828 thread's ptid, rather than the old ptid.
7829
7fda33ae
JB
78302013-01-07 Joel Brobecker <brobecker@adacore.com>
7831
7832 * lynx-low.c (lynx_resume): Delete variable ret.
7833
b9786c74
JB
78342013-01-01 Joel Brobecker <brobecker@adacore.com>
7835
7836 * gdbreplay.c (gdbreplay_version): Update copyright year.
7837 * server.c (gdbserver_version): Likewise.
7838
8b93d60f
JB
78392012-12-17 Joel Brobecker <brobecker@adacore.com>
7840
7841 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7842 new thread.
7843
037335a7
JB
78442012-12-17 Joel Brobecker <brobecker@adacore.com>
7845
7846 * lynx-low.c (ptrace_request_to_str): Add handling for
7847 PTRACE_GETTRACESIG.
7848
52d4cbd8
JB
78492012-12-17 Joel Brobecker <brobecker@adacore.com>
7850
7851 * lynx-low.c (lynx_attach): Delete variable new_process.
7852
ab8f6ca9
JB
78532012-12-17 Joel Brobecker <brobecker@adacore.com>
7854
7855 * lynx-low.c (lynx_create_inferior): Delete variable
7856 new_process.
7857
78cbc024
JB
78582012-12-17 Joel Brobecker <brobecker@adacore.com>
7859
7860 * lynx-low.c (ptrace_request_to_str): Do not handle
7861 PTRACE_GETTHREADLIST if this macro does not exist.
7862
14a00470
YQ
78632012-12-15 Yao Qi <yao@codesourcery.com>
7864
7865 * Makefile.in (OBS): Add notif.o.
7866 * notif.c, notif.h: New.
7867 * server.c: Include "notif.h".
7868 (struct vstop_notif) <next>: Remove.
7869 <base>: New field.
7870 (queue_stop_reply): Update.
7871 (push_event, send_next_stop_reply): Remove.
7872 (discard_queued_stop_replies): Update.
7873 (notif_stop): New variable.
7874 (handle_v_stopped): Remove.
7875 (handle_v_requests): Don't call handle_v_stopped. Call
7876 handle_ack_notif instead.
7877 (queue_stop_reply_callback): Call notif_event_enque instead
7878 of queue_stop_reply.
7879 (handle_status): Don't call send_next_stop_reply, call
7880 notif_write_event instead.
7881 (kill_inferior_callback): Likewise.
7882 (detach_or_kill_inferior_callback): Likewise.
7883 (main): Call initialize_notif.
7884 (process_serial_event): Call QUEUE_is_empty.
7885 (handle_target_event): Call notif_push instead of push event.
7886 * server.h (push_event): Remove declaration.
7887
61c125b9
TT
78882012-12-10 Tom Tromey <tromey@redhat.com>
7889
7890 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7891 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7892 macros.
7893 (.c.o): Rewrite.
7894 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7895 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7896 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7897 (amd64-linux-ipa.o, ax.o): Rewrite.
7898 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7899 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7900 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7901 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7902 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7903 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7904 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7905 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7906 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7907 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7908 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7909 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7910 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7911 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7912 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7913 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7914 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7915 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7916 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7917 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7918 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7919 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7920 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7921 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7922 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7923 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7924 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7925 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7926 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7927 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7928 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7929 (reg-tilegx.o): Remove.
7930 (all_object_files): New macro.
7931 Include .deps files.
7932 * aclocal.m4, configure: Rebuild.
7933 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7934 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7935 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7936
e90e9ad9
TT
79372012-12-05 Tom Tromey <tromey@redhat.com>
7938
7939 PR gdb/14917:
7940 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7941
02d403bf 79422012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7943
7944 * configure.ac: Check for linux/perf_event.h.
7945 * config.in: Regenerated.
7946 * configure: Regenerated.
7947
0270a750
PA
79482012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7949
7950 * hostio.c (handle_readlink): Decrease buffer size
7951 parameter passed to readlink by one byte.
7952
8c29b58e
YQ
79532012-11-26 Yao Qi <yao@codesourcery.com>
7954
7955 * configure.ac (build_warnings): Append '-Wempty-body'.
7956 * configure: Regenerated.
7957 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7958 body.
7959
8bdce1ff
PM
79602012-11-15 Pierre Muller <muller@sourceware.org>
7961
7962 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7963 * config.in: Regenerate.
7964 * configure: Regenerate.
7965 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7966 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7967 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7968 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7969 header.
7970 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7971 instead of <sys/wait.h> header.
7972 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7973
02d403bf 79742012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7975
7976 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7977 (various make rules): Remove -DGDBSERVER
7978
fbd5db48
YQ
79792012-11-09 Yao Qi <yao@codesourcery.com>
7980
7981 * spu-low.c (current_ptid): Move it to ..
7982 * gdbthread.h: ... here. New.
7983 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7984 * server.c (myresume, process_serial_event): Likewise.
7985 * thread-db.c (thread_db_find_new_threads): Likewise.
7986 * tracepoint.c (run_inferior_command): Likewise.
7987
b3dc46ff
AB
79882012-10-01 Andrew Burgess <aburgess@broadcom.com>
7989
7990 * server.c (handle_search_memory_1): Include access length in
7991 warning message.
7992
07c04788
HPN
79932012-09-05 Michael Brandt <michael.brandt@axis.com>
7994
7995 * linux-crisv32-low.c: Fix compile errors.
7996
918d227b
YQ
79972012-09-04 Yao Qi <yao@codesourcery.com>
7998
7999 * tracepoint.c (cmd_qtsv): Adjust debug message.
8000 Don't check CUR_TPOINT.
8001
18c1b81a
YQ
80022012-08-28 Yao Qi <yao@codesourcery.com>
8003
8004 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8005 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8006 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8007 Remove declarations of xmalloc, xreallloc, xstrdup and
8008 freeargv.
8009 * Makefile.in (libiberty_h): New.
8010 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8011 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8012
dc82f37b
YQ
80132012-08-23 Yao Qi <yao@codesourcery.com>
8014
8015 * server.h: Remove declaration of 'xsnprintf'.
8016
406b1477
KS
80172012-08-22 Keith Seitz <keiths@redhat.com>
8018
8019 * server.h: Include build-gnulib-gbserver/config.h.
8020 * gdbreplay.c: Likewise.
8021
e6712ff1
DE
80222012-08-08 Doug Evans <dje@google.com>
8023
8024 * Makefile.in (SFILES): Add gdb_vecs.c.
8025 (OBS): Add gdb_vecs.o.
8026 (gdb_vecs_h, host_defs_h): New variables.
8027 (thread-db.o): Add $(gdb_vecs_h) dependency.
8028 (gdb_vecs.o): New rule.
8029 * thread-db.c: #include "gdb_vecs.h".
8030 (thread_db_load_search): Use a vector to iterate over path elements.
8031 Handle text appearing after "$pdir".
8032
8033 * configure.ac: Add check for strstr.
8034 * config.in: Regenerate.
8035 * configure: Regenerate.
8036
7c3270ae
UW
80372012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8038
8039 * hostio.c (handle_pread): If pread fails, fall back to attempting
8040 lseek/read.
8041 (handle_pwrite): Likewise for pwrite.
8042
b62e2b27
UW
80432012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8044
8045 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8046 between unsupported TYPE and unimplementable ADDR/LEN combination.
8047 (arm_insert_point): Act on new return value.
8048
78a99e91
PA
80492012-07-31 Pedro Alves <palves@redhat.com>
8050
8051 * server.c (process_point_options): Only skip tokens if we find
8052 one that is unrecognized. Don't treat 'X' specially while
8053 skipping unrecognized tokens.
8054
fcf303ab
UW
80552012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8056
8057 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8058 to 4-byte-align HW breakpoint addresses for Thumb.
8059
7255706c
YQ
80602012-07-27 Yao Qi <yao@codesourcery.com>
8061
8062 PR remote/14161.
8063
8064 * server.h: Declare gdb_agent_about_to_close.
8065 * target.c (kill_inferior): Include "agent.h".
8066 New. Send command 'kill'.
8067 * target.h (kill_inferior): Removed macro.
8068 * tracepoint.c (gdb_agent_about_to_close): New.
8069 (gdb_agent_helper_thread): Handle command 'close'.
8070 Wait endlessly until the inferior stops.
8071 Install gdb_agent_remove_socket to atexit hook.
8072 (agent_socket_name): New static variable.
8073 (gdb_agent_socket_init): Replace local variable 'name' with
8074 'agent_socket_name'.
8075 (gdb_agent_remove_socket): New.
8076
5a3f286f
YQ
80772012-07-27 Yao Qi <yao@codesourcery.com>
8078
8079 * server.c (process_point_options): Stop at 'X' when parsing.
8080
961bd387
ME
80812012-07-19 Michael Eager <eager@eagercon.com>
8082
a261b8f5 8083 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8084 to hw_execute.
8085 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8086 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8087 hardware breakpoint.
8088
aa7c7447
JK
80892012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8090
8091 * gdbserver/linux-low.c (initialize_low): Call
8092 linux_ptrace_init_warnings.
8093
7f216e7c
DE
80942012-07-02 Doug Evans <dje@google.com>
8095
8096 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8097 pointer to int.
8098
d3ce09f5
SS
80992012-07-02 Stan Shebs <stan@codesourcery.com>
8100
8101 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8102 (ax.o): Add it to build rule.
8103 (ax-ipa.o): Ditto.
8104 (OBS): Add format.o.
8105 (IPA_OBS): Add format.o.
8106 * server.c (handle_query): Claim support for breakpoint commands.
8107 (process_point_options): Add command case.
8108 (process_serial_event): Leave running if there are printfs in
8109 effect.
8110 * mem-break.h (any_persistent_commands): Declare.
8111 (add_breakpoint_commands): Declare.
8112 (gdb_no_commands_at_breakpoint): Declare.
8113 (run_breakpoint_commands): Declare.
8114 * mem-break.c (struct point_command_list): New struct.
8115 (struct breakpoint): New field command_list.
8116 (any_persistent_commands): New function.
8117 (add_commands_to_breakpoint): New function.
8118 (add_breakpoint_commands): New function.
8119 (gdb_no_commands_at_breakpoint): New function.
8120 (run_breakpoint_commands): New function.
8121 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8122 locally.
8123 * ax.c: Include format.h.
8124 (ax_printf): New function.
8125 (gdb_eval_agent_expr): Add printf opcode.
8126
2f8f6aed
YQ
81272012-06-13 Yao Qi <yao@codesourcery.com>
8128
8129 * server.c (start_inferior): Remove duplicated writes to fields
8130 'last_resume_kind' and 'last_status' of 'current_inferior'.
8131
0c9070b3
YQ
81322012-06-12 Yao Qi <yao@codesourcery.com>
8133 Pedro Alves <palves@redhat.com>
8134
8135 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8136 comment.
8137 * server.c (handle_v_cont): Extend comment.
8138
c52daf70
YQ
81392012-06-11 Yao Qi <yao@codesourcery.com>
8140
8141 * linux-low.c (linux_attach): Add 'static'.
8142
d38bbb0a
YQ
81432012-06-06 Yao Qi <yao@codesourcery.com>
8144
8145 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8146
89dc0afd
JK
81472012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8148
8149 Fix gcc -flto compilation warning.
8150 * server.c (main): Make variable multi_mode and attach volatile.
8151
75f62ce7
TJB
81522012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8153
8154 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8155 if the platform doesn't know about it.
8156
65f479b6
PA
81572012-05-30 Jeff Kenton <jkenton@tilera.com>
8158
8159 * Makefile.in (SFILES): Add linux-tile-low.c.
8160 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8161 * configure.srv: Handle tilegx-*-linux*.
8162 * linux-tile-low.c: New file.
8163
0c5bf5a9
JK
81642012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8165
8166 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8167
a493e3e2
PA
81682012-05-24 Pedro Alves <palves@redhat.com>
8169
8170 PR gdb/7205
8171
43aaf8b6 8172 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8173
2ea28649
PA
81742012-05-24 Pedro Alves <palves@redhat.com>
8175
8176 PR gdb/7205
8177
8178 Replace target_signal with gdb_signal throughout.
8179
8d409d16
MR
81802012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8181
8182 * linux-low.c (linux_store_registers): Avoid the copying sequence
8183 when no data has been retrieved by ptrace.
8184
23512c01
MGD
81852012-05-22 Will Deacon <will.deacon@arm.com>
8186
8187 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8188 Include asm/ptrace.h.
8189 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8190 already defined.
8191
4934b29e
MR
81922012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8193
8194 * linux-low.c (linux_store_registers): Don't re-retrieve data
8195 with ptrace that has already been obtained from /proc. Always
8196 copy any data retrieved with ptrace to the buffer supplied.
8197
bde24c0a
PA
81982012-05-11 Yao Qi <yao@codesourcery.com>
8199 Pedro Alves <palves@redhat.com>
8200
8201 * linux-low.c (enum stopping_threads_kind): New.
8202 (stopping_threads): Change type to `enum stopping_threads_kind'.
8203 (handle_extended_wait): If stopping and suspending threads, leave
8204 the new_lwp suspended too.
8205 (linux_wait_for_event): Adjust.
8206 (stop_all_lwps): Set `stopping_threads' to
8207 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8208 whether we're suspending threads or just stopping them. Assert no
8209 recursion happens.
8210
623b6bdf
YQ
82112012-04-29 Yao Qi <yao@codesourcery.com>
8212
8213 * server.h: Move some code to ...
8214 * gdbthread.h: ... here. New.
8215 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8216 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8217 (nto-low.o, win32-low.o): Likewise.
8218 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8219 * regcache.c, remote-utils.c, server.c: Likewise.
8220 * target.c, tracepoint.c, win32-low.c: Likewise.
8221
f15f9948
TJB
82222012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8223
8224 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8225 (PTRACE_ARG4_TYPE): Likewise.
8226 (PTRACE_XFER_TYPE): Likewise.
8227 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8228 ptrace to PTRACE_ARG3_TYPE.
8229 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8230 (PTRACE_ARG4_TYPE): Likewise.
8231 (PTRACE_XFER_TYPE): Likewise.
8232 (linux_detach_one_lwp): Cast fourth argument of
8233 ptrace to long then PTRACE_ARG4_TYPE.
8234 (regsets_fetch_inferior_registers): Cast third argument of
8235 ptrace to long then PTRACE_ARG3_TYPE.
8236 (regsets_store_inferior_registers): Likewise.
8237
38ea300a
PA
82382012-04-20 Pedro Alves <palves@redhat.com>
8239
8240 * configure: Regenerate.
8241
c971b7fa
PA
82422012-04-19 Pedro Alves <palves@redhat.com>
8243
43aaf8b6 8244 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8245 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8246 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8247 (all, install-only, uninstall, clean-info, all-lib, clean): No
8248 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8249 (maintainer-clean realclean distclean): Use subdir_do.
8250 (subdir_do): New.
8251 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8252 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8253 * acinclude.m4: Include acx_configure_dir.m4.
8254 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8255 calls. Call AC_PROG_RANLIB. Configure gnulib using
8256 ACX_CONFIGURE_DIR.
8257 (GNULIB): New.
8258 (GNULIB_STDINT_H): Adjust.
8259 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8260 * gdbreplay.c: Include build-gnulib/config.h.
8261 * server.h: Likewise.
8262 * aclocal.m4: Regenerate.
8263 * config.in: Regenerate.
8264 * configure: Regenerate.
c971b7fa 8265
809277f8
PA
82662012-04-19 Pedro Alves <palves@redhat.com>
8267
8268 * Makefile.in (LIBGNU, INCGNU): Adjust.
8269 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8270 (all, install-only, uninstall, clean-info, all-lib, clean)
8271 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8272 * configure.ac: Adjust AC_OUTPUT output.
8273 * aclocal.m4: Regenerate.
8274 * configure: Regenerate.
8275
fd9bb8b8
PA
82762012-04-19 Pedro Alves <palves@redhat.com>
8277
8278 * Makefile.in (generated_files): New.
8279 (server_h): Remove the explicit dependency on config.h, and depend
8280 on $generated_files.
8281
1c298c66
PA
82822012-04-19 Pedro Alves <palves@redhat.com>
8283
8284 * Makefile.in (INCGNU): Add -Ignulib.
8285
57c4b50b
PA
82862012-04-19 Pedro Alves <palves@redhat.com>
8287
8288 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8289 (INCGNU): ... this, and spell out -I here.
8290 (GNULIB_LIB): Rename to ...
8291 (LIBGNU): ... this.
8292 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8293
1030e047
PA
82942012-04-19 Pedro Alves <palves@redhat.com>
8295
8296 * config.in: Regenerate.
8297
447d4319
PA
82982012-04-19 Pedro Alves <palves@redhat.com>
8299
8300 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8301 * server.h (memmem): Remove declaration.
8302 * config.in: Regenerate.
8303 * configure: Regenerate.
8304
aad9eab9
YQ
83052012-04-19 Yao Qi <yao@codesourcery.com>
8306
8307 * Makefile.in (SFILES): Add common/vec.c.
8308 (OBS): Add vec.o.
8309 (vec.o): New rule.
8310
3e10640f
YQ
83112012-04-19 Yao Qi <yao@codesourcery.com>
8312
8313 * remote-utils.c (prepare_resume_reply): Replace with macro
8314 target_core_of_thread.
8315 * server.c (handle_qxfer_threads_proper): Likewise.
8316 * target.h (traget_core_of_thread): New macro.
8317
71622373
PA
83182012-04-18 Pedro Alves <palves@redhat.com>
8319
8320 * aclocal.m4: Regenerate.
8321 * configure: Regenerate.
8322
80d26939
YQ
83232012-04-16 Yao Qi <yao@codesourcery.com>
8324
8325 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8326 duplicated on address.
8327
42476b70
YQ
83282012-04-16 Yao Qi <yao@codesourcery.com>
8329
8330 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8331 (struct tracepoint_action_ops) <send>: New field.
8332 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8333 (agent_expr_send, x_tracepoint_action_send): New.
8334 (l_tracepoint_action_send): New.
8335 (cmd_qtdp): Download and install tracepoint
8336 according to `use_agent'.
8337 (run_inferior_command): Add one more parameter `len'.
8338 Update callers.
8339 (tracepoint_send_agent): New.
8340 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8341
7bc83639
YQ
83422012-04-16 Yao Qi <yao@codesourcery.com>
8343
8344 * tracepoint.c (download_tracepoints): Moved to ...
8345 (cmd_qtstart): ... here.
8346
5f18041e
YQ
83472012-04-14 Yao Qi <yao@codesourcery.com>
8348
8349 * tracepoint.c: Include inttypes.h.
8350 (struct collect_memory_action): Use sized types.
8351 (struct tracepoint): Likewise.
8352 (cmd_qtdp, stop_tracing): Update print specifiers.
8353 (cmd_qtp, response_tracepoint): Likewise.
8354 (collect_data_at_tracepoint): Likewise.
8355 (collect_data_at_step): Likewise.
8356
55a8c076
YQ
83572012-04-14 Yao Qi <yao@codesourcery.com>
8358
8359 Import gnulib module inttypes.
8360 * aclocal.m4, config.in, configure: Regenerated.
8361
dc750257
YQ
83622012-04-14 Yao Qi <yao@codesourcery.com>
8363
8364 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8365 Makefile and config.status at last.
8366
0ab5faf9
YQ
83672012-04-13 Yao Qi <yao@codesourcery.com>
8368
8369 * tracepoint.c: Include stdint.h unconditionally.
8370
18f5fd81
TJB
83712012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8372
8373 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8374 on BFD_HAVE_SYS_PROCFS_TYPE.
8375 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8376 * configure: Regenerate.
8377 * config.in: Likewise.
8378
4d47af5c
L
83792012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8380
8381 * Makefile.in (clean): Also remove x32.c x32-linux.c
8382 x32-avx.c x32-avx-linux.c.
8383 (x32.o): New target.
8384 (x32.c): Likewise.
8385 (x32-linux.o): Likewise.
8386 (x32-linux.c): Likewise.
8387 (x32-avx.o): Likewise.
8388 (x32-avx.c): Likewise.
8389 (x32-avx-linux.o): Likewise.
8390 (x32-avx-linux.c): Likewise.
8391
8392 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8393 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8394 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8395 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8396 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8397 i386/x32-avx-linux.xml.
8398
8399 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8400 (init_registers_x32_avx_linux): Likwise.
8401 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8402 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8403
ecedbe58
PA
84042012-04-13 Pedro Alves <palves@redhat.com>
8405
8406 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8407 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8408 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8409 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8410 the sub-make.
8411
c92b5177
L
84122012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8413
8414 * linux-x86-low.c (compat_x32_clock_t): New.
8415 (compat_x32_siginfo_t): Likewise.
8416 (compat_x32_siginfo_from_siginfo): Likewise.
8417 (siginfo_from_compat_x32_siginfo): Likewise.
8418 (linux_is_elf64): Likewise.
8419 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8420 and siginfo_from_compat_x32_siginfo for x32.
8421 (x86_arch_setup): Set linux_is_elf64.
8422
214d508e
L
84232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8424
8425 PR gdb/13969
8426 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8427 e_machine field.
8428 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8429 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8430 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8431 compatible with process.
8432
c9a1864a
YQ
84332012-04-12 Yao Qi <yao@codesourcery.com>
8434
8435 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8436 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8437 (install-only, install-info, clean): Handle sub dir gnulib.
8438 (all-lib, am--refresh): New targets.
8439 (memmem.o): Remove target.
8440 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8441 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8442 (AC_REPLACE_FUNCS): Remove memmem.
8443 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8444 (AC_OUTPUT): Generate Makefile in gnulib/.
8445 * aclocal.m4, config.in, configure: Regenerated.
8446
367ba2c2
MR
84472012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8448
8449 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8450
9d236627
PA
84512012-04-05 Pedro Alves <palves@redhat.com>
8452
8453 -Werror=strict-aliasing
8454
8455 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8456 pointer.
8457
111217b3
PA
84582012-04-04 Pedro Alves <palves@redhat.com>
8459
8460 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8461 (sparc_store_gregset_from_stack, sparc_store_gregset)
8462 (sparc_breakpoint_at): Fix formatting.
8463
8365dcf5
TJB
84642012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8465
8466 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8467 are available.
8468 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8469 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8470 * config.in: Regenerate.
8471 * configure: Likewise.
8472
689cc2ae
PA
84732012-03-29 Pedro Alves <palves@redhat.com>
8474
8475 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8476 Correct ptrace arguments.
8477
c14dfd32
PA
84782012-03-28 Pedro Alves <palves@redhat.com>
8479
8480 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8481 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8482 (IA64_FR1_REGNUM): New defines.
8483 (ia64_fetch_register): New.
8484 (the_low_target): Install it.
8485 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8486 field.
8487 * linux-low.c (linux_fetch_registers): Try the
8488 the_low_target.fetch_register hook first.
8489
8490 * linux-arm-low.c (the_low_target): Adjust.
8491 * linux-bfin-low.c (the_low_target): Adjust.
8492 * linux-cris-low.c (the_low_target): Adjust.
8493 * linux-crisv32-low.c (the_low_target): Adjust.
8494 * linux-m32r-low.c (the_low_target): Adjust.
8495 * linux-m68k-low.c (the_low_target): Adjust.
8496 * linux-mips-low.c (the_low_target): Adjust.
8497 * linux-ppc-low.c (the_low_target): Adjust.
8498 * linux-s390-low.c (the_low_target): Adjust.
8499 * linux-sh-low.c (the_low_target): Adjust.
8500 * linux-sparc-low.c (the_low_target): Adjust.
8501 * linux-tic6x-low.c (the_low_target): Adjust.
8502 * linux-x86-low.c (the_low_target): Adjust.
8503 * linux-xtensa-low.c (the_low_target): Adjust.
8504
63c88e13
PA
85052012-03-26 Pedro Alves <palves@redhat.com>
8506
8507 * server.c (handle_qxfer_libraries): Don't bail early if
8508 the_target->qxfer_libraries_svr4 is not NULL.
8509
fb723180
PA
85102012-03-26 Pedro Alves <palves@redhat.com>
8511
8512 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8513
0afae3cf
PA
85142012-03-23 Pedro Alves <palves@redhat.com>
8515
8516 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8517 "library-list-svr4" element's start tag when the the DSO list is
8518 empty.
8519
485f1ee4
PA
85202012-03-23 Pedro Alves <palves@redhat.com>
8521
8522 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8523 a variable whose type size is the same as the inferior's pointer
8524 size.
8525
a5362b9a
TS
85262012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8527
8528 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8529 struct siginfo.
8530 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8531 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8532 * linux-low.h: Include <signal.h>.
8533 (struct siginfo): Remove forward declaration.
8534 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8535 struct siginfo.
8536
d226c142
MF
85372012-03-21 Mike Frysinger <vapier@gentoo.org>
8538
8539 * .gitignore: Ignore more files.
8540
122f36ef
PA
85412012-03-19 Pedro Alves <palves@redhat.com>
8542 Jan Kratochvil <jan.kratochvil@redhat.com>
8543
8544 * server.c (cont_thread, general_thread): Add describing comments.
8545 (start_inferior): Clear `cont_thread'.
8546 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8547 of a process.
8548
fc3e5175
YQ
85492012-03-15 Yao Qi <yao@codesourcery.com>
8550
8551 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8552 handling to ...
8553 (cmd_qtdp): ... here.
8554
8d0d92cd
YQ
85552012-03-15 Yao Qi <yao@codesourcery.com>
8556
8557 * tracepoint.c (struct tracepoint_action_ops): New.
8558 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8559 (m_tracepoint_action_download): New.
8560 (r_tracepoint_action_download): New.
8561 (x_tracepoint_action_download): New.
8562 (l_tracepoint_action_download): New.
8563 (add_tracepoint_action): Install `action->ops' according type.
8564 (download_tracepoint_1): Move code `download' function pointer
8565 of various tracepoint_action_ops.
8566
87b0bb13
JK
85672012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8568
8569 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8570 linux_ptrace_attach_warnings.
8571
5f572dec
JK
85722012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8573
8574 * Makefile.in (linux-ptrace.o): New.
8575 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8576 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8577 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8578 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8579 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8580 of these targets.
8581 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8582
f4647387
YQ
85832012-03-08 Yao Qi <yao@codesourcery.com>
8584 Pedro Alves <palves@redhat.com>
8585
8586 Fix PR server/13392.
8587 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8588 offset of JMP insn.
8589 * tracepoint.c (remove_tracepoint): New.
8590 (cmd_qtdp): Call remove_tracepoint when failed to install.
8591
9b224c5e
PA
85922012-03-07 Pedro Alves <palves@redhat.com>
8593
8594 * linux-low.c (get_detach_signal): New.
8595 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8596 Pass on pending signals to PTRACE_DETACH. Check the result of the
8597 ptrace call.
8598 * server.c (program_signals, program_signals_p): New.
8599 (handle_general_set): Handle QProgramSignals.
8600 * server.h (program_signals, program_signals_p): Declare.
8601
e237a7e2
JK
86022012-03-05 Pedro Alves <palves@redhat.com>
8603 Jan Kratochvil <jan.kratochvil@redhat.com>
8604
8605 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8606 New comment why.
8607
5808517f
YQ
86082012-03-03 Yao Qi <yao@codesourcery.com>
8609
8610 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8611 agent_look_up_symbols.
8612
58b4daa5
YQ
86132012-03-03 Yao Qi <yao@codesourcery.com>
8614
8615 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8616 (linux-x86-low.o): Likewise.
8617 * server.h: Remove in_process_agent_loaded.
8618 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8619 common/agent.c.
8620 Update callers.
8621
8ffcbaaf
YQ
86222012-03-03 Yao Qi <yao@codesourcery.com>
8623
8624 * tracepoint.c (gdb_agent_capability): New global.
8625 (in_process_agent_loaded_ust): Renamed to
8626 `in_process_agent_supports_ust'.
8627 Update callers.
8628 (in_process_agent_supports_ust): Call agent_capability_check.
8629 (clear_installed_tracepoints): Assert that agent supports
8630 agent.
8631
d1feda86
YQ
86322012-03-03 Yao Qi <yao@codesourcery.com>
8633
8634 * linux-low.c (linux_supports_agent): New.
8635 (linux_target_ops): Initialize field `supports_agent' with
8636 linux_supports_agent.
8637 * target.h (struct target_ops) <supports_agent>: New.
8638 (target_supports_agent): New macro.
8639 * server.c (handle_general_set): Handle packet 'QAgent'.
8640 (handle_query): Send `QAgent+'.
8641 * Makefile.in (server.o): Depends on agent.h.
8642
2fa291ac
YQ
86432012-03-03 Yao Qi <yao@codesourcery.com>
8644
8645 * Makefile.in (OBS): Add agent.o.
8646 Add new rule for agent.o.
8647 Track dependence of tracepoint.c on agent.h.
8648 * tracepoint.c (run_inferior_command_1):
8649 (run_inferior_command): Call agent_run_command.
8650 (gdb_ust_connect_sync_socket): Deleted. Move it to
8651 common/agent.c.
8652 (resume_thread, stop_thread): Likewise.
8653 (gdb_ust_socket_init): Renamed to ...
8654 (gdb_agent_socket_init): ... New.
8655 (gdb_ust_thread): Renamed to ...
8656 (gdb_agent_helper_thread): ... New.
8657 (gdb_ust_init): Move some code to ...
8658 (gdb_agent_init): ... here. New.
8659 [HAVE_UST]: Call gdb_ust_init.
8660 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8661 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8662 * config.in, configure: Regenerated.
8663
05044653
PA
86642012-03-02 Pedro Alves <palves@redhat.com>
8665
8666 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8667 * linux-low.c (struct simple_pid_list): New.
8668 (stopped_pids): New a struct simple_pid_list pointer.
8669 (add_to_pid_list, pull_pid_from_list): New.
8670 (handle_extended_wait): Don't assume the first signal new children
8671 report is SIGSTOP. Adjust call to pull_pid_from_list.
8672 (linux_wait_for_lwp): Adjust.
8673
8d00225b
YQ
86742012-03-02 Yao Qi <yao@codesourcery.com>
8675
8676 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8677 debug log.
8678
19560ba5
YQ
86792012-03-02 Yao Qi <yao@codesourcery.com>
8680
8681 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8682 `stop_pc' and `tpoint'. Update caller.
8683
1faeff08
MR
86842012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8685
8686 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8687 * linux-low.c (use_linux_regsets): New macro.
8688 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8689 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8690 (linux_register_in_regsets): New function.
8691 (usr_fetch_inferior_registers): Skip registers covered by
8692 regsets.
8693 (usr_store_inferior_registers): Likewise.
8694 (usr_fetch_inferior_registers): New macro.
8695 (usr_store_inferior_registers): Likewise.
8696 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8697 (linux_store_registers): Likewise.
8698 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8699 prototype.
8700 (init_registers_mips64_dsp_linux): Likewise.
8701 (init_registers_mips_linux): New macro.
8702 (init_registers_mips_dsp_linux): Likewise.
8703 (mips_dsp_num_regs): Likewise.
8704 (DSP_BASE, DSP_CONTROL): New fallback macros.
8705 (mips_base_regs): New macro.
8706 (mips_regmap): Use it. Fix the size.
8707 (mips_dsp_regmap): New variable.
8708 (mips_dsp_regset_bitmap): Likewise.
8709 (mips_arch_setup): New function.
8710 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8711 than mips_regmap.
8712 (mips_cannot_store_register): Likewise.
8713 (the_low_target): Update .arch_setup, .num_regs and .regmap
8714 initializers. Add .regset_bitmap initializer.
8715 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8716 initializer.
8717 * linux-bfin-low.c (the_low_target): Likewise.
8718 * linux-cris-low.c (the_low_target): Likewise.
8719 * linux-crisv32-low.c (the_low_target): Likewise.
8720 * linux-ia64-low.c (the_low_target): Likewise.
8721 * linux-m32r-low.c (the_low_target): Likewise.
8722 * linux-m68k-low.c (the_low_target): Likewise.
8723 * linux-ppc-low.c (the_low_target): Likewise.
8724 * linux-s390-low.c (the_low_target): Likewise.
8725 * linux-sh-low.c (the_low_target): Likewise.
8726 * linux-sparc-low.c (the_low_target): Likewise.
8727 * linux-tic6x-low.c (the_low_target): Likewise.
8728 * linux-x86-low.c (the_low_target): Likewise.
8729 * linux-xtensa-low.c (the_low_target): Likewise.
8730 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8731 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8732 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8733 srv_xmlfiles.
8734 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8735 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8736
c03e6ccc
YQ
87372012-02-29 Yao Qi <yao@codesourcery.com>
8738 Pedro Alves <palves@redhat.com>
8739
8740 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8741 `step_over_finished' is true.
8742
644cebc9
PA
87432012-02-27 Pedro Alves <palves@redhat.com>
8744
8745 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8746 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8747
c14d7ab2
PA
87482012-02-27 Pedro Alves <palves@redhat.com>
8749
8750 PR server/9684
8751 * linux-low.c (pid_is_stopped): New.
8752 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8753
412c89dd
LM
87542012-02-25 Luis Machado <lgustavo@codesourcery.com>
8755
8756 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8757 of conditions.
8758
b745defe
MR
87592012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8760
8761 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8762
9f3a5c85
LM
87632012-02-24 Luis Machado <lgustavo@codesourcery>
8764
8765 * server.c (handle_query): Advertise support for target-side
8766 breakpoint condition evaluation.
8767 (process_point_options): New function.
8768 (process_serial_event): When inserting a breakpoint, check for
8769 a target-side condition that should be evaluated.
8770
8771 * mem-break.c: Include regcache.h and ax.h.
8772 (point_cond_list_t): New data structure.
8773 (breakpoint) <cond_list>: New field.
8774 (find_gdb_breakpoint_at): Make non-static.
8775 (delete_gdb_breakpoint_at): Clear any target-side
8776 conditions.
8777 (clear_gdb_breakpoint_conditions): New function.
8778 (add_condition_to_breakpoint): Likewise.
8779 (add_breakpoint_condition): Likewise.
8780 (gdb_condition_true_at_breakpoint): Likewise.
8781 (gdb_breakpoint_here): Return result directly instead
8782 of going through a local variable.
8783
8784 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8785 (clear_gdb_breakpoint_conditions): Likewise.
8786 (add_breakpoint_condition): Likewise.
8787 (gdb_condition_true_at_breakpoint): Likewise.
8788
8789 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8790 (need_step_over_p): Take target-side breakpoint condition into
8791 consideration.
8792
5e1dc496
LM
87932012-02-24 Luis Machado <lgustavo@codesourcery>
8794
8795 * server.h: Include tracepoint.h.
8796 (agent_mem_read, agent_get_trace_state_variable_value,
8797 agent_set_trace_state_variable_value,
8798 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8799 get_set_tsv_func_addr): New prototypes.
8800
8801 * ax.h: New include file.
8802 * ax.c: New source file.
8803
8804 * tracepoint.c: Include ax.h.
8805 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8806 agent_expr, eval_result_type): Move to ax.h.
8807 (parse_agent_expr): Rename to ...
8808 (gdb_parse_agent_expr): ... this, make it non-static and move
8809 to ax.h.
8810 (unparse_agent_expr) Rename to ...
8811 (gdb_unparse_agent_expr): ... this, make it non-static and move
8812 to ax.h.
8813 (eval_agent_expr): Rename to ...
8814 (eval_tracepoint_agent_expr): ... this.
8815 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8816 forward declarations.
8817 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8818 (agent_get_trace_state_variable_value): New function.
8819 (agent_set_trace_state_variable_value): New function.
8820 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8821 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8822 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8823 (condition_true_at_tracepoint): Likewise.
8824 (parse_agent_expr): Rename to ...
8825 (gdb_parse_agent_expr): ... this and move to ax.c.
8826 (unparse_agent_expr): Rename to ...
8827 (gdb_unparse_agent_expr): ... this and move to ax.c.
8828 (gdb_agent_op_name): Move to ax.c.
8829 (eval_agent_expr): Rename to ...
8830 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8831 and move to ax.c.
8832 (eval_tracepoint_agent_expr): New function.
8833 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8834 non-static.
5e1dc496
LM
8835 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8836 ax.c.
8837 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8838 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8839 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8840 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8841 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8842 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8843 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8844 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8845 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8846 (compile_bytecodes): Remove forward declaration.
8847 (is_goto_target): Move to ax.c.
8848 (compile_bytecodes): Move to ax.c and call
8849 agent_get_trace_state_variable_value (...) and
8850 agent_set_trace_state_variable_value (...).
8851
8852 * Makefile.in: Update ax.c and IPA dependencies.
8853
277e4e52
PA
88542012-02-24 Pedro Alves <palves@redhat.com>
8855
8856 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8857 (cmd_bigqtbuffer_circular): ... this. Only handle
8858 'QTBuffer:circular:'.
8859 (handle_tracepoint_general_set): Adjust.
8860
bf4c19f7
YQ
88612012-02-16 Yao Qi <yao@codesourcery.com>
8862
8863 * inferiors.c: Move code to ...
8864 * dll.c: .... here. New.
8865 * server.h: Declare clear_dlls.
8866 * Makefile.in (SFILES): Add dll.c.
8867 (OBS): Add dll.o
8868 (dll.o): New rule.
8869
d73f2619
YQ
88702012-02-11 Yao Qi <yao@codesourcery.com>
8871
8872 * server.c: (handle_monitor_command): Add a new parameter
8873 `own_buf'.
8874 (handle_query): Update caller.
8875
f8255c2a
JB
88762012-02-09 Joel Brobecker <brobecker@adacore.com>
8877
8878 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8879 * configure, config.in: Regenerate.
8880 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8881 is not defined.
8882
da84f473
PA
88832012-02-02 Pedro Alves <palves@redhat.com>
8884
8885 Try SIGKILL first, then PTRACE_KILL.
8886 * linux-low.c (linux_kill_one_lwp): New.
8887 (linux_kill_one_lwp): Rename to ...
8888 (kill_one_lwp_callback): ... this. Use the new
8889 linux_kill_one_lwp.
8890
e886a173
PA
88912012-02-02 Pedro Alves <palves@redhat.com>
8892
8893 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8894 inferior.
8895
be07f1a2
PA
88962012-01-27 Pedro Alves <palves@redhat.com>
8897
8898 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8899 (elf_64_file_p): Make static.
8900 (linux_pid_exe_is_elf_64_file): New.
8901 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8902 Delete declarations.
8903 (linux_pid_exe_is_elf_64_file): Declare.
8904 * linux-x86-low.c (x86_arch_setup): Use
8905 linux_pid_exe_is_elf_64_file.
8906
d8301ad1
JK
89072012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8908
8909 * linux-low.c (linux_wait_for_event_1): Rename to ...
8910 (linux_wait_for_event): ... here and merge it with former
8911 linux_wait_for_event - new variable wait_ptid, use it.
8912 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8913
01b17894
PA
89142012-01-23 Pedro Alves <palves@redhat.com>
8915
8916 * server.c (main): Avoid yet another case of infinite loop while
8917 detaching/killing after a longjmp.
8918
e825046f
JK
89192012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8920
8921 Code cleanup.
8922 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8923
b9e7b9c3
UW
89242012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8925
8926 * hostio.c (handle_readlink): New function.
8927 (handle_vFile): Call it to handle "vFile:readlink" packets.
8928
901f9912
UW
89292012-01-20 Pedro Alves <palves@redhat.com>
8930 Ulrich Weigand <ulrich.weigand@linaro.org>
8931
8932 * server.c (handle_v_requests): Only support vAttach and vRun to
8933 start multiple processes when in extended protocol mode.
8934
fc1ab1a0
PA
89352012-01-17 Pedro Alves <palves@redhat.com>
8936
8937 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8938 memalign plus mprotect to allocate the scratch buffer.
8939
7d5d4e98
PA
89402012-01-13 Pedro Alves <palves@redhat.com>
8941
8942 * server.c (attach_inferior): Clear `cont_thread'.
8943
f128d5e9
PA
89442012-01-13 Pedro Alves <palves@redhat.com>
8945
8946 * server.c (main): Avoid infinite loop while detaching/killing
8947 after a longjmp.
8948
06db92f0
DE
89492012-01-09 Doug Evans <dje@google.com>
8950
8951 * server.c (start_inferior): Set last_ptid in --wrapper case.
8952
32d92999
YQ
89532012-01-06 Yao Qi <yao@codesourcery.com>
8954
8955 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8956 defined.
8957 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8958
5e0a92a9
YQ
89592012-01-04 Yao Qi <yao@codesourcery.com>
8960
8961 * tracepoint.c (cmd_qtdp): Print debug message
8962 for static tracepoint.
8963
ae639e8c
YQ
89642012-01-04 Yao Qi <yao@codesourcery.com>
8965
8966 * tracepoint.c (trace_vdebug): Differentiate debug message
8967 between gdbserver and IPA.
8968
f72429c5
YQ
89692012-01-03 Yao Qi <yao@codesourcery.com>
8970
8971 * tracepoint.c (tracepoint_was_hit): Don't collect for
8972 static tracepoint.
8973
12c3e59c
JB
89742012-01-02 Joel Brobecker <brobecker@adacore.com>
8975
8976 * terminal.h: Reformat copyright header.
8977
67827812
JB
89782012-01-02 Joel Brobecker <brobecker@adacore.com>
8979
8980 * server.c (gdbserver_version): Update copyright year.
8981 * gdbreplay.c (gdbreplay_version): Likewise.
8982
3e52c33d
JK
89832011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8984
8985 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8986
8987 Revert:
8988 2011-12-18 Hui Zhu <teawater@gmail.com>
8989 * linux-low.c (linux_create_inferior): Save return value to ret.
8990
66f1260e
HZ
89912011-12-18 Hui Zhu <teawater@gmail.com>
8992
8993 * linux-low.c (linux_create_inferior): Save return value to ret.
8994
e77616d7
DE
89952011-12-16 Doug Evans <dje@google.com>
8996
e7b06c57
DE
8997 * linux-low.c (linux_create_inferior): If stdio connection,
8998 redirect stdin from /dev/null, stdout to stderr.
8999 * remote-utils.c (remote_is_stdio): New static global.
9000 (remote_connection_is_stdio): New function.
9001 (remote_prepare): Handle stdio connection.
9002 (remote_open): Ditto.
9003 (remote_close): Don't close stdin for stdio connections.
9004 (read_prim,write_prim): New functions. Replace all calls to
9005 read/write to these.
9006 * server.c (main): Watch for "-" argument. Move call to
9007 remote_prepare before start_inferior.
9008 * server.h (STDIO_CONNECTION_NAME): New macro.
9009 (remote_connection_is_stdio): Declare.
9010
e77616d7
DE
9011 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9012 in debugging output.
9013
82067193
YQ
90142011-12-15 Yao Qi <yao@codesourcery.com>
9015
9016 * tracepoint.c: Include sys/syscall.h.
9017 (gdb_ust_thread): Remove preprocessor conditional.
9018
82bfbe7e
PA
90192011-12-14 Pedro Alves <pedro@codesourcery.com>
9020
9021 * linux-low.c (linux_detach_one_lwp): Call
9022 the_low_target.prepare_to_resume before detaching.
9023
712c6575
YQ
90242011-12-14 Yao Qi <yao@codesourcery.com>
9025
9026 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9027 of write.
9028
d54d1edf
YQ
90292011-12-14 Yao Qi <yao@codesourcery.com>
9030
9031 * i386-low.c (i386_low_stopped_data_address): Initialize local
9032 variable `control'.
9033
6210a125
PA
90342011-12-13 Pedro Alves <pedro@codesourcery.com>
9035
9036 PR remote/13492
9037
9038 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9039 DR_CONTROL unless necessary. Extend comments.
9040 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9041 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9042
2ece8244
YQ
90432011-12-13 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9046 macros.
9047 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9048
784867a5
JK
90492011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9050
9051 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9052 Print new debug message for such case.
9053
6bf36717
JK
90542011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9055
9056 Fix overlapping memcpy.
9057 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9058 the read_inferior_memory transfer.
9059 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9060 write_inferior_memory transfer.
9061 (set_fast_tracepoint_jump): New variable buf. Use it for the
9062 read_inferior_memory and write_inferior_memory transfers.
9063 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9064 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9065 Use it for the write_inferior_memory transfer.
9066 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9067 buffers.
9068
50275556
MR
90692011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9070
9071 * linux-low.c (fetch_register, store_register): Make code
9072 consistent, fix formatting.
9073
7325beb4
MR
90742011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9075
9076 * linux-low.c (usr_store_inferior_registers): Factor out code
9077 to handle individual registers into...
9078 (store_register): ... this new function.
9079
c642a434
UW
90802011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9081
9082 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9083 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9084 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9085 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9086 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9087 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9088 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9089 (srv_xmlfiles): Add new XML files.
9090
9091 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9092 and <sys/uio.h>.
9093 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9094 (init_registers_s390_linux32v1): Add prototype.
9095 (init_registers_s390_linux32v2): Likewise.
9096 (init_registers_s390_linux64v1): Likewise.
9097 (init_registers_s390_linux64v2): Likewise.
9098 (init_registers_s390x_linux64v1): Likewise.
9099 (init_registers_s390x_linux64v2): Likewise.
9100 (s390_num_regs): Increment to 52.
9101 (s390_regmap): Add orig_r2 register.
9102 (s390_num_regs_3264): Increment to 68.
9103 (s390_regmap_3264): Add orig_r2 register.
9104 (s390_collect_ptrace_register): Handle orig_r2 register.
9105 (s390_supply_ptrace_register): Likewise.
9106 (s390_fill_last_break): New function.
9107 (s390_store_last_break): Likewise.
9108 (s390_fill_system_call): New function.
9109 (s390_store_system_call): Likewise.
9110 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9111 register sets.
9112 (s390_check_regset): New function.
9113 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9114 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9115 Update target_regsets for available register sets.
9116
2268b414
JK
91172011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9118 Jan Kratochvil <jan.kratochvil@redhat.com>
9119
9120 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9121 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9122 New.
9123 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9124 * linux-low.h (struct process_info_private): New member r_debug.
9125 * server.c (handle_qxfer_libraries): Call
9126 the_target->qxfer_libraries_svr4.
9127 (handle_qxfer_libraries_svr4): New function.
9128 (qxfer_packets): New entry "libraries-svr4".
9129 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9130 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9131 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9132 PACKET_qXfer_libraries_svr4.
9133
d6db1fab
UW
91342011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9135
9136 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9137 PSW address/mask between 8-byte and 16-byte formats.
9138 (s390_supply_ptrace_register): Likewise.
9139 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9140 basic addressing mode bit.
9141
242f5f1c
SS
91422011-11-24 Stan Shebs <stan@codesourcery.com>
9143
9144 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9145
f196051f
SS
91462011-11-17 Stan Shebs <stan@codesourcery.com>
9147
9148 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9149 (tracing_start_time): New global.
9150 (tracing_stop_time): New global.
9151 (tracing_user_name): New global.
9152 (tracing_notes): New global.
9153 (tracing_stop_note): New global.
9154 (cmd_qtstart): Set traceframe_usage, start_time.
9155 (stop_tracing): Set stop_time.
9156 (cmd_qtstatus): Report additional status.
9157 (cmd_qtp): New function.
9158 (handle_tracepoint_query): Call it.
9159 (cmd_qtnotes): New function.
9160 (handle_tracepoint_general_set): Call it.
9161 (get_timestamp): Rename from tsv_get_timestamp.
9162
405f8e94
SS
91632011-11-14 Stan Shebs <stan@codesourcery.com>
9164 Kwok Cheung Yeung <kcy@codesourcery.com>
9165
9166 * linux-x86-low.c (small_jump_insn): New.
9167 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9168 trampoline and error message, build a trampoline and issue a small
9169 jump instruction to it.
9170 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9171 trampoline and error message.
9172 (x86_get_min_fast_tracepoint_insn_len): New.
9173 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9174 * linux-low.h (struct linux_target_ops): Add arguments to
9175 install_fast_tracepoint_jump_pad operation, add new operation.
9176 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9177 arguments.
9178 (linux_get_min_fast_tracepoint_insn_len): New function.
9179 (linux_target_op): Add new operation.
9180 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9181 (gdb_trampoline_buffer_end): Ditto.
9182 (gdb_trampoline_buffer_error): Ditto.
9183 (struct ipa_sym_addresses): Add fields for new IPA variables.
9184 (symbol_list): Add entries for new IPA variables.
9185 (struct tracepoint): Add fields to hold the address range of the
9186 trampoline used by the tracepoint.
9187 (trampoline_buffer_head): New static variable.
9188 (trampoline_buffer_tail): Ditto.
9189 (claim_trampoline_space): New function.
9190 (have_fast_tracepoint_trampoline_buffer): New function.
9191 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9192 structure.
9193 (install_fast_tracepoint): Ditto, also add error buffer argument.
9194 (cmd_qtminftpilen): New function.
9195 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9196 (fast_tracepoint_from_trampoline_address): New function.
9197 (fast_tracepoint_collecting): Handle trampoline as part of jump
9198 pad space.
9199 (set_trampoline_buffer_space): New function.
9200 (initialize_tracepoint): Initialize new IPA variables.
9201 * target.h (struct target_ops): Add arguments to
9202 install_fast_tracepoint_jump_pad operation, add new
9203 get_min_fast_tracepoint_insn_len operation.
9204 (target_get_min_fast_tracepoint_insn_len): New.
9205 (install_fast_tracepoint_jump_pad): Add arguments.
9206 * server.h (IPA_BUFSIZ): Define.
9207 * linux-i386-ipa.c: Include extra header files.
9208 (initialize_fast_tracepoint_trampoline_buffer): New function.
9209 (initialize_low_tracepoint): Call it.
9210 * server.h (set_trampoline_buffer_space): Declare.
9211 (claim_trampoline_space): Ditto.
9212 (have_fast_tracepoint_trampoline_buffer): Ditto.
9213
1e4d1764
YQ
92142011-11-14 Yao Qi <yao@codesourcery.com>
9215
9216 * server.c (handle_query): Handle InstallInTrace for qSupported.
9217 * tracepoint.c (add_tracepoint): Sort list.
9218 (install_tracepoint, download_tracepoint): New.
9219 (cmd_qtdp): Call them to install and download tracepoints.
9220 (sort_tracepoints): Removed.
9221 (cmd_qtstart): Update.
9222
5c73ff4e
YQ
92232011-11-14 Yao Qi <yao@codesourcery.com>
9224
9225 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9226 * mem-break.h: Declare.
9227 * tracepoint.c (cmd_qtstart): Move some code to ...
9228 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9229 New.
9230 (download_tracepoints): Move some code to ...
9231 (download_tracepoint_1): ... here. New.
9232
86a30030
YQ
92332011-11-08 Yao Qi <yao@codesourcery.com>
9234
9235 * remote-utils.c (relocate_instruction): A comment fix.
9236
8d26e50c
JB
92372011-11-07 Joel Brobecker <brobecker@adacore.com>
9238
9239 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9240 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9241 dr_status_mirror and dr_control_mirror from debug_reg_state.
9242 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9243 (i386_initial_stuff): Remove use of deleted globals.
9244 (i386_get_thread_context, i386_set_thread_context,
9245 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9246 from debug_reg_state.
9247
a59306a3
YQ
92482011-11-05 Yao Qi <yao@codesourcery.com>
9249
9250 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9251 address as TPOINT's.
9252
3065dfb6
SS
92532011-11-02 Stan Shebs <stan@codesourcery.com>
9254
9255 * tracepoint.c (agent_mem_read_string): New function.
9256 (eval_agent_expr): Call it for tracenz.
9257 * server.c (handle_query): Report support for tracenz.
9258
fd0d8c7c
YQ
92592011-11-02 Yao Qi <yao@codesourcery.com>
9260
9261 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9262
609086b1
YQ
92632011-11-02 Yao Qi <yao@codesourcery.com>
9264
9265 * target.h: Fix a typo in comment.
9266
b9fd1791
PA
92672011-10-31 Pedro Alves <pedro@codesourcery.com>
9268
9269 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9270 clobber the breakpoints' shadows with fast tracepoint jumps.
9271 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9272 * target.c (write_inferior_memory): Also pass MYADDR down to
9273 check_mem_write.
9274
03583c20
UW
92752011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9276
9277 * configure.ac: Check support for personality routine.
9278 * configure: Regenerate.
9279 * config.in: Likewise.
9280 * linux-low.c: Include <sys/personality.h>.
9281 Define ADDR_NO_RANDOMIZE if necessary.
9282 (linux_create_inferior): Disable address space randomization when
9283 forking inferior, if requested.
9284 (linux_supports_disable_randomization): New function.
9285 (linux_target_ops): Install it.
9286 * server.h (disable_randomization): Declare.
9287 * server.c (disable_randomization): New global variable.
9288 (handle_general_set): Handle QDisableRandomization.
9289 (handle_query): Likewise for qSupported.
9290 (main): Support --disable-randomization and --no-disable-randomization
9291 command line arguments.
9292 * target.h (struct target_ops): Add supports_disable_randomization.
9293 (target_supports_disable_randomization): New macro.
9294
723b724b
MF
92952011-09-29 Mike Frysinger <vapier@gentoo.org>
9296
9297 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9298 ifdef check.
9299 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9300 [!PT_GETDSBT] (target_loadmap): New definition.
9301 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9302 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9303 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9304 and PT_GETDSBT to LINUX_LOADMAP.
9305 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9306 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9307
55329a5c 93082011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9309
9310 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9311 (arm_linux_hwbp_cap): New static variable.
9312 (arm_linux_get_hwbp_cap): Replace by ...
9313 (arm_linux_init_hwbp_cap): ... this new function.
9314 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9315 (arm_linux_get_hw_watchpoint_count): Likewise.
9316 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9317 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9318 (arm_prepare_to_resume): Use perror_with_name instead of error.
9319
55329a5c 93202011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9321
9322 * linux-arm-low.c: Include <signal.h>.
9323 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9324 (struct arm_linux_hwbp_cap): New data type.
9325 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9326 (struct arm_linux_hw_breakpoint): New data type.
9327 (MAX_BPTS, MAX_WPTS): Define.
9328 (struct arch_process_info, struct arch_lwp_info): New data types.
9329 (arm_linux_get_hwbp_cap): New function.
9330 (arm_linux_get_hw_breakpoint_count): Likewise.
9331 (arm_linux_get_hw_watchpoint_count): Likewise.
9332 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9333 (arm_hwbp_control_initialize): Likewise.
9334 (arm_hwbp_control_is_enabled): Likewise.
9335 (arm_hwbp_control_is_initialized): Likewise.
9336 (arm_hwbp_control_disable): Likewise.
9337 (arm_linux_hw_breakpoint_equal): Likewise.
9338 (arm_linux_hw_point_initialize): Likewise.
9339 (struct update_registers_data): New data structure.
9340 (update_registers_callback: New function.
9341 (arm_insert_point): Likewise.
9342 (arm_remove_point): Likewise.
9343 (arm_stopped_by_watchpoint): Likewise.
9344 (arm_stopped_data_address): Likewise.
9345 (arm_new_process): Likewise.
9346 (arm_new_thread): Likewise.
9347 (arm_prepare_to_resume): Likewise.
9348 (the_low_target): Register arm_insert_point, arm_remove_point,
9349 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9350 arm_new_thread, and arm_prepare_to_resume.
9351
6b9801d4
SS
93522011-09-15 Stan Shebs <stan@codesourcery.com>
9353
9354 * server.h (struct emit_ops): Add compare-goto fields.
9355 * tracepoint.c (gdb_agent_op_sizes): New table.
9356 (emit_eq_goto): New function.
9357 (emit_ne_goto): New function.
9358 (emit_lt_goto): New function.
9359 (emit_le_goto): New function.
9360 (emit_gt_goto): New function.
9361 (emit_ge_goto): New function.
9362 (is_goto_target): New function.
9363 (compile_bytecodes): Recognize special cases of compare-goto
9364 combinations and call specialized emitters for them.
9365 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9366 (amd64_emit_ne_goto): New function.
9367 (amd64_emit_lt_goto): New function.
9368 (amd64_emit_le_goto): New function.
9369 (amd64_emit_gt_goto): New function.
9370 (amd64_emit_ge_goto): New function.
9371 (amd64_emit_ops): Add the new functions.
9372 (i386_emit_eq_goto): New function.
9373 (i386_emit_ne_goto): New function.
9374 (i386_emit_lt_goto): New function.
9375 (i386_emit_le_goto): New function.
9376 (i386_emit_gt_goto): New function.
9377 (i386_emit_ge_goto): New function.
9378 (i386_emit_ops): Add the new functions.
9379
bf15cbda
SS
93802011-09-08 Stan Shebs <stan@codesourcery.com>
9381
9382 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9383 (i386_emit_epilogue): Restore %ebx.
9384
943ca1dd
JZ
93852011-08-31 Jie Zhang <jzhang918@gmail.com>
9386
9387 * server.c (step_thread): Remove definition.
9388 (process_serial_event): Don't handle Hs.
9389 * server.h (step_thread): Remove declaration.
9390 * target.c (set_desired_inferior): Remove use of step_thread.
9391
e3deef73
LM
93922011-08-24 Luis Machado <lgustavo@codesourcery.com>
9393
9394 * linux-low.c: Include linux-procfs.h.
9395 (linux_attach_lwp_1): Update comments.
9396 (linux_attach): Scan for existing threads when attaching to a
9397 process that is the tgid.
9398 * Makefile.in: Update dependencies.
9399
13da1c97
LM
94002011-08-24 Luis Machado <lgustavo@codesourcery.com>
9401
9402 * configure.srv: Add linux-procfs.o dependencies.
9403
881127c9
YQ
94042011-08-14 Yao Qi <yao@codesourcery.com>
9405
9406 * target.h (struct target_ops): Fix indent.
9407 * win32-low.c (win32_target_ops): Fix comment.
9408
58dbd541
YQ
94092011-08-14 Andrew Jenner <andrew@codesourcery.com>
9410 Yao Qi <yao@codesourcery.com>
9411
9412 * Makefile.in (clean): Remove tic6x-*.c files.
9413 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9414 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9415 (tic6x-c64xp-linux.c): Likewise.
9416 * configure.srv: Add support for tic6x-*-uclinux.
9417 * linux-tic6x-low.c: New.
9418 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9419
78d85199
YQ
94202011-08-14 Andrew Stubbs <ams@codesourcery.com>
9421 Yao Qi <yao@codesourcery.com>
9422
9423 * target.h (struct target_ops): Add read_loadmap.
9424 * linux-low.c (struct target_loadseg): New type.
9425 (struct target_loadmap): New type.
9426 (linux_read_loadmap): New function.
9427 (linux_target_ops): Add linux_read_loadmap.
9428 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9429 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9430 to NULL.
78d85199 9431
a959a88d
EZ
94322011-08-05 Eli Zaretskii <eliz@gnu.org>
9433
9434 * win32-low.c: Include <stdint.h>.
9435
1ced966e
PA
94362011-07-22 Pedro Alves <pedro@codesourcery.com>
9437
9438 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9439 to the inferior here.
9440 (i386_remove_aligned_watchpoint): Ditto.
9441 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9442 fit part of the watchpoint in the debug registers.
9443 (i386_update_inferior_debug_regs): New.
9444 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9445 registers, and only update the inferior on success.
9446 (i386_low_remove_watchpoint): Ditto.
9447
d26e3629
KY
94482011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9449
9450 * linux-low.c (compare_ints, unique, list_threads, show_process,
9451 linux_core_of_thread): Delete.
9452 (linux_target_ops): Change linux_core_of_thread to
9453 linux_common_core_of_thread.
9454 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9455 * utils.c (malloc_failure): Change type of argument.
9456 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9457 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9458 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9459 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9460 (IPA_OBJS): Add common-utils-ipa.o.
9461 (ptid_h, linux_osdata_h): New macros.
9462 (server_h): Add common/common-utils.h, common/xml-utils.h,
9463 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9464 common/ptid.h.
9465 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9466 ptid.o, buffer.o): New rules.
9467 (linux-low.o): Add common/linux-osdata.h as a dependency.
9468 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9469 * configure.ac: Add AC_HEADER_DIRENT check.
9470 * config.in: Regenerate.
9471 * configure: Regenerate.
9472 * remote-utils.c (xml_escape_text): Delete.
9473 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9474 buffer_xml_printf): Move to common/buffer.c.
9475 * server.c (main): Remove call to initialize_inferiors.
9476 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9477 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9478 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9479 internal_error, gdb_assert, gdb_assert_fail): Delete.
9480 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9481 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9482 common/buffer.h.
9483 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9484 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9485 initialize_inferiors): Delete.
9486
2275a1a7
PA
94872011-07-20 Pedro Alves <pedro@codesourcery.com>
9488
9489 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9490 symbol error.
9491
0a5b1e09
PA
94922011-05-31 Pedro Alves <pedro@codesourcery.com>
9493
9494 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9495 assertion.
9496 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9497
6938fd34
YQ
94982011-05-26 Yao Qi <yao@codesourcery.com>
9499
9500 * Makefile.in (thread-db.o): Track dependence to
9501 common/gdb_thread_db.h.
9502 * thread-db.c: include gdb_thread_db.h from right place.
9503
b481f9e0
TT
95042011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9505
9506 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9507 __FILE__ and __LINE__ to internal_error.
9508
98a5dd13
DE
95092011-05-13 Doug Evans <dje@google.com>
9510
9511 * thread-db.c (try_thread_db_load_from_sdir): New function.
9512 (try_thread_db_load_from_dir): New function.
9513 (thread_db_load_search): Handle $sdir, ignore $pdir.
9514 Remove trying of system directories if search of
9515 libthread-db-search-path fails, that is now done via $sdir.
9516
d248b706
KY
95172011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9518
9519 * server.c (handle_query): Add EnableDisableTracepoints to the list
9520 of supported features.
43aaf8b6 9521 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9522 tracepoints.
43aaf8b6
PA
9523 (cmd_qtenable_disable): New.
9524 (cmd_qtstart): Install tracepoints even if disabled.
9525 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9526 receiving a QTEnable or QTDisable packet.
9527 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9528 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9529 tracepoints.
9530 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9531
84e578fb
DE
95322011-05-10 Doug Evans <dje@google.com>
9533
9534 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9535
71f55dd8
DE
95362011-05-04 Doug Evans <dje@google.com>
9537
9538 * linux-low.c (linux_join): Skip process lookup.
9539 * spu-low.c (spu_join): Ditto.
9540 * server.c (join_inferiors_callback): Delete.
9541 (process_serial_event): For 'D' packet (detach) call join_inferior
9542 directly.
9543
4d393d60
JM
95442011-05-04 Joseph Myers <joseph@codesourcery.com>
9545
9546 * README: Don't mention xscale*-*-linux*.
9547 * configure.srv (xscale*-*-linux*): Don't handle target.
9548
b00ad6ff
NF
95492011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9550
9551 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9552 casting pointers.
9553 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9554 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9555 (i386_emit_void_call_2): Likewise.
9556
af96c192
YQ
95572011-04-26 Yao Qi <yao@codesourcery.com>
9558
43aaf8b6
PA
9559 * linux-low.c: Move common macros to linux-ptrace.h.
9560 Include linux-ptrace.h.
af96c192
YQ
9561 * Makefile.in (linux_ptrace_h): New.
9562 (linux-low.o): Depends on linux-ptrace.h.
9563
03f2bd59
JK
95642011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9565
9566 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9567 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9568 (remote_prepare): New function with most of the TCP code from ...
9569 (remote_open): ... here. Detect PORT here unconditionally. Move also
9570 setting transport_is_reliable.
9571 * server.c (run_once): New variable.
9572 (gdbserver_usage): Document it.
9573 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9574 the first run if RUN_ONCE.
9575 * server.h (run_once, remote_prepare): New declarations.
9576
7a9dd1b2
TT
95772011-04-19 Tom Tromey <tromey@redhat.com>
9578
9579 * win32-low.c (handle_load_dll): Remove duplicate "the".
9580
81239425
PM
95812011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9582
9583 Remove support for old Cygwin 1.5 versions.
9584 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9585 function to avoid warning.
9586 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9587 warning.
9588
9e0627f1
PM
95892011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9590
9591 * gdbserver/server.h (Macro _): Define it if not available.
9592
588eebee
MS
95932011-03-14 Michael Snyder <msnyder@vmware.com>
9594
348af9f7 9595 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9596
43f70d4c
JB
95972011-03-10 Joel Brobecker <brobecker@adacore.com>
9598
9599 * Makefile.in (maintainer-clean realclean distclean): Remove
9600 "make ... subdir_do" command.
9601
348af9f7
MS
96022011-03-10 Michael Snyder <msnyder@vmware.com>
9603
9604 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9605
9606 * server.c (handle_v_run): Free alloced buffer on early return.
9607
e637a4f5
YQ
96082011-03-09 Yao Qi <yao@codesourcery.com>
9609
9610 Revert:
9611 2011-03-04 Yao Qi <yao@codesourcery.com>
9612
9613 * Makefile.in: Remove GNU make feature --directory.
9614
9615 2011-03-05 Yao Qi <yao@codesourcery.com>
9616
9617 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9618 (subdir_do): New make target. Copied from gdb/Makefile.
9619 (maintainer-clean, realclean, distclean, clean): Call corresponding
9620 make targets in common/Makefile.
9621
9622 2011-02-11 Yao Qi <yao@codesourcery.com>
9623
9624 * configure.ac: Call AC_PROG_RANLIB.
9625 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9626 * configure: Regenerate.
9627
e6edda56
JK
96282011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9629
9630 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9631
e5141119
JB
96322011-03-06 Yao Qi <yao@codesourcery.com>
9633
9634 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9635
64794aa4
JB
96362011-03-05 Yao Qi <yao@codesourcery.com>
9637
9638 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9639 (subdir_do): New make target. Copied from gdb/Makefile.
9640 (maintainer-clean, realclean, distclean, clean): Call corresponding
9641 make targets in common/Makefile.
9642
7a762829
YQ
96432011-03-04 Yao Qi <yao@codesourcery.com>
9644
9645 * Makefile.in: Remove GNU make feature --directory.
9646
348af9f7
MS
96472011-03-04 Michael Snyder <msnyder@vmware.com>
9648
9649 * server.c (queue_stop_reply): Call xmalloc not malloc.
9650
96512011-03-02 Michael Snyder <msnyder@vmware.com>
9652
9653 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9654
9f72fee2
MS
96552011-02-28 Michael Snyder <msnyder@vmware.com>
9656
588eebee
MS
9657 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9658 (cmd_qtframe): Ditto.
9659 (cmd_qtbuffer): Ditto.
9660 (cmd_bigqtbuffer): Ditto.
9661
9f72fee2
MS
9662 * utils.c (decimal2str): Initialize 'width' to nine, then
9663 don't mess with it.
9664
8040bd49
UW
96652011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9666
9667 * hostio.c (require_data): Free *data, not data.
9668
7e52cbd0
JK
96692011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9670
9671 * hostio.c (require_data): Use free, not xfree.
9672
9130f83e
MS
96732011-02-27 Michael Snyder <msnyder@vmware.com>
9674
4b812f4e
MS
9675 * server.c (handle_query): Discard unused value.
9676
9130f83e
MS
9677 * hostio.c (require_data): Free malloc memory before returning
9678 error.
9679
69d37113
MS
96802011-02-26 Michael Snyder <msnyder@vmware.com>
9681
9682 * linux-low.c (list_threads): Call closedir for dirent.
9683
35f5825a
MS
96842011-02-27 Michael Snyder <msnyder@vmware.com>
9685
2a589cef
MS
9686 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9687 a case statement falls through.
9688
0adea5f7
MS
9689 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9690
35f5825a
MS
9691 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9692 in comparison.
9693
238f1c74
MS
96942011-02-26 Michael Snyder <msnyder@vmware.com>
9695
9696 * utils.c (decimal2str): Eliminate dead code and dead param.
9697 (pulongest): Drop dead param from call to decimal2str.
9698 (plongest): Ditto.
9699
633ff500
JB
97002011-02-24 Joel Brobecker <brobecker@adacore.com>
9701
9702 Revert the following patch (not approved yet):
9703 2011-02-21 Hui Zhu <teawater@gmail.com>
9704 * tracepoint.c (tp_printf): New function.
9705 (eval_agent_expr): Handle gdb_agent_op_printf.
9706
f9c6ff72
HZ
97072011-02-21 Hui Zhu <teawater@gmail.com>
9708
9709 * tracepoint.c (tp_printf): New function.
9710 (eval_agent_expr): Handle gdb_agent_op_printf.
9711
94d5e490
TT
97122011-02-18 Tom Tromey <tromey@redhat.com>
9713
9714 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9715 (tracepoint.o): Likewise.
9716 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9717 (gdb_agent_op_names): Likewise.
9718
c7f96d2b
TT
97192011-02-18 Tom Tromey <tromey@redhat.com>
9720
9721 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9722 gdb_agent_op_rot>: New constants.
9723 (gdb_agent_op_names): Add pick and roll.
9724 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9725 cases.
9726
0feedb2c
JK
97272011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9728
9729 * aclocal.m4: Regenerated with aclocal-1.11.1.
9730
b3b9301e
PA
97312011-02-14 Pedro Alves <pedro@codesourcery.com>
9732
9733 * server.c (handle_qxfer_traceframe_info): New.
9734 (qxfer_packets): Register "traceframe-info".
9735 (handle_query): Report support for qXfer:traceframe-info:read+.
9736 * tracepoint.c (match_blocktype): New.
9737 (traceframe_find_block_type): Rename to ...
9738 (traceframe_walk_blocks): ... this. Add callback filter argument,
9739 and use it.
9740 (traceframe_find_block_type): New, reimplemented on top of
9741 traceframe_walk_blocks.
9742 (build_traceframe_info_xml): New.
9743 (traceframe_read_info): New.
9744 * server.h (traceframe_read_info): Declare.
9745
4f3e6fb7
YQ
97462011-02-11 Yao Qi <yao@codesourcery.com>
9747
9748 * configure.ac: Call AC_PROG_RANLIB.
9749 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9750 * configure: Regenerate.
9751
764880b7
PA
97522011-02-07 Pedro Alves <pedro@codesourcery.com>
9753
9754 * server.c (gdb_read_memory): Change return semantics to allow
9755 partial transfers.
9756 (handle_search_memory_1): Adjust.
9757 (process_serial_event) <'m' packet>: Handle partial transfers.
9758 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9759
1c79eb8a
PA
97602011-01-28 Pedro Alves <pedro@codesourcery.com>
9761
9762 * regcache.c (init_register_cache): Initialize
9763 regcache->register_status.
9764 (free_register_cache): Release regcache->register_status.
9765 (regcache_cpy): Copy register_status.
9766 (registers_to_string): Print 'x's for unavailable registers.
9767 (supply_register): Mark the register's status valid or
9768 unavailable, depending on whether a buffer was passed in or not.
9769 (supply_register_zeroed): New.
9770 (supply_regblock): Mark the registers' status valid or
9771 unavailable, depending on whether a buffer was passed in or not.
9772 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9773 (struct regcache): New `register_status' field.
9774 (supply_register_zeroed): Declare.
9775 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9776 supply_register_zeroed, rather than passing a NULL buffer to
9777 supply_register.
9778 * tracepoint.c (fetch_traceframe_registers): Update comment.
9779
85724a0e
PA
97802011-01-28 Pedro Alves <pedro@codesourcery.com>
9781
9782 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9783 buffer explicit.
9784
d08aafef
PA
97852011-01-25 Pedro Alves <pedro@codesourcery.com>
9786
9787 * server.h (decode_xfer_write): Change prototype.
9788 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9789 and don't extract the annex here.
9790 * server.c (decode_xfer_read): Remove `annex' parameter,
9791 and don't extract the annex here.
9792 (decode_xfer): New.
9793 (struct qxfer): New.
9794 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9795 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9796 (handle_qxfer_statictrace): New functions, abstracted out from
9797 handle_query, and made to use the struct qxfer interface.
9798 (handle_threads_qxfer_proper): Rename to ...
9799 (handle_qxfer_threads_proper): ... this.
9800 (handle_threads_qxfer): Rename to ...
9801 (handle_qxfer_threads): ... this. Adjust.
9802 (qxfer_packets): New array.
9803 (handle_qxfer): New function.
9804 (handle_query): Use handle_qxfer.
9805
493e2a69
MS
98062011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9807
9808 * gdbreplay.c: Shorten lines of >= 80 columns.
9809 * linux-low.c: Ditto.
9810 * linux-ppc-low.c: Ditto.
9811 * linux-s390-low.c: Ditto.
9812 * linux-sparc-low.c: Ditto.
9813 * linux-x86-low.c: Ditto.
9814 * linux-xtensa-low.c: Ditto.
9815 * mem-break.c: Ditto.
9816 * nto-low.c: Ditto.
9817 * regcache.h: Ditto.
9818 * remote-utils.c: Ditto.
9819 * server.c: Ditto.
9820 * server.h: Ditto.
9821 * thread-db.c: Ditto.
9822 * tracepoint.c: Ditto.
9823 * utils.c: Ditto.
9824 * win32-low.h: Ditto.
9825
44944448
JB
98262011-01-05 Joel Brobecker <brobecker@adacore.com>
9827
9828 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9829 update.
9830
71ce852c
JB
98312011-01-01 Joel Brobecker <brobecker@adacore.com>
9832
9833 * server.c (gdbserver_version): Update copyright year in version
9834 output.
9835 * gdbreplay.c (gdbreplay_version): Ditto.
9836
eb826dc6
MF
98372010-12-29 Jie Zhang <jie.zhang@analog.com>
9838
9839 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9840 * linux-bfin-low.c: New file.
9841 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9842 PT_DATA_ADDR for BFIN targets.
9843 * Makefile.in (SFILES): Add linux-bfin-low.c.
9844 (clean): Remove reg-bfin.c.
9845 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9846 * README: Mention supported Blackfin targets.
9847
39ab222a
MF
98482010-12-23 Mike Frysinger <vapier@gentoo.org>
9849
9850 * .gitignore: New file.
9851
a1f2ce7d
MF
98522010-11-16 Mike Frysinger <vapier@gentoo.org>
9853
9854 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9855
f474844c
JZ
98562010-10-22 Jie Zhang <jie@codesourcery.com>
9857
9858 * Makefile.in: Add FLAGS_TO_PASS variable.
9859 (install): Remove dependency of install-only and recursively
9860 invoke make for install-only.
9861
f1048712
DE
98622010-10-04 Doug Evans <dje@google.com>
9863
9864 * Makefile.in (uninstall): Use $(DESTDIR).
9865
b53a1623
PA
98662010-09-24 Pedro Alves <pedro@codesourcery.com>
9867
e6ee044d
PA
9868 PR gdb/11842
9869
b53a1623
PA
9870 * linux-x86-low.c (compat_siginfo_from_siginfo)
9871 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9872 si_code is < 0. Check for si_code == SI_TIMER before checking for
9873 si_code < 0.
9874
fa1bd1e4
JB
98752010-09-13 Joel Brobecker <brobecker@adacore.com>
9876
9877 * lynx-i386-low.c: New file.
9878 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9879
47fac8f8
JB
98802010-09-13 Joel Brobecker <brobecker@adacore.com>
9881
9882 * lynx-low.c (ptrace_request_to_str): Remove handling for
9883 request values that have been removed in LynxOS 5.x.
9884
1adfc54d
JB
98852010-09-13 Joel Brobecker <brobecker@adacore.com>
9886
9887 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9888 <ptrace.h>
9889
c2a66c29
NS
98902010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9891
9892 * configure.ac: Add --enable-inprocess-agent option.
9893 * configure: Rebuilt.
9894
32fcada3
YQ
98952010-09-06 Yao Qi <yao@codesourcery.com>
9896
9897 * linux-low.c (linux_kill): Remove unused variable.
9898 (linux_stabilize_threads): Likewise.
9899 * server.c (start_inferior): Likewise.
9900 (queue_stop_reply_callback): Likewise.
9901 * tracepoint.c (do_action_at_tracepoint): Likewise.
9902
0cccb683
YQ
99032010-09-06 Yao Qi <yao@codesourcery.com>
9904
9905 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9906 on return.
9907
423ec54c
JK
99082010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9909
9910 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9911
12ac6819
PA
99122010-09-06 Pedro Alves <pedro@codesourcery.com>
9913
9914 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9915 "$(IPA_DEPFILES)".
9916
8ed54b31
JB
99172010-09-01 Joel Brobecker <brobecker@adacore.com>
9918
9919 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9920 gdbserver/lynx-ppc-low.c: New files.
9921 * Makefile.in (lynx_low_h): New variable.
9922 (lynx-low.o, lynx-ppc-low.o): New rules.
9923 * configure.ac: On LynxOS, link with -lnetinet.
9924 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9925 * configure: regenerate.
9926
bb0116a4
JB
99272010-09-01 Joel Brobecker <brobecker@adacore.com>
9928
9929 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9930 * configure.ac: Add check for vasprintf and vsnprintf.
9931 * configure, config.in: Regenerate.
9932 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9933
a778ab81 99342010-09-01 Joel Brobecker <brobecker@adacore.com>
9935
9936 * gdbreplay.c: Move include of alloca.h up, next to include of
9937 malloc.h.
9938 * server.h: Add include of malloc.h.
9939 * mem-break.c: Remove include of malloc.h.
9940 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9941
8b034a19 99422010-09-01 Joel Brobecker <brobecker@adacore.com>
9943
9944 * Makefile.in (memmem.o): Build with -Wno-error.
9945
99462010-09-01 Joel Brobecker <brobecker@adacore.com>
9947
9948 * utils.c (xsnprintf): Make non-static.
9949 * server.h: Add xsnprintf declaration.
9950 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9951 replace calls to snprintf by calls to xsnprintf throughout.
9952
99532010-09-01 Joel Brobecker <brobecker@adacore.com>
9954
9955 * configure.ac: Add configure check for alloca.
9956 * configure, config.in: Regenerate.
9957 * server.h: Include alloca.h if it exists.
9958 * gdbreplay.c: Include alloca.h if it exists.
9959
1a981360
PA
99602010-08-28 Pedro Alves <pedro@codesourcery.com>
9961
9962 * linux-low.c (__SIGRTMIN): Define if not already defined.
9963 (linux_create_inferior): Check for __ANDROID__ rather than
9964 __SIGRTMIN.
9965 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9966 are already deferred.
9967 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9968 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9969 stopped and already has a pending signal to report.
9970 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9971 a pending signal to report or is moving out of a jump pad.
9972 (linux_init_signals): Check for __ANDROID__ rather than
9973 __SIGRTMIN.
9974
b4d51a55
PA
99752010-08-28 Pedro Alves <pedro@codesourcery.com>
9976
9977 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9978 debug_threads check. Avoid a linear search when not doing debug
9979 output.
9980
ec48365d
PA
99812010-08-27 Pedro Alves <pedro@codesourcery.com>
9982
9983 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9984 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9985 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9986 (process_event): Change local fd's type to gdb_fildes_t.
9987 (create_file_handler): Adjust prototype.
9988 (delete_file_handler): Adjust prototype.
9989 (handle_file_event): Adjust prototype. Use pfildes.
9990 (create_file_event): Adjsut prototype.
9991 * remote-utils.c (remote_desc, listen_desc): Change type to
9992 gdb_fildes_t.
9993 * server.h: New gdb_fildes_t typedef.
9994 [USE_WIN32API]: Include winsock2.h.
9995 (delete_file_handler, add_file_handler): Adjust prototypes.
9996 (pfildes): Declare.
9997 * utils.c (pfildes): New.
9998
854d88f0
PA
99992010-08-27 Pedro Alves <pedro@codesourcery.com>
10000
10001 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10002 * configure: Regenerate.
10003
0146f85b
PA
100042010-08-27 Pedro Alves <pedro@codesourcery.com>
10005
10006 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10007 (linux_done_accessing_memory): ... this.
10008 (linux_target_ops): Adjust.
10009 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10010 * nto-low.c (nto_target_ops): Adjust comment.
10011 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10012 * spu-low.c (spu_target_ops): Adjust comment.
10013 * target.h (target_ops): Rename unprepare_to_access_memory field
10014 to done_accessing_memory.
10015 (unprepare_to_access_memory): Rename to ...
10016 (done_accessing_memory): ... this.
10017
90d74c30
PA
100182010-08-26 Pedro Alves <pedro@codesourcery.com>
10019
10020 * linux-low.c (linux_prepare_to_access_memory): New.
10021 (linux_unprepare_to_access_memory): New.
10022 (linux_target_ops): Install them.
10023 * server.c (read_memory): Rename to ...
10024 (gdb_read_memory): ... this. Use
10025 prepare_to_access_memory/prepare_to_access_memory.
10026 (write_memory): Rename to ...
10027 (gdb_write_memory): ... this. Use
10028 prepare_to_access_memory/prepare_to_access_memory.
10029 (handle_search_memory_1): Adjust.
10030 (process_serial_event): Adjust.
10031 * target.h (struct target_ops): New fields
10032 prepare_to_access_memory and unprepare_to_access_memory.
10033 (prepare_to_access_memory, unprepare_to_access_memory): New.
10034 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10035 prepare_to_access_memory/prepare_to_access_memory.
10036 * nto-low.c (nto_target_ops): Adjust.
10037 * spu-low.c (spu_target_ops): Adjust.
10038 * win32-low.c (win32_target_ops): Adjust.
10039
fd467969
PA
100402010-08-26 Pedro Alves <pedro@codesourcery.com>
10041
10042 * Makefile.in (WARN_CFLAGS): Get it from configure.
10043 (WERROR_CFLAGS): New.
10044 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10045 * configure.ac: Introduce --enable-werror, which adds -Werror to
10046 the compiler command line. Enabled by default. Disable with
10047 --disable-werror. Add -Wdeclaration-after-statement
10048 Wpointer-arith and -Wformat-nonliteral to warning flags.
10049 * configure: Regenerate.
10050
331e2f5f
PA
100512010-08-26 Pedro Alves <pedro@codesourcery.com>
10052
10053 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10054
e581f2b4
PA
100552010-08-26 Pedro Alves <pedro@codesourcery.com>
10056
10057 * gdbreplay.c (remote_error): New.
10058 (gdbchar): New.
10059 (expect): Use gdbchar. Check for error reading from GDB.
10060 Clarify sync error output.
10061 (play): Check for errors writing to GDB.
10062 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10063 * remote-utils.c (getpkt): Check for errors writing to the remote
10064 descriptor.
10065
3c11dd79
PA
100662010-08-25 Pedro Alves <pedro@codesourcery.com>
10067
10068 * linux-low.c (linux_wait_1): Move non-debugging code out of
10069 `debug_threads' control.
10070
d20a8ad9
PA
100712010-08-25 Pedro Alves <pedro@codesourcery.com>
10072
10073 * linux-low.c (linux_wait_1): Don't set last_status here.
10074 * server.c (push_event, queue_stop_reply_callback): Assert we're
10075 not pushing a TARGET_WAITKIND_IGNORE event.
10076 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10077 (myresume, handle_target_event): Set the thread's last_resume_kind
10078 and last_status from the target returned status.
10079
964e4306
PA
100802010-08-25 Pedro Alves <pedro@codesourcery.com>
10081
10082 PR threads/10729
10083
10084 * linux-x86-low.c (update_debug_registers_callback): New.
10085 (i386_dr_low_set_addr): Use it.
10086 (i386_dr_low_get_addr): New.
10087 (i386_dr_low_set_control): Use update_debug_registers_callback.
10088 (i386_dr_low_get_control): New.
10089 (i386_dr_low_get_status): Adjust.
10090 * linux-low.c (linux_stop_lwp): New.
10091 * linux-low.h (linux_stop_lwp): Declare.
10092
10093 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10094 argument instead of a i386_debug_reg_state.
10095 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10096 a i386_debug_reg_state.
10097 (i386_insert_aligned_watchpoint): Adjust.
10098 (i386_remove_aligned_watchpoint): Adjust.
10099 (i386_low_stopped_data_address): Read the debug registers from the
10100 inferior instead of from the mirrors.
10101 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10102 (i386_dr_low_get_addr): Declare.
10103 (i386_dr_low_get_control): Declare.
10104 (i386_dr_low_get_status): Change prototype.
10105
10106 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10107 (i386_dr_low_get_addr): New.
10108 (i386_dr_low_get_control): New.
10109 (i386_dr_low_get_status): Adjust prototype. Return
10110 dr_status_mirror.
10111 (i386_initial_stuff): Clear dr_status_mirror and
10112 dr_control_mirror.
10113 (i386_get_thread_context): Adjust.
10114 (i386_set_thread_context): Adjust.
10115 (i386_thread_added): Adjust.
10116
5f21a75b
PA
101172010-08-24 Pedro Alves <pedro@codesourcery.com>
10118
10119 * linux-low.h (linux_thread_area): Delete declaration.
10120
3e4c1235
TS
101212010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10122
10123 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10124 after its termination.
10125
1971b033
PA
101262010-08-09 Pedro Alves <pedro@codesourcery.com>
10127
10128 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10129 (gdb_wants_all_stopped): Delete.
10130 (linux_wait_1): Don't call them.
10131 * server.c (handle_v_cont): Tag all threads as want-stopped.
10132 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10133 stopped as "client-wants-stopped".
10134
310444ac
PA
101352010-07-31 Pedro Alves <pedro@codesourcery.com>
10136
10137 * Makefile.in (signals_h): New.
10138 (server_h): Depend on it.
10139 (server.o): Don't depend on $(signals_def).
10140 (signals.o): Depend on $(signals_def).
10141
a19cae16
JK
101422010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10143
10144 * Makefile.in (signals_def): New.
10145 (server_h): Append include/gdb/signals.h and signals_def.
10146 (server.o): Append signals_def.
10147
30d50328
JK
101482010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10149
10150 * server.c (handle_target_event): Use target_signal_to_host for
10151 resume_info.sig initialization.
10152 * target.h (struct thread_resume) <sig>: New comment.
10153
5c3216e2
OS
101542010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10155
c6f46ca0
OS
10156 * server.c (handle_query): strcpy() the returned string from paddress()
10157 instead of sprintf().
5c3216e2
OS
10158 * utils.c (paddress): Return phex_nz().
10159
6bd31874
JB
101602010-07-07 Joel Brobecker <brobecker@adacore.com>
10161
10162 * server.c (handle_v_cont): Call mourn_inferior if process
10163 just exited.
10164 (myresume): Likewise.
10165
0fb4aa4b
PA
101662010-07-01 Pedro Alves <pedro@codesourcery.com>
10167
10168 Static tracepoints, and integration with UST.
10169
10170 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10171 * mem-break.c (uninsert_all_breakpoints)
10172 (reinsert_all_breakpoints): New.
10173 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10174 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10175 (gdb_agent_ust_loaded, helper_thread_id)
10176 (gdb_agent_helper_thread_id): New macros.
10177 (struct ipa_sym_addresses): Add addr_ust_loaded,
10178 addr_helper_thread_id, addr_cmd_buf.
10179 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10180 (in_process_agent_loaded_ust): New.
10181 (write_e_ust_not_loaded): New.
10182 (maybe_write_ipa_ust_not_loaded): New.
10183 (struct collect_static_trace_data_action): New.
10184 (enum tracepoint_type) <static_tracepoint>: New.
10185 (struct tracepoint) <handle>: Mention static tracepoints.
10186 (struct static_tracepoint_ctx): New.
10187 (CMD_BUF_SIZE): New.
10188 (add_tracepoint_action): Handle static tracepoint actions.
10189 (unprobe_marker_at): New.
10190 (clear_installed_tracepoints): Handle static tracepoints.
10191 (cmd_qtdp): Handle static tracepoints.
10192 (probe_marker_at): New.
10193 (cmd_qtstart): Handle static tracepoints.
10194 (response_tracepoint): Handle static tracepoints.
10195 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10196 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10197 (get_context_regcache): Handle static tracepoints.
10198 (do_action_at_tracepoint): Handle static tracepoint actions.
10199 (traceframe_find_block_type): Handle static trace data blocks.
10200 (traceframe_read_sdata): New.
10201 (download_tracepoints): Download static tracepoint actions.
10202 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10203 (GDB_PROBE_NAME): New.
10204 (ust_ops): New.
10205 (GET_UST_SYM): New.
10206 (USTF): New.
10207 (dlsym_ust): New.
10208 (ust_marker_to_static_tracepoint): New.
10209 (gdb_probe): New.
10210 (collect_ust_data_at_tracepoint): New.
10211 (gdb_ust_probe): New.
10212 (UNIX_PATH_MAX, SOCK_DIR): New.
10213 (gdb_ust_connect_sync_socket): New.
10214 (resume_thread, stop_thread): New.
10215 (run_inferior_command): New.
10216 (init_named_socket): New.
10217 (gdb_ust_socket_init): New.
10218 (cstr_to_hexstr): New.
10219 (next_st): New.
10220 (first_marker, next_marker): New.
10221 (response_ust_marker): New.
10222 (cmd_qtfstm, cmd_qtsstm): New.
10223 (unprobe_marker_at, probe_marker_at): New.
10224 (cmd_qtstmat, gdb_ust_thread): New.
10225 (gdb_ust_init): New.
10226 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10227 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10228 (ST_REGENTRY): New.
10229 (x86_64_st_collect_regmap): New.
10230 (X86_64_NUM_ST_COLLECT_GREGS): New.
10231 (AMD64_RIP_REGNUM): New.
10232 (supply_static_tracepoint_registers): New.
10233 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10234 (ST_REGENTRY): New.
10235 (i386_st_collect_regmap): New.
10236 (i386_NUM_ST_COLLECT_GREGS): New.
10237 (supply_static_tracepoint_registers): New.
10238 * server.c (handle_query): Handle qXfer:statictrace:read.
10239 <qSupported>: Report support for StaticTracepoints, and
10240 qXfer:statictrace:read features.
10241 * server.h (traceframe_read_sdata)
10242 (supply_static_tracepoint_registers): Declare.
10243 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10244 (unpack_varlen_hex): Include in IPA build.
10245 * Makefile.in (ustlibs, ustinc): New.
10246 (IPA_OBJS): Add remote-utils-ipa.o.
10247 ($(IPA_LIB)): Link -ldl and -lpthread.
10248 (UST_CFLAGS): New.
10249 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10250 * config.in, configure: Regenerate.
10251
9e4344e5
PA
102522010-06-20 Ian Lance Taylor <iant@google.com>
10253 Pedro Alves <pedro@codesourcery.com>
10254
10255 * linux-x86-low.c (always_true): Delete.
10256 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10257 trying to fool the compiler with always_true.
10258
c6beb2cb
PA
102592010-06-20 Pedro Alves <pedro@codesourcery.com>
10260
10261 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10262 conditions in gdbserver.
10263
d2ed6730
UW
102642010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10265
10266 * spu-low.c (spu_read_memory): Wrap around local store limit.
10267 (spu_write_memory): Likewise.
10268
4e29fb54
PA
102692010-06-15 Pedro Alves <pedro@codesourcery.com>
10270
10271 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10272 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10273 LONGEST uses.
10274 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10275 uses.
10276 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10277 uses with LONGEST uses.
10278
6a271cae
PA
102792010-06-14 Stan Shebs <stan@codesourcery.com>
10280 Pedro Alves <pedro@codesourcery.com>
10281
10282 Bytecode compiler.
10283
10284 * linux-x86-low.c: Include limits.h.
10285 (add_insns): New.
10286 (always_true): New.
10287 (EMIT_ASM): New.
10288 (EMIT_ASM32): New.
10289 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10290 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10291 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10292 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10293 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10294 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10295 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10296 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10297 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10298 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10299 (amd64_emit_void_call_2): New.
10300 (amd64_emit_ops): New.
10301 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10302 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10303 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10304 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10305 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10306 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10307 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10308 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10309 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10310 (i386_emit_stack_adjust, i386_emit_int_call_1)
10311 (i386_emit_void_call_2): New.
10312 (i386_emit_ops): New.
10313 (x86_emit_ops): New.
10314 (the_low_target): Install x86_emit_ops.
10315 * server.h (struct emit_ops): New.
10316 (get_raw_reg_func_addr): Declare.
10317 (current_insn_ptr, emit_error): Declare.
10318 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10319 (set_trace_state_variable_value): New defines.
10320 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10321 addr_get_trace_state_variable_value and
10322 addr_set_trace_state_variable_value.
10323 (symbol_list): New fields for get_raw_reg,
10324 get_trace_state_variable_value and set_trace_state_variable_value.
10325 (condfn): New typedef.
10326 (struct tracepoint): New field `compiled_cond'.
10327 (do_action_at_tracepoint): Clear compiled_cond.
10328 (get_trace_state_variable_value, set_trace_state_variable_value):
10329 Export in the IPA.
10330 (condition_true_at_tracepoint): If there's a compiled condition,
10331 run that.
10332 (current_insn_ptr, emit_error): New globals.
10333 (struct bytecode_address): New.
10334 (get_raw_reg_func_addr): New.
10335 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10336 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10337 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10338 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10339 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10340 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10341 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10342 (compile_tracepoint_condition, compile_bytecodes): New.
10343 * target.h (emit_ops): Forward declare.
10344 (struct target_ops): New field emit_ops.
10345 (target_emit_ops): New.
10346 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10347 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10348 * linux-low.c (linux_emit_ops): New.
10349 (linux_target_ops): Install it.
10350 * linux-low.h (struct linux_target_ops): New field emit_ops.
10351
92b72907
UW
103522010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10353
10354 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10355 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10356
fa593d66
PA
103572010-06-01 Pedro Alves <pedro@codesourcery.com>
10358 Stan Shebs <stan@codesourcery.com>
10359
10360 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10361 (all): Depend on $(extra_libraries).
10362 (install-only): Install the IPA.
10363 (IPA_OBJS, IPA_LIB): New.
10364 (clean): Remove the IPA lib.
10365 (IPAGENT_CFLAGS): New.
10366 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10367 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10368 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10369 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10370 * configure.ac: Check for atomic builtins support in the compiler.
10371 (IPA_DEPFILES, extra_libraries): Define.
10372 * configure.srv (ipa_obj): Add description.
10373 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10374 (i[34567]86-*-linux*): Set ipa_obj.
10375 (x86_64-*-linux*): Set ipa_obj.
10376 * linux-low.c (stabilizing_threads): New.
10377 (supports_fast_tracepoints): New.
10378 (linux_detach): Stabilize threads before detaching.
10379 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10380 the lwp is either not stabilizing, or is moving out of a jump pad.
10381 (linux_fast_tracepoint_collecting): New.
10382 (maybe_move_out_of_jump_pad): New.
10383 (enqueue_one_deferred_signal): New.
10384 (dequeue_one_deferred_signal): New.
10385 (linux_wait_for_event_1): If moving out of a jump pad, defer
10386 pending signals to later.
10387 (linux_stabilize_threads): New.
10388 (linux_wait_1): Check if threads need moving out of jump pads, and
10389 do it if so.
10390 (stuck_in_jump_pad_callback): New.
10391 (move_out_of_jump_pad_callback): New.
10392 (lwp_running): New.
10393 (linux_resume_one_lwp): Handle moving out of jump pads.
10394 (linux_set_resume_request): Dequeue deferred signals.
10395 (need_step_over_p): Also step over fast tracepoint jumps.
10396 (start_step_over): Also uninsert fast tracepoint jumps.
10397 (finish_step_over): Also reinsert fast tracepoint jumps.
10398 (linux_install_fast_tracepoint_jump): New.
10399 (linux_target_ops): Install linux_stabilize_threads and
10400 linux_install_fast_tracepoint_jump_pad.
10401 * linux-low.h (linux_target_ops) <get_thread_area,
10402 install_fast_tracepoint_jump_pad>: New fields.
10403 (struct lwp_info) <collecting_fast_tracepoint,
10404 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10405 (linux_get_thread_area): Declare.
10406 * linux-x86-low.c (jump_insn): New.
10407 (x86_get_thread_area): New.
10408 (append_insns): New.
10409 (push_opcode): New.
10410 (amd64_install_fast_tracepoint_jump_pad): New.
10411 (i386_install_fast_tracepoint_jump_pad): New.
10412 (x86_install_fast_tracepoint_jump_pad): New.
10413 (the_low_target): Install x86_get_thread_area and
10414 x86_install_fast_tracepoint_jump_pad.
10415 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10416 (struct fast_tracepoint_jump): New.
10417 (fast_tracepoint_jump_insn): New.
10418 (fast_tracepoint_jump_shadow): New.
10419 (find_fast_tracepoint_jump_at): New.
10420 (fast_tracepoint_jump_here): New.
10421 (delete_fast_tracepoint_jump): New.
10422 (set_fast_tracepoint_jump): New.
10423 (uninsert_fast_tracepoint_jumps_at): New.
10424 (reinsert_fast_tracepoint_jumps_at): New.
10425 (set_breakpoint_at): Use write_inferior_memory.
10426 (uninsert_raw_breakpoint): Use write_inferior_memory.
10427 (check_mem_read): Mask out fast tracepoint jumps.
10428 (check_mem_write): Mask out fast tracepoint jumps.
10429 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10430 (set_fast_tracepoint_jump): Declare.
10431 (delete_fast_tracepoint_jump)
10432 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10433 (reinsert_fast_tracepoint_jumps_at): Declare.
10434 * regcache.c: Don't compile many functions when building the
10435 in-process agent library.
10436 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10437 the register buffer in the heap.
10438 (free_register_cache): If the register buffer isn't owned by the
10439 regcache, don't free it.
10440 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10441 pre-existing register caches.
10442 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10443 type.
10444 (convert_ascii_to_int): : Constify `from' parameter type.
10445 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10446 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10447 the needed buffer in-place.
10448 (relocate_instruction): New.
10449 * server.c (handle_query) <qSymbols>: If the target supports
10450 tracepoints, give it a chance of looking up symbols. Report
10451 support for fast tracepoints.
10452 (handle_status): Stabilize threads.
10453 (process_serial_event): Adjust.
10454 * server.h (struct fast_tracepoint_jump): Forward declare.
10455 (struct process_info) <fast_tracepoint_jumps>: New field.
10456 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10457 (decode_X_packet, decode_M_packet): Adjust.
10458 (relocate_instruction): Declare.
10459 (in_process_agent_loaded): Declare.
10460 (tracepoint_look_up_symbols): Declare.
10461 (struct fast_tpoint_collect_status): Declare.
10462 (fast_tracepoint_collecting): Declare.
10463 (force_unlock_trace_buffer): Declare.
10464 (handle_tracepoint_bkpts): Declare.
10465 (initialize_low_tracepoint)
10466 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10467 * target.h (struct target_ops) <stabilize_threads,
10468 install_fast_tracepoint_jump_pad>: New fields.
10469 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10470 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10471 [HAVE_STDINT_H]: Include stdint.h.
10472 (trace_debug_1): Rename to ...
10473 (trace_vdebug): ... this.
10474 (trace_debug): Rename to ...
10475 (trace_debug_1): ... this. Add `level' parameter.
10476 (trace_debug): New.
10477 (ATTR_USED, ATTR_NOINLINE): New.
10478 (IP_AGENT_EXPORT): New.
10479 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10480 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10481 (about_to_request_buffer_space, trace_buffer_is_full)
10482 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10483 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10484 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10485 (traceframe_write_count, traceframes_created)
10486 (trace_state_variables)
10487 New renaming defines.
10488 (struct ipa_sym_addresses): New.
10489 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10490 (symbol_list): New.
10491 (ipa_sym_addrs): New.
10492 (all_tracepoint_symbols_looked_up): New.
10493 (in_process_agent_loaded): New.
10494 (write_e_ipa_not_loaded): New.
10495 (maybe_write_ipa_not_loaded): New.
10496 (tracepoint_look_up_symbols): New.
10497 (debug_threads) [IN_PROCESS_AGENT]: New.
10498 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10499 (UNKNOWN_SIDE_EFFECTS): New.
10500 (stop_tracing): New.
10501 (flush_trace_buffer): New.
10502 (stop_tracing_bkpt): New.
10503 (flush_trace_buffer_bkpt): New.
10504 (read_inferior_integer): New.
10505 (read_inferior_uinteger): New.
10506 (read_inferior_data_pointer): New.
10507 (write_inferior_data_pointer): New.
10508 (write_inferior_integer): New.
10509 (write_inferior_uinteger): New.
10510 (struct collect_static_trace_data_action): Delete.
10511 (enum tracepoint_type): New.
10512 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10513 <actions_str, step_actions, step_actions_str>: Only include in
10514 GDBserver.
fa593d66
PA
10515 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10516 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10517 (tracepoints): Use IP_AGENT_EXPORT.
10518 (last_tracepoint): Don't include in the IPA.
10519 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10520 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10521 (alloced_trace_state_variables): New.
10522 (trace_state_variables): Use IP_AGENT_EXPORT.
10523 (traceframe_t): Delete unused variable.
10524 (circular_trace_buffer): Don't include in the IPA.
10525 (trace_buffer_start): Delete.
10526 (struct trace_buffer_control): New.
10527 (trace_buffer_free): Delete.
10528 (struct ipa_trace_buffer_control): New.
10529 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10530 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10531 New.
10532 (trace_buffer_ctrl): New.
10533 (TRACE_BUFFER_CTRL_CURR): New.
10534 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10535 Reimplement as macros.
10536 (trace_buffer_wrap): Delete.
10537 (traceframe_write_count, traceframe_read_count)
10538 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10539 (struct tracepoint_hit_ctx) <type>: New field.
10540 (struct fast_tracepoint_ctx): New.
10541 (memory_barrier): New.
10542 (cmpxchg): New.
10543 (record_tracepoint_error): Update atomically in the IPA.
10544 (clear_inferior_trace_buffer): New.
10545 (about_to_request_buffer_space): New.
10546 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10547 updating the same buffer.
10548 (add_tracepoint): Default the tracepoint's type to trap
10549 tracepoint, and orig_size to -1.
10550 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10551 internal variables.
10552 (create_trace_state_variable): New parameter `gdb'. Handle it.
10553 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10554 (cmd_qtdp): Handle fast tracepoints.
10555 (cmd_qtdv): Adjust.
10556 (max_jump_pad_size): New.
10557 (gdb_jump_pad_head): New.
10558 (get_jump_space_head): New.
10559 (claim_jump_space): New.
10560 (sort_tracepoints): New.
10561 (MAX_JUMP_SIZE): New.
10562 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10563 IPA.
10564 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10565 support. Upload fast traceframes, and delete internal IPA
10566 breakpoints.
10567 (stop_tracing_handler): New.
10568 (flush_trace_buffer_handler): New.
10569 (cmd_qtstop): Upload fast tracepoints.
10570 (response_tracepoint): Handle fast tracepoints.
10571 (tracepoint_finished_step): Upload fast traceframes. Set the
10572 tracepoint hit context's tracepoint type.
10573 (handle_tracepoint_bkpts): New.
10574 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10575 type. Add comment about fast tracepoints.
10576 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10577 non-existing action_str field.
10578 (get_context_regcache): Handle fast tracepoints.
10579 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10580 to the regcache.
10581 (fast_tracepoint_from_jump_pad_address): New.
10582 (fast_tracepoint_from_ipa_tpoint_address): New.
10583 (collecting_t): New.
10584 (force_unlock_trace_buffer): New.
10585 (fast_tracepoint_collecting): New.
10586 (collecting): New.
10587 (gdb_collect): New.
10588 (write_inferior_data_ptr): New.
10589 (target_tp_heap): New.
10590 (target_malloc): New.
10591 (download_agent_expr): New.
10592 (UALIGN): New.
10593 (download_tracepoints): New.
10594 (download_trace_state_variables): New.
10595 (upload_fast_traceframes): New.
10596 (IPA_FIRST_TRACEFRAME): New.
10597 (IPA_NEXT_TRACEFRAME_1): New.
10598 (IPA_NEXT_TRACEFRAME): New.
10599 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10600 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10601 (gdb_jump_pad_buffer_end): New.
10602 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10603 (initialize_tracepoint): Adjust.
10604 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10605 buffer. Initialize the low module.
10606 * utils.c (PREFIX, TOOLNAME): New.
10607 (malloc_failure): Use PREFIX.
10608 (error): In the IPA, an error causes an exit.
10609 (fatal, warning): Use PREFIX.
10610 (internal_error): Use TOOLNAME.
10611 (NUMCELLS): Increase to 10.
10612 * configure, config.in: Regenerate.
10613
d149dd1d
PA
106142010-06-01 Pedro Alves <pedro@codesourcery.com>
10615
10616 * server.c (handle_query) <qSupported>: Do two passes over the
10617 qSupported string to avoid nesting strtok.
10618
f6528abd
JK
106192010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10620
10621 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10622 (CDEPS): New.
10623 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10624 -Wl,--dynamic-list.
10625 * configure: Regenerate.
10626 * proc-service.list: New.
10627
ca2a87a0
JK
106282010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10629
10630 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10631 New comment.
10632
363a6e9f
OS
106332010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10634
10635 * gdbreplay.c (remote_open): Check error return from socket() call by
10636 its equality to -1 not by it being negative.
10637 * remote-utils.c (remote_open): Likewise.
10638
d23b6cb1
PA
106392010-05-23 Pedro Alves <pedro@codesourcery.com>
10640
10641 * config.h: Regenerate.
10642
28d3cf85
MK
106432010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10644
10645 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10646 doesn't provide PTRACE_GET_THREAD_AREA.
10647
fea36a59
MK
106482010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10649
10650 * linux-m68k-low.c: Include <asm/ptrace.h>
10651 (ps_get_thread_area): Implement.
10652
24b066ba
DE
106532010-05-03 Doug Evans <dje@google.com>
10654
10655 * event-loop.c (struct callback_event): New struct.
10656 (callback_list): New global.
10657 (append_callback_event, delete_callback_event): New functions.
10658 (process_callback): New function.
10659 (start_event_loop): Call it.
10660 * remote-utils.c (NOT_SCHEDULED): Define.
10661 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10662 moved out of readchar.
10663 (readchar): Rewrite. Call reschedule before returning.
10664 (reset_readchar): New function.
10665 (remote_close): Call it.
10666 (process_remaining, reschedule): New functions.
10667 * server.h (callback_handler_func): New typedef.
10668 (append_callback_event, delete_callback_event): Declare.
10669
9836d6ea
PA
106702010-05-03 Pedro Alves <pedro@codesourcery.com>
10671
10672 * proc-service.c (ps_pglobal_lookup): Use
10673 thread_db_look_up_one_symbol.
10674 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10675 parameter. Use it instead of all_symbols_looked_up.
10676 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10677 field.
10678 (all_symbols_looked_up): Don't declare.
10679 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10680 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10681 field.
10682 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10683 Set all_symbols_looked_up here.
10684 (thread_db_look_up_one_symbol): New.
10685 (thread_db_get_tls_address): Adjust.
10686 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10687 thread_db object on the heap, and tentatively set it in the
10688 process structure.
10689 (thread_db_init): Don't set all_symbols_looked_up here.
10690 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10691
7984d532
PA
106922010-05-03 Pedro Alves <pedro@codesourcery.com>
10693
10694 * linux-low.c (linux_kill, linux_detach): Adjust.
10695 (status_pending_p_callback): Remove redundant statement. Check
10696 for !TARGET_WAITIKIND_IGNORE, instead of
10697 TARGET_WAITKIND_STOPPED.
10698 (handle_tracepoints): Make sure LWP is locked. Adjust.
10699 (linux_wait_for_event_1): Adjust.
10700 (linux_cancel_breakpoints): New.
10701 (unsuspend_one_lwp): New.
10702 (unsuspend_all_lwps): New.
10703 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10704 (send_sigstop_callback): Change return type to int, add new
10705 `except' parameter and handle it.
10706 (suspend_and_send_sigstop_callback): New.
10707 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10708 pass them down. If SUSPEND, also increment the lwp's suspend
10709 count.
10710 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10711 (need_step_over_p): Don't consider suspended LWPs.
10712 (start_step_over): Adjust.
10713 (proceed_one_lwp): Change return type to int, add new `except'
10714 parameter and handle it.
10715 (unsuspend_and_proceed_one_lwp): New.
10716 (proceed_all_lwps): Use find_inferior instead of
10717 for_each_inferior.
10718 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10719 also decrement the suspend count of LWPs. Pass `except' down,
10720 instead of hacking its suspend count.
10721 (linux_pause_all): Add `freeze' parameter. Adjust.
10722 (linux_unpause_all): New.
10723 (linux_target_ops): Install linux_unpause_all.
10724 * server.c (handle_status): Adjust.
10725 * target.h (struct target_ops): New fields `unpause_all' and
10726 `cancel_breakpoints'. Add new parameter to `pause_all'.
10727 (pause_all): Add new `freeze' parameter.
10728 (unpause_all): New.
10729 (cancel_breakpoints): New.
10730 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10731 cancel breakpoints.
10732 (cmd_qtstart): Pause threads.
10733 (stop_tracing): Pause threads, and cancel breakpoints.
10734 * win32-low.c (win32_target_ops): Adjust.
10735
e471f25b
PA
107362010-05-03 Pedro Alves <pedro@codesourcery.com>
10737
10738 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10739 the inferior right away from here...
10740 (linux_wait_1): ... to here, and adjust to check the thread's
10741 last_resume_kind instead of the lwp's step or stop_expected flags.
10742
1915ef4f
PA
107432010-05-02 Pedro Alves <pedro@codesourcery.com>
10744
10745 * README: Use consistent `GDB' and `GDBserver' spellings.
10746
f9e39928
PA
107472010-05-02 Pedro Alves <pedro@codesourcery.com>
10748
10749 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10750 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10751 (linux_detach_one_lwp): Assume the lwp is stopped.
10752 (any_thread_of): Delete.
10753 (linux_detach): Stop all lwps here. Don't blindly delete all
10754 breakpoints.
10755 (delete_lwp_callback): New.
10756 (linux_mourn): Delete all lwps of the process that is gone.
10757 (linux_wait_1): Don't delete the last lwp of the process here.
10758 * mem-break.h (mark_breakpoints_out): Declare.
10759 * mem-break.c (mark_breakpoints_out): New.
10760 (free_all_breakpoints): Use it.
10761 * server.c (handle_target_event): If the process is gone, mark
10762 breakpoints out.
10763 * thread-db.c (struct thread_db) <create_bp>: New field.
10764 (thread_db_enable_reporting): Fix prototype. Store a thread event
10765 breakpoint reference in the thread_db struct.
10766 (thread_db_load_search): Clear the thread_db object.
10767 (try_thread_db_load_1): Ditto.
10768 (switch_to_process): New.
10769 (disable_thread_event_reporting): Use it.
10770 (remove_thread_event_breakpoints): New.
10771 (thread_db_detach, thread_db_mourn): Use it.
10772
1e7fc18c
PA
107732010-05-01 Pedro Alves <pedro@codesourcery.com>
10774
10775 * linux-low.c (linux_enable_event_reporting): New.
10776 (linux_wait_for_event_1, handle_extended_wait): Use it.
10777
02fc4de7
PA
107782010-04-30 Pedro Alves <pedro@codesourcery.com>
10779
10780 * linux-low.c (linux_kill_one_lwp, linux_kill)
10781 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10782 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10783 SIGSTOP even if the LWP is stopped.
10784 (send_sigstop_callback): New.
10785 (stop_all_lwps): Use send_sigstop_callback instead.
10786 (linux_resume_one_thread): Adjust.
10787 (proceed_one_lwp): Still proceed an LWP that the client has
10788 requested to stop, if we haven't reported it as stopped yet. Make
10789 sure that LWPs the client want stopped, have a pending SIGSTOP.
10790
bc3b5632
DE
107912010-04-26 Doug Evans <dje@google.com>
10792
ae1ada35
DE
10793 * server.c (handle_general_set): Make static.
10794
bc3b5632
DE
10795 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10796 Print received char after testing for error/eof instead of before.
10797 (input_interrupt): Tweak comment.
10798
65730243
DE
107992010-04-23 Doug Evans <dje@google.com>
10800
10801 * server.c (start_inferior): Print inferior argv if --debug.
10802
a8ae7dc0
AR
108032010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10804
10805 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10806 * nto-x86-low.c: Include server.h
10807
1c07cc19
PM
108082010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10809
10810 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10811 be consistent with other sources of this directory.
10812 (init_registers_amd64): Correct name of source file of this function
10813 in the comment.
10814
e0a61e09
PM
108152010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10816
10817 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10818 64-bit executables.
10819
54709339
PM
108202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10821
10822 * win32-i386-low.c: Add 64-bit support.
10823 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10824 (init_registers_amd64): Declare.
10825 (mappings): Add 64-bit version of array.
10826 (init_windows_x86): New function.
10827 (the_low_target): Change init_arch field to init_windows_x86.
10828
e8f0053d
PM
108292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10830
10831 * win32-low.c: Adapt to support also 64-bit architecture.
10832 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10833 (get_image_name): Use SIZE_T type for local variable `done'.
10834 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10835 (toolhelp_get_dll_name): Idem.
10836 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10837 Use uintptr_t typecast to avoid warning.
10838 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10839 (handle_exception): Use phex_nz to avoid warning.
10840 (win32_wait): Remove unused local variable `process'.
10841
c481e77e
PM
108422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10843
10844 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10845 `amd64-avx.o'.
10846
12ea4b69
PM
108472010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10848
10849 * configure.ac: Use `ws2_32' library for srv_mingw.
10850 * configure: Regenerate.
10851 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10852 * remote-utils.c: Likewise.
10853
f6d1620c
L
108542010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10855
10856 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10857 if __x86_64__ is defined.
10858
8e642873
PM
108592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10860
10861 * configure: Regenerate.
10862
711e434b
PM
108632010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10864
10865 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10866 * target.h (target_ops): New get_tib_address field.
10867 * win32-low.h (win32_thread_info): Add thread_local_base field.
10868 * win32-low.c (child_add_thread): Add tlb argument.
10869 Set thread_local_base field to TLB.
10870 (get_child_debug_event): Adapt to child_add_thread change.
10871 (win32_get_tib_address): New function.
10872 (win32_target_ops): Set get_tib_address field to
10873 win32_get_tib_address.
10874 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10875
505106cd
PA
108762010-04-12 Pedro Alves <pedro@codesourcery.com>
10877
505106cd
PA
10878 * linux-low.c (linux_mourn): Also remove the process.
10879 * server.c (handle_target_event): Don't remove the process here.
10880 * nto-low.c (nto_mourn): New.
10881 (nto_target_ops): Install it.
10882 * spu-low.c (spu_mourn): New.
10883 (spu_target_ops): Install it.
10884 * win32-low.c (win32_mourn): New.
10885 (win32_target_ops): Install it.
10886
e8470a06
PA
108872010-04-12 Pedro Alves <pedro@codesourcery.com>
10888
10889 * server.h (buffer_xml_printf): Remove redundant `;'.
10890
45ba0d02
PA
108912010-04-12 Pedro Alves <pedro@codesourcery.com>
10892
10893 * regcache.c (set_register_cache): Invalidate regcaches before
10894 changing the register cache layout.
10895 (regcache_invalidate_one): Allow a NULL regcache.
10896 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10897 regcaches before changing the register cache layout or the target
10898 regsets.
10899
59e04013
L
109002010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10901
10902 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10903 variable warning on Linux/x86-64.
10904
8336d594
PA
109052010-04-11 Pedro Alves <pedro@codesourcery.com>
10906
10907 GDBserver disconnected tracing support.
10908
10909 * linux-low.c (linux_remove_process): Delete.
10910 (add_lwp): Don't set last_resume_kind here.
10911 (linux_kill): Use `mourn'.
10912 (linux_detach): Use `thread_db_detach', and `mourn'.
10913 (linux_mourn): New.
10914 (linux_attach_lwp_1): Adjust comment.
10915 (linux_attach): last_resume_kind moved the thread_info; adjust.
10916 (status_pending_p_callback): Adjust.
10917 (linux_wait_for_event_1): Adjust.
10918 (count_events_callback, select_singlestep_lwp_callback)
10919 (select_event_lwp_callback, cancel_breakpoints_callback)
10920 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10921 (proceed_one_lwp): Adjust.
10922 (linux_async): Add debug output.
10923 (linux_thread_stopped): New.
10924 (linux_pause_all): New.
10925 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10926 linux_pause_all.
10927 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10928 (thread_db_free): Delete declaration.
10929 (thread_db_detach, thread_db_mourn): Declare.
10930 * thread-db.c (thread_db_init): Use thread_db_mourn.
10931 (thread_db_free): Delete, split in two.
10932 (disable_thread_event_reporting): New.
10933 (thread_db_detach): New.
10934 (thread_db_mourn): New.
10935
10936 * server.h (struct thread_info) <last_resume_kind>: New field.
10937 <attached>: Add comment.
10938 <gdb_detached>: New field.
10939 (handler_func): Change return type to int.
10940 (handle_serial_event, handle_target_event): Ditto.
10941 (gdb_connected): Declare.
10942 (tracing): Delete.
10943 (disconnected_tracing): Declare.
10944 (stop_tracing): Declare.
10945
10946 * server.c (handle_query) <qSupported>: Report support for
10947 disconnected tracing.
10948 (queue_stop_reply_callback): Account for running threads.
10949 (gdb_wants_thread_stopped): New.
10950 (gdb_wants_all_threads_stopped): New.
10951 (gdb_reattached_process): New.
10952 (handle_status): Clear the `gdb_detached' flag of all processes.
10953 In all-stop, stop all threads.
10954 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10955 (process_serial_event): If the remote connection breaks, or if an
10956 exit was forced with "monitor exit", force an event loop exit.
10957 Handle disconnected tracing on detach.
10958 (handle_serial_event): Adjust.
10959 (handle_target_event): If GDB isn't connected, forward events back
10960 to the inferior, unless the last process exited, in which case,
10961 exit gdbserver. Adjust interface.
10962
10963 * remote-utils.c (remote_open): Don't block in accept. Instead
10964 register an event loop source on the listen socket file
10965 descriptor. Refactor bits into ...
10966 (listen_desc): ... this new global.
10967 (gdb_connected): ... this new function.
10968 (enable_async_notification): ... this new function.
10969 (handle_accept_event): ... this new function.
10970 (remote_close): Clear remote_desc.
10971
10972 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10973
10974 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10975 New fields.
10976 (mourn_inferior): Define.
10977 (target_process_qsupported): Avoid the dangling else problem.
10978 (thread_stopped): Define.
10979 (pause_all): Define.
10980 (target_waitstatus_to_string): Declare.
10981 * target.c (target_waitstatus_to_string): New.
10982
10983 * tracepoint.c (tracing): Make extern.
10984 (disconnected_tracing): New.
10985 (stop_tracing): Make extern. Handle tracing stops due to GDB
10986 disconnecting.
10987 (cmd_qtdisconnected): New.
10988 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10989 (handle_tracepoint_general_set): Handle QTDisconnected.
10990
10991 * event-loop.c (event_handler_func): Change return type to int.
10992 (process_event): Bail out if the event handler wants the event
10993 loop to stop.
10994 (handle_file_event): Ditto.
10995 (start_event_loop): Bail out if the event handler wants the event
10996 loop to stop.
10997
10998 * nto-low.c (nto_target_ops): Adjust.
10999 * spu-low.c (spu_wait): Don't remove the process here.
11000 (spu_target_ops): Adjust.
11001 * win32-low.c (win32_wait): Don't remove the process here.
11002 (win32_target_ops): Adjust.
11003
5d267c4c
PA
110042010-04-11 Pedro Alves <pedro@codesourcery.com>
11005
11006 * regcache.c (realloc_register_cache): Invalidate inferior's
11007 regcache before recreating it.
11008
623ccd72
PA
110092010-04-09 Pedro Alves <pedro@codesourcery.com>
11010
11011 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11012
219f2f23
PA
110132010-04-09 Stan Shebs <stan@codesourcery.com>
11014 Pedro Alves <pedro@codesourcery.com>
11015
11016 * server.h (LONGEST): New.
11017 (struct thread_info) <while_stepping>: New field.
11018 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11019 Declare.
11020 (initialize_tracepoint, handle_tracepoint_general_set)
11021 (handle_tracepoint_query, tracepoint_finished_step)
11022 (tracepoint_was_hit, release_while_stepping_state_list):
11023 (current_traceframe): Declare.
11024 * server.c (handle_general_set): Handle tracepoint packets.
11025 (read_memory): New.
11026 (write_memory): New.
11027 (handle_search_memory_1): Use read_memory.
11028 (handle_query): Report support for conditional tracepoints, trace
11029 state variables, and tracepoint sources. Handle tracepoint
11030 queries.
11031 (main): Initialize the tracepoints module.
11032 (process_serial_event): Handle traceframe reads/writes.
11033
11034 * linux-low.c (handle_tracepoints): New.
11035 (linux_wait_1): Call it.
11036 (linux_resume_one_lwp): Handle while-stepping.
11037 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11038 (linux_target_ops): Install them.
11039 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11040 New field.
11041 * linux-x86-low.c (x86_supports_tracepoints): New.
11042 (the_low_target). Install it.
11043
11044 * mem-break.h (delete_breakpoint): Declare.
11045 * mem-break.c (delete_breakpoint): Make external.
11046
11047 * target.h (struct target_ops): Add `supports_tracepoints',
11048 `read_pc', and `write_pc' fields.
11049 (target_supports_tracepoints): Define.
11050 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11051 (phex_nz): New.
11052
11053 * regcache.h (struct regcache) <registers_owned>: New field.
11054 (init_register_cache, regcache_cpy): Declare.
11055 (regcache_read_pc, regcache_write_pc): Declare.
11056 (register_cache_size): Declare.
11057 (supply_regblock): Declare.
11058 * regcache.c (init_register_cache): New.
11059 (new_register_cache): Use it.
11060 (regcache_cpy): New.
11061 (register_cache_size): New.
11062 (supply_regblock): New.
11063 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11064
219f2f23
PA
11065 * tracepoint.c: New.
11066
11067 * Makefile.in (OBS): Add tracepoint.o.
11068 (tracepoint.o): New rule.
11069
3a13a53b
L
110702010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11071
11072 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11073 (i386-mmx.o): New.
11074 (i386-mmx.c): Likewise.
11075 (i386-mmx-linux.o): Likewise.
11076 (i386-mmx-linux.c): Likewise.
11077
11078 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11079 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11080 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11081 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11082
11083 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11084 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11085 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11086
1570b33e
L
110872010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11088
11089 * Makefile.in (clean): Updated.
11090 (i386-avx.o): New.
11091 (i386-avx.c): Likewise.
11092 (i386-avx-linux.o): Likewise.
11093 (i386-avx-linux.c): Likewise.
11094 (amd64-avx.o): Likewise.
11095 (amd64-avx.c): Likewise.
11096 (amd64-avx-linux.o): Likewise.
11097 (amd64-avx-linux.c): Likewise.
11098
11099 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11100 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11101 (srv_amd64_regobj): Add amd64-avx.o.
11102 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11103 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11104 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11105 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11106 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11107 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11108 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11109
11110 * i387-fp.c: Include "i386-xstate.h".
11111 (i387_xsave): New.
11112 (i387_cache_to_xsave): Likewise.
11113 (i387_xsave_to_cache): Likewise.
11114 (x86_xcr0): Likewise.
11115
11116 * i387-fp.h (i387_cache_to_xsave): Likewise.
11117 (i387_xsave_to_cache): Likewise.
11118 (x86_xcr0): Likewise.
11119
11120 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11121 * linux-crisv32-low.c (target_regsets): Likewise.
11122 * linux-m68k-low.c (target_regsets): Likewise.
11123 * linux-mips-low.c (target_regsets): Likewise.
11124 * linux-ppc-low.c (target_regsets): Likewise.
11125 * linux-s390-low.c (target_regsets): Likewise.
11126 * linux-sh-low.c (target_regsets): Likewise.
11127 * linux-sparc-low.c (target_regsets): Likewise.
11128 * linux-xtensa-low.c (target_regsets): Likewise.
11129
11130 * linux-low.c: Include <sys/uio.h>.
11131 (regsets_fetch_inferior_registers): Support nt_type.
11132 (regsets_store_inferior_registers): Likewise.
11133 (linux_process_qsupported): New.
11134 (linux_target_ops): Add linux_process_qsupported.
11135
11136 * linux-low.h (regset_info): Add nt_type.
11137 (linux_target_ops): Add process_qsupported.
11138
11139 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11140 and <sys/uio.h>.
11141 (init_registers_i386_avx_linux): New.
11142 (init_registers_amd64_avx_linux): Likewise.
11143 (xmltarget_i386_linux_no_xml): Likewise.
11144 (xmltarget_amd64_linux_no_xml): Likewise.
11145 (PTRACE_GETREGSET): Likewise.
11146 (PTRACE_SETREGSET): Likewise.
11147 (x86_fill_xstateregset): Likewise.
11148 (x86_store_xstateregset): Likewise.
11149 (use_xml): Likewise.
11150 (x86_linux_update_xmltarget): Likewise.
11151 (x86_linux_process_qsupported): Likewise.
11152 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11153 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11154 init_registers_i386_linux here. Call
11155 x86_linux_update_xmltarget.
11156 (the_low_target): Add x86_linux_process_qsupported.
11157
11158 * server.c (handle_query): Call target_process_qsupported.
11159
11160 * target.h (target_ops): Add process_qsupported.
11161 (target_process_qsupported): New.
11162
fc7238bb
PA
111632010-04-03 Pedro Alves <pedro@codesourcery.com>
11164
11165 * inferiors.c (add_thread): Set last_status kind to
11166 TARGET_WAITKIND_IGNORE.
11167 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11168 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11169 (linux_wait_1): Move `thread' local definition to block that uses
11170 it. Don't NULL initialize `event_child'.
11171 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11172 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11173 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11174
bdabb078
PA
111752010-04-01 Pedro Alves <pedro@codesourcery.com>
11176
11177 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11178 an extended waitstatus, or by a watchpoint.
11179 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11180 thread was stepping or has been stopped by a watchpoint.
11181
d3bbe7a0
PA
111822010-04-01 Pedro Alves <pedro@codesourcery.com>
11183
11184 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11185 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11186 of another, then delete the previous, and validate all
11187 breakpoints.
11188 (validate_inserted_breakpoint): New.
11189 (delete_disabled_breakpoints): New.
11190 (validate_breakpoints): New.
11191 (check_mem_read): Validate breakpoints before trusting their
11192 shadow. Delete disabled breakpoints.
11193 (check_mem_write): Validate breakpoints before trusting they
11194 should be inserted. Delete disabled breakpoints.
11195 * mem-break.h (validate_breakpoints):
11196 * server.c (handle_query): Validate breakpoints when we see a
11197 qSymbol query.
11198
8b07ae33
PA
111992010-04-01 Pedro Alves <pedro@codesourcery.com>
11200
11201 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11202 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11203 if we could tell there's a GDB breakpoint at stop_pc.
11204 (need_step_over_p): Don't do a step over if we find a GDB
11205 breakpoint at the resume PC.
11206
11207 * mem-break.c (struct raw_breakpoint): New.
11208 (enum bkpt_type): New type `gdb_breakpoint'.
11209 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11210 fields. New field `raw'.
11211 (find_raw_breakpoint_at): New.
11212 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11213 breakpoint instead.
11214 (set_breakpoint_at): Adjust.
11215 (delete_raw_breakpoint): New.
11216 (release_breakpoint): New.
11217 (delete_breakpoint): Rename to...
11218 (delete_breakpoint_1): ... this. Add proc parameter. Use
11219 release_breakpoint. Return ENOENT.
11220 (delete_breakpoint): Reimplement.
11221 (find_breakpoint_at): Delete.
11222 (find_gdb_breakpoint_at): New.
11223 (delete_breakpoint_at): Delete.
11224 (set_gdb_breakpoint_at): New.
11225 (delete_gdb_breakpoint_at): New.
11226 (gdb_breakpoint_here): New.
11227 (set_reinsert_breakpoint): Use release_breakpoint.
11228 (uninsert_breakpoint): Rename to ...
11229 (uninsert_raw_breakpoint): ... this.
11230 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11231 (reinsert_raw_breakpoint): Change parameter type to
11232 raw_breakpoint.
11233 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11234 instead.
11235 (check_breakpoints): Adjust. Use release_breakpoint.
11236 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11237 (breakpoint_inserted_here): Ditto.
11238 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11239 Don't trust the breakpoint's shadow if it is not inserted.
11240 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11241 (delete_all_breakpoints): Adjust.
11242 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11243 use delete_breakpoint_1.
11244
11245 * mem-break.h (breakpoints_supported): Delete declaration.
11246 (set_gdb_breakpoint_at): Declare.
11247 (gdb_breakpoint_here): Declare.
11248 (delete_breakpoint_at): Delete.
11249 (delete_gdb_breakpoint_at): Declare.
11250
11251 * server.h (struct raw_breakpoint): Forward declare.
11252 (struct process_info): New field `raw_breakpoints'.
11253
11254 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11255 breakpoints.
11256
6bf5e0ba
PA
112572010-03-24 Pedro Alves <pedro@codesourcery.com>
11258
11259 * linux-low.c (status_pending_p_callback): Fix comment.
11260 (linux_wait_for_event_1): Move most of the internal breakpoint
11261 handling from here...
11262 (linux_wait_1): ... to here.
11263 (count_events_callback): New.
11264 (select_singlestep_lwp_callback): New.
11265 (select_event_lwp_callback): New.
11266 (cancel_breakpoints_callback): New.
11267 (select_event_lwp): New.
11268 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11269 priority to all LWPs that have had events that should be reported
11270 to the client. Cancel breakpoints when about to reporting the
11271 event to the client, not while stopping lwps. No longer cancel
11272 finished single-steps here.
11273 (cancel_finished_single_step): Delete.
11274 (cancel_finished_single_steps): Delete.
11275
414a389f
PA
112762010-03-24 Pedro Alves <pedro@codesourcery.com>
11277
11278 * mem-break.c (enum bkpt_type): New.
11279 (struct breakpoint): New field `type'.
11280 (set_breakpoint_at): Change return type to struct breakpoint
11281 pointer. Set type to `other_breakpoint' by default.
11282 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11283 in the breakpoint list.
11284 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11285 (reinsert_breakpoint): Rename to ...
11286 (reinsert_raw_breakpoint): ... this.
11287 (reinsert_breakpoints_at): Adjust.
11288 * mem-break.h (struct breakpoint): Declare.
11289 (set_breakpoint_at): Change return type to struct breakpoint
11290 pointer.
11291
2280c721
PA
112922010-03-24 Pedro Alves <pedro@codesourcery.com>
11293
11294 * server.c (handle_query): Assign, not compare.
11295
d50171e4
PA
112962010-03-24 Pedro Alves <pedro@codesourcery.com>
11297
11298 Teach linux gdbserver to step-over-breakpoints.
11299
11300 * linux-low.c (can_hardware_single_step): New.
11301 (supports_breakpoints): New.
11302 (handle_extended_wait): If stopping threads, read the stop pc of
11303 the new cloned LWP.
11304 (get_pc): New.
11305 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11306 low target doesn't support retrieving the PC.
11307 (add_lwp): Set last_resume_kind to resume_continue.
11308 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11309 (linux_attach): Don't clear stop_expected. Set the lwp's
11310 last_resume_kind to resume_stop.
11311 (linux_detach_one_lwp): Don't check for removed breakpoints.
11312 (check_removed_breakpoint): Delete.
11313 (status_pending_p): Rename to ...
11314 (status_pending_p_callback): ... this. Don't check for removed
11315 breakpoints. Don't consider threads that are stopped from GDB's
11316 perspective.
11317 (linux_wait_for_lwp): Always read the stop_pc here.
11318 (cancel_breakpoint): New.
11319 (step_over_bkpt): New global.
11320 (linux_wait_for_event_1): Implement stepping over breakpoints.
11321 (gdb_wants_lwp_stopped): New.
11322 (gdb_wants_all_stopped): New.
11323 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11324 single-step traps here. Store the thread's last reported target
11325 wait status.
11326 (send_sigstop): Don't clear stop_expected. Always set it,
11327 instead.
11328 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11329 (cancel_finished_single_step): New.
11330 (cancel_finished_single_steps): New.
11331 (wait_for_sigstop): Don't cancel finished single-step traps here.
11332 (linux_resume_one_lwp): Don't check for removed breakpoints.
11333 Don't set `step' on non-hardware step archs.
11334 (linux_set_resume_request): Ignore resume_stop requests if already
11335 stopping or stopped. Set the lwp's last_resume_kind.
11336 (resume_status_pending_p): Don't check for removed breakpoints.
11337 (need_step_over_p): New.
11338 (start_step_over): New.
11339 (finish_step_over): New.
11340 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11341 requests. Clear the thread's last reported target waitstatus.
11342 Don't use the `suspended' flag. Don't consider pending breakpoints.
11343 (linux_resume): Start a step-over if necessary.
11344 (proceed_one_lwp): New.
11345 (proceed_all_lwps): New.
11346 (unstop_all_lwps): New.
11347 * linux-low.h (struct lwp_info): Rewrite comment for the
11348 `suspended' flag. Add the `stop_pc' field. Delete the
11349 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11350 Add `'last_resume_kind' and `need_step_over' fields.
11351 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11352 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11353 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11354 (set_raw_breakpoint_at): New.
11355 (set_breakpoint_at): Rewrite to use it.
11356 (reinsert_breakpoint_handler): Delete.
11357 (set_reinsert_breakpoint): New.
11358 (reinsert_breakpoint_by_bp): Delete.
11359 (delete_reinsert_breakpoints): New.
11360 (uninsert_breakpoint): Rewrite.
11361 (uninsert_breakpoints_at): New.
11362 (reinsert_breakpoint): Rewrite.
11363 (reinsert_breakpoints_at): New.
11364 (check_breakpoints): Rewrite.
11365 (breakpoint_here): New.
11366 (breakpoint_inserted_here): New.
11367 (check_mem_read): Adjust.
11368 * mem-break.h (breakpoints_supported, breakpoint_here)
11369 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11370 (reinsert_breakpoint_by_bp): Delete declaration.
11371 (delete_reinsert_breakpoints): Declare.
11372 (reinsert_breakpoint): Delete declaration.
11373 (reinsert_breakpoints_at): Declare.
11374 (uninsert_breakpoint): Delete declaration.
11375 (uninsert_breakpoints_at): Declare.
11376 (check_breakpoints): Adjust prototype.
11377 * server.h: Adjust include order.
11378 (struct thread_info): Declare here. Add a `last_status' field.
11379
30ba68cb
MS
113802010-03-23 Michael Snyder <msnyder@vmware.com>
11381
11382 * server.c (crc32): New function.
11383 (handle_query): Add handling for 'qCRC:' request.
11384
b9a881c2
PA
113852010-03-23 Pedro Alves <pedro@codesourcery.com>
11386
11387 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11388 lwp had been stopped by a watchpoint.
11389
e92d13d5
PA
113902010-03-16 Pedro Alves <pedro@codesourcery.com>
11391
11392 * server.h (internal_error): Declare.
11393 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11394 * utils.c (internal_error): New function.
11395
64daa791
AS
113962010-03-15 Andreas Schwab <schwab@redhat.com>
11397
11398 * configure.srv: Fix typo setting srv_regobj.
11399
f52cd8cd
PA
114002010-03-15 Pedro Alves <pedro@codesourcery.com>
11401
11402 * linux-low.c (fetch_register): Avoid passing a non string literal
11403 format to `error'.
11404 (usr_store_inferior_registers): Ditto.
11405
93ae6fdc
PA
114062010-03-14 Pedro Alves <pedro@codesourcery.com>
11407
11408 * linux-low.c (linux_write_memory): Bail out early if peeking
11409 memory failed.
11410
c3adc08c
PA
114112010-03-14 Pedro Alves <pedro@codesourcery.com>
11412
11413 * linux-low.h (struct lwp_info): New fields
11414 `stopped_by_watchpoint' and `stopped_data_address'.
11415 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11416 here, and cache them in the lwp object.
11417 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11418 directly.
11419 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11420 field.
11421 (linux_stopped_by_watchpoint): Rewrite.
11422 (linux_stopped_data_address): Rewrite.
11423
bce522a2
PA
114242010-03-06 Simo Melenius <simo.melenius@iki.fi>
11425
11426 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11427 switching the current inferior, not before.
11428
90884b2b
L
114292010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11430
11431 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11432 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11433 i386-linux.c and amd64-linux.c.
11434 (reg-i386.o): Removed.
11435 (reg-i386.c): Likewise.
11436 (reg-i386-linux.o): Likewise.
11437 (reg-i386-linux.c): Likewise.
11438 (reg-x86-64.o): Likewise.
11439 (reg-x86-64.c): Likewise.
11440 (reg-x86-64-linux.o): Likewise.
11441 (reg-x86-64-linux.c): Likewise.
11442 (i386.o): New.
11443 (i386.c): Likewise.
11444 (i386-linux.o): Likewise.
11445 (i386-linux.c): Likewise.
11446 (amd64.o): Likewise.
11447 (amd64.c): Likewise.
11448 (amd64-linux.o): Likewise.
11449 (amd64-linux.c): Likewise.
11450
11451 * configure.srv (srv_i386_regobj): New.
11452 (srv_i386_linux_regobj): Likewise.
11453 (srv_amd64_regobj): Likewise.
11454 (srv_amd64_linux_regobj): Likewise.
11455 (srv_i386_32bit_xmlfiles): Likewise.
11456 (srv_i386_64bit_xmlfiles): Likewise.
11457 (srv_i386_xmlfiles): Likewise.
11458 (srv_amd64_xmlfiles): Likewise.
11459 (srv_i386_linux_xmlfiles): Likewise.
11460 (srv_amd64_linux_xmlfiles): Likewise.
11461 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11462 srv_xmlfiles to $srv_i386_xmlfiles.
11463 (i[34567]86-*-mingw32ce*): Likewise.
11464 (i[34567]86-*-mingw*): Likewise.
11465 (i[34567]86-*-nto*): Likewise.
11466 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11467 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11468 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11469 (x86_64-*-linux*): Likewise.
11470
11471 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11472 (init_registers_amd64_linux): New.
11473 (x86_arch_setup): Replace init_registers_x86_64_linux with
11474 init_registers_amd64_linux.
11475
193f13e6
MK
114762010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11477
11478 * configure.ac: Check for libdl. If it is not available link against
11479 static libthread_db.
11480 * configure: Regenerate.
11481
85d721b8
PA
114822010-02-22 Pedro Alves <pedro@codesourcery.com>
11483
11484 PR9605
11485
11486 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11487 handing a read watchpoint.
11488 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11489
6076632b
DE
114902010-02-12 Doug Evans <dje@google.com>
11491
11492 * linux-low.c (linux_supports_tracefork_flag): Document.
11493 (linux_look_up_symbols): Add comment.
11494
3327ccf7
L
114952010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11496
11497 * regcache.c (supply_register): Clear regcache if buf is NULL.
11498
0718675c 114992010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11500 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11501
11502 * inferiors.c (find_inferior): Add function documentation.
11503 (unloaded_dll): Handle the case where the unloaded dll has not
11504 been previously registered in the dll list.
11505
177321bd
DJ
115062010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11507
11508 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11509 (thumb2_breakpoint): New.
11510 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11511
2b009048
DJ
115122010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11513
11514 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11515 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11516 breakpoints.
11517
3be029c7
PA
115182010-01-21 Pedro Alves <pedro@codesourcery.com>
11519
11520 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11521
18f5de3b
JK
115222010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11523
11524 * linux-s390-low.c (s390_collect_ptrace_register)
11525 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11526
3743bb4f
DE
115272010-01-21 Doug Evans <dje@google.com>
11528
14ce3065
DE
11529 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11530 (PTRACE_ARG4_TYPE): New macro.
11531 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11532 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11533 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11534 (usr_store_inferior_registers): Ditto.
11535 (linux_read_memory, linux_write_memory): Ditto.
11536 (linux_test_for_tracefork): Ditto.
11537
3743bb4f
DE
11538 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11539 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11540
8b315be5
PA
115412010-01-21 Pedro Alves <pedro@codesourcery.com>
11542
11543 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11544 target.
11545
85492558
PA
115462010-01-21 Pedro Alves <pedro@codesourcery.com>
11547
11548 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11549 prototype to take a regcache. Adjust.
11550
442ea881
PA
115512010-01-20 Pedro Alves <pedro@codesourcery.com>
11552
11553 * regcache.h (struct thread_info): Forward declare.
11554 (struct regcache): New.
11555 (new_register_cache): Adjust prototype.
11556 (get_thread_regcache): Declare.
11557 (free_register_cache): Adjust prototype.
11558 (registers_to_string, registers_from_string): Ditto.
11559 (supply_register, supply_register_by_name, collect_register)
11560 (collect_register_as_string, collect_register_by_name): Ditto.
11561 * regcache.c (struct inferior_regcache_data): Delete.
11562 (get_regcache): Rename to ...
11563 (get_thread_regcache): ... this. Adjust. Switch inferior before
11564 fetching registers.
11565 (regcache_invalidate_one): Adjust.
11566 (regcache_invalidate): Fix prototype.
11567 (new_register_cache): Return the new register cache.
11568 (free_register_cache): Change prototype.
11569 (realloc_register_cache): Adjust.
11570 (registers_to_string): Change prototype to take a regcache. Adjust.
11571 (registers_from_string): Ditto.
11572 (register_data): Ditto.
11573 (supply_register): Ditto.
11574 (supply_register_by_name): Ditto.
11575 (collect_register): Ditto.
11576 (collect_register_as_string): Ditto.
11577 (collect_register_by_name): Ditto.
11578 * server.c (process_serial_event): Adjust.
11579 * linux-low.h (regset_fill_func, regset_store_func): Change
11580 prototype.
11581 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11582 Change prototype.
11583 * linux-low.c (get_stop_pc): Adjust.
11584 (check_removed_breakpoint): Adjust.
11585 (linux_wait_for_event): Adjust.
11586 (linux_resume_one_lwp): Adjust.
11587 (fetch_register): Add regcache parameter. Adjust.
11588 (usr_store_inferior_registers): Ditto.
11589 (regsets_fetch_inferior_registers): Ditto.
11590 (regsets_store_inferior_registers): Ditto.
11591 (linux_fetch_registers, linux_store_registers): Ditto.
11592 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11593 regcache. Adjust.
43aaf8b6
PA
11594 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11595 Ditto.
442ea881
PA
11596 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11597 prototype to take a regcache.
11598 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11599 * remote-utils.c (convert_ascii_to_int, outreg)
11600 (prepare_resume_reply): Change prototype to take a regcache.
11601 Adjust.
11602 * target.h (struct target_ops) <fetch_registers, store_registers>:
11603 Change prototype to take a regcache.
11604 (fetch_inferior_registers, store_inferior_registers): Change
11605 prototype to take a regcache. Adjust.
11606 * proc-service.c (ps_lgetregs): Adjust.
11607 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11608 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11609 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11610 take a regcache. Adjust.
11611 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11612 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11613 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11614 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11615 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11616 (cris_cannot_fetch_register):
11617 (cris_breakpoint_at): Change prototype to take a regcache.
11618 Adjust.
11619 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11620 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11621 to take a regcache. Adjust.
11622 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11623 Adjust.
11624 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11625 take a regcache. Adjust.
11626 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11627 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11628 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11629 * linux-mips-low.c (mips_get_pc):
11630 (mips_set_pc): Change prototype to take a regcache. Adjust.
11631 (mips_reinsert_addr): Adjust.
11632 (mips_collect_register): Change prototype to take a regcache.
11633 Adjust.
11634 (mips_supply_register):
11635 (mips_collect_register_32bit, mips_supply_register_32bit)
11636 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11637 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11638 * linux-ppc-low.c (ppc_supply_ptrace_register)
11639 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11640 (parse_spufs_run): Adjust.
11641 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11642 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11643 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11644 take a regcache. Adjust.
11645 * linux-s390-low.c (s390_collect_ptrace_register)
11646 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11647 (s390_set_pc): Change prototype to take a regcache. Adjust.
11648 (s390_arch_setup): Adjust.
11649 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11650 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11651 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11652 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11653 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11654 regcache. Adjust.
11655 (sparc_breakpoint_at): Adjust.
11656 * linux-xtensa-low.c (xtensa_fill_gregset):
11657 (xtensa_store_gregset):
11658 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11659 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11660 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11661 prototype to take a regcache. Adjust.
11662 * win32-arm-low.c (arm_fetch_inferior_register)
11663 (arm_store_inferior_register): Change prototype to take a
11664 regcache. Adjust.
11665 * win32-i386-low.c (i386_fetch_inferior_register)
11666 (i386_store_inferior_register): Change prototype to take a
11667 regcache. Adjust.
11668 * win32-low.c (child_fetch_inferior_registers)
11669 (child_store_inferior_registers): Change prototype to take a
11670 regcache. Adjust.
11671 (win32_wait): Adjust.
11672 (win32_fetch_inferior_registers): Change prototype to take a
11673 regcache. Adjust.
11674 (win32_store_inferior_registers): Adjust.
11675 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11676 store_inferior_register>: Change prototype to take a regcache.
11677
60c3d7b0
DE
116782010-01-20 Doug Evans <dje@google.com>
11679
11680 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11681 #ifdef.
11682 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11683 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11684
dc146f7c
VP
116852010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11686
11687 * linux-low.c (linux_core_of_thread): New.
11688 (compare_ints, show_process, list_threads): New.
11689 (linux_qxfer_osdata): Report threads and cores.
11690 (linux_target_op): Register linux_core_of_thread.
11691 * remote-utils.c (prepare_resume_reply): Report the core.
11692 (buffer_xml_printf): Support %d specifier.
11693 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11694 New.
11695 (handle_query): Handle qXfer:threads. Announce availability
11696 thereof.
11697 * target.h (struct target_ops): New field core_of_thread.
11698
7803799a
UW
116992010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11700
11701 * Makefile.in (clean): Remove new generated files.
11702 (reg-s390.o, reg-s390.c): Remove rules.
11703 (reg-s390x.o, reg-s390x.c): Likewise.
11704 (s390-linux32.o, s390-linux32.c): Add rules.
11705 (s390-linux64.o, s390-linux64.c): Likewise.
11706 (s390x-linux64.o, s390x-linux64.c): Likewise.
11707 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11708 * linux-s390-low.c: Include <elf.h>.
11709 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11710 (init_registers_s390): Remove prototype.
11711 (init_registers_s390x): Likewise.
11712 (init_registers_s390_linux32): Add prototype.
11713 (init_registers_s390_linux64): Likewise.
11714 (init_registers_s390x_linux64): Likewise.
11715 (s390_num_regs_3264): New define.
11716 (s390_regmap_3264): New global variable.
11717 (s390_cannot_fetch_register): Remove obsolete check.
11718 (s390_cannot_store_register): Likewise.
11719 (s390_collect_ptrace_register): Handle upper/lower register halves.
11720 (s390_supply_ptrace_register): Likewise.
11721 (s390_fill_gregset): Update to register number changes.
11722 (s390_get_hwcap): New routine.
11723 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11724 Install appropriate regmap and register set.
11725
6e7ffa39
JB
117262010-01-01 Joel Brobecker <brobecker@adacore.com>
11727
11728 * server.c (gdbserver_version): Update copyright year to 2010.
11729 * gdbreplay.c (gdbreplay_version): Likewise.
11730
957f3f49
DE
117312009-12-28 Doug Evans <dje@google.com>
11732
11733 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11734 elf/external.h. Include <elf.h> instead but only if necessary.
11735
ca5c370d
PA
117362009-12-28 Pedro Alves <pedro@codesourcery.com>
11737
11738 * linux-low.c (linux_remove_process): Remove `detaching'
11739 parameter. Don't release/detach from thread_db here.
11740 (linux_kill): Release/detach from thread_db here, ...
11741 (linux_detach): ... and here, before actually detaching.
11742 (linux_wait_1): ... and here, when a process exits.
11743 * thread-db.c (any_thread_of): New.
11744 (thread_db_free): Switch the current inferior to a thread of the
11745 passed in process.
11746
4ee62156
DE
117472009-12-21 Doug Evans <dje@google.com>
11748
d90e6a88
DE
11749 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11750
c5f62d5f
DE
11751 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11752 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11753 warning ifndef __NR_tkill. Move setting of errno there too.
11754 Delete unnecessary resetting of errno after syscall.
11755 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11756
10e86dd7
DE
11757 * configure.ac: Check for dladdr.
11758 * config.in: Regenerate.
11759 * configure: Regenerate.
11760 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11761 (try_thread_db_load): Update.
11762
4ee62156
DE
11763 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11764
00f515da
DE
117652009-12-18 Doug Evans <dje@google.com>
11766
e9464885
DE
11767 * event-loop.c: Include unistd.h if it exists.
11768
07d4f67e
DE
11769 * linux-low.c (my_waitpid): Move definition away from being in
11770 between linux_tracefork_child/linux_test_for_tracefork.
11771
00f515da
DE
11772 * gdb_proc_service.h (psaddr_t): Fix type.
11773 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11774 signature to match glibc.
11775
1de1badb
DE
117762009-12-16 Doug Evans <dje@google.com>
11777
11778 * linux-low.c (linux_read_memory): Fix argument to read.
11779
aeeb81d1
PA
117802009-11-26 Pedro Alves <pedro@codesourcery.com>
11781
11782 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11783 events, don't leave current_inferior pointing at null.
11784
10357975
PA
117852009-11-26 Pedro Alves <pedro@codesourcery.com>
11786
11787 * win32-low.c (LOG): Delete.
11788 (OUTMSG): Output to stderr.
11789 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11790 on compile time LOG macro.
11791 (win32_wait): Fix debug output.
11792
cf6e3471
PA
117932009-11-26 Pedro Alves <pedro@codesourcery.com>
11794
11795 * win32-low.c (win32_add_one_solib): If the dll name is
11796 "ntdll.dll", prepend the system directory to the dll path.
11797
0c85e18e
MK
117982009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11799
11800 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11801
9ac544ce 118022009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11803 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11804
11805 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11806 * configure.ac: Check for __mcoldfire__ and set
11807 gdb_cv_m68k_is_coldfire.
11808 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11809 reg-cf.o and reg-m68k.o.
11810 * configure: Regenerated.
11811
fd7dd3e6
PA
118122009-11-16 Pedro Alves <pedro@codesourcery.com>
11813
11814 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11815 Pass it to thread_db_free.
11816 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11817 proper `detaching' argument to linux_remove_process.
11818 * linux-low.h (thread_db_free): Add `detaching' parameter.
11819 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11820 to thread_db_free.
11821 (thread_db_free): Add `detaching' parameter. Only
11822 call td_ta_clear_event if detaching from process.
11823
75aa492e
MK
118242009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11825
11826 * thread-db.c (thread_db_free): Fix typo.
11827
21e1bee4
PP
118282009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11829
11830 PR gdb/10838
11831 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11832
8838b45e
NS
118332009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11834
11835 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11836 with an i686 compiler.
11837 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11838 needed.
11839 * configure: Rebuilt.
11840
8a35fb51
SL
118412009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11842
11843 PR gdb/10783
11844
11845 * server.c (handle_search_memory_1): Correct read_addr initialization
11846 in loop for searching subsequent chunks.
11847
96f15937
PP
118482009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11849
11850 * configure.ac: New --with-libthread-db option.
11851 * thread-db.c: Allow direct dependence on libthread_db.
11852 (thread_db_free): Adjust.
11853 * config.in: Regenerate.
11854 * configure: Likewise.
889bf7c5 11855
5f7d1694
PP
118562009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11857
11858 PR gdb/10757
11859 * thread-db.c (attach_thread): New function.
11860 (maybe_attach_thread): Return success/failure.
11861 (find_new_threads_callback): Adjust.
889bf7c5
PA
11862 (thread_db_find_new_threads): Loop until no new threads.
11863
88e3b899
PA
118642009-10-13 Pedro Alves <pedro@codesourcery.com>
11865
11866 * proc-service.c (ps_lgetregs): Formatting.
11867
cdbfd419
PP
118682009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11869
11870 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11871 * configure.ac: Adjust.
11872 * linux-low.h (struct process_info_private): Move members to struct
11873 thread_db.
11874 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11875 * linux-low.c (linux_remove_process): Adjust.
11876 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11877 * server.c (handle_query): Move code ...
11878 (handle_monitor_command): ... here. New function.
11879 * target.h (struct target_ops): New member.
11880 * thread-db.c (struct thread_db): New.
11881 (libthread_db_search_path): New variable.
11882 (thread_db_create_event, thread_db_enable_reporting)
11883 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11884 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11885 (try_thread_db_load_1, dladdr_to_soname): New functions.
11886 (try_thread_db_load, thread_db_load_search): New functions.
11887 (thread_db_init): Search for libthread_db.
11888 (thread_db_free): New function.
11889 (thread_db_handle_monitor_command): Likewise.
11890 * config.in: Regenerate.
11891 * configure: Regenerate.
889bf7c5 11892
4168d2d6
UW
118932009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11894
11895 * spu-low.c (spu_kill): Wait for inferior to terminate.
11896 Call clear_inferiors.
11897 (spu_detach): Call clear_inferiors.
11898
81ecdfbb
RW
118992009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11900
11901 * aclocal.m4: Regenerate.
11902 * config.in: Likewise.
11903 * configure: Likewise.
11904
0b9ff2c0
UW
119052009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11906
11907 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11908 (parse_spufs_run): New function.
11909 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11910 (ppc_breakpoint_at): Handle SPU breakpoints.
11911
efcbbd14
UW
119122009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11913
11914 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11915 (SPUFS_MAGIC): Define.
11916 (spu_enumerate_spu_ids): New function.
11917 (linux_qxfer_spu): New function.
11918 (linux_target_ops): Install linux_qxfer_spu.
11919
f4d9bade
UW
119202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11921
11922 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11923 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11924 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11925 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11926 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11927 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11928 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11929 (init_registers_powerpc_cell32l): Add prototype.
11930 (init_registers_powerpc_cell64l): Likewise.
11931 (ppc_arch_setup): Detect Cell/B.E. architecture.
11932
96e946ca
RW
119332009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11934
11935 * Makefile.in (datarootdir): New variable.
11936
58d6951d
DJ
119372009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11938
11939 * linux-low.c (linux_write_memory): Update debugging output.
11940 * Makefile.in (clean): Add new descriptions.
11941 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11942 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11943 * configure.srv: Add new files for arm*-*-linux*.
11944 * linux-arm-low.c: Add new declarations.
11945 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11946 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11947 (HWCAP_VFPv3D16): New.
11948 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11949 instead of __IWMMXT__.
11950 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11951 (arm_arch_setup): New.
11952 (target_regsets): Remove #ifdef. Add VFP regset.
11953 (the_low_target): Use arm_arch_setup.
11954
12b42a12
DJ
119552009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11956
11957 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11958 the main thread again.
11959
ac8c974e
AR
119602009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11961
11962 Adding Neutrino gdbserver.
11963 * configure: Regenerated.
11964 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11965 * configure.srv (i[34567]86-*-nto*): New target.
11966 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11967 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11968 (nto_comctrl) [__QNX__]: New function.
11969 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11970
4424e0c3 119712009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11972
11973 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11974 srv_tgtobj.
11975
912cf4ba
PA
119762009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11977 Pedro Alves <pedro@codesourcery.com>
11978
11979 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11980 don't support CONTEXT_EXTENDED_REGISTERS.
11981 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11982 (the_low_target): Install them.
11983 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11984 failing with ERROR_PIPE_NOT_CONNECTED.
11985
aa5ca48f
DE
119862009-06-30 Doug Evans <dje@google.com>
11987 Pierre Muller <muller@ics.u-strasbg.fr>
11988
11989 Add h/w watchpoint support to x86-linux, win32-i386.
11990 * Makefile.in (SFILES): Add i386-low.c
11991 (i386_low_h): Define.
11992 (i386-low.o): Add dependencies.
11993 (linux-x86-low.o): Add i386-low.h dependency.
11994 (win32-i386-low.o): Ditto.
11995 * i386-low.c: New file.
11996 * i386-low.h: New file.
11997 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11998 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11999 * linux-low.c (linux_add_process): Initialize arch_private.
12000 (linux_remove_process): Free arch_private.
12001 (add_lwp): Initialize arch_private.
12002 (delete_lwp): Free arch_private.
12003 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12004 provided.
12005 * linux-low.h (process_info_private): New member arch_private.
12006 (lwp_info): New member arch_private.
12007 (linux_target_ops): New members new_process, new_thread,
12008 prepare_to_resume.
12009 (ptid_of): New macro.
12010 * linux-x86-low.c: Include stddef.h, i386-low.h.
12011 (arch_process_info): New struct.
12012 (arch_lwp_info): New struct.
12013 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12014 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12015 (i386_dr_low_get_status): New function.
12016 (x86_insert_point, x86_remove_point): New functions.
12017 (x86_stopped_by_watchpoint): New function.
12018 (x86_stopped_data_address): New function.
12019 (x86_linux_new_process, x86_linux_new_thread): New functions.
12020 (x86_linux_prepare_to_resume): New function.
12021 (the_low_target): Add entries for insert_point, remove_point,
12022 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12023 prepare_to_resume.
12024 * server.c (debug_hw_points): New global.
12025 (monitor_show_help): Document set debug-hw-points.
12026 (handle_query): Process "set debug-hw-points".
12027 * server.h (debug_hw_points): Declare.
12028 (paddress): Declare.
12029 * utils.c (NUMCELLS, CELLSIZE): New macros.
12030 (get_sell, xsnprintf, paddress): New functions.
12031 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12032 remove_point, stopped_by_watchpoint, stopped_data_address.
12033 * win32-i386-low.c: Include i386-low.h.
12034 (debug_reg_state): Replaces dr.
12035 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12036 (i386_dr_low_get_status): New function.
12037 (i386_insert_point, i386_remove_point): New functions.
12038 (i386_stopped_by_watchpoint): New function.
12039 (i386_stopped_data_address): New function.
12040 (i386_initial_stuff): Update.
12041 (get_thread_context,set_thread_context,i386_thread_added): Update.
12042 (the_low_target): Add entries for insert_point,
12043 remove_point, stopped_by_watchpoint, stopped_data_address.
12044 * win32-low.c (win32_insert_watchpoint): New function.
12045 (win32_remove_watchpoint): New function.
12046 (win32_stopped_by_watchpoint): New function.
12047 (win32_stopped_data_address): New function.
12048 (win32_target_ops): Add entries for insert_watchpoint,
12049 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12050 * win32-low.h (win32_target_ops): New members insert_point,
12051 remove_point, stopped_by_watchpoint, stopped_data_address.
12052
d993e290
PA
120532009-06-25 Pedro Alves <pedro@codesourcery.com>
12054
12055 * server.c (process_serial_event): Re-return unsupported, not
12056 error, if the type isn't recognized. Re-allow supporting only
12057 insert or remove packets. Also call require_running for
12058 breakpoints. Add missing break statement to default case. Tidy.
12059 * target.h (struct target_ops): Rename insert_watchpoint to
12060 insert_point, and remove_watchpoint to remove_point.
12061
12062 * linux-low.h (struct linux_target_ops): Likewise.
12063 * linux-low.c (linux_insert_watchpoint): Rename to ...
12064 (linux_insert_point): ... this. Adjust.
12065 (linux_remove_watchpoint): Rename to ...
12066 (linux_remove_point): ... this. Adjust.
12067 (linux_target_ops): Adjust.
12068 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12069 (cris_insert_point): ... this.
12070 (cris_remove_watchpoint): Rename to ...
12071 (cris_remove_point): ... this.
12072 (the_low_target): Adjust.
12073
0f54c268
PM
120742009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12075
12076 * server.c (handle_v_kill): Pass signal_pid to
12077 kill_inferior if multi_process is zero.
12078
c6314022
AR
120792009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12080
12081 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12082 * target.h (target_ops): Comment for *_watchpoint to make it clear
12083 the functions can get types '0' and '1'.
12084
4463ce24
AR
120852009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12086
12087 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12088 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12089 * regcache.c (get_regcache): Likewise.
12090 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12091 * win32-low.c (child_fetch_inferior_registers): Remove check for
12092 regno 0.
12093
cf8fd78b
PA
120942009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12095 Pedro Alves <pedro@codesourcery.com>
12096
12097 * target.h (struct target_ops) <supports_multi_process>: New
12098 callback.
12099 (target_supports_multi_process): New.
12100 * server.c (handle_query): Even if GDB reports support, only
12101 enable multi-process if the target also supports it. Report
12102 multi-process support only if the target backend supports it.
12103 * linux-low.c (linux_supports_multi_process): New function.
12104 (linux_target_ops): Install it as target_supports_multi_process
12105 callback.
12106
47c0c975
DE
121072009-05-24 Doug Evans <dje@google.com>
12108
e09875d4
DE
12109 Global renaming of find_thread_pid to find_thread_ptid.
12110 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12111 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12112 All callers updated.
12113
e27d73f6
DE
12114 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12115 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12116 directly.
12117
47c0c975
DE
12118 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12119 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12120 (linux_resume_one_lwp): Ditto.
12121
2acc282a
DE
121222009-05-23 Doug Evans <dje@google.com>
12123
12124 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12125 from struct inferior_list_entry * to struct lwp_info *.
12126 All callers updated.
12127
9f1036c1
DE
121282009-05-13 Doug Evans <dje@google.com>
12129
12130 * linux-x86-low.c: Don't include assert.h.
12131 (x86_siginfo_fixup): Use fatal, not assert.
12132 (x86_arch_setup): Fix comment.
12133
d0722149
DE
121342009-05-12 Doug Evans <dje@google.com>
12135
12136 Biarch support for i386/amd64 gdbserver.
12137 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12138 Add linux-x86-low.c.
12139 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12140 (linux-x86-low.o): Add.
12141 * linux-x86-64-low.c: Delete.
12142 * linux-i386-low.c: Delete.
12143 * linux-x86-low.c: New file.
12144 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12145 linux-x86-low.o.
12146 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12147 linux-x86-low.o.
12148 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12149 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12150 (linux_child_pid_to_exec_file): New function.
12151 (elf_64_header_p, elf_64_file_p): New functions.
12152 (siginfo_fixup): New function.
12153 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12154 give target a chance to convert layout.
12155 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12156 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12157
fdeb2a12
DE
121582009-05-07 Doug Evans <dje@google.com>
12159
12160 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12161 (regsets_store_inferior_registers): Ditto.
12162
a6dbe5df
PA
121632009-05-06 Pedro Alves <pedro@codesourcery.com>
12164
12165 PR server/10048
12166
12167 * linux-low.c (must_set_ptrace_flags): Delete.
12168 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12169 of the global.
12170 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12171 `lwp->must_set_ptrace_flags' instead.
ba42693b 12172 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12173 (linux_wait_1): ... not here.
12174
5091eb23
DE
121752009-04-30 Doug Evans <dje@google.com>
12176
9f767825
DE
12177 * inferiors.c (started_inferior_callback): New function.
12178 (attached_inferior_callback): New function.
12179 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12180 * server.c (print_started_pid, print_attached_pid): New functions.
12181 (detach_or_kill_for_exit): New function.
12182 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12183 * server.h (have_started_inferiors_p): Declare.
12184 (have_attached_inferiors_p): Declare.
12185
5091eb23
DE
12186 * inferiors.c (remove_process): Fix memory leak, free process.
12187 * linux-low.c (linux_remove_process): New function.
12188 (linux_kill): Call it instead of remove_process.
12189 (linux_detach, linux_wait_1): Ditto.
12190
155c8968
PA
121912009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12192
12193 * configure.srv: Add x86 Windows CE target.
12194
7fe519cb
UW
121952009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12196
12197 * inferiors.c (get_thread_process): Make global.
12198 * server.h (get_thread_process): Add prototype.
12199 * thread-db.c (find_one_thread): Use get_thread_process
12200 instead of current_process.
12201 (thread_db_get_tls_address): Do not crash if called when
12202 thread layer is not yet initialized.
12203
5472f405
UW
122042009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12205
12206 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12207 * spu-low.c (current_tid): Rename to ...
12208 (current_ptid): ... this.
12209 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12210 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12211 ptid_get_lwp (current_ptid) instead of current_tid.
12212 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12213 instead of current_tid. Use find_process_pid to verify pid
12214 argument is valid. Pass proper argument to remove_process.
12215 (spu_thread_alive): Compare current_ptid instead of current_tid.
12216 (spu_resume): Likewise.
12217
55ac2b99
PA
122182009-04-02 Pedro Alves <pedro@codesourcery.com>
12219
12220 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12221 variable.
12222
95954743
PA
122232009-04-01 Pedro Alves <pedro@codesourcery.com>
12224
12225 Implement the multiprocess extensions, and add linux multiprocess
12226 support.
12227
12228 * server.h (ULONGEST): Declare.
12229 (struct ptid, ptid_t): New.
12230 (minus_one_ptid, null_ptid): Declare.
12231 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12232 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12233 (struct inferior_list_entry): Change `id' type from unsigned from
12234 to ptid_t.
12235 (struct sym_cache, struct breakpoint, struct
12236 process_info_private): Forward declare.
12237 (struct process_info): Declare.
12238 (current_process): Declare.
12239 (all_processes): Declare.
12240 (initialize_inferiors): Declare.
12241 (add_thread): Adjust to use ptid_t.
12242 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12243 (add_process, remove_process, find_thread_pid): Declare.
12244 (find_inferior_id): Adjust to use ptid_t.
12245 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12246 (multi_process): Declare.
12247 (push_event): Adjust to use ptid_t.
12248 (read_ptid, write_ptid): Declare.
12249 (prepare_resume_reply): Adjust to use ptid_t.
12250 (clear_symbol_cache): Declare.
12251 * inferiors.c (all_processes): New.
12252 (null_ptid, minus_one_ptid): New.
12253 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12254 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12255 (add_thread): Change unsigned long to ptid. Remove gdb_id
12256 parameter. Adjust.
12257 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12258 (gdb_id_to_thread): Rename to ...
12259 (find_thread_pid): ... this. Change unsigned long to ptid.
12260 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12261 (loaded_dll, pull_pid_from_list): Adjust.
12262 (add_process, remove_process, find_process_pid)
12263 (get_thread_process, current_process, initialize_inferiors): New.
12264 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12265 (struct target_waitstatus) <related_pid>: Ditto.
12266 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12267 return type to int.
12268 (struct target_ops) <join>: Add `pid' argument.
12269 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12270 (struct target_ops) <wait>: Add `ptid' field. Change return type
12271 to ptid.
12272 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12273 (mywait): Add `ptid' argument. Change return type to ptid_t.
12274 (target_pid_to_str): Declare.
12275 * target.c (set_desired_inferior): Adjust to use ptids.
12276 (mywait): Add new `ptid' argument. Adjust.
12277 (target_pid_to_str): New.
12278 * mem-break.h (free_all_breakpoints): Declare.
12279 * mem-break.c (breakpoints): Delelete.
12280 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12281 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12282 to use per-process breakpoint list.
12283 (free_all_breakpoints): New.
12284 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12285 (symbol_cache, all_symbols_looked_up): Delete.
12286 (hexchars): New.
12287 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12288 read_ptid): New.
12289 (prepare_resume_reply): Change ptid argument's type from unsigned
12290 long to ptid_t. Adjust. Implement W;process and X;process.
12291 (free_sym_cache, clear_symbol_cache): New.
12292 (look_up_one_symbol): Adjust to per-process symbol cache. *
12293 * server.c (cont_thread, general_thread, step_thread): Change type
12294 to ptid_t.
12295 (attached): Delete.
12296 (multi_process): New.
12297 (last_ptid): Change type to ptid_t.
12298 (struct vstop_notif) <ptid>: Change type to ptid_t.
12299 (queue_stop_reply, push_event): Change `ptid' argument's type to
12300 ptid_t.
12301 (discard_queued_stop_replies): Add `pid' argument.
12302 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12303 changes. Don't reference the `attached' global.
12304 (attach_inferior): Adjust to mywait interface changes.
12305 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12306 features. Handle and report "multiprocess+". Handle
12307 "qAttached:PID".
12308 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12309 changes.
12310 (handle_v_kill): New.
12311 (handle_v_stopped): Adjust to use target_pid_to_str.
12312 (handle_v_requests): Allow multiple attaches and runs when
12313 multiprocess extensions are in effect. Handle "vKill".
12314 (myresume): Adjust to use ptids.
12315 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12316 (handle_status): Adjust to discard_queued_stop_replies interface
12317 change.
12318 (first_thread_of, kill_inferior_callback)
12319 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12320 (main): Call initialize_inferiors. Adjust to use ptids, killing
12321 and detaching from all inferiors. Handle multiprocess packet
12322 variants.
12323 * linux-low.h: Include gdb_proc_service.h.
12324 (struct process_info_private): New.
12325 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12326 <lwpid_of>: Use ptid_get_lwp.
12327 (get_lwp_thread): Adjust.
12328 (struct lwp_info): Add `dead' member.
12329 (find_lwp_pid): Declare.
12330 * linux-low.c (thread_db_active): Delete.
12331 (new_inferior): Adjust comment.
12332 (inferior_pid): Delete.
12333 (linux_add_process): New.
12334 (handle_extended_wait): Adjust.
12335 (add_lwp): Change unsigned long to ptid.
12336 (linux_create_inferior): Add process to processes table. Adjust
12337 to use ptids. Don't set new_inferior here.
12338 (linux_attach_lwp): Rename to ...
12339 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12340 it. Adjust to use ptids.
12341 (linux_attach_lwp): New.
12342 (linux_attach): Add process to processes table. Don't set
12343 new_inferior here.
12344 (struct counter): New.
12345 (second_thread_of_pid_p, last_thread_of_process_p): New.
12346 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12347 multiple processes.
12348 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12349 processes. Remove process from process table.
12350 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12351 to multiple processes.
12352 (any_thread_of): New.
12353 (linux_detach): Add `pid' argument, and handle it. Remove process
12354 from processes table.
12355 (linux_join): Add `pid' argument. Handle it.
12356 (linux_thread_alive): Change unsighed long argument to ptid_t.
12357 Consider dead lwps as not being alive.
12358 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12359 threads we're not interested in.
12360 (same_lwp, find_lwp_pid): New.
12361 (linux_wait_for_lwp): Change `pid' argument's type from int to
12362 ptid_t. Adjust.
12363 (linux_wait_for_event): Rename to ...
12364 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12365 from int to ptid_t. Adjust.
12366 (linux_wait_for_event): New.
12367 (linux_wait_1): Add `ptid' argument. Change return type to
12368 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12369 that exit from the process table.
12370 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12371 Adjust.
12372 (mark_lwp_dead): New.
12373 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12374 stopping all threads, mark its main lwp as dead.
12375 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12376 ptids.
12377 (fetch_register, usr_store_inferior_registers)
12378 (regsets_fetch_inferior_registers)
12379 (regsets_store_inferior_registers, linux_read_memory)
12380 (linux_write_memory): Inline `inferior_pid'.
12381 (linux_look_up_symbols): Adjust to use per-process
12382 `thread_db_active'.
12383 (linux_request_interrupt): Adjust to use ptids.
12384 (linux_read_auxv): Inline `inferior_pid'.
12385 (initialize_low): Don't reference thread_db_active.
12386 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12387 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12388 (ps_getpid): Return the pid of the current inferior.
12389 * thread-db.c (proc_handle, thread_agent): Delete.
12390 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12391 per-process data.
12392 (find_one_thread): Change argument type to ptid_t. Adjust to
12393 per-process data.
12394 (maybe_attach_thread): Adjust to per-process data and ptids.
12395 (thread_db_find_new_threads): Ditto.
12396 (thread_db_init): Ditto.
12397 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12398 processes table. Adjust to use ptids.
12399 (spu_kill, spu_detach): Adjust interface. Remove process from
12400 processes table.
12401 (spu_join, spu_thread_alive): Adjust interface.
12402 (spu_wait): Adjust interface. Remove process from processes
12403 table. Adjust to use ptids.
12404 * win32-low.c (current_inferior_tid): Delete.
12405 (current_inferior_ptid): New.
12406 (debug_event_ptid): New.
12407 (thread_rec): Take a ptid. Adjust.
12408 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12409 (child_delete_thread): Ditto.
12410 (do_initial_child_stuff): Add `attached' argument. Add process to
12411 processes table.
12412 (child_fetch_inferior_registers, child_store_inferior_registers):
12413 Adjust.
12414 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12415 (win32_attach): Pass 1 to do_initial_child_stuff.
12416 (win32_kill): Adjust interface. Remove process from processes
12417 table.
12418 (win32_detach): Ditto.
12419 (win32_join): Adjust interface.
12420 (win32_thread_alive): Take a ptid.
12421 (win32_resume): Adjust to use ptids.
12422 (get_child_debug_event): Ditto.
12423 (win32_wait): Adjust interface. Remove exiting process from
12424 processes table.
12425
bd99dc85
PA
124262009-04-01 Pedro Alves <pedro@codesourcery.com>
12427
12428 Non-stop mode support.
12429
12430 * server.h (non_stop): Declare.
12431 (gdb_client_data, handler_func): Declare.
12432 (delete_file_handler, add_file_handler, start_event_loop):
12433 Declare.
12434 (handle_serial_event, handle_target_event, push_event)
12435 (putpkt_notif): Declare.
12436 * target.h (enum resume_kind): New.
12437 (struct thread_resume): Replace `step' field by `kind' field.
12438 (TARGET_WNOHANG): Define.
12439 (struct target_ops) <wait>: Add `options' argument.
12440 <supports_non_stop, async, start_non_stop>: New fields.
12441 (target_supports_non_stop, target_async): New.
12442 (start_non_stop): Declare.
12443 (mywait): Add `options' argument.
12444 * target.c (mywait): Add `options' argument. Print child exit
12445 notifications here.
12446 (start_non_stop): New.
12447 * server.c (non_stop, own_buf, mem_buf): New globals.
12448 (struct vstop_notif): New.
12449 (notif_queue): New global.
12450 (queue_stop_reply, push_event, discard_queued_stop_replies)
12451 (send_next_stop_reply): New.
12452 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12453 interface changes.
12454 (attach_inferior): In non-stop mode, don't wait for the target
12455 here.
12456 (handle_general_set): Handle QNonStop.
12457 (handle_query): When handling qC, return the current general
12458 thread, instead of the first thread of the list.
12459 (handle_query): If the backend supports non-stop mode, include
12460 QNonStop+ in the qSupported query response.
12461 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12462 and non-stop mode.
12463 (handle_v_attach, handle_v_run): Handle non-stop mode.
12464 (handle_v_stopped): New.
12465 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12466 (myresume): Adjust to use resume_kind. Handle non-stop.
12467 (queue_stop_reply_callback): New.
12468 (handle_status): Handle non-stop mode.
12469 (main): Clear non_stop flag on reconnection. Use the event-loop.
12470 Refactor serial protocol handling from here ...
12471 (process_serial_event): ... to this new function. When GDB
12472 selects any thread, select one here. In non-stop mode, wait until
12473 GDB acks all pending events before exiting.
12474 (handle_serial_event, handle_target_event): New.
12475 * remote-utils.c (remote_open): Install remote_desc in the event
12476 loop.
12477 (remote_close): Remove remote_desc from the event loop.
12478 (putpkt_binary): Rename to...
12479 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12480 (putpkt_binary): New as wrapper around putpkt_binary_1.
12481 (putpkt_notif): New.
12482 (prepare_resume_reply): In non-stop mode, don't change the
12483 general_thread.
12484 * event-loop.c: New.
12485 * Makefile.in (OBJ): Add event-loop.o.
12486 (event-loop.o): New rule.
12487
12488 * linux-low.h (pid_of): Moved here.
12489 (lwpid_of): New.
12490 (get_lwp_thread): Use lwpid_of.
12491 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12492 * linux-low.c (pid_of): Delete.
12493 (inferior_pid): Use lwpid_of.
12494 (linux_event_pipe): New.
12495 (target_is_async_p): New.
12496 (delete_lwp): New.
12497 (handle_extended_wait): Use lwpid_of.
12498 (add_lwp): Don't set lwpid field.
12499 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12500 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12501 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12502 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12503 first. Adjust to linux_wait_for_event interface changes. Use
12504 lwpid_of.
12505 (linux_detach): Don't delete the main lwp here.
12506 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12507 (status_pending_p): Don't consider explicitly suspended lwps.
12508 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12509 pointer. Add OPTIONS argument. Change return type to int. Use
12510 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12511 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12512 pointer. Add status pointer argument. Return a pid instead of a
12513 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12514 changes. In non-stop mode, don't switch to a random thread.
12515 (linux_wait): Rename to...
12516 (linux_wait_1): ... this. Add target_options argument, and handle
12517 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12518 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12519 clean exit and signal exit code. Don't stop all threads in
12520 non-stop mode. In all-stop mode, only stop all threads when
12521 reporting a stop to GDB. Handle explicit thread stop requests.
12522 (async_file_flush, async_file_mark): New.
12523 (linux_wait): New.
12524 (send_sigstop): Use lwpid_of.
12525 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12526 interface changes. In non-stop mode, don't switch to a random
12527 thread.
12528 (linux_resume_one_lwp): Use lwpid_of.
12529 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12530 (linux_resume_one_thread): ... this. Handle resume_stop. In
12531 non-stop mode, don't look for pending flag in all threads.
12532 (resume_status_pending_p): Don't consider explicitly suspended
12533 threads.
12534 (my_waitpid): Reimplement. Emulate __WALL.
12535 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12536 Use lwpid_of.
12537 (sigchld_handler, linux_supports_non_stop, linux_async)
12538 (linux_start_non_stop): New.
12539 (linux_target_ops): Register linux_supports_non_stop, linux_async
12540 and linux_start_non_stop.
12541 (initialize_low): Install SIGCHLD handler.
12542 * thread-db.c (thread_db_create_event, find_one_thread)
12543 (thread_db_get_tls_address): Use lwpid_of.
12544 * win32-low.c (win32_detach): Adjust to use resume_kind.
12545 (win32_wait): Add `options' argument.
12546 * spu-low.c (spu_resume): Adjust to use resume_kind.
12547 (spu_wait): Add `options' argument.
12548
5b1c542e
PA
125492009-04-01 Pedro Alves <pedro@codesourcery.com>
12550
12551 Decouple target code from remote protocol.
12552
12553 * target.h (enum target_waitkind): New.
12554 (struct target_waitstatus): New.
12555 (struct target_ops) <wait>: Return an unsigned long. Take a
12556 target_waitstatus pointer instead of a char pointer.
12557 (mywait): Likewise.
12558 * target.c (mywait): Change prototype to return an unsigned long.
12559 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12560 * server.h (thread_from_wait, old_thread_from_wait): Delete
12561 declarations.
12562 (prepare_resume_reply): Change prototype to take a
12563 target_waitstatus.
12564 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12565 (last_status, last_ptid): New.
12566 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12567 pid instead of a signal.
12568 (attach_inferior): Remove "status" and "signal" parameters.
12569 Adjust.
12570 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12571 not as an address.
12572 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12573 (handle_v_requests, myresume): Remove "status" and "signal"
12574 parameters. Adjust.
12575 (handle_status): New.
12576 (main): Delete local `status'. Adjust.
12577 * remote-utils.c: Include target.h.
12578 (prepare_resume_reply): Change prototype to take a
12579 target_waitstatus. Adjust.
12580
12581 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12582 interface.
12583 * spu-low.c (spu_wait): Adjust.
12584 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12585 Delete.
12586 (win32_wait): Adjust.
12587
2bd7c093
PA
125882009-04-01 Pedro Alves <pedro@codesourcery.com>
12589
12590 * target.h (struct thread_resume): Delete leave_stopped member.
12591 (struct target_ops): Add a `n' argument to the `resume' callback.
12592 * server.c (start_inferior): Adjust.
12593 (handle_v_cont, myresume): Adjust.
12594 * linux-low.c (check_removed_breakpoint): Adjust to resume
12595 interface change, and to removed leave_stopped field.
12596 (resume_ptr): Delete.
12597 (struct thread_resume_array): New.
12598 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12599 resume interface change.
12600 (linux_continue_one_thread, linux_queue_one_thread)
12601 (resume_status_pending_p): Check if the resume field is NULL
12602 instead of checking the leave_stopped member.
12603 (linux_resume): Adjust to the target resume interface change.
12604 * spu-low.c (spu_resume): Adjust to the target resume interface
12605 change.
12606 * win32-low.c (win32_detach, win32_resume): Ditto.
12607
c35fafde
PA
126082009-04-01 Pedro Alves <pedro@codesourcery.com>
12609
12610 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12611 flag.
12612 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12613 pending.
12614 (linux_continue_one_thread): Only preserve the stepping flag if
12615 there's a pending breakpoint.
12616
0a59d50b
PA
126172009-03-31 Pedro Alves <pedro@codesourcery.com>
12618
12619 * server.c (main): After the inferior having exited, call
12620 remote_close before exiting gdbserver.
12621
f04c6d38
TJB
126222009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12623
12624 Fix size of FPSCR in Power 7 processors.
12625 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12626 (PPC_FEATURE_HAS_DFP): New #define.
12627 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12628 size of the FPSCR.
12629
78e5cee6
PA
126302009-03-23 Pedro Alves <pedro@codesourcery.com>
12631
12632 * server.c (handle_query) Whitespace and formatting.
12633
1b3f6016
PA
126342009-03-22 Pedro Alves <pedro@codesourcery.com>
12635
12636 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12637 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12638 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12639 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12640 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12641 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12642 Makefile.in, configure.ac: Fix whitespace throughout.
12643 * configure: Regenerate.
12644
a07b2135
PA
126452009-03-22 Pedro Alves <pedro@codesourcery.com>
12646
12647 * inferiors.c (find_inferior): Make it safe for the callback
12648 function to delete the currently iterated inferior.
12649
67cc2626
PA
126502009-03-22 Pedro Alves <pedro@codesourcery.com>
12651
12652 * Makefile.in (linuw_low_h): Move higher.
12653 (thread-db.o): Depend on $(linux_low_h).
12654
54a0b537
PA
126552009-03-17 Pedro Alves <pedro@codesourcery.com>
12656
12657 Rename "process" to "lwp" throughout.
12658
12659 * linux-low.c (all_processes): Rename to...
12660 (all_lwps): ... this.
12661 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12662 (add_process): Rename to ...
12663 (add_lwp): ... this. Adjust.
12664 (linux_create_inferior): Adjust.
12665 (linux_attach_lwp): Adjust.
12666 (linux_attach): Adjust.
12667 (linux_kill_one_process): Rename to ...
12668 (linux_kill_one_lwp): ... this. Adjust.
12669 (linux_kill): Adjust.
12670 (linux_detach_one_process): Rename to ...
12671 (linux_detach_one_lwp): ... this. Adjust.
12672 (linux_detach): Adjust.
12673 (check_removed_breakpoint): Adjust.
12674 (status_pending_p): Adjust.
12675 (linux_wait_for_process): Rename to ...
12676 (linux_wait_for_lwp): ... this. Adjust.
12677 (linux_wait_for_event): Adjust.
12678 (send_sigstop): Adjust.
12679 (wait_for_sigstop): Adjust.
12680 (stop_all_processes): Rename to ...
12681 (stop_all_lwps): ... this.
12682 (linux_resume_one_process): Rename to ...
12683 (linux_resume_one_lwp): ... this. Adjust.
12684 (linux_set_resume_request, linux_continue_one_thread)
12685 (linux_queue_one_thread, resume_status_pending_p)
12686 (usr_store_inferior_registers, regsets_store_inferior_registers)
12687 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12688 Adjust.
12689 * linux-low.h (get_process): Rename to ...
12690 (get_lwp): ... this. Adjust.
12691 (get_thread_process): Rename to ...
12692 (get_thread_lwp): ... this. Adjust.
12693 (get_process_thread): Rename to ...
12694 (get_lwp_thread): ... this. Adjust.
12695 (struct process_info): Rename to ...
12696 (struct lwp_info): ... this.
12697 (all_processes): Rename to ...
12698 (all_lwps): ... this.
12699 * proc-service.c (ps_lgetregs): Adjust.
12700 * thread-db.c (thread_db_create_event, find_one_thread)
12701 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12702
0b16c5cf
PA
127032009-03-14 Pedro Alves <pedro@codesourcery.com>
12704
12705 * server.c (handle_query): Handle "qAttached".
12706
32de4b9d
NS
127072009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12708
12709 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12710 GPLv3, update license URL.
12711
2aecd87f
DE
127122009-03-01 Doug Evans <dje@google.com>
12713
93efd302 12714 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12715 (server_h): Add gdb_signals.h.
12716 (signals.o): Update.
12717 * server.h (target_signal_from_host,target_signal_to_host_p)
12718 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12719
86b1f9c5
PM
127202009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12721
12722 * remote-utils.c (getpkt): Also generate remote-debug
12723 information if noack_mode is set.
12724
4aa995e1
PA
127252009-02-06 Pedro Alves <pedro@codesourcery.com>
12726
12727 * server.c (handle_query): Report qXfer:siginfo:read and
12728 qXfer:siginfo:write as supported and handle them.
12729 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12730 * linux-low.c (linux_xfer_siginfo): New.
12731 (linux_target_ops): Set it.
12732
62709adf
PA
127332009-01-26 Pedro Alves <pedro@codesourcery.com>
12734
12735 * server.c (gdbserver_usage): Mention --remote-debug.
12736 (main): Accept '--remote-debug' switch.
12737
aef93bd7
DE
127382009-01-18 Doug Evans <dje@google.com>
12739
12740 * regcache.c (new_register_cache): No need to check result of xcalloc.
12741 * server.c (handle_search_memory): Back out calls to xmalloc,
12742 result is checked and error is returned to user upon failure.
12743 (handle_query): Ditto. Add more checks for result of malloc.
12744 (handle_v_cont): Check result of malloc, report error back to
12745 user upon failure.
12746 (handle_v_run): Ditto. Call freeargv.
12747 * server.h (freeargv): Declare.
12748 * utils.c (freeargv): New fn.
12749
54363045
DE
127502009-01-15 Doug Evans <dje@google.com>
12751
f626972c
DE
12752 * gdbreplay.c (perror_with_name): Make arg const char *.
12753 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12754 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12755 * utils.c (perror_with_name): Make arg const char *.
54363045 12756
18aae699
PA
127572009-01-14 Pedro Alves <pedro@codesourcery.com>
12758
12759 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12760 when handling a EXIT_PROCESS_DEBUG_EVENT.
12761
ff703abe
JB
127622009-01-06 Joel Brobecker <brobecker@adacore.com>
12763
12764 * gdbreplay.c (gdbreplay_version): Update copyright year.
12765 * server.c (gdbserver_version): Likewise.
12766
f21cc1a2 127672009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12768
12769 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12770 (handle_extended_wait): Improve comment.
0e21c1ec 12771
bca929d3
DE
127722008-12-13 Doug Evans <dje@google.com>
12773
12774 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12775 * server.h (ATTR_MALLOC): New macro.
12776 (xmalloc,xcalloc,xstrdup): Declare.
12777 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12778 * inferiors.c: Ditto.
12779 * linux-low.c: Ditto.
12780 * mem-break.c: Ditto.
12781 * regcache.c: Ditto.
12782 * remote-utils.c: Ditto.
12783 * server.c: Ditto.
12784 * target.c: Ditto.
12785 * win32-low.c: Ditto.
12786
97438e3f
DE
127872008-12-12 Doug Evans <dje@google.com>
12788
896c7fbb
DE
12789 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12790 in debugging printf.
12791
97438e3f
DE
12792 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12793
e3b886f8
DE
127942008-12-09 Doug Evans <dje@google.com>
12795
12796 * linux-low.h (struct process_info): Delete member tid, unused.
12797 * thread-db.c (find_one_thread): Update.
12798 (maybe_attach_thread): Update.
12799
07e059b5
VP
128002008-12-02 Pedro Alves <pedro@codesourcery.com>
12801
889bf7c5
PA
12802 * target.h (struct target_ops): Add qxfer_osdata member.
12803 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12804 and dirent.h.
12805 (linux_qxfer_osdata): New functions.
12806 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12807 callback.
12808 * server.c (handle_query): Handle "qXfer:osdata:read:".
12809 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12810 (buffer_xml_printf): New functions.
12811 * server.h (struct buffer): New.
12812 (buffer_grow_str, buffer_grow_str0): New macros.
12813 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12814 (buffer_xml_printf): Declare.
07e059b5 12815
4cab47ab
DE
128162008-11-24 Doug Evans <dje@google.com>
12817
12818 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12819
f142445f
DJ
128202008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12821
12822 * server.c (handle_v_run): Always use the supplied argument list.
12823
d0107bb6 128242008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12825
d0107bb6
BW
12826 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12827 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12828
2c4ad781
TJB
128292008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12830
12831 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12832 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12833 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12834 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12835 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12836 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12837 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12838 XML target descriptions.
12839 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12840 when inferior is running on an ISA 2.05 or later processor. Add
12841 special case to return offset for full 64-bit slot of FPSCR when
12842 in 32-bits.
12843
dfb64f85
DJ
128442008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12845
12846 * Makefile.in (SFILES, clean): Added sparc64 files.
12847 (reg-sparc64.o, reg-sparc64.c): New.
12848 * configure.srv (sparc*-*-linux*): New configuration.
12849 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12850 syscall arguments for SPARC.
12851 (regsets_store_inferior_registers): Likewise.
12852 * linux-sparc-low.c: New file.
12853
66b6e1dd
DE
128542008-10-21 Doug Evans <dje@google.com>
12855
12856 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12857 (READLINE_DIR,READLINE_DEP): Delete.
12858 (INTERNAL_CFLAGS): Update.
12859 (LINTFLAGS): Update.
12860
9b710a42
PA
128612008-10-10 Pedro Alves <pedro@codesourcery.com>
12862
12863 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12864 whole argv from the last run, not just argv[0].
12865
5822d809
PA
128662008-09-08 Pedro Alves <pedro@codesourcery.com>
12867
12868 * regcache.c (new_register_cache): Return NULL if the register
12869 cache size isn't known yet.
12870 (free_register_cache): Avoid dereferencing a NULL regcache.
12871
74aac56f
DJ
128722008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12873
12874 * configure.srv: Merge MIPS and MIPS64.
12875
400b20f5
MR
128762008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12877
12878 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12879
677c5bb1
LM
128802008-08-18 Luis Machado <luisgpm@br.ibm.com>
12881
12882 * Makefile.in: Add required vsx dependencies.
12883
12884 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12885 Declare init_registers_powerpc_vsx32l.
12886 Declare init_registers_powerpc_vsx64l.
12887 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12888 (ppc_arch_setup): Check for VSX in hwcap.
12889 (ppc_fill_vsxregset): New function.
12890 (ppc_store_vsxregset): New function.
12891 Add new VSX entry in regset_info target_regsets.
12892
12893 * configure.srv: Add new VSX dependencies.
12894
a6f3e723
SL
128952008-08-12 Pedro Alves <pedro@codesourcery.com>
12896
12897 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12898 (remote_open): Set or clear transport_is_reliable.
12899 (putpkt_binary): Don't expect acks in noack mode.
12900 (getpkt): Don't send ack/nac in noack mode.
12901 * server.c (handle_general_set): Handle QStartNoAckMode.
12902 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12903 qSupported.
12904 (main): Reset noack_mode on every connection.
12905 * server.h (noack_mode): Declare.
12906
a417dc56
RW
129072008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12908
12909 * Makefile.in (GDBREPLAY_OBS): New variable.
12910 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12911
3221518c
UW
129122008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12913 Daniel Jacobowitz <dan@codesourcery.com>
12914
12915 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12916 (usr_store_inferior_registers): Likewise.
12917 (regsets_store_inferior_registers): Likewise.
12918
ec56be1b
PA
129192008-07-31 Rolf Jansen <rj@surtec.com>
12920 Pedro Alves <pedro@codesourcery.com>
12921
12922 * configure.ac: Check for memmem declaration.
12923 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12924 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12925 (disable_packet_qfThreadInfo): Unconditionally compile.
12926 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12927 * configure, config.in: Regenerate.
12928
2fe5e3ff
DE
129292008-07-28 Doug Kwan <dougkwan@google.com>
12930
12931 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12932 (linux_write_memory): Remove declaration of errno.
12933
836acd6d
UW
129342008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12935
12936 * linux-low.c (handle_extended_wait): Do not use "status"
12937 variable uninitialized.
12938
aeba519e
PA
129392008-07-07 Pedro Alves <pedro@codesourcery.com>
12940
12941 * server.c (handle_v_attach): Inhibit reporting dll changes.
12942
db42f210
PA
129432008-06-27 Pedro Alves <pedro@codesourcery.com>
12944
12945 * remote-utils.c (prepare_resume_reply): If requested, don't
12946 output "thread:TID" in the T stop reply.
12947
12948 * server.c (disable_packet_vCont, disable_packet_Tthread)
12949 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12950 (handle_query): If requested, disable support for qC, qfThreadInfo
12951 and qsThreadInfo.
12952 (handle_v_requests): If requested, disable support for vCont.
12953 (gdbserver_show_disableable): New.
12954 (main): Handle --disable-packet and --disable-packet=LIST.
12955
12956 * server.h (disable_packet_vCont, disable_packet_Tthread)
12957 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12958
8e4c5421
CD
129592008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12960
12961 * server.c (gdbserver_usage): Mention --version.
12962
6e23a804
DJ
129632008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12964
12965 * Makefile.in (gdbreplay.o): New rule.
12966
90aa6a40
JM
129672008-06-06 Joseph Myers <joseph@codesourcery.com>
12968
12969 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12970 message, not gdbserver.
12971
c16158bc 129722008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12973 Nathan Sidwell <nathan@codesourcery.com>
12974 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12975
12976 * acinclude.m4: Include ../../config/acx.m4.
12977 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12978 * configure, config.in: Regenerate.
12979 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12980 * server.c (gdbserver_version): Print PKGVERSION.
12981 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12982 (main): Adjust gdbserver_usage calls.
12983 * gdbreplay.c (version, host_name): Add declarations.
12984 (gdbreplay_version, gdbreplay_usage): New.
12985 (main): Accept --version and --help options.
12986
aeb75bf5
DJ
129872008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12988
12989 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12990 (arm_breakpoint_at): Handle Thumb.
12991 (the_low_target): Add comment.
12992
76b233dd
UW
129932008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12994
12995 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12996
08388c79
DE
129972008-05-09 Doug Evans <dje@google.com>
12998
a3c83fae
DE
12999 * server.h (decode_search_memory_packet): Declare.
13000 * remote-utils.c (decode_search_memory_packet): New fn.
13001 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13002 (handle_search_memory): New fn.
13003 (handle_query): Process qSearch:memory packets.
13004
bb9c3d36
UW
130052008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * regcache.c (registers_length): Remove.
13008 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13009 full register packet.
13010 * regcache.h (registers_length): Remove prototype.
13011 * server.h (PBUFSIZ): Define to 16384.
13012
7284e1be
UW
130132008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13014
13015 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13016 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13017 powerpc-64l.o, and powerpc-altivec64l.o.
13018 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13019 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13020 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13021 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13022 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13023 to srv_xmlfiles.
13024
13025 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13026 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13027 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13028 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13029 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13030 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13031 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13032 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13033 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13034 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13035 (clean): Update.
13036
13037 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13038 (init_registers_powerpc_32l): ... this new prototype.
13039 (init_registers_powerpc_32): Remove, replace by ...
13040 (init_registers_powerpc_altivec32l): ... this new prototype.
13041 (init_registers_powerpc_e500): Remove, replace by ...
13042 (init_registers_powerpc_e500l): ... this new prototype.
13043 (init_registers_ppc64): Remove, replace by ...
13044 (init_registers_powerpc_64l): ... this new prototype.
13045 (init_registers_powerpc_64): Remove, replace by ...
13046 (init_registers_powerpc_altivec64l): ... this new prototype.
13047 (ppc_num_regs): Set to 73.
13048 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13049 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13050 (ppc_cannot_store_register): Handle orig_r3 and trap.
13051 (ppc_arch_setup): Update init_registers_... calls.
13052 (ppc_fill_gregset): Handle orig_r3 and trap.
13053
13054 * inferiors.c (clear_inferiors): Reset current_inferior.
13055
fdc59709
PB
130562008-04-23 Paolo Bonzini <bonzini@gnu.org>
13057
889bf7c5
PA
13058 * acinclude.m4: Add override.m4.
13059 * configure: Regenerate.
fdc59709 13060
c9b2f845
UW
130612008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13062
13063 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13064 initial call to init_register_ppc64.
13065
550512b8
UW
130662008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13067
43aaf8b6
PA
13068 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13069 single powerpc*-*-linux* case.
550512b8
UW
13070 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13071
b6430ec3
UW
130722008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13073
13074 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13075 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13076 from reg_xmlfiles.
13077 * linux-ppc-low.c: Include <elf.h>.
13078 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13079 (ppc_hwcap): New global variable.
13080 (ppc_regmap): Remove __SPE__ #ifdef sections.
13081 (ppc_regmap_e500): New global variable.
13082 (ppc_cannot_store_register): Update __SPE__ special case.
13083 (ppc_get_hwcap): New function.
13084 (ppc_arch_setup): Use it to determine whether inferior supports
13085 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13086 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13087 Do not access registers if target does not support AltiVec.
13088 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13089 Do not access registers if target does not support SPE.
13090 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13091
52fa2412
UW
130922008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13093
13094 * linux-low.c (disabled_regsets, num_regsets): New.
13095 (use_regsets_p): Delete.
13096 (linux_wait_for_process): Clear disabled_regsets.
13097 (regsets_fetch_inferior_registers): Check and set it.
13098 (regsets_store_inferior_registers): Likewise.
13099 (linux_fetch_registers, linux_store_registers): Do not use
13100 use_regsets_p.
13101 (initialize_low): Allocate disabled_regsets.
13102
e28b3332
DJ
131032008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13104
13105 * Makefile.in (LIBOBJS): New.
13106 (OBS): Use LIBOBJS.
13107 (memmem.o): New rule.
13108 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13109 * configure: Regenerated.
13110
4536995d
UW
131112008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13112
13113 * server.c (handle_query): Never return "unsupported" for
13114 qXfer:features:read queries.
13115
221c031f
UW
131162008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13117
13118 * server.c (get_features_xml): Fix inverted condition.
13119 (handle_query): Always support qXfer:feature:read.
13120
ccd213ac
DJ
131212008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * server.c (wrapper_argv): New.
13124 (start_inferior): Handle wrapper_argv. If set, expect an extra
13125 trap.
13126 (gdbserver_usage): Document --wrapper.
13127 (main): Parse --wrapper.
13128
6fe305f7
UW
131292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13130
13131 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13132 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13133 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13134 (ppc_set_pc): Likewise.
13135 (ppc_arch_setup): New function.
13136 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13137 of collect_register.
889bf7c5 13138 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13139
5b0a002e
UW
131402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13141
13142 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13143 instead of linux-ppc64-low.o.
13144 * linux-ppc64-low.c: Remove file.
13145 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13146 (linux-ppc64-low.o): Remove rule.
13147
13148 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13149 (init_registers_powerpc_64): Likewise.
13150 (ppc_regmap): Conditionally define depending on __powerpc64__.
13151 (ppc_cannot_store_register): Do not special-case "fpscr" when
13152 compiled on __powerpc64__.
13153 (ppc_collect_ptrace_register): New function.
13154 (ppc_supply_ptrace_register): New function.
13155 (ppc_breakpoint): Change type to "unsigned int".
13156 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13157 (the_low_target): Conditionally provide initializers for the
889bf7c5 13158 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13159 collect_ptrace_register and supply_ptrace_register members.
13160
9b4b61c8
UW
131612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13162
13163 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13164 * server.c (gdbserver_xmltarget): Define.
13165 (get_features_xml): Use it to replace "target.xml" and arch_string.
13166
13167 * configure.srv: Remove srv_xmltarget. Add XML files that were
13168 mentioned there to srv_xmlfiles instead. Remove conditional tests
13169 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13170 srv_xmlfiles and srv_regobj to include all possible choices.
13171 * configure.ac (srv_xmltarget): Remove.
13172 (srv_xmlfiles): Do not add "target.xml".
13173 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13174 checks for supplementary target information.
13175 * configure: Regenerate.
13176 * Makefile.in (XML_TARGET): Remove.
13177 (target.xml): Remove rule.
13178 (clean): Do not clean up target.xml.
13179 (.PRECIOUS): Do not mention target.xml.
13180
13181 * target.h (struct target_ops): Remove arch_string member.
13182 * linux-low.c (linux_arch_string): Remove.
13183 (linux_target_ops): Remove arch_string initializer.
13184 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13185 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13186 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13187 * spu-low.c (spu_arch_string): Remove.
13188 (spu_target_ops): Remove arch_string initializer.
13189 * win32-low.c (win32_arch_string): Remove.
13190 (win32_target_ops): Remove arch_string initializer.
13191 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13192 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13193 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13194
ee1a7ae4
UW
131952008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13196
13197 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13198 by collect_ptrace_register and supply_ptrace_register hooks.
13199 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13200 instead of checking for the_low_target.left_pad_xfer.
13201 (usr_store_inferior_registers): Use collect_ptrace_register callback
13202 instead of checking for the_low_target.left_pad_xfer.
13203
13204 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13205 (s390_supply_ptrace_register): Likewise.
13206 (s390_fill_gregset): Call s390_collect_ptrace_register.
13207 (the_low_target): Update.
13208
13209 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13210 (ppc_supply_ptrace_register): Likewise.
13211 (the_low_target): Update.
13212
13213 * linux-i386-low.c (the_low_target): Update.
13214 * linux-x86-64-low.c (the_low_target): Update.
13215
d61ddec4
UW
132162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13217
13218 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13219 reg-s390.o and reg-s390x.o.
13220
13221 * linux-low.c (new_inferior): New global variable.
13222 (linux_create_inferior, linux_attach): Set it.
13223 (linux_wait_for_process): Call the_low_target.arch_setup after the
13224 target has stopped for the first time.
13225 (initialize_low): Do not call the_low_target.arch_setup.
13226
13227 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13228 (s390_set_pc): Likewise.
13229 (s390_arch_setup): New function.
13230 (the_low_target): Use s390_arch_setup as arch_setup routine.
13231
13232 * regcache.c (realloc_register_cache): New function.
13233 (set_register_cache): Call it for each existing regcache.
13234
d05b4ac3
UW
132352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13236
13237 * server.h (init_registers): Remove prototype.
13238
13239 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13240 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13241 instead of init_registers ().
13242 * linux-arm-low.c (init_registers_arm): Add prototype.
13243 (init_registers_arm_with_iwmmxt): Likewise.
13244 (the_low_target): Add initializer for arch_setup field.
13245 * linux-cris-low.c (init_registers_cris): Add prototype.
13246 (the_low_target): Add initializer for arch_setup field.
13247 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13248 (the_low_target): Add initializer for arch_setup field.
13249 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13250 (the_low_target): Add initializer for arch_setup field.
13251 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13252 (the_low_target): Add initializer for arch_setup field.
13253 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13254 (the_low_target): Add initializer for arch_setup field.
13255 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13256 (the_low_target): Add initializer for arch_setup field.
13257 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13258 (init_registers_mips64_linux): Likewise.
13259 (the_low_target): Add initializer for arch_setup field.
13260 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13261 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13262 (the_low_target): Add initializer for arch_setup field.
13263 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13264 (init_registers_powerpc_64): Likewise.
13265 (the_low_target): Add initializer for arch_setup field.
13266 * linux-s390-low.c (init_registers_s390): Add prototype.
13267 (init_registers_s390x): Likewise.
13268 (the_low_target): Add initializer for arch_setup field.
13269 * linux-sh-low.c (init_registers_sh): Add prototype.
13270 (the_low_target): Add initializer for arch_setup field.
13271 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13272 (the_low_target): Add initializer for arch_setup field.
13273 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13274 (the_low_target): Add initializer for arch_setup field.
13275
13276 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13277 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13278 instead of init_registers ().
13279 * win32-arm-low.c (init_registers_arm): Add prototype.
13280 (the_low_target): Add initializer for arch_setup field.
13281 * win32-i386-low.c (init_registers_i386): Add prototype.
13282 (the_low_target): Add initializer for arch_setup field.
13283
13284 * spu-low.c (init_registers_spu): Add prototype.
13285 (initialize_low): Call initialie_registers_spu () instead of
13286 initialize_registers ().
13287
fd96d250
PA
132882008-02-19 Pedro Alves <pedro@codesourcery.com>
13289
13290 * server.c (handle_v_requests): When handling the vRun and vAttach
13291 packets, if already debugging a process, don't kill it. Return an
13292 error instead.
13293
d41b6bb4
DJ
132942008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13295
13296 * server.c (handle_query): Correct length check.
13297
5ac588cf
PA
132982008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13299
13300 * win32-low.c (do_initial_child_stuff): Add process handle
13301 parameter. Set current_process_handle and current_process_id from the
13302 parameters. Clear globals.
13303 (win32_create_inferior): Don't set current_process_handle and
13304 current_process_id here. Instead pass them on the call to
13305 do_initial_child_stuff.
13306 (win32_attach): Likewise.
13307 (win32_clear_inferiors): New.
13308 (win32_kill): Don't close the current process handle or the
13309 current thread handle here. Instead call win32_clear_inferiors.
13310 (win32_detach): Don't open a new handle to the process. Call
13311 win32_clear_inferiors.
13312 (win32_join): Don't rely on current_process_handle; open a new
13313 handle using the process id.
13314 (win32_wait): Call win32_clear_inferiors when the inferior process
13315 has exited.
13316
ecd7ecbc
DJ
133172008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13318
13319 * server.c (monitor_show_help): Add "exit".
13320
1525d545
MG
133212008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13322
ecd7ecbc 13323 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13324 (clean): Add reg-xtensa.c.
13325 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13326 * configure.srv (xtensa*-*-linux*) New target.
13327 * linux-xtensa-low.c: New.
13328 * xtensa-xtregs.c: New.
1525d545 13329
59a016f0
PA
133302008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13331
13332 * hostio.c: Don't include errno.h.
13333 (errno_to_fileio_errno): Move to hostio-errno.
13334 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13335 error number outputting to the target->hostio_last_error callback.
13336 (hostio_packet_error): Use FILEIO_EINVAL directly.
13337 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13338 calls to hostio_error.
13339 * hostio-errno.c: New.
13340 * server.h (hostio_last_error_from_errno): Declare.
13341 * target.h (target_ops): Add hostio_last_error member.
13342 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13343 as hostio_last_error handler.
889bf7c5 13344 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13345 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13346 (wince_hostio_last_error): New functions.
13347 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13348 as hostio_last_error handler.
13349 (win32_target_ops) [!_WIN32_WCE]: Register
13350 hostio_last_error_from_errno as hostio_last_error handler.
13351 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13352 (hostio-errno.o): New rule.
13353 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13354 * configure.srv (srv_hostio_err_objs): New variable. Default to
13355 hostio-errno.o.
13356 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13357 * configure: Regenerate.
13358
2d717e4f
DJ
133592008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13360
13361 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13362 (linux_kill, linux_detach): Clean up the process list.
13363 * remote-utils.c (remote_open): Improve port number parsing.
13364 (putpkt_binary, input_interrupt): Only send interrupts if the target
13365 is running.
13366 * server.c (extended_protocol): Make static.
13367 (attached): Define earlier.
13368 (exit_requested, response_needed, program_argv): New variables.
13369 (target_running): New.
13370 (start_inferior): Clear attached here.
13371 (attach_inferior): Set attached here.
13372 (require_running): Define.
13373 (handle_query): Use require_running and target_running. Implement
13374 "monitor exit".
13375 (handle_v_attach, handle_v_run): New.
13376 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13377 (gdbserver_usage): Update.
13378 (main): Redo argument parsing. Handle --debug and --multi. Handle
13379 --attach along with other options or after the port. Save
13380 program_argv. Support no initial program. Resynchronize
13381 communication with GDB after an error. Handle "monitor exit".
13382 Use require_running and target_running. Always allow the extended
13383 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13384 restart in extended mode.
13385 * README: Refer to the GDB manual. Update --attach usage.
13386
7407e2de
AS
133872007-12-20 Andreas Schwab <schwab@suse.de>
13388
13389 * linux-low.c (STACK_SIZE): Define.
13390 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13391 (linux_test_for_tracefork): Likewise.
13392
b65d95c5
DJ
133932007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * linux-low.c (linux_wait_for_event): Update messages. Do not
13396 reinsert auto-delete breakpoints.
13397 * mem-break.c (struct breakpoint): Change return type of handler to
13398 int.
13399 (set_breakpoint_at): Update handler type.
13400 (reinsert_breakpoint_handler): Return 1 instead of calling
13401 delete_breakpoint.
13402 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13403 setting a new one.
13404 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13405 * mem-break.h (set_breakpoint_at): Update handler type.
13406 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13407 * win32-low.c (auto_delete_breakpoint): New.
13408 (get_child_debug_event): Use it.
13409
4e799345
DJ
134102007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13411
13412 * configure.ac: Check for pread and pwrite.
13413 * hostio.c (handle_pread): Fall back to lseek and read.
13414 (handle_pwrite): Fall back to lseek and write.
13415 * config.in, configure: Regenerated.
13416
27524b67
DJ
134172007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13418
13419 * server.c (myresume): Add own_buf argument.
13420 (main): Update calls.
13421
a20d5e98
DJ
134222007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13423
13424 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13425 * remote-utils.c (remote_open): Do not call disable_async_io.
13426 (block_async_io): Delete.
13427 (unblock_async_io): Make static.
13428 (initialize_async_io): New.
13429 * server.c (handle_v_cont): Handle async I/O here.
13430 (myresume): Likewise. Move other common resume tasks here...
13431 (main): ... from here. Call initialize_async_io. Disable async
13432 I/O before the main loop.
13433 * server.h (initialize_async_io): Declare.
13434 (block_async_io, unblock_async_io): Delete prototypes.
13435 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13436
b79d787e
DJ
134372007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13438
13439 * remote-utils.c (readchar): Allow binary data in received messages.
13440
d97903b2
PA
134412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13442
13443 * win32-low.c (attaching): New global.
13444 (win32_create_inferior): Clear the `attaching' global.
13445 (win32_attach): Set the `attaching' global.
13446 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13447 attaching. Only set a breakpoint at the entry point if not
13448 attaching.
13449
311de423
PA
134502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13451
13452 * server.c (main): Don't report dll events on the initial
13453 connection on attaches.
13454
6c2d16d2
PA
134552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13456
13457 * server.c (main): Relax numerical bases supported for the pid of
13458 the --attach command line argument.
13459
5ca906e6
PA
134602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13461
13462 * win32-low.c (win32_attach): Call OpenProcess before
13463 DebugActiveProcess, not after. Add last error output to error
13464 call.
13465
9c6c8194
PA
134662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13467
13468 * win32-low.c (win32_get_thread_context)
13469 (win32_set_thread_context): New functions.
13470 (thread_rec): Use win32_get_thread_context.
13471 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13472 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13473 field.
13474
4d5d1aaa
PA
134752007-12-03 Leo Zayas
13476 Pedro Alves <pedro_alves@portugalmail.pt>
13477
13478 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13479 global variables.
13480 (child_add_thread): Minor cleanup.
13481 (child_continue): Resume artificially suspended threads before
13482 calling ContinueDebugEvent.
13483 (suspend_one_thread): New.
13484 (fake_breakpoint_event): New.
13485 (get_child_debug_event): Change return type to int. Check here if
13486 gdb sent an interrupt request. If a soft interrupt was requested,
13487 fake a breakpoint event. Return 0 if there is no event to handle,
13488 and 1 otherwise.
13489 (win32_wait): Don't check here if gdb sent an interrupt request.
13490 Ensure there is a valid event to handle.
13491 (win32_request_interrupt): Add soft interruption method as last
13492 resort.
13493
c436e841
PA
134942007-12-03 Leo Zayas
13495 Pedro Alves <pedro_alves@portugalmail.pt>
13496
13497 * win32-low.h (win32_thread_info): Add descriptions to the
13498 structure members. Replace `suspend_count' counter by a
13499 `suspended' flag.
13500 * win32-low.c (thread_rec): Update condition of when to get the
13501 context from the inferior. Rely on ContextFlags being set if it
13502 has already been retrieved. Only suspend the inferior thread if
13503 we haven't already. Warn if that fails.
13504 (continue_one_thread): s/suspend_count/suspended/. Only call
13505 ResumeThread once. Warn if that fails.
13506
e7b5fa67
PA
135072007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * win32-low.c (win32_wait): Don't read from the inferior when it
13510 has already exited.
13511
a385171d
PA
135122007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13513
13514 * Makefile.in (win32_low_h): New variable.
13515 (win32-low.o): Add dependency on $(win32_low_h).
13516 (win32-arm-low.o, win32-i386-low.o): New rules.
13517
f80c84b3
DJ
135182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13519
13520 * hostio.c: Correct copyright year.
13521
a6b151f1
DJ
135222007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13523
13524 * Makefile.in (OBS): Add hostio.o.
13525 (hostio.o): New rule.
13526 * server.h (handle_vFile): Declare.
13527 * hostio.c: New file.
13528 * server.c (handle_v_requests): Take packet_len and new_packet_len
13529 for binary packets. Call handle_vFile.
13530 (main): Update call to handle_v_requests.
13531
f9387fc3
DJ
135322007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13533
13534 * linux-low.c: Include <sched.h>.
13535
51c2684e
DJ
135362007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * linux-low.c (linux_tracefork_grandchild): New.
13539 (linux_tracefork_child): Use clone.
13540 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13541
75f83163
JB
135422007-10-31 Joel Brobecker <brobecker@adacore.com>
13543
13544 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13545
da5898ce
DJ
135462007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13547
13548 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13549
24a09b5f
DJ
135502007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * inferiors.c (change_inferior_id): Delete.
13553 (add_pid_to_list, pull_pid_from_list): New.
13554 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13555 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13556 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13557 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13558 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13559 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13560 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13561 (using_threads): Always set to 1.
13562 (handle_extended_wait): New.
13563 (add_process): Do not set TID.
13564 (linux_create_inferior): Set must_set_ptrace_flags.
13565 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13566 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13567 (linux_thread_alive): Rename TID argument to LWPID.
13568 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13569 (linux_wait_for_event): Do not use TID or check using_threads. Update
13570 call to dead_thread_notify. Call handle_extended_wait.
13571 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13572 (send_sigstop): Delete sigstop_sent.
13573 (wait_for_sigstop): Avoid TID.
13574 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13575 (linux_test_for_tracefork): New.
13576 (linux_lookup_signals): Use thread_db_active and
13577 linux_supports_tracefork_flag.
13578 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13579 * linux-low.h (get_process_thread): Avoid TID.
13580 (struct process_ifo): Move thread_known and tid to the end. Remove
13581 sigstop_sent.
13582 (linux_attach_lwp, thread_db_init): Update prototypes.
13583 * server.h (change_inferior_id): Delete prototype.
13584 (add_pid_to_list, pull_pid_from_list): New prototypes.
13585 * thread-db.c (thread_db_use_events): New.
13586 (find_first_thread): Rename to...
13587 (find_one_thread): ...this. Update callers and messages. Do not
13588 call fatal. Check thread_db_use_events. Do not call
13589 change_inferior_id or new_thread_notify.
13590 (maybe_attach_thread): Update. Do not call new_thread_notify.
13591 (thread_db_init): Set thread_db_use_events. Check use_events.
13592 * utils.c (fatal, warning): Correct message prefix.
13593
30ed0a8f
DJ
135942007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13595
13596 * Makefile.in (clean): Remove new files.
13597 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13598 (powerpc-64.o, powerpc-64.c): New rules.
13599 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13600 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13601 with SPE.
13602 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13603 SPE targets.
13604 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13605 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13606 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13607 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13608 (target_regsets): Add AltiVec and SPE register sets.
13609 * configure.ac: Check for AltiVec and SPE.
13610 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13611 (ppc_fill_vrregset, ppc_store_vrregset): New.
13612 (target_regsets): Add AltiVec register set.
13613 * configure: Regenerated.
13614
fd462a61
DJ
136152007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13616
13617 * linux-low.c (O_LARGEFILE): Define.
13618 (linux_read_memory): Use /proc/PID/mem.
13619 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13620 * configure, config.in: Regenerated.
13621
69f223ed
DJ
136222007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13623
13624 * linux-low.c (linux_wait_for_event): Do not pass signals while
13625 single-stepping.
13626
aec18585
PA
136272007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13628
13629 * win32-low.c (create_process): New.
13630 (win32_create_inferior): Use create_process instead of
13631 CreateProcess. If create_process failed retry appending an ".exe"
13632 suffix. Store the GetLastError result immediatelly after
13633 create_process calls and use it on the call to error.
13634
34d86ddd
PA
136352007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13636
13637 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13638
5a0e3bd0
JB
136392007-08-23 Joel Brobecker <brobecker@adacore.com>
13640
13641 * configure.ac: Switch license to GPLv3.
13642
f88c79e6
MS
136432007-08-01 Michael Snyder <msnyder@access-company.com>
13644
13645 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13646
6b3d9b83
PA
136472007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13648
13649 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13650 typedef.
13651 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13652 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13653 CloseToolhelp32Snapshot.
13654 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13655 CloseToolhelp32Snapshot.
13656
c588c53c
MS
136572007-07-27 Michael Snyder <michael.snyder@access-company.com>
13658
13659 * server.c (main): Check for inferior exit before main loop.
13660
aa0403d9
PA
136612007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13662
13663 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13664 instead of on tmp_desc.
13665
255e7678
DJ
136662007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13667 Daniel Jacobowitz <dan@codesourcery.com>
13668
13669 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13670 (add_thread): Minor cleanups.
13671 (clear_inferiors): Move lower in the file. Clear the DLL
13672 list.
13673 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13674 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13675 (xml_escape_text): New.
13676 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13677 for qSupported.
13678 (handle_v_cont): Report errors.
13679 (gdbserver_version): Update.
13680 (main): Correct size of own_buf. Do not report initial DLL events.
13681 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13682 (unloaded_dll, xml_escape_text): New.
13683 * win32-low.c (enum target_waitkind): Update comments.
13684 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13685 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13686 (win32_EnumProcessModules, win32_GetModuleInformation)
13687 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13688 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13689 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13690 (win32_Module32First, win32_Module32Next, load_toolhelp)
13691 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13692 (get_child_debug_event): Handle DLL events.
13693 (win32_wait): Likewise.
13694
0d37add9
DJ
136952007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13696
13697 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13698 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13699
45e2715e
PA
137002007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13701
13702 * win32-low.c (handle_output_debug_string): Ignore event if not
13703 waiting.
13704
c5674cf1
PA
137052007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13706
13707 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13708
2bbe3cc1
DJ
137092007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13712
ae13219e
DJ
137132007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * inferiors.c (change_inferior_id): Add comment.
13716 * linux-low.c (check_removed_breakpoint): Add an early
13717 prototype. Improve debug output.
13718 (linux_attach): Doc update.
13719 (linux_detach_one_process, linux_detach): Clean up before releasing
13720 each process.
13721 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13722 * linux-low.h (struct process_info): Doc improvement.
13723 * mem-break.c (delete_all_breakpoints): New.
13724 * mem-break.h (delete_all_breakpoints): New prototype.
13725 * thread-db.c (find_first_thread): New.
13726 (thread_db_create_event): Call it instead of
13727 thread_db_find_new_threads. Clean up unused variables.
13728 (maybe_attach_thread): Remove first thread handling.
13729 (thread_db_find_new_threads): Use find_first_thread.
13730 (thread_db_get_tls_address): Likewise.
13731
4105de34
DJ
137322007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * thread-db.c (thread_db_find_new_threads): Add prototype.
13735 (thread_db_create_event): Check for the main thread before adding
13736 a new thread.
13737 (maybe_attach_thread): Only enable event reporting if TID == 0.
13738 (thread_db_get_tls_address): Check for new threads.
13739
2b876972
DJ
137402007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13741
13742 * linux-low.c (linux_create_inferior): Try execv before execvp.
13743 * spu-low.c (spu_create_inferior): Likewise.
13744
7a245884
DJ
137452007-06-13 Mike Frysinger <vapier@gentoo.org>
13746
13747 * linux-low.c (linux_create_inferior): Change execv to execvp.
13748 * spu-low.c (spu_create_inferior): Likewies.
13749
117ce543
DJ
137502007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13751
13752 * Makefile.in (clean): Clean new files instead of deleted ones.
13753 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13754 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13755 rules.
13756 * configure.srv: Specify XML files and new regformats for MIPS and
13757 MIPS64 GNU/Linux.
13758 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13759 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13760 an entry for the restart register.
13761 (mips_cannot_fetch_register, mips_cannot_store_register)
13762 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13763 register names to match the XML descriptions.
13764 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13765 restart register instead of $0.
13766
0e7f50da
UW
137672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13768 Markus Deuling <deuling@de.ibm.com>
13769
13770 * remote-utils.c (decode_xfer_write): New function.
13771 * server.h (decode_xfer_write): Add prototype.
13772 * server.c (handle_query): Add PACKET_LEN argument. Support
13773 qXfer:spu:read and qXfer:spu:write packets.
13774 (main): Pass packet_len to handle_query.
13775 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13776 * target.h (target_ops): Add qxfer_spu.
13777
374c1d38
UW
137782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13779
13780 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13781 accessing non-seekable spufs files.
13782
bb63802a
UW
137832007-05-16 Markus Deuling <deuling@de.ibm.com>
13784
889bf7c5 13785 * server.c (handle_query): Add reply for qC packet.
bb63802a 13786
7390519e
PA
137872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13788 Leo Zayas <lerele@champenstudios@com>
13789
13790 * server.h (check_remote_input_interrupt_request): New function.
13791 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13792 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13793 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13794 (check_remote_input_interrupt_request): New function.
13795 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13796 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13797 winapi_GenerateConsoleCtrlEvent): New typedefs.
13798 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13799 to 250 ms.
13800 (win32_wait): Check for remote interrupt request
13801 with check_remote_input_interrupt_request.
13802 (win32_request_interrupt): New function.
13803 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13804
34b34921
PA
138052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13806
13807 * win32-low.c (debug_registers_changed,
13808 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13809 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13810 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13811 (thread_rec): Get context using the low target.
13812 (child_add_thread): Call thread_added on the low target,
13813 which does the same thing.
13814 (regptr): Delete.
13815 (do_initial_child_stuff): Remove debug registers references.
13816 Set context using the low target. Resume threads after
13817 setting the contexts.
13818 (child_continue): Remove dead variable. Remove debug
13819 registers references.
13820 (child_fetch_inferior_registers): Go through the low target.
13821 (do_child_store_inferior_registers): Remove.
13822 (child_store_inferior_registers): Go through the low target.
13823 (win32_resume): Remove debug registers references.
13824 Set context using the low target.
13825 (handle_exception): Change return type to void. Don't record
13826 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13827 first chance exception.
889bf7c5 13828 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13829 goto loop. Always return after waiting for debug event.
13830 (win32_wait): Convert to switch statement. Handle spurious
13831 events.
13832
13833 * win32-i386-low.c (debug_registers_changed,
13834 debug_registers_used): New.
13835 (initial_stuff): Rename to ...
13836 (i386_initial_stuff): ... this. Clear debug registers
13837 state variables.
13838 (store_debug_registers): Delete.
13839 (i386_get_thread_context): New.
13840 (load_debug_registers): Delete.
13841 (i386_set_thread_context): New.
13842 (i386_thread_added): New.
13843 (single_step): Rename to ...
13844 (i386_single_step): ... this.
13845 (do_fetch_inferior_registers): Rename to ...
13846 (i386_fetch_inferior_register): ... this.
13847 (i386_store_inferior_register): New.
13848 (the_low_target): Adapt to new interface.
13849
13850 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13851 (arm_get_thread_context): New.
13852 (arm_set_thread_context): New.
13853 (regptr): New.
13854 (do_fetch_inferior_registers): Rename to ...
13855 (arm_fetch_inferior_register): ... this.
13856 (arm_store_inferior_register): New.
13857 (arm_wince_breakpoint): Reimplement as unsigned long.
13858 (arm_wince_breakpoint_len): Define.
13859 (the_low_target): Adapt to new interface.
13860
13861 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13862 load_debug_registers. Add get_thread_context, set_thread_context,
13863 thread_added and store_inferior_register. Rename
13864 fetch_inferior_registers to fetch_inferior_register.
13865 (regptr): Remove declaration.
13866
dd6953e1
PA
138672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13868
13869 * linux-low.c (linux_detach): Change return type to int. Return 0.
13870 * spu-low.c (spu_detach): Likewise.
13871
444d6139
PA
138722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13873
13874 * target.h (target_ops): Change return type of detach to int.
13875 Add join.
13876 (join_inferior): New.
13877 * server.c (main): Don't skip detach support on mingw32.
13878 If the inferior doesn't support detaching return error.
13879 Call join_inferior instead of using waitpid.
13880 * linux-low.c (linux_join): New.
13881 (linux_target_op): Add linux_join.
13882 * spu-low.c (spu_join): New.
13883 (spu_target_ops): Add spu_join.
13884 * win32-low.c (win32_detach): Adapt to new interface.
13885 Reopen current_process_handle before detaching. Issue a child
13886 resume before detaching.
13887 (win32_join): New.
13888 (win32_target_op): Add win32_join.
13889
1d5315fe
PA
138902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13891
13892 * win32-low.c (win32-attach): Fix return value.
13893 * target.h (target_ops): Describe ATTACH return values.
13894
bf914831
PA
138952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13896
13897 * win32-low.c (GETPROCADDRESS): Define.
13898 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13899 (winapi_DebugSetProcessKillOnExit): Likewise.
13900 (win32_create_inferior): Force usage of ansi CreateProcessA.
13901 (win32_attach): Use GETPROCADDRESS.
13902 (win32_detach): Likewise.
13903
f72f3e60
PA
139042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13905
13906 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13907
ed50f18f
PA
139082007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13909
13910 * win32-low.c: Commit leftover changes from 2007-03-29.
13911
0c2ead7e
DJ
139122007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13915 fields short instead of int. Add explicit padding.
13916 (i387_cache_to_fsave): Remove unnecessary casts.
13917 (i387_fsave_to_cache): Doc fix.
13918 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13919
73725ff3
DJ
139202007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13923 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13924
d99f33d8
PA
139252007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13926
13927 * configure.srv (arm*-*-mingw32ce*): Move near the other
13928 arm targets.
13929
68070c10
PA
139302007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13931
2482afc6 13932 * configure.ac: Add errno checking.
68070c10
PA
13933 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13934 sys/file.h and malloc.h.
13935 (AC_CHECK_DECLS): Add perror.
13936 (srv_mingwce): Handle.
2482afc6 13937 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13938 win32-i386-low.o to srv_tgtobj.
13939 (i[34567]86-*-mingw*): Likewise.
13940 (arm*-*-mingw32ce*): Add case.
13941 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13942 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13943 [__MINGW32CE__] (strerror): New function.
13944 [__MINGW32CE__] (errno): Define to GetLastError.
13945 [__MINGW32CE__] (COUNTOF): New macro.
13946 (remote_open): Remove extra close call.
13947 * mem-break.c (delete_breakpoint_at): New function.
13948 * mem-break.h (delete_breakpoint_at): Declare.
13949 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13950 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13951 [USE_WIN32API] (read, write): Add char* casts.
13952 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13953 * server.h: Include wincecompat.h on Windows CE.
13954 [HAVE_ERRNO_H]: Check.
13955 (perror): Declare if not declared.
13956 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13957 (perror_with_name): Remove errno declaration.
13958 * wincecompat.h: New.
13959 * wincecompat.c: New.
13960 * win32-low.h: New.
13961 * win32-arm-low.c: New.
13962 * win32-i386-low.c: New.
13963 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13964 (OUTMSG2): Make it safe.
13965 (_T): New macro.
13966 (COUNTOF): New macro.
13967 (NUM_REGS): Get it from the low target.
13968 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13969 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13970 (thread_rec): Let low target handle debug registers.
13971 (child_add_thread): Likewise.
13972 (child_init_thread_list): Likewise.
13973 (continue_one_thread): Likewise.
13974 (regptr): New.
13975 (do_child_fetch_inferior_registers): Move to ...
13976 * win32-i386-low.c: ... here, and rename to ...
13977 (do_fetch_inferior_registers): ... this.
889bf7c5 13978 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13979 Go through the low target.
13980 (do_child_store_inferior_registers): Use regptr.
13981 (strwinerror): New function.
13982 (win32_create_inferior): Handle Windows CE.
13983 Use strwinerror instead of strerror on Windows error
13984 codes. Add program to the error output.
13985 Don't close the main thread handle on Windows CE.
13986 (win32_attach): Use coredll.dll on Windows CE.
13987 (win32_kill): Close current process and current
13988 thread handles.
13989 (win32_detach): Use coredll.dll on Windows CE.
13990 (win32_resume): Let low target handle debug registers, and
13991 step request.
13992 (handle_exception): Add/Remove initial breakpoint. Avoid
13993 non-existant WSTOPSIG on Windows CE.
13994 (win32_read_inferior_memory): Cast to remove warning.
13995 (win32_arch_string): Go through the low target.
13996 (initialize_low): Call set_breakpoint_data with the low
13997 target's breakpoint.
13998 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13999 FOP_REGNUM, mappings): Move to ...
14000 * win32-i386-low.c: ... here.
14001 * win32-low.c (win32_thread_info): Move to ...
14002 * win32-low.h: ... here.
14003 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14004 win32-arm-low.c and wincecompat.c.
14005 (all:): Add $EXEEXT.
14006 (install-only:): Likewise.
14007 (gdbserver:): Likewise.
14008 (gdbreplay:): Likewise.
14009 * config.in: Regenerate.
14010 * configure: Regenerate.
14011
41093d81
PA
140122007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14013
14014 * win32-low.c: Rename typedef thread_info to
14015 win32_thread_info throughout.
14016
544afa54
PA
140172007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14018
14019 * win32-i386-low.c: Rename to ...
14020 * win32-low.c: ... this.
14021 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14022 * Makefile.in: Likewise.
14023
bce7165d
PA
140242007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14025
14026 * remote-utils.c (monitor_output): Constify msg parameter.
14027 * server.h (monitor_output): Likewise.
14028 * win32-i386-low.c (handle_output_debug_string): New.
14029 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14030 handle_output_debug_string.
14031 (get_child_debug_event): Likewise.
14032
506c7aa0
DJ
140332007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14034
14035 * server.c (main): Correct strtoul check.
14036
42c81e2a
DJ
140372007-03-27 Jon Ringle <jon@ringle.org>
14038
14039 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14040
9453113a
DJ
140412007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14042
14043 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14044
64a69107
DJ
140452007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14046
14047 * terminal.h: Check HAVE_SGTTY_H.
14048
140492007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14050
14051 * remote-utils.c (remote_open): Print out the assigned port number.
14052
c74d0ad8
DJ
140532007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * remote-utils.c (monitor_output): New function.
14056 * server.c (debug_threads): Define here.
14057 (monitor_show_help): New function.
14058 (handle_query): Handle qRcmd.
14059 (main): Do not handle 'd' packet.
14060 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14061 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14062 of debug_threads.
14063
de7c3b4a
PA
140642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14065
14066 * Makefile.in (EXEEXT): New.
14067 (clean): Use $(EXEEXT).
14068
ef57601b
PA
140692007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14070
14071 * target.h (target_ops): Rename send_signal to request_interrupt,
14072 and remove enum target_signal parameter.
14073 * linux-low.c (linux_request_interrupt): Rename from
14074 linux_send_signal, and always send SIGINT.
14075 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14076 and always send SIGINT.
14077 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14078 of send_signal.
14079 (input_interrupt): Likewise.
14080
820f2bda
PA
140812007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14082
14083 * server.c (get_features_xml): Check if target implemented
14084 arch_string.
14085 * win32-i386-low.c (win32_arch_string): New.
14086 (win32_target_ops): Add win32_arch_string as arch_string member.
14087
ab39bf24
UW
140882007-02-22 Markus Deuling <deuling@de.ibm.com>
14089
14090 * spu-low.c (spu_arch_string): New.
14091 (spu_target_ops): Add spu_arch_string.
14092
61ff6e04
DJ
140932007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14096 * configure.ac: Do not check for terminal.h.
14097 * configure, config.in: Regenerated.
14098
fb1e4ffc
DJ
140992007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * Makefile.in (OBS): Add $(XML_BUILTIN).
14102 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14103 (clean): Update.
14104 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14105 (arm-with-iwmmxt.c): New.
14106 * config.in, configure: Regenerate.
14107 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14108 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14109 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14110 (arm*-*-linux*): Add iWMMXt and regset support.
14111 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14112 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14113 (arm_store_wmmxregset, target_regsets): New.
14114 * server.c (get_features_xml): Take annex argument. Check builtin
14115 XML documents.
14116 (handle_query): Handle multiple annexes.
14117
0f48aa01
DJ
141182007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * remote-utils.c [USE_WIN32API] (read, write): Define.
14121 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14122 write.
14123
23181151
DJ
141242007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * linux-i386-low.c (the_low_target): Set arch_string.
14127 * linux-x86-64-low.c (the_low_target): Likewise.
14128 * linux-low.c (linux_arch_string): New.
14129 (linux_target_ops): Add it.
14130 * linux-low.h (struct linux_target_ops): Add arch_string.
14131 * server.c (write_qxfer_response): Use const void * for DATA.
14132 (get_features_xml): New.
14133 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14134 * target.h (struct target_ops): Add arch_string method.
14135
9d606399
DJ
141362007-01-03 Denis Pilat <denis.pilat@st.com>
14137 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * linux-low.c (linux_kill): Handle being called with no threads.
14140 * win32-i386-low.c (win32_kill): Likewise.
14141 (get_child_debug_event): Clear current_process_handle.
14142
141432006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14144 Daniel Jacobowitz <dan@codesourcery.com>
14145
14146 * remote-utils.c (remote_open): Check the type of specified
14147 serial port devices before opening them.
14148 * server.c (main): Kill the inferior if an error occurs during
14149 the first remote_open.
14150
a5e13d24
DJ
141512006-12-05 Markus Deuling <deuling@de.ibm.com>
14152
14153 * README: Update supported targets.
14154
186947f7
DJ
141552006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * Makefile.in (clean): Remove reg-mips64.c.
14158 (reg-mips64.c, reg-mips64.o): New rules.
14159 * configure.srv: Handle mips64. Include regset support for mips.
14160 * linux-mips-low.c (union mips_register): New.
14161 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14162 (mips_breakpoint, mips_breakpoint_at): Use int.
14163 (mips_collect_register, mips_supply_register)
14164 (mips_collect_register_32bit, mips_supply_register_32bit)
14165 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14166 (mips_store_fpregset, target_regsets): New.
14167 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14168
a13e2c95
UW
141692006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14170
14171 * configure.srv: Add target "spu*-*-*".
14172 * Makefile.in (clean): Remove reg-spu.c.
14173 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14174 * spu-low.c: New file.
14175
cb7283db
DJ
141762006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * configure.ac: Correct td_thr_tls_get_addr test.
14179 * configure: Regenerated.
14180
89be2091
DJ
141812006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * linux-low.c (linux_wait_for_event): Reformat. Use the
14184 pass_signals array.
14185 * remote-utils.c (decode_address_to_semicolon): New.
14186 * server.c (pass_signals, handle_general_set): New.
14187 (handle_query): Mention QPassSignals for qSupported.
14188 (main): Call handle_general_set.
14189 * server.h (pass_signals, decode_address_to_semicolon): New.
14190
000ef4f0
DJ
141912006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * server.c (handle_query): Correct error handling for read_auxv.
14194
b7149293
UW
141952005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14196
14197 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14198 and srv_linux_thread_db to yes.
14199 * linux-s390-low.c (s390_fill_gregset): New function.
14200 (target_regsets): Define data structure.
14201
dae5f5cf
DJ
142022006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14205 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14206 * config.in, configure: Regenerated.
14207 * inferiors.c (gdb_id_to_thread): New function.
14208 (gdb_id_to_thread_id): Use it.
14209 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14210 * linux-low.h (struct process_info): Add th member.
14211 (thread_db_get_tls_address): New prototype.
14212 * remote-utils.c (decode_address): Make non-static.
14213 * server.c (handle_query): Handle qGetTLSAddr.
14214 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14215 * target.h (struct target_ops): Add get_tls_address.
14216 * thread-db.c (maybe_attach_thread): Save the thread handle.
14217 (thread_db_get_tls_address): New.
14218
32ca6d61
DJ
142192006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14222 (linux_resume_one_process): Take a siginfo_t *. Update all
14223 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14224 (struct pending_signals): Add a siginfo_t.
14225 (linux_wait_for_process): Always set last_status.
14226 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14227 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14228 * linux-low.h (struct process_info): Add last_status.
14229
5ffff7c1
DJ
142302006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * remote-utils.c (try_rle): New function.
14233 (putpkt_binary): Use it.
14234
8695c747
DJ
142352006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14236
14237 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14238 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14239 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14240 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14241 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14242 point registers.
14243
290fadea
RS
142442006-08-08 Richard Sandiford <richard@codesourcery.com>
14245
14246 * server.c (terminal_fd): New variable.
14247 (old_foreground_pgrp): Likewise.
14248 (restore_old_foreground_pgrp): New function.
14249 (start_inferior): Record the terminal file descriptor in terminal_fd
14250 and its original foreground group in old_foreground_pgrp. Register
14251 restore_old_foreground_pgrp with atexit().
14252
9f2e1e63
DJ
142532006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * server.c (handle_query): Correct qPart to qXfer.
14256
b80864fb
DJ
142572006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * configure.ac: Check for more headers which are missing on
14260 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14261 * configure.srv: Add Cygwin and mingw32.
14262 * remote-utils.c: Don't include headers unconditionally which
14263 are missing on mingw32. Include <winsock.h> for mingw32.
14264 (remote_open): Adjust for mingw32 support. Flush
14265 standard error after writing to it.
14266 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14267 (unblock_async_io, enable_async_io, disable_async_io)
14268 (readchar, getpkt): Update for Winsock support.
14269 (prepare_resume_reply): Expect a protocol signal number.
14270 * server.c: Disable <sys/wait.h> on mingw32.
14271 (start_inferior): Adjust for mingw32 support. Flush
14272 standard error after writing to it.
14273 (attach_inferior): Likewise. Use protocol signal
14274 numbers.
14275 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14276 and names.
14277 * win32-i386-low.c: New file.
14278 * Makefile.in (XM_CLIBS): Set.
14279 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14280 (win32-i386-low.o): New dependency rule.
14281 * linux-low.c (linux_wait): Use target signal numbers.
14282 * target.h (struct target_ops): Doc fix.
14283 * server.h (target_signal_to_name): New prototype.
14284 * gdbreplay.c: Don't include headers unconditionally which
14285 are missing on mingw32. Include <winsock.h> for mingw32.
14286 (remote_close, remote_open): Adjust for Winsock support.
14287 * configure, config.in: Regenerated.
14288
0876f84a
DJ
142892006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * server.c (decode_xfer_read, write_qxfer_response): New.
14292 (handle_query): Take a packet length argument. Handle
14293 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14294 the qSupported response.
14295 (main): Update call to handle_query.
14296
01f9e8fa
DJ
142972006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14298
14299 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14300 (putpkt_binary): Renamed from putpkt and adjusted for binary
14301 data.
14302 (putpkt): New wrapper for putpkt_binary.
14303 (readchar): Don't mask off the high bit.
14304 (decode_X_packet): New function.
14305 * server.c (main): Call putpkt_binary if a handler sets the packet
14306 length. Save the length of the incoming packet. Handle 'X'.
14307 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14308
be2a5f71
DJ
143092006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * server.c (handle_query): Handle qSupported.
14312
ea025f5f
DJ
143132006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * remote-utils.c (all_symbols_looked_up): New variable.
14316 (look_up_one_symbol): Check it.
14317 * server.h (look_up_one_symbol): New declaration.
14318 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14319
9308fc88
DJ
143202006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14323 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14324 (PTRACE_GET_THREAD_AREA): Define.
14325 (ps_get_thread_area): New function.
14326
52fb6437
NS
143272006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14328
14329 * configure.srv (m68k*-*-uclinux*): New target.
14330 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14331 (linux_resume_one_process): Remove extraneous cast.
14332 (linux_read_offsets): New.
14333 (linux_target_op): Add linux_read_offsets on mmuless systems.
14334 * server.c (handle_query): Add qOffsets logic.
14335 * target.h (struct target_ops): Add read_offsets.
14336
21b0f40c
DJ
143372006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14340 (PTRACE_GET_THREAD_AREA): Define.
14341 (ps_get_thread_area): New function.
14342 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14343 (linux-x86-64-low.o): Update.
14344
0050a760
DJ
143452006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14346
14347 * configure.ac: Remove checks for prfpregset_t.
14348 * gdb_proc_service.h: New file.
14349 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14350 new "gdb_proc_service.h".
14351 * proc-service.c: Likewise.
14352 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14353 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14354 * Makefile.in (gdb_proc_service_h): Updated.
14355 * configure, config.in: Regenerated.
14356
b92a518e
DJ
143572006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * remote-utils.c (prepare_resume_reply): Move declaration
14360 of gdb_id_from_wait to the top of the block.
14361
545587ee
DJ
143622006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * linux-low.c (regsets_store_inferior_registers): Read the regset
14365 from the target before filling it.
14366
9db87ebd
DJ
143672006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (attach_inferior): Return SIGTRAP for a successful
14370 attach.
14371
dd24457d
DJ
143722006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * Makefile.in (OBS): Add version.o.
14375 (STAGESTUFF): Delete.
14376 (version.o): Add dependencies.
14377 (version.c): Replace rule.
14378 (clean): Remove version.c.
14379 * server.c (gdbserver_version): New.
14380 (gdbserver_usage): Use printf.
14381 (main): Handle --version and --help.
14382 * server.h (version, host_name): Add declarations.
14383
6f0f660e
EZ
143842005-12-23 Eli Zaretskii <eliz@gnu.org>
14385
889bf7c5
PA
14386 * linux-arm-low.c:
14387 * linux-arm-low.c:
14388 * inferiors.c:
14389 * i387-fp.h:
14390 * i387-fp.c:
14391 * gdbreplay.c:
14392 * regcache.c:
14393 * proc-service.c:
14394 * mem-break.h:
14395 * mem-break.c:
14396 * linux-x86-64-low.c:
14397 * linux-sh-low.c:
14398 * linux-s390-low.c:
14399 * linux-ppc64-low.c:
14400 * linux-ppc-low.c:
14401 * linux-mips-low.c:
14402 * linux-m68k-low.c:
14403 * linux-m32r-low.c:
14404 * linux-low.h:
14405 * linux-low.c:
14406 * linux-ia64-low.c:
14407 * linux-i386-low.c:
14408 * linux-crisv32-low.c:
14409 * thread-db.c:
14410 * terminal.h:
14411 * target.h:
14412 * target.c:
14413 * server.h:
14414 * server.c:
14415 * remote-utils.c:
14416 * regcache.h:
14417 * utils.c:
14418 * Makefile.in:
14419 * configure.ac:
6f0f660e
EZ
14420 * gdbserver.1: Add (C) after Copyright. Update the FSF
14421 address.
14422
9d1fb177
DJ
144232005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14426 (arm_breakpoint_at): Recognize both breakpoints.
14427 (the_low_target): Use the correct breakpoint instruction.
14428
011a70c2
DJ
144292005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14430
14431 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14432 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14433 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14434 (the_low_target): Update.
14435
7fb85e41
AS
144362005-10-25 Andreas Schwab <schwab@suse.de>
14437
14438 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14439
14440 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14441 (ia64_num_regs): Reduce to 462.
14442
3db0444b
DJ
144432005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * acinclude.m4: Correct quoting.
14446 * aclocal.m4: Regenerated.
14447
14448 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14449 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14450 (thread_db_init): Call thread_db_err_str.
14451 * configure.ac: Check for TD_VERSION.
14452 * config.in, configure: Regenerated.
14453
bee0189a
DJ
144542005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14455
14456 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14457
e9d25b98
DJ
144582005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14461 is not available. Define HAVE_PTRACE_GETREGS if it is.
14462 * config.in, configure: Regenerated.
14463 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14464 * linux-i386-low.c, linux-m68k-low.c: Update to use
14465 HAVE_PTRACE_GETREGS.
14466 * linux-low.c (regsets_fetch_inferior_registers)
14467 (regsets_store_inferior_registers): Only return 0 if we processed
14468 GENERAL_REGS.
14469 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14470 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14471
a06660f7
DJ
144722005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * inferiors.c (struct thread_info): Add gdb_id.
14475 (add_thread): Add gdb_id argument.
14476 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14477 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14478 calls to add_thread.
14479 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14480 * server.c (handle_query): Use thread_to_gdb_id.
14481 (handle_v_cont, main): Use gdb_id_to_thread_id.
14482 * server.h (add_thread): Update prototype.
14483 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14484 prototypes.
14485
5a1f5858
DJ
144862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14489 left-padded registers.
14490 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14491 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14492
e122f1f5
SE
144932005-07-01 Steve Ellcey <sje@cup.hp.com>
14494
14495 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14496 * configure: Regenerate.
14497 * config.in: Regenerate.
14498 * server.h (NEED_DECLARATION_STRERROR):
14499 Replace with !HAVE_DECL_STRERROR.
14500
d592fa2f
DJ
145012005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * linux-low.c (linux_wait, linux_send_signal): Don't test
14504 an unsigned long variable for > 0 if it could be MAX_ULONG.
14505 * server.c (myresume): Likewise.
14506 * target.c (set_desired_inferior): Likewise.
14507
ccbd4912
MK
145082005-06-13 Mark Kettenis <kettenis@gnu.org>
14509
14510 * configure.ac: Simplify and improve check for socklen_t.
14511 * configure, config.in: Regenerate.
14512
f450004a
DJ
145132005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * acconfig.h: Remove.
14516 * configure.ac: Add a test for socklen_t. Use three-argument
14517 AC_DEFINE throughout.
14518 * config.in: Regenerated using autoheader 2.59.
14519 * configure: Regenerated.
14520
14521 * gdbreplay.c (socklen_t): Provide a default.
14522 (remote_open): Use socklen_t.
14523 * remote-utils.c (socklen_t): Provide a default.
14524 (remote_open): Use socklen_t.
14525 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14526 unsigned char.
14527
14528 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14529 char for buffers.
14530 * linux-low.c (linux_read_memory, linux_write_memory)
14531 (linux_read_auxv): Likewise.
14532 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14533 (check_mem_write): Likewise.
14534 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14535 Likewise.
14536 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14537 (registers_from_string, register_data): Likewise.
14538 * server.c (handle_query, main): Likewise.
14539 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14540 (decode_M_packet): Likewise.
14541 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14542 * target.h (struct target_ops): Update read_memory, write_memory,
14543 and read_auxv.
14544 (read_inferior_memory, write_inferior_memory): Update.
14545 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14546 to unsigned char *.
14547 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14548 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14549 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14550 linux-s390-low.c, linux-sh-low.c: Update for changes in
14551 read_inferior_memory and the_low_target->breakpoint.
14552
eee84df1
DJ
145532005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14556 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14557 * configure.srv: Add powerpc64-*-linux*.
14558 * linux-ppc64-low.c: New file.
14559
45b134e5
OF
145602005-05-23 Orjan Friberg <orjanf@axis.com>
14561
14562 * linux-cris-low.c: New file with support for CRIS.
14563 * linux-crisv32-low.c: Ditto for CRISv32.
14564 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14565 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14566 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14567 reg-crisv32.o, and reg-crisv32.c to make rules.
14568 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14569 recognized targets.
14570
48d93c75
UW
145712005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14572
14573 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14574 of sizeof (PTRACE_XFER_TYPE).
14575 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14576
e013ee27
OF
145772005-05-12 Orjan Friberg <orjanf@axis.com>
14578
889bf7c5 14579 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14580 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14581 pointers for hardware watchpoint support.
14582 * linux-low.h (struct linux_target_ops): Ditto.
14583 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14584 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14585 to linux_target_ops.
14586 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14587 reply packet.
14588 * server.c (main): Recognize 'Z' and 'z' packets.
14589
b0ded00b
UW
145902005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14591
14592 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14593 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14594 (the_low_target): Add new members.
14595
8643e2ad
DJ
145962005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * proc-service.c (ps_lgetregs): Search all_processes instead of
14599 all_threads.
14600
fc620387
DJ
146012005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14602
14603 * server.c (start_inferior): Change return type to int.
14604 (attach_inferior): Change sigptr to int *.
14605 (handle_v_cont, handle_v_requests): Change signal to int *.
14606 (main): Change signal to int.
14607
146082005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14609
14610 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14611 * configure.srv: Add m32r*-*-linux*.
14612 * linux-m32r-low.c: New file.
14613
e0e76420
DJ
146142005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14615
14616 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14617
a1928bad
DJ
146182005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14619
14620 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14621 Take unsigned long arguments for PIDs.
14622 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14623 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14624 (wait_for_sigstop, linux_resume_one_process)
14625 (regsets_fetch_inferior_registers, linux_send_signal)
14626 (linux_read_auxv): Likewise. Update the types of variables holding
14627 PIDs. Update format string specifiers.
14628 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14629 * remote-utils.c (prepare_resume_reply): Likewise.
14630 * server.c (cont_thread, general_thread, step_thread)
14631 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14632 unsigned long.
14633 (handle_query): Update format specifiers.
14634 (handle_v_cont, main): Use strtoul for thread IDs.
14635 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14636 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14637 (general_thread, step_thread, thread_from_wait)
14638 (old_thread_from_wait): Update.
14639 * target.h (struct thread_resume): Use unsigned long for THREAD.
14640 (struct target_ops): Use unsigned long for arguments to attach and
14641 thread_alive.
14642
dcdb98d2
DJ
146432005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * acinclude.m4: Include bfd/bfd.m4 directly.
14646 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14647 <agriffis@toolchain.org>.
14648 * aclocal.m4, configure: Regenerated.
14649
bec39cab
AC
146502005-01-07 Andrew Cagney <cagney@gnu.org>
14651
14652 * configure.ac: Rename configure.in, require autoconf 2.59.
14653 * configure: Re-generate.
14654
434c4c77
DJ
146552004-12-08 Daniel Jacobowitz <dan@debian.org>
14656
14657 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14658 LIBS when finished.
14659 * aclocal.m4: Regenerated.
14660 * configure: Regenerated.
14661
db1d3e1b
AS
146622004-11-21 Andreas Schwab <schwab@suse.de>
14663
14664 * linux-m68k-low.c (m68k_num_gregs): Define.
14665 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14666 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14667 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14668 (m68k_breakpoint_at): New. Add to the_low_target.
14669
14670 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14671 srv_linux_thread_db to yes.
14672
43360365
JB
146732004-10-20 Joel Brobecker <brobecker@gnat.com>
14674
14675 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14676 (ARCH_SET_FS): Likewise.
14677 (ARCH_GET_FS): Likewise.
14678 (ARCH_GET_GS): Likewise.
14679
fd500816
DJ
146802004-10-16 Daniel Jacobowitz <dan@debian.org>
14681
14682 * linux-i386-low.c (ps_get_thread_area): New.
14683 * linux-x86-64-low.c (ps_get_thread_area): New.
14684 * linux-low.c: Include <sys/syscall.h>.
14685 (linux_kill_one_process): Don't kill the first thread here.
14686 (linux_kill): Kill the first thread here.
14687 (kill_lwp): New function.
14688 (send_sigstop, linux_send_signal): Use it.
14689 * proc-service.c: Clean up #ifdefs.
14690 (fpregset_info): Delete.
14691 (ps_lgetregs): Update and enable implementation.
14692 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14693 implementations.
14694 * remote-utils.c (struct sym_cache, symbol_cache): New.
14695 (input_interrupt): Print a clearer message.
14696 (async_io_enabled): New variable.
14697 (enable_async_io, disable_async_io): Use it. Update comments.
14698 (look_up_one_symbol): Use the symbol cache.
14699 * thread-db.c (thread_db_look_up_symbols): New function.
14700 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14701
f6de3c42
DJ
147022004-10-16 Daniel Jacobowitz <dan@debian.org>
14703
14704 * configure.in: Test for -rdynamic.
14705 * configure: Regenerated.
14706 * Makefile (INTERNAL_LDFLAGS): New.
14707 (gdbserver, gdbreplay): Use it.
14708
2c0fc042
AC
147092004-09-02 Andrew Cagney <cagney@gnu.org>
14710
14711 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14712
075b3282
DJ
147132004-03-23 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * linux-low.c (linux_wait): Clear all_processes list also.
14716
fa6a77dc
DJ
147172004-03-12 Daniel Jacobowitz <drow@mvista.com>
14718
14719 * linux-low.c: Include <errno.h>. Remove extern declaration of
14720 errno.
14721
6d782a97
DJ
147222004-03-12 Daniel Jacobowitz <drow@mvista.com>
14723
14724 * gdbreplay.c, server.h, utils.c: Update copyright years.
14725
3a7fb99b
DJ
147262004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14727
14728 * server.c (main): Print child status or termination signal from
14729 variable 'signal', not 'sig'.
14730
c3e735a6
DJ
147312004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14732
14733 * linux-low.c (linux_read_memory): Change return type to
14734 int. Check for and return error from ptrace().
14735 * target.c (read_inferior_memory): Change return type to int. Pass
14736 back return status from the_target->read_memory().
14737 * target.h (struct target_ops): Adapt *read_memory() prototype.
14738 Update comment.
14739 (read_inferior_memory): Adapt prototype.
14740 * server.c (main): Return an error packet if
14741 read_inferior_memory() returns an error.
14742
a59d1c82
DJ
147432004-03-04 Daniel Jacobowitz <drow@mvista.com>
14744
14745 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14746 Unify with other clean targets.
14747
dc3f8883
DJ
147482004-02-29 Daniel Jacobowitz <drow@mvista.com>
14749
14750 * server.c (handle_v_cont): Call set_desired_inferior.
14751
89a208da
DJ
147522004-02-29 Daniel Jacobowitz <drow@mvista.com>
14753
14754 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14755
62ea82f5
DJ
147562004-02-29 Daniel Jacobowitz <drow@mvista.com>
14757
14758 * linux-low.c (linux_wait): Unblock async I/O.
14759 (linux_resume): Block and enable async I/O.
14760 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14761 * server.h (block_async_io, unblock_async_io): Add prototypes.
14762
6910d122
DJ
147632004-02-29 Daniel Jacobowitz <drow@mvista.com>
14764
14765 * remote-utils.c (remote_open): Print a status notice after
14766 opening a TCP port.
14767 * server.c (attach_inferior): Print a status notice after
14768 attaching.
14769
147702004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14771
14772 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14773
c89dc5d4
DJ
147742004-02-26 Daniel Jacobowitz <drow@mvista.com>
14775
14776 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14777 error packet.
14778 * server.c, target.h: Update copyright years.
14779
4b8dad4a
RM
147802004-02-25 Roland McGrath <roland@redhat.com>
14781
14782 * target.h (struct target_ops): New member `read_auxv'.
14783 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14784 * linux-low.c (linux_read_auxv): New function.
14785 (linux_target_ops): Initialize `read_auxv' member to that.
14786
d7446758
JB
147872004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14788
14789 Committed by Jim Blandy <jimb@redhat.com>.
14790
14791 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14792 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14793 instead of GPR_SIZE to distiguish s390 and s390x targets.
14794
5544ad89
DJ
147952004-01-31 Daniel Jacobowitz <drow@mvista.com>
14796
14797 * linux-low.c: Update copyright year.
14798 (check_removed_breakpoint): Clear pending_is_breakpoint.
14799 (linux_set_resume_request, linux_queue_one_thread)
14800 (resume_status_pending_p): New functions.
14801 (linux_continue_one_thread): Use process->resume.
14802 (linux_resume): Only resume threads if there are no pending events.
14803 * linux-low.h (struct process_info): Add resume request
14804 pointer.
14805
2a68b70e
DJ
148062004-01-30 Daniel Jacobowitz <drow@mvista.com>
14807
14808 * regcache.c (new_register_cache): Clear the allocated register
14809 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14810
64386c31
DJ
148112003-10-13 Daniel Jacobowitz <drow@mvista.com>
14812
14813 * linux-low.c (linux_resume): Take a struct thread_resume *
14814 argument.
14815 (linux_wait): Update call.
14816 (resume_ptr): New static variable.
14817 (linux_continue_one_thread): Renamed from
14818 linux_continue_one_process. Use resume_ptr.
14819 (linux_resume): Use linux_continue_one_thread.
14820 * server.c (handle_v_cont, handle_v_requests): New functions.
14821 (myresume): New function.
14822 (main): Handle 'v' case.
14823 * target.h (struct thread_resume): New type.
14824 (struct target_ops): Change argument of "resume" to struct
14825 thread_resume *.
14826 (myresume): Delete macro.
14827
c938e9b0
L
148282003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14829
14830 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14831 (uninstall): Support DESTDIR.
14832
7f313d07
BC
14833Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14834
14835 * configure.srv: Add xscale*linux copy of arm*linux entry.
14836
3b2fc2ea
DJ
148372003-07-24 Daniel Jacobowitz <drow@mvista.com>
14838
14839 * linux-arm-low.c (arm_reinsert_addr): New function.
14840 (the_low_target): Add arm_reinsert_addr.
14841
1c0a559e
MK
148422003-07-08 Mark Kettenis <kettenis@gnu.org>
14843
14844 * mem-break.c: Remove whitespace at end of file.
14845
43d5792c
DJ
148462003-06-28 Daniel Jacobowitz <drow@mvista.com>
14847
14848 * configure.in: Check whether we need to prototype strerror.
14849 * server.h: Optionally prototype strerror.
14850 * gdbreplay.c (perror_with_name): Use strerror.
14851 * linux-low.c (linux_attach_lwp): Use strerror.
14852 * utils.c (perror_with_name): Use strerror.
14853 * config.in, configure: Regenerated.
14854
c8a86edf
DJ
148552003-06-28 Daniel Jacobowitz <drow@mvista.com>
14856
14857 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14858 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14859
73d37363
DJ
148602003-06-20 Daniel Jacobowitz <drow@mvista.com>
14861
14862 * Makefile.in (SFILES): Update.
14863 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14864 low-sun3.c: Remove files.
14865
6ad8ae5c
DJ
148662003-06-17 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14869 (linux_detach_one_process, linux_detach): New functions.
14870 (linux_target_ops): Add linux_detach.
14871 * server.c (main): Handle 'D' packet.
14872 * target.h (struct target_ops): Add "detach" member.
14873 (detach_inferior): Define.
14874
1581182a
MK
148752003-06-13 Mark Kettenis <kettenis@gnu.org>
14876
14877 From Kelley Cook <kelleycook@wideopenwest.com>:
14878 * configure.srv: Accept i[34567]86 variants.
14879
e5379b03
DJ
148802003-06-05 Daniel Jacobowitz <drow@mvista.com>
14881
14882 * linux-low.c (linux_wait_for_event): Correct comment typos.
14883 (linux_resume_one_process): Call check_removed_breakpoint.
14884 (linux_send_signal): New function.
14885 (linux_target_ops): Add linux_send_signal.
14886 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14887 of kill.
14888 * target.h (struct target_ops): Add send_signal.
14889
2ff29de4
JB
148902003-05-29 Jim Blandy <jimb@redhat.com>
14891
14892 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14893 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14894 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14895 away part of the register's value.
14896
254787d4
DJ
148972003-03-26 Daniel Jacobowitz <drow@mvista.com>
14898
14899 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14900 (linux_wait_for_event, linux_init_signals): Likewise.
14901
94e10508
DJ
149022003-03-17 Daniel Jacobowitz <drow@mvista.com>
14903
14904 * configure.in: Check for stdlib.h.
14905 * configure: Regenerated.
14906 * config.in: Regenerated.
14907
4c0711e0
DJ
149082003-01-04 Andreas Schwab <schwab@suse.de>
14909
14910 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14911
ef66e766
AC
149122003-01-02 Andrew Cagney <ac131313@redhat.com>
14913
14914 * Makefile.in: Remove obsolete code.
14915
a1358604
DJ
149162002-11-20 Daniel Jacobowitz <drow@mvista.com>
14917
14918 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14919 defined(PT_FPR0_HI).
14920
23ce3b1c
DJ
149212002-11-17 Stuart Hughes <seh@zee2.com>
14922
14923 * linux-arm-low.c (arm_num_regs): Increase.
14924 (arm_regmap): Include status register.
14925
149262002-11-17 Daniel Jacobowitz <drow@mvista.com>
14927
14928 * linux-low.c (register_addr): Remove incorrect -1 check.
14929
a9fa9f7d
DJ
149302002-08-29 Daniel Jacobowitz <drow@mvista.com>
14931
14932 * linux-low.c (linux_create_inferior): Call setpgid. Return
14933 the new PID.
14934 (unstopped_p, linux_signal_pid): Remove.
14935 (linux_target_ops): Remove linux_signal_pid.
14936 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14937 global instead of target method.
14938 * target.h (struct target_ops): Remove signal_pid. Update comment
14939 for create_inferior.
14940 * server.c (signal_pid): New variable.
14941 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14942 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14943 (attach_inferior): Set signal_pid.
14944
17574093
DJ
149452002-08-23 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14948
149492002-08-20 Jim Blandy <jimb@redhat.com>
14950
14951 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14952 default for this.
14953
149542002-08-01 Andrew Cagney <cagney@redhat.com>
14955
14956 * Makefile.in: Make chill references obsolete.
14957
149582002-07-24 Kevin Buettner <kevinb@redhat.com>
14959
14960 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14961 * configure: Regenerate.
14962 * config.in: Regenerate.
14963
149642002-07-09 David O'Brien <obrien@FreeBSD.org>
14965
14966 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14967 (perror_with_name, remote_close, remote_open, expect, play): Static.
14968
149692002-07-04 Michal Ludvig <mludvig@suse.cz>
14970
4b8dad4a 14971 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14972 byte offsets instead of an array of indexes.
14973 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14974
149752002-06-13 Daniel Jacobowitz <drow@mvista.com>
14976
14977 * regcache.c: Add comment.
14978
149792002-06-11 Daniel Jacobowitz <drow@mvista.com>
14980
14981 * thread-db.c: New file.
14982 * proc-service.c: New file.
14983 * acinclude.m4: New file.
14984 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14985 proc-service.o, and thread-db.o.
14986 (linux-low.o): Add USE_THREAD_DB.
14987 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14988 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14989 * aclocal.m4: Regenerated.
14990 * config.in: Regenerated.
14991 * configure: Regenerated.
14992 * configure.in: Check for proc_service.h, sys/procfs.h,
14993 thread_db.h, and linux/elf.h headrs.
14994 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14995 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14996 Check for -lthread_db and thread support.
14997 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14998 PowerPC, and SuperH.
14999 * i387-fp.c: Constify arguments.
15000 * i387-fp.h: Likewise.
15001 * inferiors.c: (struct thread_info): Renamed from
15002 `struct inferior_info'. Remove PID member. Use generic inferior
15003 list header. All uses updated.
15004 (inferiors, signal_pid): Removed.
15005 (all_threads): New variable.
15006 (get_thread): Define.
15007 (add_inferior_to_list): New function.
15008 (for_each_inferior): New function.
15009 (change_inferior_id): New function.
15010 (add_inferior): Removed.
15011 (remove_inferior): New function.
15012 (add_thread): New function.
15013 (free_one_thread): New function.
15014 (remove_thread): New function.
15015 (clear_inferiors): Use for_each_inferior and free_one_thread.
15016 (find_inferior): New function.
15017 (find_inferior_id): New function.
15018 (inferior_target_data): Update argument type.
15019 (set_inferior_target_data): Likewise.
15020 (inferior_regcache_data): Likewise.
15021 (set_inferior_regcache_data): Likewise.
15022 * linux-low.c (linux_bp_reinsert): Remove.
15023 (all_processes, stopping_threads, using_thrads)
15024 (struct pending_signals, debug_threads, pid_of): New.
15025 (inferior_pid): Replace with macro.
15026 (struct inferior_linux_data): Remove.
15027 (get_stop_pc, add_process): New functions.
15028 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15029 Use add_process and add_thread.
15030 (linux_attach_lwp): New function, based on old linux_attach. Use
15031 add_process and add_thread. Set stop_expected for new threads.
15032 (linux_attach): New function.
15033 (linux_kill_one_process): New function.
15034 (linux_kill): Kill all LWPs.
15035 (linux_thread_alive): Use find_inferior_id.
15036 (check_removed_breakpoints, status_pending_p): New functions.
15037 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15038 Update. Use WNOHANG. Wait for cloned processes also. Update process
15039 struct for the found process.
15040 (linux_wait_for_event): New function.
15041 (linux_wait): Use it. Support LWPs.
15042 (send_sigstop, wait_for_sigstop, stop_all_processes)
15043 (linux_resume_one_process, linux_continue_one_process): New functions.
15044 (linux_resume): Support LWPs.
15045 (REGISTER_RAW_SIZE): Remove.
15046 (fetch_register): Use register_size instead. Call supply_register.
15047 (usr_store_inferior_registers): Likewise. Call collect_register.
15048 Fix recursive case.
15049 (regsets_fetch_inferior_registers): Improve error message.
15050 (regsets_store_inferior_registers): Add debugging.
15051 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15052 (unstopped_p, linux_signal_pid): New functions.
15053 (linux_target_ops): Add linux_signal_pid.
15054 (linux_init_signals): New function.
15055 (initialize_low): Call it. Initialize using_threads.
15056 * regcache.c (inferior_regcache_data): Add valid
15057 flag.
15058 (get_regcache): Fetch registers lazily. Add fetch argument
15059 and update all callers.
15060 (regcache_invalidate_one, regcache_invalidate): New
15061 functions.
15062 (new_register_cache): Renamed from create_register_cache.
15063 Return the new regcache.
15064 (free_register_cache): Change argument to a void *.
15065 (registers_to_string, registers_from_string): Call get_regcache
15066 with fetch flag set.
15067 (register_data): Make static. Pass fetch flag to get_regcache.
15068 (supply_register): Call get_regcache with fetch flag clear.
15069 (collect_register): Call get_regcache with fetch flag set.
15070 (collect_register_as_string): New function.
15071 * regcache.h: Update.
15072 * remote-utils.c (putpkt): Flush after debug output and use
15073 stderr.
15074 Handle input interrupts while waiting for an ACK.
15075 (input_interrupt): Use signal_pid method.
15076 (getpkt): Flush after debug output and use stderr.
15077 (outreg): Use collect_register_as_string.
15078 (new_thread_notify, dead_thread_notify): New functions.
15079 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15080 and general_thread.
15081 (look_up_one_symbol): Flush after debug output.
15082 * server.c (step_thread, server_waiting): New variables.
15083 (start_inferior): Don't use signal_pid. Update call to mywait.
15084 (attach_inferior): Update call to mywait.
15085 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15086 (main): Don't fetch/store registers explicitly. Use
15087 set_desired_inferior. Support proposed ``Hs'' packet. Update
15088 calls to mywait.
15089 * server.h: Update.
15090 (struct inferior_list, struct_inferior_list_entry): New.
15091 * target.c (set_desired_inferior): New.
15092 (write_inferior_memory): Constify.
15093 (mywait): New function.
15094 * target.h: Update.
15095 (struct target_ops): New signal_pid method.
15096 (mywait): Removed macro, added prototype.
15097
15098 * linux-low.h (regset_func): Removed.
15099 (regset_fill_func, regset_store_func): New.
15100 (enum regset_type): New.
15101 (struct regset_info): Add type field. Use new operation types.
15102 (struct linux_target_ops): stop_pc renamed to get_pc.
15103 Add decr_pc_after_break and breakpoint_at.
15104 (get_process, get_thread_proess, get_process_thread)
15105 (strut process_info, all_processes, linux_attach_lwp)
15106 (thread_db_init): New.
15107
15108 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15109 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15110 (the_low_target): Add new members.
15111 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15112 (i386_store_fpxregset): Constify.
15113 (target_regsets): Add new kind identifier.
15114 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15115 (i386_set_pc): Add debugging.
15116 (i386_breakpoint_at): New function.
15117 (the_low_target): Add new members.
15118 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15119 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15120 (mips_breakpoint_at): New.
15121 (the_low_target): Add new members.
15122 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15123 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15124 (the_low_target): Add new members.
15125 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15126 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15127 (the_low_target): Add new members.
15128 * linux-x86-64-low.c (target_regsets): Add new kind
15129 identifier.
15130
151312002-05-15 Daniel Jacobowitz <drow@mvista.com>
15132
15133 From Martin Pool <mbp@samba.org>:
15134 * server.c (gdbserver_usage): New function.
15135 (main): Call it.
15136
151372002-05-14 Daniel Jacobowitz <drow@mvista.com>
15138
15139 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15140 stop_at -> stop_pc.
15141
151422002-05-04 Andrew Cagney <ac131313@redhat.com>
15143
15144 * Makefile.in: Remove obsolete code.
15145
151462002-04-24 Michal Ludvig <mludvig@suse.cz>
15147
15148 * linux-low.c (regsets_fetch_inferior_registers),
15149 (regsets_store_inferior_registers): Removed cast to int from
15150 ptrace() calls.
15151 * regcache.h: Added declaration of struct inferior_info.
15152
151532002-04-20 Daniel Jacobowitz <drow@mvista.com>
15154
15155 * inferiors.c (struct inferior_info): Add regcache_data.
15156 (add_inferior): Call create_register_cache.
15157 (clear_inferiors): Call free_register_cache.
15158 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15159 * regcache.c (struct inferior_regcache_data): New.
15160 (registers): Remove.
15161 (get_regcache): New function.
15162 (create_register_cache, free_register_cache): New functions.
15163 (set_register_cache): Don't initialize the register cache here.
15164 (registers_to_string, registers_from_string, register_data): Call
15165 get_regcache.
15166 * regcache.h: Add prototypes.
15167 * server.h: Likewise.
15168
151692002-04-20 Daniel Jacobowitz <drow@mvista.com>
15170
15171 * mem-break.c: New file.
15172 * mem-break.h: New file.
15173 * Makefile.in: Add mem-break.o rule; update server.h
15174 dependencies.
15175 * inferiors.c (struct inferior_info): Add target_data
15176 member.
15177 (clear_inferiors): Free target_data member if set.
15178 (inferior_target_data, set_inferior_target_data): New functions.
15179 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15180 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15181 * linux-low.c (linux_bp_reinsert): New variable.
15182 (struct inferior_linux_data): New.
15183 (linux_create_inferior): Use set_inferior_target_data.
15184 (linux_attach): Likewise. Call add_inferior.
15185 (linux_wait_for_one_inferior): New function.
15186 (linux_wait): Call it.
15187 (linux_write_memory): Add const.
15188 (initialize_low): Call set_breakpoint_data.
15189 * linux-low.h (struct linux_target_ops): Add breakpoint
15190 handling members.
15191 * server.c (attach_inferior): Remove extra add_inferior
15192 call.
15193 * server.h: Include mem-break.h. Update inferior.c
15194 prototypes.
15195 * target.c (read_inferior_memory)
15196 (write_inferior_memory): New functions.
15197 * target.h (read_inferior_memory)
15198 (write_inferior_memory): Change macros to prototypes.
15199 (struct target_ops): Update comments. Add const to write_memory
15200 definition.
15201
152022002-04-11 Daniel Jacobowitz <drow@mvista.com>
15203
15204 * linux-low.c (usr_store_inferior_registers): Support
15205 registers which are allowed to fail to store.
15206 * linux-low.h (linux_target_ops): Likewise.
15207 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15208 (ppc_cannot_store_register): FPSCR may not be storable.
15209
152102002-04-09 Daniel Jacobowitz <drow@mvista.com>
15211
15212 * server.h: Include <string.h> if HAVE_STRING_H.
15213 * ChangeLog: Correct paths in last ChangeLog entry.
15214
152152002-04-09 Daniel Jacobowitz <drow@mvista.com>
15216
15217 * linux-low.h: Remove obsolete prototypes.
15218 (struct linux_target_ops): New.
15219 (extern the_low_target): New.
15220 * linux-low.c (num_regs, regmap): Remove declarations.
15221 (register_addr): Use the_low_target explicitly.
15222 (fetch_register): Likewise.
15223 (usr_fetch_inferior_registers): Likewise.
15224 (usr_store_inferior_registers): Likewise.
15225 * linux-arm-low.c (num_regs): Remove.
15226 (arm_num_regs): Define.
15227 (arm_regmap): Renamed from regmap, made static.
15228 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15229 made static.
15230 (arm_cannot_store_register): Renamed from cannot_store_register,
15231 made static.
15232 (the_low_target): New.
15233 * linux-i386-low.c (num_regs): Remove.
15234 (i386_num_regs): Define.
15235 (i386_regmap): Renamed from regmap, made static.
15236 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15237 made static.
15238 (i386_cannot_store_register): Renamed from cannot_store_register,
15239 made static.
15240 (the_low_target): New.
15241 * linux-ia64-low.c (num_regs): Remove.
15242 (ia64_num_regs): Define.
15243 (ia64_regmap): Renamed from regmap, made static.
15244 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15245 made static.
15246 (ia64_cannot_store_register): Renamed from cannot_store_register,
15247 made static.
15248 (the_low_target): New.
15249 * linux-m68k-low.c (num_regs): Remove.
15250 (m68k_num_regs): Define.
15251 (m68k_regmap): Renamed from regmap, made static.
15252 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15253 made static.
15254 (m68k_cannot_store_register): Renamed from cannot_store_register,
15255 made static.
15256 (the_low_target): New.
15257 * linux-mips-low.c (num_regs): Remove.
15258 (mips_num_regs): Define.
15259 (mips_regmap): Renamed from regmap, made static.
15260 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15261 made static.
15262 (mips_cannot_store_register): Renamed from cannot_store_register,
15263 made static.
15264 (the_low_target): New.
15265 * linux-ppc-low.c (num_regs): Remove.
15266 (ppc_num_regs): Define.
15267 (ppc_regmap): Renamed from regmap, made static.
15268 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15269 made static.
15270 (ppc_cannot_store_register): Renamed from cannot_store_register,
15271 made static.
15272 (the_low_target): New.
15273 * linux-s390-low.c (num_regs): Remove.
15274 (s390_num_regs): Define.
15275 (s390_regmap): Renamed from regmap, made static.
15276 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15277 made static.
15278 (s390_cannot_store_register): Renamed from cannot_store_register,
15279 made static.
15280 (the_low_target): New.
15281 * linux-sh-low.c (num_regs): Remove.
15282 (sh_num_regs): Define.
15283 (sh_regmap): Renamed from regmap, made static.
15284 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15285 made static.
15286 (sh_cannot_store_register): Renamed from cannot_store_register,
15287 made static.
15288 (the_low_target): New.
15289 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15290 (the_low_target): New.
15291
152922002-04-09 Daniel Jacobowitz <drow@mvista.com>
15293
15294 * Makefile.in: Add stamp-h target.
15295 * configure.in: Create stamp-h.
15296 * configure: Regenerated.
15297
152982002-04-09 Daniel Jacobowitz <drow@mvista.com>
15299
15300 * inferiors.c: New file.
15301 * target.c: New file.
15302 * target.h: New file.
15303 * Makefile.in: Add target.o and inferiors.o. Update
15304 dependencies.
15305 * linux-low.c (inferior_pid): New static variable,
15306 moved from server.c.
15307 (linux_create_inferior): Renamed from create_inferior.
15308 Call add_inferior. Return 0 on success instead of a PID.
15309 (linux_attach): Renamed from myattach.
15310 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15311 (linux_thread_alive): Renamed from mythread_alive.
15312 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15313 child dies.
15314 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15315 (regsets_store_inferior_registers): Correct error message.
15316 Add missing ``return 0''.
15317 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15318 (linux_store_registers): Renamed from store_inferior_registers.
15319 (linux_read_memory): Renamed from read_inferior_memory.
15320 (linux_write_memory): Renamed from write_inferior_memory.
15321 (linux_target_ops): New structure.
15322 (initialize_low): Call set_target_ops ().
15323 * remote-utils.c (unhexify): New function.
15324 (hexify): New function.
15325 (input_interrupt): Send signals to ``signal_pid''.
15326 * server.c (inferior_pid): Remove.
15327 (start_inferior): Update create_inferior call.
15328 (attach_inferior): Call add_inferior.
15329 (handle_query): New function.
15330 (main): Call handle_query for `q' packets.
15331 * server.h: Include "target.h". Remove obsolete prototypes.
15332 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15333
153342002-04-09 Daniel Jacobowitz <drow@mvista.com>
15335
15336 * Makefile.in: Add WARN_CFLAGS. Update configury
15337 dependencies.
15338 * configure.in: Check for <string.h>
15339 * configure: Regenerate.
15340 * config.in: Regenerate.
15341 * gdbreplay.c: Include needed system headers.
15342 (remote_open): Remove strchr prototype.
15343 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15344 * regcache.c (supply_register): Change buf argument to const void *.
15345 (supply_register_by_name): Likewise.
15346 (collect_register): Change buf argument to void *.
15347 (collect_register_by_name): Likewise.
15348 * regcache.h: Add missing prototypes.
15349 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15350 * server.c (handle_query): New function.
15351 (attached): New static variable, moved out of main.
15352 (main): Quiet longjmp clobber warnings.
15353 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15354 * utils.c (error): Remove NORETURN.
15355 (fatal): Likewise.
This page took 1.926719 seconds and 4 git commands to generate.