]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add unit test for xml_escape_text
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1526853e
SM
12017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (captured_main): Accept argument for --selftest.
4 Update run_tests call.
5 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6 when registering selftests.
7
c4dfafab
SDJ
82017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
9
10 * regcache.c (get_thread_regcache): Update code to use "std::vector"
11 instead of "VEC" for "target_desc.reg_defs".
12 (regcache_cpy): Likewise.
13 (registers_to_string): Likewise.
14 (registers_from_string): Likewise.
15 (find_regno): Likewise.
16 (supply_regblock): Likewise.
17 (regcache_raw_read_unsigned): Likewise.
18 * tdesc.c (init_target_desc): Likewise.
19 (tdesc_create_reg): Likewise.
20 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
21 (struct target_desc) <reg_defs>: Convert to "std::vector".
22 (target_desc): Do not initialize "reg_defs".
23 (~target_desc): Update code to use "std::vector" instead of "VEC"
24 for "target_desc.reg_defs".
25 (operator==): Likewise.
26
124aceb4
SM
272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
28
29 * inferiors.h (thread_to_gdb_id): Remove.
30 * inferiors.c (thread_to_gdb_id): Remove.
31 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
32 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
33 lynx_store_registers, lynx_read_memory, lynx_write_memory):
34 Likewise.
35 * nto-low.c (nto_fetch_registers, nto_store_registers,
36 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
37
96cde54f
SM
382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
39
40 * inferiors.h (gdb_id_to_thread_id): Remove.
41 * inferiors.c (gdb_id_to_thread_id): Remove.
42 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
43 removal. Move pid declaration closer to where it's used.
44
e8ca139e
SM
452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
46
47 * server.c (handle_detach): New function.
48 (process_serial_event): Move code out, call handle_detach.
49
f8a4e119
SM
502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
51
52 * server.c (require_running): Rename to ...
53 (require_running_or_return): ... this ...
54 (require_running_or_break): ... and this.
55 (handle_query, process_serial_event): Adjust.
56
0eb0a407
SM
572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
58
59 * linux-low.c (linux_set_resume_request): Remove unused
60 variables.
61
785922a5
SM
622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
63
64 * server.c (first_thread_of): Remove.
65 (process_serial_event): Replace usage of first_thread_of with
66 find_any_thread_of_pid.
67 * tracepoint.c (same_process_p): Remove.
68 (gdb_agent_about_to_close): Replace usage of same_process_p with
69 find_any_thread_of_pid.
70 * linux-x86-low.c (same_process_callback): Remove.
71 (x86_arch_setup_process_callback): Replace usage of
72 same_process_callback with find_any_thread_of_pid.
73 * thread-db.c (any_thread_of): Remove.
74 (switch_to_process): Replace usage of any_thread_of with
75 find_any_thread_of_pid.
76 * inferiors.c (thread_pid_matches_callback): Remove.
77 (find_thread_process): Adjust to use find_any_thread_of_pid.
78
a059f00c
SDJ
792017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
80
81 * regcache.c (get_thread_regcache): Guard calls to "memset"
82 with "!VEC_empty".
83
cc397f3a
SDJ
842017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
85
86 * linux-low.c (handle_extended_wait): Use
87 "allocate_target_description" instead of "XNEW".
88 * linux-x86-low.c (initialize_low_arch): Likewise.
89
22916b07
YQ
902017-09-05 Yao Qi <yao.qi@linaro.org>
91
92 * configure.srv (srv_i386_regobj): Remove.
93 (srv_amd64_regobj): Remove.
94 (srv_regobj): Set it to "" for x86 non-linux targets.
95 * linux-x86-tdesc.c (i386_linux_read_description):
96 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
97 (init_registers_i386): Remove the declaration.
98 (tdesc_i386): Remove the declaration.
99 (lynx_i386_arch_setup): Call i386_create_target_description.
100 * nto-x86-low.c: Likewise.
101 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
102 [!__x86_64__]: include arch/i386.h.
103 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
104
38602d55
YQ
1052017-09-05 Yao Qi <yao.qi@linaro.org>
106
107 * configure.srv (srv_amd64_linux_xmlfiles): Remove
108 i386/amd64-XXX-linux from it.
109
44b886ff
YQ
1102017-09-05 Yao Qi <yao.qi@linaro.org>
111
112 * configure.srv: Empty srv_amd64_linux_regobj if $development is
113 false.
114 (ipa_amd64_linux_regobj): Remove.
115 (ipa_x32_linux_regobj): Remove.
116
b4570e4b
YQ
1172017-09-05 Yao Qi <yao.qi@linaro.org>
118
119 * Makefile.in (arch-amd64.o): New rule.
120 * configure.srv: Append arch-amd64.o.
121 * linux-amd64-ipa.c: Include common/x86-xstate.h.
122 (get_ipa_tdesc): Call amd64_linux_read_description.
123 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
124 and init_registers_amd64_XXX.
125 * linux-x86-low.c (x86_linux_read_description): Call
126 amd64_linux_read_description.
127 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
128 (initialize_low_arch): Don't call init_registers_x32_XXX and
129 init_registers_amd64_XXX.
130 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
131 and tdesc_amd64_XXX.
132 [__x86_64__] (amd64_tdesc_test): New function.
133 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
134 and init_registers_amd64_XXX.
135 * linux-x86-tdesc.c: Include arch/amd64.h.
136 (xcr0_to_tdesc_idx): New function.
137 (i386_linux_read_description): New function.
138 (amd64_get_ipa_tdesc_idx): New function.
139 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
140 (amd64_get_ipa_tdesc): Declare.
141
d1f28ea2
YQ
1422017-09-05 Yao Qi <yao.qi@linaro.org>
143
144 * configure.srv (srv_i386_linux_xmlfiles): Remove
145 i386/i386-XXX-linux.xml from it.
146
25a93583
YQ
1472017-09-05 Yao Qi <yao.qi@linaro.org>
148
149 * configure.srv: Set srv_i386_linux_regobj empty if $development
150 is false.
151 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
152 initialize_low_tdesc.
153 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
154 with #if initialize_low_tdesc.
155 * linux-x86-tdesc-selftest.c: New file.
156 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
157
5f035c07
YQ
1582017-09-05 Yao Qi <yao.qi@linaro.org>
159
160 * Makefile.in (arch-i386.o): New rule.
161 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
162 (x86_64-*-linux*): Likewise.
163 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
164 include arch/i386.h.
165 (i386_linux_read_description): Remove code and call
166 i386_create_target_description.
167 * tdesc.c (allocate_target_description): New function.
168 * tdesc.h (set_tdesc_architecture): Remove declaration.
169 (set_tdesc_osabi): Likewise.
170
0abe8a89
YQ
1712017-09-05 Yao Qi <yao.qi@linaro.org>
172
173 * linux-x86-tdesc.c: Don't include <inttypes.h>.
174 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
175 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
176 .xmltarget.
177 * server.c (get_features_xml): Call tdesc_get_features_xml.
178 * tdesc.c (set_tdesc_architecture): New function.
179 (set_tdesc_osabi): New function.
180 (tdesc_get_features_xml): New function.
181 (tdesc_create_feature): Add an argument.
182 * tdesc.h (struct target_desc) <features>: New field.
183 <arch, osabi>: New field.
184 (~target_desc): xfree features, arch, and osabi.
185 (target_desc::oerator==): Don't compare .xmltarget.
186 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
187 (set_tdesc_osabi): Likewise.
188 (tdesc_get_features_xml): Likewise.
189
0a188386
YQ
1902017-09-05 Yao Qi <yao.qi@linaro.org>
191
192 * linux-x86-tdesc.c: Include selftest.h.
193 (i386_tdesc_test): New function.
194 (initialize_low_tdesc): Call selftests::register_test.
195 * tdesc.h: Include regdef.h.
196 (target_desc): Override operator == and !=.
197
f49ff000
YQ
1982017-09-05 Yao Qi <yao.qi@linaro.org>
199
200 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
201 (ipa_obj): Likewise.
202 * linux-i386-ipa.c: Include common/x86-xstate.h
203 (get_ipa_tdesc): Call i386_linux_read_description.
204 (initialize_low_tracepoint): Don't call init_registers_XXX
205 functions, call initialize_low_tdesc instead.
206 * linux-x86-low.c (x86_linux_read_description): Call
207 i386_linux_read_description.
208 (initialize_low_arch): Don't call init_registers_i386_XXX
209 functions, call initialize_low_tdesc.
210 * linux-x86-tdesc.c: New file.
211 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
212 (i386_get_ipa_tdesc_idx): Declare.
213 (i386_get_ipa_tdesc): Declare.
214 (initialize_low_tdesc): Declare.
215
2b68ef2f
YQ
2162017-09-05 Yao Qi <yao.qi@linaro.org>
217
218 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
219 instead of 0.
220
f7000548
YQ
2212017-09-05 Yao Qi <yao.qi@linaro.org>
222
223 * Makefile.in (IPA_OBJS): Add vec-ipa.o
224 * regcache.c (get_thread_regcache): Use VEC_length.
225 (init_register_cache): Likewise.
226 (regcache_cpy): Likewise.
227 (registers_to_string): Iterate reg_defs via VEC_iterate.
228 (find_regno): Likewise.
229 (find_register_by_number): Use VEC_index.
230 (register_size): Call find_register_by_number.
231 (register_data): Call find_register_by_number.
232 (supply_regblock): Use VEC_length.
233 (regcache_raw_read_unsigned): Likewise.
234 * tdesc.c (init_target_desc): Iterate reg_defs via
235 VEC_iterate.
236 (default_description): Update initializer.
237 (copy_target_description): Don't update field num_registers.
238 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
239 <num_registers>: Remove.
240
50a421ac
SM
2412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
242
243 * Makefile.in (.SECONDARY): Define target.
244
23fdd69e
SM
2452017-09-03 Simon Marchi <simon.marchi@ericsson.com>
246
247 * linux-low.c (linux_wait_1): Adjust.
248 * server.c (queue_stop_reply_callback): Adjust.
249
0a2dde4a
SDJ
2502017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
251
252 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
253 QEnvironmentUnset and QEnvironmentReset packets.
254 (handle_query): Inform remote that QEnvironmentHexEncoded,
255 QEnvironmentUnset and QEnvironmentReset are supported.
256
6afd337d
SM
2572017-08-25 Simon Marchi <simon.marchi@ericsson.com>
258
259 * inferiors.h (inferior_target_data): Rename to ...
260 (thread_target_data): ... this.
261 (inferior_regcache_data): Rename to ...
262 (thread_regcache_data): ... this.
263 (set_inferior_regcache_data): Rename to ...
264 (set_thread_regcache_data): ... this.
265 * inferiors.c (inferior_target_data): Rename to ...
266 (thread_target_data): ... this.
267 (inferior_regcache_data): Rename to ...
268 (thread_regcache_data): ... this.
269 (set_inferior_regcache_data): Rename to ...
270 (set_thread_regcache_data): ... this.
271 (free_one_thread): Update.
272 * linux-low.h (get_thread_lwp): Update.
273 * regcache.c (get_thread_regcache): Update.
274 (regcache_invalidate_thread): Update.
275 (free_register_cache_thread): Update.
276 * win32-i386-low.c (update_debug_registers_callback): Update.
277 (win32_get_current_dr): Update.
278 * win32-low.c (thread_rec): Update.
279 (delete_thread_info): Update.
280 (continue_one_thread): Update.
281 (suspend_one_thread): Update.
282
a160cc46
SM
2832017-08-24 Simon Marchi <simon.marchi@ericsson.com>
284
285 * inferiors.c (set_inferior_target_data): Remove.
286 * inferiors.h (set_inferior_target_data): Remove.
287
6d580b63
YQ
2882017-08-18 Yao Qi <yao.qi@linaro.org>
289
290 * Makefile.in (OBS): Add selftest.o.
291 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
292 * configure, config.in: Re-generated.
293 * server.c: Include common/sefltest.h.
294 (captured_main): Handle option --selftest.
295
f5a29eb0
YQ
2962017-08-09 Yao Qi <yao.qi@linaro.org>
297
298 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
299 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
300 i386-avx-mpx.o and i386-mmx.o.
301 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
302 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
303 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
304 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
305 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
306 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
307 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
308 i386/amd64-avx-mpx.xml.
309
57757c2f
YQ
3102017-08-09 Yao Qi <yao.qi@linaro.org>
311
312 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
313 and x32-avx-avx512.o.
314 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
315 i386/x32-avx-avx512.xml.
316
229d26fc
SM
3172017-07-26 Simon Marchi <simon.marchi@ericsson.com>
318
319 * tracepoint.h (enum class fast_tpoint_collect_result): New
320 enumeration.
321 (fast_tracepoint_collecting): Change return type to
322 fast_tpoint_collect_result.
323 * tracepoint.c (fast_tracepoint_collecting): Likewise.
324 * linux-low.h: Include tracepoint.h.
325 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
326 fast_tpoint_collect_result.
327 * linux-low.c (handle_tracepoints): Adjust.
328 (linux_fast_tracepoint_collecting): Change return type to
329 fast_tpoint_collect_result.
330 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
331 linux_wait_1, stuck_in_jump_pad_callback,
332 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
333 proceed_one_lwp): Adjust to type change.
334
2e1e43e1
YQ
3352017-07-10 Yao Qi <yao.qi@linaro.org>
336
337 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
338
adc764e7
YQ
3392017-06-29 Yao Qi <yao.qi@linaro.org>
340
341 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
342 Remove.
343 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
344
a206891a
SM
3452017-06-20 Simon Marchi <simon.marchi@ericsson.com>
346
347 * Makefile.in (IPA_OBJS): Sort and format one item per line.
348
9a6c7d9c
SDJ
3492017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
350
351 * linux-low.c (linux_create_inferior): Adjust code to access the
352 environment information via 'gdb_environ' class.
353 * lynx-low.c (lynx_create_inferior): Likewise.
354 * server.c (our_environ): Make it an instance of 'gdb_environ'.
355 (get_environ): Return a pointer to 'our_environ'.
356 (captured_main): Initialize 'our_environ'.
357 * server.h (get_environ): Adjust prototype.
358 * spu-low.c (spu_create_inferior): Adjust code to access the
359 environment information via 'gdb_environ' class.
360
ae3e2ccf
SM
3612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
362
363 * linux-low.c (linux_read_memory, linux_write_memory): Remove
364 usage of "register" keyword.
365
3e019bdc
SM
3662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
367
368 * configure: Re-generate.
369
8465943a
SM
3702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
371
372 * configure: Re-generate.
373
cf0dd6f0
SM
3742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
375
376 * Makefile.in (COMPILE.pre): Add "-x c++".
377
9845682b
SDJ
3782017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
379
380 * fork-child.c: Conditionally include <signal.h>.
381
aefd8b33
SDJ
3822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
383
384 * server.c (handle_general_set): Handle new packet
385 "QStartupWithShell".
386 (handle_query): Add "QStartupWithShell" to the list of supported
387 packets.
388 (gdbserver_usage): Add help text explaining the
389 new "--startup-with-shell" and "--no-startup-with-shell" CLI
390 options.
391 (captured_main): Recognize and act upon the presence of the new
392 CLI options.
393
2090129c
SDJ
3942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
395 Pedro Alves <palves@redhat.com>
396
397 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
398 * configure: Regenerate.
399 * configure.srv (srv_linux_obj): Add "fork-child.o" and
400 "fork-inferior.o".
401 (i[34567]86-*-lynxos*): Likewise.
402 (spu*-*-*): Likewise.
403 * fork-child.c: New file.
404 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
405 and "environ.h".
406 (linux_ptrace_fun): New function.
407 (linux_create_inferior): Adjust function prototype to reflect
408 change on "target.h". Adjust function code to use
409 "fork_inferior".
410 (linux_request_interrupt): Delete "signal_pid".
411 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
412 (lynx_ptrace_fun): New function.
413 (lynx_create_inferior): Adjust function prototype to reflect
414 change on "target.h". Adjust function code to use
415 "fork_inferior".
416 * nto-low.c (nto_create_inferior): Adjust function prototype and
417 code to reflect change on "target.h". Update comments.
418 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
419 "common-terminal.h" and "environ.h".
420 (terminal_fd): Moved to fork-child.c.
421 (old_foreground_pgrp): Likewise.
422 (restore_old_foreground_pgrp): Likewise.
423 (last_status): Make it global.
424 (last_ptid): Likewise.
425 (our_environ): New variable.
426 (startup_with_shell): Likewise.
427 (program_name): Likewise.
428 (program_argv): Rename to...
429 (program_args): ...this.
430 (wrapper_argv): New variable.
431 (start_inferior): Delete function.
432 (get_exec_wrapper): New function.
433 (get_exec_file): Likewise.
434 (get_environ): Likewise.
435 (prefork_hook): Likewise.
436 (post_fork_inferior): Likewise.
437 (postfork_hook): Likewise.
438 (postfork_child_hook): Likewise.
439 (handle_v_run): Update code to deal with arguments coming from the
440 remote host. Update calls from "start_inferior" to
441 "create_inferior".
442 (captured_main): Likewise. Initialize environment variable. Call
443 "have_job_control".
444 * server.h (post_fork_inferior): New prototype.
445 (get_environ): Likewise.
446 (last_status): Declare.
447 (last_ptid): Likewise.
448 (signal_pid): Likewise.
449 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
450 (spu_ptrace_fun): New function.
451 (spu_create_inferior): Adjust function prototype to reflect change
452 on "target.h". Adjust function code to use "fork_inferior".
453 * target.c (target_terminal_init): New function.
454 (target_terminal_inferior): Likewise.
455 (target_terminal_ours): Likewise.
456 * target.h: Include <vector>.
457 (struct target_ops) <create_inferior>: Update prototype.
458 (create_inferior): Update macro.
459 * utils.c (gdb_flush_out_err): New function.
460 * win32-low.c (win32_create_inferior): Adjust function prototype
461 and code to reflect change on "target.h".
462
043a4934
SDJ
4632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
464
465 * inferiors.c (switch_to_thread): New function.
466
15652511
SDJ
4672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
468
469 * Makefile.in (SFILE): Add "common/job-control.c".
470 (OBS): Add "job-control.o".
471
21ea5acd
SDJ
4722017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
473
474 * Makefile: Remove "@host_makefile_frag@".
475
e13cb306
PA
4762017-05-05 Pedro Alves <palves@redhat.com>
477
478 * configure: Regenerate.
479
c94fee56
SDJ
4802017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
481
482 * configure: Regenerate.
483
a0ff9e1a
SM
4842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
485
486 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
487 software_single_step change of return type to
488 std::vector<CORE_ADDR>.
489 * linux-low.c (install_software_single_step_breakpoints):
490 Likewise.
491 * linux-low.h (install_software_single_step_breakpoints):
492 Likewise.
493
be628ab8
SDJ
4942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
495
496 * remote-utils.c: Include "gdb_termios.h" instead of
497 "terminal.h".
498 * terminal.h: Delete file.
499
7c5ded6a
SDJ
5002017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
501
502 * server.c: Include <vector>.
503 <program_argv, wrapper_argv>: Convert to std::vector.
504 (start_inferior): Rewrite function to use C++.
505 (handle_v_run): Likewise. Update code that calculates the argv
506 based on the vRun packet; use C++.
507 (captured_main): Likewise.
508
436252de
SM
5092017-04-06 Simon Marchi <simon.marchi@ericsson.com>
510
511 * server.c (handle_v_cont): Initialize thread_resume::thread
512 with null_ptid.
513
9bf2a700
PA
5142017-04-05 Pedro Alves <palves@redhat.com>
515
516 * configure: Regenerate.
517
a121b7c1
PA
5182017-04-05 Pedro Alves <palves@redhat.com>
519
520 * gdbreplay.c (sync_error): Constify.
521 * linux-x86-low.c (push_opcode): Constify.
522
21c8a587
PA
5232017-04-05 Pedro Alves <palves@redhat.com>
524
525 * win32-low.c (get_child_debug_event)
526 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
527 Report TARGET_WAITKIND_SPURIOUS instead.
528
fb32b4f7
PA
5292017-04-05 Pedro Alves <palves@redhat.com>
530
531 * remote-utils.c (remote_prepare, remote_open): Constify.
532 * remote-utils.h (remote_prepare, remote_open): Constify.
533 * server.c (captured_main): Constify 'port' handling.
534
65dd1e59
SM
5352017-04-04 Simon Marchi <simon.marchi@ericsson.com>
536
537 * Makefile.in (clean): Clear .deps.
538
8fa5b777
SM
5392017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
540
541 * .gitignore: Remove generated files, replace with wildcard.
542 * (clean): Replace removal of generated files with wildcard.
543 (version.c): Replace with...
544 (version-generated.c): ...this.
545 (xml-builtin.c): Replace with...
546 (xml-builtin-generated.c): ...this.
547 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
548 (%.c: *regformats*): Replace with...
549 (%-generated.c: *regformats*): ...this.
550
a12e714b
MF
5512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
552
553 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
554 (xtensa_fill_gregset): Call collect_register_by_name for
555 threadptr register.
556 (xtensa_store_gregset): Call supply_register_by_name for
557 threadptr register.
558
1a09b50a
MF
5592017-03-27 Max Filippov <jcmvbkbc@gmail.com>
560
561 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
562 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
563 (xtensa_store_gregset): Call supply_register for all registers in
564 a0_regnum..a0_regnum + C0_NREGS range.
565
1a01e7c6
SM
5662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
567
568 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
569 (ax-ipa.o: ax.c): Remove.
570 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
571 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
572 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
573 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
574 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
575
36bc18a8
SM
5762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
579 (print-utils-ipa.o: ../common/print-utils.c): Remove.
580 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
581 (errors-ipa.o: ../common/errors.c): Remove.
582 (format-ipa.o: ../common/format.c): Remove.
583 (common-utils-ipa.o: ../common/common-utils.c): Remove.
584
a8ebe3d5
SM
5852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
586
587 * Makefile.in (%-ipa.o: %.c): New rule.
588 (tracepoint-ipa.o: tracepoint.c): Remove.
589 (utils-ipa.o: utils.c): Remove.
590 (remote-utils-ipa.o: remote-utils.c): Remove.
591 (regcache-ipa.o: regcache.c): Remove.
592 (i386-linux-ipa.o: i386-linux.c): Remove.
593 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
594 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
595 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
596 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
597 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
598 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
599 (amd64-linux-ipa.o: amd64-linux.c): Remove.
600 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
601 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
602 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
603 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
604 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
605 (aarch64-ipa.o: aarch64.c): Remove.
606 (s390-linux32-ipa.o: s390-linux32.c): Remove.
607 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
608 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
609 (s390-linux64-ipa.o: s390-linux64.c): Remove.
610 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
611 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
612 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
613 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
614 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
615 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
616 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
617 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
618 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
619 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
620 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
621 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
622 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
623 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
624 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
625 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
626 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
627 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
628 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
629 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
630 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
631 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
632 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
633 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
634 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
635 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
636 (tdesc-ipa.o: tdesc.c): Remove.
637 (x32-linux-ipa.o: x32-linux.c): Remove.
638 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
639 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
640
50cfacb7
SM
6412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
642
643 * Makefile.in (%.o: ../arch/%.c): New rule.
644 (arm.o: ../arch/arm.c): Remove.
645 (arm-linux.o: ../arch/arm-linux.c): Remove.
646 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
647 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
648
c5a22423
SM
6492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
650
651 * Makefile.in (%.o: ../nat/%.c): New rule.
652 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
653 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
654 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
655 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
656 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
657 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
658 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
659 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
660 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
661 (linux-personality.o: ../nat/linux-personality.c): Remove.
662 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
663 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
664 (x86-linux.o: ../nat/x86-linux.c): Remove.
665 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
666 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
667
6bda016b
SM
6682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * Makefile.in (%.o: ../common/%.c): New rule.
671 (signals.o: ../common/signals.c): Remove.
672 (print-utils.o: ../common/print-utils.c): Remove.
673 (rsp-low.o: ../common/rsp-low.c): Remove.
674 (common-utils.o: ../common/common-utils.c): Remove.
675 (posix-strerror.o: ../common/posix-strerror.c): Remove.
676 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
677 (vec.o: ../common/vec.c): Remove.
678 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
679 (xml-utils.o: ../common/xml-utils.c): Remove.
680 (ptid.o: ../common/ptid.c): Remove.
681 (buffer.o: ../common/buffer.c): Remove.
682 (format.o: ../common/format.c): Remove.
683 (filestuff.o: ../common/filestuff.c): Remove.
684 (agent.o: ../common/agent.c): Remove.
685 (errors.o: ../common/errors.c): Remove.
686 (environ.o: ../common/environ.c): Remove.
687 (common-debug.o: ../common/common-debug.c): Remove.
688 (cleanups.o: ../common/cleanups.c): Remove.
689 (common-exceptions.o: ../common/common-exceptions.c): Remove.
690 (fileio.o: ../common/fileio.c): Remove.
691 (common-regcache.o: ../common/common-regcache.c): Remove.
692 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
693 (new-op.o: ../common/new-op.c): Remove.
694 (btrace-common.o: ../common/btrace-common.c): Remove.
695
21122961
SM
6962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
697
698 * Makefile.in (%.o: ../target/%.c): New rule.
699 (waitstatus.o: ../target/waitstatus.c): Remove.
700
c362e621
SM
7012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
702
703 * Makefile.in
704 (%.c: ../regformats/%.dat,
705 (%.c: ../regformats/arm/%.dat,
706 (%.c: ../regformats/i386/%.dat,
707 (%.c: ../regformats/rs6000/%.dat): New rules.
708 (aarch64.c): Remove.
709 (reg-arm.c): Remove.
710 (arm-with-iwmmxt.c): Remove.
711 (arm-with-vfpv2.c): Remove.
712 (arm-with-vfpv3.c): Remove.
713 (arm-with-neon.c): Remove.
714 (reg-bfin.c): Remove.
715 (reg-cris.c): Remove.
716 (reg-crisv32.c): Remove.
717 (i386.c): Remove.
718 (i386-linux.c): Remove.
719 (i386-avx.c): Remove.
720 (i386-avx-linux.c): Remove.
721 (i386-avx-avx512.c): Remove.
722 (i386-avx-avx512-linux.c): Remove.
723 (i386-mpx.c): Remove.
724 (i386-mpx-linux.c): Remove.
725 (i386-avx-mpx-avx512-pku.c): Remove.
726 (i386-avx-mpx-avx512-pku-linux.c): Remove.
727 (i386-avx-mpx.c): Remove.
728 (i386-avx-mpx-linux.c): Remove.
729 (i386-mmx.c): Remove.
730 (i386-mmx-linux.c): Remove.
731 (reg-ia64.c): Remove.
732 (reg-m32r.c): Remove.
733 (reg-m68k.c): Remove.
734 (reg-cf.c): Remove.
735 (mips-linux.c): Remove.
736 (mips-dsp-linux.c): Remove.
737 (mips64-linux.c): Remove.
738 (mips64-dsp-linux.c): Remove.
739 (nios2-linux.c): Remove.
740 (powerpc-32.c): Remove.
741 (powerpc-32l.c): Remove.
742 (powerpc-altivec32l.c): Remove.
743 (powerpc-cell32l.c): Remove.
744 (powerpc-vsx32l.c): Remove.
745 (powerpc-isa205-32l.c): Remove.
746 (powerpc-isa205-altivec32l.c): Remove.
747 (powerpc-isa205-vsx32l.c): Remove.
748 (powerpc-e500l.c): Remove.
749 (powerpc-64l.c): Remove.
750 (powerpc-altivec64l.c): Remove.
751 (powerpc-cell64l.c): Remove.
752 (powerpc-vsx64l.c): Remove.
753 (powerpc-isa205-64l.c): Remove.
754 (powerpc-isa205-altivec64l.c): Remove.
755 (powerpc-isa205-vsx64l.c): Remove.
756 (s390-linux32.c): Remove.
757 (s390-linux32v1.c): Remove.
758 (s390-linux32v2.c): Remove.
759 (s390-linux64.c): Remove.
760 (s390-linux64v1.c): Remove.
761 (s390-linux64v2.c): Remove.
762 (s390-te-linux64.c): Remove.
763 (s390-vx-linux64.c): Remove.
764 (s390-tevx-linux64.c): Remove.
765 (s390x-linux64.c): Remove.
766 (s390x-linux64v1.c): Remove.
767 (s390x-linux64v2.c): Remove.
768 (s390x-te-linux64.c): Remove.
769 (s390x-vx-linux64.c): Remove.
770 (s390x-tevx-linux64.c): Remove.
771 (tic6x-c64xp-linux.c): Remove.
772 (tic6x-c64x-linux.c): Remove.
773 (tic6x-c62x-linux.c): Remove.
774 (reg-sh.c): Remove.
775 (reg-sparc64.c): Remove.
776 (reg-spu.c): Remove.
777 (amd64.c): Remove.
778 (amd64-linux.c): Remove.
779 (amd64-avx.c): Remove.
780 (amd64-avx-linux.c): Remove.
781 (amd64-avx-avx512.c): Remove.
782 (amd64-avx-avx512-linux.c): Remove.
783 (amd64-mpx.c): Remove.
784 (amd64-mpx-linux.c): Remove.
785 (amd64-avx-mpx-avx512-pku.c): Remove.
786 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
787 (amd64-avx-mpx.c): Remove.
788 (amd64-avx-mpx-linux.c): Remove.
789 (x32.c): Remove.
790 (x32-linux.c): Remove.
791 (x32-avx.c): Remove.
792 (x32-avx-linux.c): Remove.
793 (x32-avx-avx512.c): Remove.
794 (x32-avx-avx512-linux.c): Remove.
795 (reg-xtensa.c): Remove.
796 (reg-tilegx.c): Remove.
797 (reg-tilegx32.c): Remove.
798
1672e0d9
SDJ
7992017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
800
801 * Makefile.in (SFILES): Add "common/environ.c".
802 (OBJS): Add "common/environ.h".
803
239b6d10
WT
8042017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
805
806 * configure.ac: Check if the fs_base and gs_base members of
807 `struct user_regs_struct' exist.
808 * config.in: Regenerated.
809 * configure: Likewise.
810
694b382c
AT
8112017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
812
813 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
814 target_read_memory.
815 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
816 (get_next_pcs_syscall_next_pc): Likewise.
817
7dc53023
LM
8182016-12-23 Luis Machado <lgustavo@codesourcery.com>
819
820 * win32-i386-low.c: Fix incorrect reference to a couple source files.
821 * nto-x86-low.c: Likewise.
822
ad02e4fe
SM
8232016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
824
825 * Makefile.in: Include disable-implicit-rules.mk.
826
dcb07cfa
PA
8272016-11-23 Pedro Alves <palves@redhat.com>
828
829 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
830 (debug_vprintf): Use std::chrono::steady_clock instead of
831 gettimeofday. Use '.' instead of ':'.
832 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
833 (get_timestamp): Use std::chrono::steady_clock instead of
834 gettimeofday.
835
8629c02c
SM
8362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
837
838 * Makefile.in: Fix whitespace formatting.
839
b593ecca
SM
8402016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
841
842 * Makefile.in (SFILES, OBS): Flatten list and order
843 alphabetically.
844
9986ba08
PA
8452016-11-23 Pedro Alves <palves@redhat.com>
846
847 * event-loop.c (handle_file_event): Use warning.
848 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
849 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
850 Use warning.
851
4eefa7bc
PA
8522016-11-23 Pedro Alves <palves@redhat.com>
853
854 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
855 output.
856 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
857 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
858 debug_printf and debug_flush for debug output.
859 * server.c (handle_general_set): Likewise.
860 * thread-db.c (try_thread_db_load): Use debug_printf for debug
861 output.
862
5443506e
SM
8632016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
864
865 * Makefile.in (.c.o): Replace rule with ...
866 (%.o: %.c): ... this one.
867
3b165252
SM
8682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
869
870 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
871 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
872 make.
873 * configure.ac: Remove checks for the make program.
874 * configure: Re-generate.
875
0bcda685
PA
8762016-10-28 Pedro Alves <palves@redhat.com>
877
878 * Makefile.in (CXX_DIALECT): Get from configure.
879 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
880 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
881 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
882 * config.in: Regenerate.
883 * configure: Regenerate.
884
c3805894
YQ
8852016-10-27 Yao Qi <yao.qi@linaro.org>
886
887 * linux-low.c (linux_supports_range_stepping): Return true if
888 can_software_single_step return true.
889
89342618
YQ
8902016-10-27 Yao Qi <yao.qi@linaro.org>
891
892 * inferiors.c (find_inferior_in_random): New function.
893 * inferiors.h (find_inferior_in_random): Declare.
894 * linux-low.c (linux_wait_for_event_filtered): Call
895 find_inferior_in_random instead of find_inferior.
896
e3652c84
YQ
8972016-10-27 Yao Qi <yao.qi@linaro.org>
898
899 * linux-low.c (linux_wait_1): If single-step breakpoints are
900 inserted, remove them.
901
5a04c4cf
PA
9022016-10-26 Pedro Alves <palves@redhat.com>
903
904 * linux-low.c (handle_extended_wait): Link parent/child fork
905 threads.
906 (linux_wait_1): Unlink them.
907 (linux_set_resume_request): Ignore resume requests for
908 already-resumed and unhandled fork child threads.
909 * linux-low.h (struct lwp_info) <fork_relative>: New field.
910 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
911 New functions.
912 (handle_v_requests) <vCont>: Don't call require_running.
913 * server.h (in_queued_stop_replies): New declaration.
914
cb93dc7f
YQ
9152016-10-24 Yao Qi <yao.qi@linaro.org>
916
917 PR server/20733
918 * linux-aarch64-low.c (append_insns): Cast the return value to
919 'uint32_t *'.
920
a1078bea
YQ
9212016-10-10 Yao Qi <yao.qi@linaro.org>
922
923 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
924
1fb77080
SDJ
9252016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
926
927 * target.c (target_supports_multi_process): New function, moved
928 from...
929 * target.h (target_supports_multi_process): ... here. Remove
930 macro.
931
39b5a3b9
TT
9322016-10-05 Tom Tromey <tom@tromey.com>
933
934 PR remote/20655:
935 * tracepoint.c (handle_tracepoint_bkpts): Check
936 ipa_error_tracepoint, not ipa_stopping_tracepoint.
937
c1d0b70a
YQ
9382016-10-05 Yao Qi <yao.qi@linaro.org>
939
940 * configure.srv: Update the path of arm-*.xml files.
941
0a69eedb
YQ
9422016-10-05 Terry Guo <terry.guo@arm.com>
943 Yao Qi <yao.qi@linaro.org>
944
945 * Makefile.in: Adjust the path of rules.
946 * configure.srv: Update the path of xml files.
947 * regformats/arm-with-iwmmxt.dat: Regenerated.
948 * regformats/arm-with-neon.dat: Likewise.
949 * regformats/arm-with-vfpv2.dat: Likewise.
950 * regformats/arm-with-vfpv3.dat Likewise.
951
17e16485
YQ
9522016-09-30 Yao Qi <yao.qi@linaro.org>
953
954 PR gdbserver/20627
955 * target.c (target_stop_and_wait): Don't call
956 target_continue_no_signal, use resume_stop instead.
957
edeeb602
YQ
9582016-09-26 Yao Qi <yao.qi@linaro.org>
959
960 * linux-low.c (linux_wait_1): Call debug_exit.
961
503b1c39
PA
9622016-09-23 Pedro Alves <palves@redhat.com>
963
964 * Makefile.in (SFILES): Add common/new-op.c.
965 (OBS): Add common/new-op.o.
966 (new-op.o): New rule.
967
74172ecf
SM
9682016-09-21 Simon Marchi <simon.marchi@ericsson.com>
969
970 * .gitinore: Ignore more files.
971
fc6cda2e
YQ
9722016-09-21 Yao Qi <yao.qi@linaro.org>
973
974 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
975 23.
976
bc1e6c81
SDJ
9772016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
978
979 * server.c (start_inferior): Call target_mourn_inferior instead of
980 mourn_inferior; pass ptid_t argument to it.
981 (resume): Likewise.
982 (handle_target_event): Likewise.
983 * target.c (target_mourn_inferior): New function.
984 * target.h (mourn_inferior): Delete macro.
985
0e00e962
AA
9862016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
987
988 * linux-low.c (lwp_is_stepping): New function.
989
1d8cb77d
CL
9902016-09-06 Carl Love <cel@us.ibm.com>
991
992 * server.c (start_inferior): Fixed comment, requested comment change
993 didn't get updated correctly. Removed reference to ptrace () call as
994 it is only true on Linux systems.
995
7313bced
CL
9962016-09-06 Carl Love <cel@us.ibm.com>
997
998 * server.c (start_inferior): Do not call
999 function target_post_create_inferior () if the
1000 inferior process has already exited.
1001
cf6de44d
PA
10022016-09-05 Pedro Alves <palves@redhat.com>
1003
1004 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1005 (COMPILE.pre, CC_LD): Use CXX directly.
1006 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1007 * acinclude.m4: Don't include build-with-cxx.m4.
1008 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1009 * configure: Regenerate.
1010
c1da6748
AT
10112016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1012
1013 PR gdb/19495
1014 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1015 call writing data to own_buf.
1016
f2b9e3df
SDJ
10172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1018
1019 * target.c (mywait): Call target_wait instead of
1020 the_target->wait.
1021 (target_wait): New function.
1022
049a8570
SDJ
10232016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1024
1025 * server.c (start_inferior): New variable 'ptid'. Replace calls
1026 to the_target->resume by target_continue{,_no_signal}, depending
1027 on the case.
1028 * target.c (target_stop_and_wait): Call target_continue_no_signal
1029 instead of the_target->resume.
1030 (target_continue): New function.
1031
3aa5cfa0
AT
10322016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1033
1034 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1035
754653a7
AZ
10362016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1037
1038 PR server/20491
1039 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1040 ps_prochandle.
1041 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1042 * linux-arm-low.c (ps_get_thread_area): Likewise.
1043 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1044 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1045 * linux-mips-low.c (ps_get_thread_area): Likewise.
1046 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1047 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1048 * linux-x86-low.c (ps_get_thread_area): Likewise.
1049 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1050
ed036b40
PA
10512016-08-19 Pedro Alves <palves@redhat.com>
1052
1053 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1054
c8ef42ee
PA
10552016-08-19 Pedro Alves <palves@redhat.com>
1056
1057 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1058 comment. Use memcpy instead of casting through unsigned long.
1059
9c235a72
PA
10602016-08-19 Pedro Alves <palves@redhat.com>
1061
1062 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1063 allocating around 0x80000000.
1064
201506da
PA
10652016-08-19 Pedro Alves <palves@redhat.com>
1066
1067 PR gdb/20415
1068 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1069 (x32-avx512-linux-ipa.o): New rules.
1070 * configure.ac (x86_64-*-linux*): New x32 check.
1071 * configure.srv (ipa_x32_linux_regobj): New.
1072 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1073 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1074 descriptions.
1075 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1076 descriptions.
1077 * configure: Regenerate.
1078
f348d89a
PA
10792016-08-09 Pedro Alves <palves@redhat.com>
1080
1081 PR gdb/18653
1082 * Makefile.in (OBS): Add signals-state-save-restore.o.
1083 (signals-state-save-restore.o): New rule.
1084 * config.in: Regenerate.
1085 * configure: Regenerate.
1086 * linux-low.c: Include "signals-state-save-restore.h".
1087 (linux_create_inferior): Call
1088 restore_original_signals_state.
1089 * server.c: Include "dispositions-save-restore.h".
1090 (captured_main): Call save_original_signals_state.
1091
1baf5149
PA
10922016-08-05 Pedro Alves <palves@redhat.com>
1093
1094 * configure: Regenerate.
1095
fcd4a73d
YQ
10962016-08-04 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-low.c (regsets_fetch_inferior_registers): Check
1099 errno is ESRCH or not.
1100
979659d0
YQ
11012016-08-02 Yao Qi <yao.qi@linaro.org>
1102
1103 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1104 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1105 (thread_db_load_search): Update.
1106 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1107 td_ta_set_event and td_ta_event_getmsg.
1108
6598661d
PA
11092016-07-26 Pedro Alves <palves@redhat.com>
1110
1111 PR server/20414
1112 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1113 of unsigned long for 64-bit registers and use uint32_t instead of
1114 unsigned int for 32-bit registers.
1115
9cf12d57
PA
11162016-07-26 Pedro Alves <palves@redhat.com>
1117
1118 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1119 to 'ptrace'.
1120
305450ed
TT
11212016-07-21 Tom Tromey <tom@tromey.com>
1122
1123 * configure: Rebuild.
1124
2583da7c
YQ
11252016-07-21 Yao Qi <yao.qi@linaro.org>
1126
1127 * mem-break.c (find_gdb_breakpoint): Cast bp to
1128 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1129
21536b36
YQ
11302016-07-21 Yao Qi <yao.qi@linaro.org>
1131
1132 * server.c (handle_v_requests): Support s and S actions
1133 if target_supports_software_single_step return true.
1134
8901d193
YQ
11352016-07-21 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1138 is resume_step, call maybe_hw_step.
1139 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1140 and unstop them.
1141 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1142 breakpoints or not.
1143 (proceed_one_lwp): If resume request is resume_step, install
1144 reinsert breakpoints and call maybe_hw_step.
1145
0e9a339e
YQ
11462016-07-21 Yao Qi <yao.qi@linaro.org>
1147
1148 * linux-low.c (proceed_one_lwp): Declare.
1149 (linux_resume_one_thread): Remove local variable 'step'.
1150 Lift code enqueue signal. Call proceed_one_lwp instead of
1151 linux_resume_one_lwp.
1152
4281b351
YQ
11532016-07-21 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-low.c (linux_resume_one_thread): Call
1156 enqueue_pending_signal.
1157
984a2c04
YQ
11582016-07-21 Yao Qi <yao.qi@linaro.org>
1159
1160 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1161 * inferiors.c (do_restore_current_thread_cleanup): New function.
1162 (make_cleanup_restore_current_thread): Likewise.
1163 * linux-low.c (install_software_single_step_breakpoints): Call
1164 make_cleanup_restore_current_thread. Switch current_thread to
1165 thread.
1166
bec903c9
YQ
11672016-07-21 Yao Qi <yao.qi@linaro.org>
1168
1169 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1170 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1171 (clone_one_breakpoint): Likewise.
1172 (delete_reinsert_breakpoints): Change parameter to thread.
1173 Callers updated.
1174 (has_reinsert_breakpoints): Likewise.
1175 (uninsert_reinsert_breakpoints): Likewise.
1176 (reinsert_reinsert_breakpoints): Likewise.
1177 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1178 (delete_reinsert_breakpoints): Likewise.
1179 (reinsert_reinsert_breakpoints): Likewise.
1180 (uninsert_reinsert_breakpoints): Likewise.
1181 (has_reinsert_breakpoints): Likewise.
1182
63c40ec7
YQ
11832016-07-21 Yao Qi <yao.qi@linaro.org>
1184
1185 * inferiors.c (get_thread_process): Make parameter const.
1186 * inferiors.h (get_thread_process): Update declaration.
1187 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1188 Add new parameters child_thread and parent_thread. Callers
1189 updated.
1190 * mem-break.h (clone_all_breakpoints): Update declaration.
1191
9aa76cd0
YQ
11922016-07-21 Yao Qi <yao.qi@linaro.org>
1193
1194 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1195 <command_list, handler>: Remove.
1196 (struct gdb_breakpoint): New.
1197 (struct other_breakpoint): New.
1198 (struct reinsert_breakpoint): New.
1199 (is_gdb_breakpoint): New function.
1200 (any_persistent_commands): Update command_list if
1201 is_gdb_breakpoint returns true.
1202 (set_breakpoint): Create breakpoints according to their types.
1203 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1204 (set_gdb_breakpoint_1): Likewise.
1205 (set_gdb_breakpoint): Likewise.
1206 (clear_breakpoint_conditions): Change parameter type to
1207 'struct gdb_breakpoint *'.
1208 (clear_breakpoint_commands): Likewise.
1209 (clear_breakpoint_conditions_and_commands): Likewise.
1210 (add_condition_to_breakpoint): Likewise.
1211 (add_breakpoint_condition): Likewise.
1212 (add_commands_to_breakpoint): Likewise.
1213 (check_breakpoints): Check other_breakpoint.
1214 (clone_one_breakpoint): Clone breakpopint according to its type.
1215 * mem-break.h (struct gdb_breakpoint): Declare.
1216 (set_gdb_breakpoint): Update declaration.
1217 (clear_breakpoint_conditions_and_commands): Likewise.
1218 (add_breakpoint_condition): Likewise.
1219 (add_breakpoint_commands): Likewise.
1220 * server.c (process_point_options): Change parameter type to
1221 'struct gdb_breakpoint *'.
1222
811f8301
YQ
12232016-07-21 Yao Qi <yao.qi@linaro.org>
1224
1225 * mem-break.c (set_breakpoint_at): Rename it to ...
1226 (set_breakpoint_type_at): ... it.
1227 (set_breakpoint_at): Call set_breakpoint_type_at.
1228 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1229 * mem-break.h (set_breakpoint_at): Update comments.
1230
b1c51e36
CLT
12312016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1232
1233 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1234 to buf parameter.
1235 (nios2_store_gregset): Likewise.
1236
ced2dffb
PA
12372016-07-01 Pedro Alves <palves@redhat.com>
1238 Antoine Tremblay <antoine.tremblay@ericsson.com>
1239
1240 * linux-low.c: Change interface to take the target lwp_info
1241 pointer directly and return void. Handle detaching from a zombie
1242 thread.
1243 (linux_detach_lwp_callback): New function.
1244 (linux_detach): Detach from the leader thread after detaching from
1245 the clone threads.
1246
2ac09a5b
YQ
12472016-06-28 Yao Qi <yao.qi@linaro.org>
1248
1249 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1250 for variable new_offset.
1251 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1252 (aarch64_ftrace_insn_reloc_cb): Likewise.
1253 (aarch64_ftrace_insn_reloc_tb): Likewise.
1254 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1255 PRIx64 instead of PRIx32.
1256
79e7fd4f
YQ
12572016-06-28 Yao Qi <yao.qi@linaro.org>
1258
1259 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1260 (the_low_target): Install arm_get_syscall_trapinfo.
1261
061fc021
YQ
12622016-06-28 Yao Qi <yao.qi@linaro.org>
1263
1264 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1265 function.
1266 (the_low_target): Install aarch64_get_syscall_trapinfo.
1267
4cc32bec
YQ
12682016-06-28 Yao Qi <yao.qi@linaro.org>
1269
1270 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1271 Callers updated.
1272 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1273 Remove parameter sysno.
1274 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1275 sysret.
1276
782c1122
AA
12772016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1278
1279 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1280 (s390_emit_ne_goto): Likewise.
1281 (s390_emit_lt_goto): Likewise.
1282 (s390_emit_le_goto): Likewise.
1283 (s390_emit_gt_goto): Likewise.
1284 (s390_emit_ge_goto): Likewise.
1285 (s390x_emit_eq_goto): Likewise.
1286 (s390x_emit_ne_goto): Likewise.
1287 (s390x_emit_lt_goto): Likewise.
1288 (s390x_emit_le_goto): Likewise.
1289 (s390x_emit_gt_goto): Likewise.
1290 (s390x_emit_ge_goto): Likewise.
1291 (s390_emit_ops_impl): Mark variable static.
1292 (s390x_emit_ops): Likewise.
1293
2e7b624b
YQ
12942016-06-17 Yao Qi <yao.qi@linaro.org>
1295
1296 * linux-low.c (handle_extended_wait): Call
1297 uninsert_reinsert_breakpoints for the parent process. Remove
1298 reinsert breakpoints from the child process. Reinsert them to
1299 the parent process when vfork is done.
1300 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1301 (reinsert_reinsert_breakpoints): New function.
1302 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1303 (reinsert_reinsert_breakpoints): Declare.
1304
8a81c5d7
YQ
13052016-06-17 Yao Qi <yao.qi@linaro.org>
1306
1307 * linux-low.c (handle_extended_wait): If the parent is doing
1308 step-over, remove the reinsert breakpoints from the forked child.
1309
f50bf8e5
YQ
13102016-06-17 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-low.c (unsuspend_all_lwps): Declare.
1313 (linux_low_filter_event): If thread exited, call finish_step_over.
1314 If step-over is finished, unsuspend other threads.
1315
8376a3cb
YQ
13162016-06-17 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-low.c (linux_resume_one_lwp_throw): Assert
1319 has_reinsert_breakpoints returns false.
1320 * mem-break.c (delete_disabled_breakpoints): Assert
1321 bp type isn't reinsert_breakpoint.
1322
f79b145d
YQ
13232016-06-17 Yao Qi <yao.qi@linaro.org>
1324
1325 * linux-low.c (maybe_hw_step): New function.
1326 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1327 (finish_step_over): Switch current_thread to lwp temporarily,
1328 and assert has_reinsert_breakpoints returns true.
1329 (proceed_one_lwp): Call maybe_hw_step.
1330 * mem-break.c (has_reinsert_breakpoints): New function.
1331 * mem-break.h (has_reinsert_breakpoints): Declare.
1332
0ae534d2
JT
13332016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1334
1335 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1336
fcdad592
YQ
13372016-05-17 Yao Qi <yao.qi@linaro.org>
1338
1339 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1340 instead of find_inferior.
1341
9e784964
YQ
13422016-05-05 Yao Qi <yao.qi@linaro.org>
1343
1344 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1345 Initialize res to zero.
1346
cf2ebb6e
YQ
13472016-05-05 Yao Qi <yao.qi@linaro.org>
1348
1349 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1350 to uint32_t.
1351
c1aebf87
UW
13522016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1353
1354 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1355 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1356 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1357
35fd2deb 13582016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1359 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1360
1361 * tracepoint.c (write_inferior_int8): New function.
1362 (cmd_qtenable_disable): Write enable flag using
1363 write_inferior_int8.
1364
484b3c32
YQ
13652016-04-25 Yao Qi <yao.qi@linaro.org>
1366
1367 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1368 (need_step_over_p): Return zero if the LWP has pending signals
1369 can be delivered on software single step target.
1370
85ba7d86
YQ
13712016-04-25 Yao Qi <yao.qi@linaro.org>
1372
1373 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1374 return instead of error.
1375
3539aa13
YQ
13762016-04-22 Yao Qi <yao.qi@linaro.org>
1377
1378 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1379 to 23.
1380
5b061e98
YQ
13812016-04-22 Yao Qi <yao.qi@linaro.org>
1382
1383 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1384 signal when stepping over breakpoint with software single
1385 step.
1386
3451269c
PA
13872016-04-21 Pedro Alves <palves@redhat.com>
1388
1389 * linux-s390-low.c (s390_collect_ptrace_register)
1390 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1391 add casts.
1392 (s390_check_regset): Use void * instead of gdb_byte *.
1393
a2358508
PA
13942016-04-20 Pedro Alves <palves@redhat.com>
1395
1396 * configure: Renegerate.
1397
6885166d
YQ
13982016-04-20 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1401 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1402 number 16.
1403 (arm_store_gregset): Likewise.
1404
2b863f51
WT
14052016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1406
1407 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1408 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1409 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1410 (amd64-avx-mpx-linux.c): New rules.
1411 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1412 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1413 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1414 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1415 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1416 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1417 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1418 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1419 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1420 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1421 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1422 * linux-x86-low.c (x86_linux_read_description): Add case for
1423 X86_XSTATE_AVX_MPX_MASK.
1424 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1425 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1426 init_registers_i386_avx_mpx_linux.
1427 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1428 (initialize_low_tracepoint): Call
1429 init_registers_i386_avx_mpx_linux.
1430 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1431 (initialize_low_tracepoint): Call
1432 init_registers_amd64_avx_mpx_linux.
1433 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1434 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1435 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1436 declarations.
1437
9b30624b
PA
14382016-04-18 Pedro Alves <palves@redhat.com>
1439
1440 * configure: Regenerate.
1441
45e3745e
AT
14422016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1443
1444 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1445 (aarch64_emit_sub): Likewise.
1446
2afc13ff
PA
14472016-04-12 Pedro Alves <palves@redhat.com>
1448
1449 * utils.c (prepare_to_throw_exception): Delete.
1450
6e774b13
SM
14512016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1454
4dca19f8
MK
14552016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1456
1457 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1458
d0a9981f
MK
14592016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1460
1461 * linux-aarch64-ipa.c: Add <elf.h> include.
1462 * linux-ppc-ipa.c: Add <elf.h> include.
1463 * linux-s390-ipa.c: Add <elf.h> include.
1464
252db07e
MK
14652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1466
1467 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1468 (get_raw_reg_ptr): Likewise.
1469 (get_trace_state_variable_value_ptr): Likewise.
1470 (set_trace_state_variable_value_ptr): Likewise.
1471 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1472 char *.
1473
14e2b6d9
MK
14742016-03-31 Wei-cheng Wang <cole945@gmail.com>
1475 Marcin Kościelnicki <koriakin@0x04.net>
1476
1477 PR/17221
1478 * linux-ppc-low.c (emit_insns): New function.
1479 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1480 (ppc_emit_prologue): New function.
1481 (ppc_emit_epilogue): New function.
1482 (ppc_emit_add): New function.
1483 (ppc_emit_sub): New function.
1484 (ppc_emit_mul): New function.
1485 (ppc_emit_lsh): New function.
1486 (ppc_emit_rsh_signed): New function.
1487 (ppc_emit_rsh_unsigned): New function.
1488 (ppc_emit_ext): New function.
1489 (ppc_emit_zero_ext): New function.
1490 (ppc_emit_log_not): New function.
1491 (ppc_emit_bit_and): New function.
1492 (ppc_emit_bit_or): New function.
1493 (ppc_emit_bit_xor): New function.
1494 (ppc_emit_bit_not): New function.
1495 (ppc_emit_equal): New function.
1496 (ppc_emit_less_signed): New function.
1497 (ppc_emit_less_unsigned): New function.
1498 (ppc_emit_ref): New function.
1499 (ppc_emit_const): New function.
1500 (ppc_emit_reg): New function.
1501 (ppc_emit_pop): New function.
1502 (ppc_emit_stack_flush): New function.
1503 (ppc_emit_swap): New function.
1504 (ppc_emit_stack_adjust): New function.
1505 (ppc_emit_call): New function.
1506 (ppc_emit_int_call_1): New function.
1507 (ppc_emit_void_call_2): New function.
1508 (ppc_emit_if_goto): New function.
1509 (ppc_emit_goto): New function.
1510 (ppc_emit_eq_goto): New function.
1511 (ppc_emit_ne_goto): New function.
1512 (ppc_emit_lt_goto): New function.
1513 (ppc_emit_le_goto): New function.
1514 (ppc_emit_gt_goto): New function.
1515 (ppc_emit_ge_goto): New function.
1516 (ppc_write_goto_address): New function.
1517 (ppc_emit_ops_impl): New static variable.
1518 (ppc64v1_emit_prologue): New function.
1519 (ppc64v2_emit_prologue): New function.
1520 (ppc64_emit_epilogue): New function.
1521 (ppc64_emit_add): New function.
1522 (ppc64_emit_sub): New function.
1523 (ppc64_emit_mul): New function.
1524 (ppc64_emit_lsh): New function.
1525 (ppc64_emit_rsh_signed): New function.
1526 (ppc64_emit_rsh_unsigned): New function.
1527 (ppc64_emit_ext): New function.
1528 (ppc64_emit_zero_ext): New function.
1529 (ppc64_emit_log_not): New function.
1530 (ppc64_emit_bit_and): New function.
1531 (ppc64_emit_bit_or): New function.
1532 (ppc64_emit_bit_xor): New function.
1533 (ppc64_emit_bit_not): New function.
1534 (ppc64_emit_equal): New function.
1535 (ppc64_emit_less_signed): New function.
1536 (ppc64_emit_less_unsigned): New function.
1537 (ppc64_emit_ref): New function.
1538 (ppc64_emit_const): New function.
1539 (ppc64v1_emit_reg): New function.
1540 (ppc64v2_emit_reg): New function.
1541 (ppc64_emit_pop): New function.
1542 (ppc64_emit_stack_flush): New function.
1543 (ppc64_emit_swap): New function.
1544 (ppc64v1_emit_call): New function.
1545 (ppc64v2_emit_call): New function.
1546 (ppc64v1_emit_int_call_1): New function.
1547 (ppc64v2_emit_int_call_1): New function.
1548 (ppc64v1_emit_void_call_2): New function.
1549 (ppc64v2_emit_void_call_2): New function.
1550 (ppc64_emit_if_goto): New function.
1551 (ppc64_emit_eq_goto): New function.
1552 (ppc64_emit_ne_goto): New function.
1553 (ppc64_emit_lt_goto): New function.
1554 (ppc64_emit_le_goto): New function.
1555 (ppc64_emit_gt_goto): New function.
1556 (ppc64_emit_ge_goto): New function.
1557 (ppc64v1_emit_ops_impl): New static variable.
1558 (ppc64v2_emit_ops_impl): New static variable.
1559 (ppc_emit_ops): New function.
1560 (linux_low_target): Wire in ppc_emit_ops.
1561
a2174ba4
MK
15622016-03-31 Wei-cheng Wang <cole945@gmail.com>
1563 Marcin Kościelnicki <koriakin@0x04.net>
1564
1565 PR/17221
1566 * Makefile.in: Add powerpc-*-ipa.o
1567 * configure.srv: Add ipa_obj for powerpc*-linux.
1568 * linux-ppc-ipa.c: New file.
1569 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1570 includes.
1571 (PPC_FIELD): New macro.
1572 (PPC_SEXT): New macro.
1573 (PPC_OP6): New macro.
1574 (PPC_BO): New macro.
1575 (PPC_LI): New macro.
1576 (PPC_BD): New macro.
1577 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1578 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1579 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1580 (ppc_get_thread_area): New function.
1581 (is_elfv2_inferior): New function.
1582 (gen_ds_form): New function.
1583 (GEN_STD): New macro.
1584 (GEN_STDU): New macro.
1585 (GEN_LD): New macro.
1586 (GEN_LDU): New macro.
1587 (gen_d_form): New function.
1588 (GEN_ADDI): New macro.
1589 (GEN_ADDIS): New macro.
1590 (GEN_LI): New macro.
1591 (GEN_LIS): New macro.
1592 (GEN_ORI): New macro.
1593 (GEN_ORIS): New macro.
1594 (GEN_LWZ): New macro.
1595 (GEN_STW): New macro.
1596 (GEN_STWU): New macro.
1597 (gen_xfx_form): New function.
1598 (GEN_MFSPR): New macro.
1599 (GEN_MTSPR): New macro.
1600 (GEN_MFCR): New macro.
1601 (GEN_MTCR): New macro.
1602 (GEN_SYNC): New macro.
1603 (GEN_LWSYNC): New macro.
1604 (gen_x_form): New function.
1605 (GEN_OR): New macro.
1606 (GEN_MR): New macro.
1607 (GEN_LWARX): New macro.
1608 (GEN_STWCX): New macro.
1609 (GEN_CMPW): New macro.
1610 (gen_md_form): New function.
1611 (GEN_RLDICL): New macro.
1612 (GEN_RLDICR): New macro.
1613 (gen_i_form): New function.
1614 (GEN_B): New macro.
1615 (GEN_BL): New macro.
1616 (gen_b_form): New function.
1617 (GEN_BNE): New macro.
1618 (GEN_LOAD): New macro.
1619 (GEN_STORE): New macro.
1620 (gen_limm): New function.
1621 (gen_atomic_xchg): New function.
1622 (gen_call): New function.
1623 (ppc_relocate_instruction): New function.
1624 (ppc_install_fast_tracepoint_jump_pad): New function.
1625 (ppc_get_min_fast_tracepoint_insn_len): New function.
1626 (ppc_get_ipa_tdesc_idx): New function.
1627 (the_low_target): Wire in the new functions.
1628 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1629 tdescs.
1630 * linux-ppc-tdesc.h: New file.
1631
a13c4696
MK
16322016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1633
1634 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1635 (alloc_jump_pad_buffer): New function.
1636 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1637 (alloc_jump_pad_buffer): New function.
1638 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1639 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1640 (alloc_jump_pad_buffer): New function.
1641 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1642 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1643 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1644 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1645
1cda1512
MK
16462016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1647
1648 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1649 * linux-amd64-ipa.c: Likewise.
1650 * linux-i386-ipa.c: Likewise.
1651 * linux-s390-ipa.c: Likewise.
1652 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1653 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1654 set_trace_state_variable_value_ptr.
1655 (struct ipa_sym_addresses): Likewise.
1656 (symbol_list): Likewise.
1657 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1658 accessing gdb_collect directly.
1659 (gdb_collect_ptr_type): New typedef.
1660 (get_raw_reg_ptr_type): New typedef.
1661 (get_trace_state_variable_value_ptr_type): New typedef.
1662 (set_trace_state_variable_value_ptr_type): New typedef.
1663 (gdb_collect_ptr): New global.
1664 (get_raw_reg_ptr): New global.
1665 (get_trace_state_variable_value_ptr): New global.
1666 (set_trace_state_variable_value_ptr): New global.
1667 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1668 accessing get_raw_reg directly.
1669 (get_get_tsv_func_addr): Likewise for
1670 get_trace_state_variable_value_ptr.
1671 (get_set_tsv_func_addr): Likewise for
1672 set_trace_state_variable_value_ptr.
1673 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1674
72fb5488
SM
16752016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1676
1677 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1678
28170b88
MK
16792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1680
1681 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1682 packets.
1683 (relocate_instruction): Remove own_buf.
1684 * server.c (own_buf): Make global.
1685 (handle_v_requests): Make global.
1686 * server.h (own_buf): New declaration.
1687 (handle_v_requests): New prototype.
1688
f39e8743
MK
16892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1690
1691 PR 18377
1692 * linux-s390-low.c (add_insns): New function.
1693 (s390_emit_prologue): New function.
1694 (s390_emit_epilogue): New function.
1695 (s390_emit_add): New function.
1696 (s390_emit_sub): New function.
1697 (s390_emit_mul): New function.
1698 (s390_emit_lsh): New function.
1699 (s390_emit_rsh_signed): New function.
1700 (s390_emit_rsh_unsigned): New function.
1701 (s390_emit_ext): New function.
1702 (s390_emit_log_not): New function.
1703 (s390_emit_bit_and): New function.
1704 (s390_emit_bit_or): New function.
1705 (s390_emit_bit_xor): New function.
1706 (s390_emit_bit_not): New function.
1707 (s390_emit_equal): New function.
1708 (s390_emit_less_signed): New function.
1709 (s390_emit_less_unsigned): New function.
1710 (s390_emit_ref): New function.
1711 (s390_emit_if_goto): New function.
1712 (s390_emit_goto): New function.
1713 (s390_write_goto_address): New function.
1714 (s390_emit_litpool): New function.
1715 (s390_emit_const): New function.
1716 (s390_emit_call): New function.
1717 (s390_emit_reg): New function.
1718 (s390_emit_pop): New function.
1719 (s390_emit_stack_flush): New function.
1720 (s390_emit_zero_ext): New function.
1721 (s390_emit_swap): New function.
1722 (s390_emit_stack_adjust): New function.
1723 (s390_emit_set_r2): New function.
1724 (s390_emit_int_call_1): New function.
1725 (s390_emit_void_call_2): New function.
1726 (s390_emit_eq_goto): New function.
1727 (s390_emit_ne_goto): New function.
1728 (s390_emit_lt_goto): New function.
1729 (s390_emit_le_goto): New function.
1730 (s390_emit_gt_goto): New function.
1731 (s390_emit_ge_goto): New function.
1732 (s390x_emit_prologue): New function.
1733 (s390x_emit_epilogue): New function.
1734 (s390x_emit_add): New function.
1735 (s390x_emit_sub): New function.
1736 (s390x_emit_mul): New function.
1737 (s390x_emit_lsh): New function.
1738 (s390x_emit_rsh_signed): New function.
1739 (s390x_emit_rsh_unsigned): New function.
1740 (s390x_emit_ext): New function.
1741 (s390x_emit_log_not): New function.
1742 (s390x_emit_bit_and): New function.
1743 (s390x_emit_bit_or): New function.
1744 (s390x_emit_bit_xor): New function.
1745 (s390x_emit_bit_not): New function.
1746 (s390x_emit_equal): New function.
1747 (s390x_emit_less_signed): New function.
1748 (s390x_emit_less_unsigned): New function.
1749 (s390x_emit_ref): New function.
1750 (s390x_emit_if_goto): New function.
1751 (s390x_emit_const): New function.
1752 (s390x_emit_call): New function.
1753 (s390x_emit_reg): New function.
1754 (s390x_emit_pop): New function.
1755 (s390x_emit_stack_flush): New function.
1756 (s390x_emit_zero_ext): New function.
1757 (s390x_emit_swap): New function.
1758 (s390x_emit_stack_adjust): New function.
1759 (s390x_emit_int_call_1): New function.
1760 (s390x_emit_void_call_2): New function.
1761 (s390x_emit_eq_goto): New function.
1762 (s390x_emit_ne_goto): New function.
1763 (s390x_emit_lt_goto): New function.
1764 (s390x_emit_le_goto): New function.
1765 (s390x_emit_gt_goto): New function.
1766 (s390x_emit_ge_goto): New function.
1767 (s390_emit_ops): New function.
1768 (struct linux_target_ops): Fill in emit_ops hook.
1769
abd9baf9
MK
17702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1771
1772 PR 18377
1773 * Makefile.in: Add s390 IPA files.
1774 * configure.srv: Build IPA for s390.
1775 * linux-s390-ipa.c: New file.
1776 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1777 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1778 (tdesc_s390_linux32): Likewise.
1779 (init_registers_s390_linux32v1): Likewise.
1780 (tdesc_s390_linux32v1): Likewise.
1781 (init_registers_s390_linux32v2): Likewise.
1782 (tdesc_s390_linux32v2): Likewise.
1783 (init_registers_s390_linux64): Likewise.
1784 (tdesc_s390_linux64): Likewise.
1785 (init_registers_s390_linux64v1): Likewise.
1786 (tdesc_s390_linux64v1): Likewise.
1787 (init_registers_s390_linux64v2): Likewise.
1788 (tdesc_s390_linux64v2): Likewise.
1789 (init_registers_s390_te_linux64): Likewise.
1790 (tdesc_s390_te_linux64): Likewise.
1791 (init_registers_s390_vx_linux64): Likewise.
1792 (tdesc_s390_vx_linux64): Likewise.
1793 (init_registers_s390_tevx_linux64): Likewise.
1794 (tdesc_s390_tevx_linux64): Likewise.
1795 (init_registers_s390x_linux64): Likewise.
1796 (tdesc_s390x_linux64): Likewise.
1797 (init_registers_s390x_linux64v1): Likewise.
1798 (tdesc_s390x_linux64v1): Likewise.
1799 (init_registers_s390x_linux64v2): Likewise.
1800 (tdesc_s390x_linux64v2): Likewise.
1801 (init_registers_s390x_te_linux64): Likewise.
1802 (tdesc_s390x_te_linux64): Likewise.
1803 (init_registers_s390x_vx_linux64): Likewise.
1804 (tdesc_s390x_vx_linux64): Likewise.
1805 (init_registers_s390x_tevx_linux64): Likewise.
1806 (tdesc_s390x_tevx_linux64): Likewise.
1807 (have_hwcap_s390_vx): New static variable.
1808 (s390_arch_setup): Fill have_hwcap_s390_vx.
1809 (s390_get_thread_area): New function.
1810 (s390_ft_entry_gpr_esa): New const.
1811 (s390_ft_entry_gpr_zarch): New const.
1812 (s390_ft_entry_misc): New const.
1813 (s390_ft_entry_fr): New const.
1814 (s390_ft_entry_vr): New const.
1815 (s390_ft_main_31): New const.
1816 (s390_ft_main_64): New const.
1817 (s390_ft_exit_fr): New const.
1818 (s390_ft_exit_vr): New const.
1819 (s390_ft_exit_misc): New const.
1820 (s390_ft_exit_gpr_esa): New const.
1821 (s390_ft_exit_gpr_zarch): New const.
1822 (append_insns): New function.
1823 (s390_relocate_instruction): New function.
1824 (s390_install_fast_tracepoint_jump_pad): New function.
1825 (s390_get_min_fast_tracepoint_insn_len): New function.
1826 (s390_get_ipa_tdesc_idx): New function.
1827 (struct linux_target_ops): Wire in the above functions.
1828 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1829 * linux-s390-tdesc.h: New file.
1830
a4105d04
MK
18312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1832
1833 * linux-s390-low.c (s390_supports_tracepoints): New function.
1834 (struct linux_target_ops): Fill supports_tracepoints hook.
1835
35ac8b3e
YQ
18362016-03-18 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-low.c (lwp_signal_can_be_delivered): New function.
1839 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1840
94610ec4
YQ
18412016-03-18 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1844 0 if signal is enqueued. Remove 'signal' from one debugging
1845 message. Move one debugging message to some lines below.
1846 Remove code setting 'signal' to 0.
1847
80aea927
YQ
18482016-03-18 Yao Qi <yao.qi@linaro.org>
1849
1850 * linux-low.c (linux_low_filter_event): Remove redundant
1851 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1852
b04fd3be
MK
18532016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1854
1855 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1856 (struct linux_target_ops): Wire in the above.
1857
c40c8d4b
YQ
18582016-03-03 Yao Qi <yao.qi@linaro.org>
1859
1860 * linux-low.c: Update comments to start_step_over.
1861
0f8288ae
YQ
18622016-03-03 Yao Qi <yao.qi@linaro.org>
1863
1864 PR server/19736
1865 * linux-low.c (handle_extended_wait): Set child suspended
1866 if event_lwp->bp_reinsert isn't zero.
1867
fdbd04a8
YQ
18682016-03-02 Yao Qi <yao.qi@linaro.org>
1869
1870 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1871 enqueue_pending_signal.
1872
6896a8fa
MK
18732016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1874
1875 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1876 is actually loaded.
1877
ab503087
MK
18782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1879
1880 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1881 (s390_regmap_3264) [!__s390x__]: New global.
1882 (s390_collect_ptrace_register): Skip map entries containing -1.
1883 (s390_supply_ptrace_register): Ditto.
1884 (s390_fill_gprs_high): New function.
1885 (s390_store_gprs_high): New function.
1886 (s390_regsets): Add NT_S390_HIGH_GPRS.
1887 (s390_get_hwcap): Enable on 31-bit.
1888 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1889 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1890 Detect NT_S390_HIGH_GPRS.
1891 (s390_usrregs_info_3264): Enable on 31-bit.
1892 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1893 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1894
ae91f625
MK
18952016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1896
1897 PR gdb/13808
1898 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1899 * configure.srv: Ditto.
1900 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1901 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1902 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1903 (init_registers_amd64_linux): Remove prototype.
1904 (tdesc_amd64_linux): Remove declaration.
1905 (get_ipa_tdesc): New function.
1906 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1907 initialize remaining tdescs.
1908 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1909 (init_registers_i386_linux): Remove prototype.
1910 (tdesc_i386_linux): Remove declaration.
1911 (get_ipa_tdesc): New function.
1912 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1913 initialize remaining tdescs.
1914 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1915 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1916 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1917 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1918 (x86_get_ipa_tdesc_idx): New function.
1919 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1920 * linux-x86-tdesc.h: New file.
1921 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1922 (target_get_ipa_tdesc_idx): New macro.
1923 * tracepoint.c (ipa_tdesc_idx): New macro.
1924 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1925 (symbol_list): Add ipa_tdesc_idx.
1926 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1927 (ipa_tdesc): Remove.
1928 (ipa_tdesc_idx): New variable.
1929 (get_context_regcache): Use get_ipa_tdesc.
1930 (gdb_collect): Ditto.
1931 (gdb_probe): Ditto.
1932 * tracepoint.h (get_ipa_tdesc): New prototype.
1933 (ipa_tdesc): Remove.
1934
e7ad2f14
PA
19352016-02-24 Pedro Alves <palves@redhat.com>
1936
1937 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1938 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1939 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1940 Factor out common code between the USE_SIGTRAP_SIGINFO and
1941 !USE_SIGTRAP_SIGINFO blocks.
1942 (linux_low_filter_event): Call save_stop_reason instead of
1943 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1944 Update comments.
1945 (linux_wait_1): Update comments.
1946
657f9cde
WW
19472016-02-24 Wei-cheng Wang <cole945@gmail.com>
1948
1949 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1950 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1951 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1952 ppc_insert_point, ppc_remove_point.
1953
b00b61e1
MK
19542016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1955
1956 * linux-s390-low.c (s390_supports_z_point_type): New function.
1957 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1958
553cb527
YQ
19592016-02-16 Yao Qi <yao.qi@linaro.org>
1960
1961 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1962 PC. Get pc from regcache_read_pc.
1963
a5652c21
YQ
19642016-02-12 Yao Qi <yao.qi@linaro.org>
1965
1966 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1967 or linux_get_pc_32bit.
1968 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1969
ed443b61
YQ
19702016-02-12 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1973 arm_linux_get_next_pcs_fixup.
1974
020ecd38
MK
19752016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1976
1977 * tracepoint.c (x_tracepoint_action_download): Change
1978 write_inferior_data_ptr to write_inferior_data_pointer.
1979 (cmd_qtstart): Likewise.
1980 (write_inferior_data_ptr): Remove.
1981 (download_agent_expr): Change write_inferior_data_ptr to
1982 write_inferior_data_pointer.
1983 (download_tracepoint_1): Likewise.
1984 (download_tracepoint): Likewise.
1985 (download_trace_state_variables): Likewise.
1986
7cae9051
WW
19872016-02-11 Wei-cheng Wang <cole945@gmail.com>
1988 Marcin Kościelnicki <koriakin@0x04.net>
1989
1990 * tracepoint.c (struct tracepoint_action_ops): Remove.
1991 (struct tracepoint_action): Remove ops.
1992 (m_tracepoint_action_download, r_tracepoint_action_download)
1993 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1994 size and offset accordingly.
1995 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1996 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1997 (tracepoint_action_send, tracepoint_action_download): New functions.
1998 Helpers for trace action handlers.
1999 (add_tracepoint_action): Remove setup actions ops.
2000 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2001
9f6a71b4
YQ
20022016-02-10 Yao Qi <yao.qi@linaro.org>
2003
2004 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2005
1e94266c
SM
20062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2009 to AC_OUTPUT.
2010 * configure: Regenerate.
2011
8adce034
SM
20122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2015 void * to gdb_byte *.
2016 * linux-low.c (siginfo_fixup): Likewise.
2017 (linux_xfer_siginfo): Likewise.
2018 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2019 Likewise.
2020 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2021
93813b37
WT
20222016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2023
2024 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2025 to srv_tgtobj.
2026 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2027 to srv_tgtobj.
2028 * linux-x86-low.c [__x86_64__]: Include
2029 "nat/amd64-linux-siginfo.h".
2030 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2031 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2032 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2033 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2034 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2035 (cpt_si_fd, si_timerid, si_overrun): Move from
2036 nat/amd64-linux-siginfo.c.
2037 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2038
8424cc97
SM
20392016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2040
2041 * server.c (skip_to_semicolon): Remove.
2042 (process_point_options): Use strchrnul instead of
2043 skip_to_semicolon.
2044
4d18591b
YQ
20452016-01-26 Yao Qi <yao.qi@linaro.org>
2046
2047 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2048 * linux-low.c (install_software_single_step_breakpoints): Don't
2049 call regcache_read_pc.
2050 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2051 argument pc.
2052
d8020970
YQ
20532016-01-26 Yao Qi <yao.qi@linaro.org>
2054
2055 * linux-low.c (install_software_single_step_breakpoints): Call
2056 regcache_read_pc instead of get_pc.
2057
8b207339
YQ
20582016-01-26 Yao Qi <yao.qi@linaro.org>
2059
2060 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2061 (unblock_async_io): Rename to ...
2062 (block_unblock_async_io): ... it. New function.
2063 (enable_async_io): Don't install SIGIO handler. Unblock it
2064 instead.
2065 (disable_async_io): Don't ignore SIGIO. Block it instead.
2066 (initialize_async_io): Install SIGIO handler. Don't call
2067 unblock_async_io.
2068
18879fef
YQ
20692016-01-26 Yao Qi <yao.qi@linaro.org>
2070
2071 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2072 first character is '\003', call *the_target->request_interrupt.
2073
a0f8e08a
YQ
20742016-01-25 Yao Qi <yao.qi@linaro.org>
2075
2076 * remote-utils.c (new_thread_notify): Remove.
2077 (dead_thread_notify): Likewise.
2078 * remote-utils.h (new_thread_notify): Remove declaration.
2079 (dead_thread_notify): Likewise.
2080
cc5fd9ab
MK
20812016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2082
2083 * gdb.trace/pending.exp: Fix expected message on continue.
2084
99e8eb11
MK
20852016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2086
2087 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2088 it works properly on big-endian machines where sizeof (CORE_ADDR)
2089 != sizeof (void *).
2090
a994041d
PA
20912016-01-21 Pedro Alves <palves@redhat.com>
2092
2093 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2094 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2095 * configure: Regenerate.
2096
f7a6a40d
YQ
20972016-01-21 Yao Qi <yao.qi@linaro.org>
2098
2099 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2100 is_thumb and set it according to CPSR saved on the stack.
2101 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2102 arm_sigreturn_next_pc.
2103
6f69e520
YQ
21042016-01-18 Yao Qi <yao.qi@linaro.org>
2105
2106 * linux-low.c (linux_set_pc_64bit): New function.
2107 (linux_get_pc_64bit): New function.
2108 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2109 Declare.
2110 * linux-sparc-low.c (debug_threads): Remove declaration.
2111 (sparc_get_pc): Remove.
2112 (the_low_target): Use linux_get_pc_64bit instead of
2113 sparc_get_pc.
2114 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2115 (the_low_target): Use linux_get_pc_64bit and
2116 linux_set_pc_64bit.
2117
276d4552
YQ
21182016-01-18 Yao Qi <yao.qi@linaro.org>
2119
2120 * linux-arm-low.c (debug_threads): Remove declaration.
2121 (arm_get_pc, arm_set_pc): Remove.
2122 (the_low_target): Use linux_get_pc_32bit and
2123 linux_set_pc_32bit.
2124 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2125 (the_low_target): Use linux_get_pc_32bit and
2126 linux_set_pc_32bit.
2127 * linux-cris-low.c (debug_threads): Remove declaration.
2128 (cris_get_pc, cris_set_pc,): Remove.
2129 (the_low_target): Use linux_get_pc_32bit and
2130 linux_set_pc_32bit.
2131 * linux-crisv32-low.c (debug_threads): Remove declaration.
2132 (cris_get_pc, cris_set_pc): Remove.
2133 (the_low_target): Use linux_get_pc_32bit and
2134 linux_set_pc_32bit.
2135 * linux-low.c: Include inttypes.h.
2136 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2137 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2138 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2139 (the_low_target): Use linux_get_pc_32bit and
2140 linux_set_pc_32bit.
2141 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2142 (the_low_target): Use linux_get_pc_32bit and
2143 linux_set_pc_32bit.
2144 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2145 (the_low_target): Use linux_get_pc_32bit and
2146 linux_set_pc_32bit.
2147 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2148 (the_low_target): Use linux_get_pc_32bit and
2149 linux_set_pc_32bit.
2150 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2151 (the_low_target): Use linux_get_pc_32bit and
2152 linux_set_pc_32bit.
2153
eb0edac8
GB
21542016-01-18 Gary Benson <gbenson@redhat.com>
2155
2156 * configure.ac (AC_FUNC_FORK): New check.
2157 * config.in: Regenerate.
2158 * configure: Likewise.
2159
1b451dda
YQ
21602016-01-14 Yao Qi <yao.qi@linaro.org>
2161
2162 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2163 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2164 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2165 arm_get_next_pcs_ctor.
2166
82075af2
JS
21672016-01-12 Josh Stone <jistone@redhat.com>
2168 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2169
2170 * inferiors.h: Include "gdb_vecs.h".
2171 (struct process_info): Add syscalls_to_catch.
2172 * inferiors.c (remove_process): Free syscalls_to_catch.
2173 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2174 syscall_return stops.
2175 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2176 * server.c (handle_general_set): Handle QCatchSyscalls.
2177 (handle_query): Report support for QCatchSyscalls.
2178 * target.h (struct target_ops): Add supports_catch_syscall.
2179 (target_supports_catch_syscall): New macro.
2180 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2181 (struct lwp_info): Add syscall_state.
2182 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2183 Maintain syscall_state and syscalls_to_catch across exec.
2184 (get_syscall_trapinfo): New function, proxy to the_low_target.
2185 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2186 (linux_low_filter_event): Toggle syscall_state entry/return for
2187 syscall traps, and set it ignored for all others.
2188 (gdb_catching_syscalls_p): New function.
2189 (gdb_catch_this_syscall_p): New function.
2190 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2191 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2192 (linux_supports_catch_syscall): New function.
2193 (linux_target_ops): Install it.
2194 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2195 (the_low_target): Install it.
2196
8f13a3ce
MF
21972016-01-12 Mike Frysinger <vapier@gentoo.org>
2198
2199 * acinclude.m4: Include new ../warning.m4 file.
2200 * configure: Regenerated.
2201 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2202
5b3da067
MF
22032016-01-12 Mike Frysinger <vapier@gentoo.org>
2204
2205 * ax.c (is_goto_target): Mark static.
2206 * linux-low.c (register_addr): Likewise.
2207 (linux_fetch_registers, linux_store_registers): Likewise.
2208 * mem-break.c (any_persistent_commands): Fix old prototype.
2209 (add_commands_to_breakpoint): Mark static.
2210 * regcache.c (find_register_by_name): Delete unused func.
2211 * remote-utils.c (hex_or_minus_one): Mark static.
2212 * server.c (monitor_show_help): Mark static.
2213 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2214 handle_v_requests): Likewise.
2215
bc504a31
PA
22162016-01-12 Pedro Alves <palves@redhat.com>
2217
2218 Remove use of the registered trademark symbol throughout.
2219
5a0dd67a
YQ
22202016-01-08 Yao Qi <yao.qi@linaro.org>
2221
2222 * remote-utils.c (getpkt): If c is '\003', call target hook
2223 request_interrupt.
2224
b2ca446f
YQ
22252016-01-06 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2228 linux-aarch32-low.c.
2229 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2230 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2231 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2232 (thumb2_breakpoint): Declare.
2233 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2234 linux-aarch32-low.h.
2235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2236 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2237 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2238
edd88788
JB
22392016-01-01 Joel Brobecker <brobecker@adacore.com>
2240
2241 * gdbreplay.c (gdbreplay_version): Change copyright year in
2242 version message.
2243 * server.c (gdbserver_version): Likewise.
2244
65da7f14
PP
22452015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2246
2247 * server.c (crc32_table): Delete.
2248 (crc32): Use libiberty's xcrc32 function.
2249
4abd5ed2
JB
22502015-12-22 Joel Brobecker <brobecker@adacore.com>
2251
2252 * lynx-low.c (lynx_delete_thread_callback): New function.
2253 (lynx_mourn): Properly delete our process and all of its
2254 threads. Remove call to clear_inferiors.
2255
0e50fe5c
JB
22562015-12-22 Joel Brobecker <brobecker@adacore.com>
2257
2258 * target.c (thread_search_callback): Add check that
2259 the thread_stopped target callback is not NULL before
2260 calling it.
2261
35adc03f
YQ
22622015-12-21 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2265 arm breakpoint.
2266
bd2b2909
AT
22672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2268
2269 * server.c (handle_query): Call target_supports_software_single_step.
2270
7fe5e27e
AT
22712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2272
2273 * linux-low.c (single_step): New function.
2274 (linux_resume_one_lwp_throw): Call single_step.
2275 (start_step_over): Likewise.
2276
d9311bfa
AT
22772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2278
2279 * Makefile.in (SFILES): Append arch/arm-linux.c,
2280 arch/arm-get-next-pcs.c.
2281 (arm-linux.o): New rule.
2282 (arm-get-next-pcs.o): New rule.
2283 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2284 arm-linux.o.
2285 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2286 to linux-aarch32-low.c.
2287 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2288 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2289 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2290 (thumb2_breakpoint_len): Likewise.
2291 (arm_is_thumb_mode): Make non-static.
2292 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2293 from linux-aarch32-low.c.
2294 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2295 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2296 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2297 (thumb2_breakpoint_len): Likewise.
2298 (arm_is_thumb_mode): New declaration.
2299 * linux-arm-low.c: Include arch/arm-linux.h
2300 aarch/arm-get-next-pcs.h, sys/syscall.h.
2301 (get_next_pcs_ops): New struct.
2302 (get_next_pcs_addr_bits_remove): New function.
2303 (get_next_pcs_is_thumb): New function.
2304 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2305 (arm_sigreturn_next_pc): Likewise.
2306 (get_next_pcs_syscall_next_pc): Likewise.
2307 (arm_gdbserver_get_next_pcs): Likewise.
2308 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2309 Initialize.
2310 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2311 * server.h: Include gdb_vecs.h.
2312
68ce2059
AT
23132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2314
2315 * Makefile.in (SFILES): Append common/common-regcache.c.
2316 (OBS): Append common-regcache.o.
2317 (common-regcache.o): New rule.
2318 * regcache.c (init_register_cache): Initialize cache to
2319 REG_UNAVAILABLE.
2320 (regcache_raw_read_unsigned): New function.
2321 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2322 register_status enum.
2323
fa5308bd
AT
23242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2325
2326 * linux-aarch64-low.c (the_low_targets): Rename
2327 breakpoint_reinsert_addr to get_next_pcs.
2328 * linux-arm-low.c (the_low_targets): Likewise.
2329 * linux-bfin-low.c (the_low_targets): Likewise.
2330 * linux-cris-low.c (the_low_targets): Likewise.
2331 * linux-crisv32-low.c (the_low_targets): Likewise.
2332 * linux-low.c (can_software_single_step): Likewise.
2333 (install_software_single_step_breakpoints): New function.
2334 (start_step_over): Use install_software_single_step_breakpoints.
2335 * linux-low.h: New CORE_ADDR vector.
2336 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2337 get_next_pcs.
2338 * linux-mips-low.c (the_low_targets): Likewise.
2339 * linux-nios2-low.c (the_low_targets): Likewise.
2340 * linux-sparc-low.c (the_low_targets): Likewise.
2341
4a6ed09b
PA
23422015-12-17 Pedro Alves <palves@redhat.com>
2343
2344 * linux-low.c (linux_kill_one_lwp): Remove references to
2345 LinuxThreads.
2346 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2347 to 'kill'.
2348 (linux_init_signals): Delete.
2349 (initialize_low): Adjust.
2350 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2351
7544db95
PA
23522015-12-16 Pedro Alves <palves@redhat.com>
2353
2354 * configure.ac (compiler warning flags): When testing a
2355 -Wno-foo option, check whether -Wfoo works instead.
2356 * configure: Regenerate.
2357
8020350c
DB
23582015-12-11 Don Breazeal <donb@codesourcery.com>
2359
2360 * server.c (process_serial_event): Don't exit from gdbserver
2361 in remote mode if there are still active inferiors.
2362
db91f502
YQ
23632015-12-11 Yao Qi <yao.qi@linaro.org>
2364
2365 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2366 arm_breakpoint_at if the process is 32-bit.
2367
b37a6290
YQ
23682015-12-11 Yao Qi <yao.qi@linaro.org>
2369
2370 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2371 arm breakpoint.
2372
17b1509a
YQ
23732015-12-07 Yao Qi <yao.qi@linaro.org>
2374
2375 * configure.srv: Append arm.o to srv_tgtobj for
2376 aarch64*-*-linux* target.
2377 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2378 from linux-arm-low.c.
2379 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2380 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2381 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2382 (thumb2_breakpoint_len): Likewise.
2383 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2384 (arm_breakpoint_kinds): Likewise.
2385 (arm_breakpoint_kind_from_pc): Likewise.
2386 (arm_sw_breakpoint_from_kind): Likewise.
2387 (arm_breakpoint_kind_from_current_state): Likewise.
2388 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2389 (arm_sw_breakpoint_from_kind): Declare.
2390 (arm_breakpoint_kind_from_current_state): Declare.
2391 (arm_breakpoint_at): Declare.
2392 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2393 arm_sw_breakpoint_from_kind if process is 32-bit.
2394 (aarch64_breakpoint_kind_from_pc): New function.
2395 (aarch64_breakpoint_kind_from_current_state): New function.
2396 (the_low_target): Initialize fields breakpoint_kind_from_pc
2397 and breakpoint_kind_from_current_state.
2398 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2399 linux-aarch32-low.c.
2400 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2401 (arm_breakpoint, arm_breakpoint_len): Likewise.
2402 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2403 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2404 (arm_is_thumb_mode): Likewise.
2405 (arm_breakpoint_at): Likewise.
2406 (arm_breakpoint_kind_from_pc): Likewise.
2407 (arm_sw_breakpoint_from_kind): Likewise.
2408 (arm_breakpoint_kind_from_current_state): Likewise.
2409
2410 Revert:
2411 2015-08-04 Yao Qi <yao.qi@linaro.org>
2412
2413 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2414 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2415 * server.c (extended_protocol): Remove "static".
2416 * server.h (extended_protocol): Declare it.
2417
ece66d65
JS
24182015-12-04 Josh Stone <jistone@redhat.com>
2419
2420 * target.h (struct target_ops) <arch_setup>: Rename to ...
2421 (struct target_ops) <post_create_inferior>: ... this.
2422 (target_arch_setup): Rename to ...
2423 (target_post_create_inferior): ... this, calling post_create_inferior.
2424 * server.c (start_inferior): Update target_arch_setup calls to
2425 target_post_create_inferior.
2426 * linux-low.c (linux_low_ptrace_options): Forward declare.
2427 (linux_arch_setup): Update its comment for general use.
2428 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2429 (struct linux_target_ops): Use linux_post_create_inferior.
2430 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2431 to post_create_inferior.
2432 * nto-low.c (struct nto_target_ops): Likewise.
2433 * spu-low.c (struct spu_target_ops): Likewise.
2434 * win32-low.c (struct win32_target_ops): Likewise.
2435
e58c48b4
AT
24362015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2437
2438 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2439
fbec8956
AT
24402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2441
2442 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2443 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2444 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2445 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2446 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2447 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2448 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2449 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2450 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2451 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2452 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2453 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2454
9b4c5f87
AT
24552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2456
2457 * linux-low.c (linux_look_up_symbols): Don't call
2458 linux_supports_traceclone.
2459 * linux-low.h (thread_db_init): Remove use_events argument.
2460 * thread-db.c (thread_db_use_event): Remove global variable.
2461 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2462 (struct thread_db) <td_create_bp>: Remove field.
2463 (thread_db_create_event): Remove function.
2464 (thread_db_enable_reporting): Likewise.
2465 (find_one_thread): Don't check for thread_db_use_events.
2466 (attach_thread): Likewise.
2467 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2468 (try_thread_db_load_1): Don't check for thread_db_use_events.
2469 (thread_db_init): Remove use_events argument and thread events
2470 handling.
2471 (remove_thread_event_breakpoints): Remove function.
2472 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2473
7d00775e
AT
24742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2475
2476 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2477 New function.
2478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2479 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2480 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2481 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2482 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2483 Initialize.
2484 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2485 New function.
2486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2487 * linux-low.c (can_hardware_single_step): Use
2488 supports_hardware_single_step.
2489 (can_software_single_step): New function.
2490 (start_step_over): Call can_software_single_step.
2491 (linux_supports_hardware_single_step): New function.
2492 (struct target_ops) <supports_software_single_step>: Initialize.
2493 * linux-low.h (struct linux_target_ops)
2494 <supports_hardware_single_step>: Initialize.
2495 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2496 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2497 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2498 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2499 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2500 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2501 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2502 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2503 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2504 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2505 Initialize.
2506 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2507 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2508 Initialize.
2509 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2510 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2511 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2512 New function.
2513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2514 * target.h (struct target_ops): <supports_software_single_step>:
2515 New field.
2516 (target_supports_software_single_step): New macro.
2517
2d97cd35
AT
25182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2519
2520 * linux-low.c (linux_wait_1): Fix pc advance condition.
2521 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2522 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2523
769ef81f
AT
25242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2525
2526 * linux-arm-low.c (arm_is_thumb_mode): New function.
2527 (arm_breakpoint_at): Use arm_is_thumb_mode.
2528 (arm_breakpoint_kind_from_current_state): New function.
2529 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2530 Initialize.
2531 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2532 (linux_breakpoint_kind_from_current_state): New function.
2533 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2534 * linux-low.h (struct linux_target_ops)
2535 <breakpoint_kind_from_current_state>: New field.
2536 * target.h (struct target_ops): Likewise.
2537 (target_breakpoint_kind_from_current_state): New macro.
2538
1bebeeca
PA
25392015-11-30 Pedro Alves <palves@redhat.com>
2540
2541 * linux-low.c (linux_resume): Wake up the event loop before
2542 returning.
2543
a67a9fae
PA
25442015-11-30 Pedro Alves <palves@redhat.com>
2545
2546 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2547 check.
2548 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2549 to -1.
2550 * target.c (struct thread_search): New structure.
2551 (thread_search_callback): New function.
2552 (prev_general_thread): New global.
2553 (prepare_to_access_memory, done_accessing_memory): New functions.
2554 * target.h (prepare_to_access_memory, done_accessing_memory):
2555 Replace macros with function declarations.
2556
f2faf941
PA
25572015-11-30 Pedro Alves <palves@redhat.com>
2558
2559 PR 14618
2560 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2561 report TARGET_WAITKIND_NO_RESUMED.
2562 * remote-utils.c (prepare_resume_reply): Handle
2563 TARGET_WAITKIND_NO_RESUMED.
2564 * server.c (report_no_resumed): New global.
2565 (handle_query) <qSupported>: Handle "no-resumed+". Report
2566 "no-resumed+" support.
2567 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2568 return error if the client doesn't support no-resumed events.
2569 (push_stop_notification): New function.
2570 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2571 events if the client supports them.
2572
a681f9c9
PA
25732015-11-30 Pedro Alves <palves@redhat.com>
2574
2575 * linux-low.c (thread_still_has_status_pending_p): Don't check
2576 vCont;t here.
2577 (lwp_resumed): New function.
2578 (status_pending_p_callback): Return early if the LWP is not
2579 supposed to be resumed.
2580
65706a29
PA
25812015-11-30 Pedro Alves <palves@redhat.com>
2582
2583 * linux-low.c (handle_extended_wait): Assert that the LWP's
2584 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2585 thread create events, leave the new child's status pending.
2586 (linux_low_filter_event): If GDB wants to hear about thread exit
2587 events, leave the LWP marked dead and don't delete it.
2588 (linux_wait_for_event_filtered): Don't check for thread exit.
2589 (filter_exit_event): New function.
2590 (linux_wait_1): Use it, when returning an exit event.
2591 (linux_resume_one_lwp_throw): Assert that the LWP's
2592 waitstatus is TARGET_WAITKIND_IGNORE.
2593 * remote-utils.c (prepare_resume_reply): Handle
2594 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2595 * server.c (report_thread_events): New global.
2596 (handle_general_set): Handle QThreadEvents.
2597 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2598 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2599 TARGET_WAITKIND_THREAD_EXITED.
2600 * server.h (report_thread_events): Declare.
2601
56cf4bed
PA
26022015-11-30 Pedro Alves <palves@redhat.com>
2603
2604 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2605 the thread's last_resume_kind was resume_stop.
2606
500c1d85
PA
26072015-11-30 Pedro Alves <palves@redhat.com>
2608
2609 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2610 before returning.
2611
de979965
PA
26122015-11-30 Pedro Alves <palves@redhat.com>
2613
2614 * server.c (handle_v_requests): Handle vCtrlC.
2615
34c65914
PA
26162015-11-30 Pedro Alves <palves@redhat.com>
2617
2618 * gdbthread.h (find_any_thread_of_pid): Declare.
2619 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2620 functions.
2621 * server.c (handle_query): If current_thread is NULL, look for
2622 another thread of the selected process.
2623
79efa585 26242015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2625 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2626
2627 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2628 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2629 name in reply.
2630 * target.h (struct target_ops) <thread_name>: New field.
2631 (target_thread_name): New macro.
2632
80d82c19
JB
26332015-11-23 Joel Brobecker <brobecker@adacore.com>
2634
2635 * regcache.h (regcache_invalidate_pid): Add declaration.
2636 * regcache.c (regcache_invalidate_pid): New function, extracted
2637 from regcache_invalidate.
2638 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2639 Add trivial documentation comment.
2640 * lynx-low.c: Use regcache_invalidate_pid instead of
2641 regcache_invalidate.
2642
64da5dd5
JB
26432015-11-23 Joel Brobecker <brobecker@adacore.com>
2644
2645 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2646 and Elf64_auxv_t if the target is Android.
2647
37ce4055
DE
26482015-11-22 Doug Evans <xdje42@gmail.com>
2649
2650 * target.h: #include <sys/types.h>.
2651
06e03fff
PA
26522015-11-19 Pedro Alves <palves@redhat.com>
2653
2654 * linux-low.c (linux_process_qsupported): Change prototype.
2655 Adjust.
2656 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2657 Change prototype.
2658 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2659 and adjust to loop over all features.
2660 * server.c (handle_query) <qSupported>: Adjust to call
2661 target_process_qsupported once, passing it a vector of unprocessed
2662 features.
2663 * target.h (struct target_ops) <process_qsupported>: Change
2664 prototype.
2665 (target_process_qsupported): Adjust.
2666
9a084706
PA
26672015-11-19 Pedro Alves <palves@redhat.com>
2668
2669 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2670 mode.
2671 * configure: Regenerate.
2672
dad44a1f
PA
26732015-11-19 Pedro Alves <palves@redhat.com>
2674
2675 * configure: Regenerate.
2676
231c0592
YQ
26772015-11-19 Yao Qi <yao.qi@linaro.org>
2678
2679 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2680 type to uint32_t.
2681
6c1c9a8b
YQ
26822015-11-19 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2685 (struct aarch64_operand): Move enum out.
2686
9caa3311
YQ
26872015-11-19 Yao Qi <yao.qi@linaro.org>
2688
2689 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2690 struct user_fpsimd_state *.
2691 (aarch64_store_fpregset): Likewise.
2692
6a69a054
YQ
26932015-11-19 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2696 struct user_pt_regs *.
2697 (aarch64_store_gregset): Likewise.
2698
1798301e
PA
26992015-11-18 Pedro Alves <palves@redhat.com>
2700
2701 * Makefile.in (all_object_files): Add $IPA_OBJS.
2702
ce7715e2
PA
27032015-11-17 Pedro Alves <palves@redhat.com>
2704
2705 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2706 GDB_SIGNAL_0 and gdb_signal_to_string.
2707
c0879059
PA
27082015-11-17 Pedro Alves <palves@redhat.com>
2709
2710 * win32-low.c (handle_output_debug_string): Remove parameter.
2711 (win32_kill): Remove our_status local and adjust call to
2712 handle_output_debug_string.
2713 (get_child_debug_event): Adjust call to
2714 handle_output_debug_string.
2715
1996e237
SM
27162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2717
2718 * linux-mips-low.c (mips_fill_gregset): Add cast.
2719 (mips_store_gregset): Likewise.
2720 (mips_fill_fpregset): Likewise.
2721 (mips_store_fpregset): Likewise.
2722
cbec665b
SM
27232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2724
2725 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2726 priv.
2727
eb3e3c67
SM
27282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2729
2730 * linux-mips-low.c (mips_linux_new_thread): Change type of
2731 watch_type to enum target_hw_bp_type.
2732
171de4b8
SM
27332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2734
2735 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2736 Change return type to arm_hwbp_type.
2737
04248ead
SM
27382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2739
2740 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2741 (arm_store_gregset): Likewise.
2742 * linux-arm-low.c (arm_get_hwcap): Likewise.
2743 (arm_read_description): Likewise.
2744
04b3479c
SM
27452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2748
2bc84e8a
SM
27492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2750
2751 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2752 (ppc_fill_vsxregset): Likewise.
2753 (ppc_store_vsxregset): Likewise.
2754 (ppc_fill_vrregset): Likewise.
2755 (ppc_store_vrregset): Likewise.
2756 (ppc_fill_evrregset): Likewise.
2757 (ppc_store_evrregset): Likewise.
2758
e6c5bb05
SM
27592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2760
2761 * linux-ppc-low.c (ppc_usrregs_info): Remove
2762 forward-declaration.
2763 (ppc_arch_setup): Move lower in file.
2764
7ea45d72
SM
27652015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2766
2767 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2768 (ps_pdwrite): Likewise.
2769
69291610
HW
27702015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2771
2772 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2773 to after assert checks.
2774
b42945fd
SM
27752015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2776
2777 * proc-service.c (ps_pdread): Add/adjust casts.
2778 (ps_pdwrite): Add/adjust casts.
2779
d6f85c84
SM
27802015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2781
2782 * server.c (handle_search_memory_1): Cast return value of
2783 memmem.
2784
f98cd059
SM
27852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2786
2787 * server.c (write_qxfer_response): Change type of data to
2788 gdb_byte *.
2789
d2412fa5
PA
27902015-10-29 Pedro Alves <palves@redhat.com>
2791
2792 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2793
c17414a2
PA
27942015-10-29 Pedro Alves <palves@redhat.com>
2795
2796 * tracepoint.c (clear_installed_tracepoints): Add casts.
2797
e053fbc4
PA
27982015-10-29 Pedro Alves <palves@redhat.com>
2799
2800 * server.c (handle_v_cont, process_serial_event): Add enum
2801 gdb_signal casts to signal parsing code.
2802
add67df8
PA
28032015-10-29 Pedro Alves <palves@redhat.com>
2804
2805 * linux-low.h (NULL_REGSET): Define.
2806 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2807 * linux-arm-low.c (arm_regsets): Likewise.
2808 * linux-crisv32-low.c (cris_regsets): Likewise.
2809 * linux-m68k-low.c (m68k_regsets): Likewise.
2810 * linux-mips-low.c (mips_regsets): Likewise.
2811 * linux-nios2-low.c (nios2_regsets): Likewise.
2812 * linux-ppc-low.c (ppc_regsets): Likewise.
2813 * linux-s390-low.c (s390_regsets): Likewise.
2814 * linux-sh-low.c (sh_regsets): Likewise.
2815 * linux-sparc-low.c (sparc_regsets): Likewise.
2816 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2817 * linux-tile-low.c (tile_regsets): Likewise.
2818 * linux-x86-low.c (x86_regsets): Likewise.
2819 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2820
50bc912a
PA
28212015-10-29 Pedro Alves <palves@redhat.com>
2822
2823 * linux-low.h (NULL_REGSET): Define.
2824 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2825 * linux-arm-low.c (arm_regsets): Likewise.
2826 * linux-crisv32-low.c (cris_regsets): Likewise.
2827 * linux-m68k-low.c (m68k_regsets): Likewise.
2828 * linux-mips-low.c (mips_regsets): Likewise.
2829 * linux-nios2-low.c (nios2_regsets): Likewise.
2830 * linux-ppc-low.c (ppc_regsets): Likewise.
2831 * linux-s390-low.c (s390_regsets): Likewise.
2832 * linux-sh-low.c (sh_regsets): Likewise.
2833 * linux-sparc-low.c (sparc_regsets): Likewise.
2834 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2835 * linux-tile-low.c (tile_regsets): Likewise.
2836 * linux-x86-low.c (x86_regsets): Likewise.
2837 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2838
682b2546
DE
28392015-10-26 Doug Evans <dje@google.com>
2840
2841 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2842
963843d4
DE
28432015-10-26 Doug Evans <dje@google.com>
2844
2845 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2846
d41401ac
DE
28472015-10-26 Doug Evans <dje@google.com>
2848
2849 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2850 for debug_printf.
2851 (attach_thread, find_new_threads_callback): Ditto.
2852
3db28855
AT
28532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2854
2855 * mem-break.h (set_breakpoint_data): Remove.
2856
fb78e89c
AT
28572015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2858
2859 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2860 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2861 (initialize_low): Remove set_breakpoint_data call.
2862 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2863 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2864 (initialize_low): Remove set_breakpoint_data call.
2865 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2866 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2867 (initialize_low): Remove set_breakpoint_data call.
2868
2e6ee069
AT
28692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2872 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2873 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2874 * target.h (target_breakpoint_kind_from_pc): New macro.
2875
1652a986
AT
28762015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2877
2878 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2879 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2880 the default breakpoint kind.
2881
abeead09
AT
28822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2883
2884 * linux-arm-low.c (arm_supports_z_point_type): Add software
2885 breakpoint support.
2886
b0b4b501
AT
28872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2888
2889 * linux-arm-low.c: Refactor breakpoint definitions.
2890 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2891 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2892
8689682c
AT
28932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2894
2895 * Makefile.in: Add arm.c/o.
2896 * configure.srv: Likewise.
2897 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2898 (arm_breakpoint_kind_from_pc): New function.
2899 (arm_sw_breakpoint_from_kind): Return proper kind.
2900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2901
27165294
AT
29022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2903
2904 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2905 removal.
2906 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2907 (struct raw_breakpoint) <size>: Remove.
2908 (struct raw_breakpoint) <kind>: Add.
2909 (bp_size): New function.
2910 (bp_opcode): Likewise.
2911 (find_raw_breakpoint_at): Adjust for kind.
2912 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2913 (remove_memory_breakpoint): Adjust for kind call bp_size.
2914 (set_raw_breakpoint_at): Adjust for kind.
2915 (set_breakpoint): Likewise.
2916 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2917 (delete_raw_breakpoint): Adjust for kind.
2918 (delete_breakpoint): Likewise.
2919 (find_gdb_breakpoint): Likewise.
2920 (set_gdb_breakpoint_1): Likewise.
2921 (set_gdb_breakpoint): Likewise.
2922 (delete_gdb_breakpoint_1): Likewise.
2923 (delete_gdb_breakpoint): Likewise.
2924 (uninsert_raw_breakpoint): Likewise.
2925 (reinsert_raw_breakpoint): Likewise.
2926 (set_breakpoint_data): Remove.
2927 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2928 (check_mem_read): Adjust for kind call bp_size.
2929 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2930 (clone_one_breakpoint): Adjust for kind.
2931 * mem-break.h (set_gdb_breakpoint): Likewise.
2932 (delete_gdb_breakpoint): Likewise.
2933 * server.c (process_serial_event): Likewise.
2934
dd373349
AT
29352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2936
2937 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2943 (arm_sw_breakpoint_from_kind): New function.
2944 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2945 (struct linux_target_ops) <breakpoint>: Remove.
2946 (struct linux_target_ops) <breakpoint_len>: Remove.
2947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2949 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2950 (struct linux_target_ops) <breakpoint>: Remove.
2951 (struct linux_target_ops) <breakpoint_len>: Remove.
2952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2954 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2955 (struct linux_target_ops) <breakpoint>: Remove.
2956 (struct linux_target_ops) <breakpoint_len>: Remove.
2957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2959 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2960 and sw_breakpoint_from_kind to increment the pc.
2961 (linux_breakpoint_kind_from_pc): New function.
2962 (linux_sw_breakpoint_from_kind): New function.
2963 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2964 (initialize_low): Call breakpoint_kind_from_pc and
2965 sw_breakpoint_from_kind to replace breakpoint_data/len.
2966 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2967 New field.
2968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2969 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2970 (struct linux_target_ops) <breakpoint>: Remove.
2971 (struct linux_target_ops) <breakpoint_len>: Remove.
2972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2974 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2975 (struct linux_target_ops) <breakpoint>: Remove.
2976 (struct linux_target_ops) <breakpoint_len>: Remove.
2977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2979 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2980 (struct linux_target_ops) <breakpoint>: Remove.
2981 (struct linux_target_ops) <breakpoint_len>: Remove.
2982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2984 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2985 (struct linux_target_ops) <breakpoint>: Remove.
2986 (struct linux_target_ops) <breakpoint_len>: Remove.
2987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2989 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2990 (struct linux_target_ops) <breakpoint>: Remove.
2991 (struct linux_target_ops) <breakpoint_len>: Remove.
2992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2994 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2995 (struct linux_target_ops) <breakpoint>: Remove.
2996 (struct linux_target_ops) <breakpoint_len>: Remove.
2997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2999 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3000 (struct linux_target_ops) <breakpoint>: Remove.
3001 (struct linux_target_ops) <breakpoint_len>: Remove.
3002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3004 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3005 (struct linux_target_ops) <breakpoint>: Remove.
3006 (struct linux_target_ops) <breakpoint_len>: Remove.
3007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3009 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3010 (struct linux_target_ops) <breakpoint>: Remove.
3011 (struct linux_target_ops) <breakpoint_len>: Remove.
3012 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3013 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3014 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3015 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3016 (struct linux_target_ops) <breakpoint>: Remove.
3017 (struct linux_target_ops) <breakpoint_len>: Remove.
3018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3020 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3021 (struct linux_target_ops) <breakpoint>: Remove.
3022 (struct linux_target_ops) <breakpoint_len>: Remove.
3023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3025
4cd98a19
AT
30262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3027
3028 * linux-cris-low.c (cris_get_pc): Remove void arg.
3029
774ee6d2
AR
30302015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3031
3032 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3033 variable name.
3034
833dcd29
AR
30352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3036
3037 * inferiors.c (thread_pid_matches_callback): New function.
3038 (find_thread_process): New function.
3039 (remove_thread): Reset current_thread.
3040 (remove_process): Assert threads have been removed first.
3041
8d689ee5
YQ
30422015-10-15 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3045 if it is 3.
3046 (aarch64_remove_point): Likewise.
3047 * regcache.c (regcache_register_size): New function.
3048
1c2e1515
YQ
30492015-10-12 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-aarch64-low.c: Update all callers as emit_load_store
3052 is renamed to aarch64_emit_load_store.
3053
e1c587c3
YQ
30542015-10-12 Yao Qi <yao.qi@linaro.org>
3055
3056 * linux-aarch64-low.c: Update all callers of function renaming
3057 from emit_insn to aarch64_emit_insn.
3058
b6542f81
YQ
30592015-10-12 Yao Qi <yao.qi@linaro.org>
3060
3061 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3062 arch/aarch64-insn.h.
3063 (struct aarch64_memory_operand): Likewise.
3064 (ENCODE): Likewise.
3065 (emit_insn): Move to arch/aarch64-insn.c.
3066 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3067 (emit_load_store): Move to arch/aarch64-insn.c.
3068 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3069 (can_encode_int32): Remove.
3070
246994ce
YQ
30712015-10-12 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3074 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3075 (aarch64_relocate_instruction): Likewise.
3076 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3077 (struct aarch64_insn_visitor): Likewise.
3078
0badd99f
YQ
30792015-10-12 Yao Qi <yao.qi@linaro.org>
3080
3081 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3082 (struct aarch64_insn_visitor): New.
3083 (struct aarch64_insn_relocation_data): New.
3084 (aarch64_ftrace_insn_reloc_b): New function.
3085 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3086 (aarch64_ftrace_insn_reloc_cb): Likewise.
3087 (aarch64_ftrace_insn_reloc_tb): Likewise.
3088 (aarch64_ftrace_insn_reloc_adr): Likewise.
3089 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3090 (aarch64_ftrace_insn_reloc_others): Likewise.
3091 (visitor): New.
3092 (aarch64_relocate_instruction): Use visitor.
3093
dfaffe9d
YQ
30942015-10-12 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3097 int. Add argument buf.
3098 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3099 aarch64_relocate_instruction.
3100
70b439f0
YQ
31012015-10-12 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3104 argument insn. Remove local variable insn. Don't call
3105 target_read_uint32.
3106 (aarch64_install_fast_tracepoint_jump_pad): Call
3107 target_read_uint32.
3108
7781c06f
YQ
31092015-09-30 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3112 (emit_load_store_pair): Likewise.
3113
9a3c8263
SM
31142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3115
3116 * dll.c (match_dll): Add cast(s).
3117 (unloaded_dll): Likewise.
3118 * linux-low.c (second_thread_of_pid_p): Likewise.
3119 (delete_lwp_callback): Likewise.
3120 (count_events_callback): Likewise.
3121 (select_event_lwp_callback): Likewise.
3122 (linux_set_resume_request): Likewise.
3123 * server.c (accumulate_file_name_length): Likewise.
3124 (emit_dll_description): Likewise.
3125 (handle_qxfer_threads_worker): Likewise.
3126 (visit_actioned_threads): Likewise.
3127 * thread-db.c (any_thread_of): Likewise.
3128 * tracepoint.c (same_process_p): Likewise.
3129 (match_blocktype): Likewise.
3130 (build_traceframe_info_xml): Likewise.
3131
224c3ddb
SM
31322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3133
3134 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3135 assignment.
3136 (gdb_unparse_agent_expr): Likewise.
3137 * hostio.c (require_data): Likewise.
3138 (handle_pread): Likewise.
3139 * linux-low.c (disable_regset): Likewise.
3140 (fetch_register): Likewise.
3141 (store_register): Likewise.
3142 (get_dynamic): Likewise.
3143 (linux_qxfer_libraries_svr4): Likewise.
3144 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3145 (set_fast_tracepoint_jump): Likewise.
3146 (uninsert_fast_tracepoint_jumps_at): Likewise.
3147 (reinsert_fast_tracepoint_jumps_at): Likewise.
3148 (validate_inserted_breakpoint): Likewise.
3149 (clone_agent_expr): Likewise.
3150 * regcache.c (init_register_cache): Likewise.
3151 * remote-utils.c (putpkt_binary_1): Likewise.
3152 (decode_M_packet): Likewise.
3153 (decode_X_packet): Likewise.
3154 (look_up_one_symbol): Likewise.
3155 (relocate_instruction): Likewise.
3156 (monitor_output): Likewise.
3157 * server.c (handle_search_memory): Likewise.
3158 (handle_qxfer_exec_file): Likewise.
3159 (handle_qxfer_libraries): Likewise.
3160 (handle_qxfer): Likewise.
3161 (handle_query): Likewise.
3162 (handle_v_cont): Likewise.
3163 (handle_v_run): Likewise.
3164 (captured_main): Likewise.
3165 * target.c (write_inferior_memory): Likewise.
3166 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3167 * tracepoint.c (init_trace_buffer): Likewise.
3168 (add_tracepoint_action): Likewise.
3169 (add_traceframe): Likewise.
3170 (add_traceframe_block): Likewise.
3171 (cmd_qtdpsrc): Likewise.
3172 (cmd_qtdv): Likewise.
3173 (cmd_qtstatus): Likewise.
3174 (response_source): Likewise.
3175 (response_tsv): Likewise.
3176 (cmd_qtnotes): Likewise.
3177 (gdb_collect): Likewise.
3178 (initialize_tracepoint): Likewise.
3179
afbe19f8
PL
31802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3181
3182 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3183 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3184 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3185 <NOP>: New.
3186 (enum aarch64_condition_codes): New enum.
3187 (w0): New static global.
3188 (fp): Likewise.
3189 (lr): Likewise.
3190 (struct aarch64_memory_operand) <type>: New
3191 MEMORY_OPERAND_POSTINDEX type.
3192 (postindex_memory_operand): New helper function.
3193 (emit_ret): New function.
3194 (emit_load_store_pair): New function, factored out of emit_stp
3195 with support for MEMORY_OPERAND_POSTINDEX.
3196 (emit_stp): Rewrite using emit_load_store_pair.
3197 (emit_ldp): New function.
3198 (emit_load_store): Likewise.
3199 (emit_ldr): Mention post-index instruction in comment.
3200 (emit_ldrh): New function.
3201 (emit_ldrb): New function.
3202 (emit_ldrsw): Mention post-index instruction in comment.
3203 (emit_str): Likewise.
3204 (emit_subs): New function.
3205 (emit_cmp): Likewise.
3206 (emit_and): Likewise.
3207 (emit_orr): Likewise.
3208 (emit_orn): Likewise.
3209 (emit_eor): Likewise.
3210 (emit_mvn): Likewise.
3211 (emit_lslv): Likewise.
3212 (emit_lsrv): Likewise.
3213 (emit_asrv): Likewise.
3214 (emit_mul): Likewise.
3215 (emit_sbfm): Likewise.
3216 (emit_sbfx): Likewise.
3217 (emit_ubfm): Likewise.
3218 (emit_ubfx): Likewise.
3219 (emit_csinc): Likewise.
3220 (emit_cset): Likewise.
3221 (emit_nop): Likewise.
3222 (emit_ops_insns): New helper function.
3223 (emit_pop): Likewise.
3224 (emit_push): Likewise.
3225 (aarch64_emit_prologue): New function.
3226 (aarch64_emit_epilogue): Likewise.
3227 (aarch64_emit_add): Likewise.
3228 (aarch64_emit_sub): Likewise.
3229 (aarch64_emit_mul): Likewise.
3230 (aarch64_emit_lsh): Likewise.
3231 (aarch64_emit_rsh_signed): Likewise.
3232 (aarch64_emit_rsh_unsigned): Likewise.
3233 (aarch64_emit_ext): Likewise.
3234 (aarch64_emit_log_not): Likewise.
3235 (aarch64_emit_bit_and): Likewise.
3236 (aarch64_emit_bit_or): Likewise.
3237 (aarch64_emit_bit_xor): Likewise.
3238 (aarch64_emit_bit_not): Likewise.
3239 (aarch64_emit_equal): Likewise.
3240 (aarch64_emit_less_signed): Likewise.
3241 (aarch64_emit_less_unsigned): Likewise.
3242 (aarch64_emit_ref): Likewise.
3243 (aarch64_emit_if_goto): Likewise.
3244 (aarch64_emit_goto): Likewise.
3245 (aarch64_write_goto_address): Likewise.
3246 (aarch64_emit_const): Likewise.
3247 (aarch64_emit_call): Likewise.
3248 (aarch64_emit_reg): Likewise.
3249 (aarch64_emit_pop): Likewise.
3250 (aarch64_emit_stack_flush): Likewise.
3251 (aarch64_emit_zero_ext): Likewise.
3252 (aarch64_emit_swap): Likewise.
3253 (aarch64_emit_stack_adjust): Likewise.
3254 (aarch64_emit_int_call_1): Likewise.
3255 (aarch64_emit_void_call_2): Likewise.
3256 (aarch64_emit_eq_goto): Likewise.
3257 (aarch64_emit_ne_goto): Likewise.
3258 (aarch64_emit_lt_goto): Likewise.
3259 (aarch64_emit_le_goto): Likewise.
3260 (aarch64_emit_gt_goto): Likewise.
3261 (aarch64_emit_ge_got): Likewise.
3262 (aarch64_emit_ops_impl): New static global variable.
3263 (aarch64_emit_ops): New target function, return
3264 &aarch64_emit_ops_impl.
3265 (struct linux_target_ops): Install it.
3266
bb903df0
PL
32672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3268
3269 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3270 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3271 aarch64-ipa.o.
3272 * linux-aarch64-ipa.c: New file.
3273 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3274 and endian.h.
3275 (aarch64_get_thread_area): New target method.
3276 (extract_signed_bitfield): New helper function.
3277 (aarch64_decode_ldr_literal): New function.
3278 (enum aarch64_opcodes): New enum.
3279 (struct aarch64_register): New struct.
3280 (struct aarch64_operand): New struct.
3281 (x0): New static global.
3282 (x1): Likewise.
3283 (x2): Likewise.
3284 (x3): Likewise.
3285 (x4): Likewise.
3286 (w2): Likewise.
3287 (ip0): Likewise.
3288 (sp): Likewise.
3289 (xzr): Likewise.
3290 (aarch64_register): New helper function.
3291 (register_operand): Likewise.
3292 (immediate_operand): Likewise.
3293 (struct aarch64_memory_operand): New struct.
3294 (offset_memory_operand): New helper function.
3295 (preindex_memory_operand): Likewise.
3296 (enum aarch64_system_control_registers): New enum.
3297 (ENCODE): New macro.
3298 (emit_insn): New helper function.
3299 (emit_b): New function.
3300 (emit_bcond): Likewise.
3301 (emit_cb): Likewise.
3302 (emit_tb): Likewise.
3303 (emit_blr): Likewise.
3304 (emit_stp): Likewise.
3305 (emit_ldp_q_offset): Likewise.
3306 (emit_stp_q_offset): Likewise.
3307 (emit_load_store): Likewise.
3308 (emit_ldr): Likewise.
3309 (emit_ldrsw): Likewise.
3310 (emit_str): Likewise.
3311 (emit_ldaxr): Likewise.
3312 (emit_stxr): Likewise.
3313 (emit_stlr): Likewise.
3314 (emit_data_processing_reg): Likewise.
3315 (emit_data_processing): Likewise.
3316 (emit_add): Likewise.
3317 (emit_sub): Likewise.
3318 (emit_mov): Likewise.
3319 (emit_movk): Likewise.
3320 (emit_mov_addr): Likewise.
3321 (emit_mrs): Likewise.
3322 (emit_msr): Likewise.
3323 (emit_sevl): Likewise.
3324 (emit_wfe): Likewise.
3325 (append_insns): Likewise.
3326 (can_encode_int32_in): New helper function.
3327 (aarch64_relocate_instruction): New function.
3328 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3329 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3330 (struct linux_target_ops): Install aarch64_get_thread_area,
3331 aarch64_install_fast_tracepoint_jump_pad and
3332 aarch64_get_min_fast_tracepoint_insn_len.
3333
787749ea
PL
33342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3335
3336 * Makefile.in (aarch64-insn.o): New rule.
3337 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3338
9812b2e6
YQ
33392015-09-21 Yao Qi <yao.qi@linaro.org>
3340
3341 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3342
18fe412b
YQ
33432015-09-21 Yao Qi <yao.qi@linaro.org>
3344
3345 * tracepoint.c (max_jump_pad_size): Remove.
3346
a0cc84cd
YQ
33472015-09-18 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-aarch64-low.c: Don't include sys/uio.h.
3350 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3351
d78908cf
WW
33522015-09-16 Wei-cheng Wang <cole945@gmail.com>
3353
3354 * tracepoint.c (eval_result_type): Change prototype.
3355 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3356
d57e0d50
PA
33572015-09-15 Pedro Alves <palves@redhat.com>
3358
3359 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3360 Check whether to report exec events instead of checking whether
3361 multiprocess is enabled.
3362
5a676acc
PA
33632015-09-15 Pedro Alves <palves@redhat.com>
3364
3365 PR remote/18965
3366 * remote-utils.c (prepare_resume_reply): Merge
3367 TARGET_WAITKIND_VFORK_DONE switch case with the
3368 TARGET_WAITKIND_FORKED case.
3369
7c5d0fad
YQ
33702015-09-15 Yao Qi <yao.qi@linaro.org>
3371
3372 * server.c (handle_query): Check string comparison using
3373 "else if" instead of "if".
3374
750ce8d1
YQ
33752015-09-15 Yao Qi <yao.qi@linaro.org>
3376
3377 * server.c (vCont_supported): New global variable.
3378 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3379 matches. Append ";vContSupported+" to own_buf.
3380 (handle_v_requests): Append ";s;S" to own_buf if target supports
3381 hardware single step or vCont_supported is false.
3382 (capture_main): Set vCont_supported to zero.
3383
70b90b91
YQ
33842015-09-15 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3387 it to ...
3388 (linux_supports_hardware_single_step): ... New function.
3389 (linux_target_ops): Update.
3390 * lynx-low.c (lynx_target_ops): Set field
3391 supports_hardware_single_step to target_can_do_hardware_single_step.
3392 * nto-low.c (nto_target_ops): Likewise.
3393 * spu-low.c (spu_target_ops): Likewise.
3394 * win32-low.c (win32_target_ops): Likewise.
3395 * target.c (target_can_do_hardware_single_step): New function.
3396 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3397 Remove. <supports_hardware_single_step>: New field.
3398 (target_supports_conditional_breakpoints): Remove.
3399 (target_supports_hardware_single_step): New macro.
3400 (target_can_do_hardware_single_step): Declare.
3401 * server.c (handle_query): Use target_supports_hardware_single_step
3402 instead of target_supports_conditional_breakpoints.
3403
ade90bde
YQ
34042015-09-15 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3407 function.
3408 (struct linux_target_ops the_low_target): Install
3409 aarch64_linux_siginfo_fixup.
3410
94585166
DB
34112015-09-11 Don Breazeal <donb@codesourcery.com>
3412 Luis Machado <lgustavo@codesourcery.com>
3413
3414 * linux-low.c (linux_mourn): Static declaration.
3415 (linux_arch_setup): Move in front of
3416 handle_extended_wait.
3417 (linux_arch_setup_thread): New function.
3418 (handle_extended_wait): Handle exec events. Call
3419 linux_arch_setup_thread. Make event_lwp argument a
3420 pointer-to-a-pointer.
3421 (check_zombie_leaders): Do not check stopped threads.
3422 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3423 (linux_low_filter_event): Add lwp and thread for exec'ing
3424 non-leader thread if leader thread has been deleted.
3425 Refactor code into linux_arch_setup_thread and call it.
3426 Pass child lwp pointer by reference to handle_extended_wait.
3427 (linux_wait_for_event_filtered): Update comment.
3428 (linux_wait_1): Prevent clobbering exec event status.
3429 (linux_supports_exec_events): New function.
3430 (linux_target_ops) <supports_exec_events>: Initialize new member.
3431 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3432 new member.
3433 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3434 * server.c (report_exec_events): New global variable.
3435 (handle_query): Handle qSupported query for exec-events feature.
3436 (captured_main): Initialize report_exec_events.
3437 * server.h (report_exec_events): Declare new global variable.
3438 * target.h (struct target_ops) <supports_exec_events>: New
3439 member.
3440 (target_supports_exec_events): New macro.
3441 * win32-low.c (win32_target_ops) <supports_exec_events>:
3442 Initialize new member.
3443
0568462b
MM
34442015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3445
3446 * linux-low.c (linux_low_enable_btrace): Remove.
3447 (linux_target_ops): Replace linux_low_enable_btrace with
3448 linux_enable_btrace.
3449
39edd165
YQ
34502015-09-03 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-aarch64-low.c (aarch64_insert_point): Call
3453 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3454 returns true.
3455
1db33b5a
UW
34562015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3457
3458 * linux-low.c (check_stopped_by_breakpoint): Use
3459 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3460
ab290430
PA
34612015-08-27 Pedro Alves <palves@redhat.com>
3462
3463 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3464
8d749320
SM
34652015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3466
6711b7f8
SM
3467 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3468 the XNEW-family equivalent.
8d749320
SM
3469 (compile_bytecodes): Likewise.
3470 * dll.c (loaded_dll): Likewise.
3471 * event-loop.c (append_callback_event): Likewise.
3472 (create_file_handler): Likewise.
3473 (create_file_event): Likewise.
3474 * hostio.c (handle_open): Likewise.
3475 * inferiors.c (add_thread): Likewise.
3476 (add_process): Likewise.
3477 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3478 * linux-arm-low.c (arm_new_process): Likewise.
3479 (arm_new_thread): Likewise.
3480 * linux-low.c (add_to_pid_list): Likewise.
3481 (linux_add_process): Likewise.
3482 (handle_extended_wait): Likewise.
3483 (add_lwp): Likewise.
3484 (enqueue_one_deferred_signal): Likewise.
3485 (enqueue_pending_signal): Likewise.
3486 (linux_resume_one_lwp_throw): Likewise.
3487 (linux_resume_one_thread): Likewise.
3488 (linux_read_memory): Likewise.
3489 (linux_write_memory): Likewise.
3490 * linux-mips-low.c (mips_linux_new_process): Likewise.
3491 (mips_linux_new_thread): Likewise.
3492 (mips_add_watchpoint): Likewise.
3493 * linux-x86-low.c (initialize_low_arch): Likewise.
3494 * lynx-low.c (lynx_add_process): Likewise.
3495 * mem-break.c (set_raw_breakpoint_at): Likewise.
3496 (set_breakpoint): Likewise.
3497 (add_condition_to_breakpoint): Likewise.
3498 (add_commands_to_breakpoint): Likewise.
3499 (clone_agent_expr): Likewise.
3500 (clone_one_breakpoint): Likewise.
3501 * regcache.c (new_register_cache): Likewise.
3502 * remote-utils.c (look_up_one_symbol): Likewise.
3503 * server.c (queue_stop_reply): Likewise.
3504 (start_inferior): Likewise.
3505 (queue_stop_reply_callback): Likewise.
3506 (handle_target_event): Likewise.
3507 * spu-low.c (fetch_ppc_memory): Likewise.
3508 (store_ppc_memory): Likewise.
3509 * target.c (set_target_ops): Likewise.
3510 * thread-db.c (thread_db_load_search): Likewise.
3511 (try_thread_db_load_1): Likewise.
3512 * tracepoint.c (add_tracepoint): Likewise.
3513 (add_tracepoint_action): Likewise.
3514 (create_trace_state_variable): Likewise.
3515 (cmd_qtdpsrc): Likewise.
3516 (cmd_qtro): Likewise.
3517 (add_while_stepping_state): Likewise.
3518 * win32-low.c (child_add_thread): Likewise.
3519 (get_image_name): Likewise.
3520
ed8b7b42
YQ
35212015-08-25 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3524
db3cb7cb
YQ
35252015-08-25 Yao Qi <yao.qi@linaro.org>
3526
3527 * Makefile.in (aarch64-linux.o): New rule.
3528 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3529 srv_tgtobj.
3530 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3531 (aarch64_init_debug_reg_state): Make it extern.
3532 (aarch64_linux_prepare_to_resume): Remove.
3533
f6011a1c
YQ
35342015-08-25 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3537 lwp_arch_private_info and ptid_of_lwp.
3538
88e2cf7e
YQ
35392015-08-25 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3542 Find proc_info by find_process_pid. All callers updated.
3543
5e35436e
YQ
35442015-08-25 Yao Qi <yao.qi@linaro.org>
3545
3546 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3547 Remove.
3548 (debug_reg_change_callback): Remove.
3549 (aarch64_notify_debug_reg_change): Remove.
3550
4a8a7965
YQ
35512015-08-25 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3554 Call current_lwp_ptid.
3555
32a271ee
YQ
35562015-08-25 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-aarch64-low.c (debug_reg_change_callback): Use
3559 debug_printf.
3560
0d51c8d7
YQ
35612015-08-25 Yao Qi <yao.qi@linaro.org>
3562
3563 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3564
31a43dd5
YQ
35652015-08-25 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3568
8ee52567
YQ
35692015-08-25 Yao Qi <yao.qi@linaro.org>
3570
3571 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3572 the code.
3573
ff3f0f45
YQ
35742015-08-25 Yao Qi <yao.qi@linaro.org>
3575
3576 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3577 Remove.
3578 (debug_reg_change_callback): Remove argument entry and add argument
3579 lwp. Remove local variable thread. Don't print thread id in the
3580 debugging output. Don't check whether pid of thread equals to pid.
3581 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3582 iterate_over_lwps instead find_inferior.
3583
3d40fbb5
PA
35842015-08-24 Pedro Alves <palves@redhat.com>
3585
3586 * inferiors.c (get_first_process): New function.
3587 * inferiors.h (get_first_process): New declaration.
3588 * remote-utils.c (read_ptid): Default to the first process in the
3589 list, instead of to the current thread's process.
3590
438e1e42
PA
35912015-08-24 Pedro Alves <palves@redhat.com>
3592
3593 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3594 * event-loop.c: Likewise.
3595 * remote-utils.c: Likewise.
3596 * tracepoint.c: Likewise.
3597
a8c6d4fc
PA
35982015-08-24 Pedro Alves <palves@redhat.com>
3599
3600 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3601 ptid_get_lwp.
3602
99b0bb12
PA
36032015-08-21 Pedro Alves <palves@redhat.com>
3604
3605 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3606 instead of literal 1.
3607
f8904751
PA
36082015-08-21 Pedro Alves <palves@redhat.com>
3609
3610 * tdesc.c (default_description): Explicitly zero-initialize.
3611
465a859e
PA
36122015-08-21 Pedro Alves <palves@redhat.com>
3613
3614 PR gdb/18749
3615 * inferiors.c (remove_thread): Discard any pending stop reply for
3616 this thread.
3617 * server.c (remove_all_on_match_pid): Rename to ...
3618 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3619 instead of a pid.
3620 (discard_queued_stop_replies): Change parameter to a ptid. Now
3621 extern.
3622 (handle_v_kill, kill_inferior_callback, captured_main)
3623 (process_serial_event): Adjust.
3624 * server.h (discard_queued_stop_replies): Declare.
3625
f0db101d
PA
36262015-08-21 Pedro Alves <palves@redhat.com>
3627
3628 * linux-low.c (wait_for_sigstop): Always switch to no thread
3629 selected if the previously current thread dies.
3630 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3631 process instead of the current thread's.
3632 * remote-utils.c (input_interrupt): Don't check if there's no
3633 current thread.
3634 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3635 current thread to the general thread fails, error out.
3636 (handle_qxfer_auxv, handle_qxfer_libraries)
3637 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3638 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3639 (handle_query): Check if there's a thread selected instead of
3640 checking whether there's any thread in the thread list.
3641 (handle_qxfer_threads, handle_qxfer_btrace)
3642 (handle_qxfer_btrace_conf): Don't error out early if there's no
3643 thread in the thread list.
3644 (handle_v_cont, myresume): Don't set the current thread to the
3645 continue thread.
3646 (process_serial_event) <Hg handling>: Also set thread_id if the
3647 previous general thread is still alive.
3648 (process_serial_event) <g/G handling>: If setting the current
3649 thread to the general thread fails, error out.
3650 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3651 thread's lwp instead of the current thread's.
3652 * target.c (set_desired_thread): If the desired thread was not
3653 found, leave the current thread pointing to NULL. Return an int
3654 (boolean) indicating success.
3655 * target.h (set_desired_thread): Change return type to int.
3656
40045d91
MF
36572015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3658
3659 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3660 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3661 #includes.
3662 (ps_get_thread_area): New function.
3663
45face3b
GB
36642015-08-19 Gary Benson <gbenson@redhat.com>
3665
3666 * hostio.c (handle_pread): Do not attempt to read more data
3667 than hostio_reply_with_data can fit in a packet.
3668
16d5f642
JB
36692015-08-18 Joel Brobecker <brobecker@adacore.com>
3670
3671 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3672
a738da3a
MF
36732015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3674
3675 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3676
33ebda9d
PA
36772015-08-06 Pedro Alves <palves@redhat.com>
3678
3679 * tracepoint.c (expr_eval_result): Now an int.
3680
a44892be
PA
36812015-08-06 Pedro Alves <palves@redhat.com>
3682
3683 * gdbthread.h (struct regcache): Forward declare.
3684 (struct thread_info) <regcache_data>: Now a struct regcache
3685 pointer.
3686 * inferiors.c (inferior_regcache_data)
3687 (set_inferior_regcache_data): Now work with struct regcache
3688 pointers.
3689 * inferiors.h (struct regcache): Forward declare.
3690 (inferior_regcache_data, set_inferior_regcache_data): Now work
3691 with struct regcache pointers.
3692 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3693 (free_register_cache_thread): Remove struct regcache pointer
3694 casts.
3695
608a1e46
PA
36962015-08-06 Pedro Alves <palves@redhat.com>
3697
3698 * server.c (captured_main): On error, print the exception message
3699 to stderr, and if run_once is set, throw a quit.
3700
f0ce0d3a
PA
37012015-08-06 Pedro Alves <palves@redhat.com>
3702
3703 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3704 the current thread.
3705
bf47e248
PA
37062015-08-06 Pedro Alves <palves@redhat.com>
3707
3708 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3709 reading beyond the passed in buffer length.
3710
b6b9ffcc
PL
37112015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3712
3713 * tracepoint.c (symbol_list) <required>: Remove.
3714
863d01bd
PA
37152015-08-06 Pedro Alves <palves@redhat.com>
3716
3717 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3718 count if stopping and suspending threads.
3719 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3720 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3721 (linux_detach): Complete an ongoing step-over.
3722 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3723 throughout.
3724 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3725 (linux_wait_1): If passing a signal to the inferior after
3726 finishing a step-over, unsuspend and re-resume all lwps. If we
3727 see a single-step event but the thread should be continuing, don't
3728 pass the trap to gdb.
3729 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3730 internal_error instead of gdb_assert.
3731 (enqueue_pending_signal): New function.
3732 (check_ptrace_stopped_lwp_gone): Add debug output.
3733 (start_step_over): Use internal_error instead of gdb_assert.
3734 (complete_ongoing_step_over): New function.
3735 (linux_resume_one_thread): Don't resume a suspended thread.
3736 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3737 it stepping.
3738
00db26fa
PA
37392015-08-06 Pedro Alves <palves@redhat.com>
3740
3741 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3742 (linux_thread_alive): Use lwp_is_marked_dead.
3743 (extended_event_reported): Delete.
3744 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3745 instead of extended_event_reported.
3746 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3747 as well.
3748 (lwp_is_marked_dead): New function.
3749 (lwp_running): Use lwp_is_marked_dead.
3750 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3751 comment.
3752
ad071a30
PA
37532015-08-06 Pedro Alves <palves@redhat.com>
3754
3755 * linux-low.c (linux_wait_1): Move fork event output out of the
3756 !report_to_gdb check. Pass event_child->waitstatus to
3757 target_waitstatus_to_string instead of ourstatus.
3758
524b57e6
YQ
37592015-08-04 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3762 if current_thread is 32 bit.
3763
6085d6f6
YQ
37642015-08-04 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3767 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3768 * server.c (extended_protocol): Remove "static".
3769 * server.h (extended_protocol): Declare it.
3770
8a7e4587
YQ
37712015-08-04 Yao Qi <yao.qi@linaro.org>
3772
3773 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3774 both aarch64 and aarch32.
3775 (aarch64_set_pc): Likewise.
3776
3b53ae99
YQ
37772015-08-04 Yao Qi <yao.qi@linaro.org>
3778
3779 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3780 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3781 arm-with-neon.xml to srv_xmlfiles.
3782 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3783 (is_64bit_tdesc): New function.
3784 (aarch64_linux_read_description): New function.
3785 (aarch64_arch_setup): Call aarch64_linux_read_description.
3786 (regs_info): Rename to regs_info_aarch64.
3787 (aarch64_regs_info): Return right regs_info.
3788 (initialize_low_arch): Call initialize_low_arch_aarch32.
3789
bd9e6534
YQ
37902015-08-04 Yao Qi <yao.qi@linaro.org>
3791
3792 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3793 * linux-aarch32-low.c: New file.
3794 * linux-aarch32-low.h: New file.
3795 * linux-arm-low.c (arm_fill_gregset): Move it to
3796 linux-aarch32-low.c.
3797 (arm_store_gregset): Likewise.
3798 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3799 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3800 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3801 (regs_info): Rename to regs_info_arm.
3802 (arm_regs_info): Return regs_info_aarch32 if
3803 have_ptrace_getregset is 1 and target description is
3804 arm_with_neon or arm_with_vfpv3.
3805 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3806 Call initialize_low_arch_aarch32 instead.
3807
ded48a5e
YQ
38082015-08-04 Yao Qi <yao.qi@linaro.org>
3809
3810 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3811 * linux-low.c: ... here.
3812 * linux-low.h (have_ptrace_getregset): Declare it.
3813
96e9210f
PA
38142015-08-04 Pedro Alves <palves@redhat.com>
3815
3816 * thread-db.c (struct thread_db): Use new typedefs.
3817 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3818 CHK calls.
3819 (disable_thread_event_reporting): Cast result of dlsym to
3820 destination function pointer type.
3821 (thread_db_mourn): Use td_ta_delete_ftype.
3822
af60a1ef
SL
38232015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3824
3825 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3826 arch variant.
3827 (CDX_BREAKPOINT): Define for R2.
3828 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3829 (the_low_target): Add comments.
3830
e8b41681
YQ
38312015-07-30 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-arm-low.c (arm_hwcap): Remove it.
3834 (arm_read_description): New local variable arm_hwcap. Don't
3835 set arm_hwcap to zero.
3836
89abb039
YQ
38372015-07-30 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3840 Use regcache->tdesc instead.
3841 (arm_store_wmmxregset): Likewise.
3842 (arm_fill_vfpregset): Likewise.
3843 (arm_store_vfpregset): Likewise.
3844
deca266c
YQ
38452015-07-30 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-arm-low.c: Include arch/arm.h.
3848 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3849 (arm_store_gregset): Likewise.
3850
aa58a496
SM
38512015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3852
3853 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3854 ptrace's 4th parameter.
3855
50904b25
YQ
38562015-07-27 Yao Qi <yao.qi@linaro.org>
3857
3858 * configure.srv (case aarch64*-*-linux*): Don't set
3859 srv_linux_usrregs.
3860
5826e159
PA
38612015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3862
3863 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3864 sys/ptrace.h.
3865 * linux-arm-low.c: Likewise.
3866 * linux-cris-low.c: Likewise.
3867 * linux-crisv32-low.c: Likewise.
3868 * linux-low.c: Likewise.
3869 * linux-m68k-low.c: Likewise.
3870 * linux-mips-low.c: Likewise.
3871 * linux-nios2-low.c: Likewise.
3872 * linux-s390-low.c: Likewise.
3873 * linux-sparc-low.c: Likewise.
3874 * linux-tic6x-low.c: Likewise.
3875 * linux-tile-low.c: Likewise.
3876 * linux-x86-low.c: Likewise.
3877
54019719
PA
38782015-07-24 Pedro Alves <palves@redhat.com>
3879
3880 * config.in: Regenerate.
3881 * configure: Regenerate.
3882
eb7aa561
PA
38832015-07-24 Pedro Alves <palves@redhat.com>
3884
3885 * acinclude.m4: Include ../ptrace.m4.
3886 * configure.ac: Call GDB_AC_PTRACE.
3887 * config.in, configure: Regenerate.
3888
55d7b841
YQ
38892015-07-24 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-low.c (linux_create_inferior): Remove setting to
3892 proc->priv->new_inferior.
3893 (linux_attach): Likewise.
3894 (linux_low_filter_event): Likewise.
3895 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3896
c06cbd92
YQ
38972015-07-24 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-low.c (linux_arch_setup): New function.
3900 (linux_low_filter_event): If proc->tdesc is NULL and
3901 proc->attached is true, call the_low_target.arch_setup.
3902 Otherwise, keep status pending, and return.
3903 (linux_resume_one_lwp_throw): Don't call get_pc if
3904 thread->while_stepping isn't NULL. Don't call
3905 get_thread_regcache if proc->tdesc is NULL.
3906 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3907 (linux_target_ops): Install arch_setup.
3908 * server.c (start_inferior): Call the_target->arch_setup.
3909 * target.h (struct target_ops) <arch_setup>: New field.
3910 (target_arch_setup): New marco.
3911 * lynx-low.c (lynx_target_ops): Update.
3912 * nto-low.c (nto_target_ops): Update.
3913 * spu-low.c (spu_target_ops): Update.
3914 * win32-low.c (win32_target_ops): Update.
3915
5ae3ebba
YQ
39162015-07-24 Yao Qi <yao.qi@linaro.org>
3917
3918 * linux-low.c (linux_add_process): Don't set
3919 proc->priv->new_inferior.
3920 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3921 (linux_attach): Likewise.
3922
eb97750b
YQ
39232015-07-24 Yao Qi <yao.qi@linaro.org>
3924
3925 * server.c (start_inferior): Code refactor.
3926
51aee833
YQ
39272015-07-24 Yao Qi <yao.qi@linaro.org>
3928
3929 * server.c (process_serial_event): Set general_thread.
3930
af1b22f3
YQ
39312015-07-21 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3934 aarch64_linux_get_debug_reg_capacity.
3935
554717a3
YQ
39362015-07-17 Yao Qi <yao.qi@linaro.org>
3937
3938 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3939 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3940 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3941 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3942 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3943 (AARCH64_HWP_ALIGNMENT): Likewise.
3944 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3945 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3946 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3947 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3948 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3949 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3950 (struct aarch64_debug_reg_state): Likewise.
3951 (struct arch_lwp_info): Likewise.
3952 (aarch64_align_watchpoint): Likewise.
3953 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3954 (aarch64_watchpoint_length): Likewise.
3955 (aarch64_point_encode_ctrl_reg): Likewise
3956 (aarch64_point_is_aligned): Likewise.
3957 (aarch64_align_watchpoint): Likewise.
3958 (aarch64_linux_set_debug_regs):
3959 (aarch64_dr_state_insert_one_point): Likewise.
3960 (aarch64_dr_state_remove_one_point): Likewise.
3961 (aarch64_handle_breakpoint): Likewise.
3962 (aarch64_handle_aligned_watchpoint): Likewise.
3963 (aarch64_handle_unaligned_watchpoint): Likewise.
3964 (aarch64_handle_watchpoint): Likewise.
3965
c67ca4de
YQ
39662015-07-17 Yao Qi <yao.qi@linaro.org>
3967
3968 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3969 and don't aarch64_get_debug_reg_state. All callers update.
3970 (aarch64_handle_aligned_watchpoint): Likewise.
3971 (aarch64_handle_unaligned_watchpoint): Likewise.
3972 (aarch64_handle_watchpoint): Likewise.
3973 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3974 (aarch64_remove_point): Likewise.
3975
25abf979
YQ
39762015-07-17 Yao Qi <yao.qi@linaro.org>
3977
3978 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3979 debug_printf.
3980 (aarch64_handle_unaligned_watchpoint): Likewise.
3981
db1ff28b
JK
39822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3983
3984 Revert the previous 3 commits:
3985 Move gdb_regex* to common/
3986 Move linux_find_memory_regions_full & co.
3987 gdbserver build-id attribute generator
3988
700ca40f
JK
39892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3990 Jan Kratochvil <jan.kratochvil@redhat.com>
3991
3992 gdbserver build-id attribute generator.
3993 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3994 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3995 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3996 (find_phdr): New.
3997 (get_dynamic): Use find_pdhr to traverse program headers.
3998 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3999 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4000 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4001 (get_hex_build_id): New.
4002 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4003 to reply XML document.
4004
9904185c
JK
40052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4006 Jan Kratochvil <jan.kratochvil@redhat.com>
4007
4008 * target.c: Include target/target-utils.h and fcntl.h.
4009 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4010 (target_fileio_read_stralloc): New functions.
4011
6e5b4429
JK
40122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 * Makefile.in (OBS): Add gdb_regex.o.
4015 (gdb_regex.o): New.
4016 * config.in: Rebuilt.
4017 * configure: Rebuilt.
4018
ddc98fbf
JK
40192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4020 Jan Kratochvil <jan.kratochvil@redhat.com>
4021
4022 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4023 * Makefile.in (OBS): Add target-utils.o.
4024 (linux-maps.o, target-utils.o): New.
4025 * configure.srv (srv_linux_obj): Add linux-maps.o.
4026
e57bb7a0
PL
40272015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4028
4029 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4030 function, return 1.
4031 (the_low_target): Install it.
4032
586b02a9
PA
40332015-07-14 Pedro Alves <palves@redhat.com>
4034
4035 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4036 Instead, ignore ECHILD, and throw an error for other errnos.
4037
58c1b36c
PA
40382015-07-10 Pedro Alves <palves@redhat.com>
4039
4040 * event-loop.c (struct callback_event) <data>: Change type to
4041 gdb_client_data instance instead of gdb_client_data pointer.
4042 (append_callback_event): Adjust.
4043
421530db
PL
40442015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4045
4046 * linux-aarch64-low.c: Add comments for each linux_target_ops
4047 method. Remove comments already covered in target_ops and
4048 linux_target_ops definitions.
4049 (the_low_target): Add comments for each unimplemented method.
4050
c2d65f38
YQ
40512015-07-09 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-aarch64-low.c (aarch64_regmap): Remove.
4054 (aarch64_usrregs_info): Remove.
4055 (regs_info): Set field usrregs to NULL.
4056
b20a6524
MM
40572015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4058
4059 * linux-low.c: Include "rsp-low.h"
4060 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4061 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4062 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4063 (handle_btrace_enable_pt): New.
4064 (handle_btrace_general_set): Support "pt".
4065 (handle_btrace_conf_general_set): Support "pt:size".
4066
96c97461
PL
40672015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4068
4069 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4070 Z_PACKET_SW_BP.
4071
37d66942
PL
40722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4073
4074 * linux-aarch64-low.c: Remove comment about endianness.
4075 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4076 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4077 memcmp.
4078
dc06243f
GB
40792015-06-24 Gary Benson <gbenson@redhat.com>
4080
4081 * linux-i386-ipa.c (stdint.h): Do not include.
4082 * lynx-i386-low.c (stdint.h): Likewise.
4083 * lynx-ppc-low.c (stdint.h): Likewise.
4084 * mem-break.c (stdint.h): Likewise.
4085 * thread-db.c (stdint.h): Likewise.
4086 * tracepoint.c (stdint.h): Likewise.
4087 * win32-low.c (stdint.h): Likewise.
4088
124e13d9
SM
40892015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4090
4091 * server.c (write_qxfer_response): Update call to
4092 remote_escape_output.
4093
909c2cda
JK
40942015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4095 Jan Kratochvil <jan.kratochvil@redhat.com>
4096
4097 Merge multiple hex conversions.
4098 * gdbreplay.c (tohex): Rename to 'fromhex'.
4099 (logchar): Use fromhex.
4100
24c05f46
JK
41012015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4102
4103 * server.c (handle_qxfer_libraries): Set `version' attribute for
4104 <library-list>.
4105
14d2069a
GB
41062015-06-10 Gary Benson <gbenson@redhat.com>
4107
4108 * target.h (struct target_ops) <multifs_open>: New field.
4109 <multifs_unlink>: Likewise.
4110 <multifs_readlink>: Likewise.
4111 * linux-low.c (nat/linux-namespaces.h): New include.
4112 (linux_target_ops): Initialize the_target->multifs_open,
4113 the_target->multifs_unlink and the_target->multifs_readlink.
4114 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4115 * hostio.c (hostio_fs_pid): New static variable.
4116 (hostio_handle_new_gdb_connection): New function.
4117 (handle_setfs): Likewise.
4118 (handle_open): Use the_target->multifs_open as appropriate.
4119 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4120 (handle_readlink): Use the_target->multifs_readlink as
4121 appropriate.
4122 (handle_vFile): Handle vFile:setfs packets.
4123 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4124 after target_handle_new_gdb_connection.
4125
4b8b5e72
GB
41262015-06-10 Gary Benson <gbenson@redhat.com>
4127
4128 * configure.ac (AC_CHECK_FUNCS): Add setns.
4129 * config.in: Regenerate.
4130 * configure: Likewise.
4131 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4132 (linux-namespaces.o): New rule.
4133 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4134
3ac2e371
GB
41352015-06-09 Gary Benson <gbenson@redhat.com>
4136
4137 * hostio.c (handle_open): Process mode argument with
4138 fileio_to_host_mode.
4139
ca9b78ce
YQ
41402015-06-01 Yao Qi <yao.qi@linaro.org>
4141
4142 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4143 * linux-x86-low.c: Likewise.
4144
bfacd19d
DB
41452015-05-28 Don Breazeal <donb@codesourcery.com>
4146
4147 * linux-low.c (handle_extended_wait): Initialize
4148 thread_info.last_resume_kind for new fork children.
4149
452003ef
PA
41502015-05-15 Pedro Alves <palves@redhat.com>
4151
4152 * target.h (target_handle_new_gdb_connection): Rewrite using if
4153 wrapped in do/while.
4154
1041a03c
JB
41552015-05-14 Joel Brobecker <brobecker@adacore.com>
4156
4157 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4158 * configure, config.in: Regenerate.
4159 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4160 Declare typedef.
4161
c269dbdb
DB
41622015-05-12 Don Breazeal <donb@codesourcery.com>
4163
4164 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4165 PTRACE_EVENT_VFORK_DONE.
4166 (linux_low_ptrace_options, extended_event_reported): Add vfork
4167 events.
4168 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4169 and "vforkdone" for RSP 'T' Stop Reply Packet.
4170 * server.h (report_vfork_events): Declare
4171 global variable.
4172
3a8a0396
DB
41732015-05-12 Don Breazeal <donb@codesourcery.com>
4174
4175 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4176 (the_low_target) <new_fork>: Initialize new member.
4177 * linux-arm-low.c (arm_new_fork): New function.
4178 (the_low_target) <new_fork>: Initialize new member.
4179 * linux-low.c (handle_extended_wait): Call new target function
4180 new_fork.
4181 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4182 * linux-mips-low.c (mips_add_watchpoint): New function
4183 extracted from mips_insert_point.
4184 (the_low_target) <new_fork>: Initialize new member.
4185 (mips_linux_new_fork): New function.
4186 (mips_insert_point): Call mips_add_watchpoint.
4187 * linux-x86-low.c (x86_linux_new_fork): New function.
4188 (the_low_target) <new_fork>: Initialize new member.
4189
de0d863e
DB
41902015-05-12 Don Breazeal <donb@codesourcery.com>
4191
4192 * linux-low.c (handle_extended_wait): Implement return value,
4193 rename argument 'event_child' to 'event_lwp', handle
4194 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4195 (linux_low_ptrace_options): New function.
4196 (linux_low_filter_event): Call linux_low_ptrace_options,
4197 use different argument fo linux_enable_event_reporting,
4198 use return value from handle_extended_wait.
4199 (extended_event_reported): New function.
4200 (linux_wait_1): Call extended_event_reported and set
4201 status to report fork events.
4202 (linux_write_memory): Add pid to debug message.
4203 (reset_lwp_ptrace_options_callback): New function.
4204 (linux_handle_new_gdb_connection): New function.
4205 (linux_target_ops): Initialize new structure member.
4206 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4207 * lynx-low.c: Initialize new structure member.
4208 * remote-utils.c (prepare_resume_reply): Implement stop reason
4209 "fork" for "T" stop message.
4210 * server.c (handle_query): Call handle_new_gdb_connection.
4211 * server.h (report_fork_events): Declare global flag.
4212 * target.h (struct target_ops) <handle_new_gdb_connection>:
4213 New member.
4214 (target_handle_new_gdb_connection): New macro.
4215 * win32-low.c: Initialize new structure member.
4216
ddcbc397
DB
42172015-05-12 Don Breazeal <donb@codesourcery.com>
4218
4219 * mem-break.c (APPEND_TO_LIST): Define macro.
4220 (clone_agent_expr): New function.
4221 (clone_one_breakpoint): New function.
4222 (clone_all_breakpoints): New function.
4223 * mem-break.h: Declare new functions.
4224
89245bc0
DB
42252015-05-12 Don Breazeal <donb@codesourcery.com>
4226
4227 * linux-low.c (linux_supports_fork_events): New function.
4228 (linux_supports_vfork_events): New function.
4229 (linux_target_ops): Initialize new structure members.
4230 (initialize_low): Call linux_check_ptrace_features.
4231 * lynx-low.c (lynx_target_ops): Initialize new structure
4232 members.
4233 * server.c (report_fork_events, report_vfork_events):
4234 New global flags.
4235 (handle_query): Add new features to qSupported packet and
4236 response.
4237 (captured_main): Initialize new global variables.
4238 * target.h (struct target_ops) <supports_fork_events>:
4239 New member.
4240 <supports_vfork_events>: New member.
4241 (target_supports_fork_events): New macro.
4242 (target_supports_vfork_events): New macro.
4243 * win32-low.c (win32_target_ops): Initialize new structure
4244 members.
4245
835205d0
GB
42462015-05-12 Gary Benson <gbenson@redhat.com>
4247
4248 * server.c (handle_qxfer_exec_file): Use current process
4249 if annex is empty.
4250
21e94bd9
SL
42512015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4252
4253 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4254 Remove HAVE_PTRACE_GETREGS conditionals.
4255 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4256 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4257
45614f15
YQ
42582015-05-08 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-low.c (linux_supports_conditional_breakpoints): New
4261 function.
4262 (linux_target_ops): Install new target method.
4263 * lynx-low.c (lynx_target_ops): Install NULL hook for
4264 supports_conditional_breakpoints.
4265 * nto-low.c (nto_target_ops): Likewise.
4266 * spu-low.c (spu_target_ops): Likewise.
4267 * win32-low.c (win32_target_ops): Likewise.
4268 * server.c (handle_query): Check
4269 target_supports_conditional_breakpoints.
4270 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4271 New field.
4272 (target_supports_conditional_breakpoints): New macro.
4273
80ad801e
PA
42742015-05-06 Pedro Alves <palves@redhat.com>
4275
4276 PR server/18081
4277 * server.c (start_inferior): If the process exits, mourn it.
4278
819843c7
GB
42792015-04-21 Gary Benson <gbenson@redhat.com>
4280
4281 * hostio.c (fileio_open_flags_to_host): Factored out to
4282 fileio_to_host_openflags in common/fileio.c. Single use
4283 updated.
4284
a2d5a9d7
MF
42852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4286
4287 * linux-xtensa-low.c (xtensa_fill_gregset)
4288 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4289 XCHAL_HAVE_LOOP.
4290
deb44829
MF
42912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4292
4293 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4294 (regs_info): Replace usrregs pointer with NULL.
4295
e57f1de3
GB
42962015-04-17 Gary Benson <gbenson@redhat.com>
4297
4298 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4299 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4300 * server.c (handle_qxfer_exec_file): New function.
4301 (qxfer_packets): Add exec-file entry.
4302 (handle_query): Report qXfer:exec-file:read as supported packet.
4303
62828379
RN
43042015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4305
4306 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4307
b88bb450
GB
43082015-04-09 Gary Benson <gbenson@redhat.com>
4309
4310 * hostio-errno.c (errno_to_fileio_error): Remove function.
4311 Update caller to use remote_fileio_to_fio_error.
4312
c8f4bfdd
YQ
43132015-04-09 Yao Qi <yao.qi@linaro.org>
4314
4315 * linux-low.c (linux_insert_point): Call
4316 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4317 (linux_remove_point): Call remove_memory_breakpoint if type is
4318 raw_bkpt_type_sw.
4319 * linux-x86-low.c (x86_insert_point): Don't call
4320 insert_memory_breakpoint.
4321 (x86_remove_point): Don't call remove_memory_breakpoint.
4322
41f98f02
PA
43232015-04-01 Pedro Alves <palves@redhat.com>
4324 Cleber Rosa <crosa@redhat.com>
4325
4326 * server.c (gdbserver_usage): Reorganize and extend the usage
4327 message.
4328
2bf6fb9d
PA
43292015-03-24 Pedro Alves <palves@redhat.com>
4330
4331 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4332 output. Also dump TRAP_TRACE.
4333 (linux_low_filter_event): In debug output, distinguish a
4334 resume_stop SIGSTOP from a delayed SIGSTOP.
4335
369f6daa
GB
43362015-03-24 Gary Benson <gbenson@redhat.com>
4337
4338 * linux-x86-low.c (x86_linux_new_thread): Moved to
4339 nat/x86-linux.c.
4340 (x86_linux_prepare_to_resume): Likewise.
4341
8e5d4070
GB
43422015-03-24 Gary Benson <gbenson@redhat.com>
4343
4344 * Makefile.in (x86-linux-dregs.o): New rule.
4345 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4346 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4347 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4348 (x86_linux_dr_get): Likewise.
4349 (x86_linux_dr_set): Likewise.
4350 (update_debug_registers_callback): Likewise.
4351 (x86_linux_dr_set_addr): Likewise.
4352 (x86_linux_dr_get_addr): Likewise.
4353 (x86_linux_dr_set_control): Likewise.
4354 (x86_linux_dr_get_control): Likewise.
4355 (x86_linux_dr_get_status): Likewise.
4356 (x86_linux_update_debug_registers): Likewise.
4357
2b95d440
GB
43582015-03-24 Gary Benson <gbenson@redhat.com>
4359
4360 * linux-x86-low.c (x86_linux_update_debug_registers):
4361 New function, factored out from...
4362 (x86_linux_prepare_to_resume): ...this.
4363
14b0bc68
GB
43642015-03-24 Gary Benson <gbenson@redhat.com>
4365
4366 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4367 (x86_linux_dr_set): Likewise.
4368 (update_debug_registers_callback): Likewise.
4369 (x86_linux_dr_set_addr): Likewise.
4370 (x86_linux_dr_get_addr): Likewise.
4371 (x86_linux_dr_set_control): Likewise.
4372 (x86_linux_dr_get_control): Likewise.
4373 (x86_linux_dr_get_status): Likewise.
4374 (x86_linux_prepare_to_resume): Likewise.
4375
5dfe6ca8
GB
43762015-03-24 Gary Benson <gbenson@redhat.com>
4377
4378 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4379 Use perror_with_name. Pass string through gettext.
4380 (x86_linux_dr_set): Likewise.
4381
d33472ad
GB
43822015-03-24 Gary Benson <gbenson@redhat.com>
4383
4384 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4385 (x86_linux_dr_set_addr): ...this.
4386 (x86_dr_low_get_addr): Rename to...
4387 (x86_linux_dr_get_addr): ...this.
4388 (x86_dr_low_set_control): Rename to...
4389 (x86_linux_dr_set_control): ...this.
4390 (x86_dr_low_get_control): Rename to...
4391 (x86_linux_dr_get_control): ...this.
4392 (x86_dr_low_get_status): Rename to...
4393 (x86_linux_dr_get_status): ...this.
4394 (x86_dr_low): Update with new function names.
4395
4b134ca1
GB
43962015-03-24 Gary Benson <gbenson@redhat.com>
4397
4398 * Makefile.in (x86-linux.o): New rule.
4399 * configure.srv: Add x86-linux.o to relevant targets.
4400 * linux-low.c (lwp_set_arch_private_info): New function.
4401 (lwp_arch_private_info): Likewise.
4402 * linux-x86-low.c: Include nat/x86-linux.h.
4403 (arch_lwp_info): Removed structure.
4404 (update_debug_registers_callback):
4405 Use lwp_set_debug_registers_changed.
4406 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4407 and lwp_set_debug_registers_changed.
4408 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4409
34c703da
GB
44102015-03-24 Gary Benson <gbenson@redhat.com>
4411
4412 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4413 * linux-arm-low.c (arm_new_thread): Likewise.
4414 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4415 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4416 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4417 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4418
cff068da
GB
44192015-03-24 Gary Benson <gbenson@redhat.com>
4420
4421 * linux-low.c (ptid_of_lwp): New function.
4422 (lwp_is_stopped): Likewise.
4423 (lwp_stop_reason): Likewise.
4424 * linux-x86-low.c (update_debug_registers_callback):
4425 Use lwp_is_stopped.
4426 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4427 lwp_stop_reason.
4428
b2f7c7e8
GB
44292015-03-24 Gary Benson <gbenson@redhat.com>
4430
4431 * linux-low.h (linux_stop_lwp): Remove declaration.
4432
6d4ee8c6
GB
44332015-03-24 Gary Benson <gbenson@redhat.com>
4434
4435 * linux-low.h: Include nat/linux-nat.h.
4436 * linux-low.c (iterate_over_lwps_args): New structure.
4437 (iterate_over_lwps_filter): New function.
4438 (iterate_over_lwps): Likewise.
4439 * linux-x86-low.c (update_debug_registers_callback):
4440 Update signature to what iterate_over_lwps expects.
4441 Remove PID check that iterate_over_lwps now performs.
4442 (x86_dr_low_set_addr): Use iterate_over_lwps.
4443 (x86_dr_low_set_control): Likewise.
4444
70a0bb6b
GB
44452015-03-24 Gary Benson <gbenson@redhat.com>
4446
4447 * linux-x86-low.c (x86_debug_reg_state): New function.
4448 (x86_linux_prepare_to_resume): Use the above.
4449
7b669087
GB
44502015-03-24 Gary Benson <gbenson@redhat.com>
4451
4452 * linux-low.c (current_lwp_ptid): New function.
4453 * linux-x86-low.c: Include nat/linux-nat.h.
4454 (x86_dr_low_get_addr): Use current_lwp_ptid.
4455 (x86_dr_low_get_control): Likewise.
4456 (x86_dr_low_get_status): Likewise.
4457
eef49a3d
PA
44582015-03-20 Pedro Alves <palves@redhat.com>
4459
4460 * tracepoint.c (cmd_qtstatus): Make "str" const.
4461
b2333d22
PA
44622015-03-20 Pedro Alves <palves@redhat.com>
4463
4464 * server.c (handle_general_set): Make "req_str" const.
4465
23f238d3
PA
44662015-03-19 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (linux_resume_one_lwp): Rename to ...
4469 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4470 instead call perror_with_name.
4471 (check_ptrace_stopped_lwp_gone): New function.
4472 (linux_resume_one_lwp): Reimplement as wrapper around
4473 linux_resume_one_lwp_throw that swallows errors if the LWP is
4474 gone.
4475
91baf43f
PA
44762015-03-19 Pedro Alves <palves@redhat.com>
4477
4478 * linux-low.c (count_events_callback, select_event_lwp_callback):
4479 No longer check whether the thread has resume_stop as last resume
4480 kind.
4481
8bf3b159
PA
44822015-03-19 Pedro Alves <palves@redhat.com>
4483
4484 * linux-low.c (count_events_callback, select_event_lwp_callback):
4485 Use the lwp's status_pending_p field, not the thread's.
4486
b90fc188
PA
44872015-03-19 Pedro Alves <palves@redhat.com>
4488
4489 * linux-low.c (select_event_lwp_callback): Update comments to
4490 no longer mention SIGTRAP.
4491
464b0089
GB
44922015-03-18 Gary Benson <gbenson@redhat.com>
4493
4494 * server.c (handle_query): Do not report vFile:fstat as supported.
4495
aa9e327f
GB
44962015-03-11 Gary Benson <gbenson@redhat.com>
4497
4498 * hostio.c (sys/types.h): New include.
4499 (sys/stat.h): Likewise.
4500 (common-remote-fileio.h): Likewise.
4501 (handle_fstat): New function.
4502 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4503
791c0056
GB
45042015-03-11 Gary Benson <gbenson@redhat.com>
4505
4506 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4507 struct stat.st_blocks and struct stat.st_blksize.
4508 * configure: Regenerate.
4509 * config.in: Likewise.
4510 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4511 (OBS): Add common-remote-fileio.o.
4512 (common-remote-fileio.o): New rule.
4513
9a9df970
PA
45142015-03-09 Pedro Alves <palves@redhat.com>
4515
4516 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4517 'struct sockaddr' pointer in 'accept' call.
4518
9eb1356e
PA
45192015-03-09 Pedro Alves <palves@redhat.com>
4520
4521 Revert:
4522 2015-03-07 Pedro Alves <palves@redhat.com>
4523 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4524 or <winsock2.h> here. Instead include "gdb_socket.h".
4525 (remote_open): Use union gdb_sockaddr_u.
4526 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4527 or <winsock2.h> here. Instead include "gdb_socket.h".
4528 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4529 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4530 or <sys/un.h>.
4531 (init_named_socket, gdb_agent_helper_thread): Use union
4532 gdb_sockaddr_u.
4533
aac331e4
PA
45342015-03-07 Pedro Alves <palves@redhat.com>
4535
4536 * configure.ac (build_warnings): Move
4537 -Wdeclaration-after-statement to the C-specific set.
4538 * configure: Regenerate.
4539
366c75fc
PA
45402015-03-07 Pedro Alves <palves@redhat.com>
4541
4542 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4543 or <winsock2.h> here. Instead include "gdb_socket.h".
4544 (remote_open): Use union gdb_sockaddr_u.
4545 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4546 or <winsock2.h> here. Instead include "gdb_socket.h".
4547 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4548 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4549 or <sys/un.h>.
4550 (init_named_socket, gdb_agent_helper_thread): Use union
4551 gdb_sockaddr_u.
4552
492d29ea
PA
45532015-03-07 Pedro Alves <palves@redhat.com>
4554
4555 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4556 instead.
4557
60a191ed
YQ
45582015-03-06 Yao Qi <yao.qi@linaro.org>
4559
4560 * linux-aarch64-low.c (aarch64_insert_point): Use
4561 show_debug_regs as a boolean.
4562 (aarch64_remove_point): Likewise.
4563
f5771b1d
PA
45642015-03-05 Pedro Alves <palves@redhat.com>
4565
4566 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4567 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4568 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4569 * nto-low.c (nto_target_ops): Likewise.
4570 * spu-low.c (spu_target_ops): Likewise.
4571 * win32-low.c (win32_target_ops): Likewise.
4572
3e572f71
PA
45732015-03-04 Pedro Alves <palves@redhat.com>
4574
72f4393d 4575 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4576 Decide whether a breakpoint triggered based on the SIGTRAP's
4577 siginfo.si_code.
72f4393d
L
4578 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4579 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4580 (linux_low_filter_event): Check for breakpoints before checking
4581 watchpoints.
4582 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4583 siginfo.si_code.
72f4393d
L
4584 (linux_stopped_by_sw_breakpoint)
4585 (linux_supports_stopped_by_sw_breakpoint)
4586 (linux_stopped_by_hw_breakpoint)
4587 (linux_supports_stopped_by_hw_breakpoint): New functions.
4588 (linux_target_ops): Install new target methods.
3e572f71 4589
1ec68e26
PA
45902015-03-04 Pedro Alves <palves@redhat.com>
4591
4592 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4593 * server.c (swbreak_feature, hwbreak_feature): New globals.
4594 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4595 (captured_main): Clear swbreak_feature and hwbreak_feature.
4596 * server.h (swbreak_feature, hwbreak_feature): Declare.
4597 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4598 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4599 supports_stopped_by_hw_breakpoint>: New fields.
4600 (target_supports_stopped_by_sw_breakpoint)
4601 (target_stopped_by_sw_breakpoint)
4602 (target_supports_stopped_by_hw_breakpoint)
4603 (target_stopped_by_hw_breakpoint): Declare.
4604
15c66dd6
PA
46052015-03-04 Pedro Alves <palves@redhat.com>
4606
4607 enum lwp_stop_reason -> enum target_stop_reason
4608 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4609 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4610 (linux_wait_1, stuck_in_jump_pad_callback)
4611 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4612 (linux_stopped_by_watchpoint):
4613 * linux-low.h (enum lwp_stop_reason): Delete.
4614 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4615 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4616
98fc70d6
YQ
46172015-03-04 Yao Qi <yao.qi@linaro.org>
4618
4619 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4620
dd2ac174
GB
46212015-03-03 Gary Benson <gbenson@redhat.com>
4622
4623 * hostio.c (handle_vFile): Fix prefix lengths.
4624
d68e53f4
MM
46252015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4626
4627 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4628 ptr_bits.
4629
bf2d68ab
AA
46302015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4631
4632 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4633 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4634 (clean): Add "rm -f" for above C files.
4635 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4636 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4637 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4638 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4639 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4640 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4641 (init_registers_s390x_vx_linux64)
4642 (init_registers_s390x_tevx_linux64)
4643 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4644 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4645 declarations.
4646 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4647 (s390_store_vxrs_high): New functions.
4648 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4649 NT_S390_VXRS_HIGH.
4650 (s390_arch_setup): Add logic for selecting one of the new target
4651 descriptions. Activate the new vector regsets if applicable.
4652 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4653 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4654 and init_registers_s390x_tevx_linux64.
4655
c966a859
PA
46562015-03-01 Pedro Alves <palves@redhat.com>
4657
4658 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4659 parameter.
4660
4180215b
PA
46612015-02-27 Pedro Alves <palves@redhat.com>
4662
4663 * linux-x86-low.c (u_debugreg_offset): New function.
4664 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4665
749bab01
PA
46662015-02-27 Pedro Alves <palves@redhat.com>
4667
4668 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4669 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4670 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4671 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4672 (ps_lsetfpregs, ps_getpid)
4673 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4674 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4675 (ps_lsetxregs, ps_plog): Declare.
4676
3c14e5a3
PA
46772015-02-27 Pedro Alves <palves@redhat.com>
4678
4679 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4680 IP_AGENT_EXPORT_FUNC.
4681 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4682 IP_AGENT_EXPORT_FUNC.
4683 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4684 (IP_AGENT_EXPORT): Delete.
4685 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4686 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4687 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4688 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4689 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4690 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4691 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4692 (traceframe_read_count, traceframe_write_count)
4693 (traceframes_created, trace_state_variables, get_raw_reg)
4694 (get_trace_state_variable_value, set_trace_state_variable_value)
4695 (ust_loaded, helper_thread_id, cmd_buf): Use
4696 IPA_SYM_EXPORTED_NAME.
4697 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4698 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4699 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4700 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4701 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4702 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4703 EXTERN_C_PUSH/EXTERN_C_POP.
4704 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4705 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4706 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4707 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4708 (traceframe_write_count, traceframe_read_count)
4709 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4710 (about_to_request_buffer_space, get_trace_state_variable_value)
4711 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4712 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4713 EXTERN_C_PUSH/EXTERN_C_POP.
4714 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4715 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4716 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4717 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4720 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4721 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4722 Define.
4723 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4724 (IP_AGENT_EXPORT_VAR_DECL): Define.
4725 (tracing): Declare.
4726 (gdb_agent_get_raw_reg): Declare.
4727
fe978cb0
PA
47282015-02-27 Tom Tromey <tromey@redhat.com>
4729 Pedro Alves <palves@redhat.com>
4730
4731 Rename symbols whose names are reserved C++ keywords throughout.
4732
3bc3d82a
PA
47332015-02-27 Pedro Alves <palves@redhat.com>
4734
4735 * Makefile.in (COMPILER): New, get it from autoconf.
4736 (CXX): Get from autoconf instead.
4737 (COMPILE.pre): Use COMPILER.
4738 (CC-LD): Rename to ...
4739 (CC_LD): ... this. Use COMPILER.
4740 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4741 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4742 * acinclude.m4: Include build-with-cxx.m4.
4743 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4744 Disable -Werror by default if building in C++ mode.
4745 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4746 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4747 the C++ compiler. Save/restore CXXFLAGS too.
4748 * configure: Regenerate.
4749
07697489
PA
47502015-02-27 Pedro Alves <palves@redhat.com>
4751
4752 * acinclude.m4: Include libiberty.m4.
4753 * configure.ac: Call libiberty_INIT.
4754 * config.in, configure: Regenerate.
4755
9beb7c4e
PA
47562015-02-26 Pedro Alves <palves@redhat.com>
4757
4758 * linux-low.c (linux_wait_1): When incrementing the PC past a
4759 program breakpoint always use the_low_target.breakpoint_len as
4760 increment, rather than the maximum between that and
4761 the_low_target.decr_pc_after_break.
4762
8090aef2
PA
47632015-02-23 Pedro Alves <palves@redhat.com>
4764
4765 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4766 thread was doing a step-over; always adjust the PC if
4767 we stepped over a permanent breakpoint.
4768 (linux_wait_1): If we stepped over breakpoint that was on top of a
4769 permanent breakpoint, manually advance the PC past it.
4770
bc9540e8
PA
47712015-02-23 Pedro Alves <palves@redhat.com>
4772
4773 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4774 modes.
4775 (x86_fill_gregset, x86_store_gregset): Use it when handling
4776 $orig_eax.
4777
2db9a427
PA
47782015-02-20 Pedro Alves <palves@redhat.com>
4779
4780 * thread-db.c: Include "nat/linux-procfs.h".
4781 (thread_db_init): Skip listing new threads if the kernel supports
4782 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4783
afa8d396
PA
47842015-02-20 Pedro Alves <palves@redhat.com>
4785
4786 * linux-low.c (status_pending_p_callback): Use ptid_match.
4787
c9587f88
AT
47882015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4789
4790 PR breakpoints/16812
4791 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4792 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4793 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4794
b05ec7a5
AT
47952015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4796
4797 PR breakpoints/15956
4798 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4799
d33501a5
MM
48002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4801
4802 * linux-low.c (linux_low_btrace_conf): Print size.
4803 * server.c (handle_btrace_conf_general_set): New.
4804 (hanle_general_set): Call handle_btrace_conf_general_set.
4805 (handle_query): Report Qbtrace-conf:bts:size as supported.
4806
f4abbc16
MM
48072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4808
4809 * linux-low.c (linux_low_enable_btrace): Update parameters.
4810 (linux_low_btrace_conf): New.
4811 (linux_target_ops)<to_btrace_conf>: Initialize.
4812 * server.c (current_btrace_conf): New.
4813 (handle_btrace_enable): Rename to ...
4814 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4815 to target_enable_btrace. Update comment. Update users.
4816 (handle_qxfer_btrace_conf): New.
4817 (qxfer_packets): Add btrace-conf entry.
4818 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4819 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4820 (target_ops)<read_btrace_conf>: New.
4821 (target_enable_btrace): Update parameters.
4822 (target_read_btrace_conf): New.
4823
043c3577
MM
48242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4825
4826 * server.c (handle_btrace_general_set): Remove call to
4827 target_supports_btrace.
4828 (supported_btrace_packets): New.
4829 (handle_query): Call supported_btrace_packets.
4830 * target.h: include btrace-common.h.
4831 (btrace_target_info): Removed.
4832 (supports_btrace, target_supports_btrace): Update parameters.
4833
734b0e4b
MM
48342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4835
4836 * Makefile.in (SFILES): Add common/btrace-common.c.
4837 (OBS): Add common/btrace-common.o.
4838 (btrace-common.o): Add build rules.
4839 * linux-low: Include btrace-common.h.
4840 (linux_low_read_btrace): Use struct btrace_data. Call
4841 btrace_data_init and btrace_data_fini.
4842
d6c146e9
PA
48432015-02-06 Pedro Alves <palves@redhat.com>
4844
4845 * thread-db.c (find_new_threads_callback): Add debug output.
4846
20ba1ce6
PA
48472015-02-04 Pedro Alves <palves@redhat.com>
4848
4849 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4850 (resume_stopped_resumed_lwps): New function.
4851 (linux_wait_for_event_filtered): Use it.
4852
8cc73a39
SDJ
48532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4854
4855 * Makefile.in (SFILES): Add linux-personality.c.
4856 (linux-personality.o): New rule.
4857 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4858 list of objects to be built.
4859 * linux-low.c: Include nat/linux-personality.h.
4860 (linux_create_inferior): Remove code to disable address space
4861 randomization (moved to ../nat/linux-personality.c). Create
4862 cleanup to disable address space randomization.
4863
fb23d554
SDJ
48642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4865
4866 * Makefile.in (posix-strerror.o): New rule.
4867 (mingw-strerror.o): Likewise.
4868 * configure: Regenerated.
4869 * configure.ac: Source file ../common/common.host. Initialize new
4870 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4871
cdf43629
YQ
48722015-01-14 Yao Qi <yao@codesourcery.com>
4873
4874 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4875 (ppc-linux.o): New rule.
4876 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4877 * configure.ac: AC_CHECK_FUNCS(getauxval).
4878 * config.in: Re-generated.
4879 * configure: Re-generated.
4880 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4881 ppc64_64bit_inferior_p
4882
514c5338
YQ
48832015-01-14 Yao Qi <yao@codesourcery.com>
4884
4885 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4886 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4887 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4888 (PT_ORIG_R3, PT_TRAP): Likewise.
4889 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4890 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4891 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4892
3368c1e5
JB
48932015-01-10 Joel Brobecker <brobecker@adacore.com>
4894
4895 * i387-fp.c (i387_cache_to_xsave): In look over
4896 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4897 zmmh_low_space field by use of zmmh_high_space.
4898
582511be
PA
48992015-01-09 Pedro Alves <palves@redhat.com>
4900
4901 * linux-low.c (step_over_bkpt): Move higher up in the file.
4902 (handle_extended_wait): Don't store the stop_pc here.
4903 (get_stop_pc): Adjust comments and rename to ...
4904 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4905 stopped for a software breakpoint or hardware breakpoint.
4906 (thread_still_has_status_pending_p): New function.
4907 (status_pending_p_callback): Use
4908 thread_still_has_status_pending_p. If the event is no longer
4909 interesting, resume the LWP.
4910 (handle_tracepoints): Add assert.
4911 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4912 (wstatus_maybe_breakpoint): New function.
4913 (cancel_breakpoint): Delete function.
4914 (check_stopped_by_watchpoint): New function, factored out from
4915 linux_low_filter_event.
4916 (lp_status_maybe_breakpoint): Delete function.
4917 (linux_low_filter_event): Remove filter_ptid argument.
4918 Leave thread group exits pending here. Store the LWP's stop PC.
4919 Always leave events pending.
4920 (linux_wait_for_event_filtered): Pull all events out of the
4921 kernel, and leave them all pending.
4922 (count_events_callback, select_event_lwp_callback): Consider all
4923 events.
4924 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4925 (select_event_lwp): Only give preference to the stepping LWP in
4926 all-stop mode. Adjust comments.
4927 (ignore_event): New function.
4928 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4929 references to cancel_breakpoints. Adjust to renames. Also give
4930 equal priority to all LWPs that have had events in non-stop mode.
4931 If reporting a software breakpoint event, unadjust the LWP's PC.
4932 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4933 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4934 Adjust.
4935 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4936 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4937 (linux_stopped_by_watchpoint): Adjust.
4938 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4939 * linux-low.h (enum lwp_stop_reason): New.
4940 (struct lwp_info) <stop_pc>: Adjust comment.
4941 <stopped_by_watchpoint>: Delete field.
4942 <stop_reason>: New field.
4943 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4944 * mem-break.c (software_breakpoint_inserted_here)
4945 (hardware_breakpoint_inserted_here): New function.
4946 * mem-break.h (software_breakpoint_inserted_here)
4947 (hardware_breakpoint_inserted_here): Declare.
4948 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4949 (cancel_breakpoints): Delete.
4950 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4951 (upload_fast_traceframes): Remove references to
4952 cancel_breakpoints.
4953
a33e3959
PA
49542015-01-09 Pedro Alves <palves@redhat.com>
4955
4956 * thread-db.c (find_new_threads_callback): Ignore thread if the
4957 kernel thread ID is -1.
4958
8784d563
PA
49592015-01-09 Pedro Alves <palves@redhat.com>
4960
4961 * linux-low.c (linux_attach_fail_reason_string): Move to
4962 nat/linux-ptrace.c, and rename.
4963 (linux_attach_lwp): Update comment.
4964 (attach_proc_task_lwp_callback): New function.
4965 (linux_attach): Adjust to rename and use
4966 linux_proc_attach_tgid_threads.
4967 (linux_attach_fail_reason_string): Delete declaration.
4968
76f2b779
JB
49692015-01-01 Joel Brobecker <brobecker@adacore.com>
4970
4971 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4972 * server.c (gdbserver_version): Likewise.
4973
fafcc06a
SDJ
49742014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4975
4976 * remote-utils.c: Include ctype.h.
4977 (input_interrupt): Explicitly handle the case when the char
4978 received is the NUL byte. Improve the printing of non-ASCII
4979 characters.
4980
beed38b8
JB
49812014-12-16 Joel Brobecker <brobecker@adacore.com>
4982
4983 * linux-low.c (linux_low_filter_event): Update call to
4984 linux_enable_event_reporting following the addition of
4985 a new parameter to that function.
4986
bf330350
CU
49872014-12-16 Catalin Udma <catalin.udma@freescale.com>
4988
4989 PR server/17457
4990 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4991 (AARCH64_FPCR_REGNO): Likewise.
4992 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4993 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4994 (aarch64_store_fpregset): Likewise.
4995
5227d625
JB
49962014-12-15 Joel Brobecker <brobecker@adacore.com>
4997
4998 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4999 Remove FIXME comment about assumption about N.
5000
f93b65a0
JB
50012014-12-13 Joel Brobecker <brobecker@adacore.com>
5002
5003 * configure.ac: If large-file support is disabled in GDBserver,
5004 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5005 * configure: Regenerate.
5006
e5a9158d
AA
50072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5008
5009 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5010 warning upon ENODATA from ptrace.
5011 * linux-s390-low.c (s390_store_tdb): New.
5012 (s390_regsets): Add regset for NT_S390_TDB.
5013
feea5f36
AA
50142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5015
5016 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5017 without a fill_function.
5018 * linux-s390-low.c (s390_fill_last_break): Remove.
5019 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5020 (s390_arch_setup): Use regset's size instead of fill_function for
5021 loop end condition.
5022
098dbe61
AA
50232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5024
5025 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5026 the regset's store function when ptrace returned an error.
5027 * regcache.c (get_thread_regcache): Invalidate register cache
5028 before fetching inferior's registers.
5029
28eef672
AA
50302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5031
5032 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5033 while-loop as for-loop.
5034 (regsets_store_inferior_registers): Likewise.
5035
bdca27a2
YQ
50362014-11-28 Yao Qi <yao@codesourcery.com>
5037
5038 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5039 * config.in, configure: Re-generate.
5040 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5041 is defined.
5042
9c232dda
YQ
50432014-11-21 Yao Qi <yao@codesourcery.com>
5044
5045 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5046 (AC_CHECK_HEADERS): Remove malloc.h.
5047 * configure: Re-generated.
5048 * config.in: Re-generated.
5049 * server.h: Don't include alloca.h and malloc.h.
5050 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5051 Don't include malloc.h.
5052
43968415
JB
50532014-11-17 Joel Brobecker <brobecker@adacore.com>
5054
5055 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5056 corresponding ERRNO check in same block.
5057
40e91bc7
PA
50582014-11-12 Pedro Alves <palves@redhat.com>
5059
5060 * server.c (cont_thread): Update comment.
5061 (start_inferior, attach_inferior): No longer clear cont_thread.
5062 (handle_v_cont): No longer set cont_thread.
5063 (captured_main): Clear cont_thread each time a GDB connects.
5064
c2c118cf
PA
50652014-11-12 Pedro Alves <palves@redhat.com>
5066
5067 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5068 thread, and don't resume all threads if the Hc thread has exited.
5069
78708b7c
PA
50702014-11-12 Pedro Alves <palves@redhat.com>
5071
5072 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5073 the process group instead of to a specific LWP.
5074
a2abc7de
PA
50752014-10-15 Pedro Alves <palves@redhat.com>
5076
5077 PR server/17487
5078 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5079 parameter.
5080 (arm_set_thread_context): Delete.
5081 (the_low_target): Adjust.
5082 * win32-i386-low.c (debug_registers_changed)
5083 (debug_registers_used): Delete.
5084 (update_debug_registers_callback): New function.
5085 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5086 needing to update their debug registers.
5087 (win32_get_current_dr): New function.
5088 (x86_dr_low_get_addr, x86_dr_low_get_control)
5089 (x86_dr_low_get_status): Fetch the debug register from the thread
5090 record's context.
5091 (i386_initial_stuff): Adjust.
5092 (i386_get_thread_context): Remove current_event parameter. Don't
5093 clear debug_registers_changed nor copy DR values to
5094 debug_reg_state.
5095 (i386_set_thread_context): Delete.
5096 (i386_prepare_to_resume): New function.
5097 (i386_thread_added): Mark the thread as needing to update irs
5098 debug registers.
5099 (the_low_target): Remove i386_set_thread_context and install
5100 i386_prepare_to_resume.
5101 * win32-low.c (win32_get_thread_context): Adjust.
5102 (win32_set_thread_context): Use SetThreadContext
5103 directly.
5104 (win32_prepare_to_resume): New function.
5105 (win32_require_context): New function, factored out from ...
5106 (thread_rec): ... this.
5107 (continue_one_thread): Call win32_prepare_to_resume on each thread
5108 we're about to continue.
5109 (win32_resume): Call win32_prepare_to_resume on the event thread.
5110 * win32-low.h (struct win32_thread_info)
5111 <debug_registers_changed>: New field.
5112 (struct win32_target_ops): Change prototype of set_thread_context,
5113 delete set_thread_context and add prepare_to_resume.
5114 (win32_require_context): New declaration.
5115
a442d071
GB
51162014-10-08 Gary Benson <gbenson@redhat.com>
5117
5118 * server.h: Do not include common-exceptions.h.
5119
6f1947e8
GB
51202014-10-08 Gary Benson <gbenson@redhat.com>
5121
5122 * server.h: Do not include cleanups.h.
5123
63b434a4
JH
51242014-09-30 James Hogan <james.hogan@imgtec.com>
5125
5126 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5127 mips64-dsp-linux.c.
5128
c4d9ceb6
YQ
51292014-09-23 Yao Qi <yao@codesourcery.com>
5130
5131 * linux-low.c (lp_status_maybe_breakpoint): New function.
5132 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5133 (count_events_callback): Likewise.
5134 (select_event_lwp_callback): Likewise.
5135 (cancel_breakpoints_callback): Likewise.
5136
89a5711c
DB
51372014-09-19 Don Breazeal <donb@codesourcery.com>
5138
5139 * linux-low.c (handle_extended_wait): Call
5140 linux_ptrace_get_extended_event.
5141 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5142 linux_is_extended_waitstatus.
5143
bffc0964
JB
51442014-09-16 Joel Brobecker <brobecker@adacore.com>
5145
5146 * Makefile.in (CPPFLAGS): Define.
5147 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5148 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5149
0bfdf32f
GB
51502014-09-16 Gary Benson <gbenson@redhat.com>
5151
5152 * inferiors.h (current_inferior): Renamed as...
5153 (current_thread): New variable. All uses updated.
5154 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5155 (maybe_move_out_of_jump_pad): Likewise.
5156 (cancel_breakpoint): Likewise.
5157 (linux_low_filter_event): Likewise.
5158 (wait_for_sigstop): Likewise.
5159 (linux_resume_one_lwp): Likewise.
5160 (need_step_over_p): Likewise.
5161 (start_step_over): Likewise.
5162 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5163 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5164 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5165 and save_inferior as saved_thread.
5166 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5167 saved_thread.
5168 (regcache_invalidate_thread): Likewise.
5169 * remote-utils.c (prepare_resume_reply): Likewise.
5170 * thread-db.c (thread_db_get_tls_address): Likewise.
5171 (disable_thread_event_reporting): Likewise.
5172 (remove_thread_event_breakpoints): Likewise.
5173 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5174 as saved_thread.
5175 * target.h (set_desired_inferior): Renamed as...
5176 (set_desired_thread): New declaration. All uses updated.
5177 * server.c (myresume): Updated comment to reference thread instead
5178 of inferior.
5179 (handle_serial_event): Likewise.
5180 (handle_target_event): Likewise.
5181
361c8ade
GB
51822014-09-12 Tom Tromey <tromey@redhat.com>
5183 Gary Benson <gbenson@redhat.com>
5184
5185 * regcache.h: Include common-regcache.h.
5186 (regcache_read_pc): Don't declare.
5187 * regcache.c (get_thread_regcache_for_ptid): New function.
5188
bd9269f7
GB
51892014-09-11 Tom Tromey <tromey@redhat.com>
5190 Gary Benson <gbenson@redhat.com>
5191
5192 * symbol.c: New file.
5193 * Makefile.in (SFILES): Add symbol.c.
5194 (OBS): Add symbol.o.
5195
f8c1d06b
GB
51962014-09-11 Gary Benson <gbenson@redhat.com>
5197
5198 * target.c (target_stop_ptid, target_continue_ptid): New
5199 functions.
5200
721ec300
GB
52012014-09-11 Tom Tromey <tromey@redhat.com>
5202 Gary Benson <gbenson@redhat.com>
5203
5204 * target.h: Include target/target.h.
5205 * target.c (target_read_memory, target_read_uint32)
5206 (target_write_memory): New functions.
5207
c5e92cca
GB
52082014-09-11 Gary Benson <gbenson@redhat.com>
5209
5210 * server.h (debug_hw_points): Don't declare.
5211 * server.c (debug_hw_points): Don't define. Replace all uses
5212 with show_debug_regs.
5213 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5214 all uses with show_debug_regs.
5215
2e4bb98a
EBM
52162014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5217
5218 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5219 endianness into account.
5220 (ppc_supply_ptrace_register): Likewise.
5221
ac740bc7
JH
52222014-09-03 James Hogan <james.hogan@imgtec.com>
5223
5224 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5225 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5226
97ea6506
GB
52272014-09-03 Gary Benson <gbenson@redhat.com>
5228
5229 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5230 ALL_DEBUG_ADDRESS_REGISTERS.
5231
df7e5265
GB
52322014-09-02 Gary Benson <gbenson@redhat.com>
5233
5234 * i386-low.h: Renamed as...
5235 * x86-low.h: New file. All type, function and variable name
5236 prefixes changed from "i386_" to "x86_". All references updated.
5237 * i386-low.c: Renamed as...
5238 * x86-low.c: New file. All type, function and variable name
5239 prefixes changed from "i386_" to "x86_". All references updated.
5240
ed859da7
GB
52412014-09-02 Gary Benson <gbenson@redhat.com>
5242
5243 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5244 (x86_linux_new_thread): Likewise.
5245
860789c7
GB
52462014-08-29 Gary Benson <gbenson@redhat.com>
5247
5248 * server.h (setjmp.h): Do not include.
5249 (toplevel): Do not declare.
5250 (common-exceptions.h): Include.
5251 (cleanups.h): Likewise.
5252 * server.c (toplevel): Do not define.
5253 (exit_code): New static global.
5254 (detach_or_kill_for_exit_cleanup): New function.
5255 (main): New function. Original main renamed to...
5256 (captured_main): New function.
5257 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5258
ff55e1b5
GB
52592014-08-29 Gary Benson <gbenson@redhat.com>
5260
5261 * Makefile.in (SFILES): Add common/common-exceptions.c.
5262 (OBS): Add common-exceptions.o.
5263 (common-exceptions.o): New rule.
5264 * utils.c (prepare_to_throw_exception): New function.
5265
e9bcb658
GB
52662014-08-29 Gary Benson <gbenson@redhat.com>
5267
5268 * config.in: Regenerate.
5269 * configure: Likewise.
5270
e3180625
GB
52712014-08-29 Gary Benson <gbenson@redhat.com>
5272
5273 * Makefile.in (SFILES): Add common/cleanups.c.
5274 (OBS): cleanups.o.
5275 (cleanups.o): New rule.
5276
e3d6ba5d
GB
52772014-08-29 Gary Benson <gbenson@redhat.com>
5278
5279 * utils.c (internal_vwarning): New function.
5280
7096e886
GB
52812014-08-28 Gary Benson <gbenson@redhat.com>
5282
5283 * utils.h (fatal): Remove declaration.
5284 * utils.c (fatal): Remove function.
5285
14ce3192
GB
52862014-08-28 Gary Benson <gbenson@redhat.com>
5287
5288 * tracepoint.c (gdb_agent_init): Replace fatal with
5289 perror_with_name.
5290 (initialize_tracepoint): Likewise.
5291
50278d59
GB
52922014-08-28 Gary Benson <gbenson@redhat.com>
5293
5294 * remote-utils.c (remote_prepare): Replace fatal with error.
5295
aa96c426
GB
52962014-08-28 Gary Benson <gbenson@redhat.com>
5297
5298 * linux-low.c (linux_async): Replace fatal with warning.
5299 Tidy up and return.
5300 (linux_start_non_stop): Return -1 if linux_async failed.
5301
f7160e97
GB
53022014-08-28 Gary Benson <gbenson@redhat.com>
5303
5304 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5305 gdb_assert.
5306 (i386_dr_low_get_addr): Remove vague comment.
5307 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5308 gdb_assert.
5309
38e08fca
GB
53102014-08-28 Gary Benson <gbenson@redhat.com>
5311
5312 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5313 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5314 internal_error.
5315 (linux_resume_one_lwp): Likewise.
5316 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5317 gdb_assert.
5318 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5319 with internal_error.
5320 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5321 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5322 (find_register_by_name): Replace fatal with internal_error.
5323 (find_regno): Likewise.
5324 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5325 * thread-db.c (thread_db_create_event): Likewise.
5326 (thread_db_load_search): Likewise.
5327 (try_thread_db_load_1): Likewise.
5328 * tracepoint.c (get_jump_space_head): Replace fatal with
5329 internal_error.
5330 (claim_trampoline_space): Likewise.
5331 (have_fast_tracepoint_trampoline_buffer): Likewise.
5332 (cmd_qtstart): Likewise.
5333 (stop_tracing): Likewise.
5334 (fast_tracepoint_collecting): Likewise.
5335 (target_malloc): Likewise.
5336 (download_tracepoint): Likewise.
5337 (download_trace_state_variables): Replace check with gdb_assert.
5338 (upload_fast_traceframes): Replace fatal with internal_error.
5339
34abf635
GB
53402014-08-19 Tom Tromey <tromey@redhat.com>
5341 Gary Benson <gbenson@redhat.com>
5342
5343 * Makefile.in (SFILES): Add common/common-debug.c.
5344 (OBS): Add common-debug.o.
5345 (common-debug.o): New rule.
5346 * debug.h (debug_printf): Don't declare.
5347 * debug.c (debug_printf): Renamed and rewritten as...
5348 (debug_vprintf): New function.
5349
f6e94d78
GB
53502014-08-19 Gary Benson <gbenson@redhat.com>
5351
5352 * utils.h: Do not include print-utils.h.
5353
9239eeab
GB
53542014-08-19 Tom Tromey <tromey@redhat.com>
5355 Gary Benson <gbenson@redhat.com>
5356
5357 * server.h: Add static assertion.
5358 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5359
ef87c8bb
GB
53602014-08-19 Tom Tromey <tromey@redhat.com>
5361 Gary Benson <gbenson@redhat.com>
5362
5363 * Makefile.in (SFILES): Add common/errors.c.
5364 (OBS): Add errors.o.
5365 (IPA_OBS): Add errors-ipa.o.
5366 (errors.o): New rule.
5367 (errors-ipa.o): Likewise.
5368 * utils.h (perror_with_name, error, warning): Don't declare.
5369 * utils.c (warning): Renamed and rewritten as...
5370 (vwarning): New function.
5371 (error): Renamed and rewritten as...
5372 (verror): New function.
5373 (internal_error): Renamed and rewritten as...
5374 (internal_verror): New function.
5375
bb974a24
GB
53762014-08-07 Gary Benson <gbenson@redhat.com>
5377
5378 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5379 * configure: Regenerate.
5380 * config.in: Likewise.
5381 * server.h: Do not include errno.h.
5382 * event-loop.c: Likewise.
5383 * hostio-errno.c: Likewise.
5384 * linux-low.c: Likewise.
5385 * remote-utils.c: Likewise.
5386 * spu-low.c: Likewise.
5387 * utils.c: Likewise.
5388 * gdbreplay.c: Unconditionally include errno.h.
5389
6d3d12eb
GB
53902014-08-07 Gary Benson <gbenson@redhat.com>
5391
5392 * server.h: Do not include string.h.
5393 * event-loop.c: Likewise.
5394 * linux-low.c: Likewise.
5395 * regcache.c: Likewise.
5396 * remote-utils.c: Likewise.
5397 * spu-low.c: Likewise.
5398 * utils.c: Likewise.
5399
dccbb609
GB
54002014-08-07 Gary Benson <gbenson@redhat.com>
5401
5402 * server.h: Do not include gdb_assert.h.
5403
e76df0d0
GB
54042014-08-07 Gary Benson <gbenson@redhat.com>
5405
5406 * server.h: Do not include common-utils.h.
5407
4cb9c816
GB
54082014-08-07 Gary Benson <gbenson@redhat.com>
5409
5410 * server.h: Do not include ptid.h.
5411 * notif.h: Likewise.
5412
3995eeee
GB
54132014-08-07 Gary Benson <gbenson@redhat.com>
5414
5415 * server.h: Do not include gdb_locale.h.
5416
cb9f1a9b
GB
54172014-08-07 Gary Benson <gbenson@redhat.com>
5418
5419 * server.h: Do not include gdb/signals.h.
5420 * win32-low.c: Likewise.
5421
a5fceff8
GB
54222014-08-07 Gary Benson <gbenson@redhat.com>
5423
5424 * server.h: Do not include pathmax.h.
5425
b9391142
GB
54262014-08-07 Gary Benson <gbenson@redhat.com>
5427
5428 * server.h: Do not include libiberty.h.
5429 * linux-bfin-low.c: Likewise.
5430
0e443c87
GB
54312014-08-07 Gary Benson <gbenson@redhat.com>
5432
5433 * server.h: Do not include ansidecl.h.
5434
8ebb3f56
GB
54352014-08-07 Gary Benson <gbenson@redhat.com>
5436
5437 * linux-x86-low.c: Do not include stddef.h.
5438 * lynx-ppc-low.c: Likewise.
5439 * tracepoint.c: Likewise.
5440
8980bdf6
GB
54412014-08-07 Gary Benson <gbenson@redhat.com>
5442
5443 * server.h: Do not include stdarg.h.
5444 * nto-low.c: Likewise.
5445
d7096f71
GB
54462014-08-07 Gary Benson <gbenson@redhat.com>
5447
5448 * server.h: Do not include stdlib.h.
5449 * inferiors.c: Likewise.
5450 * linux-low.c: Likewise.
5451 * regcache.c: Likewise.
5452 * spu-low.c: Likewise.
5453 * tracepoint.c: Likewise.
5454 * utils.c: Likewise.
5455
d02f550d
GB
54562014-08-07 Gary Benson <gbenson@redhat.com>
5457
5458 * server.h: Do not include stdio.h.
5459 * linux-low.c: Likewise.
5460 * remote-utils.c: Likewise.
5461 * spu-low.c: Likewise.
5462 * utils.c: Likewise.
5463 * wincecompat.c: Likewise.
5464
87f6c4e3
GB
54652014-08-06 Gary Benson <gbenson@redhat.com>
5466
5467 * regcache.c (init_register_cache): Move conditionals inside if.
5468
7089dca4
GB
54692014-08-06 Gary Benson <gbenson@redhat.com>
5470
5471 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5472
462f517e
GB
54732014-07-31 Gary Benson <gbenson@redhat.com>
5474
5475 * ax.h: Do not include server.h.
5476 * gdbthread.h: Likewise.
5477 * lynx-low.h: Likewise.
5478 * notif.h: Likewise.
5479
976411d6
GB
54802014-07-30 Gary Benson <gbenson@redhat.com>
5481
5482 * server.h: Include common-defs.h.
5483 Do not include config.h or build-gnulib-gdbserver/config.h.
5484
d41f6d8e
GB
54852014-07-30 Gary Benson <gbenson@redhat.com>
5486
5487 * hostio-errno.c: Move server.h to top of includes list.
5488 * inferiors.c: Likewise.
5489 * linux-x86-low.c: Likewise.
5490 * notif.c: Include server.h.
5491
314c6a35
TT
54922014-07-24 Tom Tromey <tromey@redhat.com>
5493 Gary Benson <gbenson@redhat.com>
5494
5495 * server.h (CORE_ADDR): Now unsigned.
5496
69ff6be5
PA
54972014-07-16 Pedro Alves <palves@redhat.com>
5498
5499 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5500
ce9e3fe7
PA
55012014-07-15 Pedro Alves <palves@redhat.com>
5502
5503 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5504 copy.
5505
e76126e8
PA
55062014-07-11 Pedro Alves <palves@redhat.com>
5507
5508 * linux-low.c (kill_wait_lwp): New function, based on
5509 kill_one_lwp_callback, but use my_waitpid directly.
5510 (kill_one_lwp_callback, linux_kill): Use it.
5511
8e9db26e
PA
55122014-06-23 Pedro Alves <palves@redhat.com>
5513
5514 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5515 before setting DR0..DR3.
5516
698b3e08
GB
55172014-06-20 Gary Benson <gbenson@redhat.com>
5518
5519 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5520 * configure: Regenerated.
5521 * config.in: Likewise.
5522
125f8a3d
GB
55232014-06-20 Gary Benson <gbenson@redhat.com>
5524
5525 * Makefile.in (SFILES): Update locations for files moved
5526 from common to nat.
5527 (object file files): Reordered.
5528
42995dbd
GB
55292014-06-20 Gary Benson <gbenson@redhat.com>
5530
5531 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5532 (i386_dr_low_set_addr): Likewise.
5533 (i386_dr_low_get_addr): Likewise.
5534 (i386_dr_low_can_set_control): Likewise.
5535 (i386_dr_low_set_control): Likewise.
5536 (i386_dr_low_get_control): Likewise.
5537 (i386_dr_low_get_status): Likewise.
5538 (i386_get_debug_register_length): Likewise.
5539 * linux-x86-low.c (i386_dr_low_set_addr):
5540 Changed signature. Made static.
5541 (i386_dr_low_get_addr): Likewise.
5542 (i386_dr_low_set_control): Likewise.
5543 (i386_dr_low_get_control): Likewise.
5544 (i386_dr_low_get_status): Likewise.
5545 (i386_dr_low): New global variable.
5546 * win32-i386-low.c (i386_dr_low_set_addr):
5547 Changed signature. Made static.
5548 (i386_dr_low_get_addr): Likewise.
5549 (i386_dr_low_set_control): Likewise.
5550 (i386_dr_low_get_control): Likewise.
5551 (i386_dr_low_get_status): Likewise.
5552 (i386_dr_low): New global variable.
5553
e1d2394b
MS
55542014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5555
5556 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5557 * Makefile.in (AR, AR_FLAGS): Define.
5558 * configure: Regenerate.
5559
3a8ee006
GB
55602014-06-19 Gary Benson <gbenson@redhat.com>
5561
5562 * Makefile.in (i386-dregs.o): New rule.
5563 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5564 * i386-low.c (target.h): Remove include.
5565 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5566 (DR_CONTROL_SHIFT): Likewise.
5567 (DR_CONTROL_SIZE): Likewise.
5568 (DR_RW_EXECUTE): Likewise.
5569 (DR_RW_WRITE): Likewise.
5570 (DR_RW_READ): Likewise.
5571 (DR_RW_IORW): Likewise.
5572 (DR_LEN_1): Likewise.
5573 (DR_LEN_2): Likewise.
5574 (DR_LEN_4): Likewise.
5575 (DR_LEN_8): Likewise.
5576 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5577 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5578 (DR_ENABLE_SIZE): Likewise.
5579 (DR_LOCAL_SLOWDOWN): Likewise.
5580 (DR_GLOBAL_SLOWDOWN): Likewise.
5581 (DR_CONTROL_RESERVED): Likewise.
5582 (I386_DR_CONTROL_MASK): Likewise.
5583 (I386_DR_VACANT): Likewise.
5584 (I386_DR_LOCAL_ENABLE): Likewise.
5585 (I386_DR_GLOBAL_ENABLE): Likewise.
5586 (I386_DR_DISABLE): Likewise.
5587 (I386_DR_SET_RW_LEN): Likewise.
5588 (I386_DR_GET_RW_LEN): Likewise.
5589 (I386_DR_WATCH_HIT): Likewise.
5590 (i386_wp_op_t): Likewise.
5591 (i386_show_dr): Likewise.
5592 (i386_length_and_rw_bits): Likewise.
5593 (i386_insert_aligned_watchpoint): Likewise.
5594 (i386_remove_aligned_watchpoint): Likewise.
5595 (i386_handle_nonaligned_watchpoint): Likewise.
5596 i386_update_inferior_debug_regs(): Likewise.
5597 (i386_dr_insert_watchpoint): Likewise.
5598 (i386_dr_remove_watchpoint): Likewise.
5599 (i386_dr_region_ok_for_watchpoint): Likewise.
5600 (i386_dr_stopped_data_address): Likewise.
5601 (i386_dr_stopped_by_watchpoint): Likewise.
5602
8f26655c
GB
56032014-06-19 Gary Benson <gbenson@redhat.com>
5604
5605 * i386-low.c (i386_dr_show): Renamed to
5606 i386_show_dr and made static. All uses updated.
5607 (i386_dr_length_and_rw_bits): Renamed to
5608 i386_length_and_rw_bits and made static.
5609 All uses updated.
5610 (i386_dr_insert_aligned_watchpoint): Renamed to
5611 i386_insert_aligned_watchpoint and made static.
5612 All uses updated.
5613 (i386_dr_remove_aligned_watchpoint): Renamed to
5614 i386_remove_aligned_watchpoint and made static.
5615 All uses updated.
5616 (i386_dr_update_inferior_debug_regs): Renamed to
5617 i386_update_inferior_debug_regs and made static.
5618 All uses updated.
5619
b9228891
GB
56202014-06-18 Gary Benson <gbenson@redhat.com>
5621
5171def3
GB
5622 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5623 (i386_dr_low_can_set_control): Likewise.
5624 (i386_get_debug_register_length): Likewise.
5625 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5626 (i386_dr_low_can_set_control): Likewise.
5627 (i386_get_debug_register_length): Likewise.
5628
56292014-06-17 Gary Benson <gbenson@redhat.com>
5630
b9228891
GB
5631 * i386-low.h (i386-dregs.h): New include.
5632 (DR_FIRSTADDR): Now in i386-dregs.h.
5633 (DR_LASTADDR): Likewise.
5634 (DR_NADDR): Likewise.
5635 (DR_STATUS): Likewise.
5636 (DR_CONTROL): Likewise.
5637 (i386_debug_reg_state): Likewise.
5638 (i386_dr_insert_watchpoint): Likewise.
5639 (i386_dr_remove_watchpoint): Likewise.
5640 (i386_dr_region_ok_for_watchpoint): Likewise.
5641 (i386_dr_stopped_data_address): Likewise.
5642 (i386_dr_stopped_by_watchpoint): Likewise.
5643 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5644
4be83cc2
GB
56452014-06-18 Gary Benson <gbenson@redhat.com>
5646
5647 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5648 i386_dr_insert_watchpoint.
5649 (i386_low_remove_watchpoint): Renamed to
5650 i386_dr_remove_watchpoint.
5651 (i386_low_region_ok_for_watchpoint): Renamed to
5652 i386_dr_region_ok_for_watchpoint.
5653 (i386_low_stopped_data_address): Renamed to
5654 i386_dr_stopped_data_address.
5655 (i386_low_stopped_by_watchpoint): Renamed to
5656 i386_dr_stopped_by_watchpoint.
5657 * i386-low.c (i386_show_dr): Renamed to
5658 i386_dr_show and made nonstatic. All uses updated.
5659 (i386_length_and_rw_bits): Renamed to
5660 i386_dr_length_and_rw_bits and made nonstatic.
5661 All uses updated.
5662 (i386_insert_aligned_watchpoint): Renamed to
5663 i386_dr_insert_aligned_watchpoint and made nonstatic.
5664 All uses updated.
5665 (i386_remove_aligned_watchpoint): Renamed to
5666 i386_dr_remove_aligned_watchpoint and made nonstatic.
5667 All uses updated.
5668 (i386_update_inferior_debug_regs): Renamed to
5669 i386_dr_update_inferior_debug_regs and made nonstatic.
5670 All uses updated.
5671 (i386_low_insert_watchpoint): Renamed to
5672 i386_dr_insert_watchpoint. All uses updated.
5673 (i386_low_remove_watchpoint): Renamed to
5674 i386_dr_remove_watchpoint. All uses updated.
5675 (i386_low_region_ok_for_watchpoint): Renamed to
5676 i386_dr_region_ok_for_watchpoint. All uses updated.
5677 (i386_low_stopped_data_address): Renamed to
5678 i386_dr_stopped_data_address. All uses updated.
5679 (i386_low_stopped_by_watchpoint): Renamed to
5680 i386_dr_stopped_by_watchpoint. All uses updated.
5681
131aa0d4
GB
56822014-06-18 Gary Benson <gbenson@redhat.com>
5683
5684 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5685 (i386_dr_low_can_set_control): Likewise.
5686 (i386_insert_aligned_watchpoint): New check.
5687
d9305f7f
GB
56882014-06-18 Gary Benson <gbenson@redhat.com>
5689
5690 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5691 Renamed to state.
5692
e927c9fc
GB
56932014-06-18 Gary Benson <gbenson@redhat.com>
5694
5695 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5696 instead of fatal and error.
5697 (i386_handle_nonaligned_watchpoint): Likewise.
5698
1b6d4134
GB
56992014-06-18 Gary Benson <gbenson@redhat.com>
5700
5701 * i386-low.c (i386_get_debug_register_length): New macro.
5702 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5703 (i386_show_dr): Use debug_printf instead of fprintf. Use
5704 phex to format values.
5705
6e62758f
GB
57062014-06-18 Gary Benson <gbenson@redhat.com>
5707
5708 * i386-low.h: Comment changes.
5709 * i386-low.c: Likewise.
5710
fc6e2f03
GB
57112014-06-18 Gary Benson <gbenson@redhat.com>
5712
5713 * i386-low.c: Whitespace changes.
5714
f9d1eeed
TT
57152014-06-12 Tom Tromey <tromey@redhat.com>
5716
5717 * utils.c (freeargv): Remove.
5718
0b04e523
TT
57192014-06-12 Tom Tromey <tromey@redhat.com>
5720
5721 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5722 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5723 (parse_debug_format_options): Likewise.
5724 (gdbserver_usage): Likewise.
5725 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5726 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5727 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5728 against libiberty.
5729 ($(LIBGNU)): Depend on libiberty.
5730 (all-lib): Recurse into all subdirs.
5731 (install-only): Invoke "install" target in subdirs.
5732 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5733 targets.
5734 * configure: Rebuild.
5735 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5736 for vasprintf, vsnprintf, or gettimeofday.
5737 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5738 srv_tgtobj.
5739
270c9937
JB
57402014-06-05 Joel Brobecker <brobecker@adacore.com>
5741
5742 * development.sh: Delete.
5743 * Makefile.in (config.status): Adjust dependency on development.sh.
5744 * configure.ac: Adjust development.sh source call.
5745 * configure: Regenerate.
5746
0a261ed8
PA
57472014-06-02 Pedro Alves <palves@redhat.com>
5748
5749 * ax.c (gdb_free_agent_expr): New function.
5750 * ax.h (gdb_free_agent_expr): New declaration.
5751 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5752 list.
5753 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5754 static.
5755 (clear_breakpoint_conditions_and_commands): New function.
5756 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5757 (clear_breakpoint_conditions_and_commands): New declaration.
5758
e9dae05e
RR
57592014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5760
5761 * linux-aarch64-low.c (asm/ptrace.h): Include.
5762
5876f503
JK
57632014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5764
5765 Fix TLS access for -static -pthread.
5766 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5767 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5768 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5769
802e8e6d
PA
57702014-05-20 Pedro Alves <palves@redhat.com>
5771
5772 * linux-aarch64-low.c (aarch64_insert_point)
5773 (aarch64_remove_point): No longer check whether the type is
5774 supported here. Adjust to new interface.
5775 (the_low_target): Install aarch64_supports_z_point_type as
5776 supports_z_point_type method.
5777 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5778 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5779 instead of a Z packet char. Adjust.
5780 (arm_supports_z_point_type): New function.
5781 (arm_insert_point, arm_remove_point): Adjust to new interface.
5782 (the_low_target): Install arm_supports_z_point_type.
5783 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5784 (cris_insert_point, cris_remove_point): Adjust to new interface.
5785 Don't check whether the type is supported here.
5786 (the_low_target): Install cris_supports_z_point_type.
5787 * linux-low.c (linux_supports_z_point_type): New function.
5788 (linux_insert_point, linux_remove_point): Adjust to new interface.
5789 * linux-low.h (struct linux_target_ops) <insert_point,
5790 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5791 raw_breakpoint pointer parameter.
5792 <supports_z_point_type>: New method.
5793 * linux-mips-low.c (mips_supports_z_point_type): New function.
5794 (mips_insert_point, mips_remove_point): Adjust to new interface.
5795 Use mips_supports_z_point_type.
5796 (the_low_target): Install mips_supports_z_point_type.
5797 * linux-ppc-low.c (the_low_target): Install NULL as
5798 supports_z_point_type method.
5799 * linux-s390-low.c (the_low_target): Install NULL as
5800 supports_z_point_type method.
5801 * linux-sparc-low.c (the_low_target): Install NULL as
5802 supports_z_point_type method.
5803 * linux-x86-low.c (x86_supports_z_point_type): New function.
5804 (x86_insert_point): Adjust to new insert_point interface. Use
5805 insert_memory_breakpoint. Adjust to new
5806 i386_low_insert_watchpoint interface.
5807 (x86_remove_point): Adjust to remove_point interface. Use
5808 remove_memory_breakpoint. Adjust to new
5809 i386_low_remove_watchpoint interface.
5810 (the_low_target): Install x86_supports_z_point_type.
5811 * lynx-low.c (lynx_target_ops): Install NULL as
5812 supports_z_point_type callback.
5813 * nto-low.c (nto_supports_z_point_type): New.
5814 (nto_insert_point, nto_remove_point): Adjust to new interface.
5815 (nto_target_ops): Install nto_supports_z_point_type.
5816 * mem-break.c: Adjust intro comment.
5817 (struct raw_breakpoint) <raw_type, size>: New fields.
5818 <inserted>: Update comment.
5819 <shlib_disabled>: Delete field.
5820 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5821 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5822 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5823 (raw_bkpt_type_to_target_hw_bp_type): New function.
5824 (find_enabled_raw_code_breakpoint_at): New function.
5825 (find_raw_breakpoint_at): New type and size parameters. Use them.
5826 (insert_memory_breakpoint): New function, based off
5827 set_raw_breakpoint_at.
5828 (remove_memory_breakpoint): New function.
5829 (set_raw_breakpoint_at): Reimplement.
5830 (set_breakpoint): New, based on set_breakpoint_at.
5831 (set_breakpoint_at): Reimplement.
5832 (delete_raw_breakpoint): Go through the_target->remove_point
5833 instead of assuming memory breakpoints.
5834 (find_gdb_breakpoint_at): Delete.
5835 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5836 (find_gdb_breakpoint): New function.
5837 (set_gdb_breakpoint_at): Delete.
5838 (z_type_supported): New function.
5839 (set_gdb_breakpoint_1): New function, loosely based off
5840 set_gdb_breakpoint_at.
5841 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5842 (delete_gdb_breakpoint_at): Delete.
5843 (delete_gdb_breakpoint_1): New function, loosely based off
5844 delete_gdb_breakpoint_at.
5845 (delete_gdb_breakpoint): New function.
5846 (clear_gdb_breakpoint_conditions): Rename to ...
5847 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5848 breakpoint.
5849 (add_condition_to_breakpoint): Make static.
5850 (add_breakpoint_condition): Take a struct breakpoint pointer
5851 instead of an address. Adjust.
5852 (gdb_condition_true_at_breakpoint): Rename to ...
5853 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5854 z_type parameter.
5855 (gdb_condition_true_at_breakpoint): Reimplement.
5856 (add_breakpoint_commands): Take a struct breakpoint pointer
5857 instead of an address. Adjust.
5858 (gdb_no_commands_at_breakpoint): Rename to ...
5859 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5860 parameter. Return true if no breakpoint was found. Change debug
5861 output.
5862 (gdb_no_commands_at_breakpoint): Reimplement.
5863 (run_breakpoint_commands): Rename to ...
5864 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5865 and change return type to boolean.
5866 (run_breakpoint_commands): New function.
5867 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5868 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5869 breakpoint. Go through the_target->remove_point instead of
5870 assuming memory breakpoint.
5871 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5872 software and hardware breakpoints.
5873 (reinsert_raw_breakpoint): Go through the_target->insert_point
5874 instead of assuming memory breakpoint.
5875 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5876 software and hardware breakpoints.
5877 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5878 Check both software and hardware breakpoints.
5879 (validate_inserted_breakpoint): Assert the breakpoint is a
5880 software breakpoint. Set the inserted flag to -1 instead of
5881 setting shlib_disabled.
5882 (delete_disabled_breakpoints): Adjust.
5883 (validate_breakpoints): Only validate software breakpoints.
5884 Adjust to inserted flag change.
5885 (check_mem_read, check_mem_write): Skip breakpoint types other
5886 than software breakpoints. Adjust to inserted flag change.
5887 * mem-break.h (enum raw_bkpt_type): New enum.
5888 (raw_breakpoint, struct process_info): Forward declare.
5889 (Z_packet_to_target_hw_bp_type): Delete declaration.
5890 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5891 (set_gdb_breakpoint, delete_gdb_breakpoint)
5892 (clear_breakpoint_conditions): New declarations.
5893 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5894 (breakpoint_inserted_here): Update comment.
5895 (add_breakpoint_condition, add_breakpoint_commands): Replace
5896 address parameter with a breakpoint pointer parameter.
5897 (gdb_breakpoint_here): Update comment.
5898 (delete_gdb_breakpoint_at): Delete.
5899 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5900 * server.c (process_point_options): Take a struct breakpoint
5901 pointer instead of an address. Adjust.
5902 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5903 delete_gdb_breakpoint.
5904 * spu-low.c (spu_target_ops): Install NULL as
5905 supports_z_point_type method.
5906 * target.h: Include mem-break.h.
5907 (struct target_ops) <prepare_to_access_memory>: Update comment.
5908 <supports_z_point_type>: New field.
5909 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5910 instead of a char. Also take a raw breakpoint pointer.
5911 * win32-arm-low.c (the_low_target): Install NULL as
5912 supports_z_point_type.
5913 * win32-i386-low.c (i386_supports_z_point_type): New function.
5914 (i386_insert_point, i386_remove_point): Adjust to new interface.
5915 (the_low_target): Install i386_supports_z_point_type.
5916 * win32-low.c (win32_supports_z_point_type): New function.
5917 (win32_insert_point, win32_remove_point): Adjust to new interface.
5918 (win32_target_ops): Install win32_supports_z_point_type.
5919 * win32-low.h (struct win32_target_ops):
5920 <supports_z_point_type>: New method.
5921 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5922 instead of a char. Also take a raw breakpoint pointer.
5923
932539e3
PA
59242014-05-20 Pedro Alves <palves@redhat.com>
5925
5926 * mem-break.h: Include break-common.h.
5927 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5928 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5929 (Z_packet_to_target_hw_bp_type): New declaration.
5930 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5931 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5932 (Z_PACKET_ACCESS_WP): Delete macros.
5933 (Z_packet_to_hw_type): Delete function.
5934 * i386-low.h: Don't include break-common.h here.
5935 (Z_packet_to_hw_type): Delete declaration.
5936 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5937 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5938 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5939 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5940 * linux-aarch64-low.c: Don't include break-common.h here.
5941 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5942 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5943 (Z_packet_to_target_hw_bp_type): Delete function.
5944 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5945 function.
5946 (mips_insert_point, mips_remove_point): Use
5947 Z_packet_to_target_hw_bp_type.
5948
4ff0d3d8
PA
59492014-05-20 Pedro Alves <palves@redhat.com>
5950
5951 * linux-aarch64-low.c: Include break-common.h.
5952 (enum target_point_type): Delete.
5953 (Z_packet_to_point_type): Rename to ...
5954 (Z_packet_to_target_hw_bp_type): ... this, and return a
5955 target_hw_bp_type instead.
5956 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5957 instead of an enum target_point_type.
5958 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5959 breakpoint type.
5960 (aarch64_dr_state_insert_one_point)
5961 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5962 (aarch64_handle_aligned_watchpoint)
5963 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5964 Take an enum target_hw_bp_type instead of an enum
5965 target_point_type.
5966 (aarch64_supports_z_point_type): New function.
5967 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5968 use Z_packet_to_target_hw_bp_type.
5969
786dc519
JB
59702014-05-20 Joel Brobecker <brobecker@adacore.com>
5971
5972 * configure.ac: Only use -Werror by default when DEVELOPMENT
5973 is true.
5974 * configure: Regenerate.
5975
9e0aa64f
JK
59762014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5977
5978 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5979 * linux-x86-low.c (X86_64_USER_REGS): New.
5980 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5981
2b577b92
YQ
59822014-04-28 Yao Qi <yao@codesourcery.com>
5983
5984 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5985 name.
5986
94611da2
PA
59872014-04-25 Pedro Alves <palves@redhat.com>
5988
5989 PR server/16255
5990 * linux-low.c (linux_attach_fail_reason_string): New function.
5991 (linux_attach_lwp): Delete.
5992 (linux_attach_lwp_1): Rename to ...
5993 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5994 argument. Remove "initial" parameter. Return int instead of
5995 void. Don't error or warn here.
5996 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5997 failure to attach to the tgid. Call warning when failing to
5998 attach to an lwp.
5999 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6000 argument. Remove "initial" parameter. Return int instead of
6001 void. Don't error or warn here.
6002 (linux_attach_fail_reason_string): New declaration.
6003 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6004 interface change. Use linux_attach_fail_reason_string.
6005
01f9f808
MS
60062014-04-24 Michael Sturm <michael.sturm@mintel.com>
6007 Walfred Tedeschi <walfred.tedeschi@intel.com>
6008
6009 * Makefile.in: Added rules to handle new files
6010 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6011 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6012 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6013 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6014 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6015 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6016 x32-avx512-linux.o.
6017 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6018 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6019 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6020 i386/x32-avx512.xml.
6021 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6022 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6023 i386/x32-avx512-linux.xml.
6024 * i387-fp.c (num_avx512_k_registers): New constant for number
6025 of K registers.
6026 (num_avx512_zmmh_low_registers): New constant for number of
6027 lower ZMM registers (0-15).
6028 (num_avx512_zmmh_high_registers): New constant for number of
6029 higher ZMM registers (16-31).
6030 (num_avx512_ymmh_registers): New contant for number of higher
6031 YMM registers (ymm16-31 added by avx521 on x86_64).
6032 (num_avx512_xmm_registers): New constant for number of higher
6033 XMM registers (xmm16-31 added by AVX512 on x86_64).
6034 (struct i387_xsave): Add space for AVX512 registers.
6035 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6036 Add code to handle AVX512 registers.
6037 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6038 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6039 prototypei from generated file.
6040 (tdesc_amd64_avx512_linux): Likewise.
6041 (init_registers_x32_avx512_linux): Likewise.
6042 (tdesc_x32_avx512_linux): Likewise.
6043 (init_registers_i386_avx512_linux): Likewise.
6044 (tdesc_i386_avx512_linux): Likewise.
6045 (x86_64_regmap): Add AVX512 registers.
6046 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6047 mask.
6048 (initialize_low_arch): Add code to initialize AVX512 registers.
6049
51aa91f9
PA
60502014-04-23 Pedro Alves <palves@redhat.com>
6051
6052 * mem-break.c (find_gdb_breakpoint_at): Make static.
6053 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6054
a4165e94
PA
60552014-04-23 Pedro Alves <palves@redhat.com>
6056
6057 * i386-low.c: Don't include break-common.h here.
6058 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6059 prototype to take target_hw_bp_type as argument instead of a Z
6060 packet char.
6061 * i386-low.h: Include break-common.h here.
6062 (Z_packet_to_hw_type): Declare.
6063 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6064 prototypes.
6065 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6066 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6067 (x86_remove_point): Convert the packet number to a
6068 target_hw_bp_type before calling i386_low_remove_watchpoint.
6069 * win32-i386-low.c (i386_insert_point): Convert the packet number
6070 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6071 (i386_remove_point): Convert the packet number to a
6072 target_hw_bp_type before calling i386_low_remove_watchpoint.
6073
b8acf843
PA
60742014-04-23 Pedro Alves <palves@redhat.com>
6075
6076 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6077
d708bcd1
PA
60782014-04-10 Pedro Alves <palves@redhat.com>
6079
6080 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6081 Check if the condition or command is NULL before checking if the
6082 breakpoint is known. On success, return true.
6083 * mem-break.h (add_breakpoint_condition): Document return.
6084 (add_breakpoint_commands): Add describing comment.
6085 * server.c (skip_to_semicolon): New function.
6086 (process_point_options): Use it.
6087
2eec7d5b
PA
60882014-04-09 Pedro Alves <palves@redhat.com>
6089
6090 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6091 to lwpid_of.
6092
fa96cb38
PA
60932014-02-27 Pedro Alves <palves@redhat.com>
6094
6095 PR 12702
6096 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6097 macros.
6098 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6099 output.
6100 (last_thread_of_process_p): Take a PID argument instead of a
6101 thread pointer.
6102 (linux_wait_for_lwp): Delete.
6103 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6104 functions.
6105 (linux_low_filter_event): New function, party factored out from
6106 linux_wait_for_event.
6107 (linux_wait_for_event): Rename to ...
6108 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6109 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6110 sigsuspend. Check for zombie leaders.
6111 (linux_wait_for_event): Reimplement as wrapper around
6112 linux_wait_for_event_filtered.
6113 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6114 a normal or signal exit is seen, it's the whole process exiting.
6115 (wait_for_sigstop): No longer a for_each_inferior callback.
6116 Rewrite on top of linux_wait_for_event_filtered.
6117 (stop_all_lwps): Call wait_for_sigstop directly.
6118 * server.c (resume, handle_target_event): Handle
6119 TARGET_WAITKIND_NO_RESUMED.
6120
d763de10
JB
61212014-02-26 Joel Brobecker <brobecker@adacore.com>
6122
6123 * win32-low.c (psapi_get_dll_name,
6124 * win32_CreateToolhelp32Snapshot): Delete.
6125 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6126 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6127 Delete.
6128 (handle_load_dll): Add function description.
6129 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6130
850a0f76
JB
61312014-02-26 Joel Brobecker <brobecker@adacore.com>
6132
6133 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6134 Add comment.
6135 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6136 base address when calling win32_add_one_solib.
6137 (handle_load_dll): Delete local variable load_addr.
6138 Remove 0x1000 offset applied to DLL base address when calling
6139 win32_add_one_solib.
6140 (handle_unload_dll): Add comment.
6141
f25b3fc3
JB
61422014-02-26 Joel Brobecker <brobecker@adacore.com>
6143
6144 * win32-low.c (win32_add_all_dlls): Renames
6145 win32_ensure_ntdll_loaded. Rewrite function documentation.
6146 Adjust implementation to always load all DLLs.
6147 Add 0x1000 offset to DLL base address when calling
6148 win32_add_one_solib.
6149 (child_initialization_done): New static global.
6150 (do_initial_child_stuff): Set child_initialization_done to
6151 zero during child initialization, and 1 after. Replace call
6152 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6153 Add comment.
6154 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6155 (handle_unload_dll): Add function documentation.
6156 (get_child_debug_event): Ignore load and unload DLL events
6157 during child initialization.
6158
d86d4aaf
DE
61592014-02-20 Doug Evans <dje@google.com>
6160
3bc32da3 6161 Remove global all_lwps.
d86d4aaf
DE
6162 * inferiors.h (ptid_of): Move here from linux-low.h.
6163 (pid_of, lwpid_of): Ditto.
6164 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6165 parameter is a struct thread_info * now.
6166 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6167 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6168 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6169 directly.
6170 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6171 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6172 * linux-arm-low.c (update_registers_callback): Update, "entry"
6173 parameter is a struct thread_info * now.
6174 Fetch lwpid from current_inferior directly.
6175 (arm_insert_point): Pass &all_threads to find_inferior instead of
6176 &all_lwps.
6177 (arm_remove_point): Ditto.
6178 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6179 (arm_prepare_to_resume): Fetch pid from thread.
6180 (arm_read_description): Fetch lwpid from current_inferior directly.
6181 * linux-low.c (all_lwps): Delete.
6182 (delete_lwp): Delete call to remove_inferior.
6183 (handle_extended_wait): Fetch lwpid from thread.
6184 (add_lwp): Don't set lwp->entry.id. Remove call to
6185 add_inferior_to_list.
6186 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6187 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6188 (kill_one_lwp_callback): Ditto.
6189 (linux_kill): Don't dereference NULL pointer.
6190 Fetch ptid,lwpid from thread.
6191 (get_detach_signal): Fetch ptid from thread.
6192 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6193 Simplify call to regcache_invalidate_thread.
6194 (delete_lwp_callback): Update, "entry" parameter is a
6195 struct thread_info * now. Fetch pid from thread.
6196 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6197 (status_pending_p_callback): Update, "entry" parameter is a
6198 struct thread_info * now. Fetch ptid from thread.
6199 (find_lwp_pid): Update, "entry" parameter is a
6200 struct thread_info * now.
6201 (linux_wait_for_lwp): Fetch pid from thread.
6202 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6203 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6204 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6205 (dequeue_one_deferred_signal): Ditto.
6206 (cancel_breakpoint): Fetch ptid from current_inferior.
6207 (linux_wait_for_event): Pass &all_threads to find_inferior,
6208 not &all_lwps. Fetch ptid, lwpid from thread.
6209 (count_events_callback): Update, "entry" parameter is a
6210 struct thread_info * now.
6211 (select_singlestep_lwp_callback): Ditto.
6212 (select_event_lwp_callback): Ditto.
6213 (cancel_breakpoints_callback): Ditto.
6214 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6215 not &all_lwps.
6216 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6217 (unsuspend_one_lwp): Update, "entry" parameter is a
6218 struct thread_info * now.
6219 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6220 not &all_lwps.
6221 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6222 Fetch lwpid from thread, not lwp.
6223 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6224 Pass &all_threads to find_inferior, not &all_lwps.
6225 (send_sigstop): Fetch lwpid from thread, not lwp.
6226 (send_sigstop_callback): Update, "entry" parameter is a
6227 struct thread_info * now.
6228 (suspend_and_send_sigstop_callback): Ditto.
6229 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6230 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6231 struct thread_info * now.
6232 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6233 from thread, lwp.
6234 (lwp_running): Update, "entry" parameter is a
6235 struct thread_info * now.
6236 (stop_all_lwps): Fetch ptid from thread.
6237 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6238 (linux_resume_one_lwp): Fetch lwpid from thread.
6239 (linux_set_resume_request): Update, "entry" parameter is a
6240 struct thread_info * now. Fetch pid, lwpid from thread.
6241 (resume_status_pending_p): Update, "entry" parameter is a
6242 struct thread_info * now.
6243 (need_step_over_p): Ditto. Fetch lwpid from thread.
6244 (start_step_over): Fetch lwpid from thread.
6245 (linux_resume_one_thread): Update, "entry" parameter is a
6246 struct thread_info * now. Fetch lwpid from thread.
6247 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6248 (proceed_one_lwp): Update, "entry" parameter is a
6249 struct thread_info * now. Fetch lwpid from thread.
6250 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6251 struct thread_info * now.
6252 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6253 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6254 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6255 directly.
6256 (regsets_store_inferior_registers): Ditto.
6257 (fetch_register, store_register): Ditto.
6258 (linux_read_memory, linux_write_memory): Ditto.
6259 (linux_request_interrupt): Ditto.
6260 (linux_read_auxv): Ditto.
6261 (linux_xfer_siginfo): Ditto.
6262 (linux_qxfer_spu): Ditto.
6263 (linux_qxfer_libraries_svr4): Ditto.
6264 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6265 moved to inferiors.h.
6266 (get_lwp): Delete.
6267 (get_thread_lwp): Update.
6268 (struct lwp_info): Delete member "entry". Simplify comment for
6269 member "thread".
6270 (all_lwps): Delete.
6271 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6272 current_inferior directly.
6273 (update_watch_registers_callback): Update, "entry" parameter is a
6274 struct thread_info * now. Fetch pid from thread.
6275 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6276 (mips_insert_point): Fetch lwpid from current_inferior.
6277 Pass &all_threads to find_inferior, not &all_lwps.
6278 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6279 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6280 directly.
6281 (mips_stopped_data_address): Ditto.
6282 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6283 directly.
6284 * linux-tile-low.c (tile_arch_setup): Ditto.
6285 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6286 (update_debug_registers_callback): Update, "entry" parameter is a
6287 struct thread_info * now. Fetch pid from thread.
6288 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6289 Pass &all_threads to find_inferior, not &all_lwps.
6290 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6291 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6292 Pass &all_threads to find_inferior, not &all_lwps.
6293 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6294 (i386_dr_low_get_status): Ditto.
6295 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6296 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6297 (x86_linux_read_description): Ditto.
6298 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6299
3b8361aa
DE
63002014-02-20 Doug Evans <dje@google.com>
6301
6302 * inferiors.c (get_first_inferior): Fix buglet.
6303
f7667f0d
DE
63042014-02-19 Doug Evans <dje@google.com>
6305
6306 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6307 * inferiors.c (add_thread): Change result type to struct thread_info *.
6308 All callers updated.
6309 (add_lwp): Call add_thread here instead of in callers.
6310 All callers updated.
6311 * linux-low.h (get_lwp_thread): Rewrite.
6312 (struct lwp_info): New member "thread".
6313
b3312d80
DE
63142014-02-19 Doug Evans <dje@google.com>
6315
6316 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6317 All callers updated.
6318
ecc6f45c
DE
63192014-02-19 Doug Evans <dje@google.com>
6320
6321 * inferiors.c (add_thread): Fix whitespace.
6322
649ebbca
DE
63232014-02-19 Doug Evans <dje@google.com>
6324
6325 * dll.c (clear_dlls): Replace accessing list implemention details
6326 with API function.
6327 * gdbthread.h (get_first_thread): Declare.
6328 * inferiors.c (for_each_inferior_with_data): New function.
6329 (get_first_thread): New function.
6330 (find_thread_ptid): Simplify.
6331 (get_first_inferior): New function.
6332 (clear_list): Delete.
6333 (one_inferior_p): New function.
6334 (clear_inferior_list): New function.
6335 (clear_inferiors): Update.
6336 * inferiors.h (for_each_inferior_with_data): Declare.
6337 (clear_inferior_list): Declare.
6338 (one_inferior_p): Declare.
6339 (get_first_inferior): Declare.
6340 * linux-low.c (linux_wait_for_event): Replace accessing list
6341 implemention details with API function.
6342 * server.c (target_running): Ditto.
6343 (accumulate_file_name_length): New function.
6344 (emit_dll_description): New function.
6345 (handle_qxfer_libraries): Replace accessing list implemention
6346 details with API function.
6347 (handle_qxfer_threads_worker): New function.
6348 (handle_qxfer_threads_proper): Replace accessing list implemention
6349 details with API function.
6350 (handle_query): Ditto.
6351 (visit_actioned_threads_callback_ftype): New typedef.
6352 (visit_actioned_threads_data): New struct.
6353 (visit_actioned_threads): Rewrite to be find_inferior callback.
6354 (resume): Call find_inferior.
6355 (handle_status): Replace accessing list implemention
6356 details with API function.
6357 (process_serial_event): Replace accessing list implemention details
6358 with API function.
6359 * target.c (set_desired_inferior): Replace accessing list implemention
6360 details with API function.
6361 * tracepoint.c (same_process_p): New function.
6362 (gdb_agent_about_to_close): Replace accessing list implemention
6363 details with API function.
6364 * win32-low.c (child_delete_thread): Replace accessing list
6365 implemention details with API function.
6366 (match_dll_by_basename): New function.
6367 (dll_is_loaded_by_basename): New function.
6368 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6369 details call to dll_is_loaded_by_basename.
6370
80894984
DE
63712014-02-19 Doug Evans <dje@google.com>
6372
6373 * dll.h (struct dll_info): Add comment.
6374 * gdbthread.h (struct thread_info): Add comment.
6375 (current_ptid): Simplify.
6376 * inferiors.c (add_process): Update.
6377 (remove_process): Update.
6378 * inferiors.h (struct process_info): Rename member "head" to "entry".
6379 * linux-low.c (delete_lwp): Update.
6380 (add_lwp): Update.
6381 (last_thread_of_process_p): Update.
6382 (kill_one_lwp_callback, linux_kill): Update.
6383 (status_pending_p_callback): Update.
6384 (wait_for_sigstop): Update. Simplify read of ptid.
6385 (start_step_over): Update.
6386 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6387 (get_lwp_thread): Update.
6388 (struct lwp_info): Rename member "head" to "entry".
6389 * regcache.h (inferior_list_entry): Delete.
6390 * server.c (kill_inferior_callback): Update.
6391 (detach_or_kill_inferior_callback): Update.
6392 (print_started_pid): Update.
6393 (print_attached_pid): Update.
6394 (process_serial_event): Simplify read of ptid.
6395 * thread-db.c (thread_db_create_event): Update.
6396 (thread_db_get_tls_address): Update.
6397 * win32-low.c (current_inferior_ptid): Simplify.
6398
46917d26
TT
63992014-02-19 Tom Tromey <tromey@redhat.com>
6400
6401 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6402 argument.
6403 (target_supports_btrace): Update.
6404
0759a81e
YQ
64052014-02-14 Yao Qi <yao@codesourcery.com>
6406
6407 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6408 (rsp-low-ipa.o): New target.
6409
a7191e8b
TT
64102014-02-12 Tom Tromey <tromey@redhat.com>
6411
6412 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6413 convert_ascii_to_int.
6414 * regcache.c (registers_to_string): Likewise.
6415 * remote-utils.c (decode_M_packet): Likewise.
6416 * server.c (process_serial_event): Likewise.
6417
ff0e980e
TT
64182014-02-12 Tom Tromey <tromey@redhat.com>
6419
6420 * server.c (handle_query, handle_v_run): Use hex2bin, not
6421 unhexify.
6422 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6423
e9371aff
TT
64242014-02-12 Tom Tromey <tromey@redhat.com>
6425
6426 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6427 convert_int_to_ascii.
6428 * regcache.c (registers_to_string, collect_register_as_string):
6429 Likewise.
6430 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6431 Likewise.
6432 * server.c (process_serial_event): Likewise.
6433 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6434 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6435
971dc0b8
TT
64362014-02-12 Tom Tromey <tromey@redhat.com>
6437
6438 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6439 bin2hex, not hexify.
6440 * tracepoint.c (cmd_qtstatus): Likewise.
6441
0a822afb
TT
64422014-02-12 Tom Tromey <tromey@redhat.com>
6443
6444 * remote-utils.c (monitor_output): Pass explicit length to
6445 hexify.
6446
9c3d6531
TT
64472014-02-12 Tom Tromey <tromey@redhat.com>
6448
6449 * tracepoint.c: Include rsp-low.h.
6450 * server.c: Include rsp-low.h.
6451 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6452 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6453 declare.
6454 * remote-utils.c: Include rsp-low.h.
6455 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6456 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6457 (convert_int_to_ascii, convert_ascii_to_int): Move to
6458 common/rsp-low.c.
6459 * regcache.c: Include rsp-low.h.
6460 * ax.c: Include rsp-low.h.
6461 * Makefile.in (SFILES): Add common/rsp-low.c.
6462 (OBS): Add rsp-low.o.
6463 (rsp-low.o): New target.
6464
01fd3ea5
TT
64652014-02-12 Tom Tromey <tromey@redhat.com>
6466
6467 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6468 Include print-utils.h.
6469 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6470 (plongest, thirty_two, phex_nz): Remove.
6471 * Makefile.in (SFILES): Add common/print-utils.c.
6472 (OBS): Add print-utils.o.
6473 (print-utils-ipa.o): New target.
6474 (print-utils.o): New target.
6475 (IPA_OBJS): Add print-utils-ipa.o.
6476
e99dc820
TT
64772014-02-06 Tom Tromey <tromey@redhat.com>
6478
6479 * Makefile.in (SFILES): Fix indentation.
6480
ee1e2d4f
DE
64812014-02-05 Doug Evans <dje@google.com>
6482
6483 * linux-low.c (linux_wait_for_event): Improve comment.
6484 (linux_wait_1): Keep current_inferior in sync with event_child.
6485
f5a02773
DE
64862014-01-22 Doug Evans <dje@google.com>
6487
6488 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6489
87ce2a04
DE
64902014-01-22 Doug Evans <dje@google.com>
6491
6492 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6493 * configure: Regenerate.
6494 * config.in: Regenerate.
6495 * Makefile.in (SFILES): Add debug.c.
6496 (OBS): Add debug.o.
6497 * debug.c: New file.
6498 * debug.h: New file.
6499 * linux-aarch64-low.c (*): Update all debugging printfs to use
6500 debug_printf instead of fprintf.
6501 * linux-arm-low.c (*): Ditto.
6502 * linux-cris-low.c (*): Ditto.
6503 * linux-crisv32-low.c (*): Ditto.
6504 * linux-m32r-low.c (*): Ditto.
6505 * linux-sparc-low.c (*): Ditto.
6506 * linux-x86.c (*): Ditto.
6507 * linux-low.c (*): Ditto.
6508 (linux_wait_1): Add calls to debug_enter, debug_exit.
6509 (linux_wait): Remove redundant debugging printf.
6510 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6511 (linux_resume, unstop_all_lwps): Ditto.
6512 * mem-break.c (*): Update all debugging printfs to use
6513 debug_printf instead of fprintf.
6514 * remote-utils.c (*): Ditto.
6515 * thread-db.c (*): Ditto.
6516 * server.c #include <ctype.h>, "gdb_vecs.h".
6517 (debug_threads): Moved to debug.c.
6518 (*): Update all debugging printfs to use debug_printf instead of
6519 fprintf.
6520 (start_inferior): Replace call to fflush with call to debug_flush.
6521 (monitor_show_help): Mention set debug-format.
6522 (parse_debug_format_options): New function.
6523 (handle_monitor_command): Handle "monitor set debug-format".
6524 (gdbserver_usage): Mention --debug-format.
6525 (main): Parse --debug-format.
6526 * server.h (debug_threads): Declaration moved to debug.h.
6527 #include "debug.h".
6528 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6529 trace_debug_1 that uses debug_printf.
6530 (tracepoint_look_up_symbols): Update all debugging printfs to use
6531 debug_printf instead of fprintf.
6532
e671835b
BS
65332014-01-20 Baruch Siach <baruch@tkos.co.il>
6534
6535 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6536 sys/ptrace.h.
6537
b5737fa9
PA
65382014-01-17 Pedro Alves <palves@redhat.com>
6539
ea38d2a9 6540 PR build/16445
c7faa97a
PA
6541 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6542 defined after including gdb_proc_service.h.
b5737fa9 6543
40ed484e
DE
65442014-01-16 Doug Evans <dje@google.com>
6545
6546 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6547 (match_dll): Use it.
6548
969c39fb
MM
65492014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6550
6551 * target.h (target_ops) <read_btrace>: Change parameters and
6552 return type to allow error reporting.
6553 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6554 trace reading errors on.
6555 * linux-low.c (linux_low_read_btrace): Pass trace reading
6556 errors on.
6557 (linux_low_disable_btrace): New.
6558
ab7f45ba
DE
65592014-01-15 Doug Evans <dje@google.com>
6560
6561 * inferiors.c (thread_id_to_gdb_id): Delete.
6562 * inferiors.h (thread_id_to_gdb_id): Delete.
6563
66af0f44
EZ
65642014-01-13 Eli Zaretskii <eliz@gnu.org>
6565
6566 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6567 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6568 versions.
6569
9939e131
PA
65702014-01-08 Pedro Alves <palves@redhat.com>
6571
6572 * server.c (handle_status): Don't discard previous queued stop
6573 replies or thread's pending status here.
6574 (main) <disconnection>: Do it here instead.
6575
b7ea362b
PA
65762014-01-08 Pedro Alves <palves@redhat.com>
6577
6578 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6579 * server.c (visit_actioned_threads, handle_pending_status): New
6580 function.
6581 (handle_v_cont): Factor out parts to ...
6582 (resume): ... this new function. If in all-stop, and a thread
6583 being resumed has a pending status, report it without actually
6584 resuming.
6585 (myresume): Adjust to use the new 'resume' function.
6586 (clear_pending_status_callback, set_pending_status_callback)
6587 (find_status_pending_thread_callback): New functions.
6588 (handle_status): Handle the case of multiple threads having
6589 interesting statuses to report. Report threads' real last signal
6590 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6591 with an interesting thread to report the status for, instead of
6592 always reporting the status of the first thread.
6593
28498c42
JB
65942014-01-01 Joel Brobecker <brobecker@adacore.com>
6595
6596 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6597 * gdbreplay.c (gdbreplay_version): Likewise.
6598
f45c82da
YZ
65992013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6600
6601 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6602 iov.iov_len with the real length in use.
6603
379a5e2d
JB
66042013-12-13 Joel Brobecker <brobecker@adacore.com>
6605
6606 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6607 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6608 for all targets that use win32-low.c.
6609 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6610 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6611
4210d83e
PA
66122013-12-13 Pedro Alves <palves@redhat.com>
6613
6614 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6615 if equal to TARGET_WAITKIND_LOADED.
6616 * win32-low.c (cached_status): New static global.
6617 (win32_wait): Add declaration.
6618 (do_initial_child_stuff): Flush all initial pending debug events
6619 up to the initial breakpoint.
6620 (win32_wait): If CACHED_STATUS was set, return that instead
6621 of doing a real wait. Remove the code resuming the execution
6622 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6623 during the initial phase. Also remove the code changing
6624 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6625 TARGET_WAITKIND_STOPPED.
6626
e7f0d979
YQ
66272013-12-11 Yao Qi <yao@codesourcery.com>
6628
6629 * notif.c (handle_notif_ack): Return 0 if no notification
6630 matches.
6631
ebcf782c
DE
66322013-11-20 Doug Evans <dje@google.com>
6633
6634 * linux-low.c (linux_set_resume_request): Fix comment.
6635
20ad9378
DE
66362013-11-20 Doug Evans <dje@google.com>
6637
6638 * linux-low.c (resume_status_pending_p): Tweak comment.
6639
a196ebeb
WT
66402013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6641
6642 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6643 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6644 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6645 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6646 (srv_amd64_regobj): Add amd64-mpx.o.
6647 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6648 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6649 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6650 * i387-fp.c (num_pl_bnd_register) Added constant.
6651 (num_pl_bnd_cfg_registers) Added constant.
6652 (struct i387_xsave) Added reserved area and MPX fields.
6653 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6654 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6655 function.
6656 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6657 (init_registers_amd64_mpx_linux): Declare new function.
6658 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6659 (x86_64_regmap): Add MPX registers.
6660 (x86_linux_read_description): Add MPX case.
6661 (initialize_low_arch): Initialize MPX targets.
6662
0080a2f6
TT
66632013-11-18 Tom Tromey <tromey@redhat.com>
6664
6665 * configure: Rebuild.
6666 * configure.ac: Don't check for stdlib.h.
6667 * gdbreplay.c: Unconditionally include stdlib.h.
6668
2978b111
TT
66692013-11-18 Tom Tromey <tromey@redhat.com>
6670
6671 * config.in: Rebuild.
6672 * configure: Rebuild.
6673 * configure.ac: Don't use AC_HEADER_DIRENT.
6674
a3d08894
TT
66752013-11-18 Tom Tromey <tromey@redhat.com>
6676
6677 * server.h: Don't check HAVE_STRING_H.
6678 * gdbreplay.c: Don't check HAVE_STRING_H.
6679 * configure: Rebuild.
6680
0a5dd17d
TT
66812013-11-18 Tom Tromey <tromey@redhat.com>
6682
6683 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6684 LIBGNU.
6685
1bd2f0ba
TT
66862013-11-08 Tom Tromey <tromey@redhat.com>
6687
6688 * configure, config.in: Rebuild.
6689 * configure.ac: Remove unused configury.
6690
3266f10b
TT
66912013-11-08 Tom Tromey <tromey@redhat.com>
6692
6693 * acinclude.m4: Include common.m4, codeset.m4.
6694 * configure, config.in: Rebuild.
6695 * configure.ac: Use GDB_AC_COMMON.
6696
6682d959
AA
66972013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6698
6699 * linux-s390-low.c (HWCAP_S390_TE): New define.
6700 (s390_arch_setup): Consider the TE field in the HWCAP for
6701 determining 'have_regset_tdb'.
6702
fd0a4d76
SDJ
67032013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6704
6705 PR gdb/16014
6706 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6707 call to sizeof.
6708
1a3d890b
PA
67092013-10-02 Pedro Alves <palves@redhat.com>
6710
6711 * server.c (process_serial_event): Don't output "GDBserver
6712 exiting" if GDB is connected through stdio.
6713 * target.c (mywait): Likewise, be silent if GDB is connected
6714 through stdio.
6715
97ad4581
JB
67162013-10-01 Joel Brobecker <brobecker@adacore.com>
6717
6718 * lynx-low.c (lynx_add_threads_after_attach): New function.
6719 (lynx_attach): Remove call to add_thread. Add call to
6720 lynx_add_threads_after_attach instead.
6721
5b4e221c
MF
67222013-09-28 Mike Frysinger <vapier@gentoo.org>
6723
6724 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6725 * config.in, configure: Regenerated.
6726
ee47b2f8
YQ
67272013-09-18 Yao Qi <yao@codesourcery.com>
6728
6729 PR server/15959
6730 * server.c (start_inferior): Clear 'resume_info'.
6731
d6707650 67322013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6733
d6707650
JW
6734 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6735 for each register.
6736
9243dd0e 67372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6738
9243dd0e
JW
6739 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6740 linux-tile-low.o to srv_tgtobj.
6741
c623a6ef
WN
67422013-09-16 Will Newton <will.newton@linaro.org>
6743
6744 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6745 out regs.
6746
fb71d39e
PA
67472013-09-06 Pedro Alves <palves@redhat.com>
6748
6749 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6750 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6751 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6752 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6753 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6754 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6755
8e7e9910
PA
67562013-09-06 Pedro Alves <palves@redhat.com>
6757
6758 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6759 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6760
7c3a12ca
PA
67612013-09-06 Pedro Alves <palves@redhat.com>
6762
6763 * linux-amd64-ipa.c: Include tracepoint.h.
6764 * linux-i386-ipa.c: Include tracepoint.h.
6765
8eb3d7b6
RW
67662013-09-06 Ricard Wanderlof <ricardw@axis.com>
6767
6768 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6769 (ps_get_thread_area): New function.
6770
eddddb9d
RW
67712013-09-06 Ricard Wanderlof <ricardw@axis.com>
6772
6773 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6774 (initialize_low_arch): Call init_registers_crisv32 rather than
6775 init_register_crisv32.
6776
533b0600
PA
67772013-09-05 Pedro Alves <palves@redhat.com>
6778
6779 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6780 to ...
6781 * hostio.h: ... this new file.
6782 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6783 win32-low.c: Include hostio.h.
6784
0ce3d3b5
PA
67852013-09-05 Pedro Alves <palves@redhat.com>
6786
6787 * server.h (gdb_client_data, handler_func, callback_handler_func)
6788 (delete_file_handler, add_file_handler, append_callback_event)
6789 (delete_callback_event, start_event_loop, initialize_event_loop):
6790 Move to event-loop.h and include it.
6791 * event-loop.h: New file.
6792
799cdc37
PA
67932013-09-05 Pedro Alves <palves@redhat.com>
6794
6795 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6796 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6797 (loaded_dll, unloaded_dll): Move to ...
6798 * dll.h: ... this new file.
6799 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6800
6a6bbd9d
PA
68012013-09-05 Pedro Alves <palves@redhat.com>
6802
6803 * server.h (current_process, get_thread_process, all_processes)
6804 (add_inferior_to_list, for_each_inferior, current_inferior)
6805 (remove_inferior, add_process, remove_process, find_process_pid)
6806 (have_started_inferiors_p, have_attached_inferiors_p)
6807 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6808 (clear_inferiors, find_inferior, find_inferior_id)
6809 (inferior_target_data, set_inferior_target_data)
6810 (inferior_regcache_data, set_inferior_regcache_data): Move to
6811 inferiors.h, and include it.
6812 * inferiors.h: New file.
6813
f699aaba
PA
68142013-09-05 Pedro Alves <palves@redhat.com>
6815
6816 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6817 Move ...
72f4393d 6818 * ax.h: ... here.
f699aaba 6819
c144c7a0
PA
68202013-09-05 Pedro Alves <palves@redhat.com>
6821
6822 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6823 tracepoint.h.
6824 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6825 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6826 (handle_tracepoint_general_set, handle_tracepoint_query)
6827 (tracepoint_finished_step, tracepoint_was_hit)
6828 (release_while_stepping_state_list, current_traceframe)
6829 (in_readonly_region, traceframe_read_mem)
6830 (fetch_traceframe_registers, traceframe_read_sdata)
6831 (traceframe_read_info, struct fast_tpoint_collect_status)
6832 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6833 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6834 (supply_fast_tracepoint_registers)
6835 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6836 (ipa_tdesc, claim_trampoline_space)
6837 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6838 (agent_mem_read, agent_get_trace_state_variable_value)
6839 (agent_set_trace_state_variable_value, agent_tsv_read)
6840 (agent_mem_read_string, get_raw_reg_func_addr)
6841 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6842 * tracepoint.h: ... this new file.
6843
ff42e6ab
PA
68442013-09-05 Pedro Alves <palves@redhat.com>
6845
6846 * server.h (perror_with_name, error, fatal, warning, paddress)
6847 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6848 include it.
6849 * utils.h: New file.
6850
541af0f4
PA
68512013-09-05 Pedro Alves <palves@redhat.com>
6852
6853 * server.h (remote_debug, noack_mode, transport_is_reliable)
6854 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6855 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6856 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6857 (write_enn, initialize_async_io, enable_async_io)
6858 (disable_async_io, check_remote_input_interrupt_request)
6859 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6860 (dead_thread_notify, prepare_resume_reply)
6861 (decode_address_to_semicolon, decode_address, decode_m_packet)
6862 (decode_M_packet, decode_X_packet, decode_xfer_write)
6863 (decode_search_memory_packet, unhexify, hexify)
6864 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6865 (look_up_one_symbol, relocate_instruction)
6866 (monitor_output): Move to remote-utils.h, and include it.
6867 * remote-utils.h: New file.
6868
eebdf26b
PA
68692013-09-05 Pedro Alves <palves@redhat.com>
6870
6871 * server.h (_): Delete.
6872
3aafd2ff
PA
68732013-09-02 Pedro Alves <palves@redhat.com>
6874
6875 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6876 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6877 allocated.
6878 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6879
cee83bcb
PM
68802013-09-02 Pierre Muller <muller@sourceware.org>
6881
6882 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6883 or WriteProcessMemory complete successfully and handle
6884 ERROR_PARTIAL_COPY error.
6885
9a13b2fa
PA
68862013-09-02 Pedro Alves <palves@redhat.com>
6887
6888 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6889 error instead of EIO.
6890
602e3198
JK
68912013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6892
6893 PR server/15604
6894 * linux-low.c: Include filestuff.h.
6895 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6896 * lynx-low.c: Include filestuff.h.
6897 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6898 * server.c: Include filestuff.h.
6899 (main): Call notice_open_fds.
6900 * spu-low.c: Include filestuff.h.
6901 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6902
96d7229d
LM
69032013-08-22 Luis Machado <lgustavo@codesourcery.com>
6904
6905 * Makefile.in: Explain why ../target and ../nat are not
6906 listed as include file search paths.
6907 (linux-waitpid.o): New object file rule.
6908 * configure.srv (srv_native_linux_obj): New variable.
6909 Replace all occurrences of linux native object files with
6910 $srv_native_linux_obj.
6911 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6912 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6913 (linux_enable_event_reporting): Remove declaration.
6914 (my_waitpid): Moved to common/linux-waitpid.c.
6915 (linux_wait_for_event): Pass ptid when calling
6916 linux_enable_event_reporting.
6917 (linux_supports_tracefork_flag): Remove.
6918 (linux_enable_event_reporting): Likewise.
6919 (linux_tracefork_grandchild): Remove.
6920 (STACK_SIZE): Moved to common/linux-ptrace.c.
6921 (linux_tracefork_child): Remove.
6922 (linux_test_for_tracefork): Remove.
6923 (linux_look_up_symbols): Call linux_supports_traceclone.
6924 (initialize_low): Remove call to linux_test_for_tracefork.
6925 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6926 common/linux-ptrace.h.
6927 (PTRACE_TYPE_ARG4): Likewise.
6928 Include linux-ptrace.h.
6929
32940073
PA
69302013-08-21 Pedro Alves <palves@redhat.com>
6931
6932 * config.in: Renegerate.
6933
33b60d58 69342013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6935
33b60d58
LM
6936 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6937 (SFILES): Remove $(srcdir)/common/target-common.c and
6938 add $(srcdir)/target/waitstatus.c.
6939 (OBS): Remove target-common.o and add waitstatus.o.
6940 (server_h): Remove $(srcdir)/../common/target-common.h and
6941 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6942 and $(srcdir)/../target/waitstatus.h.
6943 (target-common.o): Remove.
6944 (waitstatus.o): New target object file.
6945 * target.h: Do not include target-common.h and
6946 include target/resume.h, target/wait.h and
6947 target/waitstatus.h.
6948
b8e1b30e
LM
69492013-08-13 Luis Machado <lgustavo@codesourcery.com>
6950
6951 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6952 to PTRACE_TYPE_ARG3.
6953 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6954 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6955 PTRACE_TYPE_ARG4.
6956 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6957 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6958
7a60ad40
YQ
69592013-07-27 Jie Zhang <jie@codesourcery.com>
6960 Daniel Jacobowitz <dan@codesourcery.com>
6961 Yao Qi <yao@codesourcery.com>
6962
6963 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6964 (mips-linux-watch.o): New rule.
6965 (mips_linux_watch_h): New variable.
6966 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6967 srv_tgtobj.
6968 * linux-mips-low.c: Include mips-linux-watch.h.
6969 (struct arch_process_info, struct arch_lwp_info): New.
6970 (update_watch_registers_callback): New function.
6971 (mips_linux_new_process, mips_linux_new_thread) New functions.
6972 (mips_linux_prepare_to_resume, mips_insert_point): New
6973 functions.
6974 (mips_remove_point, mips_stopped_by_watchpoint): New
6975 functions.
6976 (rsp_bp_type_to_target_hw_bp_type): New function.
6977 (mips_stopped_data_address): New function.
6978 (the_low_target): Add watchpoint support functions.
6979
de6f69ad
YQ
69802013-07-27 Yao Qi <yao@codesourcery.com>
6981
6982 * i386-low.c: Include break-common.h.
6983 (enum target_hw_bp_type): Remove.
6984
3360c0bf
LM
69852013-07-24 Luis Machado <lgustavo@codesourcery.com>
6986
6987 * Makefile.in (SFILES): /common/target-common.c.
6988 (OBS): Add target-common.o.
6989 (server_h): Add $(srcdir)/../common/target-common.h.
6990 (target-common.o): New target.
6991 * server.c (queue_stop_reply_callback): Free
6992 status string after use.
6993 * target.c (target_waitstatus_to_string): Remove.
6994 * target.h: Include target-common.h.
6995 (resume_kind): Likewise.
6996 (target_waitkind): Likewise.
6997 (target_waitstatus): Likewise.
6998 (TARGET_WNOHANG): Likewise.
6999
bd885420
YQ
70002013-07-04 Yao Qi <yao@codesourcery.com>
7001
7002 * Makefile.in (host_alias): Use @host_noncanonical@.
7003 (target_alias): Use @target_noncanonical@.
7004 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7005 ACX_NONCANONICAL_HOST.
7006 * configure: Regenerated.
7007
7008 Revert:
7009 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7010
7011 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7012 * configure: Rebuild.
7013 * Makefile.in (version_host, version_target): Get from configure.
7014 (version.c): Use $(version_host) and $(version_target).
7015
17ef446e
PA
70162013-07-03 Pedro Alves <palves@redhat.com>
7017
7018 * Makefile.in (config.status): Depend on development.sh.
7019 * acinclude.m4: Include libmcheck.m4.
7020 * configure: Regenerate.
7021
7a9a7487
MG
70222013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7023
7024 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7025 attribute inside the parentheses.
7026 (winapi_DebugSetProcessKillOnExit): Ditto.
7027 (winapi_DebugBreakProcess): Ditto.
7028 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7029
49b64de6
MG
70302013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7031
7032 * notif.h (notif_event): Add a dummy member to avoid compiler
7033 errors.
7034
d5749ee7
PA
70352013-07-01 Pedro Alves <palves@redhat.com>
7036
7037 * hostio.c (HOSTIO_PATH_MAX): Define.
7038 (require_filename, handle_open, handle_unlink, handle_readlink):
7039 Use it.
7040
d8d2a3ee
PA
70412013-07-01 Pedro Alves <palves@redhat.com>
7042
7043 * server.h: Include "pathmax.h".
7044 * linux-low.c: Don't include sys/param.h.
7045 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7046 MAXPATHLEN.
7047 * win32-low.c: Don't include sys/param.h.
7048 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7049
bc7dea8d
PA
70502013-07-01 Pedro Alves <palves@redhat.com>
7051
7052 * event-loop.c: Don't check HAVE_UNISTD_H before including
7053 <unistd.h>.
7054 * gdbreplay.c: Likewise.
7055 * remote-utils.c: Likewise.
7056 * server.c: Likewise.
7057 * configure.ac: Don't check for unistd.h.
7058 * configure: Regenerate.
7059
d6c2da54
TT
70602013-06-28 Tom Tromey <tromey@redhat.com>
7061
7062 * Makefile.in (version.c): Use version.in, not
7063 common/version.in.
7064
257b6bec
MG
70652013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7066
7067 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7068 * configure: Rebuild.
7069 * Makefile.in (version_host, version_target): Get from configure.
7070 (version.c): Use $(version_host) and $(version_target).
7071
86ebe149
DK
70722013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7073
7074 Fix trace-status to output user name without trailing colon.
7075 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7076
f30aa5af
DK
70772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7078
7079 Fix trace-status to output proper start-time and stop-time.
7080 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7081 output start time and stop time in hex as gdb expects.
7082
28a93511
YQ
70832013-06-26 Pedro Alves <pedro@codesourcery.com>
7084
7085 * tracepoint.c (build_traceframe_info_xml): Output trace state
7086 variables present in the trace buffer.
7087
01208463
TT
70882013-06-24 Tom Tromey <tromey@redhat.com>
7089
7090 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7091 create-version.sh.
7092 (version.o): Remove.
7093 * gdbreplay.c: Include version.h.
7094 (version, host_name): Don't declare.
7095 * server.h: Include version.h.
7096 (version, host_name): Don't declare.
7097
760256f9
PA
70982013-06-12 Pedro Alves <palves@redhat.com>
7099
7100 * linux-x86-low.c (linux_is_elf64): Delete global.
7101 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7102 with local linux_pid_exe_is_elf_64_file use.
7103
030031ee
PA
71042013-06-11 Pedro Alves <palves@redhat.com>
7105
7106 * linux-low.c (regset_disabled, disable_regset): New functions.
7107 (regsets_fetch_inferior_registers)
7108 (regsets_store_inferior_registers): Use them.
7109 (initialize_regsets_info); Don't allocate the disabled_regsets
7110 array here.
7111 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7112 comment.
7113
5da6eb0a
PA
71142013-06-11 Pedro Alves <palves@redhat.com>
7115
7116 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7117 xmalloc.
7118
7e5aaa09
PA
71192013-06-11 Pedro Alves <palves@redhat.com>
7120
7121 * linux-x86-low.c (initialize_low_arch): Call
7122 init_registers_x32_avx_linux.
7123
d878444c
JK
71242013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7125
7126 Fix compatibility with Android Bionic.
7127 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7128 it is not empty.
7129
3aee8918
PA
71302013-06-07 Pedro Alves <palves@redhat.com>
7131
5f2b57b5 7132 PR server/14823
3aee8918
PA
7133 * Makefile.in (OBS): Add tdesc.o.
7134 (IPA_OBJS): Add tdesc-ipa.o.
7135 (tdesc-ipa.o): New rule.
7136 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7137 interface.
7138 * linux-low.c (new_inferior): Delete.
7139 (disabled_regsets, num_regsets): Delete.
7140 (linux_add_process): Adjust to set the new per-process
7141 new_inferior flag.
7142 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7143 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7144 was a stop. When calling arch_setup, switch the current inferior
7145 to the thread that got an event.
7146 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7147 (regsets_fetch_inferior_registers)
7148 (regsets_store_inferior_registers): New regsets_info parameter.
7149 Adjust to use it.
7150 (linux_register_in_regsets): New regs_info parameter. Adjust to
7151 use it.
7152 (register_addr, fetch_register, store_register): New usrregs_info
7153 parameter. Adjust to use it.
7154 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7155 parameter regs_info. Adjust to use it.
7156 (linux_fetch_registers): Get the current inferior's regs_info, and
7157 adjust to use it.
7158 (linux_store_registers): Ditto.
7159 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7160 (initialize_low): Don't initialize the target_regsets here. Call
7161 initialize_low_arch.
7162 * linux-low.h (target_regsets): Delete declaration.
7163 (struct regsets_info): New.
7164 (struct usrregs_info): New.
7165 (struct regs_info): New.
7166 (struct process_info_private) <new_inferior>: New field.
7167 (struct linux_target_ops): Delete the num_regs, regmap, and
7168 regset_bitmap fields. New field regs_info.
7169 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7170 * i387-fp.c (num_xmm_registers): Delete.
7171 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7172 calls to new interface.
7173 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7174 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7175 Infer the number of xmm registers from the regcache's target
7176 description.
7177 * i387-fp.h (num_xmm_registers): Delete.
7178 * inferiors.c (add_thread): Don't install the thread's regcache
7179 here.
7180 * proc-service.c (gregset_info): Fetch the current inferior's
7181 regs_info. Adjust to use it.
7182 * regcache.c: Include tdesc.h.
7183 (register_bytes, reg_defs, num_registers)
7184 (gdbserver_expedite_regs): Delete.
7185 (get_thread_regcache): If the thread doesn't have a regcache yet,
7186 create one, instead of aborting gdbserver.
7187 (regcache_invalidate_one): Rename to ...
7188 (regcache_invalidate_thread): ... this.
7189 (regcache_invalidate_one): New.
7190 (regcache_invalidate): Only invalidate registers of the current
7191 process.
7192 (init_register_cache): Add target_desc parameter, and use it.
7193 (new_register_cache): Ditto. Assert the target description has a
7194 non zero registers_size.
7195 (regcache_cpy): Add assertions. Adjust.
7196 (realloc_register_cache, set_register_cache): Delete.
7197 (registers_to_string, registers_from_string): Adjust.
7198 (find_register_by_name, find_regno, find_register_by_number)
7199 (register_cache_size): Add target_desc parameter, and use it.
7200 (free_register_cache_thread, free_register_cache_thread_one)
7201 (regcache_release, register_cache_size): New.
7202 (register_size): Add target_desc parameter, and use it.
7203 (register_data, supply_register, supply_register_zeroed)
7204 (supply_regblock, supply_register_by_name, collect_register)
7205 (collect_register_as_string, collect_register_by_name): Adjust.
7206 * regcache.h (struct target_desc): Forward declare.
7207 (struct regcache) <tdesc>: New field.
7208 (init_register_cache, new_register_cache): Add target_desc
7209 parameter.
7210 (regcache_invalidate_thread): Declare.
7211 (regcache_invalidate_one): Delete declaration.
7212 (regcache_release): Declare.
7213 (find_register_by_number, register_cache_size, register_size)
7214 (find_regno): Add target_desc parameter.
7215 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7216 declarations.
7217 * remote-utils.c: Include tdesc.h.
7218 (outreg, prepare_resume_reply): Adjust.
7219 * server.c: Include tdesc.h.
7220 (gdbserver_xmltarget): Delete declaration.
7221 (get_features_xml, process_serial_event): Adjust.
7222 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7223 declare.
7224 (struct process_info) <tdesc>: New field.
7225 (ipa_tdesc): Declare.
7226 * tdesc.c: New file.
7227 * tdesc.h: New file.
7228 * tracepoint.c: Include tdesc.h.
7229 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7230 (get_context_regcache): Adjust to pass ipa_tdesc down.
7231 (do_action_at_tracepoint): Adjust to get the register cache size
7232 from the context regcache's description.
7233 (traceframe_walk_blocks): Adjust to get the register cache size
7234 from the current trace frame's description.
7235 (traceframe_get_pc): Adjust to get current trace frame's
7236 description and pass it down.
7237 (gdb_collect): Adjust to get the register cache size from the
7238 IPA's description.
7239 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7240 (gdbserver_xmltarget): Delete.
7241 (initialize_low_tracepoint): Set the ipa's target description.
7242 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7243 (initialize_low_tracepoint): Set the ipa's target description.
7244 * linux-x86-low.c: Include tdesc.h.
7245 [__x86_64__] (is_64bit_tdesc): New.
7246 (ps_get_thread_area, x86_get_thread_area): Use it.
7247 (i386_cannot_store_register): Rename to ...
7248 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7249 (i386_cannot_fetch_register): Rename to ...
7250 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7251 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7252 to new interface.
7253 (target_regsets): Rename to ...
7254 (x86_regsets): ... this.
7255 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7256 interface.
7257 (x86_siginfo_fixup): Use is_64bit_tdesc.
7258 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7259 (tdesc_x32_avx_linux, tdesc_x32_linux)
7260 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7261 Declare.
7262 (x86_linux_update_xmltarget): Delete.
7263 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7264 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7265 (AMD64_LINUX_USER64_CS): New.
7266 (x86_linux_read_description): New, based on
7267 x86_linux_update_xmltarget.
7268 (same_process_callback): New.
7269 (x86_arch_setup_process_callback): New.
7270 (x86_linux_update_xmltarget): New.
7271 (x86_regsets_info): New.
7272 (amd64_linux_regs_info): New.
7273 (i386_linux_usrregs_info): New.
7274 (i386_linux_regs_info): New.
7275 (x86_linux_regs_info): New.
7276 (x86_arch_setup): Reimplement.
7277 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7278 (x86_emit_ops): Ditto.
7279 (the_low_target): Adjust. Install x86_linux_regs_info,
7280 x86_cannot_fetch_register, and x86_cannot_store_register.
7281 (initialize_low_arch): New.
7282 * linux-ia64-low.c (tdesc_ia64): Declare.
7283 (ia64_fetch_register): Adjust.
7284 (ia64_usrregs_info, regs_info): New globals.
7285 (ia64_regs_info): New function.
7286 (the_low_target): Adjust.
7287 (initialize_low_arch): New function.
7288 * linux-sparc-low.c (tdesc_sparc64): Declare.
7289 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7290 Adjust.
7291 (sparc_arch_setup): New function.
7292 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7293 (the_low_target): Adjust.
7294 (initialize_low_arch): New function.
7295 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7296 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7297 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7298 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7299 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7300 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7301 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7302 (tdesc_powerpc_isa205_vsx64l): Declare.
7303 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7304 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7305 (ppc_set_pc, ppc_get_hwcap): Adjust.
7306 (ppc_usrregs_info): Forward declare.
7307 (!__powerpc64__) ppc_regmap_adjusted: New global.
7308 (ppc_arch_setup): Adjust to the current process'es target
7309 description.
7310 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7311 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7312 (ppc_store_evrregset): Adjust.
7313 (target_regsets): Rename to ...
7314 (ppc_regsets): ... this, and make static.
7315 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7316 (ppc_regs_info): New function.
7317 (the_low_target): Adjust.
7318 (initialize_low_arch): New function.
7319 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7320 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7321 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7322 (tdesc_s390x_linux64v2): Declare.
7323 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7324 (s390_fill_gregset, s390_store_last_break): Adjust.
7325 (target_regsets): Rename to ...
7326 (s390_regsets): ... this, and make static.
7327 (s390_get_pc, s390_set_pc): Adjust.
7328 (s390_get_hwcap): New target_desc parameter, and use it.
7329 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7330 (s390_arch_setup): Adjust to set the current process'es target
7331 description. Don't adjust the regmap.
7332 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7333 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7334 (regs_info_3264): New globals.
7335 (s390_regs_info): New function.
7336 (the_low_target): Adjust.
7337 (initialize_low_arch): New function.
7338 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7339 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7340 [__mips64] (init_registers_mips_linux)
7341 (init_registers_mips_dsp_linux): Delete defines.
7342 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7343 (have_dsp): New global.
7344 (mips_read_description): New, based on mips_arch_setup.
7345 (mips_arch_setup): Reimplement.
7346 (get_usrregs_info): New function.
7347 (mips_cannot_fetch_register, mips_cannot_store_register)
7348 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7349 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7350 (target_regsets): Rename to ...
7351 (mips_regsets): ... this, and make static.
7352 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7353 (dsp_regs_info, regs_info): New globals.
7354 (mips_regs_info): New function.
7355 (the_low_target): Adjust.
7356 (initialize_low_arch): New function.
7357 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7358 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7359 Declare.
7360 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7361 (arm_read_description): New, with bits factored from
7362 arm_arch_setup.
7363 (arm_arch_setup): Reimplement.
7364 (target_regsets): Rename to ...
7365 (arm_regsets): ... this, and make static.
7366 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7367 (arm_regs_info): New function.
7368 (the_low_target): Adjust.
7369 (initialize_low_arch): New function.
7370 * linux-m68k-low.c (tdesc_m68k): Declare.
7371 (target_regsets): Rename to ...
7372 (m68k_regsets): ... this, and make static.
7373 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7374 (m68k_regs_info): New function.
7375 (m68k_arch_setup): New function.
7376 (the_low_target): Adjust.
7377 (initialize_low_arch): New function.
7378 * linux-sh-low.c (tdesc_sharch): Declare.
7379 (target_regsets): Rename to ...
7380 (sh_regsets): ... this, and make static.
7381 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7382 (sh_regs_info, sh_arch_setup): New functions.
7383 (the_low_target): Adjust.
7384 (initialize_low_arch): New function.
7385 * linux-bfin-low.c (tdesc_bfin): Declare.
7386 (bfin_arch_setup): New function.
7387 (bfin_usrregs_info, regs_info): New globals.
7388 (bfin_regs_info): New function.
7389 (the_low_target): Adjust.
7390 (initialize_low_arch): New function.
7391 * linux-cris-low.c (tdesc_cris): Declare.
7392 (cris_arch_setup): New function.
7393 (cris_usrregs_info, regs_info): New globals.
7394 (cris_regs_info): New function.
7395 (the_low_target): Adjust.
7396 (initialize_low_arch): New function.
7397 * linux-cris-low.c (tdesc_crisv32): Declare.
7398 (cris_arch_setup): New function.
7399 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7400 (cris_regs_info): New function.
7401 (the_low_target): Adjust.
7402 (initialize_low_arch): New function.
7403 * linux-m32r-low.c (tdesc_m32r): Declare.
7404 (m32r_arch_setup): New function.
7405 (m32r_usrregs_info, regs_info): New globals.
7406 (m32r_regs_info): Adjust.
7407 (initialize_low_arch): New function.
7408 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7409 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7410 (tic6x_usrregs_info): Forward declare.
7411 (tic6x_read_description): New function, based on ...
7412 (tic6x_arch_setup): ... this. Reimplement.
7413 (target_regsets): Rename to ...
7414 (tic6x_regsets): ... this, and make static.
7415 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7416 (tic6x_regs_info): New function.
7417 (the_low_target): Adjust.
7418 (initialize_low_arch): New function.
7419 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7420 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7421 (target_regsets): Rename to ...
7422 (xtensa_regsets): ... this, and make static.
7423 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7424 globals.
7425 (xtensa_arch_setup, xtensa_regs_info): New functions.
7426 (the_low_target): Adjust.
7427 (initialize_low_arch): New function.
7428 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7429 (nios2_arch_setup): Set the current process'es tdesc.
7430 (target_regsets): Rename to ...
7431 (nios2_regsets): ... this.
7432 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7433 (nios2_regs_info): New function.
7434 (the_low_target): Adjust.
7435 (initialize_low_arch): New function.
a261b8f5
PA
7436 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7437 (aarch64_arch_setup): Set the current process'es tdesc.
7438 (target_regsets): Rename to ...
7439 (aarch64_regsets): ... this.
7440 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7441 (aarch64_regs_info): New function.
7442 (the_low_target): Adjust.
7443 (initialize_low_arch): New function.
3aee8918
PA
7444 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7445 globals.
7446 (target_regsets): Rename to ...
7447 (tile_regsets): ... this.
7448 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7449 (tile_regs_info): New function.
7450 (tile_arch_setup): Set the current process'es tdesc.
7451 (the_low_target): Adjust.
7452 (initialize_low_arch): New function.
7453 * spu-low.c (tdesc_spu): Declare.
7454 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7455 * win32-arm-low.c (tdesc_arm): Declare.
7456 (arm_arch_setup): New function.
7457 (the_low_target): Install arm_arch_setup instead of
7458 init_registers_arm.
7459 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7460 (init_windows_x86): Rename to ...
7461 (i386_arch_setup): ... this. Set `win32_tdesc'.
7462 (the_low_target): Adjust.
7463 * win32-low.c (win32_tdesc): New global.
7464 (child_add_thread): Don't create the thread cache here.
7465 (do_initial_child_stuff): Set the new process'es tdesc.
7466 * win32-low.h (struct target_desc): Forward declare.
7467 (win32_tdesc): Declare.
7468 * lynx-i386-low.c (tdesc_i386): Declare global.
7469 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7470 * lynx-low.c (lynx_tdesc): New global.
7471 (lynx_add_process): Set the new process'es tdesc.
7472 * lynx-low.h (struct target_desc): Forward declare.
7473 (lynx_tdesc): Declare global.
7474 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7475 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7476 * nto-low.c (nto_tdesc): New global.
7477 (do_attach): Set the new process'es tdesc.
7478 * nto-low.h (struct target_desc): Forward declare.
7479 (nto_tdesc): Declare.
7480 * nto-x86-low.c (tdesc_i386): Declare.
7481 (nto_x86_arch_setup): Set `nto_tdesc'.
7482
b1fbec62
GB
74832013-06-04 Gary Benson <gbenson@redhat.com>
7484
7485 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7486 to qSupported response when appropriate.
7487 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7488 with nonzero-length annex.
7489 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7490 arguments supplied in annex.
7491
d1ec4ce7
DE
74922013-05-31 Doug Evans <dje@google.com>
7493
ac44adcb 7494 PR server/15594
d1ec4ce7
DE
7495 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7496 64 bits in 64-cross-32 environment.
7497
9b25f2d3
PA
74982013-05-28 Pedro Alves <palves@redhat.com>
7499
7500 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7501 (aarch64-without-fpu.c): Delete rule.
7502 * configure.srv (aarch64*-*-linux*): Remove references to
7503 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7504 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7505 declaration.
7506
6740dc9c
PA
75072013-05-24 Pedro Alves <palves@redhat.com>
7508
7509 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7510 instead of strchr/decode_address. Error if the range isn't split
7511 with a ','. Don't assume there's be a ':' in the action.
7512
c2d6af84
PA
75132013-05-23 Yao Qi <yao@codesourcery.com>
7514 Pedro Alves <palves@redhat.com>
7515
7516 * linux-low.c (lwp_in_step_range): New function.
7517 (linux_wait_1): If the thread was range stepping and stopped
7518 outside the stepping range, report the stop to GDB. Otherwise,
7519 continue stepping. Add range stepping debug output.
7520 (linux_set_resume_request): Copy the step range from the resume
7521 request to the lwp.
7522 (linux_supports_range_stepping): New.
7523 (linux_target_ops) <supports_range_stepping>: Set to
7524 linux_supports_range_stepping.
7525 * linux-low.h (struct linux_target_ops)
7526 <supports_range_stepping>: New field.
7527 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7528 * linux-x86-low.c (x86_supports_range_stepping): New.
7529 (the_low_target) <supports_range_stepping>: Set to
7530 x86_supports_range_stepping.
7531 * server.c (handle_v_cont): Handle 'r' action.
7532 (handle_v_requests): Append ";r" if the target supports range
7533 stepping.
7534 * target.h (struct thread_resume) <step_range_start,
7535 step_range_end>: New fields.
7536 (struct target_ops) <supports_range_stepping>:
7537 New field.
7538 (target_supports_range_stepping): New macro.
7539
58794e1a
JB
75402013-05-17 Joel Brobecker <brobecker@adacore.com>
7541
7542 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7543 confusion in comment.
7544
d631c5a7
JB
75452013-05-17 Joel Brobecker <brobecker@adacore.com>
7546
7547 * lynx-low.c (struct process_info_private): New type.
7548 (lynx_add_process): New function.
7549 (lynx_create_inferior, lynx_attach): Replace calls to
7550 add_process by calls to lynx_add_process.
7551 (lynx_resume): If PTID is null, then try using
7552 current_process()->private->last_wait_event_ptid.
7553 Add comments.
7554 (lynx_clear_inferiors): Delete. The contents of that function
7555 has been inlined in lynx_mourn;
7556 (lynx_wait_1): Save the ptid in the process's private data.
7557 (lynx_mourn): Free the process' private data. Replace call
7558 to lynx_clear_inferiors by call to clear_inferiors.
7559
96f7a20f
YQ
75602013-05-17 Yao Qi <yao@codesourcery.com>
7561
7562 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7563 the right place.
7564
db0dfaa0
LM
75652013-05-16 Luis Machado <lgustavo@codesourcery.com>
7566
7567 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7568 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7569 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7570 PT_TEXT_END_ADDR guards. Update comments.
7571 (linux_target_op) <read_offsets>: Conditionally define to
7572 linux_read_offsets if the target is UCLIBC and if it defines
7573 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7574
68f5f838
SL
75752013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7576 Andrew Jenner <andrew@codesourcery.com>
7577
7578 * Makefile.in (SFILES): Add linux-nios2-low.c.
7579 (clean): Add action to delete nios2-linux.c.
7580 (nios2-linux.c): New rule.
7581 * configure.srv: Add nios2*-*-linux*.
7582 * linux-nios2-low.c: New.
7583
1ebff1fd
HAQ
75842013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7585
7586 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7587
f6150862
HZ
75882013-04-25 Hui Zhu <hui@codesourcery.com>
7589
7590 PR gdb/15186
f6150862
HZ
7591 * ax.c (ax_printf): Add fflush.
7592
614c279d
TT
75932013-04-22 Tom Tromey <tromey@redhat.com>
7594
7595 * Makefile.in (SFILES): Add filestuff.c.
7596 (OBS): Add filestuff.o.
7597 (filestuff.o): New target.
7598 * config.in, configure: Rebuild.
7599 * configure.ac: Check for fdwalk, pipe2.
7600
7d4e5717
PA
76012013-04-17 Pedro Alves <palves@redhat.com>
7602
7603 * configure.ac (USE_THREAD_DB): Delete variable.
7604 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7605 Don't AC_SUBST USE_THREAD_DB.
7606 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7607 * config.in, configure: Regenerate.
7608
d5c93e41
PA
76092013-04-16 Pedro Alves <palves@redhat.com>
7610
7611 * linux-low.h (struct lwp_info) <thread_known>: Move under
7612 the USE_THREAD_DB #ifdef.
7613
04f5fe89
PA
76142013-04-16 Pedro Alves <palves@redhat.com>
7615
7616 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7617 (linux-low.o): Delete rule.
7618 * linux-low.h: Always include "gdb_thread_db.h" instead of
7619 conditionally including thread_db.h.
7620 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7621 HAVE_THREAD_DB_H.
7622
480b27bf
JK
76232013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7624
7625 * Makefile.in (install-only): Fix make install regression.
7626
43662968
JK
76272013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7628
7629 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7630 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7631 installation.
7632 * gdbserver.1: Remove.
7633
3e74e146
PA
76342013-03-22 Pedro Alves <palves@redhat.com>
7635
7636 * linux-low.c (handle_extended_wait): Don't call
7637 linux_enable_event_reporting.
7638
a8347a2a
TT
76392013-03-15 Tony Theodore <tonyt@logyst.com>
7640
7641 PR build/9098:
7642 * Makefile.in (SHELL): Use @SHELL@.
7643
eeb56fa7
SDJ
76442013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7645
7646 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7647 compiler warning.
7648
4fa7e2ff
JB
76492013-03-13 Joel Brobecker <brobecker@adacore.com>
7650
7651 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7652 Remove extraneous NULL element.
7653
8ddb1965
YQ
76542013-03-13 Yao Qi <yao@codesourcery.com>
7655
7656 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7657 'V' block in trace frame.
7658
9accd112
MM
76592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7660
7661 * target.h (struct target_ops): Add btrace ops.
7662 (target_supports_btrace): New macro.
7663 (target_enable_btrace): New macro.
7664 (target_disable_btrace): New macro.
7665 (target_read_btrace): New macro.
7666 * gdbthread.h (struct thread_info): Add btrace field.
7667 * server.c: Include btrace-common.h.
7668 (handle_btrace_general_set): New function.
7669 (handle_btrace_enable): New function.
7670 (handle_btrace_disable): New function.
7671 (handle_general_set): Call handle_btrace_general_set.
7672 (handle_qxfer_btrace): New function.
7673 (struct qxfer qxfer_packets[]): Add btrace entry.
7674 * inferiors.c (remove_thread): Disable btrace.
7675 * linux-low: Include linux-btrace.h.
7676 (linux_low_enable_btrace): New function.
7677 (linux_low_read_btrace): New function.
7678 (linux_target_ops): Add btrace ops.
7679 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7680 Add srv_linux_btrace=yes.
7681 (x86_64-*-linux*): Add linux-btrace.o.
7682 Add srv_linux_btrace=yes.
7683 * configure.ac: Define HAVE_LINUX_BTRACE.
7684 * config.in: Regenerated.
7685 * configure: Regenerated.
7686
5cc22e4c
MM
76872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7688
7689 * server.c (handle_qxfer): Preserve error message if -3 is
7690 returned.
7691 (qxfer): Document the -3 return value.
7692
7c97f91e
MM
76932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7694
7695 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7696 (linux_btrace_h): New variable.
7697 (linux-btrace.o): New rule.
7698
be9a119c 76992013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7700 Hafiz Abid Qadeer <abidh@codesourcery.com>
7701
7702 * tracepoint.c (trace_buffer_size): New global.
7703 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7704 (init_trace_buffer): Change to one-argument function. Allocate
7705 trace buffer memory.
7706 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7707 handle QTBuffer:size packet.
7708 (cmd_bigqtbuffer_size): New function.
7709 (initialize_tracepoint): Call init_trace_buffer with
7710 DEFAULT_TRACE_BUFFER_SIZE.
7711 * server.c (handle_query): Add QTBuffer:size in the
7712 supported packets.
7713
e64f7499
YQ
77142013-03-07 Yao Qi <yao@codesourcery.com>
7715
7716 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7717 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7718 of -1.
7719 (cmd_qtsp): Adjust condition. Do post increment.
7720 Set cur_action and cur_step_action back to 0.
7721
f0ae6fc3
PA
77222013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7723
7724 PR server/15236
7725 * linux-low.c (linux_write_memory): Return early success if LEN is
7726 zero.
7727
b5b0b0af
CV
77282013-03-05 Corinna Vinschen <vinschen@redhat.de>
7729
334ad4a8 7730 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7731
589bc927
TT
77322013-02-28 Tom Tromey <tromey@redhat.com>
7733
7734 * configure.ac: Invoke AC_SYS_LARGEFILE.
7735 * configure, config.in: Rebuild.
7736
dfe07582
CV
77372013-02-28 Corinna Vinschen <vinschen@redhat.com>
7738
7739 * win32-low.c: Throughout, fix format strings and casts of
7740 printf-like functions to avoid type related warnings on all
7741 platforms.
7742 (get_child_debug_event): Print dwDebugEventCode as hex since
7743 that's how it's usually documented.
7744
736cd585
YQ
77452013-02-28 Yao Qi <yao@codesourcery.com>
7746
7747 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7748 pulongest.
7749
e1f58301
JW
77502013-02-27 Jiong Wang <jiwang@tilera.com>
7751
7752 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7753 (reg-tilegx32.c): New rule.
7754 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7755 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7756 different register info initializer according to elf class.
7757 (init_registers_tilgx32): New function. The tilegx32 register info
7758 initializer.
7759 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7760 (tile_store_gregset): Likewise.
7761
d171ca78
YQ
77622013-02-27 Yao Qi <yao@codesourcery.com>
7763
7764 * server.c (process_point_options): Print debug message when
7765 debug_threads is true.
7766
282bbdf3
YQ
77672013-02-26 Yao Qi <yao@codesourcery.com>
7768
7769 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7770
aca22551
PA
77712013-02-19 Pedro Alves <palves@redhat.com>
7772 Kai Tietz <ktietz@redhat.com>
7773
7774 PR gdb/15161
7775
7776 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7777 instead of strtoul to extract address from packet.
7778 (process_serial_event) <'z'>: Likewise.
7779
4f3cee1c
YQ
77802013-02-18 Yao Qi <yao@codesourcery.com>
7781
7782 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7783
8e1d55a3
PA
77842013-02-14 Pedro Alves <palves@redhat.com>
7785
7786 Plug memory leak.
7787
7788 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7789 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7790
458820da
PA
77912013-02-14 Pedro Alves <palves@redhat.com>
7792
7793 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7794
baea0dae
PA
77952013-02-14 Pedro Alves <palves@redhat.com>
7796
7797 * tracepoint.c (save_string): Delete.
7798 (add_tracepoint_action): Use savestring instead of save_string.
7799
0b1afbb3
PA
78002013-02-12 Pedro Alves <palves@redhat.com>
7801
7802 * linux-xtensa-low.c: Ditto.
7803 * xtensa-xtregs.c: Ditto.
7804
8a4ac37e
PA
78052013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7806
7807 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7808 thread_db.
7809
148de6bb
MS
78102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7811
7812 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7813 aarch64_num_wp_regs and aarch64_num_bp_regs to
7814 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7815
55fac6e0
MS
78162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7817
7818 * linux-aarch64-low.c (ps_get_thread_area): Replace
7819 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7820
176eb98c
MS
78212013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7822 Marcus Shawcroft <marcus.shawcroft@arm.com>
7823 Nigel Stephens <nigel.stephens@arm.com>
7824 Yufeng Zhang <yufeng.zhang@arm.com>
7825
7826 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7827 (aarch64.c, aarch64-without-fpu.c): New targets.
7828 * configure.srv (aarch64*-*-linux*): New.
7829 * linux-aarch64-low.c: New file.
7830
56f7af9c
MS
78312013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7832
43aaf8b6 7833 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7834 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7835 (dequeue_one_deferred_signal, linux_resume_one_thread)
7836 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7837 (linux_tracefork_grandchild, linux_test_for_tracefork)
7838 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7839 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7840 where the argument is 0.
7841
60f662b0
YQ
78422013-01-25 Yao Qi <yao@codesourcery.com>
7843
7844 * event-loop.c: Include "queue.h".
7845 (gdb_event_p): New typedef.
7846 (struct gdb_event) <next_event>: Remove.
7847 (event_queue): Change to QUEUE(gdb_event_p).
7848 (async_queue_event): Remove.
7849 (gdb_event_xfree): New.
7850 (initialize_event_loop): New.
7851 (process_event): Use API from QUEUE.
7852 (wait_for_event): Likewise.
7853 * server.c (main): Call initialize_event_loop.
7854 * server.h (initialize_event_loop): Declare.
7855
5ae4861a
YQ
78562013-01-18 Yao Qi <yao@codesourcery.com>
7857
7858 * ax.h (struct eval_agent_expr_context): New.
7859 (gdb_eval_agent_expr): Update declaration.
7860 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7861 TFRAME. Add new argument CTX.
7862 * server.h (struct eval_agent_expr_context): Declare.
7863 (agent_mem_read, agent_tsv_read): Update declaration.
7864 (agent_mem_read_string): Likewise.
7865 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7866 (add_traceframe_block): Add new argument TPOINT.
7867 Increase TPOINT->traceframe_usage.
7868 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7869 eval_tracepoint_agent_expr.
7870 (condition_true_at_tracepoint): Likewise.
7871 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7872 (agent_mem_read_string, agent_tsv_read): Likewise.
7873
85e00e85
YQ
78742013-01-16 Yao Qi <yao@codesourcery.com>
7875
7876 * linux-low.c (linux_resume_one_lwp): Don't check
7877 'lwp->bp_reinsert != 0'.
7878
4039cf45
JB
78792013-01-07 Joel Brobecker <brobecker@adacore.com>
7880 Pedro Alves <palves@redhat.com>
7881
7882 * lynx-low.c (ptrace_request_to_str): Define a temporary
7883 macro and use it to simplify this function's implementation.
7884
9044dee2
JB
78852013-01-07 Joel Brobecker <brobecker@adacore.com>
7886
7887 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7888 sets errno.
7889
e6352c8f
JB
78902013-01-07 Joel Brobecker <brobecker@adacore.com>
7891
7892 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7893
50681a27
JB
78942013-01-07 Joel Brobecker <brobecker@adacore.com>
7895
7896 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7897
3f6e77ef
JB
78982013-01-07 Joel Brobecker <brobecker@adacore.com>
7899
7900 * lynx-low.c (lynx_resume): Use the resume_info parameter
7901 to determine the ptid for the lynx_ptrace call, unless
7902 it is equal to minus_one_ptid, in which case we use the
7903 ptid of the current_inferior.
7904 (lynx_wait_1): After having received a thread create/exit
7905 event, resume the inferior's execution using the signaling
7906 thread's ptid, rather than the old ptid.
7907
7fda33ae
JB
79082013-01-07 Joel Brobecker <brobecker@adacore.com>
7909
7910 * lynx-low.c (lynx_resume): Delete variable ret.
7911
b9786c74
JB
79122013-01-01 Joel Brobecker <brobecker@adacore.com>
7913
7914 * gdbreplay.c (gdbreplay_version): Update copyright year.
7915 * server.c (gdbserver_version): Likewise.
7916
8b93d60f
JB
79172012-12-17 Joel Brobecker <brobecker@adacore.com>
7918
7919 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7920 new thread.
7921
037335a7
JB
79222012-12-17 Joel Brobecker <brobecker@adacore.com>
7923
7924 * lynx-low.c (ptrace_request_to_str): Add handling for
7925 PTRACE_GETTRACESIG.
7926
52d4cbd8
JB
79272012-12-17 Joel Brobecker <brobecker@adacore.com>
7928
7929 * lynx-low.c (lynx_attach): Delete variable new_process.
7930
ab8f6ca9
JB
79312012-12-17 Joel Brobecker <brobecker@adacore.com>
7932
7933 * lynx-low.c (lynx_create_inferior): Delete variable
7934 new_process.
7935
78cbc024
JB
79362012-12-17 Joel Brobecker <brobecker@adacore.com>
7937
7938 * lynx-low.c (ptrace_request_to_str): Do not handle
7939 PTRACE_GETTHREADLIST if this macro does not exist.
7940
14a00470
YQ
79412012-12-15 Yao Qi <yao@codesourcery.com>
7942
7943 * Makefile.in (OBS): Add notif.o.
7944 * notif.c, notif.h: New.
7945 * server.c: Include "notif.h".
7946 (struct vstop_notif) <next>: Remove.
7947 <base>: New field.
7948 (queue_stop_reply): Update.
7949 (push_event, send_next_stop_reply): Remove.
7950 (discard_queued_stop_replies): Update.
7951 (notif_stop): New variable.
7952 (handle_v_stopped): Remove.
7953 (handle_v_requests): Don't call handle_v_stopped. Call
7954 handle_ack_notif instead.
7955 (queue_stop_reply_callback): Call notif_event_enque instead
7956 of queue_stop_reply.
7957 (handle_status): Don't call send_next_stop_reply, call
7958 notif_write_event instead.
7959 (kill_inferior_callback): Likewise.
7960 (detach_or_kill_inferior_callback): Likewise.
7961 (main): Call initialize_notif.
7962 (process_serial_event): Call QUEUE_is_empty.
7963 (handle_target_event): Call notif_push instead of push event.
7964 * server.h (push_event): Remove declaration.
7965
61c125b9
TT
79662012-12-10 Tom Tromey <tromey@redhat.com>
7967
7968 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7969 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7970 macros.
7971 (.c.o): Rewrite.
7972 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7973 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7974 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7975 (amd64-linux-ipa.o, ax.o): Rewrite.
7976 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7977 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7978 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7979 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7980 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7981 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7982 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7983 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7984 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7985 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7986 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7987 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7988 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7989 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7990 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7991 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7992 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7993 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7994 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7995 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7996 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7997 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7998 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7999 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8000 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8001 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8002 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8003 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8004 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8005 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8006 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8007 (reg-tilegx.o): Remove.
8008 (all_object_files): New macro.
8009 Include .deps files.
8010 * aclocal.m4, configure: Rebuild.
8011 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8012 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8013 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8014
e90e9ad9
TT
80152012-12-05 Tom Tromey <tromey@redhat.com>
8016
8017 PR gdb/14917:
8018 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8019
02d403bf 80202012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8021
8022 * configure.ac: Check for linux/perf_event.h.
8023 * config.in: Regenerated.
8024 * configure: Regenerated.
8025
0270a750
PA
80262012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8027
8028 * hostio.c (handle_readlink): Decrease buffer size
8029 parameter passed to readlink by one byte.
8030
8c29b58e
YQ
80312012-11-26 Yao Qi <yao@codesourcery.com>
8032
8033 * configure.ac (build_warnings): Append '-Wempty-body'.
8034 * configure: Regenerated.
8035 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8036 body.
8037
8bdce1ff
PM
80382012-11-15 Pierre Muller <muller@sourceware.org>
8039
8040 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8041 * config.in: Regenerate.
8042 * configure: Regenerate.
8043 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8044 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8045 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8046 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8047 header.
8048 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8049 instead of <sys/wait.h> header.
8050 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8051
02d403bf 80522012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8053
8054 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8055 (various make rules): Remove -DGDBSERVER
8056
fbd5db48
YQ
80572012-11-09 Yao Qi <yao@codesourcery.com>
8058
8059 * spu-low.c (current_ptid): Move it to ..
8060 * gdbthread.h: ... here. New.
8061 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8062 * server.c (myresume, process_serial_event): Likewise.
8063 * thread-db.c (thread_db_find_new_threads): Likewise.
8064 * tracepoint.c (run_inferior_command): Likewise.
8065
b3dc46ff
AB
80662012-10-01 Andrew Burgess <aburgess@broadcom.com>
8067
8068 * server.c (handle_search_memory_1): Include access length in
8069 warning message.
8070
07c04788
HPN
80712012-09-05 Michael Brandt <michael.brandt@axis.com>
8072
8073 * linux-crisv32-low.c: Fix compile errors.
8074
918d227b
YQ
80752012-09-04 Yao Qi <yao@codesourcery.com>
8076
8077 * tracepoint.c (cmd_qtsv): Adjust debug message.
8078 Don't check CUR_TPOINT.
8079
18c1b81a
YQ
80802012-08-28 Yao Qi <yao@codesourcery.com>
8081
8082 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8083 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8084 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8085 Remove declarations of xmalloc, xreallloc, xstrdup and
8086 freeargv.
8087 * Makefile.in (libiberty_h): New.
8088 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8089 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8090
dc82f37b
YQ
80912012-08-23 Yao Qi <yao@codesourcery.com>
8092
8093 * server.h: Remove declaration of 'xsnprintf'.
8094
406b1477
KS
80952012-08-22 Keith Seitz <keiths@redhat.com>
8096
8097 * server.h: Include build-gnulib-gbserver/config.h.
8098 * gdbreplay.c: Likewise.
8099
e6712ff1
DE
81002012-08-08 Doug Evans <dje@google.com>
8101
8102 * Makefile.in (SFILES): Add gdb_vecs.c.
8103 (OBS): Add gdb_vecs.o.
8104 (gdb_vecs_h, host_defs_h): New variables.
8105 (thread-db.o): Add $(gdb_vecs_h) dependency.
8106 (gdb_vecs.o): New rule.
8107 * thread-db.c: #include "gdb_vecs.h".
8108 (thread_db_load_search): Use a vector to iterate over path elements.
8109 Handle text appearing after "$pdir".
8110
8111 * configure.ac: Add check for strstr.
8112 * config.in: Regenerate.
8113 * configure: Regenerate.
8114
7c3270ae
UW
81152012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8116
8117 * hostio.c (handle_pread): If pread fails, fall back to attempting
8118 lseek/read.
8119 (handle_pwrite): Likewise for pwrite.
8120
b62e2b27
UW
81212012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8122
8123 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8124 between unsupported TYPE and unimplementable ADDR/LEN combination.
8125 (arm_insert_point): Act on new return value.
8126
78a99e91
PA
81272012-07-31 Pedro Alves <palves@redhat.com>
8128
8129 * server.c (process_point_options): Only skip tokens if we find
8130 one that is unrecognized. Don't treat 'X' specially while
8131 skipping unrecognized tokens.
8132
fcf303ab
UW
81332012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8134
8135 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8136 to 4-byte-align HW breakpoint addresses for Thumb.
8137
7255706c
YQ
81382012-07-27 Yao Qi <yao@codesourcery.com>
8139
8140 PR remote/14161.
8141
8142 * server.h: Declare gdb_agent_about_to_close.
8143 * target.c (kill_inferior): Include "agent.h".
8144 New. Send command 'kill'.
8145 * target.h (kill_inferior): Removed macro.
8146 * tracepoint.c (gdb_agent_about_to_close): New.
8147 (gdb_agent_helper_thread): Handle command 'close'.
8148 Wait endlessly until the inferior stops.
8149 Install gdb_agent_remove_socket to atexit hook.
8150 (agent_socket_name): New static variable.
8151 (gdb_agent_socket_init): Replace local variable 'name' with
8152 'agent_socket_name'.
8153 (gdb_agent_remove_socket): New.
8154
5a3f286f
YQ
81552012-07-27 Yao Qi <yao@codesourcery.com>
8156
8157 * server.c (process_point_options): Stop at 'X' when parsing.
8158
961bd387
ME
81592012-07-19 Michael Eager <eager@eagercon.com>
8160
a261b8f5 8161 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8162 to hw_execute.
8163 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8164 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8165 hardware breakpoint.
8166
aa7c7447
JK
81672012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8168
8169 * gdbserver/linux-low.c (initialize_low): Call
8170 linux_ptrace_init_warnings.
8171
7f216e7c
DE
81722012-07-02 Doug Evans <dje@google.com>
8173
8174 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8175 pointer to int.
8176
d3ce09f5
SS
81772012-07-02 Stan Shebs <stan@codesourcery.com>
8178
8179 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8180 (ax.o): Add it to build rule.
8181 (ax-ipa.o): Ditto.
8182 (OBS): Add format.o.
8183 (IPA_OBS): Add format.o.
8184 * server.c (handle_query): Claim support for breakpoint commands.
8185 (process_point_options): Add command case.
8186 (process_serial_event): Leave running if there are printfs in
8187 effect.
8188 * mem-break.h (any_persistent_commands): Declare.
8189 (add_breakpoint_commands): Declare.
8190 (gdb_no_commands_at_breakpoint): Declare.
8191 (run_breakpoint_commands): Declare.
8192 * mem-break.c (struct point_command_list): New struct.
8193 (struct breakpoint): New field command_list.
8194 (any_persistent_commands): New function.
8195 (add_commands_to_breakpoint): New function.
8196 (add_breakpoint_commands): New function.
8197 (gdb_no_commands_at_breakpoint): New function.
8198 (run_breakpoint_commands): New function.
8199 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8200 locally.
8201 * ax.c: Include format.h.
8202 (ax_printf): New function.
8203 (gdb_eval_agent_expr): Add printf opcode.
8204
2f8f6aed
YQ
82052012-06-13 Yao Qi <yao@codesourcery.com>
8206
8207 * server.c (start_inferior): Remove duplicated writes to fields
8208 'last_resume_kind' and 'last_status' of 'current_inferior'.
8209
0c9070b3
YQ
82102012-06-12 Yao Qi <yao@codesourcery.com>
8211 Pedro Alves <palves@redhat.com>
8212
8213 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8214 comment.
8215 * server.c (handle_v_cont): Extend comment.
8216
c52daf70
YQ
82172012-06-11 Yao Qi <yao@codesourcery.com>
8218
8219 * linux-low.c (linux_attach): Add 'static'.
8220
d38bbb0a
YQ
82212012-06-06 Yao Qi <yao@codesourcery.com>
8222
8223 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8224
89dc0afd
JK
82252012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8226
8227 Fix gcc -flto compilation warning.
8228 * server.c (main): Make variable multi_mode and attach volatile.
8229
75f62ce7
TJB
82302012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8231
8232 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8233 if the platform doesn't know about it.
8234
65f479b6
PA
82352012-05-30 Jeff Kenton <jkenton@tilera.com>
8236
8237 * Makefile.in (SFILES): Add linux-tile-low.c.
8238 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8239 * configure.srv: Handle tilegx-*-linux*.
8240 * linux-tile-low.c: New file.
8241
0c5bf5a9
JK
82422012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8243
8244 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8245
a493e3e2
PA
82462012-05-24 Pedro Alves <palves@redhat.com>
8247
8248 PR gdb/7205
8249
43aaf8b6 8250 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8251
2ea28649
PA
82522012-05-24 Pedro Alves <palves@redhat.com>
8253
8254 PR gdb/7205
8255
8256 Replace target_signal with gdb_signal throughout.
8257
8d409d16
MR
82582012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8259
8260 * linux-low.c (linux_store_registers): Avoid the copying sequence
8261 when no data has been retrieved by ptrace.
8262
23512c01
MGD
82632012-05-22 Will Deacon <will.deacon@arm.com>
8264
8265 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8266 Include asm/ptrace.h.
8267 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8268 already defined.
8269
4934b29e
MR
82702012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8271
8272 * linux-low.c (linux_store_registers): Don't re-retrieve data
8273 with ptrace that has already been obtained from /proc. Always
8274 copy any data retrieved with ptrace to the buffer supplied.
8275
bde24c0a
PA
82762012-05-11 Yao Qi <yao@codesourcery.com>
8277 Pedro Alves <palves@redhat.com>
8278
8279 * linux-low.c (enum stopping_threads_kind): New.
8280 (stopping_threads): Change type to `enum stopping_threads_kind'.
8281 (handle_extended_wait): If stopping and suspending threads, leave
8282 the new_lwp suspended too.
8283 (linux_wait_for_event): Adjust.
8284 (stop_all_lwps): Set `stopping_threads' to
8285 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8286 whether we're suspending threads or just stopping them. Assert no
8287 recursion happens.
8288
623b6bdf
YQ
82892012-04-29 Yao Qi <yao@codesourcery.com>
8290
8291 * server.h: Move some code to ...
8292 * gdbthread.h: ... here. New.
8293 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8294 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8295 (nto-low.o, win32-low.o): Likewise.
8296 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8297 * regcache.c, remote-utils.c, server.c: Likewise.
8298 * target.c, tracepoint.c, win32-low.c: Likewise.
8299
f15f9948
TJB
83002012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8301
8302 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8303 (PTRACE_ARG4_TYPE): Likewise.
8304 (PTRACE_XFER_TYPE): Likewise.
8305 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8306 ptrace to PTRACE_ARG3_TYPE.
8307 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8308 (PTRACE_ARG4_TYPE): Likewise.
8309 (PTRACE_XFER_TYPE): Likewise.
8310 (linux_detach_one_lwp): Cast fourth argument of
8311 ptrace to long then PTRACE_ARG4_TYPE.
8312 (regsets_fetch_inferior_registers): Cast third argument of
8313 ptrace to long then PTRACE_ARG3_TYPE.
8314 (regsets_store_inferior_registers): Likewise.
8315
38ea300a
PA
83162012-04-20 Pedro Alves <palves@redhat.com>
8317
8318 * configure: Regenerate.
8319
c971b7fa
PA
83202012-04-19 Pedro Alves <palves@redhat.com>
8321
43aaf8b6 8322 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8323 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8324 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8325 (all, install-only, uninstall, clean-info, all-lib, clean): No
8326 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8327 (maintainer-clean realclean distclean): Use subdir_do.
8328 (subdir_do): New.
8329 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8330 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8331 * acinclude.m4: Include acx_configure_dir.m4.
8332 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8333 calls. Call AC_PROG_RANLIB. Configure gnulib using
8334 ACX_CONFIGURE_DIR.
8335 (GNULIB): New.
8336 (GNULIB_STDINT_H): Adjust.
8337 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8338 * gdbreplay.c: Include build-gnulib/config.h.
8339 * server.h: Likewise.
8340 * aclocal.m4: Regenerate.
8341 * config.in: Regenerate.
8342 * configure: Regenerate.
c971b7fa 8343
809277f8
PA
83442012-04-19 Pedro Alves <palves@redhat.com>
8345
8346 * Makefile.in (LIBGNU, INCGNU): Adjust.
8347 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8348 (all, install-only, uninstall, clean-info, all-lib, clean)
8349 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8350 * configure.ac: Adjust AC_OUTPUT output.
8351 * aclocal.m4: Regenerate.
8352 * configure: Regenerate.
8353
fd9bb8b8
PA
83542012-04-19 Pedro Alves <palves@redhat.com>
8355
8356 * Makefile.in (generated_files): New.
8357 (server_h): Remove the explicit dependency on config.h, and depend
8358 on $generated_files.
8359
1c298c66
PA
83602012-04-19 Pedro Alves <palves@redhat.com>
8361
8362 * Makefile.in (INCGNU): Add -Ignulib.
8363
57c4b50b
PA
83642012-04-19 Pedro Alves <palves@redhat.com>
8365
8366 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8367 (INCGNU): ... this, and spell out -I here.
8368 (GNULIB_LIB): Rename to ...
8369 (LIBGNU): ... this.
8370 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8371
1030e047
PA
83722012-04-19 Pedro Alves <palves@redhat.com>
8373
8374 * config.in: Regenerate.
8375
447d4319
PA
83762012-04-19 Pedro Alves <palves@redhat.com>
8377
8378 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8379 * server.h (memmem): Remove declaration.
8380 * config.in: Regenerate.
8381 * configure: Regenerate.
8382
aad9eab9
YQ
83832012-04-19 Yao Qi <yao@codesourcery.com>
8384
8385 * Makefile.in (SFILES): Add common/vec.c.
8386 (OBS): Add vec.o.
8387 (vec.o): New rule.
8388
3e10640f
YQ
83892012-04-19 Yao Qi <yao@codesourcery.com>
8390
8391 * remote-utils.c (prepare_resume_reply): Replace with macro
8392 target_core_of_thread.
8393 * server.c (handle_qxfer_threads_proper): Likewise.
8394 * target.h (traget_core_of_thread): New macro.
8395
71622373
PA
83962012-04-18 Pedro Alves <palves@redhat.com>
8397
8398 * aclocal.m4: Regenerate.
8399 * configure: Regenerate.
8400
80d26939
YQ
84012012-04-16 Yao Qi <yao@codesourcery.com>
8402
8403 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8404 duplicated on address.
8405
42476b70
YQ
84062012-04-16 Yao Qi <yao@codesourcery.com>
8407
8408 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8409 (struct tracepoint_action_ops) <send>: New field.
8410 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8411 (agent_expr_send, x_tracepoint_action_send): New.
8412 (l_tracepoint_action_send): New.
8413 (cmd_qtdp): Download and install tracepoint
8414 according to `use_agent'.
8415 (run_inferior_command): Add one more parameter `len'.
8416 Update callers.
8417 (tracepoint_send_agent): New.
8418 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8419
7bc83639
YQ
84202012-04-16 Yao Qi <yao@codesourcery.com>
8421
8422 * tracepoint.c (download_tracepoints): Moved to ...
8423 (cmd_qtstart): ... here.
8424
5f18041e
YQ
84252012-04-14 Yao Qi <yao@codesourcery.com>
8426
8427 * tracepoint.c: Include inttypes.h.
8428 (struct collect_memory_action): Use sized types.
8429 (struct tracepoint): Likewise.
8430 (cmd_qtdp, stop_tracing): Update print specifiers.
8431 (cmd_qtp, response_tracepoint): Likewise.
8432 (collect_data_at_tracepoint): Likewise.
8433 (collect_data_at_step): Likewise.
8434
55a8c076
YQ
84352012-04-14 Yao Qi <yao@codesourcery.com>
8436
8437 Import gnulib module inttypes.
8438 * aclocal.m4, config.in, configure: Regenerated.
8439
dc750257
YQ
84402012-04-14 Yao Qi <yao@codesourcery.com>
8441
8442 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8443 Makefile and config.status at last.
8444
0ab5faf9
YQ
84452012-04-13 Yao Qi <yao@codesourcery.com>
8446
8447 * tracepoint.c: Include stdint.h unconditionally.
8448
18f5fd81
TJB
84492012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8450
8451 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8452 on BFD_HAVE_SYS_PROCFS_TYPE.
8453 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8454 * configure: Regenerate.
8455 * config.in: Likewise.
8456
4d47af5c
L
84572012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8458
8459 * Makefile.in (clean): Also remove x32.c x32-linux.c
8460 x32-avx.c x32-avx-linux.c.
8461 (x32.o): New target.
8462 (x32.c): Likewise.
8463 (x32-linux.o): Likewise.
8464 (x32-linux.c): Likewise.
8465 (x32-avx.o): Likewise.
8466 (x32-avx.c): Likewise.
8467 (x32-avx-linux.o): Likewise.
8468 (x32-avx-linux.c): Likewise.
8469
8470 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8471 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8472 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8473 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8474 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8475 i386/x32-avx-linux.xml.
8476
8477 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8478 (init_registers_x32_avx_linux): Likwise.
8479 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8480 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8481
ecedbe58
PA
84822012-04-13 Pedro Alves <palves@redhat.com>
8483
8484 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8485 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8486 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8487 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8488 the sub-make.
8489
c92b5177
L
84902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8491
8492 * linux-x86-low.c (compat_x32_clock_t): New.
8493 (compat_x32_siginfo_t): Likewise.
8494 (compat_x32_siginfo_from_siginfo): Likewise.
8495 (siginfo_from_compat_x32_siginfo): Likewise.
8496 (linux_is_elf64): Likewise.
8497 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8498 and siginfo_from_compat_x32_siginfo for x32.
8499 (x86_arch_setup): Set linux_is_elf64.
8500
214d508e
L
85012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8502
8503 PR gdb/13969
8504 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8505 e_machine field.
8506 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8507 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8508 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8509 compatible with process.
8510
c9a1864a
YQ
85112012-04-12 Yao Qi <yao@codesourcery.com>
8512
8513 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8514 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8515 (install-only, install-info, clean): Handle sub dir gnulib.
8516 (all-lib, am--refresh): New targets.
8517 (memmem.o): Remove target.
8518 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8519 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8520 (AC_REPLACE_FUNCS): Remove memmem.
8521 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8522 (AC_OUTPUT): Generate Makefile in gnulib/.
8523 * aclocal.m4, config.in, configure: Regenerated.
8524
367ba2c2
MR
85252012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8526
8527 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8528
9d236627
PA
85292012-04-05 Pedro Alves <palves@redhat.com>
8530
8531 -Werror=strict-aliasing
8532
8533 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8534 pointer.
8535
111217b3
PA
85362012-04-04 Pedro Alves <palves@redhat.com>
8537
8538 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8539 (sparc_store_gregset_from_stack, sparc_store_gregset)
8540 (sparc_breakpoint_at): Fix formatting.
8541
8365dcf5
TJB
85422012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8543
8544 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8545 are available.
8546 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8547 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8548 * config.in: Regenerate.
8549 * configure: Likewise.
8550
689cc2ae
PA
85512012-03-29 Pedro Alves <palves@redhat.com>
8552
8553 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8554 Correct ptrace arguments.
8555
c14dfd32
PA
85562012-03-28 Pedro Alves <palves@redhat.com>
8557
8558 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8559 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8560 (IA64_FR1_REGNUM): New defines.
8561 (ia64_fetch_register): New.
8562 (the_low_target): Install it.
8563 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8564 field.
8565 * linux-low.c (linux_fetch_registers): Try the
8566 the_low_target.fetch_register hook first.
8567
8568 * linux-arm-low.c (the_low_target): Adjust.
8569 * linux-bfin-low.c (the_low_target): Adjust.
8570 * linux-cris-low.c (the_low_target): Adjust.
8571 * linux-crisv32-low.c (the_low_target): Adjust.
8572 * linux-m32r-low.c (the_low_target): Adjust.
8573 * linux-m68k-low.c (the_low_target): Adjust.
8574 * linux-mips-low.c (the_low_target): Adjust.
8575 * linux-ppc-low.c (the_low_target): Adjust.
8576 * linux-s390-low.c (the_low_target): Adjust.
8577 * linux-sh-low.c (the_low_target): Adjust.
8578 * linux-sparc-low.c (the_low_target): Adjust.
8579 * linux-tic6x-low.c (the_low_target): Adjust.
8580 * linux-x86-low.c (the_low_target): Adjust.
8581 * linux-xtensa-low.c (the_low_target): Adjust.
8582
63c88e13
PA
85832012-03-26 Pedro Alves <palves@redhat.com>
8584
8585 * server.c (handle_qxfer_libraries): Don't bail early if
8586 the_target->qxfer_libraries_svr4 is not NULL.
8587
fb723180
PA
85882012-03-26 Pedro Alves <palves@redhat.com>
8589
8590 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8591
0afae3cf
PA
85922012-03-23 Pedro Alves <palves@redhat.com>
8593
8594 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8595 "library-list-svr4" element's start tag when the the DSO list is
8596 empty.
8597
485f1ee4
PA
85982012-03-23 Pedro Alves <palves@redhat.com>
8599
8600 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8601 a variable whose type size is the same as the inferior's pointer
8602 size.
8603
a5362b9a
TS
86042012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8605
8606 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8607 struct siginfo.
8608 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8609 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8610 * linux-low.h: Include <signal.h>.
8611 (struct siginfo): Remove forward declaration.
8612 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8613 struct siginfo.
8614
d226c142
MF
86152012-03-21 Mike Frysinger <vapier@gentoo.org>
8616
8617 * .gitignore: Ignore more files.
8618
122f36ef
PA
86192012-03-19 Pedro Alves <palves@redhat.com>
8620 Jan Kratochvil <jan.kratochvil@redhat.com>
8621
8622 * server.c (cont_thread, general_thread): Add describing comments.
8623 (start_inferior): Clear `cont_thread'.
8624 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8625 of a process.
8626
fc3e5175
YQ
86272012-03-15 Yao Qi <yao@codesourcery.com>
8628
8629 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8630 handling to ...
8631 (cmd_qtdp): ... here.
8632
8d0d92cd
YQ
86332012-03-15 Yao Qi <yao@codesourcery.com>
8634
8635 * tracepoint.c (struct tracepoint_action_ops): New.
8636 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8637 (m_tracepoint_action_download): New.
8638 (r_tracepoint_action_download): New.
8639 (x_tracepoint_action_download): New.
8640 (l_tracepoint_action_download): New.
8641 (add_tracepoint_action): Install `action->ops' according type.
8642 (download_tracepoint_1): Move code `download' function pointer
8643 of various tracepoint_action_ops.
8644
87b0bb13
JK
86452012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8646
8647 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8648 linux_ptrace_attach_warnings.
8649
5f572dec
JK
86502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8651
8652 * Makefile.in (linux-ptrace.o): New.
8653 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8654 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8655 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8656 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8657 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8658 of these targets.
8659 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8660
f4647387
YQ
86612012-03-08 Yao Qi <yao@codesourcery.com>
8662 Pedro Alves <palves@redhat.com>
8663
8664 Fix PR server/13392.
8665 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8666 offset of JMP insn.
8667 * tracepoint.c (remove_tracepoint): New.
8668 (cmd_qtdp): Call remove_tracepoint when failed to install.
8669
9b224c5e
PA
86702012-03-07 Pedro Alves <palves@redhat.com>
8671
8672 * linux-low.c (get_detach_signal): New.
8673 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8674 Pass on pending signals to PTRACE_DETACH. Check the result of the
8675 ptrace call.
8676 * server.c (program_signals, program_signals_p): New.
8677 (handle_general_set): Handle QProgramSignals.
8678 * server.h (program_signals, program_signals_p): Declare.
8679
e237a7e2
JK
86802012-03-05 Pedro Alves <palves@redhat.com>
8681 Jan Kratochvil <jan.kratochvil@redhat.com>
8682
8683 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8684 New comment why.
8685
5808517f
YQ
86862012-03-03 Yao Qi <yao@codesourcery.com>
8687
8688 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8689 agent_look_up_symbols.
8690
58b4daa5
YQ
86912012-03-03 Yao Qi <yao@codesourcery.com>
8692
8693 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8694 (linux-x86-low.o): Likewise.
8695 * server.h: Remove in_process_agent_loaded.
8696 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8697 common/agent.c.
8698 Update callers.
8699
8ffcbaaf
YQ
87002012-03-03 Yao Qi <yao@codesourcery.com>
8701
8702 * tracepoint.c (gdb_agent_capability): New global.
8703 (in_process_agent_loaded_ust): Renamed to
8704 `in_process_agent_supports_ust'.
8705 Update callers.
8706 (in_process_agent_supports_ust): Call agent_capability_check.
8707 (clear_installed_tracepoints): Assert that agent supports
8708 agent.
8709
d1feda86
YQ
87102012-03-03 Yao Qi <yao@codesourcery.com>
8711
8712 * linux-low.c (linux_supports_agent): New.
8713 (linux_target_ops): Initialize field `supports_agent' with
8714 linux_supports_agent.
8715 * target.h (struct target_ops) <supports_agent>: New.
8716 (target_supports_agent): New macro.
8717 * server.c (handle_general_set): Handle packet 'QAgent'.
8718 (handle_query): Send `QAgent+'.
8719 * Makefile.in (server.o): Depends on agent.h.
8720
2fa291ac
YQ
87212012-03-03 Yao Qi <yao@codesourcery.com>
8722
8723 * Makefile.in (OBS): Add agent.o.
8724 Add new rule for agent.o.
8725 Track dependence of tracepoint.c on agent.h.
8726 * tracepoint.c (run_inferior_command_1):
8727 (run_inferior_command): Call agent_run_command.
8728 (gdb_ust_connect_sync_socket): Deleted. Move it to
8729 common/agent.c.
8730 (resume_thread, stop_thread): Likewise.
8731 (gdb_ust_socket_init): Renamed to ...
8732 (gdb_agent_socket_init): ... New.
8733 (gdb_ust_thread): Renamed to ...
8734 (gdb_agent_helper_thread): ... New.
8735 (gdb_ust_init): Move some code to ...
8736 (gdb_agent_init): ... here. New.
8737 [HAVE_UST]: Call gdb_ust_init.
8738 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8739 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8740 * config.in, configure: Regenerated.
8741
05044653
PA
87422012-03-02 Pedro Alves <palves@redhat.com>
8743
8744 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8745 * linux-low.c (struct simple_pid_list): New.
8746 (stopped_pids): New a struct simple_pid_list pointer.
8747 (add_to_pid_list, pull_pid_from_list): New.
8748 (handle_extended_wait): Don't assume the first signal new children
8749 report is SIGSTOP. Adjust call to pull_pid_from_list.
8750 (linux_wait_for_lwp): Adjust.
8751
8d00225b
YQ
87522012-03-02 Yao Qi <yao@codesourcery.com>
8753
8754 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8755 debug log.
8756
19560ba5
YQ
87572012-03-02 Yao Qi <yao@codesourcery.com>
8758
8759 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8760 `stop_pc' and `tpoint'. Update caller.
8761
1faeff08
MR
87622012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8763
8764 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8765 * linux-low.c (use_linux_regsets): New macro.
8766 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8767 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8768 (linux_register_in_regsets): New function.
8769 (usr_fetch_inferior_registers): Skip registers covered by
8770 regsets.
8771 (usr_store_inferior_registers): Likewise.
8772 (usr_fetch_inferior_registers): New macro.
8773 (usr_store_inferior_registers): Likewise.
8774 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8775 (linux_store_registers): Likewise.
8776 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8777 prototype.
8778 (init_registers_mips64_dsp_linux): Likewise.
8779 (init_registers_mips_linux): New macro.
8780 (init_registers_mips_dsp_linux): Likewise.
8781 (mips_dsp_num_regs): Likewise.
8782 (DSP_BASE, DSP_CONTROL): New fallback macros.
8783 (mips_base_regs): New macro.
8784 (mips_regmap): Use it. Fix the size.
8785 (mips_dsp_regmap): New variable.
8786 (mips_dsp_regset_bitmap): Likewise.
8787 (mips_arch_setup): New function.
8788 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8789 than mips_regmap.
8790 (mips_cannot_store_register): Likewise.
8791 (the_low_target): Update .arch_setup, .num_regs and .regmap
8792 initializers. Add .regset_bitmap initializer.
8793 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8794 initializer.
8795 * linux-bfin-low.c (the_low_target): Likewise.
8796 * linux-cris-low.c (the_low_target): Likewise.
8797 * linux-crisv32-low.c (the_low_target): Likewise.
8798 * linux-ia64-low.c (the_low_target): Likewise.
8799 * linux-m32r-low.c (the_low_target): Likewise.
8800 * linux-m68k-low.c (the_low_target): Likewise.
8801 * linux-ppc-low.c (the_low_target): Likewise.
8802 * linux-s390-low.c (the_low_target): Likewise.
8803 * linux-sh-low.c (the_low_target): Likewise.
8804 * linux-sparc-low.c (the_low_target): Likewise.
8805 * linux-tic6x-low.c (the_low_target): Likewise.
8806 * linux-x86-low.c (the_low_target): Likewise.
8807 * linux-xtensa-low.c (the_low_target): Likewise.
8808 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8809 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8810 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8811 srv_xmlfiles.
8812 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8813 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8814
c03e6ccc
YQ
88152012-02-29 Yao Qi <yao@codesourcery.com>
8816 Pedro Alves <palves@redhat.com>
8817
8818 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8819 `step_over_finished' is true.
8820
644cebc9
PA
88212012-02-27 Pedro Alves <palves@redhat.com>
8822
8823 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8824 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8825
c14d7ab2
PA
88262012-02-27 Pedro Alves <palves@redhat.com>
8827
8828 PR server/9684
8829 * linux-low.c (pid_is_stopped): New.
8830 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8831
412c89dd
LM
88322012-02-25 Luis Machado <lgustavo@codesourcery.com>
8833
8834 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8835 of conditions.
8836
b745defe
MR
88372012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8838
8839 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8840
9f3a5c85
LM
88412012-02-24 Luis Machado <lgustavo@codesourcery>
8842
8843 * server.c (handle_query): Advertise support for target-side
8844 breakpoint condition evaluation.
8845 (process_point_options): New function.
8846 (process_serial_event): When inserting a breakpoint, check for
8847 a target-side condition that should be evaluated.
8848
8849 * mem-break.c: Include regcache.h and ax.h.
8850 (point_cond_list_t): New data structure.
8851 (breakpoint) <cond_list>: New field.
8852 (find_gdb_breakpoint_at): Make non-static.
8853 (delete_gdb_breakpoint_at): Clear any target-side
8854 conditions.
8855 (clear_gdb_breakpoint_conditions): New function.
8856 (add_condition_to_breakpoint): Likewise.
8857 (add_breakpoint_condition): Likewise.
8858 (gdb_condition_true_at_breakpoint): Likewise.
8859 (gdb_breakpoint_here): Return result directly instead
8860 of going through a local variable.
8861
8862 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8863 (clear_gdb_breakpoint_conditions): Likewise.
8864 (add_breakpoint_condition): Likewise.
8865 (gdb_condition_true_at_breakpoint): Likewise.
8866
8867 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8868 (need_step_over_p): Take target-side breakpoint condition into
8869 consideration.
8870
5e1dc496
LM
88712012-02-24 Luis Machado <lgustavo@codesourcery>
8872
8873 * server.h: Include tracepoint.h.
8874 (agent_mem_read, agent_get_trace_state_variable_value,
8875 agent_set_trace_state_variable_value,
8876 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8877 get_set_tsv_func_addr): New prototypes.
8878
8879 * ax.h: New include file.
8880 * ax.c: New source file.
8881
8882 * tracepoint.c: Include ax.h.
8883 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8884 agent_expr, eval_result_type): Move to ax.h.
8885 (parse_agent_expr): Rename to ...
8886 (gdb_parse_agent_expr): ... this, make it non-static and move
8887 to ax.h.
8888 (unparse_agent_expr) Rename to ...
8889 (gdb_unparse_agent_expr): ... this, make it non-static and move
8890 to ax.h.
8891 (eval_agent_expr): Rename to ...
8892 (eval_tracepoint_agent_expr): ... this.
8893 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8894 forward declarations.
8895 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8896 (agent_get_trace_state_variable_value): New function.
8897 (agent_set_trace_state_variable_value): New function.
8898 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8899 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8900 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8901 (condition_true_at_tracepoint): Likewise.
8902 (parse_agent_expr): Rename to ...
8903 (gdb_parse_agent_expr): ... this and move to ax.c.
8904 (unparse_agent_expr): Rename to ...
8905 (gdb_unparse_agent_expr): ... this and move to ax.c.
8906 (gdb_agent_op_name): Move to ax.c.
8907 (eval_agent_expr): Rename to ...
8908 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8909 and move to ax.c.
8910 (eval_tracepoint_agent_expr): New function.
8911 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8912 non-static.
5e1dc496
LM
8913 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8914 ax.c.
8915 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8916 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8917 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8918 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8919 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8920 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8921 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8922 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8923 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8924 (compile_bytecodes): Remove forward declaration.
8925 (is_goto_target): Move to ax.c.
8926 (compile_bytecodes): Move to ax.c and call
8927 agent_get_trace_state_variable_value (...) and
8928 agent_set_trace_state_variable_value (...).
8929
8930 * Makefile.in: Update ax.c and IPA dependencies.
8931
277e4e52
PA
89322012-02-24 Pedro Alves <palves@redhat.com>
8933
8934 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8935 (cmd_bigqtbuffer_circular): ... this. Only handle
8936 'QTBuffer:circular:'.
8937 (handle_tracepoint_general_set): Adjust.
8938
bf4c19f7
YQ
89392012-02-16 Yao Qi <yao@codesourcery.com>
8940
8941 * inferiors.c: Move code to ...
8942 * dll.c: .... here. New.
8943 * server.h: Declare clear_dlls.
8944 * Makefile.in (SFILES): Add dll.c.
8945 (OBS): Add dll.o
8946 (dll.o): New rule.
8947
d73f2619
YQ
89482012-02-11 Yao Qi <yao@codesourcery.com>
8949
8950 * server.c: (handle_monitor_command): Add a new parameter
8951 `own_buf'.
8952 (handle_query): Update caller.
8953
f8255c2a
JB
89542012-02-09 Joel Brobecker <brobecker@adacore.com>
8955
8956 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8957 * configure, config.in: Regenerate.
8958 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8959 is not defined.
8960
da84f473
PA
89612012-02-02 Pedro Alves <palves@redhat.com>
8962
8963 Try SIGKILL first, then PTRACE_KILL.
8964 * linux-low.c (linux_kill_one_lwp): New.
8965 (linux_kill_one_lwp): Rename to ...
8966 (kill_one_lwp_callback): ... this. Use the new
8967 linux_kill_one_lwp.
8968
e886a173
PA
89692012-02-02 Pedro Alves <palves@redhat.com>
8970
8971 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8972 inferior.
8973
be07f1a2
PA
89742012-01-27 Pedro Alves <palves@redhat.com>
8975
8976 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8977 (elf_64_file_p): Make static.
8978 (linux_pid_exe_is_elf_64_file): New.
8979 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8980 Delete declarations.
8981 (linux_pid_exe_is_elf_64_file): Declare.
8982 * linux-x86-low.c (x86_arch_setup): Use
8983 linux_pid_exe_is_elf_64_file.
8984
d8301ad1
JK
89852012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8986
8987 * linux-low.c (linux_wait_for_event_1): Rename to ...
8988 (linux_wait_for_event): ... here and merge it with former
8989 linux_wait_for_event - new variable wait_ptid, use it.
8990 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8991
01b17894
PA
89922012-01-23 Pedro Alves <palves@redhat.com>
8993
8994 * server.c (main): Avoid yet another case of infinite loop while
8995 detaching/killing after a longjmp.
8996
e825046f
JK
89972012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8998
8999 Code cleanup.
9000 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9001
b9e7b9c3
UW
90022012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9003
9004 * hostio.c (handle_readlink): New function.
9005 (handle_vFile): Call it to handle "vFile:readlink" packets.
9006
901f9912
UW
90072012-01-20 Pedro Alves <palves@redhat.com>
9008 Ulrich Weigand <ulrich.weigand@linaro.org>
9009
9010 * server.c (handle_v_requests): Only support vAttach and vRun to
9011 start multiple processes when in extended protocol mode.
9012
fc1ab1a0
PA
90132012-01-17 Pedro Alves <palves@redhat.com>
9014
9015 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9016 memalign plus mprotect to allocate the scratch buffer.
9017
7d5d4e98
PA
90182012-01-13 Pedro Alves <palves@redhat.com>
9019
9020 * server.c (attach_inferior): Clear `cont_thread'.
9021
f128d5e9
PA
90222012-01-13 Pedro Alves <palves@redhat.com>
9023
9024 * server.c (main): Avoid infinite loop while detaching/killing
9025 after a longjmp.
9026
06db92f0
DE
90272012-01-09 Doug Evans <dje@google.com>
9028
9029 * server.c (start_inferior): Set last_ptid in --wrapper case.
9030
32d92999
YQ
90312012-01-06 Yao Qi <yao@codesourcery.com>
9032
9033 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9034 defined.
9035 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9036
5e0a92a9
YQ
90372012-01-04 Yao Qi <yao@codesourcery.com>
9038
9039 * tracepoint.c (cmd_qtdp): Print debug message
9040 for static tracepoint.
9041
ae639e8c
YQ
90422012-01-04 Yao Qi <yao@codesourcery.com>
9043
9044 * tracepoint.c (trace_vdebug): Differentiate debug message
9045 between gdbserver and IPA.
9046
f72429c5
YQ
90472012-01-03 Yao Qi <yao@codesourcery.com>
9048
9049 * tracepoint.c (tracepoint_was_hit): Don't collect for
9050 static tracepoint.
9051
12c3e59c
JB
90522012-01-02 Joel Brobecker <brobecker@adacore.com>
9053
9054 * terminal.h: Reformat copyright header.
9055
67827812
JB
90562012-01-02 Joel Brobecker <brobecker@adacore.com>
9057
9058 * server.c (gdbserver_version): Update copyright year.
9059 * gdbreplay.c (gdbreplay_version): Likewise.
9060
3e52c33d
JK
90612011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9062
9063 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9064
9065 Revert:
9066 2011-12-18 Hui Zhu <teawater@gmail.com>
9067 * linux-low.c (linux_create_inferior): Save return value to ret.
9068
66f1260e
HZ
90692011-12-18 Hui Zhu <teawater@gmail.com>
9070
9071 * linux-low.c (linux_create_inferior): Save return value to ret.
9072
e77616d7
DE
90732011-12-16 Doug Evans <dje@google.com>
9074
e7b06c57
DE
9075 * linux-low.c (linux_create_inferior): If stdio connection,
9076 redirect stdin from /dev/null, stdout to stderr.
9077 * remote-utils.c (remote_is_stdio): New static global.
9078 (remote_connection_is_stdio): New function.
9079 (remote_prepare): Handle stdio connection.
9080 (remote_open): Ditto.
9081 (remote_close): Don't close stdin for stdio connections.
9082 (read_prim,write_prim): New functions. Replace all calls to
9083 read/write to these.
9084 * server.c (main): Watch for "-" argument. Move call to
9085 remote_prepare before start_inferior.
9086 * server.h (STDIO_CONNECTION_NAME): New macro.
9087 (remote_connection_is_stdio): Declare.
9088
e77616d7
DE
9089 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9090 in debugging output.
9091
82067193
YQ
90922011-12-15 Yao Qi <yao@codesourcery.com>
9093
9094 * tracepoint.c: Include sys/syscall.h.
9095 (gdb_ust_thread): Remove preprocessor conditional.
9096
82bfbe7e
PA
90972011-12-14 Pedro Alves <pedro@codesourcery.com>
9098
9099 * linux-low.c (linux_detach_one_lwp): Call
9100 the_low_target.prepare_to_resume before detaching.
9101
712c6575
YQ
91022011-12-14 Yao Qi <yao@codesourcery.com>
9103
9104 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9105 of write.
9106
d54d1edf
YQ
91072011-12-14 Yao Qi <yao@codesourcery.com>
9108
9109 * i386-low.c (i386_low_stopped_data_address): Initialize local
9110 variable `control'.
9111
6210a125
PA
91122011-12-13 Pedro Alves <pedro@codesourcery.com>
9113
9114 PR remote/13492
9115
9116 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9117 DR_CONTROL unless necessary. Extend comments.
9118 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9119 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9120
2ece8244
YQ
91212011-12-13 Yao Qi <yao@codesourcery.com>
9122
9123 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9124 macros.
9125 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9126
784867a5
JK
91272011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9128
9129 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9130 Print new debug message for such case.
9131
6bf36717
JK
91322011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9133
9134 Fix overlapping memcpy.
9135 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9136 the read_inferior_memory transfer.
9137 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9138 write_inferior_memory transfer.
9139 (set_fast_tracepoint_jump): New variable buf. Use it for the
9140 read_inferior_memory and write_inferior_memory transfers.
9141 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9142 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9143 Use it for the write_inferior_memory transfer.
9144 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9145 buffers.
9146
50275556
MR
91472011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9148
9149 * linux-low.c (fetch_register, store_register): Make code
9150 consistent, fix formatting.
9151
7325beb4
MR
91522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9153
9154 * linux-low.c (usr_store_inferior_registers): Factor out code
9155 to handle individual registers into...
9156 (store_register): ... this new function.
9157
c642a434
UW
91582011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9159
9160 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9161 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9162 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9163 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9164 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9165 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9166 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9167 (srv_xmlfiles): Add new XML files.
9168
9169 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9170 and <sys/uio.h>.
9171 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9172 (init_registers_s390_linux32v1): Add prototype.
9173 (init_registers_s390_linux32v2): Likewise.
9174 (init_registers_s390_linux64v1): Likewise.
9175 (init_registers_s390_linux64v2): Likewise.
9176 (init_registers_s390x_linux64v1): Likewise.
9177 (init_registers_s390x_linux64v2): Likewise.
9178 (s390_num_regs): Increment to 52.
9179 (s390_regmap): Add orig_r2 register.
9180 (s390_num_regs_3264): Increment to 68.
9181 (s390_regmap_3264): Add orig_r2 register.
9182 (s390_collect_ptrace_register): Handle orig_r2 register.
9183 (s390_supply_ptrace_register): Likewise.
9184 (s390_fill_last_break): New function.
9185 (s390_store_last_break): Likewise.
9186 (s390_fill_system_call): New function.
9187 (s390_store_system_call): Likewise.
9188 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9189 register sets.
9190 (s390_check_regset): New function.
9191 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9192 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9193 Update target_regsets for available register sets.
9194
2268b414
JK
91952011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9196 Jan Kratochvil <jan.kratochvil@redhat.com>
9197
9198 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9199 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9200 New.
9201 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9202 * linux-low.h (struct process_info_private): New member r_debug.
9203 * server.c (handle_qxfer_libraries): Call
9204 the_target->qxfer_libraries_svr4.
9205 (handle_qxfer_libraries_svr4): New function.
9206 (qxfer_packets): New entry "libraries-svr4".
9207 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9208 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9209 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9210 PACKET_qXfer_libraries_svr4.
9211
d6db1fab
UW
92122011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9213
9214 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9215 PSW address/mask between 8-byte and 16-byte formats.
9216 (s390_supply_ptrace_register): Likewise.
9217 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9218 basic addressing mode bit.
9219
242f5f1c
SS
92202011-11-24 Stan Shebs <stan@codesourcery.com>
9221
9222 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9223
f196051f
SS
92242011-11-17 Stan Shebs <stan@codesourcery.com>
9225
9226 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9227 (tracing_start_time): New global.
9228 (tracing_stop_time): New global.
9229 (tracing_user_name): New global.
9230 (tracing_notes): New global.
9231 (tracing_stop_note): New global.
9232 (cmd_qtstart): Set traceframe_usage, start_time.
9233 (stop_tracing): Set stop_time.
9234 (cmd_qtstatus): Report additional status.
9235 (cmd_qtp): New function.
9236 (handle_tracepoint_query): Call it.
9237 (cmd_qtnotes): New function.
9238 (handle_tracepoint_general_set): Call it.
9239 (get_timestamp): Rename from tsv_get_timestamp.
9240
405f8e94
SS
92412011-11-14 Stan Shebs <stan@codesourcery.com>
9242 Kwok Cheung Yeung <kcy@codesourcery.com>
9243
9244 * linux-x86-low.c (small_jump_insn): New.
9245 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9246 trampoline and error message, build a trampoline and issue a small
9247 jump instruction to it.
9248 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9249 trampoline and error message.
9250 (x86_get_min_fast_tracepoint_insn_len): New.
9251 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9252 * linux-low.h (struct linux_target_ops): Add arguments to
9253 install_fast_tracepoint_jump_pad operation, add new operation.
9254 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9255 arguments.
9256 (linux_get_min_fast_tracepoint_insn_len): New function.
9257 (linux_target_op): Add new operation.
9258 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9259 (gdb_trampoline_buffer_end): Ditto.
9260 (gdb_trampoline_buffer_error): Ditto.
9261 (struct ipa_sym_addresses): Add fields for new IPA variables.
9262 (symbol_list): Add entries for new IPA variables.
9263 (struct tracepoint): Add fields to hold the address range of the
9264 trampoline used by the tracepoint.
9265 (trampoline_buffer_head): New static variable.
9266 (trampoline_buffer_tail): Ditto.
9267 (claim_trampoline_space): New function.
9268 (have_fast_tracepoint_trampoline_buffer): New function.
9269 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9270 structure.
9271 (install_fast_tracepoint): Ditto, also add error buffer argument.
9272 (cmd_qtminftpilen): New function.
9273 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9274 (fast_tracepoint_from_trampoline_address): New function.
9275 (fast_tracepoint_collecting): Handle trampoline as part of jump
9276 pad space.
9277 (set_trampoline_buffer_space): New function.
9278 (initialize_tracepoint): Initialize new IPA variables.
9279 * target.h (struct target_ops): Add arguments to
9280 install_fast_tracepoint_jump_pad operation, add new
9281 get_min_fast_tracepoint_insn_len operation.
9282 (target_get_min_fast_tracepoint_insn_len): New.
9283 (install_fast_tracepoint_jump_pad): Add arguments.
9284 * server.h (IPA_BUFSIZ): Define.
9285 * linux-i386-ipa.c: Include extra header files.
9286 (initialize_fast_tracepoint_trampoline_buffer): New function.
9287 (initialize_low_tracepoint): Call it.
9288 * server.h (set_trampoline_buffer_space): Declare.
9289 (claim_trampoline_space): Ditto.
9290 (have_fast_tracepoint_trampoline_buffer): Ditto.
9291
1e4d1764
YQ
92922011-11-14 Yao Qi <yao@codesourcery.com>
9293
9294 * server.c (handle_query): Handle InstallInTrace for qSupported.
9295 * tracepoint.c (add_tracepoint): Sort list.
9296 (install_tracepoint, download_tracepoint): New.
9297 (cmd_qtdp): Call them to install and download tracepoints.
9298 (sort_tracepoints): Removed.
9299 (cmd_qtstart): Update.
9300
5c73ff4e
YQ
93012011-11-14 Yao Qi <yao@codesourcery.com>
9302
9303 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9304 * mem-break.h: Declare.
9305 * tracepoint.c (cmd_qtstart): Move some code to ...
9306 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9307 New.
9308 (download_tracepoints): Move some code to ...
9309 (download_tracepoint_1): ... here. New.
9310
86a30030
YQ
93112011-11-08 Yao Qi <yao@codesourcery.com>
9312
9313 * remote-utils.c (relocate_instruction): A comment fix.
9314
8d26e50c
JB
93152011-11-07 Joel Brobecker <brobecker@adacore.com>
9316
9317 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9318 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9319 dr_status_mirror and dr_control_mirror from debug_reg_state.
9320 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9321 (i386_initial_stuff): Remove use of deleted globals.
9322 (i386_get_thread_context, i386_set_thread_context,
9323 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9324 from debug_reg_state.
9325
a59306a3
YQ
93262011-11-05 Yao Qi <yao@codesourcery.com>
9327
9328 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9329 address as TPOINT's.
9330
3065dfb6
SS
93312011-11-02 Stan Shebs <stan@codesourcery.com>
9332
9333 * tracepoint.c (agent_mem_read_string): New function.
9334 (eval_agent_expr): Call it for tracenz.
9335 * server.c (handle_query): Report support for tracenz.
9336
fd0d8c7c
YQ
93372011-11-02 Yao Qi <yao@codesourcery.com>
9338
9339 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9340
609086b1
YQ
93412011-11-02 Yao Qi <yao@codesourcery.com>
9342
9343 * target.h: Fix a typo in comment.
9344
b9fd1791
PA
93452011-10-31 Pedro Alves <pedro@codesourcery.com>
9346
9347 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9348 clobber the breakpoints' shadows with fast tracepoint jumps.
9349 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9350 * target.c (write_inferior_memory): Also pass MYADDR down to
9351 check_mem_write.
9352
03583c20
UW
93532011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9354
9355 * configure.ac: Check support for personality routine.
9356 * configure: Regenerate.
9357 * config.in: Likewise.
9358 * linux-low.c: Include <sys/personality.h>.
9359 Define ADDR_NO_RANDOMIZE if necessary.
9360 (linux_create_inferior): Disable address space randomization when
9361 forking inferior, if requested.
9362 (linux_supports_disable_randomization): New function.
9363 (linux_target_ops): Install it.
9364 * server.h (disable_randomization): Declare.
9365 * server.c (disable_randomization): New global variable.
9366 (handle_general_set): Handle QDisableRandomization.
9367 (handle_query): Likewise for qSupported.
9368 (main): Support --disable-randomization and --no-disable-randomization
9369 command line arguments.
9370 * target.h (struct target_ops): Add supports_disable_randomization.
9371 (target_supports_disable_randomization): New macro.
9372
723b724b
MF
93732011-09-29 Mike Frysinger <vapier@gentoo.org>
9374
9375 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9376 ifdef check.
9377 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9378 [!PT_GETDSBT] (target_loadmap): New definition.
9379 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9380 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9381 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9382 and PT_GETDSBT to LINUX_LOADMAP.
9383 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9384 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9385
55329a5c 93862011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9387
9388 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9389 (arm_linux_hwbp_cap): New static variable.
9390 (arm_linux_get_hwbp_cap): Replace by ...
9391 (arm_linux_init_hwbp_cap): ... this new function.
9392 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9393 (arm_linux_get_hw_watchpoint_count): Likewise.
9394 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9395 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9396 (arm_prepare_to_resume): Use perror_with_name instead of error.
9397
55329a5c 93982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9399
9400 * linux-arm-low.c: Include <signal.h>.
9401 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9402 (struct arm_linux_hwbp_cap): New data type.
9403 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9404 (struct arm_linux_hw_breakpoint): New data type.
9405 (MAX_BPTS, MAX_WPTS): Define.
9406 (struct arch_process_info, struct arch_lwp_info): New data types.
9407 (arm_linux_get_hwbp_cap): New function.
9408 (arm_linux_get_hw_breakpoint_count): Likewise.
9409 (arm_linux_get_hw_watchpoint_count): Likewise.
9410 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9411 (arm_hwbp_control_initialize): Likewise.
9412 (arm_hwbp_control_is_enabled): Likewise.
9413 (arm_hwbp_control_is_initialized): Likewise.
9414 (arm_hwbp_control_disable): Likewise.
9415 (arm_linux_hw_breakpoint_equal): Likewise.
9416 (arm_linux_hw_point_initialize): Likewise.
9417 (struct update_registers_data): New data structure.
9418 (update_registers_callback: New function.
9419 (arm_insert_point): Likewise.
9420 (arm_remove_point): Likewise.
9421 (arm_stopped_by_watchpoint): Likewise.
9422 (arm_stopped_data_address): Likewise.
9423 (arm_new_process): Likewise.
9424 (arm_new_thread): Likewise.
9425 (arm_prepare_to_resume): Likewise.
9426 (the_low_target): Register arm_insert_point, arm_remove_point,
9427 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9428 arm_new_thread, and arm_prepare_to_resume.
9429
6b9801d4
SS
94302011-09-15 Stan Shebs <stan@codesourcery.com>
9431
9432 * server.h (struct emit_ops): Add compare-goto fields.
9433 * tracepoint.c (gdb_agent_op_sizes): New table.
9434 (emit_eq_goto): New function.
9435 (emit_ne_goto): New function.
9436 (emit_lt_goto): New function.
9437 (emit_le_goto): New function.
9438 (emit_gt_goto): New function.
9439 (emit_ge_goto): New function.
9440 (is_goto_target): New function.
9441 (compile_bytecodes): Recognize special cases of compare-goto
9442 combinations and call specialized emitters for them.
9443 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9444 (amd64_emit_ne_goto): New function.
9445 (amd64_emit_lt_goto): New function.
9446 (amd64_emit_le_goto): New function.
9447 (amd64_emit_gt_goto): New function.
9448 (amd64_emit_ge_goto): New function.
9449 (amd64_emit_ops): Add the new functions.
9450 (i386_emit_eq_goto): New function.
9451 (i386_emit_ne_goto): New function.
9452 (i386_emit_lt_goto): New function.
9453 (i386_emit_le_goto): New function.
9454 (i386_emit_gt_goto): New function.
9455 (i386_emit_ge_goto): New function.
9456 (i386_emit_ops): Add the new functions.
9457
bf15cbda
SS
94582011-09-08 Stan Shebs <stan@codesourcery.com>
9459
9460 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9461 (i386_emit_epilogue): Restore %ebx.
9462
943ca1dd
JZ
94632011-08-31 Jie Zhang <jzhang918@gmail.com>
9464
9465 * server.c (step_thread): Remove definition.
9466 (process_serial_event): Don't handle Hs.
9467 * server.h (step_thread): Remove declaration.
9468 * target.c (set_desired_inferior): Remove use of step_thread.
9469
e3deef73
LM
94702011-08-24 Luis Machado <lgustavo@codesourcery.com>
9471
9472 * linux-low.c: Include linux-procfs.h.
9473 (linux_attach_lwp_1): Update comments.
9474 (linux_attach): Scan for existing threads when attaching to a
9475 process that is the tgid.
9476 * Makefile.in: Update dependencies.
9477
13da1c97
LM
94782011-08-24 Luis Machado <lgustavo@codesourcery.com>
9479
9480 * configure.srv: Add linux-procfs.o dependencies.
9481
881127c9
YQ
94822011-08-14 Yao Qi <yao@codesourcery.com>
9483
9484 * target.h (struct target_ops): Fix indent.
9485 * win32-low.c (win32_target_ops): Fix comment.
9486
58dbd541
YQ
94872011-08-14 Andrew Jenner <andrew@codesourcery.com>
9488 Yao Qi <yao@codesourcery.com>
9489
9490 * Makefile.in (clean): Remove tic6x-*.c files.
9491 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9492 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9493 (tic6x-c64xp-linux.c): Likewise.
9494 * configure.srv: Add support for tic6x-*-uclinux.
9495 * linux-tic6x-low.c: New.
9496 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9497
78d85199
YQ
94982011-08-14 Andrew Stubbs <ams@codesourcery.com>
9499 Yao Qi <yao@codesourcery.com>
9500
9501 * target.h (struct target_ops): Add read_loadmap.
9502 * linux-low.c (struct target_loadseg): New type.
9503 (struct target_loadmap): New type.
9504 (linux_read_loadmap): New function.
9505 (linux_target_ops): Add linux_read_loadmap.
9506 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9507 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9508 to NULL.
78d85199 9509
a959a88d
EZ
95102011-08-05 Eli Zaretskii <eliz@gnu.org>
9511
9512 * win32-low.c: Include <stdint.h>.
9513
1ced966e
PA
95142011-07-22 Pedro Alves <pedro@codesourcery.com>
9515
9516 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9517 to the inferior here.
9518 (i386_remove_aligned_watchpoint): Ditto.
9519 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9520 fit part of the watchpoint in the debug registers.
9521 (i386_update_inferior_debug_regs): New.
9522 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9523 registers, and only update the inferior on success.
9524 (i386_low_remove_watchpoint): Ditto.
9525
d26e3629
KY
95262011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9527
9528 * linux-low.c (compare_ints, unique, list_threads, show_process,
9529 linux_core_of_thread): Delete.
9530 (linux_target_ops): Change linux_core_of_thread to
9531 linux_common_core_of_thread.
9532 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9533 * utils.c (malloc_failure): Change type of argument.
9534 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9535 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9536 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9537 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9538 (IPA_OBJS): Add common-utils-ipa.o.
9539 (ptid_h, linux_osdata_h): New macros.
9540 (server_h): Add common/common-utils.h, common/xml-utils.h,
9541 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9542 common/ptid.h.
9543 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9544 ptid.o, buffer.o): New rules.
9545 (linux-low.o): Add common/linux-osdata.h as a dependency.
9546 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9547 * configure.ac: Add AC_HEADER_DIRENT check.
9548 * config.in: Regenerate.
9549 * configure: Regenerate.
9550 * remote-utils.c (xml_escape_text): Delete.
9551 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9552 buffer_xml_printf): Move to common/buffer.c.
9553 * server.c (main): Remove call to initialize_inferiors.
9554 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9555 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9556 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9557 internal_error, gdb_assert, gdb_assert_fail): Delete.
9558 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9559 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9560 common/buffer.h.
9561 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9562 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9563 initialize_inferiors): Delete.
9564
2275a1a7
PA
95652011-07-20 Pedro Alves <pedro@codesourcery.com>
9566
9567 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9568 symbol error.
9569
0a5b1e09
PA
95702011-05-31 Pedro Alves <pedro@codesourcery.com>
9571
9572 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9573 assertion.
9574 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9575
6938fd34
YQ
95762011-05-26 Yao Qi <yao@codesourcery.com>
9577
9578 * Makefile.in (thread-db.o): Track dependence to
9579 common/gdb_thread_db.h.
9580 * thread-db.c: include gdb_thread_db.h from right place.
9581
b481f9e0
TT
95822011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9583
9584 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9585 __FILE__ and __LINE__ to internal_error.
9586
98a5dd13
DE
95872011-05-13 Doug Evans <dje@google.com>
9588
9589 * thread-db.c (try_thread_db_load_from_sdir): New function.
9590 (try_thread_db_load_from_dir): New function.
9591 (thread_db_load_search): Handle $sdir, ignore $pdir.
9592 Remove trying of system directories if search of
9593 libthread-db-search-path fails, that is now done via $sdir.
9594
d248b706
KY
95952011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9596
9597 * server.c (handle_query): Add EnableDisableTracepoints to the list
9598 of supported features.
43aaf8b6 9599 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9600 tracepoints.
43aaf8b6
PA
9601 (cmd_qtenable_disable): New.
9602 (cmd_qtstart): Install tracepoints even if disabled.
9603 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9604 receiving a QTEnable or QTDisable packet.
9605 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9606 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9607 tracepoints.
9608 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9609
84e578fb
DE
96102011-05-10 Doug Evans <dje@google.com>
9611
9612 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9613
71f55dd8
DE
96142011-05-04 Doug Evans <dje@google.com>
9615
9616 * linux-low.c (linux_join): Skip process lookup.
9617 * spu-low.c (spu_join): Ditto.
9618 * server.c (join_inferiors_callback): Delete.
9619 (process_serial_event): For 'D' packet (detach) call join_inferior
9620 directly.
9621
4d393d60
JM
96222011-05-04 Joseph Myers <joseph@codesourcery.com>
9623
9624 * README: Don't mention xscale*-*-linux*.
9625 * configure.srv (xscale*-*-linux*): Don't handle target.
9626
b00ad6ff
NF
96272011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9628
9629 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9630 casting pointers.
9631 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9632 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9633 (i386_emit_void_call_2): Likewise.
9634
af96c192
YQ
96352011-04-26 Yao Qi <yao@codesourcery.com>
9636
43aaf8b6
PA
9637 * linux-low.c: Move common macros to linux-ptrace.h.
9638 Include linux-ptrace.h.
af96c192
YQ
9639 * Makefile.in (linux_ptrace_h): New.
9640 (linux-low.o): Depends on linux-ptrace.h.
9641
03f2bd59
JK
96422011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9645 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9646 (remote_prepare): New function with most of the TCP code from ...
9647 (remote_open): ... here. Detect PORT here unconditionally. Move also
9648 setting transport_is_reliable.
9649 * server.c (run_once): New variable.
9650 (gdbserver_usage): Document it.
9651 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9652 the first run if RUN_ONCE.
9653 * server.h (run_once, remote_prepare): New declarations.
9654
7a9dd1b2
TT
96552011-04-19 Tom Tromey <tromey@redhat.com>
9656
9657 * win32-low.c (handle_load_dll): Remove duplicate "the".
9658
81239425
PM
96592011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9660
9661 Remove support for old Cygwin 1.5 versions.
9662 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9663 function to avoid warning.
9664 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9665 warning.
9666
9e0627f1
PM
96672011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9668
9669 * gdbserver/server.h (Macro _): Define it if not available.
9670
588eebee
MS
96712011-03-14 Michael Snyder <msnyder@vmware.com>
9672
348af9f7 9673 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9674
43f70d4c
JB
96752011-03-10 Joel Brobecker <brobecker@adacore.com>
9676
9677 * Makefile.in (maintainer-clean realclean distclean): Remove
9678 "make ... subdir_do" command.
9679
348af9f7
MS
96802011-03-10 Michael Snyder <msnyder@vmware.com>
9681
9682 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9683
9684 * server.c (handle_v_run): Free alloced buffer on early return.
9685
e637a4f5
YQ
96862011-03-09 Yao Qi <yao@codesourcery.com>
9687
9688 Revert:
9689 2011-03-04 Yao Qi <yao@codesourcery.com>
9690
9691 * Makefile.in: Remove GNU make feature --directory.
9692
9693 2011-03-05 Yao Qi <yao@codesourcery.com>
9694
9695 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9696 (subdir_do): New make target. Copied from gdb/Makefile.
9697 (maintainer-clean, realclean, distclean, clean): Call corresponding
9698 make targets in common/Makefile.
9699
9700 2011-02-11 Yao Qi <yao@codesourcery.com>
9701
9702 * configure.ac: Call AC_PROG_RANLIB.
9703 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9704 * configure: Regenerate.
9705
e6edda56
JK
97062011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9707
9708 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9709
e5141119
JB
97102011-03-06 Yao Qi <yao@codesourcery.com>
9711
9712 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9713
64794aa4
JB
97142011-03-05 Yao Qi <yao@codesourcery.com>
9715
9716 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9717 (subdir_do): New make target. Copied from gdb/Makefile.
9718 (maintainer-clean, realclean, distclean, clean): Call corresponding
9719 make targets in common/Makefile.
9720
7a762829
YQ
97212011-03-04 Yao Qi <yao@codesourcery.com>
9722
9723 * Makefile.in: Remove GNU make feature --directory.
9724
348af9f7
MS
97252011-03-04 Michael Snyder <msnyder@vmware.com>
9726
9727 * server.c (queue_stop_reply): Call xmalloc not malloc.
9728
97292011-03-02 Michael Snyder <msnyder@vmware.com>
9730
9731 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9732
9f72fee2
MS
97332011-02-28 Michael Snyder <msnyder@vmware.com>
9734
588eebee
MS
9735 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9736 (cmd_qtframe): Ditto.
9737 (cmd_qtbuffer): Ditto.
9738 (cmd_bigqtbuffer): Ditto.
9739
9f72fee2
MS
9740 * utils.c (decimal2str): Initialize 'width' to nine, then
9741 don't mess with it.
9742
8040bd49
UW
97432011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9744
9745 * hostio.c (require_data): Free *data, not data.
9746
7e52cbd0
JK
97472011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9748
9749 * hostio.c (require_data): Use free, not xfree.
9750
9130f83e
MS
97512011-02-27 Michael Snyder <msnyder@vmware.com>
9752
4b812f4e
MS
9753 * server.c (handle_query): Discard unused value.
9754
9130f83e
MS
9755 * hostio.c (require_data): Free malloc memory before returning
9756 error.
9757
69d37113
MS
97582011-02-26 Michael Snyder <msnyder@vmware.com>
9759
9760 * linux-low.c (list_threads): Call closedir for dirent.
9761
35f5825a
MS
97622011-02-27 Michael Snyder <msnyder@vmware.com>
9763
2a589cef
MS
9764 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9765 a case statement falls through.
9766
0adea5f7
MS
9767 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9768
35f5825a
MS
9769 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9770 in comparison.
9771
238f1c74
MS
97722011-02-26 Michael Snyder <msnyder@vmware.com>
9773
9774 * utils.c (decimal2str): Eliminate dead code and dead param.
9775 (pulongest): Drop dead param from call to decimal2str.
9776 (plongest): Ditto.
9777
633ff500
JB
97782011-02-24 Joel Brobecker <brobecker@adacore.com>
9779
9780 Revert the following patch (not approved yet):
9781 2011-02-21 Hui Zhu <teawater@gmail.com>
9782 * tracepoint.c (tp_printf): New function.
9783 (eval_agent_expr): Handle gdb_agent_op_printf.
9784
f9c6ff72
HZ
97852011-02-21 Hui Zhu <teawater@gmail.com>
9786
9787 * tracepoint.c (tp_printf): New function.
9788 (eval_agent_expr): Handle gdb_agent_op_printf.
9789
94d5e490
TT
97902011-02-18 Tom Tromey <tromey@redhat.com>
9791
9792 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9793 (tracepoint.o): Likewise.
9794 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9795 (gdb_agent_op_names): Likewise.
9796
c7f96d2b
TT
97972011-02-18 Tom Tromey <tromey@redhat.com>
9798
9799 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9800 gdb_agent_op_rot>: New constants.
9801 (gdb_agent_op_names): Add pick and roll.
9802 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9803 cases.
9804
0feedb2c
JK
98052011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9806
9807 * aclocal.m4: Regenerated with aclocal-1.11.1.
9808
b3b9301e
PA
98092011-02-14 Pedro Alves <pedro@codesourcery.com>
9810
9811 * server.c (handle_qxfer_traceframe_info): New.
9812 (qxfer_packets): Register "traceframe-info".
9813 (handle_query): Report support for qXfer:traceframe-info:read+.
9814 * tracepoint.c (match_blocktype): New.
9815 (traceframe_find_block_type): Rename to ...
9816 (traceframe_walk_blocks): ... this. Add callback filter argument,
9817 and use it.
9818 (traceframe_find_block_type): New, reimplemented on top of
9819 traceframe_walk_blocks.
9820 (build_traceframe_info_xml): New.
9821 (traceframe_read_info): New.
9822 * server.h (traceframe_read_info): Declare.
9823
4f3e6fb7
YQ
98242011-02-11 Yao Qi <yao@codesourcery.com>
9825
9826 * configure.ac: Call AC_PROG_RANLIB.
9827 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9828 * configure: Regenerate.
9829
764880b7
PA
98302011-02-07 Pedro Alves <pedro@codesourcery.com>
9831
9832 * server.c (gdb_read_memory): Change return semantics to allow
9833 partial transfers.
9834 (handle_search_memory_1): Adjust.
9835 (process_serial_event) <'m' packet>: Handle partial transfers.
9836 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9837
1c79eb8a
PA
98382011-01-28 Pedro Alves <pedro@codesourcery.com>
9839
9840 * regcache.c (init_register_cache): Initialize
9841 regcache->register_status.
9842 (free_register_cache): Release regcache->register_status.
9843 (regcache_cpy): Copy register_status.
9844 (registers_to_string): Print 'x's for unavailable registers.
9845 (supply_register): Mark the register's status valid or
9846 unavailable, depending on whether a buffer was passed in or not.
9847 (supply_register_zeroed): New.
9848 (supply_regblock): Mark the registers' status valid or
9849 unavailable, depending on whether a buffer was passed in or not.
9850 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9851 (struct regcache): New `register_status' field.
9852 (supply_register_zeroed): Declare.
9853 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9854 supply_register_zeroed, rather than passing a NULL buffer to
9855 supply_register.
9856 * tracepoint.c (fetch_traceframe_registers): Update comment.
9857
85724a0e
PA
98582011-01-28 Pedro Alves <pedro@codesourcery.com>
9859
9860 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9861 buffer explicit.
9862
d08aafef
PA
98632011-01-25 Pedro Alves <pedro@codesourcery.com>
9864
9865 * server.h (decode_xfer_write): Change prototype.
9866 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9867 and don't extract the annex here.
9868 * server.c (decode_xfer_read): Remove `annex' parameter,
9869 and don't extract the annex here.
9870 (decode_xfer): New.
9871 (struct qxfer): New.
9872 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9873 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9874 (handle_qxfer_statictrace): New functions, abstracted out from
9875 handle_query, and made to use the struct qxfer interface.
9876 (handle_threads_qxfer_proper): Rename to ...
9877 (handle_qxfer_threads_proper): ... this.
9878 (handle_threads_qxfer): Rename to ...
9879 (handle_qxfer_threads): ... this. Adjust.
9880 (qxfer_packets): New array.
9881 (handle_qxfer): New function.
9882 (handle_query): Use handle_qxfer.
9883
493e2a69
MS
98842011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9885
9886 * gdbreplay.c: Shorten lines of >= 80 columns.
9887 * linux-low.c: Ditto.
9888 * linux-ppc-low.c: Ditto.
9889 * linux-s390-low.c: Ditto.
9890 * linux-sparc-low.c: Ditto.
9891 * linux-x86-low.c: Ditto.
9892 * linux-xtensa-low.c: Ditto.
9893 * mem-break.c: Ditto.
9894 * nto-low.c: Ditto.
9895 * regcache.h: Ditto.
9896 * remote-utils.c: Ditto.
9897 * server.c: Ditto.
9898 * server.h: Ditto.
9899 * thread-db.c: Ditto.
9900 * tracepoint.c: Ditto.
9901 * utils.c: Ditto.
9902 * win32-low.h: Ditto.
9903
44944448
JB
99042011-01-05 Joel Brobecker <brobecker@adacore.com>
9905
9906 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9907 update.
9908
71ce852c
JB
99092011-01-01 Joel Brobecker <brobecker@adacore.com>
9910
9911 * server.c (gdbserver_version): Update copyright year in version
9912 output.
9913 * gdbreplay.c (gdbreplay_version): Ditto.
9914
eb826dc6
MF
99152010-12-29 Jie Zhang <jie.zhang@analog.com>
9916
9917 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9918 * linux-bfin-low.c: New file.
9919 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9920 PT_DATA_ADDR for BFIN targets.
9921 * Makefile.in (SFILES): Add linux-bfin-low.c.
9922 (clean): Remove reg-bfin.c.
9923 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9924 * README: Mention supported Blackfin targets.
9925
39ab222a
MF
99262010-12-23 Mike Frysinger <vapier@gentoo.org>
9927
9928 * .gitignore: New file.
9929
a1f2ce7d
MF
99302010-11-16 Mike Frysinger <vapier@gentoo.org>
9931
9932 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9933
f474844c
JZ
99342010-10-22 Jie Zhang <jie@codesourcery.com>
9935
9936 * Makefile.in: Add FLAGS_TO_PASS variable.
9937 (install): Remove dependency of install-only and recursively
9938 invoke make for install-only.
9939
f1048712
DE
99402010-10-04 Doug Evans <dje@google.com>
9941
9942 * Makefile.in (uninstall): Use $(DESTDIR).
9943
b53a1623
PA
99442010-09-24 Pedro Alves <pedro@codesourcery.com>
9945
e6ee044d
PA
9946 PR gdb/11842
9947
b53a1623
PA
9948 * linux-x86-low.c (compat_siginfo_from_siginfo)
9949 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9950 si_code is < 0. Check for si_code == SI_TIMER before checking for
9951 si_code < 0.
9952
fa1bd1e4
JB
99532010-09-13 Joel Brobecker <brobecker@adacore.com>
9954
9955 * lynx-i386-low.c: New file.
9956 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9957
47fac8f8
JB
99582010-09-13 Joel Brobecker <brobecker@adacore.com>
9959
9960 * lynx-low.c (ptrace_request_to_str): Remove handling for
9961 request values that have been removed in LynxOS 5.x.
9962
1adfc54d
JB
99632010-09-13 Joel Brobecker <brobecker@adacore.com>
9964
9965 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9966 <ptrace.h>
9967
c2a66c29
NS
99682010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9969
9970 * configure.ac: Add --enable-inprocess-agent option.
9971 * configure: Rebuilt.
9972
32fcada3
YQ
99732010-09-06 Yao Qi <yao@codesourcery.com>
9974
9975 * linux-low.c (linux_kill): Remove unused variable.
9976 (linux_stabilize_threads): Likewise.
9977 * server.c (start_inferior): Likewise.
9978 (queue_stop_reply_callback): Likewise.
9979 * tracepoint.c (do_action_at_tracepoint): Likewise.
9980
0cccb683
YQ
99812010-09-06 Yao Qi <yao@codesourcery.com>
9982
9983 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9984 on return.
9985
423ec54c
JK
99862010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9987
9988 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9989
12ac6819
PA
99902010-09-06 Pedro Alves <pedro@codesourcery.com>
9991
9992 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9993 "$(IPA_DEPFILES)".
9994
8ed54b31
JB
99952010-09-01 Joel Brobecker <brobecker@adacore.com>
9996
9997 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9998 gdbserver/lynx-ppc-low.c: New files.
9999 * Makefile.in (lynx_low_h): New variable.
10000 (lynx-low.o, lynx-ppc-low.o): New rules.
10001 * configure.ac: On LynxOS, link with -lnetinet.
10002 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10003 * configure: regenerate.
10004
bb0116a4
JB
100052010-09-01 Joel Brobecker <brobecker@adacore.com>
10006
10007 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10008 * configure.ac: Add check for vasprintf and vsnprintf.
10009 * configure, config.in: Regenerate.
10010 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10011
a778ab81 100122010-09-01 Joel Brobecker <brobecker@adacore.com>
10013
10014 * gdbreplay.c: Move include of alloca.h up, next to include of
10015 malloc.h.
10016 * server.h: Add include of malloc.h.
10017 * mem-break.c: Remove include of malloc.h.
10018 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10019
8b034a19 100202010-09-01 Joel Brobecker <brobecker@adacore.com>
10021
10022 * Makefile.in (memmem.o): Build with -Wno-error.
10023
100242010-09-01 Joel Brobecker <brobecker@adacore.com>
10025
10026 * utils.c (xsnprintf): Make non-static.
10027 * server.h: Add xsnprintf declaration.
10028 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10029 replace calls to snprintf by calls to xsnprintf throughout.
10030
100312010-09-01 Joel Brobecker <brobecker@adacore.com>
10032
10033 * configure.ac: Add configure check for alloca.
10034 * configure, config.in: Regenerate.
10035 * server.h: Include alloca.h if it exists.
10036 * gdbreplay.c: Include alloca.h if it exists.
10037
1a981360
PA
100382010-08-28 Pedro Alves <pedro@codesourcery.com>
10039
10040 * linux-low.c (__SIGRTMIN): Define if not already defined.
10041 (linux_create_inferior): Check for __ANDROID__ rather than
10042 __SIGRTMIN.
10043 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10044 are already deferred.
10045 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10046 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10047 stopped and already has a pending signal to report.
10048 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10049 a pending signal to report or is moving out of a jump pad.
10050 (linux_init_signals): Check for __ANDROID__ rather than
10051 __SIGRTMIN.
10052
b4d51a55
PA
100532010-08-28 Pedro Alves <pedro@codesourcery.com>
10054
10055 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10056 debug_threads check. Avoid a linear search when not doing debug
10057 output.
10058
ec48365d
PA
100592010-08-27 Pedro Alves <pedro@codesourcery.com>
10060
10061 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10062 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10063 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10064 (process_event): Change local fd's type to gdb_fildes_t.
10065 (create_file_handler): Adjust prototype.
10066 (delete_file_handler): Adjust prototype.
10067 (handle_file_event): Adjust prototype. Use pfildes.
10068 (create_file_event): Adjsut prototype.
10069 * remote-utils.c (remote_desc, listen_desc): Change type to
10070 gdb_fildes_t.
10071 * server.h: New gdb_fildes_t typedef.
10072 [USE_WIN32API]: Include winsock2.h.
10073 (delete_file_handler, add_file_handler): Adjust prototypes.
10074 (pfildes): Declare.
10075 * utils.c (pfildes): New.
10076
854d88f0
PA
100772010-08-27 Pedro Alves <pedro@codesourcery.com>
10078
10079 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10080 * configure: Regenerate.
10081
0146f85b
PA
100822010-08-27 Pedro Alves <pedro@codesourcery.com>
10083
10084 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10085 (linux_done_accessing_memory): ... this.
10086 (linux_target_ops): Adjust.
10087 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10088 * nto-low.c (nto_target_ops): Adjust comment.
10089 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10090 * spu-low.c (spu_target_ops): Adjust comment.
10091 * target.h (target_ops): Rename unprepare_to_access_memory field
10092 to done_accessing_memory.
10093 (unprepare_to_access_memory): Rename to ...
10094 (done_accessing_memory): ... this.
10095
90d74c30
PA
100962010-08-26 Pedro Alves <pedro@codesourcery.com>
10097
10098 * linux-low.c (linux_prepare_to_access_memory): New.
10099 (linux_unprepare_to_access_memory): New.
10100 (linux_target_ops): Install them.
10101 * server.c (read_memory): Rename to ...
10102 (gdb_read_memory): ... this. Use
10103 prepare_to_access_memory/prepare_to_access_memory.
10104 (write_memory): Rename to ...
10105 (gdb_write_memory): ... this. Use
10106 prepare_to_access_memory/prepare_to_access_memory.
10107 (handle_search_memory_1): Adjust.
10108 (process_serial_event): Adjust.
10109 * target.h (struct target_ops): New fields
10110 prepare_to_access_memory and unprepare_to_access_memory.
10111 (prepare_to_access_memory, unprepare_to_access_memory): New.
10112 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10113 prepare_to_access_memory/prepare_to_access_memory.
10114 * nto-low.c (nto_target_ops): Adjust.
10115 * spu-low.c (spu_target_ops): Adjust.
10116 * win32-low.c (win32_target_ops): Adjust.
10117
fd467969
PA
101182010-08-26 Pedro Alves <pedro@codesourcery.com>
10119
10120 * Makefile.in (WARN_CFLAGS): Get it from configure.
10121 (WERROR_CFLAGS): New.
10122 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10123 * configure.ac: Introduce --enable-werror, which adds -Werror to
10124 the compiler command line. Enabled by default. Disable with
10125 --disable-werror. Add -Wdeclaration-after-statement
10126 Wpointer-arith and -Wformat-nonliteral to warning flags.
10127 * configure: Regenerate.
10128
331e2f5f
PA
101292010-08-26 Pedro Alves <pedro@codesourcery.com>
10130
10131 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10132
e581f2b4
PA
101332010-08-26 Pedro Alves <pedro@codesourcery.com>
10134
10135 * gdbreplay.c (remote_error): New.
10136 (gdbchar): New.
10137 (expect): Use gdbchar. Check for error reading from GDB.
10138 Clarify sync error output.
10139 (play): Check for errors writing to GDB.
10140 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10141 * remote-utils.c (getpkt): Check for errors writing to the remote
10142 descriptor.
10143
3c11dd79
PA
101442010-08-25 Pedro Alves <pedro@codesourcery.com>
10145
10146 * linux-low.c (linux_wait_1): Move non-debugging code out of
10147 `debug_threads' control.
10148
d20a8ad9
PA
101492010-08-25 Pedro Alves <pedro@codesourcery.com>
10150
10151 * linux-low.c (linux_wait_1): Don't set last_status here.
10152 * server.c (push_event, queue_stop_reply_callback): Assert we're
10153 not pushing a TARGET_WAITKIND_IGNORE event.
10154 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10155 (myresume, handle_target_event): Set the thread's last_resume_kind
10156 and last_status from the target returned status.
10157
964e4306
PA
101582010-08-25 Pedro Alves <pedro@codesourcery.com>
10159
10160 PR threads/10729
10161
10162 * linux-x86-low.c (update_debug_registers_callback): New.
10163 (i386_dr_low_set_addr): Use it.
10164 (i386_dr_low_get_addr): New.
10165 (i386_dr_low_set_control): Use update_debug_registers_callback.
10166 (i386_dr_low_get_control): New.
10167 (i386_dr_low_get_status): Adjust.
10168 * linux-low.c (linux_stop_lwp): New.
10169 * linux-low.h (linux_stop_lwp): Declare.
10170
10171 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10172 argument instead of a i386_debug_reg_state.
10173 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10174 a i386_debug_reg_state.
10175 (i386_insert_aligned_watchpoint): Adjust.
10176 (i386_remove_aligned_watchpoint): Adjust.
10177 (i386_low_stopped_data_address): Read the debug registers from the
10178 inferior instead of from the mirrors.
10179 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10180 (i386_dr_low_get_addr): Declare.
10181 (i386_dr_low_get_control): Declare.
10182 (i386_dr_low_get_status): Change prototype.
10183
10184 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10185 (i386_dr_low_get_addr): New.
10186 (i386_dr_low_get_control): New.
10187 (i386_dr_low_get_status): Adjust prototype. Return
10188 dr_status_mirror.
10189 (i386_initial_stuff): Clear dr_status_mirror and
10190 dr_control_mirror.
10191 (i386_get_thread_context): Adjust.
10192 (i386_set_thread_context): Adjust.
10193 (i386_thread_added): Adjust.
10194
5f21a75b
PA
101952010-08-24 Pedro Alves <pedro@codesourcery.com>
10196
10197 * linux-low.h (linux_thread_area): Delete declaration.
10198
3e4c1235
TS
101992010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10200
10201 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10202 after its termination.
10203
1971b033
PA
102042010-08-09 Pedro Alves <pedro@codesourcery.com>
10205
10206 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10207 (gdb_wants_all_stopped): Delete.
10208 (linux_wait_1): Don't call them.
10209 * server.c (handle_v_cont): Tag all threads as want-stopped.
10210 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10211 stopped as "client-wants-stopped".
10212
310444ac
PA
102132010-07-31 Pedro Alves <pedro@codesourcery.com>
10214
10215 * Makefile.in (signals_h): New.
10216 (server_h): Depend on it.
10217 (server.o): Don't depend on $(signals_def).
10218 (signals.o): Depend on $(signals_def).
10219
a19cae16
JK
102202010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10221
10222 * Makefile.in (signals_def): New.
10223 (server_h): Append include/gdb/signals.h and signals_def.
10224 (server.o): Append signals_def.
10225
30d50328
JK
102262010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10227
10228 * server.c (handle_target_event): Use target_signal_to_host for
10229 resume_info.sig initialization.
10230 * target.h (struct thread_resume) <sig>: New comment.
10231
5c3216e2
OS
102322010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10233
c6f46ca0
OS
10234 * server.c (handle_query): strcpy() the returned string from paddress()
10235 instead of sprintf().
5c3216e2
OS
10236 * utils.c (paddress): Return phex_nz().
10237
6bd31874
JB
102382010-07-07 Joel Brobecker <brobecker@adacore.com>
10239
10240 * server.c (handle_v_cont): Call mourn_inferior if process
10241 just exited.
10242 (myresume): Likewise.
10243
0fb4aa4b
PA
102442010-07-01 Pedro Alves <pedro@codesourcery.com>
10245
10246 Static tracepoints, and integration with UST.
10247
10248 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10249 * mem-break.c (uninsert_all_breakpoints)
10250 (reinsert_all_breakpoints): New.
10251 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10252 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10253 (gdb_agent_ust_loaded, helper_thread_id)
10254 (gdb_agent_helper_thread_id): New macros.
10255 (struct ipa_sym_addresses): Add addr_ust_loaded,
10256 addr_helper_thread_id, addr_cmd_buf.
10257 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10258 (in_process_agent_loaded_ust): New.
10259 (write_e_ust_not_loaded): New.
10260 (maybe_write_ipa_ust_not_loaded): New.
10261 (struct collect_static_trace_data_action): New.
10262 (enum tracepoint_type) <static_tracepoint>: New.
10263 (struct tracepoint) <handle>: Mention static tracepoints.
10264 (struct static_tracepoint_ctx): New.
10265 (CMD_BUF_SIZE): New.
10266 (add_tracepoint_action): Handle static tracepoint actions.
10267 (unprobe_marker_at): New.
10268 (clear_installed_tracepoints): Handle static tracepoints.
10269 (cmd_qtdp): Handle static tracepoints.
10270 (probe_marker_at): New.
10271 (cmd_qtstart): Handle static tracepoints.
10272 (response_tracepoint): Handle static tracepoints.
10273 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10274 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10275 (get_context_regcache): Handle static tracepoints.
10276 (do_action_at_tracepoint): Handle static tracepoint actions.
10277 (traceframe_find_block_type): Handle static trace data blocks.
10278 (traceframe_read_sdata): New.
10279 (download_tracepoints): Download static tracepoint actions.
10280 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10281 (GDB_PROBE_NAME): New.
10282 (ust_ops): New.
10283 (GET_UST_SYM): New.
10284 (USTF): New.
10285 (dlsym_ust): New.
10286 (ust_marker_to_static_tracepoint): New.
10287 (gdb_probe): New.
10288 (collect_ust_data_at_tracepoint): New.
10289 (gdb_ust_probe): New.
10290 (UNIX_PATH_MAX, SOCK_DIR): New.
10291 (gdb_ust_connect_sync_socket): New.
10292 (resume_thread, stop_thread): New.
10293 (run_inferior_command): New.
10294 (init_named_socket): New.
10295 (gdb_ust_socket_init): New.
10296 (cstr_to_hexstr): New.
10297 (next_st): New.
10298 (first_marker, next_marker): New.
10299 (response_ust_marker): New.
10300 (cmd_qtfstm, cmd_qtsstm): New.
10301 (unprobe_marker_at, probe_marker_at): New.
10302 (cmd_qtstmat, gdb_ust_thread): New.
10303 (gdb_ust_init): New.
10304 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10305 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10306 (ST_REGENTRY): New.
10307 (x86_64_st_collect_regmap): New.
10308 (X86_64_NUM_ST_COLLECT_GREGS): New.
10309 (AMD64_RIP_REGNUM): New.
10310 (supply_static_tracepoint_registers): New.
10311 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10312 (ST_REGENTRY): New.
10313 (i386_st_collect_regmap): New.
10314 (i386_NUM_ST_COLLECT_GREGS): New.
10315 (supply_static_tracepoint_registers): New.
10316 * server.c (handle_query): Handle qXfer:statictrace:read.
10317 <qSupported>: Report support for StaticTracepoints, and
10318 qXfer:statictrace:read features.
10319 * server.h (traceframe_read_sdata)
10320 (supply_static_tracepoint_registers): Declare.
10321 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10322 (unpack_varlen_hex): Include in IPA build.
10323 * Makefile.in (ustlibs, ustinc): New.
10324 (IPA_OBJS): Add remote-utils-ipa.o.
10325 ($(IPA_LIB)): Link -ldl and -lpthread.
10326 (UST_CFLAGS): New.
10327 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10328 * config.in, configure: Regenerate.
10329
9e4344e5
PA
103302010-06-20 Ian Lance Taylor <iant@google.com>
10331 Pedro Alves <pedro@codesourcery.com>
10332
10333 * linux-x86-low.c (always_true): Delete.
10334 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10335 trying to fool the compiler with always_true.
10336
c6beb2cb
PA
103372010-06-20 Pedro Alves <pedro@codesourcery.com>
10338
10339 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10340 conditions in gdbserver.
10341
d2ed6730
UW
103422010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10343
10344 * spu-low.c (spu_read_memory): Wrap around local store limit.
10345 (spu_write_memory): Likewise.
10346
4e29fb54
PA
103472010-06-15 Pedro Alves <pedro@codesourcery.com>
10348
10349 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10350 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10351 LONGEST uses.
10352 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10353 uses.
10354 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10355 uses with LONGEST uses.
10356
6a271cae
PA
103572010-06-14 Stan Shebs <stan@codesourcery.com>
10358 Pedro Alves <pedro@codesourcery.com>
10359
10360 Bytecode compiler.
10361
10362 * linux-x86-low.c: Include limits.h.
10363 (add_insns): New.
10364 (always_true): New.
10365 (EMIT_ASM): New.
10366 (EMIT_ASM32): New.
10367 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10368 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10369 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10370 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10371 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10372 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10373 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10374 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10375 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10376 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10377 (amd64_emit_void_call_2): New.
10378 (amd64_emit_ops): New.
10379 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10380 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10381 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10382 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10383 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10384 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10385 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10386 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10387 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10388 (i386_emit_stack_adjust, i386_emit_int_call_1)
10389 (i386_emit_void_call_2): New.
10390 (i386_emit_ops): New.
10391 (x86_emit_ops): New.
10392 (the_low_target): Install x86_emit_ops.
10393 * server.h (struct emit_ops): New.
10394 (get_raw_reg_func_addr): Declare.
10395 (current_insn_ptr, emit_error): Declare.
10396 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10397 (set_trace_state_variable_value): New defines.
10398 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10399 addr_get_trace_state_variable_value and
10400 addr_set_trace_state_variable_value.
10401 (symbol_list): New fields for get_raw_reg,
10402 get_trace_state_variable_value and set_trace_state_variable_value.
10403 (condfn): New typedef.
10404 (struct tracepoint): New field `compiled_cond'.
10405 (do_action_at_tracepoint): Clear compiled_cond.
10406 (get_trace_state_variable_value, set_trace_state_variable_value):
10407 Export in the IPA.
10408 (condition_true_at_tracepoint): If there's a compiled condition,
10409 run that.
10410 (current_insn_ptr, emit_error): New globals.
10411 (struct bytecode_address): New.
10412 (get_raw_reg_func_addr): New.
10413 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10414 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10415 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10416 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10417 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10418 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10419 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10420 (compile_tracepoint_condition, compile_bytecodes): New.
10421 * target.h (emit_ops): Forward declare.
10422 (struct target_ops): New field emit_ops.
10423 (target_emit_ops): New.
10424 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10425 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10426 * linux-low.c (linux_emit_ops): New.
10427 (linux_target_ops): Install it.
10428 * linux-low.h (struct linux_target_ops): New field emit_ops.
10429
92b72907
UW
104302010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10431
10432 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10433 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10434
fa593d66
PA
104352010-06-01 Pedro Alves <pedro@codesourcery.com>
10436 Stan Shebs <stan@codesourcery.com>
10437
10438 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10439 (all): Depend on $(extra_libraries).
10440 (install-only): Install the IPA.
10441 (IPA_OBJS, IPA_LIB): New.
10442 (clean): Remove the IPA lib.
10443 (IPAGENT_CFLAGS): New.
10444 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10445 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10446 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10447 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10448 * configure.ac: Check for atomic builtins support in the compiler.
10449 (IPA_DEPFILES, extra_libraries): Define.
10450 * configure.srv (ipa_obj): Add description.
10451 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10452 (i[34567]86-*-linux*): Set ipa_obj.
10453 (x86_64-*-linux*): Set ipa_obj.
10454 * linux-low.c (stabilizing_threads): New.
10455 (supports_fast_tracepoints): New.
10456 (linux_detach): Stabilize threads before detaching.
10457 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10458 the lwp is either not stabilizing, or is moving out of a jump pad.
10459 (linux_fast_tracepoint_collecting): New.
10460 (maybe_move_out_of_jump_pad): New.
10461 (enqueue_one_deferred_signal): New.
10462 (dequeue_one_deferred_signal): New.
10463 (linux_wait_for_event_1): If moving out of a jump pad, defer
10464 pending signals to later.
10465 (linux_stabilize_threads): New.
10466 (linux_wait_1): Check if threads need moving out of jump pads, and
10467 do it if so.
10468 (stuck_in_jump_pad_callback): New.
10469 (move_out_of_jump_pad_callback): New.
10470 (lwp_running): New.
10471 (linux_resume_one_lwp): Handle moving out of jump pads.
10472 (linux_set_resume_request): Dequeue deferred signals.
10473 (need_step_over_p): Also step over fast tracepoint jumps.
10474 (start_step_over): Also uninsert fast tracepoint jumps.
10475 (finish_step_over): Also reinsert fast tracepoint jumps.
10476 (linux_install_fast_tracepoint_jump): New.
10477 (linux_target_ops): Install linux_stabilize_threads and
10478 linux_install_fast_tracepoint_jump_pad.
10479 * linux-low.h (linux_target_ops) <get_thread_area,
10480 install_fast_tracepoint_jump_pad>: New fields.
10481 (struct lwp_info) <collecting_fast_tracepoint,
10482 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10483 (linux_get_thread_area): Declare.
10484 * linux-x86-low.c (jump_insn): New.
10485 (x86_get_thread_area): New.
10486 (append_insns): New.
10487 (push_opcode): New.
10488 (amd64_install_fast_tracepoint_jump_pad): New.
10489 (i386_install_fast_tracepoint_jump_pad): New.
10490 (x86_install_fast_tracepoint_jump_pad): New.
10491 (the_low_target): Install x86_get_thread_area and
10492 x86_install_fast_tracepoint_jump_pad.
10493 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10494 (struct fast_tracepoint_jump): New.
10495 (fast_tracepoint_jump_insn): New.
10496 (fast_tracepoint_jump_shadow): New.
10497 (find_fast_tracepoint_jump_at): New.
10498 (fast_tracepoint_jump_here): New.
10499 (delete_fast_tracepoint_jump): New.
10500 (set_fast_tracepoint_jump): New.
10501 (uninsert_fast_tracepoint_jumps_at): New.
10502 (reinsert_fast_tracepoint_jumps_at): New.
10503 (set_breakpoint_at): Use write_inferior_memory.
10504 (uninsert_raw_breakpoint): Use write_inferior_memory.
10505 (check_mem_read): Mask out fast tracepoint jumps.
10506 (check_mem_write): Mask out fast tracepoint jumps.
10507 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10508 (set_fast_tracepoint_jump): Declare.
10509 (delete_fast_tracepoint_jump)
10510 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10511 (reinsert_fast_tracepoint_jumps_at): Declare.
10512 * regcache.c: Don't compile many functions when building the
10513 in-process agent library.
10514 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10515 the register buffer in the heap.
10516 (free_register_cache): If the register buffer isn't owned by the
10517 regcache, don't free it.
10518 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10519 pre-existing register caches.
10520 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10521 type.
10522 (convert_ascii_to_int): : Constify `from' parameter type.
10523 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10524 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10525 the needed buffer in-place.
10526 (relocate_instruction): New.
10527 * server.c (handle_query) <qSymbols>: If the target supports
10528 tracepoints, give it a chance of looking up symbols. Report
10529 support for fast tracepoints.
10530 (handle_status): Stabilize threads.
10531 (process_serial_event): Adjust.
10532 * server.h (struct fast_tracepoint_jump): Forward declare.
10533 (struct process_info) <fast_tracepoint_jumps>: New field.
10534 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10535 (decode_X_packet, decode_M_packet): Adjust.
10536 (relocate_instruction): Declare.
10537 (in_process_agent_loaded): Declare.
10538 (tracepoint_look_up_symbols): Declare.
10539 (struct fast_tpoint_collect_status): Declare.
10540 (fast_tracepoint_collecting): Declare.
10541 (force_unlock_trace_buffer): Declare.
10542 (handle_tracepoint_bkpts): Declare.
10543 (initialize_low_tracepoint)
10544 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10545 * target.h (struct target_ops) <stabilize_threads,
10546 install_fast_tracepoint_jump_pad>: New fields.
10547 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10548 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10549 [HAVE_STDINT_H]: Include stdint.h.
10550 (trace_debug_1): Rename to ...
10551 (trace_vdebug): ... this.
10552 (trace_debug): Rename to ...
10553 (trace_debug_1): ... this. Add `level' parameter.
10554 (trace_debug): New.
10555 (ATTR_USED, ATTR_NOINLINE): New.
10556 (IP_AGENT_EXPORT): New.
10557 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10558 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10559 (about_to_request_buffer_space, trace_buffer_is_full)
10560 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10561 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10562 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10563 (traceframe_write_count, traceframes_created)
10564 (trace_state_variables)
10565 New renaming defines.
10566 (struct ipa_sym_addresses): New.
10567 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10568 (symbol_list): New.
10569 (ipa_sym_addrs): New.
10570 (all_tracepoint_symbols_looked_up): New.
10571 (in_process_agent_loaded): New.
10572 (write_e_ipa_not_loaded): New.
10573 (maybe_write_ipa_not_loaded): New.
10574 (tracepoint_look_up_symbols): New.
10575 (debug_threads) [IN_PROCESS_AGENT]: New.
10576 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10577 (UNKNOWN_SIDE_EFFECTS): New.
10578 (stop_tracing): New.
10579 (flush_trace_buffer): New.
10580 (stop_tracing_bkpt): New.
10581 (flush_trace_buffer_bkpt): New.
10582 (read_inferior_integer): New.
10583 (read_inferior_uinteger): New.
10584 (read_inferior_data_pointer): New.
10585 (write_inferior_data_pointer): New.
10586 (write_inferior_integer): New.
10587 (write_inferior_uinteger): New.
10588 (struct collect_static_trace_data_action): Delete.
10589 (enum tracepoint_type): New.
10590 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10591 <actions_str, step_actions, step_actions_str>: Only include in
10592 GDBserver.
fa593d66
PA
10593 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10594 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10595 (tracepoints): Use IP_AGENT_EXPORT.
10596 (last_tracepoint): Don't include in the IPA.
10597 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10598 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10599 (alloced_trace_state_variables): New.
10600 (trace_state_variables): Use IP_AGENT_EXPORT.
10601 (traceframe_t): Delete unused variable.
10602 (circular_trace_buffer): Don't include in the IPA.
10603 (trace_buffer_start): Delete.
10604 (struct trace_buffer_control): New.
10605 (trace_buffer_free): Delete.
10606 (struct ipa_trace_buffer_control): New.
10607 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10608 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10609 New.
10610 (trace_buffer_ctrl): New.
10611 (TRACE_BUFFER_CTRL_CURR): New.
10612 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10613 Reimplement as macros.
10614 (trace_buffer_wrap): Delete.
10615 (traceframe_write_count, traceframe_read_count)
10616 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10617 (struct tracepoint_hit_ctx) <type>: New field.
10618 (struct fast_tracepoint_ctx): New.
10619 (memory_barrier): New.
10620 (cmpxchg): New.
10621 (record_tracepoint_error): Update atomically in the IPA.
10622 (clear_inferior_trace_buffer): New.
10623 (about_to_request_buffer_space): New.
10624 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10625 updating the same buffer.
10626 (add_tracepoint): Default the tracepoint's type to trap
10627 tracepoint, and orig_size to -1.
10628 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10629 internal variables.
10630 (create_trace_state_variable): New parameter `gdb'. Handle it.
10631 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10632 (cmd_qtdp): Handle fast tracepoints.
10633 (cmd_qtdv): Adjust.
10634 (max_jump_pad_size): New.
10635 (gdb_jump_pad_head): New.
10636 (get_jump_space_head): New.
10637 (claim_jump_space): New.
10638 (sort_tracepoints): New.
10639 (MAX_JUMP_SIZE): New.
10640 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10641 IPA.
10642 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10643 support. Upload fast traceframes, and delete internal IPA
10644 breakpoints.
10645 (stop_tracing_handler): New.
10646 (flush_trace_buffer_handler): New.
10647 (cmd_qtstop): Upload fast tracepoints.
10648 (response_tracepoint): Handle fast tracepoints.
10649 (tracepoint_finished_step): Upload fast traceframes. Set the
10650 tracepoint hit context's tracepoint type.
10651 (handle_tracepoint_bkpts): New.
10652 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10653 type. Add comment about fast tracepoints.
10654 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10655 non-existing action_str field.
10656 (get_context_regcache): Handle fast tracepoints.
10657 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10658 to the regcache.
10659 (fast_tracepoint_from_jump_pad_address): New.
10660 (fast_tracepoint_from_ipa_tpoint_address): New.
10661 (collecting_t): New.
10662 (force_unlock_trace_buffer): New.
10663 (fast_tracepoint_collecting): New.
10664 (collecting): New.
10665 (gdb_collect): New.
10666 (write_inferior_data_ptr): New.
10667 (target_tp_heap): New.
10668 (target_malloc): New.
10669 (download_agent_expr): New.
10670 (UALIGN): New.
10671 (download_tracepoints): New.
10672 (download_trace_state_variables): New.
10673 (upload_fast_traceframes): New.
10674 (IPA_FIRST_TRACEFRAME): New.
10675 (IPA_NEXT_TRACEFRAME_1): New.
10676 (IPA_NEXT_TRACEFRAME): New.
10677 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10678 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10679 (gdb_jump_pad_buffer_end): New.
10680 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10681 (initialize_tracepoint): Adjust.
10682 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10683 buffer. Initialize the low module.
10684 * utils.c (PREFIX, TOOLNAME): New.
10685 (malloc_failure): Use PREFIX.
10686 (error): In the IPA, an error causes an exit.
10687 (fatal, warning): Use PREFIX.
10688 (internal_error): Use TOOLNAME.
10689 (NUMCELLS): Increase to 10.
10690 * configure, config.in: Regenerate.
10691
d149dd1d
PA
106922010-06-01 Pedro Alves <pedro@codesourcery.com>
10693
10694 * server.c (handle_query) <qSupported>: Do two passes over the
10695 qSupported string to avoid nesting strtok.
10696
f6528abd
JK
106972010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10698
10699 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10700 (CDEPS): New.
10701 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10702 -Wl,--dynamic-list.
10703 * configure: Regenerate.
10704 * proc-service.list: New.
10705
ca2a87a0
JK
107062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10707
10708 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10709 New comment.
10710
363a6e9f
OS
107112010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10712
10713 * gdbreplay.c (remote_open): Check error return from socket() call by
10714 its equality to -1 not by it being negative.
10715 * remote-utils.c (remote_open): Likewise.
10716
d23b6cb1
PA
107172010-05-23 Pedro Alves <pedro@codesourcery.com>
10718
10719 * config.h: Regenerate.
10720
28d3cf85
MK
107212010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10722
10723 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10724 doesn't provide PTRACE_GET_THREAD_AREA.
10725
fea36a59
MK
107262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10727
10728 * linux-m68k-low.c: Include <asm/ptrace.h>
10729 (ps_get_thread_area): Implement.
10730
24b066ba
DE
107312010-05-03 Doug Evans <dje@google.com>
10732
10733 * event-loop.c (struct callback_event): New struct.
10734 (callback_list): New global.
10735 (append_callback_event, delete_callback_event): New functions.
10736 (process_callback): New function.
10737 (start_event_loop): Call it.
10738 * remote-utils.c (NOT_SCHEDULED): Define.
10739 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10740 moved out of readchar.
10741 (readchar): Rewrite. Call reschedule before returning.
10742 (reset_readchar): New function.
10743 (remote_close): Call it.
10744 (process_remaining, reschedule): New functions.
10745 * server.h (callback_handler_func): New typedef.
10746 (append_callback_event, delete_callback_event): Declare.
10747
9836d6ea
PA
107482010-05-03 Pedro Alves <pedro@codesourcery.com>
10749
10750 * proc-service.c (ps_pglobal_lookup): Use
10751 thread_db_look_up_one_symbol.
10752 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10753 parameter. Use it instead of all_symbols_looked_up.
10754 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10755 field.
10756 (all_symbols_looked_up): Don't declare.
10757 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10758 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10759 field.
10760 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10761 Set all_symbols_looked_up here.
10762 (thread_db_look_up_one_symbol): New.
10763 (thread_db_get_tls_address): Adjust.
10764 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10765 thread_db object on the heap, and tentatively set it in the
10766 process structure.
10767 (thread_db_init): Don't set all_symbols_looked_up here.
10768 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10769
7984d532
PA
107702010-05-03 Pedro Alves <pedro@codesourcery.com>
10771
10772 * linux-low.c (linux_kill, linux_detach): Adjust.
10773 (status_pending_p_callback): Remove redundant statement. Check
10774 for !TARGET_WAITIKIND_IGNORE, instead of
10775 TARGET_WAITKIND_STOPPED.
10776 (handle_tracepoints): Make sure LWP is locked. Adjust.
10777 (linux_wait_for_event_1): Adjust.
10778 (linux_cancel_breakpoints): New.
10779 (unsuspend_one_lwp): New.
10780 (unsuspend_all_lwps): New.
10781 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10782 (send_sigstop_callback): Change return type to int, add new
10783 `except' parameter and handle it.
10784 (suspend_and_send_sigstop_callback): New.
10785 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10786 pass them down. If SUSPEND, also increment the lwp's suspend
10787 count.
10788 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10789 (need_step_over_p): Don't consider suspended LWPs.
10790 (start_step_over): Adjust.
10791 (proceed_one_lwp): Change return type to int, add new `except'
10792 parameter and handle it.
10793 (unsuspend_and_proceed_one_lwp): New.
10794 (proceed_all_lwps): Use find_inferior instead of
10795 for_each_inferior.
10796 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10797 also decrement the suspend count of LWPs. Pass `except' down,
10798 instead of hacking its suspend count.
10799 (linux_pause_all): Add `freeze' parameter. Adjust.
10800 (linux_unpause_all): New.
10801 (linux_target_ops): Install linux_unpause_all.
10802 * server.c (handle_status): Adjust.
10803 * target.h (struct target_ops): New fields `unpause_all' and
10804 `cancel_breakpoints'. Add new parameter to `pause_all'.
10805 (pause_all): Add new `freeze' parameter.
10806 (unpause_all): New.
10807 (cancel_breakpoints): New.
10808 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10809 cancel breakpoints.
10810 (cmd_qtstart): Pause threads.
10811 (stop_tracing): Pause threads, and cancel breakpoints.
10812 * win32-low.c (win32_target_ops): Adjust.
10813
e471f25b
PA
108142010-05-03 Pedro Alves <pedro@codesourcery.com>
10815
10816 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10817 the inferior right away from here...
10818 (linux_wait_1): ... to here, and adjust to check the thread's
10819 last_resume_kind instead of the lwp's step or stop_expected flags.
10820
1915ef4f
PA
108212010-05-02 Pedro Alves <pedro@codesourcery.com>
10822
10823 * README: Use consistent `GDB' and `GDBserver' spellings.
10824
f9e39928
PA
108252010-05-02 Pedro Alves <pedro@codesourcery.com>
10826
10827 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10828 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10829 (linux_detach_one_lwp): Assume the lwp is stopped.
10830 (any_thread_of): Delete.
10831 (linux_detach): Stop all lwps here. Don't blindly delete all
10832 breakpoints.
10833 (delete_lwp_callback): New.
10834 (linux_mourn): Delete all lwps of the process that is gone.
10835 (linux_wait_1): Don't delete the last lwp of the process here.
10836 * mem-break.h (mark_breakpoints_out): Declare.
10837 * mem-break.c (mark_breakpoints_out): New.
10838 (free_all_breakpoints): Use it.
10839 * server.c (handle_target_event): If the process is gone, mark
10840 breakpoints out.
10841 * thread-db.c (struct thread_db) <create_bp>: New field.
10842 (thread_db_enable_reporting): Fix prototype. Store a thread event
10843 breakpoint reference in the thread_db struct.
10844 (thread_db_load_search): Clear the thread_db object.
10845 (try_thread_db_load_1): Ditto.
10846 (switch_to_process): New.
10847 (disable_thread_event_reporting): Use it.
10848 (remove_thread_event_breakpoints): New.
10849 (thread_db_detach, thread_db_mourn): Use it.
10850
1e7fc18c
PA
108512010-05-01 Pedro Alves <pedro@codesourcery.com>
10852
10853 * linux-low.c (linux_enable_event_reporting): New.
10854 (linux_wait_for_event_1, handle_extended_wait): Use it.
10855
02fc4de7
PA
108562010-04-30 Pedro Alves <pedro@codesourcery.com>
10857
10858 * linux-low.c (linux_kill_one_lwp, linux_kill)
10859 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10860 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10861 SIGSTOP even if the LWP is stopped.
10862 (send_sigstop_callback): New.
10863 (stop_all_lwps): Use send_sigstop_callback instead.
10864 (linux_resume_one_thread): Adjust.
10865 (proceed_one_lwp): Still proceed an LWP that the client has
10866 requested to stop, if we haven't reported it as stopped yet. Make
10867 sure that LWPs the client want stopped, have a pending SIGSTOP.
10868
bc3b5632
DE
108692010-04-26 Doug Evans <dje@google.com>
10870
ae1ada35
DE
10871 * server.c (handle_general_set): Make static.
10872
bc3b5632
DE
10873 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10874 Print received char after testing for error/eof instead of before.
10875 (input_interrupt): Tweak comment.
10876
65730243
DE
108772010-04-23 Doug Evans <dje@google.com>
10878
10879 * server.c (start_inferior): Print inferior argv if --debug.
10880
a8ae7dc0
AR
108812010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10882
10883 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10884 * nto-x86-low.c: Include server.h
10885
1c07cc19
PM
108862010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10887
10888 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10889 be consistent with other sources of this directory.
10890 (init_registers_amd64): Correct name of source file of this function
10891 in the comment.
10892
e0a61e09
PM
108932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10894
10895 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10896 64-bit executables.
10897
54709339
PM
108982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10899
10900 * win32-i386-low.c: Add 64-bit support.
10901 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10902 (init_registers_amd64): Declare.
10903 (mappings): Add 64-bit version of array.
10904 (init_windows_x86): New function.
10905 (the_low_target): Change init_arch field to init_windows_x86.
10906
e8f0053d
PM
109072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10908
10909 * win32-low.c: Adapt to support also 64-bit architecture.
10910 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10911 (get_image_name): Use SIZE_T type for local variable `done'.
10912 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10913 (toolhelp_get_dll_name): Idem.
10914 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10915 Use uintptr_t typecast to avoid warning.
10916 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10917 (handle_exception): Use phex_nz to avoid warning.
10918 (win32_wait): Remove unused local variable `process'.
10919
c481e77e
PM
109202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10921
10922 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10923 `amd64-avx.o'.
10924
12ea4b69
PM
109252010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10926
10927 * configure.ac: Use `ws2_32' library for srv_mingw.
10928 * configure: Regenerate.
10929 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10930 * remote-utils.c: Likewise.
10931
f6d1620c
L
109322010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10933
10934 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10935 if __x86_64__ is defined.
10936
8e642873
PM
109372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10938
10939 * configure: Regenerate.
10940
711e434b
PM
109412010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10942
10943 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10944 * target.h (target_ops): New get_tib_address field.
10945 * win32-low.h (win32_thread_info): Add thread_local_base field.
10946 * win32-low.c (child_add_thread): Add tlb argument.
10947 Set thread_local_base field to TLB.
10948 (get_child_debug_event): Adapt to child_add_thread change.
10949 (win32_get_tib_address): New function.
10950 (win32_target_ops): Set get_tib_address field to
10951 win32_get_tib_address.
10952 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10953
505106cd
PA
109542010-04-12 Pedro Alves <pedro@codesourcery.com>
10955
505106cd
PA
10956 * linux-low.c (linux_mourn): Also remove the process.
10957 * server.c (handle_target_event): Don't remove the process here.
10958 * nto-low.c (nto_mourn): New.
10959 (nto_target_ops): Install it.
10960 * spu-low.c (spu_mourn): New.
10961 (spu_target_ops): Install it.
10962 * win32-low.c (win32_mourn): New.
10963 (win32_target_ops): Install it.
10964
e8470a06
PA
109652010-04-12 Pedro Alves <pedro@codesourcery.com>
10966
10967 * server.h (buffer_xml_printf): Remove redundant `;'.
10968
45ba0d02
PA
109692010-04-12 Pedro Alves <pedro@codesourcery.com>
10970
10971 * regcache.c (set_register_cache): Invalidate regcaches before
10972 changing the register cache layout.
10973 (regcache_invalidate_one): Allow a NULL regcache.
10974 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10975 regcaches before changing the register cache layout or the target
10976 regsets.
10977
59e04013
L
109782010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10979
10980 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10981 variable warning on Linux/x86-64.
10982
8336d594
PA
109832010-04-11 Pedro Alves <pedro@codesourcery.com>
10984
10985 GDBserver disconnected tracing support.
10986
10987 * linux-low.c (linux_remove_process): Delete.
10988 (add_lwp): Don't set last_resume_kind here.
10989 (linux_kill): Use `mourn'.
10990 (linux_detach): Use `thread_db_detach', and `mourn'.
10991 (linux_mourn): New.
10992 (linux_attach_lwp_1): Adjust comment.
10993 (linux_attach): last_resume_kind moved the thread_info; adjust.
10994 (status_pending_p_callback): Adjust.
10995 (linux_wait_for_event_1): Adjust.
10996 (count_events_callback, select_singlestep_lwp_callback)
10997 (select_event_lwp_callback, cancel_breakpoints_callback)
10998 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10999 (proceed_one_lwp): Adjust.
11000 (linux_async): Add debug output.
11001 (linux_thread_stopped): New.
11002 (linux_pause_all): New.
11003 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11004 linux_pause_all.
11005 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11006 (thread_db_free): Delete declaration.
11007 (thread_db_detach, thread_db_mourn): Declare.
11008 * thread-db.c (thread_db_init): Use thread_db_mourn.
11009 (thread_db_free): Delete, split in two.
11010 (disable_thread_event_reporting): New.
11011 (thread_db_detach): New.
11012 (thread_db_mourn): New.
11013
11014 * server.h (struct thread_info) <last_resume_kind>: New field.
11015 <attached>: Add comment.
11016 <gdb_detached>: New field.
11017 (handler_func): Change return type to int.
11018 (handle_serial_event, handle_target_event): Ditto.
11019 (gdb_connected): Declare.
11020 (tracing): Delete.
11021 (disconnected_tracing): Declare.
11022 (stop_tracing): Declare.
11023
11024 * server.c (handle_query) <qSupported>: Report support for
11025 disconnected tracing.
11026 (queue_stop_reply_callback): Account for running threads.
11027 (gdb_wants_thread_stopped): New.
11028 (gdb_wants_all_threads_stopped): New.
11029 (gdb_reattached_process): New.
11030 (handle_status): Clear the `gdb_detached' flag of all processes.
11031 In all-stop, stop all threads.
11032 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11033 (process_serial_event): If the remote connection breaks, or if an
11034 exit was forced with "monitor exit", force an event loop exit.
11035 Handle disconnected tracing on detach.
11036 (handle_serial_event): Adjust.
11037 (handle_target_event): If GDB isn't connected, forward events back
11038 to the inferior, unless the last process exited, in which case,
11039 exit gdbserver. Adjust interface.
11040
11041 * remote-utils.c (remote_open): Don't block in accept. Instead
11042 register an event loop source on the listen socket file
11043 descriptor. Refactor bits into ...
11044 (listen_desc): ... this new global.
11045 (gdb_connected): ... this new function.
11046 (enable_async_notification): ... this new function.
11047 (handle_accept_event): ... this new function.
11048 (remote_close): Clear remote_desc.
11049
11050 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11051
11052 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11053 New fields.
11054 (mourn_inferior): Define.
11055 (target_process_qsupported): Avoid the dangling else problem.
11056 (thread_stopped): Define.
11057 (pause_all): Define.
11058 (target_waitstatus_to_string): Declare.
11059 * target.c (target_waitstatus_to_string): New.
11060
11061 * tracepoint.c (tracing): Make extern.
11062 (disconnected_tracing): New.
11063 (stop_tracing): Make extern. Handle tracing stops due to GDB
11064 disconnecting.
11065 (cmd_qtdisconnected): New.
11066 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11067 (handle_tracepoint_general_set): Handle QTDisconnected.
11068
11069 * event-loop.c (event_handler_func): Change return type to int.
11070 (process_event): Bail out if the event handler wants the event
11071 loop to stop.
11072 (handle_file_event): Ditto.
11073 (start_event_loop): Bail out if the event handler wants the event
11074 loop to stop.
11075
11076 * nto-low.c (nto_target_ops): Adjust.
11077 * spu-low.c (spu_wait): Don't remove the process here.
11078 (spu_target_ops): Adjust.
11079 * win32-low.c (win32_wait): Don't remove the process here.
11080 (win32_target_ops): Adjust.
11081
5d267c4c
PA
110822010-04-11 Pedro Alves <pedro@codesourcery.com>
11083
11084 * regcache.c (realloc_register_cache): Invalidate inferior's
11085 regcache before recreating it.
11086
623ccd72
PA
110872010-04-09 Pedro Alves <pedro@codesourcery.com>
11088
11089 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11090
219f2f23
PA
110912010-04-09 Stan Shebs <stan@codesourcery.com>
11092 Pedro Alves <pedro@codesourcery.com>
11093
11094 * server.h (LONGEST): New.
11095 (struct thread_info) <while_stepping>: New field.
11096 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11097 Declare.
11098 (initialize_tracepoint, handle_tracepoint_general_set)
11099 (handle_tracepoint_query, tracepoint_finished_step)
11100 (tracepoint_was_hit, release_while_stepping_state_list):
11101 (current_traceframe): Declare.
11102 * server.c (handle_general_set): Handle tracepoint packets.
11103 (read_memory): New.
11104 (write_memory): New.
11105 (handle_search_memory_1): Use read_memory.
11106 (handle_query): Report support for conditional tracepoints, trace
11107 state variables, and tracepoint sources. Handle tracepoint
11108 queries.
11109 (main): Initialize the tracepoints module.
11110 (process_serial_event): Handle traceframe reads/writes.
11111
11112 * linux-low.c (handle_tracepoints): New.
11113 (linux_wait_1): Call it.
11114 (linux_resume_one_lwp): Handle while-stepping.
11115 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11116 (linux_target_ops): Install them.
11117 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11118 New field.
11119 * linux-x86-low.c (x86_supports_tracepoints): New.
11120 (the_low_target). Install it.
11121
11122 * mem-break.h (delete_breakpoint): Declare.
11123 * mem-break.c (delete_breakpoint): Make external.
11124
11125 * target.h (struct target_ops): Add `supports_tracepoints',
11126 `read_pc', and `write_pc' fields.
11127 (target_supports_tracepoints): Define.
11128 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11129 (phex_nz): New.
11130
11131 * regcache.h (struct regcache) <registers_owned>: New field.
11132 (init_register_cache, regcache_cpy): Declare.
11133 (regcache_read_pc, regcache_write_pc): Declare.
11134 (register_cache_size): Declare.
11135 (supply_regblock): Declare.
11136 * regcache.c (init_register_cache): New.
11137 (new_register_cache): Use it.
11138 (regcache_cpy): New.
11139 (register_cache_size): New.
11140 (supply_regblock): New.
11141 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11142
219f2f23
PA
11143 * tracepoint.c: New.
11144
11145 * Makefile.in (OBS): Add tracepoint.o.
11146 (tracepoint.o): New rule.
11147
3a13a53b
L
111482010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11149
11150 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11151 (i386-mmx.o): New.
11152 (i386-mmx.c): Likewise.
11153 (i386-mmx-linux.o): Likewise.
11154 (i386-mmx-linux.c): Likewise.
11155
11156 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11157 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11158 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11159 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11160
11161 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11162 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11163 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11164
1570b33e
L
111652010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11166
11167 * Makefile.in (clean): Updated.
11168 (i386-avx.o): New.
11169 (i386-avx.c): Likewise.
11170 (i386-avx-linux.o): Likewise.
11171 (i386-avx-linux.c): Likewise.
11172 (amd64-avx.o): Likewise.
11173 (amd64-avx.c): Likewise.
11174 (amd64-avx-linux.o): Likewise.
11175 (amd64-avx-linux.c): Likewise.
11176
11177 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11178 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11179 (srv_amd64_regobj): Add amd64-avx.o.
11180 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11181 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11182 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11183 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11184 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11185 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11186 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11187
11188 * i387-fp.c: Include "i386-xstate.h".
11189 (i387_xsave): New.
11190 (i387_cache_to_xsave): Likewise.
11191 (i387_xsave_to_cache): Likewise.
11192 (x86_xcr0): Likewise.
11193
11194 * i387-fp.h (i387_cache_to_xsave): Likewise.
11195 (i387_xsave_to_cache): Likewise.
11196 (x86_xcr0): Likewise.
11197
11198 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11199 * linux-crisv32-low.c (target_regsets): Likewise.
11200 * linux-m68k-low.c (target_regsets): Likewise.
11201 * linux-mips-low.c (target_regsets): Likewise.
11202 * linux-ppc-low.c (target_regsets): Likewise.
11203 * linux-s390-low.c (target_regsets): Likewise.
11204 * linux-sh-low.c (target_regsets): Likewise.
11205 * linux-sparc-low.c (target_regsets): Likewise.
11206 * linux-xtensa-low.c (target_regsets): Likewise.
11207
11208 * linux-low.c: Include <sys/uio.h>.
11209 (regsets_fetch_inferior_registers): Support nt_type.
11210 (regsets_store_inferior_registers): Likewise.
11211 (linux_process_qsupported): New.
11212 (linux_target_ops): Add linux_process_qsupported.
11213
11214 * linux-low.h (regset_info): Add nt_type.
11215 (linux_target_ops): Add process_qsupported.
11216
11217 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11218 and <sys/uio.h>.
11219 (init_registers_i386_avx_linux): New.
11220 (init_registers_amd64_avx_linux): Likewise.
11221 (xmltarget_i386_linux_no_xml): Likewise.
11222 (xmltarget_amd64_linux_no_xml): Likewise.
11223 (PTRACE_GETREGSET): Likewise.
11224 (PTRACE_SETREGSET): Likewise.
11225 (x86_fill_xstateregset): Likewise.
11226 (x86_store_xstateregset): Likewise.
11227 (use_xml): Likewise.
11228 (x86_linux_update_xmltarget): Likewise.
11229 (x86_linux_process_qsupported): Likewise.
11230 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11231 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11232 init_registers_i386_linux here. Call
11233 x86_linux_update_xmltarget.
11234 (the_low_target): Add x86_linux_process_qsupported.
11235
11236 * server.c (handle_query): Call target_process_qsupported.
11237
11238 * target.h (target_ops): Add process_qsupported.
11239 (target_process_qsupported): New.
11240
fc7238bb
PA
112412010-04-03 Pedro Alves <pedro@codesourcery.com>
11242
11243 * inferiors.c (add_thread): Set last_status kind to
11244 TARGET_WAITKIND_IGNORE.
11245 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11246 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11247 (linux_wait_1): Move `thread' local definition to block that uses
11248 it. Don't NULL initialize `event_child'.
11249 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11250 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11251 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11252
bdabb078
PA
112532010-04-01 Pedro Alves <pedro@codesourcery.com>
11254
11255 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11256 an extended waitstatus, or by a watchpoint.
11257 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11258 thread was stepping or has been stopped by a watchpoint.
11259
d3bbe7a0
PA
112602010-04-01 Pedro Alves <pedro@codesourcery.com>
11261
11262 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11263 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11264 of another, then delete the previous, and validate all
11265 breakpoints.
11266 (validate_inserted_breakpoint): New.
11267 (delete_disabled_breakpoints): New.
11268 (validate_breakpoints): New.
11269 (check_mem_read): Validate breakpoints before trusting their
11270 shadow. Delete disabled breakpoints.
11271 (check_mem_write): Validate breakpoints before trusting they
11272 should be inserted. Delete disabled breakpoints.
11273 * mem-break.h (validate_breakpoints):
11274 * server.c (handle_query): Validate breakpoints when we see a
11275 qSymbol query.
11276
8b07ae33
PA
112772010-04-01 Pedro Alves <pedro@codesourcery.com>
11278
11279 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11280 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11281 if we could tell there's a GDB breakpoint at stop_pc.
11282 (need_step_over_p): Don't do a step over if we find a GDB
11283 breakpoint at the resume PC.
11284
11285 * mem-break.c (struct raw_breakpoint): New.
11286 (enum bkpt_type): New type `gdb_breakpoint'.
11287 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11288 fields. New field `raw'.
11289 (find_raw_breakpoint_at): New.
11290 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11291 breakpoint instead.
11292 (set_breakpoint_at): Adjust.
11293 (delete_raw_breakpoint): New.
11294 (release_breakpoint): New.
11295 (delete_breakpoint): Rename to...
11296 (delete_breakpoint_1): ... this. Add proc parameter. Use
11297 release_breakpoint. Return ENOENT.
11298 (delete_breakpoint): Reimplement.
11299 (find_breakpoint_at): Delete.
11300 (find_gdb_breakpoint_at): New.
11301 (delete_breakpoint_at): Delete.
11302 (set_gdb_breakpoint_at): New.
11303 (delete_gdb_breakpoint_at): New.
11304 (gdb_breakpoint_here): New.
11305 (set_reinsert_breakpoint): Use release_breakpoint.
11306 (uninsert_breakpoint): Rename to ...
11307 (uninsert_raw_breakpoint): ... this.
11308 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11309 (reinsert_raw_breakpoint): Change parameter type to
11310 raw_breakpoint.
11311 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11312 instead.
11313 (check_breakpoints): Adjust. Use release_breakpoint.
11314 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11315 (breakpoint_inserted_here): Ditto.
11316 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11317 Don't trust the breakpoint's shadow if it is not inserted.
11318 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11319 (delete_all_breakpoints): Adjust.
11320 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11321 use delete_breakpoint_1.
11322
11323 * mem-break.h (breakpoints_supported): Delete declaration.
11324 (set_gdb_breakpoint_at): Declare.
11325 (gdb_breakpoint_here): Declare.
11326 (delete_breakpoint_at): Delete.
11327 (delete_gdb_breakpoint_at): Declare.
11328
11329 * server.h (struct raw_breakpoint): Forward declare.
11330 (struct process_info): New field `raw_breakpoints'.
11331
11332 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11333 breakpoints.
11334
6bf5e0ba
PA
113352010-03-24 Pedro Alves <pedro@codesourcery.com>
11336
11337 * linux-low.c (status_pending_p_callback): Fix comment.
11338 (linux_wait_for_event_1): Move most of the internal breakpoint
11339 handling from here...
11340 (linux_wait_1): ... to here.
11341 (count_events_callback): New.
11342 (select_singlestep_lwp_callback): New.
11343 (select_event_lwp_callback): New.
11344 (cancel_breakpoints_callback): New.
11345 (select_event_lwp): New.
11346 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11347 priority to all LWPs that have had events that should be reported
11348 to the client. Cancel breakpoints when about to reporting the
11349 event to the client, not while stopping lwps. No longer cancel
11350 finished single-steps here.
11351 (cancel_finished_single_step): Delete.
11352 (cancel_finished_single_steps): Delete.
11353
414a389f
PA
113542010-03-24 Pedro Alves <pedro@codesourcery.com>
11355
11356 * mem-break.c (enum bkpt_type): New.
11357 (struct breakpoint): New field `type'.
11358 (set_breakpoint_at): Change return type to struct breakpoint
11359 pointer. Set type to `other_breakpoint' by default.
11360 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11361 in the breakpoint list.
11362 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11363 (reinsert_breakpoint): Rename to ...
11364 (reinsert_raw_breakpoint): ... this.
11365 (reinsert_breakpoints_at): Adjust.
11366 * mem-break.h (struct breakpoint): Declare.
11367 (set_breakpoint_at): Change return type to struct breakpoint
11368 pointer.
11369
2280c721
PA
113702010-03-24 Pedro Alves <pedro@codesourcery.com>
11371
11372 * server.c (handle_query): Assign, not compare.
11373
d50171e4
PA
113742010-03-24 Pedro Alves <pedro@codesourcery.com>
11375
11376 Teach linux gdbserver to step-over-breakpoints.
11377
11378 * linux-low.c (can_hardware_single_step): New.
11379 (supports_breakpoints): New.
11380 (handle_extended_wait): If stopping threads, read the stop pc of
11381 the new cloned LWP.
11382 (get_pc): New.
11383 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11384 low target doesn't support retrieving the PC.
11385 (add_lwp): Set last_resume_kind to resume_continue.
11386 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11387 (linux_attach): Don't clear stop_expected. Set the lwp's
11388 last_resume_kind to resume_stop.
11389 (linux_detach_one_lwp): Don't check for removed breakpoints.
11390 (check_removed_breakpoint): Delete.
11391 (status_pending_p): Rename to ...
11392 (status_pending_p_callback): ... this. Don't check for removed
11393 breakpoints. Don't consider threads that are stopped from GDB's
11394 perspective.
11395 (linux_wait_for_lwp): Always read the stop_pc here.
11396 (cancel_breakpoint): New.
11397 (step_over_bkpt): New global.
11398 (linux_wait_for_event_1): Implement stepping over breakpoints.
11399 (gdb_wants_lwp_stopped): New.
11400 (gdb_wants_all_stopped): New.
11401 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11402 single-step traps here. Store the thread's last reported target
11403 wait status.
11404 (send_sigstop): Don't clear stop_expected. Always set it,
11405 instead.
11406 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11407 (cancel_finished_single_step): New.
11408 (cancel_finished_single_steps): New.
11409 (wait_for_sigstop): Don't cancel finished single-step traps here.
11410 (linux_resume_one_lwp): Don't check for removed breakpoints.
11411 Don't set `step' on non-hardware step archs.
11412 (linux_set_resume_request): Ignore resume_stop requests if already
11413 stopping or stopped. Set the lwp's last_resume_kind.
11414 (resume_status_pending_p): Don't check for removed breakpoints.
11415 (need_step_over_p): New.
11416 (start_step_over): New.
11417 (finish_step_over): New.
11418 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11419 requests. Clear the thread's last reported target waitstatus.
11420 Don't use the `suspended' flag. Don't consider pending breakpoints.
11421 (linux_resume): Start a step-over if necessary.
11422 (proceed_one_lwp): New.
11423 (proceed_all_lwps): New.
11424 (unstop_all_lwps): New.
11425 * linux-low.h (struct lwp_info): Rewrite comment for the
11426 `suspended' flag. Add the `stop_pc' field. Delete the
11427 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11428 Add `'last_resume_kind' and `need_step_over' fields.
11429 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11430 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11431 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11432 (set_raw_breakpoint_at): New.
11433 (set_breakpoint_at): Rewrite to use it.
11434 (reinsert_breakpoint_handler): Delete.
11435 (set_reinsert_breakpoint): New.
11436 (reinsert_breakpoint_by_bp): Delete.
11437 (delete_reinsert_breakpoints): New.
11438 (uninsert_breakpoint): Rewrite.
11439 (uninsert_breakpoints_at): New.
11440 (reinsert_breakpoint): Rewrite.
11441 (reinsert_breakpoints_at): New.
11442 (check_breakpoints): Rewrite.
11443 (breakpoint_here): New.
11444 (breakpoint_inserted_here): New.
11445 (check_mem_read): Adjust.
11446 * mem-break.h (breakpoints_supported, breakpoint_here)
11447 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11448 (reinsert_breakpoint_by_bp): Delete declaration.
11449 (delete_reinsert_breakpoints): Declare.
11450 (reinsert_breakpoint): Delete declaration.
11451 (reinsert_breakpoints_at): Declare.
11452 (uninsert_breakpoint): Delete declaration.
11453 (uninsert_breakpoints_at): Declare.
11454 (check_breakpoints): Adjust prototype.
11455 * server.h: Adjust include order.
11456 (struct thread_info): Declare here. Add a `last_status' field.
11457
30ba68cb
MS
114582010-03-23 Michael Snyder <msnyder@vmware.com>
11459
11460 * server.c (crc32): New function.
11461 (handle_query): Add handling for 'qCRC:' request.
11462
b9a881c2
PA
114632010-03-23 Pedro Alves <pedro@codesourcery.com>
11464
11465 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11466 lwp had been stopped by a watchpoint.
11467
e92d13d5
PA
114682010-03-16 Pedro Alves <pedro@codesourcery.com>
11469
11470 * server.h (internal_error): Declare.
11471 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11472 * utils.c (internal_error): New function.
11473
64daa791
AS
114742010-03-15 Andreas Schwab <schwab@redhat.com>
11475
11476 * configure.srv: Fix typo setting srv_regobj.
11477
f52cd8cd
PA
114782010-03-15 Pedro Alves <pedro@codesourcery.com>
11479
11480 * linux-low.c (fetch_register): Avoid passing a non string literal
11481 format to `error'.
11482 (usr_store_inferior_registers): Ditto.
11483
93ae6fdc
PA
114842010-03-14 Pedro Alves <pedro@codesourcery.com>
11485
11486 * linux-low.c (linux_write_memory): Bail out early if peeking
11487 memory failed.
11488
c3adc08c
PA
114892010-03-14 Pedro Alves <pedro@codesourcery.com>
11490
11491 * linux-low.h (struct lwp_info): New fields
11492 `stopped_by_watchpoint' and `stopped_data_address'.
11493 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11494 here, and cache them in the lwp object.
11495 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11496 directly.
11497 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11498 field.
11499 (linux_stopped_by_watchpoint): Rewrite.
11500 (linux_stopped_data_address): Rewrite.
11501
bce522a2
PA
115022010-03-06 Simo Melenius <simo.melenius@iki.fi>
11503
11504 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11505 switching the current inferior, not before.
11506
90884b2b
L
115072010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11508
11509 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11510 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11511 i386-linux.c and amd64-linux.c.
11512 (reg-i386.o): Removed.
11513 (reg-i386.c): Likewise.
11514 (reg-i386-linux.o): Likewise.
11515 (reg-i386-linux.c): Likewise.
11516 (reg-x86-64.o): Likewise.
11517 (reg-x86-64.c): Likewise.
11518 (reg-x86-64-linux.o): Likewise.
11519 (reg-x86-64-linux.c): Likewise.
11520 (i386.o): New.
11521 (i386.c): Likewise.
11522 (i386-linux.o): Likewise.
11523 (i386-linux.c): Likewise.
11524 (amd64.o): Likewise.
11525 (amd64.c): Likewise.
11526 (amd64-linux.o): Likewise.
11527 (amd64-linux.c): Likewise.
11528
11529 * configure.srv (srv_i386_regobj): New.
11530 (srv_i386_linux_regobj): Likewise.
11531 (srv_amd64_regobj): Likewise.
11532 (srv_amd64_linux_regobj): Likewise.
11533 (srv_i386_32bit_xmlfiles): Likewise.
11534 (srv_i386_64bit_xmlfiles): Likewise.
11535 (srv_i386_xmlfiles): Likewise.
11536 (srv_amd64_xmlfiles): Likewise.
11537 (srv_i386_linux_xmlfiles): Likewise.
11538 (srv_amd64_linux_xmlfiles): Likewise.
11539 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11540 srv_xmlfiles to $srv_i386_xmlfiles.
11541 (i[34567]86-*-mingw32ce*): Likewise.
11542 (i[34567]86-*-mingw*): Likewise.
11543 (i[34567]86-*-nto*): Likewise.
11544 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11545 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11546 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11547 (x86_64-*-linux*): Likewise.
11548
11549 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11550 (init_registers_amd64_linux): New.
11551 (x86_arch_setup): Replace init_registers_x86_64_linux with
11552 init_registers_amd64_linux.
11553
193f13e6
MK
115542010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11555
11556 * configure.ac: Check for libdl. If it is not available link against
11557 static libthread_db.
11558 * configure: Regenerate.
11559
85d721b8
PA
115602010-02-22 Pedro Alves <pedro@codesourcery.com>
11561
11562 PR9605
11563
11564 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11565 handing a read watchpoint.
11566 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11567
6076632b
DE
115682010-02-12 Doug Evans <dje@google.com>
11569
11570 * linux-low.c (linux_supports_tracefork_flag): Document.
11571 (linux_look_up_symbols): Add comment.
11572
3327ccf7
L
115732010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11574
11575 * regcache.c (supply_register): Clear regcache if buf is NULL.
11576
0718675c 115772010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11578 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11579
11580 * inferiors.c (find_inferior): Add function documentation.
11581 (unloaded_dll): Handle the case where the unloaded dll has not
11582 been previously registered in the dll list.
11583
177321bd
DJ
115842010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11585
11586 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11587 (thumb2_breakpoint): New.
11588 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11589
2b009048
DJ
115902010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11593 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11594 breakpoints.
11595
3be029c7
PA
115962010-01-21 Pedro Alves <pedro@codesourcery.com>
11597
11598 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11599
18f5de3b
JK
116002010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11601
11602 * linux-s390-low.c (s390_collect_ptrace_register)
11603 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11604
3743bb4f
DE
116052010-01-21 Doug Evans <dje@google.com>
11606
14ce3065
DE
11607 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11608 (PTRACE_ARG4_TYPE): New macro.
11609 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11610 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11611 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11612 (usr_store_inferior_registers): Ditto.
11613 (linux_read_memory, linux_write_memory): Ditto.
11614 (linux_test_for_tracefork): Ditto.
11615
3743bb4f
DE
11616 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11617 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11618
8b315be5
PA
116192010-01-21 Pedro Alves <pedro@codesourcery.com>
11620
11621 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11622 target.
11623
85492558
PA
116242010-01-21 Pedro Alves <pedro@codesourcery.com>
11625
11626 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11627 prototype to take a regcache. Adjust.
11628
442ea881
PA
116292010-01-20 Pedro Alves <pedro@codesourcery.com>
11630
11631 * regcache.h (struct thread_info): Forward declare.
11632 (struct regcache): New.
11633 (new_register_cache): Adjust prototype.
11634 (get_thread_regcache): Declare.
11635 (free_register_cache): Adjust prototype.
11636 (registers_to_string, registers_from_string): Ditto.
11637 (supply_register, supply_register_by_name, collect_register)
11638 (collect_register_as_string, collect_register_by_name): Ditto.
11639 * regcache.c (struct inferior_regcache_data): Delete.
11640 (get_regcache): Rename to ...
11641 (get_thread_regcache): ... this. Adjust. Switch inferior before
11642 fetching registers.
11643 (regcache_invalidate_one): Adjust.
11644 (regcache_invalidate): Fix prototype.
11645 (new_register_cache): Return the new register cache.
11646 (free_register_cache): Change prototype.
11647 (realloc_register_cache): Adjust.
11648 (registers_to_string): Change prototype to take a regcache. Adjust.
11649 (registers_from_string): Ditto.
11650 (register_data): Ditto.
11651 (supply_register): Ditto.
11652 (supply_register_by_name): Ditto.
11653 (collect_register): Ditto.
11654 (collect_register_as_string): Ditto.
11655 (collect_register_by_name): Ditto.
11656 * server.c (process_serial_event): Adjust.
11657 * linux-low.h (regset_fill_func, regset_store_func): Change
11658 prototype.
11659 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11660 Change prototype.
11661 * linux-low.c (get_stop_pc): Adjust.
11662 (check_removed_breakpoint): Adjust.
11663 (linux_wait_for_event): Adjust.
11664 (linux_resume_one_lwp): Adjust.
11665 (fetch_register): Add regcache parameter. Adjust.
11666 (usr_store_inferior_registers): Ditto.
11667 (regsets_fetch_inferior_registers): Ditto.
11668 (regsets_store_inferior_registers): Ditto.
11669 (linux_fetch_registers, linux_store_registers): Ditto.
11670 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11671 regcache. Adjust.
43aaf8b6
PA
11672 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11673 Ditto.
442ea881
PA
11674 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11675 prototype to take a regcache.
11676 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11677 * remote-utils.c (convert_ascii_to_int, outreg)
11678 (prepare_resume_reply): Change prototype to take a regcache.
11679 Adjust.
11680 * target.h (struct target_ops) <fetch_registers, store_registers>:
11681 Change prototype to take a regcache.
11682 (fetch_inferior_registers, store_inferior_registers): Change
11683 prototype to take a regcache. Adjust.
11684 * proc-service.c (ps_lgetregs): Adjust.
11685 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11686 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11687 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11688 take a regcache. Adjust.
11689 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11690 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11691 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11692 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11693 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11694 (cris_cannot_fetch_register):
11695 (cris_breakpoint_at): Change prototype to take a regcache.
11696 Adjust.
11697 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11698 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11699 to take a regcache. Adjust.
11700 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11701 Adjust.
11702 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11703 take a regcache. Adjust.
11704 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11705 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11706 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11707 * linux-mips-low.c (mips_get_pc):
11708 (mips_set_pc): Change prototype to take a regcache. Adjust.
11709 (mips_reinsert_addr): Adjust.
11710 (mips_collect_register): Change prototype to take a regcache.
11711 Adjust.
11712 (mips_supply_register):
11713 (mips_collect_register_32bit, mips_supply_register_32bit)
11714 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11715 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11716 * linux-ppc-low.c (ppc_supply_ptrace_register)
11717 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11718 (parse_spufs_run): Adjust.
11719 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11720 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11721 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11722 take a regcache. Adjust.
11723 * linux-s390-low.c (s390_collect_ptrace_register)
11724 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11725 (s390_set_pc): Change prototype to take a regcache. Adjust.
11726 (s390_arch_setup): Adjust.
11727 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11728 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11729 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11730 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11731 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11732 regcache. Adjust.
11733 (sparc_breakpoint_at): Adjust.
11734 * linux-xtensa-low.c (xtensa_fill_gregset):
11735 (xtensa_store_gregset):
11736 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11737 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11738 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11739 prototype to take a regcache. Adjust.
11740 * win32-arm-low.c (arm_fetch_inferior_register)
11741 (arm_store_inferior_register): Change prototype to take a
11742 regcache. Adjust.
11743 * win32-i386-low.c (i386_fetch_inferior_register)
11744 (i386_store_inferior_register): Change prototype to take a
11745 regcache. Adjust.
11746 * win32-low.c (child_fetch_inferior_registers)
11747 (child_store_inferior_registers): Change prototype to take a
11748 regcache. Adjust.
11749 (win32_wait): Adjust.
11750 (win32_fetch_inferior_registers): Change prototype to take a
11751 regcache. Adjust.
11752 (win32_store_inferior_registers): Adjust.
11753 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11754 store_inferior_register>: Change prototype to take a regcache.
11755
60c3d7b0
DE
117562010-01-20 Doug Evans <dje@google.com>
11757
11758 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11759 #ifdef.
11760 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11761 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11762
dc146f7c
VP
117632010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11764
11765 * linux-low.c (linux_core_of_thread): New.
11766 (compare_ints, show_process, list_threads): New.
11767 (linux_qxfer_osdata): Report threads and cores.
11768 (linux_target_op): Register linux_core_of_thread.
11769 * remote-utils.c (prepare_resume_reply): Report the core.
11770 (buffer_xml_printf): Support %d specifier.
11771 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11772 New.
11773 (handle_query): Handle qXfer:threads. Announce availability
11774 thereof.
11775 * target.h (struct target_ops): New field core_of_thread.
11776
7803799a
UW
117772010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11778
11779 * Makefile.in (clean): Remove new generated files.
11780 (reg-s390.o, reg-s390.c): Remove rules.
11781 (reg-s390x.o, reg-s390x.c): Likewise.
11782 (s390-linux32.o, s390-linux32.c): Add rules.
11783 (s390-linux64.o, s390-linux64.c): Likewise.
11784 (s390x-linux64.o, s390x-linux64.c): Likewise.
11785 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11786 * linux-s390-low.c: Include <elf.h>.
11787 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11788 (init_registers_s390): Remove prototype.
11789 (init_registers_s390x): Likewise.
11790 (init_registers_s390_linux32): Add prototype.
11791 (init_registers_s390_linux64): Likewise.
11792 (init_registers_s390x_linux64): Likewise.
11793 (s390_num_regs_3264): New define.
11794 (s390_regmap_3264): New global variable.
11795 (s390_cannot_fetch_register): Remove obsolete check.
11796 (s390_cannot_store_register): Likewise.
11797 (s390_collect_ptrace_register): Handle upper/lower register halves.
11798 (s390_supply_ptrace_register): Likewise.
11799 (s390_fill_gregset): Update to register number changes.
11800 (s390_get_hwcap): New routine.
11801 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11802 Install appropriate regmap and register set.
11803
6e7ffa39
JB
118042010-01-01 Joel Brobecker <brobecker@adacore.com>
11805
11806 * server.c (gdbserver_version): Update copyright year to 2010.
11807 * gdbreplay.c (gdbreplay_version): Likewise.
11808
957f3f49
DE
118092009-12-28 Doug Evans <dje@google.com>
11810
11811 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11812 elf/external.h. Include <elf.h> instead but only if necessary.
11813
ca5c370d
PA
118142009-12-28 Pedro Alves <pedro@codesourcery.com>
11815
11816 * linux-low.c (linux_remove_process): Remove `detaching'
11817 parameter. Don't release/detach from thread_db here.
11818 (linux_kill): Release/detach from thread_db here, ...
11819 (linux_detach): ... and here, before actually detaching.
11820 (linux_wait_1): ... and here, when a process exits.
11821 * thread-db.c (any_thread_of): New.
11822 (thread_db_free): Switch the current inferior to a thread of the
11823 passed in process.
11824
4ee62156
DE
118252009-12-21 Doug Evans <dje@google.com>
11826
d90e6a88
DE
11827 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11828
c5f62d5f
DE
11829 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11830 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11831 warning ifndef __NR_tkill. Move setting of errno there too.
11832 Delete unnecessary resetting of errno after syscall.
11833 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11834
10e86dd7
DE
11835 * configure.ac: Check for dladdr.
11836 * config.in: Regenerate.
11837 * configure: Regenerate.
11838 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11839 (try_thread_db_load): Update.
11840
4ee62156
DE
11841 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11842
00f515da
DE
118432009-12-18 Doug Evans <dje@google.com>
11844
e9464885
DE
11845 * event-loop.c: Include unistd.h if it exists.
11846
07d4f67e
DE
11847 * linux-low.c (my_waitpid): Move definition away from being in
11848 between linux_tracefork_child/linux_test_for_tracefork.
11849
00f515da
DE
11850 * gdb_proc_service.h (psaddr_t): Fix type.
11851 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11852 signature to match glibc.
11853
1de1badb
DE
118542009-12-16 Doug Evans <dje@google.com>
11855
11856 * linux-low.c (linux_read_memory): Fix argument to read.
11857
aeeb81d1
PA
118582009-11-26 Pedro Alves <pedro@codesourcery.com>
11859
11860 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11861 events, don't leave current_inferior pointing at null.
11862
10357975
PA
118632009-11-26 Pedro Alves <pedro@codesourcery.com>
11864
11865 * win32-low.c (LOG): Delete.
11866 (OUTMSG): Output to stderr.
11867 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11868 on compile time LOG macro.
11869 (win32_wait): Fix debug output.
11870
cf6e3471
PA
118712009-11-26 Pedro Alves <pedro@codesourcery.com>
11872
11873 * win32-low.c (win32_add_one_solib): If the dll name is
11874 "ntdll.dll", prepend the system directory to the dll path.
11875
0c85e18e
MK
118762009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11877
11878 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11879
9ac544ce 118802009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11881 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11882
11883 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11884 * configure.ac: Check for __mcoldfire__ and set
11885 gdb_cv_m68k_is_coldfire.
11886 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11887 reg-cf.o and reg-m68k.o.
11888 * configure: Regenerated.
11889
fd7dd3e6
PA
118902009-11-16 Pedro Alves <pedro@codesourcery.com>
11891
11892 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11893 Pass it to thread_db_free.
11894 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11895 proper `detaching' argument to linux_remove_process.
11896 * linux-low.h (thread_db_free): Add `detaching' parameter.
11897 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11898 to thread_db_free.
11899 (thread_db_free): Add `detaching' parameter. Only
11900 call td_ta_clear_event if detaching from process.
11901
75aa492e
MK
119022009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11903
11904 * thread-db.c (thread_db_free): Fix typo.
11905
21e1bee4
PP
119062009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11907
11908 PR gdb/10838
11909 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11910
8838b45e
NS
119112009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11912
11913 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11914 with an i686 compiler.
11915 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11916 needed.
11917 * configure: Rebuilt.
11918
8a35fb51
SL
119192009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11920
11921 PR gdb/10783
11922
11923 * server.c (handle_search_memory_1): Correct read_addr initialization
11924 in loop for searching subsequent chunks.
11925
96f15937
PP
119262009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11927
11928 * configure.ac: New --with-libthread-db option.
11929 * thread-db.c: Allow direct dependence on libthread_db.
11930 (thread_db_free): Adjust.
11931 * config.in: Regenerate.
11932 * configure: Likewise.
889bf7c5 11933
5f7d1694
PP
119342009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11935
11936 PR gdb/10757
11937 * thread-db.c (attach_thread): New function.
11938 (maybe_attach_thread): Return success/failure.
11939 (find_new_threads_callback): Adjust.
889bf7c5
PA
11940 (thread_db_find_new_threads): Loop until no new threads.
11941
88e3b899
PA
119422009-10-13 Pedro Alves <pedro@codesourcery.com>
11943
11944 * proc-service.c (ps_lgetregs): Formatting.
11945
cdbfd419
PP
119462009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11947
11948 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11949 * configure.ac: Adjust.
11950 * linux-low.h (struct process_info_private): Move members to struct
11951 thread_db.
11952 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11953 * linux-low.c (linux_remove_process): Adjust.
11954 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11955 * server.c (handle_query): Move code ...
11956 (handle_monitor_command): ... here. New function.
11957 * target.h (struct target_ops): New member.
11958 * thread-db.c (struct thread_db): New.
11959 (libthread_db_search_path): New variable.
11960 (thread_db_create_event, thread_db_enable_reporting)
11961 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11962 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11963 (try_thread_db_load_1, dladdr_to_soname): New functions.
11964 (try_thread_db_load, thread_db_load_search): New functions.
11965 (thread_db_init): Search for libthread_db.
11966 (thread_db_free): New function.
11967 (thread_db_handle_monitor_command): Likewise.
11968 * config.in: Regenerate.
11969 * configure: Regenerate.
889bf7c5 11970
4168d2d6
UW
119712009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11972
11973 * spu-low.c (spu_kill): Wait for inferior to terminate.
11974 Call clear_inferiors.
11975 (spu_detach): Call clear_inferiors.
11976
81ecdfbb
RW
119772009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11978
11979 * aclocal.m4: Regenerate.
11980 * config.in: Likewise.
11981 * configure: Likewise.
11982
0b9ff2c0
UW
119832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11984
11985 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11986 (parse_spufs_run): New function.
11987 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11988 (ppc_breakpoint_at): Handle SPU breakpoints.
11989
efcbbd14
UW
119902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11991
11992 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11993 (SPUFS_MAGIC): Define.
11994 (spu_enumerate_spu_ids): New function.
11995 (linux_qxfer_spu): New function.
11996 (linux_target_ops): Install linux_qxfer_spu.
11997
f4d9bade
UW
119982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11999
12000 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12001 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12002 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12003 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12004 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12005 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12006 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12007 (init_registers_powerpc_cell32l): Add prototype.
12008 (init_registers_powerpc_cell64l): Likewise.
12009 (ppc_arch_setup): Detect Cell/B.E. architecture.
12010
96e946ca
RW
120112009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12012
12013 * Makefile.in (datarootdir): New variable.
12014
58d6951d
DJ
120152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12016
12017 * linux-low.c (linux_write_memory): Update debugging output.
12018 * Makefile.in (clean): Add new descriptions.
12019 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12020 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12021 * configure.srv: Add new files for arm*-*-linux*.
12022 * linux-arm-low.c: Add new declarations.
12023 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12024 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12025 (HWCAP_VFPv3D16): New.
12026 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12027 instead of __IWMMXT__.
12028 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12029 (arm_arch_setup): New.
12030 (target_regsets): Remove #ifdef. Add VFP regset.
12031 (the_low_target): Use arm_arch_setup.
12032
12b42a12
DJ
120332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12034
12035 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12036 the main thread again.
12037
ac8c974e
AR
120382009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12039
12040 Adding Neutrino gdbserver.
12041 * configure: Regenerated.
12042 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12043 * configure.srv (i[34567]86-*-nto*): New target.
12044 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12045 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12046 (nto_comctrl) [__QNX__]: New function.
12047 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12048
4424e0c3 120492009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12050
12051 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12052 srv_tgtobj.
12053
912cf4ba
PA
120542009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12055 Pedro Alves <pedro@codesourcery.com>
12056
12057 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12058 don't support CONTEXT_EXTENDED_REGISTERS.
12059 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12060 (the_low_target): Install them.
12061 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12062 failing with ERROR_PIPE_NOT_CONNECTED.
12063
aa5ca48f
DE
120642009-06-30 Doug Evans <dje@google.com>
12065 Pierre Muller <muller@ics.u-strasbg.fr>
12066
12067 Add h/w watchpoint support to x86-linux, win32-i386.
12068 * Makefile.in (SFILES): Add i386-low.c
12069 (i386_low_h): Define.
12070 (i386-low.o): Add dependencies.
12071 (linux-x86-low.o): Add i386-low.h dependency.
12072 (win32-i386-low.o): Ditto.
12073 * i386-low.c: New file.
12074 * i386-low.h: New file.
12075 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12076 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12077 * linux-low.c (linux_add_process): Initialize arch_private.
12078 (linux_remove_process): Free arch_private.
12079 (add_lwp): Initialize arch_private.
12080 (delete_lwp): Free arch_private.
12081 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12082 provided.
12083 * linux-low.h (process_info_private): New member arch_private.
12084 (lwp_info): New member arch_private.
12085 (linux_target_ops): New members new_process, new_thread,
12086 prepare_to_resume.
12087 (ptid_of): New macro.
12088 * linux-x86-low.c: Include stddef.h, i386-low.h.
12089 (arch_process_info): New struct.
12090 (arch_lwp_info): New struct.
12091 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12092 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12093 (i386_dr_low_get_status): New function.
12094 (x86_insert_point, x86_remove_point): New functions.
12095 (x86_stopped_by_watchpoint): New function.
12096 (x86_stopped_data_address): New function.
12097 (x86_linux_new_process, x86_linux_new_thread): New functions.
12098 (x86_linux_prepare_to_resume): New function.
12099 (the_low_target): Add entries for insert_point, remove_point,
12100 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12101 prepare_to_resume.
12102 * server.c (debug_hw_points): New global.
12103 (monitor_show_help): Document set debug-hw-points.
12104 (handle_query): Process "set debug-hw-points".
12105 * server.h (debug_hw_points): Declare.
12106 (paddress): Declare.
12107 * utils.c (NUMCELLS, CELLSIZE): New macros.
12108 (get_sell, xsnprintf, paddress): New functions.
12109 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12110 remove_point, stopped_by_watchpoint, stopped_data_address.
12111 * win32-i386-low.c: Include i386-low.h.
12112 (debug_reg_state): Replaces dr.
12113 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12114 (i386_dr_low_get_status): New function.
12115 (i386_insert_point, i386_remove_point): New functions.
12116 (i386_stopped_by_watchpoint): New function.
12117 (i386_stopped_data_address): New function.
12118 (i386_initial_stuff): Update.
12119 (get_thread_context,set_thread_context,i386_thread_added): Update.
12120 (the_low_target): Add entries for insert_point,
12121 remove_point, stopped_by_watchpoint, stopped_data_address.
12122 * win32-low.c (win32_insert_watchpoint): New function.
12123 (win32_remove_watchpoint): New function.
12124 (win32_stopped_by_watchpoint): New function.
12125 (win32_stopped_data_address): New function.
12126 (win32_target_ops): Add entries for insert_watchpoint,
12127 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12128 * win32-low.h (win32_target_ops): New members insert_point,
12129 remove_point, stopped_by_watchpoint, stopped_data_address.
12130
d993e290
PA
121312009-06-25 Pedro Alves <pedro@codesourcery.com>
12132
12133 * server.c (process_serial_event): Re-return unsupported, not
12134 error, if the type isn't recognized. Re-allow supporting only
12135 insert or remove packets. Also call require_running for
12136 breakpoints. Add missing break statement to default case. Tidy.
12137 * target.h (struct target_ops): Rename insert_watchpoint to
12138 insert_point, and remove_watchpoint to remove_point.
12139
12140 * linux-low.h (struct linux_target_ops): Likewise.
12141 * linux-low.c (linux_insert_watchpoint): Rename to ...
12142 (linux_insert_point): ... this. Adjust.
12143 (linux_remove_watchpoint): Rename to ...
12144 (linux_remove_point): ... this. Adjust.
12145 (linux_target_ops): Adjust.
12146 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12147 (cris_insert_point): ... this.
12148 (cris_remove_watchpoint): Rename to ...
12149 (cris_remove_point): ... this.
12150 (the_low_target): Adjust.
12151
0f54c268
PM
121522009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12153
12154 * server.c (handle_v_kill): Pass signal_pid to
12155 kill_inferior if multi_process is zero.
12156
c6314022
AR
121572009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12158
12159 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12160 * target.h (target_ops): Comment for *_watchpoint to make it clear
12161 the functions can get types '0' and '1'.
12162
4463ce24
AR
121632009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12164
12165 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12166 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12167 * regcache.c (get_regcache): Likewise.
12168 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12169 * win32-low.c (child_fetch_inferior_registers): Remove check for
12170 regno 0.
12171
cf8fd78b
PA
121722009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12173 Pedro Alves <pedro@codesourcery.com>
12174
12175 * target.h (struct target_ops) <supports_multi_process>: New
12176 callback.
12177 (target_supports_multi_process): New.
12178 * server.c (handle_query): Even if GDB reports support, only
12179 enable multi-process if the target also supports it. Report
12180 multi-process support only if the target backend supports it.
12181 * linux-low.c (linux_supports_multi_process): New function.
12182 (linux_target_ops): Install it as target_supports_multi_process
12183 callback.
12184
47c0c975
DE
121852009-05-24 Doug Evans <dje@google.com>
12186
e09875d4
DE
12187 Global renaming of find_thread_pid to find_thread_ptid.
12188 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12189 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12190 All callers updated.
12191
e27d73f6
DE
12192 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12193 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12194 directly.
12195
47c0c975
DE
12196 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12197 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12198 (linux_resume_one_lwp): Ditto.
12199
2acc282a
DE
122002009-05-23 Doug Evans <dje@google.com>
12201
12202 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12203 from struct inferior_list_entry * to struct lwp_info *.
12204 All callers updated.
12205
9f1036c1
DE
122062009-05-13 Doug Evans <dje@google.com>
12207
12208 * linux-x86-low.c: Don't include assert.h.
12209 (x86_siginfo_fixup): Use fatal, not assert.
12210 (x86_arch_setup): Fix comment.
12211
d0722149
DE
122122009-05-12 Doug Evans <dje@google.com>
12213
12214 Biarch support for i386/amd64 gdbserver.
12215 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12216 Add linux-x86-low.c.
12217 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12218 (linux-x86-low.o): Add.
12219 * linux-x86-64-low.c: Delete.
12220 * linux-i386-low.c: Delete.
12221 * linux-x86-low.c: New file.
12222 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12223 linux-x86-low.o.
12224 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12225 linux-x86-low.o.
12226 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12227 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12228 (linux_child_pid_to_exec_file): New function.
12229 (elf_64_header_p, elf_64_file_p): New functions.
12230 (siginfo_fixup): New function.
12231 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12232 give target a chance to convert layout.
12233 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12234 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12235
fdeb2a12
DE
122362009-05-07 Doug Evans <dje@google.com>
12237
12238 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12239 (regsets_store_inferior_registers): Ditto.
12240
a6dbe5df
PA
122412009-05-06 Pedro Alves <pedro@codesourcery.com>
12242
12243 PR server/10048
12244
12245 * linux-low.c (must_set_ptrace_flags): Delete.
12246 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12247 of the global.
12248 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12249 `lwp->must_set_ptrace_flags' instead.
ba42693b 12250 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12251 (linux_wait_1): ... not here.
12252
5091eb23
DE
122532009-04-30 Doug Evans <dje@google.com>
12254
9f767825
DE
12255 * inferiors.c (started_inferior_callback): New function.
12256 (attached_inferior_callback): New function.
12257 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12258 * server.c (print_started_pid, print_attached_pid): New functions.
12259 (detach_or_kill_for_exit): New function.
12260 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12261 * server.h (have_started_inferiors_p): Declare.
12262 (have_attached_inferiors_p): Declare.
12263
5091eb23
DE
12264 * inferiors.c (remove_process): Fix memory leak, free process.
12265 * linux-low.c (linux_remove_process): New function.
12266 (linux_kill): Call it instead of remove_process.
12267 (linux_detach, linux_wait_1): Ditto.
12268
155c8968
PA
122692009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12270
12271 * configure.srv: Add x86 Windows CE target.
12272
7fe519cb
UW
122732009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12274
12275 * inferiors.c (get_thread_process): Make global.
12276 * server.h (get_thread_process): Add prototype.
12277 * thread-db.c (find_one_thread): Use get_thread_process
12278 instead of current_process.
12279 (thread_db_get_tls_address): Do not crash if called when
12280 thread layer is not yet initialized.
12281
5472f405
UW
122822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12283
12284 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12285 * spu-low.c (current_tid): Rename to ...
12286 (current_ptid): ... this.
12287 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12288 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12289 ptid_get_lwp (current_ptid) instead of current_tid.
12290 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12291 instead of current_tid. Use find_process_pid to verify pid
12292 argument is valid. Pass proper argument to remove_process.
12293 (spu_thread_alive): Compare current_ptid instead of current_tid.
12294 (spu_resume): Likewise.
12295
55ac2b99
PA
122962009-04-02 Pedro Alves <pedro@codesourcery.com>
12297
12298 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12299 variable.
12300
95954743
PA
123012009-04-01 Pedro Alves <pedro@codesourcery.com>
12302
12303 Implement the multiprocess extensions, and add linux multiprocess
12304 support.
12305
12306 * server.h (ULONGEST): Declare.
12307 (struct ptid, ptid_t): New.
12308 (minus_one_ptid, null_ptid): Declare.
12309 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12310 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12311 (struct inferior_list_entry): Change `id' type from unsigned from
12312 to ptid_t.
12313 (struct sym_cache, struct breakpoint, struct
12314 process_info_private): Forward declare.
12315 (struct process_info): Declare.
12316 (current_process): Declare.
12317 (all_processes): Declare.
12318 (initialize_inferiors): Declare.
12319 (add_thread): Adjust to use ptid_t.
12320 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12321 (add_process, remove_process, find_thread_pid): Declare.
12322 (find_inferior_id): Adjust to use ptid_t.
12323 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12324 (multi_process): Declare.
12325 (push_event): Adjust to use ptid_t.
12326 (read_ptid, write_ptid): Declare.
12327 (prepare_resume_reply): Adjust to use ptid_t.
12328 (clear_symbol_cache): Declare.
12329 * inferiors.c (all_processes): New.
12330 (null_ptid, minus_one_ptid): New.
12331 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12332 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12333 (add_thread): Change unsigned long to ptid. Remove gdb_id
12334 parameter. Adjust.
12335 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12336 (gdb_id_to_thread): Rename to ...
12337 (find_thread_pid): ... this. Change unsigned long to ptid.
12338 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12339 (loaded_dll, pull_pid_from_list): Adjust.
12340 (add_process, remove_process, find_process_pid)
12341 (get_thread_process, current_process, initialize_inferiors): New.
12342 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12343 (struct target_waitstatus) <related_pid>: Ditto.
12344 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12345 return type to int.
12346 (struct target_ops) <join>: Add `pid' argument.
12347 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12348 (struct target_ops) <wait>: Add `ptid' field. Change return type
12349 to ptid.
12350 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12351 (mywait): Add `ptid' argument. Change return type to ptid_t.
12352 (target_pid_to_str): Declare.
12353 * target.c (set_desired_inferior): Adjust to use ptids.
12354 (mywait): Add new `ptid' argument. Adjust.
12355 (target_pid_to_str): New.
12356 * mem-break.h (free_all_breakpoints): Declare.
12357 * mem-break.c (breakpoints): Delelete.
12358 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12359 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12360 to use per-process breakpoint list.
12361 (free_all_breakpoints): New.
12362 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12363 (symbol_cache, all_symbols_looked_up): Delete.
12364 (hexchars): New.
12365 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12366 read_ptid): New.
12367 (prepare_resume_reply): Change ptid argument's type from unsigned
12368 long to ptid_t. Adjust. Implement W;process and X;process.
12369 (free_sym_cache, clear_symbol_cache): New.
12370 (look_up_one_symbol): Adjust to per-process symbol cache. *
12371 * server.c (cont_thread, general_thread, step_thread): Change type
12372 to ptid_t.
12373 (attached): Delete.
12374 (multi_process): New.
12375 (last_ptid): Change type to ptid_t.
12376 (struct vstop_notif) <ptid>: Change type to ptid_t.
12377 (queue_stop_reply, push_event): Change `ptid' argument's type to
12378 ptid_t.
12379 (discard_queued_stop_replies): Add `pid' argument.
12380 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12381 changes. Don't reference the `attached' global.
12382 (attach_inferior): Adjust to mywait interface changes.
12383 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12384 features. Handle and report "multiprocess+". Handle
12385 "qAttached:PID".
12386 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12387 changes.
12388 (handle_v_kill): New.
12389 (handle_v_stopped): Adjust to use target_pid_to_str.
12390 (handle_v_requests): Allow multiple attaches and runs when
12391 multiprocess extensions are in effect. Handle "vKill".
12392 (myresume): Adjust to use ptids.
12393 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12394 (handle_status): Adjust to discard_queued_stop_replies interface
12395 change.
12396 (first_thread_of, kill_inferior_callback)
12397 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12398 (main): Call initialize_inferiors. Adjust to use ptids, killing
12399 and detaching from all inferiors. Handle multiprocess packet
12400 variants.
12401 * linux-low.h: Include gdb_proc_service.h.
12402 (struct process_info_private): New.
12403 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12404 <lwpid_of>: Use ptid_get_lwp.
12405 (get_lwp_thread): Adjust.
12406 (struct lwp_info): Add `dead' member.
12407 (find_lwp_pid): Declare.
12408 * linux-low.c (thread_db_active): Delete.
12409 (new_inferior): Adjust comment.
12410 (inferior_pid): Delete.
12411 (linux_add_process): New.
12412 (handle_extended_wait): Adjust.
12413 (add_lwp): Change unsigned long to ptid.
12414 (linux_create_inferior): Add process to processes table. Adjust
12415 to use ptids. Don't set new_inferior here.
12416 (linux_attach_lwp): Rename to ...
12417 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12418 it. Adjust to use ptids.
12419 (linux_attach_lwp): New.
12420 (linux_attach): Add process to processes table. Don't set
12421 new_inferior here.
12422 (struct counter): New.
12423 (second_thread_of_pid_p, last_thread_of_process_p): New.
12424 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12425 multiple processes.
12426 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12427 processes. Remove process from process table.
12428 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12429 to multiple processes.
12430 (any_thread_of): New.
12431 (linux_detach): Add `pid' argument, and handle it. Remove process
12432 from processes table.
12433 (linux_join): Add `pid' argument. Handle it.
12434 (linux_thread_alive): Change unsighed long argument to ptid_t.
12435 Consider dead lwps as not being alive.
12436 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12437 threads we're not interested in.
12438 (same_lwp, find_lwp_pid): New.
12439 (linux_wait_for_lwp): Change `pid' argument's type from int to
12440 ptid_t. Adjust.
12441 (linux_wait_for_event): Rename to ...
12442 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12443 from int to ptid_t. Adjust.
12444 (linux_wait_for_event): New.
12445 (linux_wait_1): Add `ptid' argument. Change return type to
12446 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12447 that exit from the process table.
12448 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12449 Adjust.
12450 (mark_lwp_dead): New.
12451 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12452 stopping all threads, mark its main lwp as dead.
12453 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12454 ptids.
12455 (fetch_register, usr_store_inferior_registers)
12456 (regsets_fetch_inferior_registers)
12457 (regsets_store_inferior_registers, linux_read_memory)
12458 (linux_write_memory): Inline `inferior_pid'.
12459 (linux_look_up_symbols): Adjust to use per-process
12460 `thread_db_active'.
12461 (linux_request_interrupt): Adjust to use ptids.
12462 (linux_read_auxv): Inline `inferior_pid'.
12463 (initialize_low): Don't reference thread_db_active.
12464 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12465 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12466 (ps_getpid): Return the pid of the current inferior.
12467 * thread-db.c (proc_handle, thread_agent): Delete.
12468 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12469 per-process data.
12470 (find_one_thread): Change argument type to ptid_t. Adjust to
12471 per-process data.
12472 (maybe_attach_thread): Adjust to per-process data and ptids.
12473 (thread_db_find_new_threads): Ditto.
12474 (thread_db_init): Ditto.
12475 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12476 processes table. Adjust to use ptids.
12477 (spu_kill, spu_detach): Adjust interface. Remove process from
12478 processes table.
12479 (spu_join, spu_thread_alive): Adjust interface.
12480 (spu_wait): Adjust interface. Remove process from processes
12481 table. Adjust to use ptids.
12482 * win32-low.c (current_inferior_tid): Delete.
12483 (current_inferior_ptid): New.
12484 (debug_event_ptid): New.
12485 (thread_rec): Take a ptid. Adjust.
12486 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12487 (child_delete_thread): Ditto.
12488 (do_initial_child_stuff): Add `attached' argument. Add process to
12489 processes table.
12490 (child_fetch_inferior_registers, child_store_inferior_registers):
12491 Adjust.
12492 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12493 (win32_attach): Pass 1 to do_initial_child_stuff.
12494 (win32_kill): Adjust interface. Remove process from processes
12495 table.
12496 (win32_detach): Ditto.
12497 (win32_join): Adjust interface.
12498 (win32_thread_alive): Take a ptid.
12499 (win32_resume): Adjust to use ptids.
12500 (get_child_debug_event): Ditto.
12501 (win32_wait): Adjust interface. Remove exiting process from
12502 processes table.
12503
bd99dc85
PA
125042009-04-01 Pedro Alves <pedro@codesourcery.com>
12505
12506 Non-stop mode support.
12507
12508 * server.h (non_stop): Declare.
12509 (gdb_client_data, handler_func): Declare.
12510 (delete_file_handler, add_file_handler, start_event_loop):
12511 Declare.
12512 (handle_serial_event, handle_target_event, push_event)
12513 (putpkt_notif): Declare.
12514 * target.h (enum resume_kind): New.
12515 (struct thread_resume): Replace `step' field by `kind' field.
12516 (TARGET_WNOHANG): Define.
12517 (struct target_ops) <wait>: Add `options' argument.
12518 <supports_non_stop, async, start_non_stop>: New fields.
12519 (target_supports_non_stop, target_async): New.
12520 (start_non_stop): Declare.
12521 (mywait): Add `options' argument.
12522 * target.c (mywait): Add `options' argument. Print child exit
12523 notifications here.
12524 (start_non_stop): New.
12525 * server.c (non_stop, own_buf, mem_buf): New globals.
12526 (struct vstop_notif): New.
12527 (notif_queue): New global.
12528 (queue_stop_reply, push_event, discard_queued_stop_replies)
12529 (send_next_stop_reply): New.
12530 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12531 interface changes.
12532 (attach_inferior): In non-stop mode, don't wait for the target
12533 here.
12534 (handle_general_set): Handle QNonStop.
12535 (handle_query): When handling qC, return the current general
12536 thread, instead of the first thread of the list.
12537 (handle_query): If the backend supports non-stop mode, include
12538 QNonStop+ in the qSupported query response.
12539 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12540 and non-stop mode.
12541 (handle_v_attach, handle_v_run): Handle non-stop mode.
12542 (handle_v_stopped): New.
12543 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12544 (myresume): Adjust to use resume_kind. Handle non-stop.
12545 (queue_stop_reply_callback): New.
12546 (handle_status): Handle non-stop mode.
12547 (main): Clear non_stop flag on reconnection. Use the event-loop.
12548 Refactor serial protocol handling from here ...
12549 (process_serial_event): ... to this new function. When GDB
12550 selects any thread, select one here. In non-stop mode, wait until
12551 GDB acks all pending events before exiting.
12552 (handle_serial_event, handle_target_event): New.
12553 * remote-utils.c (remote_open): Install remote_desc in the event
12554 loop.
12555 (remote_close): Remove remote_desc from the event loop.
12556 (putpkt_binary): Rename to...
12557 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12558 (putpkt_binary): New as wrapper around putpkt_binary_1.
12559 (putpkt_notif): New.
12560 (prepare_resume_reply): In non-stop mode, don't change the
12561 general_thread.
12562 * event-loop.c: New.
12563 * Makefile.in (OBJ): Add event-loop.o.
12564 (event-loop.o): New rule.
12565
12566 * linux-low.h (pid_of): Moved here.
12567 (lwpid_of): New.
12568 (get_lwp_thread): Use lwpid_of.
12569 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12570 * linux-low.c (pid_of): Delete.
12571 (inferior_pid): Use lwpid_of.
12572 (linux_event_pipe): New.
12573 (target_is_async_p): New.
12574 (delete_lwp): New.
12575 (handle_extended_wait): Use lwpid_of.
12576 (add_lwp): Don't set lwpid field.
12577 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12578 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12579 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12580 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12581 first. Adjust to linux_wait_for_event interface changes. Use
12582 lwpid_of.
12583 (linux_detach): Don't delete the main lwp here.
12584 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12585 (status_pending_p): Don't consider explicitly suspended lwps.
12586 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12587 pointer. Add OPTIONS argument. Change return type to int. Use
12588 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12589 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12590 pointer. Add status pointer argument. Return a pid instead of a
12591 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12592 changes. In non-stop mode, don't switch to a random thread.
12593 (linux_wait): Rename to...
12594 (linux_wait_1): ... this. Add target_options argument, and handle
12595 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12596 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12597 clean exit and signal exit code. Don't stop all threads in
12598 non-stop mode. In all-stop mode, only stop all threads when
12599 reporting a stop to GDB. Handle explicit thread stop requests.
12600 (async_file_flush, async_file_mark): New.
12601 (linux_wait): New.
12602 (send_sigstop): Use lwpid_of.
12603 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12604 interface changes. In non-stop mode, don't switch to a random
12605 thread.
12606 (linux_resume_one_lwp): Use lwpid_of.
12607 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12608 (linux_resume_one_thread): ... this. Handle resume_stop. In
12609 non-stop mode, don't look for pending flag in all threads.
12610 (resume_status_pending_p): Don't consider explicitly suspended
12611 threads.
12612 (my_waitpid): Reimplement. Emulate __WALL.
12613 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12614 Use lwpid_of.
12615 (sigchld_handler, linux_supports_non_stop, linux_async)
12616 (linux_start_non_stop): New.
12617 (linux_target_ops): Register linux_supports_non_stop, linux_async
12618 and linux_start_non_stop.
12619 (initialize_low): Install SIGCHLD handler.
12620 * thread-db.c (thread_db_create_event, find_one_thread)
12621 (thread_db_get_tls_address): Use lwpid_of.
12622 * win32-low.c (win32_detach): Adjust to use resume_kind.
12623 (win32_wait): Add `options' argument.
12624 * spu-low.c (spu_resume): Adjust to use resume_kind.
12625 (spu_wait): Add `options' argument.
12626
5b1c542e
PA
126272009-04-01 Pedro Alves <pedro@codesourcery.com>
12628
12629 Decouple target code from remote protocol.
12630
12631 * target.h (enum target_waitkind): New.
12632 (struct target_waitstatus): New.
12633 (struct target_ops) <wait>: Return an unsigned long. Take a
12634 target_waitstatus pointer instead of a char pointer.
12635 (mywait): Likewise.
12636 * target.c (mywait): Change prototype to return an unsigned long.
12637 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12638 * server.h (thread_from_wait, old_thread_from_wait): Delete
12639 declarations.
12640 (prepare_resume_reply): Change prototype to take a
12641 target_waitstatus.
12642 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12643 (last_status, last_ptid): New.
12644 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12645 pid instead of a signal.
12646 (attach_inferior): Remove "status" and "signal" parameters.
12647 Adjust.
12648 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12649 not as an address.
12650 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12651 (handle_v_requests, myresume): Remove "status" and "signal"
12652 parameters. Adjust.
12653 (handle_status): New.
12654 (main): Delete local `status'. Adjust.
12655 * remote-utils.c: Include target.h.
12656 (prepare_resume_reply): Change prototype to take a
12657 target_waitstatus. Adjust.
12658
12659 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12660 interface.
12661 * spu-low.c (spu_wait): Adjust.
12662 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12663 Delete.
12664 (win32_wait): Adjust.
12665
2bd7c093
PA
126662009-04-01 Pedro Alves <pedro@codesourcery.com>
12667
12668 * target.h (struct thread_resume): Delete leave_stopped member.
12669 (struct target_ops): Add a `n' argument to the `resume' callback.
12670 * server.c (start_inferior): Adjust.
12671 (handle_v_cont, myresume): Adjust.
12672 * linux-low.c (check_removed_breakpoint): Adjust to resume
12673 interface change, and to removed leave_stopped field.
12674 (resume_ptr): Delete.
12675 (struct thread_resume_array): New.
12676 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12677 resume interface change.
12678 (linux_continue_one_thread, linux_queue_one_thread)
12679 (resume_status_pending_p): Check if the resume field is NULL
12680 instead of checking the leave_stopped member.
12681 (linux_resume): Adjust to the target resume interface change.
12682 * spu-low.c (spu_resume): Adjust to the target resume interface
12683 change.
12684 * win32-low.c (win32_detach, win32_resume): Ditto.
12685
c35fafde
PA
126862009-04-01 Pedro Alves <pedro@codesourcery.com>
12687
12688 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12689 flag.
12690 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12691 pending.
12692 (linux_continue_one_thread): Only preserve the stepping flag if
12693 there's a pending breakpoint.
12694
0a59d50b
PA
126952009-03-31 Pedro Alves <pedro@codesourcery.com>
12696
12697 * server.c (main): After the inferior having exited, call
12698 remote_close before exiting gdbserver.
12699
f04c6d38
TJB
127002009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12701
12702 Fix size of FPSCR in Power 7 processors.
12703 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12704 (PPC_FEATURE_HAS_DFP): New #define.
12705 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12706 size of the FPSCR.
12707
78e5cee6
PA
127082009-03-23 Pedro Alves <pedro@codesourcery.com>
12709
12710 * server.c (handle_query) Whitespace and formatting.
12711
1b3f6016
PA
127122009-03-22 Pedro Alves <pedro@codesourcery.com>
12713
12714 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12715 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12716 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12717 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12718 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12719 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12720 Makefile.in, configure.ac: Fix whitespace throughout.
12721 * configure: Regenerate.
12722
a07b2135
PA
127232009-03-22 Pedro Alves <pedro@codesourcery.com>
12724
12725 * inferiors.c (find_inferior): Make it safe for the callback
12726 function to delete the currently iterated inferior.
12727
67cc2626
PA
127282009-03-22 Pedro Alves <pedro@codesourcery.com>
12729
12730 * Makefile.in (linuw_low_h): Move higher.
12731 (thread-db.o): Depend on $(linux_low_h).
12732
54a0b537
PA
127332009-03-17 Pedro Alves <pedro@codesourcery.com>
12734
12735 Rename "process" to "lwp" throughout.
12736
12737 * linux-low.c (all_processes): Rename to...
12738 (all_lwps): ... this.
12739 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12740 (add_process): Rename to ...
12741 (add_lwp): ... this. Adjust.
12742 (linux_create_inferior): Adjust.
12743 (linux_attach_lwp): Adjust.
12744 (linux_attach): Adjust.
12745 (linux_kill_one_process): Rename to ...
12746 (linux_kill_one_lwp): ... this. Adjust.
12747 (linux_kill): Adjust.
12748 (linux_detach_one_process): Rename to ...
12749 (linux_detach_one_lwp): ... this. Adjust.
12750 (linux_detach): Adjust.
12751 (check_removed_breakpoint): Adjust.
12752 (status_pending_p): Adjust.
12753 (linux_wait_for_process): Rename to ...
12754 (linux_wait_for_lwp): ... this. Adjust.
12755 (linux_wait_for_event): Adjust.
12756 (send_sigstop): Adjust.
12757 (wait_for_sigstop): Adjust.
12758 (stop_all_processes): Rename to ...
12759 (stop_all_lwps): ... this.
12760 (linux_resume_one_process): Rename to ...
12761 (linux_resume_one_lwp): ... this. Adjust.
12762 (linux_set_resume_request, linux_continue_one_thread)
12763 (linux_queue_one_thread, resume_status_pending_p)
12764 (usr_store_inferior_registers, regsets_store_inferior_registers)
12765 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12766 Adjust.
12767 * linux-low.h (get_process): Rename to ...
12768 (get_lwp): ... this. Adjust.
12769 (get_thread_process): Rename to ...
12770 (get_thread_lwp): ... this. Adjust.
12771 (get_process_thread): Rename to ...
12772 (get_lwp_thread): ... this. Adjust.
12773 (struct process_info): Rename to ...
12774 (struct lwp_info): ... this.
12775 (all_processes): Rename to ...
12776 (all_lwps): ... this.
12777 * proc-service.c (ps_lgetregs): Adjust.
12778 * thread-db.c (thread_db_create_event, find_one_thread)
12779 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12780
0b16c5cf
PA
127812009-03-14 Pedro Alves <pedro@codesourcery.com>
12782
12783 * server.c (handle_query): Handle "qAttached".
12784
32de4b9d
NS
127852009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12786
12787 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12788 GPLv3, update license URL.
12789
2aecd87f
DE
127902009-03-01 Doug Evans <dje@google.com>
12791
93efd302 12792 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12793 (server_h): Add gdb_signals.h.
12794 (signals.o): Update.
12795 * server.h (target_signal_from_host,target_signal_to_host_p)
12796 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12797
86b1f9c5
PM
127982009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12799
12800 * remote-utils.c (getpkt): Also generate remote-debug
12801 information if noack_mode is set.
12802
4aa995e1
PA
128032009-02-06 Pedro Alves <pedro@codesourcery.com>
12804
12805 * server.c (handle_query): Report qXfer:siginfo:read and
12806 qXfer:siginfo:write as supported and handle them.
12807 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12808 * linux-low.c (linux_xfer_siginfo): New.
12809 (linux_target_ops): Set it.
12810
62709adf
PA
128112009-01-26 Pedro Alves <pedro@codesourcery.com>
12812
12813 * server.c (gdbserver_usage): Mention --remote-debug.
12814 (main): Accept '--remote-debug' switch.
12815
aef93bd7
DE
128162009-01-18 Doug Evans <dje@google.com>
12817
12818 * regcache.c (new_register_cache): No need to check result of xcalloc.
12819 * server.c (handle_search_memory): Back out calls to xmalloc,
12820 result is checked and error is returned to user upon failure.
12821 (handle_query): Ditto. Add more checks for result of malloc.
12822 (handle_v_cont): Check result of malloc, report error back to
12823 user upon failure.
12824 (handle_v_run): Ditto. Call freeargv.
12825 * server.h (freeargv): Declare.
12826 * utils.c (freeargv): New fn.
12827
54363045
DE
128282009-01-15 Doug Evans <dje@google.com>
12829
f626972c
DE
12830 * gdbreplay.c (perror_with_name): Make arg const char *.
12831 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12832 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12833 * utils.c (perror_with_name): Make arg const char *.
54363045 12834
18aae699
PA
128352009-01-14 Pedro Alves <pedro@codesourcery.com>
12836
12837 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12838 when handling a EXIT_PROCESS_DEBUG_EVENT.
12839
ff703abe
JB
128402009-01-06 Joel Brobecker <brobecker@adacore.com>
12841
12842 * gdbreplay.c (gdbreplay_version): Update copyright year.
12843 * server.c (gdbserver_version): Likewise.
12844
f21cc1a2 128452009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12846
12847 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12848 (handle_extended_wait): Improve comment.
0e21c1ec 12849
bca929d3
DE
128502008-12-13 Doug Evans <dje@google.com>
12851
12852 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12853 * server.h (ATTR_MALLOC): New macro.
12854 (xmalloc,xcalloc,xstrdup): Declare.
12855 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12856 * inferiors.c: Ditto.
12857 * linux-low.c: Ditto.
12858 * mem-break.c: Ditto.
12859 * regcache.c: Ditto.
12860 * remote-utils.c: Ditto.
12861 * server.c: Ditto.
12862 * target.c: Ditto.
12863 * win32-low.c: Ditto.
12864
97438e3f
DE
128652008-12-12 Doug Evans <dje@google.com>
12866
896c7fbb
DE
12867 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12868 in debugging printf.
12869
97438e3f
DE
12870 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12871
e3b886f8
DE
128722008-12-09 Doug Evans <dje@google.com>
12873
12874 * linux-low.h (struct process_info): Delete member tid, unused.
12875 * thread-db.c (find_one_thread): Update.
12876 (maybe_attach_thread): Update.
12877
07e059b5
VP
128782008-12-02 Pedro Alves <pedro@codesourcery.com>
12879
889bf7c5
PA
12880 * target.h (struct target_ops): Add qxfer_osdata member.
12881 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12882 and dirent.h.
12883 (linux_qxfer_osdata): New functions.
12884 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12885 callback.
12886 * server.c (handle_query): Handle "qXfer:osdata:read:".
12887 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12888 (buffer_xml_printf): New functions.
12889 * server.h (struct buffer): New.
12890 (buffer_grow_str, buffer_grow_str0): New macros.
12891 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12892 (buffer_xml_printf): Declare.
07e059b5 12893
4cab47ab
DE
128942008-11-24 Doug Evans <dje@google.com>
12895
12896 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12897
f142445f
DJ
128982008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12899
12900 * server.c (handle_v_run): Always use the supplied argument list.
12901
d0107bb6 129022008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12903
d0107bb6
BW
12904 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12905 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12906
2c4ad781
TJB
129072008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12908
12909 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12910 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12911 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12912 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12913 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12914 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12915 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12916 XML target descriptions.
12917 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12918 when inferior is running on an ISA 2.05 or later processor. Add
12919 special case to return offset for full 64-bit slot of FPSCR when
12920 in 32-bits.
12921
dfb64f85
DJ
129222008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12923
12924 * Makefile.in (SFILES, clean): Added sparc64 files.
12925 (reg-sparc64.o, reg-sparc64.c): New.
12926 * configure.srv (sparc*-*-linux*): New configuration.
12927 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12928 syscall arguments for SPARC.
12929 (regsets_store_inferior_registers): Likewise.
12930 * linux-sparc-low.c: New file.
12931
66b6e1dd
DE
129322008-10-21 Doug Evans <dje@google.com>
12933
12934 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12935 (READLINE_DIR,READLINE_DEP): Delete.
12936 (INTERNAL_CFLAGS): Update.
12937 (LINTFLAGS): Update.
12938
9b710a42
PA
129392008-10-10 Pedro Alves <pedro@codesourcery.com>
12940
12941 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12942 whole argv from the last run, not just argv[0].
12943
5822d809
PA
129442008-09-08 Pedro Alves <pedro@codesourcery.com>
12945
12946 * regcache.c (new_register_cache): Return NULL if the register
12947 cache size isn't known yet.
12948 (free_register_cache): Avoid dereferencing a NULL regcache.
12949
74aac56f
DJ
129502008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12951
12952 * configure.srv: Merge MIPS and MIPS64.
12953
400b20f5
MR
129542008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12955
12956 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12957
677c5bb1
LM
129582008-08-18 Luis Machado <luisgpm@br.ibm.com>
12959
12960 * Makefile.in: Add required vsx dependencies.
12961
12962 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12963 Declare init_registers_powerpc_vsx32l.
12964 Declare init_registers_powerpc_vsx64l.
12965 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12966 (ppc_arch_setup): Check for VSX in hwcap.
12967 (ppc_fill_vsxregset): New function.
12968 (ppc_store_vsxregset): New function.
12969 Add new VSX entry in regset_info target_regsets.
12970
12971 * configure.srv: Add new VSX dependencies.
12972
a6f3e723
SL
129732008-08-12 Pedro Alves <pedro@codesourcery.com>
12974
12975 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12976 (remote_open): Set or clear transport_is_reliable.
12977 (putpkt_binary): Don't expect acks in noack mode.
12978 (getpkt): Don't send ack/nac in noack mode.
12979 * server.c (handle_general_set): Handle QStartNoAckMode.
12980 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12981 qSupported.
12982 (main): Reset noack_mode on every connection.
12983 * server.h (noack_mode): Declare.
12984
a417dc56
RW
129852008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12986
12987 * Makefile.in (GDBREPLAY_OBS): New variable.
12988 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12989
3221518c
UW
129902008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12991 Daniel Jacobowitz <dan@codesourcery.com>
12992
12993 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12994 (usr_store_inferior_registers): Likewise.
12995 (regsets_store_inferior_registers): Likewise.
12996
ec56be1b
PA
129972008-07-31 Rolf Jansen <rj@surtec.com>
12998 Pedro Alves <pedro@codesourcery.com>
12999
13000 * configure.ac: Check for memmem declaration.
13001 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13002 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13003 (disable_packet_qfThreadInfo): Unconditionally compile.
13004 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13005 * configure, config.in: Regenerate.
13006
2fe5e3ff
DE
130072008-07-28 Doug Kwan <dougkwan@google.com>
13008
13009 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13010 (linux_write_memory): Remove declaration of errno.
13011
836acd6d
UW
130122008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13013
13014 * linux-low.c (handle_extended_wait): Do not use "status"
13015 variable uninitialized.
13016
aeba519e
PA
130172008-07-07 Pedro Alves <pedro@codesourcery.com>
13018
13019 * server.c (handle_v_attach): Inhibit reporting dll changes.
13020
db42f210
PA
130212008-06-27 Pedro Alves <pedro@codesourcery.com>
13022
13023 * remote-utils.c (prepare_resume_reply): If requested, don't
13024 output "thread:TID" in the T stop reply.
13025
13026 * server.c (disable_packet_vCont, disable_packet_Tthread)
13027 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13028 (handle_query): If requested, disable support for qC, qfThreadInfo
13029 and qsThreadInfo.
13030 (handle_v_requests): If requested, disable support for vCont.
13031 (gdbserver_show_disableable): New.
13032 (main): Handle --disable-packet and --disable-packet=LIST.
13033
13034 * server.h (disable_packet_vCont, disable_packet_Tthread)
13035 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13036
8e4c5421
CD
130372008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13038
13039 * server.c (gdbserver_usage): Mention --version.
13040
6e23a804
DJ
130412008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13042
13043 * Makefile.in (gdbreplay.o): New rule.
13044
90aa6a40
JM
130452008-06-06 Joseph Myers <joseph@codesourcery.com>
13046
13047 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13048 message, not gdbserver.
13049
c16158bc 130502008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13051 Nathan Sidwell <nathan@codesourcery.com>
13052 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13053
13054 * acinclude.m4: Include ../../config/acx.m4.
13055 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13056 * configure, config.in: Regenerate.
13057 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13058 * server.c (gdbserver_version): Print PKGVERSION.
13059 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13060 (main): Adjust gdbserver_usage calls.
13061 * gdbreplay.c (version, host_name): Add declarations.
13062 (gdbreplay_version, gdbreplay_usage): New.
13063 (main): Accept --version and --help options.
13064
aeb75bf5
DJ
130652008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13066
13067 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13068 (arm_breakpoint_at): Handle Thumb.
13069 (the_low_target): Add comment.
13070
76b233dd
UW
130712008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13072
13073 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13074
08388c79
DE
130752008-05-09 Doug Evans <dje@google.com>
13076
a3c83fae
DE
13077 * server.h (decode_search_memory_packet): Declare.
13078 * remote-utils.c (decode_search_memory_packet): New fn.
13079 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13080 (handle_search_memory): New fn.
13081 (handle_query): Process qSearch:memory packets.
13082
bb9c3d36
UW
130832008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13084
13085 * regcache.c (registers_length): Remove.
13086 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13087 full register packet.
13088 * regcache.h (registers_length): Remove prototype.
13089 * server.h (PBUFSIZ): Define to 16384.
13090
7284e1be
UW
130912008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13092
13093 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13094 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13095 powerpc-64l.o, and powerpc-altivec64l.o.
13096 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13097 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13098 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13099 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13100 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13101 to srv_xmlfiles.
13102
13103 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13104 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13105 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13106 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13107 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13108 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13109 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13110 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13111 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13112 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13113 (clean): Update.
13114
13115 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13116 (init_registers_powerpc_32l): ... this new prototype.
13117 (init_registers_powerpc_32): Remove, replace by ...
13118 (init_registers_powerpc_altivec32l): ... this new prototype.
13119 (init_registers_powerpc_e500): Remove, replace by ...
13120 (init_registers_powerpc_e500l): ... this new prototype.
13121 (init_registers_ppc64): Remove, replace by ...
13122 (init_registers_powerpc_64l): ... this new prototype.
13123 (init_registers_powerpc_64): Remove, replace by ...
13124 (init_registers_powerpc_altivec64l): ... this new prototype.
13125 (ppc_num_regs): Set to 73.
13126 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13127 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13128 (ppc_cannot_store_register): Handle orig_r3 and trap.
13129 (ppc_arch_setup): Update init_registers_... calls.
13130 (ppc_fill_gregset): Handle orig_r3 and trap.
13131
13132 * inferiors.c (clear_inferiors): Reset current_inferior.
13133
fdc59709
PB
131342008-04-23 Paolo Bonzini <bonzini@gnu.org>
13135
889bf7c5
PA
13136 * acinclude.m4: Add override.m4.
13137 * configure: Regenerate.
fdc59709 13138
c9b2f845
UW
131392008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13140
13141 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13142 initial call to init_register_ppc64.
13143
550512b8
UW
131442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13145
43aaf8b6
PA
13146 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13147 single powerpc*-*-linux* case.
550512b8
UW
13148 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13149
b6430ec3
UW
131502008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13151
13152 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13153 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13154 from reg_xmlfiles.
13155 * linux-ppc-low.c: Include <elf.h>.
13156 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13157 (ppc_hwcap): New global variable.
13158 (ppc_regmap): Remove __SPE__ #ifdef sections.
13159 (ppc_regmap_e500): New global variable.
13160 (ppc_cannot_store_register): Update __SPE__ special case.
13161 (ppc_get_hwcap): New function.
13162 (ppc_arch_setup): Use it to determine whether inferior supports
13163 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13164 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13165 Do not access registers if target does not support AltiVec.
13166 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13167 Do not access registers if target does not support SPE.
13168 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13169
52fa2412
UW
131702008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13171
13172 * linux-low.c (disabled_regsets, num_regsets): New.
13173 (use_regsets_p): Delete.
13174 (linux_wait_for_process): Clear disabled_regsets.
13175 (regsets_fetch_inferior_registers): Check and set it.
13176 (regsets_store_inferior_registers): Likewise.
13177 (linux_fetch_registers, linux_store_registers): Do not use
13178 use_regsets_p.
13179 (initialize_low): Allocate disabled_regsets.
13180
e28b3332
DJ
131812008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13182
13183 * Makefile.in (LIBOBJS): New.
13184 (OBS): Use LIBOBJS.
13185 (memmem.o): New rule.
13186 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13187 * configure: Regenerated.
13188
4536995d
UW
131892008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13190
13191 * server.c (handle_query): Never return "unsupported" for
13192 qXfer:features:read queries.
13193
221c031f
UW
131942008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13195
13196 * server.c (get_features_xml): Fix inverted condition.
13197 (handle_query): Always support qXfer:feature:read.
13198
ccd213ac
DJ
131992008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13200
13201 * server.c (wrapper_argv): New.
13202 (start_inferior): Handle wrapper_argv. If set, expect an extra
13203 trap.
13204 (gdbserver_usage): Document --wrapper.
13205 (main): Parse --wrapper.
13206
6fe305f7
UW
132072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13208
13209 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13210 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13211 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13212 (ppc_set_pc): Likewise.
13213 (ppc_arch_setup): New function.
13214 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13215 of collect_register.
889bf7c5 13216 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13217
5b0a002e
UW
132182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13219
13220 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13221 instead of linux-ppc64-low.o.
13222 * linux-ppc64-low.c: Remove file.
13223 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13224 (linux-ppc64-low.o): Remove rule.
13225
13226 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13227 (init_registers_powerpc_64): Likewise.
13228 (ppc_regmap): Conditionally define depending on __powerpc64__.
13229 (ppc_cannot_store_register): Do not special-case "fpscr" when
13230 compiled on __powerpc64__.
13231 (ppc_collect_ptrace_register): New function.
13232 (ppc_supply_ptrace_register): New function.
13233 (ppc_breakpoint): Change type to "unsigned int".
13234 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13235 (the_low_target): Conditionally provide initializers for the
889bf7c5 13236 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13237 collect_ptrace_register and supply_ptrace_register members.
13238
9b4b61c8
UW
132392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13240
13241 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13242 * server.c (gdbserver_xmltarget): Define.
13243 (get_features_xml): Use it to replace "target.xml" and arch_string.
13244
13245 * configure.srv: Remove srv_xmltarget. Add XML files that were
13246 mentioned there to srv_xmlfiles instead. Remove conditional tests
13247 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13248 srv_xmlfiles and srv_regobj to include all possible choices.
13249 * configure.ac (srv_xmltarget): Remove.
13250 (srv_xmlfiles): Do not add "target.xml".
13251 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13252 checks for supplementary target information.
13253 * configure: Regenerate.
13254 * Makefile.in (XML_TARGET): Remove.
13255 (target.xml): Remove rule.
13256 (clean): Do not clean up target.xml.
13257 (.PRECIOUS): Do not mention target.xml.
13258
13259 * target.h (struct target_ops): Remove arch_string member.
13260 * linux-low.c (linux_arch_string): Remove.
13261 (linux_target_ops): Remove arch_string initializer.
13262 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13263 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13264 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13265 * spu-low.c (spu_arch_string): Remove.
13266 (spu_target_ops): Remove arch_string initializer.
13267 * win32-low.c (win32_arch_string): Remove.
13268 (win32_target_ops): Remove arch_string initializer.
13269 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13270 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13271 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13272
ee1a7ae4
UW
132732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13274
13275 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13276 by collect_ptrace_register and supply_ptrace_register hooks.
13277 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13278 instead of checking for the_low_target.left_pad_xfer.
13279 (usr_store_inferior_registers): Use collect_ptrace_register callback
13280 instead of checking for the_low_target.left_pad_xfer.
13281
13282 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13283 (s390_supply_ptrace_register): Likewise.
13284 (s390_fill_gregset): Call s390_collect_ptrace_register.
13285 (the_low_target): Update.
13286
13287 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13288 (ppc_supply_ptrace_register): Likewise.
13289 (the_low_target): Update.
13290
13291 * linux-i386-low.c (the_low_target): Update.
13292 * linux-x86-64-low.c (the_low_target): Update.
13293
d61ddec4
UW
132942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13295
13296 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13297 reg-s390.o and reg-s390x.o.
13298
13299 * linux-low.c (new_inferior): New global variable.
13300 (linux_create_inferior, linux_attach): Set it.
13301 (linux_wait_for_process): Call the_low_target.arch_setup after the
13302 target has stopped for the first time.
13303 (initialize_low): Do not call the_low_target.arch_setup.
13304
13305 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13306 (s390_set_pc): Likewise.
13307 (s390_arch_setup): New function.
13308 (the_low_target): Use s390_arch_setup as arch_setup routine.
13309
13310 * regcache.c (realloc_register_cache): New function.
13311 (set_register_cache): Call it for each existing regcache.
13312
d05b4ac3
UW
133132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13314
13315 * server.h (init_registers): Remove prototype.
13316
13317 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13318 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13319 instead of init_registers ().
13320 * linux-arm-low.c (init_registers_arm): Add prototype.
13321 (init_registers_arm_with_iwmmxt): Likewise.
13322 (the_low_target): Add initializer for arch_setup field.
13323 * linux-cris-low.c (init_registers_cris): Add prototype.
13324 (the_low_target): Add initializer for arch_setup field.
13325 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13326 (the_low_target): Add initializer for arch_setup field.
13327 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13328 (the_low_target): Add initializer for arch_setup field.
13329 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13330 (the_low_target): Add initializer for arch_setup field.
13331 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13332 (the_low_target): Add initializer for arch_setup field.
13333 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13334 (the_low_target): Add initializer for arch_setup field.
13335 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13336 (init_registers_mips64_linux): Likewise.
13337 (the_low_target): Add initializer for arch_setup field.
13338 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13339 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13340 (the_low_target): Add initializer for arch_setup field.
13341 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13342 (init_registers_powerpc_64): Likewise.
13343 (the_low_target): Add initializer for arch_setup field.
13344 * linux-s390-low.c (init_registers_s390): Add prototype.
13345 (init_registers_s390x): Likewise.
13346 (the_low_target): Add initializer for arch_setup field.
13347 * linux-sh-low.c (init_registers_sh): Add prototype.
13348 (the_low_target): Add initializer for arch_setup field.
13349 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13350 (the_low_target): Add initializer for arch_setup field.
13351 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13352 (the_low_target): Add initializer for arch_setup field.
13353
13354 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13355 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13356 instead of init_registers ().
13357 * win32-arm-low.c (init_registers_arm): Add prototype.
13358 (the_low_target): Add initializer for arch_setup field.
13359 * win32-i386-low.c (init_registers_i386): Add prototype.
13360 (the_low_target): Add initializer for arch_setup field.
13361
13362 * spu-low.c (init_registers_spu): Add prototype.
13363 (initialize_low): Call initialie_registers_spu () instead of
13364 initialize_registers ().
13365
fd96d250
PA
133662008-02-19 Pedro Alves <pedro@codesourcery.com>
13367
13368 * server.c (handle_v_requests): When handling the vRun and vAttach
13369 packets, if already debugging a process, don't kill it. Return an
13370 error instead.
13371
d41b6bb4
DJ
133722008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13373
13374 * server.c (handle_query): Correct length check.
13375
5ac588cf
PA
133762008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13377
13378 * win32-low.c (do_initial_child_stuff): Add process handle
13379 parameter. Set current_process_handle and current_process_id from the
13380 parameters. Clear globals.
13381 (win32_create_inferior): Don't set current_process_handle and
13382 current_process_id here. Instead pass them on the call to
13383 do_initial_child_stuff.
13384 (win32_attach): Likewise.
13385 (win32_clear_inferiors): New.
13386 (win32_kill): Don't close the current process handle or the
13387 current thread handle here. Instead call win32_clear_inferiors.
13388 (win32_detach): Don't open a new handle to the process. Call
13389 win32_clear_inferiors.
13390 (win32_join): Don't rely on current_process_handle; open a new
13391 handle using the process id.
13392 (win32_wait): Call win32_clear_inferiors when the inferior process
13393 has exited.
13394
ecd7ecbc
DJ
133952008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * server.c (monitor_show_help): Add "exit".
13398
1525d545
MG
133992008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13400
ecd7ecbc 13401 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13402 (clean): Add reg-xtensa.c.
13403 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13404 * configure.srv (xtensa*-*-linux*) New target.
13405 * linux-xtensa-low.c: New.
13406 * xtensa-xtregs.c: New.
1525d545 13407
59a016f0
PA
134082008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13409
13410 * hostio.c: Don't include errno.h.
13411 (errno_to_fileio_errno): Move to hostio-errno.
13412 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13413 error number outputting to the target->hostio_last_error callback.
13414 (hostio_packet_error): Use FILEIO_EINVAL directly.
13415 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13416 calls to hostio_error.
13417 * hostio-errno.c: New.
13418 * server.h (hostio_last_error_from_errno): Declare.
13419 * target.h (target_ops): Add hostio_last_error member.
13420 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13421 as hostio_last_error handler.
889bf7c5 13422 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13423 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13424 (wince_hostio_last_error): New functions.
13425 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13426 as hostio_last_error handler.
13427 (win32_target_ops) [!_WIN32_WCE]: Register
13428 hostio_last_error_from_errno as hostio_last_error handler.
13429 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13430 (hostio-errno.o): New rule.
13431 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13432 * configure.srv (srv_hostio_err_objs): New variable. Default to
13433 hostio-errno.o.
13434 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13435 * configure: Regenerate.
13436
2d717e4f
DJ
134372008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13438
13439 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13440 (linux_kill, linux_detach): Clean up the process list.
13441 * remote-utils.c (remote_open): Improve port number parsing.
13442 (putpkt_binary, input_interrupt): Only send interrupts if the target
13443 is running.
13444 * server.c (extended_protocol): Make static.
13445 (attached): Define earlier.
13446 (exit_requested, response_needed, program_argv): New variables.
13447 (target_running): New.
13448 (start_inferior): Clear attached here.
13449 (attach_inferior): Set attached here.
13450 (require_running): Define.
13451 (handle_query): Use require_running and target_running. Implement
13452 "monitor exit".
13453 (handle_v_attach, handle_v_run): New.
13454 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13455 (gdbserver_usage): Update.
13456 (main): Redo argument parsing. Handle --debug and --multi. Handle
13457 --attach along with other options or after the port. Save
13458 program_argv. Support no initial program. Resynchronize
13459 communication with GDB after an error. Handle "monitor exit".
13460 Use require_running and target_running. Always allow the extended
13461 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13462 restart in extended mode.
13463 * README: Refer to the GDB manual. Update --attach usage.
13464
7407e2de
AS
134652007-12-20 Andreas Schwab <schwab@suse.de>
13466
13467 * linux-low.c (STACK_SIZE): Define.
13468 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13469 (linux_test_for_tracefork): Likewise.
13470
b65d95c5
DJ
134712007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13472
13473 * linux-low.c (linux_wait_for_event): Update messages. Do not
13474 reinsert auto-delete breakpoints.
13475 * mem-break.c (struct breakpoint): Change return type of handler to
13476 int.
13477 (set_breakpoint_at): Update handler type.
13478 (reinsert_breakpoint_handler): Return 1 instead of calling
13479 delete_breakpoint.
13480 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13481 setting a new one.
13482 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13483 * mem-break.h (set_breakpoint_at): Update handler type.
13484 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13485 * win32-low.c (auto_delete_breakpoint): New.
13486 (get_child_debug_event): Use it.
13487
4e799345
DJ
134882007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13489
13490 * configure.ac: Check for pread and pwrite.
13491 * hostio.c (handle_pread): Fall back to lseek and read.
13492 (handle_pwrite): Fall back to lseek and write.
13493 * config.in, configure: Regenerated.
13494
27524b67
DJ
134952007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13496
13497 * server.c (myresume): Add own_buf argument.
13498 (main): Update calls.
13499
a20d5e98
DJ
135002007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13501
13502 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13503 * remote-utils.c (remote_open): Do not call disable_async_io.
13504 (block_async_io): Delete.
13505 (unblock_async_io): Make static.
13506 (initialize_async_io): New.
13507 * server.c (handle_v_cont): Handle async I/O here.
13508 (myresume): Likewise. Move other common resume tasks here...
13509 (main): ... from here. Call initialize_async_io. Disable async
13510 I/O before the main loop.
13511 * server.h (initialize_async_io): Declare.
13512 (block_async_io, unblock_async_io): Delete prototypes.
13513 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13514
b79d787e
DJ
135152007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13516
13517 * remote-utils.c (readchar): Allow binary data in received messages.
13518
d97903b2
PA
135192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13520
13521 * win32-low.c (attaching): New global.
13522 (win32_create_inferior): Clear the `attaching' global.
13523 (win32_attach): Set the `attaching' global.
13524 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13525 attaching. Only set a breakpoint at the entry point if not
13526 attaching.
13527
311de423
PA
135282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13529
13530 * server.c (main): Don't report dll events on the initial
13531 connection on attaches.
13532
6c2d16d2
PA
135332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13534
13535 * server.c (main): Relax numerical bases supported for the pid of
13536 the --attach command line argument.
13537
5ca906e6
PA
135382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13539
13540 * win32-low.c (win32_attach): Call OpenProcess before
13541 DebugActiveProcess, not after. Add last error output to error
13542 call.
13543
9c6c8194
PA
135442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13545
13546 * win32-low.c (win32_get_thread_context)
13547 (win32_set_thread_context): New functions.
13548 (thread_rec): Use win32_get_thread_context.
13549 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13550 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13551 field.
13552
4d5d1aaa
PA
135532007-12-03 Leo Zayas
13554 Pedro Alves <pedro_alves@portugalmail.pt>
13555
13556 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13557 global variables.
13558 (child_add_thread): Minor cleanup.
13559 (child_continue): Resume artificially suspended threads before
13560 calling ContinueDebugEvent.
13561 (suspend_one_thread): New.
13562 (fake_breakpoint_event): New.
13563 (get_child_debug_event): Change return type to int. Check here if
13564 gdb sent an interrupt request. If a soft interrupt was requested,
13565 fake a breakpoint event. Return 0 if there is no event to handle,
13566 and 1 otherwise.
13567 (win32_wait): Don't check here if gdb sent an interrupt request.
13568 Ensure there is a valid event to handle.
13569 (win32_request_interrupt): Add soft interruption method as last
13570 resort.
13571
c436e841
PA
135722007-12-03 Leo Zayas
13573 Pedro Alves <pedro_alves@portugalmail.pt>
13574
13575 * win32-low.h (win32_thread_info): Add descriptions to the
13576 structure members. Replace `suspend_count' counter by a
13577 `suspended' flag.
13578 * win32-low.c (thread_rec): Update condition of when to get the
13579 context from the inferior. Rely on ContextFlags being set if it
13580 has already been retrieved. Only suspend the inferior thread if
13581 we haven't already. Warn if that fails.
13582 (continue_one_thread): s/suspend_count/suspended/. Only call
13583 ResumeThread once. Warn if that fails.
13584
e7b5fa67
PA
135852007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13586
13587 * win32-low.c (win32_wait): Don't read from the inferior when it
13588 has already exited.
13589
a385171d
PA
135902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13591
13592 * Makefile.in (win32_low_h): New variable.
13593 (win32-low.o): Add dependency on $(win32_low_h).
13594 (win32-arm-low.o, win32-i386-low.o): New rules.
13595
f80c84b3
DJ
135962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13597
13598 * hostio.c: Correct copyright year.
13599
a6b151f1
DJ
136002007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13601
13602 * Makefile.in (OBS): Add hostio.o.
13603 (hostio.o): New rule.
13604 * server.h (handle_vFile): Declare.
13605 * hostio.c: New file.
13606 * server.c (handle_v_requests): Take packet_len and new_packet_len
13607 for binary packets. Call handle_vFile.
13608 (main): Update call to handle_v_requests.
13609
f9387fc3
DJ
136102007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13611
13612 * linux-low.c: Include <sched.h>.
13613
51c2684e
DJ
136142007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * linux-low.c (linux_tracefork_grandchild): New.
13617 (linux_tracefork_child): Use clone.
13618 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13619
75f83163
JB
136202007-10-31 Joel Brobecker <brobecker@adacore.com>
13621
13622 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13623
da5898ce
DJ
136242007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13627
24a09b5f
DJ
136282007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13629
13630 * inferiors.c (change_inferior_id): Delete.
13631 (add_pid_to_list, pull_pid_from_list): New.
13632 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13633 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13634 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13635 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13636 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13637 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13638 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13639 (using_threads): Always set to 1.
13640 (handle_extended_wait): New.
13641 (add_process): Do not set TID.
13642 (linux_create_inferior): Set must_set_ptrace_flags.
13643 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13644 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13645 (linux_thread_alive): Rename TID argument to LWPID.
13646 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13647 (linux_wait_for_event): Do not use TID or check using_threads. Update
13648 call to dead_thread_notify. Call handle_extended_wait.
13649 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13650 (send_sigstop): Delete sigstop_sent.
13651 (wait_for_sigstop): Avoid TID.
13652 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13653 (linux_test_for_tracefork): New.
13654 (linux_lookup_signals): Use thread_db_active and
13655 linux_supports_tracefork_flag.
13656 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13657 * linux-low.h (get_process_thread): Avoid TID.
13658 (struct process_ifo): Move thread_known and tid to the end. Remove
13659 sigstop_sent.
13660 (linux_attach_lwp, thread_db_init): Update prototypes.
13661 * server.h (change_inferior_id): Delete prototype.
13662 (add_pid_to_list, pull_pid_from_list): New prototypes.
13663 * thread-db.c (thread_db_use_events): New.
13664 (find_first_thread): Rename to...
13665 (find_one_thread): ...this. Update callers and messages. Do not
13666 call fatal. Check thread_db_use_events. Do not call
13667 change_inferior_id or new_thread_notify.
13668 (maybe_attach_thread): Update. Do not call new_thread_notify.
13669 (thread_db_init): Set thread_db_use_events. Check use_events.
13670 * utils.c (fatal, warning): Correct message prefix.
13671
30ed0a8f
DJ
136722007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13673
13674 * Makefile.in (clean): Remove new files.
13675 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13676 (powerpc-64.o, powerpc-64.c): New rules.
13677 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13678 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13679 with SPE.
13680 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13681 SPE targets.
13682 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13683 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13684 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13685 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13686 (target_regsets): Add AltiVec and SPE register sets.
13687 * configure.ac: Check for AltiVec and SPE.
13688 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13689 (ppc_fill_vrregset, ppc_store_vrregset): New.
13690 (target_regsets): Add AltiVec register set.
13691 * configure: Regenerated.
13692
fd462a61
DJ
136932007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13694
13695 * linux-low.c (O_LARGEFILE): Define.
13696 (linux_read_memory): Use /proc/PID/mem.
13697 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13698 * configure, config.in: Regenerated.
13699
69f223ed
DJ
137002007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13701
13702 * linux-low.c (linux_wait_for_event): Do not pass signals while
13703 single-stepping.
13704
aec18585
PA
137052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13706
13707 * win32-low.c (create_process): New.
13708 (win32_create_inferior): Use create_process instead of
13709 CreateProcess. If create_process failed retry appending an ".exe"
13710 suffix. Store the GetLastError result immediatelly after
13711 create_process calls and use it on the call to error.
13712
34d86ddd
PA
137132007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13716
5a0e3bd0
JB
137172007-08-23 Joel Brobecker <brobecker@adacore.com>
13718
13719 * configure.ac: Switch license to GPLv3.
13720
f88c79e6
MS
137212007-08-01 Michael Snyder <msnyder@access-company.com>
13722
13723 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13724
6b3d9b83
PA
137252007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13726
13727 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13728 typedef.
13729 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13730 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13731 CloseToolhelp32Snapshot.
13732 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13733 CloseToolhelp32Snapshot.
13734
c588c53c
MS
137352007-07-27 Michael Snyder <michael.snyder@access-company.com>
13736
13737 * server.c (main): Check for inferior exit before main loop.
13738
aa0403d9
PA
137392007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13740
13741 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13742 instead of on tmp_desc.
13743
255e7678
DJ
137442007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13745 Daniel Jacobowitz <dan@codesourcery.com>
13746
13747 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13748 (add_thread): Minor cleanups.
13749 (clear_inferiors): Move lower in the file. Clear the DLL
13750 list.
13751 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13752 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13753 (xml_escape_text): New.
13754 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13755 for qSupported.
13756 (handle_v_cont): Report errors.
13757 (gdbserver_version): Update.
13758 (main): Correct size of own_buf. Do not report initial DLL events.
13759 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13760 (unloaded_dll, xml_escape_text): New.
13761 * win32-low.c (enum target_waitkind): Update comments.
13762 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13763 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13764 (win32_EnumProcessModules, win32_GetModuleInformation)
13765 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13766 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13767 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13768 (win32_Module32First, win32_Module32Next, load_toolhelp)
13769 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13770 (get_child_debug_event): Handle DLL events.
13771 (win32_wait): Likewise.
13772
0d37add9
DJ
137732007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13774
13775 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13776 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13777
45e2715e
PA
137782007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13779
13780 * win32-low.c (handle_output_debug_string): Ignore event if not
13781 waiting.
13782
c5674cf1
PA
137832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13784
13785 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13786
2bbe3cc1
DJ
137872007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13788
13789 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13790
ae13219e
DJ
137912007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13792
13793 * inferiors.c (change_inferior_id): Add comment.
13794 * linux-low.c (check_removed_breakpoint): Add an early
13795 prototype. Improve debug output.
13796 (linux_attach): Doc update.
13797 (linux_detach_one_process, linux_detach): Clean up before releasing
13798 each process.
13799 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13800 * linux-low.h (struct process_info): Doc improvement.
13801 * mem-break.c (delete_all_breakpoints): New.
13802 * mem-break.h (delete_all_breakpoints): New prototype.
13803 * thread-db.c (find_first_thread): New.
13804 (thread_db_create_event): Call it instead of
13805 thread_db_find_new_threads. Clean up unused variables.
13806 (maybe_attach_thread): Remove first thread handling.
13807 (thread_db_find_new_threads): Use find_first_thread.
13808 (thread_db_get_tls_address): Likewise.
13809
4105de34
DJ
138102007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13811
13812 * thread-db.c (thread_db_find_new_threads): Add prototype.
13813 (thread_db_create_event): Check for the main thread before adding
13814 a new thread.
13815 (maybe_attach_thread): Only enable event reporting if TID == 0.
13816 (thread_db_get_tls_address): Check for new threads.
13817
2b876972
DJ
138182007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * linux-low.c (linux_create_inferior): Try execv before execvp.
13821 * spu-low.c (spu_create_inferior): Likewise.
13822
7a245884
DJ
138232007-06-13 Mike Frysinger <vapier@gentoo.org>
13824
13825 * linux-low.c (linux_create_inferior): Change execv to execvp.
13826 * spu-low.c (spu_create_inferior): Likewies.
13827
117ce543
DJ
138282007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * Makefile.in (clean): Clean new files instead of deleted ones.
13831 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13832 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13833 rules.
13834 * configure.srv: Specify XML files and new regformats for MIPS and
13835 MIPS64 GNU/Linux.
13836 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13837 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13838 an entry for the restart register.
13839 (mips_cannot_fetch_register, mips_cannot_store_register)
13840 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13841 register names to match the XML descriptions.
13842 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13843 restart register instead of $0.
13844
0e7f50da
UW
138452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13846 Markus Deuling <deuling@de.ibm.com>
13847
13848 * remote-utils.c (decode_xfer_write): New function.
13849 * server.h (decode_xfer_write): Add prototype.
13850 * server.c (handle_query): Add PACKET_LEN argument. Support
13851 qXfer:spu:read and qXfer:spu:write packets.
13852 (main): Pass packet_len to handle_query.
13853 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13854 * target.h (target_ops): Add qxfer_spu.
13855
374c1d38
UW
138562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13857
13858 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13859 accessing non-seekable spufs files.
13860
bb63802a
UW
138612007-05-16 Markus Deuling <deuling@de.ibm.com>
13862
889bf7c5 13863 * server.c (handle_query): Add reply for qC packet.
bb63802a 13864
7390519e
PA
138652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13866 Leo Zayas <lerele@champenstudios@com>
13867
13868 * server.h (check_remote_input_interrupt_request): New function.
13869 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13870 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13871 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13872 (check_remote_input_interrupt_request): New function.
13873 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13874 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13875 winapi_GenerateConsoleCtrlEvent): New typedefs.
13876 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13877 to 250 ms.
13878 (win32_wait): Check for remote interrupt request
13879 with check_remote_input_interrupt_request.
13880 (win32_request_interrupt): New function.
13881 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13882
34b34921
PA
138832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13884
13885 * win32-low.c (debug_registers_changed,
13886 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13887 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13888 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13889 (thread_rec): Get context using the low target.
13890 (child_add_thread): Call thread_added on the low target,
13891 which does the same thing.
13892 (regptr): Delete.
13893 (do_initial_child_stuff): Remove debug registers references.
13894 Set context using the low target. Resume threads after
13895 setting the contexts.
13896 (child_continue): Remove dead variable. Remove debug
13897 registers references.
13898 (child_fetch_inferior_registers): Go through the low target.
13899 (do_child_store_inferior_registers): Remove.
13900 (child_store_inferior_registers): Go through the low target.
13901 (win32_resume): Remove debug registers references.
13902 Set context using the low target.
13903 (handle_exception): Change return type to void. Don't record
13904 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13905 first chance exception.
889bf7c5 13906 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13907 goto loop. Always return after waiting for debug event.
13908 (win32_wait): Convert to switch statement. Handle spurious
13909 events.
13910
13911 * win32-i386-low.c (debug_registers_changed,
13912 debug_registers_used): New.
13913 (initial_stuff): Rename to ...
13914 (i386_initial_stuff): ... this. Clear debug registers
13915 state variables.
13916 (store_debug_registers): Delete.
13917 (i386_get_thread_context): New.
13918 (load_debug_registers): Delete.
13919 (i386_set_thread_context): New.
13920 (i386_thread_added): New.
13921 (single_step): Rename to ...
13922 (i386_single_step): ... this.
13923 (do_fetch_inferior_registers): Rename to ...
13924 (i386_fetch_inferior_register): ... this.
13925 (i386_store_inferior_register): New.
13926 (the_low_target): Adapt to new interface.
13927
13928 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13929 (arm_get_thread_context): New.
13930 (arm_set_thread_context): New.
13931 (regptr): New.
13932 (do_fetch_inferior_registers): Rename to ...
13933 (arm_fetch_inferior_register): ... this.
13934 (arm_store_inferior_register): New.
13935 (arm_wince_breakpoint): Reimplement as unsigned long.
13936 (arm_wince_breakpoint_len): Define.
13937 (the_low_target): Adapt to new interface.
13938
13939 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13940 load_debug_registers. Add get_thread_context, set_thread_context,
13941 thread_added and store_inferior_register. Rename
13942 fetch_inferior_registers to fetch_inferior_register.
13943 (regptr): Remove declaration.
13944
dd6953e1
PA
139452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13946
13947 * linux-low.c (linux_detach): Change return type to int. Return 0.
13948 * spu-low.c (spu_detach): Likewise.
13949
444d6139
PA
139502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13951
13952 * target.h (target_ops): Change return type of detach to int.
13953 Add join.
13954 (join_inferior): New.
13955 * server.c (main): Don't skip detach support on mingw32.
13956 If the inferior doesn't support detaching return error.
13957 Call join_inferior instead of using waitpid.
13958 * linux-low.c (linux_join): New.
13959 (linux_target_op): Add linux_join.
13960 * spu-low.c (spu_join): New.
13961 (spu_target_ops): Add spu_join.
13962 * win32-low.c (win32_detach): Adapt to new interface.
13963 Reopen current_process_handle before detaching. Issue a child
13964 resume before detaching.
13965 (win32_join): New.
13966 (win32_target_op): Add win32_join.
13967
1d5315fe
PA
139682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13969
13970 * win32-low.c (win32-attach): Fix return value.
13971 * target.h (target_ops): Describe ATTACH return values.
13972
bf914831
PA
139732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13974
13975 * win32-low.c (GETPROCADDRESS): Define.
13976 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13977 (winapi_DebugSetProcessKillOnExit): Likewise.
13978 (win32_create_inferior): Force usage of ansi CreateProcessA.
13979 (win32_attach): Use GETPROCADDRESS.
13980 (win32_detach): Likewise.
13981
f72f3e60
PA
139822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13983
13984 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13985
ed50f18f
PA
139862007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13987
13988 * win32-low.c: Commit leftover changes from 2007-03-29.
13989
0c2ead7e
DJ
139902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13993 fields short instead of int. Add explicit padding.
13994 (i387_cache_to_fsave): Remove unnecessary casts.
13995 (i387_fsave_to_cache): Doc fix.
13996 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13997
73725ff3
DJ
139982007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13999
14000 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14001 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14002
d99f33d8
PA
140032007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14004
14005 * configure.srv (arm*-*-mingw32ce*): Move near the other
14006 arm targets.
14007
68070c10
PA
140082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14009
2482afc6 14010 * configure.ac: Add errno checking.
68070c10
PA
14011 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14012 sys/file.h and malloc.h.
14013 (AC_CHECK_DECLS): Add perror.
14014 (srv_mingwce): Handle.
2482afc6 14015 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14016 win32-i386-low.o to srv_tgtobj.
14017 (i[34567]86-*-mingw*): Likewise.
14018 (arm*-*-mingw32ce*): Add case.
14019 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14020 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14021 [__MINGW32CE__] (strerror): New function.
14022 [__MINGW32CE__] (errno): Define to GetLastError.
14023 [__MINGW32CE__] (COUNTOF): New macro.
14024 (remote_open): Remove extra close call.
14025 * mem-break.c (delete_breakpoint_at): New function.
14026 * mem-break.h (delete_breakpoint_at): Declare.
14027 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14028 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14029 [USE_WIN32API] (read, write): Add char* casts.
14030 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14031 * server.h: Include wincecompat.h on Windows CE.
14032 [HAVE_ERRNO_H]: Check.
14033 (perror): Declare if not declared.
14034 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14035 (perror_with_name): Remove errno declaration.
14036 * wincecompat.h: New.
14037 * wincecompat.c: New.
14038 * win32-low.h: New.
14039 * win32-arm-low.c: New.
14040 * win32-i386-low.c: New.
14041 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14042 (OUTMSG2): Make it safe.
14043 (_T): New macro.
14044 (COUNTOF): New macro.
14045 (NUM_REGS): Get it from the low target.
14046 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14047 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14048 (thread_rec): Let low target handle debug registers.
14049 (child_add_thread): Likewise.
14050 (child_init_thread_list): Likewise.
14051 (continue_one_thread): Likewise.
14052 (regptr): New.
14053 (do_child_fetch_inferior_registers): Move to ...
14054 * win32-i386-low.c: ... here, and rename to ...
14055 (do_fetch_inferior_registers): ... this.
889bf7c5 14056 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14057 Go through the low target.
14058 (do_child_store_inferior_registers): Use regptr.
14059 (strwinerror): New function.
14060 (win32_create_inferior): Handle Windows CE.
14061 Use strwinerror instead of strerror on Windows error
14062 codes. Add program to the error output.
14063 Don't close the main thread handle on Windows CE.
14064 (win32_attach): Use coredll.dll on Windows CE.
14065 (win32_kill): Close current process and current
14066 thread handles.
14067 (win32_detach): Use coredll.dll on Windows CE.
14068 (win32_resume): Let low target handle debug registers, and
14069 step request.
14070 (handle_exception): Add/Remove initial breakpoint. Avoid
14071 non-existant WSTOPSIG on Windows CE.
14072 (win32_read_inferior_memory): Cast to remove warning.
14073 (win32_arch_string): Go through the low target.
14074 (initialize_low): Call set_breakpoint_data with the low
14075 target's breakpoint.
14076 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14077 FOP_REGNUM, mappings): Move to ...
14078 * win32-i386-low.c: ... here.
14079 * win32-low.c (win32_thread_info): Move to ...
14080 * win32-low.h: ... here.
14081 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14082 win32-arm-low.c and wincecompat.c.
14083 (all:): Add $EXEEXT.
14084 (install-only:): Likewise.
14085 (gdbserver:): Likewise.
14086 (gdbreplay:): Likewise.
14087 * config.in: Regenerate.
14088 * configure: Regenerate.
14089
41093d81
PA
140902007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14091
14092 * win32-low.c: Rename typedef thread_info to
14093 win32_thread_info throughout.
14094
544afa54
PA
140952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14096
14097 * win32-i386-low.c: Rename to ...
14098 * win32-low.c: ... this.
14099 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14100 * Makefile.in: Likewise.
14101
bce7165d
PA
141022007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14103
14104 * remote-utils.c (monitor_output): Constify msg parameter.
14105 * server.h (monitor_output): Likewise.
14106 * win32-i386-low.c (handle_output_debug_string): New.
14107 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14108 handle_output_debug_string.
14109 (get_child_debug_event): Likewise.
14110
506c7aa0
DJ
141112007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14112
14113 * server.c (main): Correct strtoul check.
14114
42c81e2a
DJ
141152007-03-27 Jon Ringle <jon@ringle.org>
14116
14117 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14118
9453113a
DJ
141192007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14120
14121 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14122
64a69107
DJ
141232007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * terminal.h: Check HAVE_SGTTY_H.
14126
141272007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14128
14129 * remote-utils.c (remote_open): Print out the assigned port number.
14130
c74d0ad8
DJ
141312007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * remote-utils.c (monitor_output): New function.
14134 * server.c (debug_threads): Define here.
14135 (monitor_show_help): New function.
14136 (handle_query): Handle qRcmd.
14137 (main): Do not handle 'd' packet.
14138 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14139 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14140 of debug_threads.
14141
de7c3b4a
PA
141422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14143
14144 * Makefile.in (EXEEXT): New.
14145 (clean): Use $(EXEEXT).
14146
ef57601b
PA
141472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14148
14149 * target.h (target_ops): Rename send_signal to request_interrupt,
14150 and remove enum target_signal parameter.
14151 * linux-low.c (linux_request_interrupt): Rename from
14152 linux_send_signal, and always send SIGINT.
14153 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14154 and always send SIGINT.
14155 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14156 of send_signal.
14157 (input_interrupt): Likewise.
14158
820f2bda
PA
141592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14160
14161 * server.c (get_features_xml): Check if target implemented
14162 arch_string.
14163 * win32-i386-low.c (win32_arch_string): New.
14164 (win32_target_ops): Add win32_arch_string as arch_string member.
14165
ab39bf24
UW
141662007-02-22 Markus Deuling <deuling@de.ibm.com>
14167
14168 * spu-low.c (spu_arch_string): New.
14169 (spu_target_ops): Add spu_arch_string.
14170
61ff6e04
DJ
141712007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14174 * configure.ac: Do not check for terminal.h.
14175 * configure, config.in: Regenerated.
14176
fb1e4ffc
DJ
141772007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * Makefile.in (OBS): Add $(XML_BUILTIN).
14180 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14181 (clean): Update.
14182 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14183 (arm-with-iwmmxt.c): New.
14184 * config.in, configure: Regenerate.
14185 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14186 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14187 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14188 (arm*-*-linux*): Add iWMMXt and regset support.
14189 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14190 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14191 (arm_store_wmmxregset, target_regsets): New.
14192 * server.c (get_features_xml): Take annex argument. Check builtin
14193 XML documents.
14194 (handle_query): Handle multiple annexes.
14195
0f48aa01
DJ
141962007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * remote-utils.c [USE_WIN32API] (read, write): Define.
14199 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14200 write.
14201
23181151
DJ
142022007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * linux-i386-low.c (the_low_target): Set arch_string.
14205 * linux-x86-64-low.c (the_low_target): Likewise.
14206 * linux-low.c (linux_arch_string): New.
14207 (linux_target_ops): Add it.
14208 * linux-low.h (struct linux_target_ops): Add arch_string.
14209 * server.c (write_qxfer_response): Use const void * for DATA.
14210 (get_features_xml): New.
14211 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14212 * target.h (struct target_ops): Add arch_string method.
14213
9d606399
DJ
142142007-01-03 Denis Pilat <denis.pilat@st.com>
14215 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * linux-low.c (linux_kill): Handle being called with no threads.
14218 * win32-i386-low.c (win32_kill): Likewise.
14219 (get_child_debug_event): Clear current_process_handle.
14220
142212006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14222 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * remote-utils.c (remote_open): Check the type of specified
14225 serial port devices before opening them.
14226 * server.c (main): Kill the inferior if an error occurs during
14227 the first remote_open.
14228
a5e13d24
DJ
142292006-12-05 Markus Deuling <deuling@de.ibm.com>
14230
14231 * README: Update supported targets.
14232
186947f7
DJ
142332006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14234
14235 * Makefile.in (clean): Remove reg-mips64.c.
14236 (reg-mips64.c, reg-mips64.o): New rules.
14237 * configure.srv: Handle mips64. Include regset support for mips.
14238 * linux-mips-low.c (union mips_register): New.
14239 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14240 (mips_breakpoint, mips_breakpoint_at): Use int.
14241 (mips_collect_register, mips_supply_register)
14242 (mips_collect_register_32bit, mips_supply_register_32bit)
14243 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14244 (mips_store_fpregset, target_regsets): New.
14245 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14246
a13e2c95
UW
142472006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14248
14249 * configure.srv: Add target "spu*-*-*".
14250 * Makefile.in (clean): Remove reg-spu.c.
14251 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14252 * spu-low.c: New file.
14253
cb7283db
DJ
142542006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14255
14256 * configure.ac: Correct td_thr_tls_get_addr test.
14257 * configure: Regenerated.
14258
89be2091
DJ
142592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * linux-low.c (linux_wait_for_event): Reformat. Use the
14262 pass_signals array.
14263 * remote-utils.c (decode_address_to_semicolon): New.
14264 * server.c (pass_signals, handle_general_set): New.
14265 (handle_query): Mention QPassSignals for qSupported.
14266 (main): Call handle_general_set.
14267 * server.h (pass_signals, decode_address_to_semicolon): New.
14268
000ef4f0
DJ
142692006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * server.c (handle_query): Correct error handling for read_auxv.
14272
b7149293
UW
142732005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14274
14275 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14276 and srv_linux_thread_db to yes.
14277 * linux-s390-low.c (s390_fill_gregset): New function.
14278 (target_regsets): Define data structure.
14279
dae5f5cf
DJ
142802006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14283 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14284 * config.in, configure: Regenerated.
14285 * inferiors.c (gdb_id_to_thread): New function.
14286 (gdb_id_to_thread_id): Use it.
14287 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14288 * linux-low.h (struct process_info): Add th member.
14289 (thread_db_get_tls_address): New prototype.
14290 * remote-utils.c (decode_address): Make non-static.
14291 * server.c (handle_query): Handle qGetTLSAddr.
14292 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14293 * target.h (struct target_ops): Add get_tls_address.
14294 * thread-db.c (maybe_attach_thread): Save the thread handle.
14295 (thread_db_get_tls_address): New.
14296
32ca6d61
DJ
142972006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14298
14299 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14300 (linux_resume_one_process): Take a siginfo_t *. Update all
14301 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14302 (struct pending_signals): Add a siginfo_t.
14303 (linux_wait_for_process): Always set last_status.
14304 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14305 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14306 * linux-low.h (struct process_info): Add last_status.
14307
5ffff7c1
DJ
143082006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * remote-utils.c (try_rle): New function.
14311 (putpkt_binary): Use it.
14312
8695c747
DJ
143132006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14316 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14317 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14318 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14319 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14320 point registers.
14321
290fadea
RS
143222006-08-08 Richard Sandiford <richard@codesourcery.com>
14323
14324 * server.c (terminal_fd): New variable.
14325 (old_foreground_pgrp): Likewise.
14326 (restore_old_foreground_pgrp): New function.
14327 (start_inferior): Record the terminal file descriptor in terminal_fd
14328 and its original foreground group in old_foreground_pgrp. Register
14329 restore_old_foreground_pgrp with atexit().
14330
9f2e1e63
DJ
143312006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * server.c (handle_query): Correct qPart to qXfer.
14334
b80864fb
DJ
143352006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * configure.ac: Check for more headers which are missing on
14338 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14339 * configure.srv: Add Cygwin and mingw32.
14340 * remote-utils.c: Don't include headers unconditionally which
14341 are missing on mingw32. Include <winsock.h> for mingw32.
14342 (remote_open): Adjust for mingw32 support. Flush
14343 standard error after writing to it.
14344 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14345 (unblock_async_io, enable_async_io, disable_async_io)
14346 (readchar, getpkt): Update for Winsock support.
14347 (prepare_resume_reply): Expect a protocol signal number.
14348 * server.c: Disable <sys/wait.h> on mingw32.
14349 (start_inferior): Adjust for mingw32 support. Flush
14350 standard error after writing to it.
14351 (attach_inferior): Likewise. Use protocol signal
14352 numbers.
14353 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14354 and names.
14355 * win32-i386-low.c: New file.
14356 * Makefile.in (XM_CLIBS): Set.
14357 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14358 (win32-i386-low.o): New dependency rule.
14359 * linux-low.c (linux_wait): Use target signal numbers.
14360 * target.h (struct target_ops): Doc fix.
14361 * server.h (target_signal_to_name): New prototype.
14362 * gdbreplay.c: Don't include headers unconditionally which
14363 are missing on mingw32. Include <winsock.h> for mingw32.
14364 (remote_close, remote_open): Adjust for Winsock support.
14365 * configure, config.in: Regenerated.
14366
0876f84a
DJ
143672006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (decode_xfer_read, write_qxfer_response): New.
14370 (handle_query): Take a packet length argument. Handle
14371 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14372 the qSupported response.
14373 (main): Update call to handle_query.
14374
01f9e8fa
DJ
143752006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14376
14377 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14378 (putpkt_binary): Renamed from putpkt and adjusted for binary
14379 data.
14380 (putpkt): New wrapper for putpkt_binary.
14381 (readchar): Don't mask off the high bit.
14382 (decode_X_packet): New function.
14383 * server.c (main): Call putpkt_binary if a handler sets the packet
14384 length. Save the length of the incoming packet. Handle 'X'.
14385 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14386
be2a5f71
DJ
143872006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * server.c (handle_query): Handle qSupported.
14390
ea025f5f
DJ
143912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * remote-utils.c (all_symbols_looked_up): New variable.
14394 (look_up_one_symbol): Check it.
14395 * server.h (look_up_one_symbol): New declaration.
14396 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14397
9308fc88
DJ
143982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14401 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14402 (PTRACE_GET_THREAD_AREA): Define.
14403 (ps_get_thread_area): New function.
14404
52fb6437
NS
144052006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14406
14407 * configure.srv (m68k*-*-uclinux*): New target.
14408 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14409 (linux_resume_one_process): Remove extraneous cast.
14410 (linux_read_offsets): New.
14411 (linux_target_op): Add linux_read_offsets on mmuless systems.
14412 * server.c (handle_query): Add qOffsets logic.
14413 * target.h (struct target_ops): Add read_offsets.
14414
21b0f40c
DJ
144152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14416
14417 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14418 (PTRACE_GET_THREAD_AREA): Define.
14419 (ps_get_thread_area): New function.
14420 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14421 (linux-x86-64-low.o): Update.
14422
0050a760
DJ
144232006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * configure.ac: Remove checks for prfpregset_t.
14426 * gdb_proc_service.h: New file.
14427 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14428 new "gdb_proc_service.h".
14429 * proc-service.c: Likewise.
14430 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14431 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14432 * Makefile.in (gdb_proc_service_h): Updated.
14433 * configure, config.in: Regenerated.
14434
b92a518e
DJ
144352006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * remote-utils.c (prepare_resume_reply): Move declaration
14438 of gdb_id_from_wait to the top of the block.
14439
545587ee
DJ
144402006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14441
14442 * linux-low.c (regsets_store_inferior_registers): Read the regset
14443 from the target before filling it.
14444
9db87ebd
DJ
144452006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14446
14447 * server.c (attach_inferior): Return SIGTRAP for a successful
14448 attach.
14449
dd24457d
DJ
144502006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14451
14452 * Makefile.in (OBS): Add version.o.
14453 (STAGESTUFF): Delete.
14454 (version.o): Add dependencies.
14455 (version.c): Replace rule.
14456 (clean): Remove version.c.
14457 * server.c (gdbserver_version): New.
14458 (gdbserver_usage): Use printf.
14459 (main): Handle --version and --help.
14460 * server.h (version, host_name): Add declarations.
14461
6f0f660e
EZ
144622005-12-23 Eli Zaretskii <eliz@gnu.org>
14463
889bf7c5
PA
14464 * linux-arm-low.c:
14465 * linux-arm-low.c:
14466 * inferiors.c:
14467 * i387-fp.h:
14468 * i387-fp.c:
14469 * gdbreplay.c:
14470 * regcache.c:
14471 * proc-service.c:
14472 * mem-break.h:
14473 * mem-break.c:
14474 * linux-x86-64-low.c:
14475 * linux-sh-low.c:
14476 * linux-s390-low.c:
14477 * linux-ppc64-low.c:
14478 * linux-ppc-low.c:
14479 * linux-mips-low.c:
14480 * linux-m68k-low.c:
14481 * linux-m32r-low.c:
14482 * linux-low.h:
14483 * linux-low.c:
14484 * linux-ia64-low.c:
14485 * linux-i386-low.c:
14486 * linux-crisv32-low.c:
14487 * thread-db.c:
14488 * terminal.h:
14489 * target.h:
14490 * target.c:
14491 * server.h:
14492 * server.c:
14493 * remote-utils.c:
14494 * regcache.h:
14495 * utils.c:
14496 * Makefile.in:
14497 * configure.ac:
6f0f660e
EZ
14498 * gdbserver.1: Add (C) after Copyright. Update the FSF
14499 address.
14500
9d1fb177
DJ
145012005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14504 (arm_breakpoint_at): Recognize both breakpoints.
14505 (the_low_target): Use the correct breakpoint instruction.
14506
011a70c2
DJ
145072005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14508
14509 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14510 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14511 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14512 (the_low_target): Update.
14513
7fb85e41
AS
145142005-10-25 Andreas Schwab <schwab@suse.de>
14515
14516 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14517
14518 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14519 (ia64_num_regs): Reduce to 462.
14520
3db0444b
DJ
145212005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * acinclude.m4: Correct quoting.
14524 * aclocal.m4: Regenerated.
14525
14526 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14527 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14528 (thread_db_init): Call thread_db_err_str.
14529 * configure.ac: Check for TD_VERSION.
14530 * config.in, configure: Regenerated.
14531
bee0189a
DJ
145322005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14533
14534 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14535
e9d25b98
DJ
145362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14537
14538 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14539 is not available. Define HAVE_PTRACE_GETREGS if it is.
14540 * config.in, configure: Regenerated.
14541 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14542 * linux-i386-low.c, linux-m68k-low.c: Update to use
14543 HAVE_PTRACE_GETREGS.
14544 * linux-low.c (regsets_fetch_inferior_registers)
14545 (regsets_store_inferior_registers): Only return 0 if we processed
14546 GENERAL_REGS.
14547 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14548 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14549
a06660f7
DJ
145502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * inferiors.c (struct thread_info): Add gdb_id.
14553 (add_thread): Add gdb_id argument.
14554 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14555 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14556 calls to add_thread.
14557 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14558 * server.c (handle_query): Use thread_to_gdb_id.
14559 (handle_v_cont, main): Use gdb_id_to_thread_id.
14560 * server.h (add_thread): Update prototype.
14561 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14562 prototypes.
14563
5a1f5858
DJ
145642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14567 left-padded registers.
14568 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14569 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14570
e122f1f5
SE
145712005-07-01 Steve Ellcey <sje@cup.hp.com>
14572
14573 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14574 * configure: Regenerate.
14575 * config.in: Regenerate.
14576 * server.h (NEED_DECLARATION_STRERROR):
14577 Replace with !HAVE_DECL_STRERROR.
14578
d592fa2f
DJ
145792005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * linux-low.c (linux_wait, linux_send_signal): Don't test
14582 an unsigned long variable for > 0 if it could be MAX_ULONG.
14583 * server.c (myresume): Likewise.
14584 * target.c (set_desired_inferior): Likewise.
14585
ccbd4912
MK
145862005-06-13 Mark Kettenis <kettenis@gnu.org>
14587
14588 * configure.ac: Simplify and improve check for socklen_t.
14589 * configure, config.in: Regenerate.
14590
f450004a
DJ
145912005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * acconfig.h: Remove.
14594 * configure.ac: Add a test for socklen_t. Use three-argument
14595 AC_DEFINE throughout.
14596 * config.in: Regenerated using autoheader 2.59.
14597 * configure: Regenerated.
14598
14599 * gdbreplay.c (socklen_t): Provide a default.
14600 (remote_open): Use socklen_t.
14601 * remote-utils.c (socklen_t): Provide a default.
14602 (remote_open): Use socklen_t.
14603 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14604 unsigned char.
14605
14606 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14607 char for buffers.
14608 * linux-low.c (linux_read_memory, linux_write_memory)
14609 (linux_read_auxv): Likewise.
14610 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14611 (check_mem_write): Likewise.
14612 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14613 Likewise.
14614 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14615 (registers_from_string, register_data): Likewise.
14616 * server.c (handle_query, main): Likewise.
14617 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14618 (decode_M_packet): Likewise.
14619 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14620 * target.h (struct target_ops): Update read_memory, write_memory,
14621 and read_auxv.
14622 (read_inferior_memory, write_inferior_memory): Update.
14623 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14624 to unsigned char *.
14625 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14626 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14627 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14628 linux-s390-low.c, linux-sh-low.c: Update for changes in
14629 read_inferior_memory and the_low_target->breakpoint.
14630
eee84df1
DJ
146312005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14632
14633 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14634 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14635 * configure.srv: Add powerpc64-*-linux*.
14636 * linux-ppc64-low.c: New file.
14637
45b134e5
OF
146382005-05-23 Orjan Friberg <orjanf@axis.com>
14639
14640 * linux-cris-low.c: New file with support for CRIS.
14641 * linux-crisv32-low.c: Ditto for CRISv32.
14642 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14643 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14644 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14645 reg-crisv32.o, and reg-crisv32.c to make rules.
14646 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14647 recognized targets.
14648
48d93c75
UW
146492005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14650
14651 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14652 of sizeof (PTRACE_XFER_TYPE).
14653 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14654
e013ee27
OF
146552005-05-12 Orjan Friberg <orjanf@axis.com>
14656
889bf7c5 14657 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14658 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14659 pointers for hardware watchpoint support.
14660 * linux-low.h (struct linux_target_ops): Ditto.
14661 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14662 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14663 to linux_target_ops.
14664 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14665 reply packet.
14666 * server.c (main): Recognize 'Z' and 'z' packets.
14667
b0ded00b
UW
146682005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14669
14670 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14671 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14672 (the_low_target): Add new members.
14673
8643e2ad
DJ
146742005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14675
14676 * proc-service.c (ps_lgetregs): Search all_processes instead of
14677 all_threads.
14678
fc620387
DJ
146792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14680
14681 * server.c (start_inferior): Change return type to int.
14682 (attach_inferior): Change sigptr to int *.
14683 (handle_v_cont, handle_v_requests): Change signal to int *.
14684 (main): Change signal to int.
14685
146862005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14687
14688 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14689 * configure.srv: Add m32r*-*-linux*.
14690 * linux-m32r-low.c: New file.
14691
e0e76420
DJ
146922005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14695
a1928bad
DJ
146962005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14699 Take unsigned long arguments for PIDs.
14700 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14701 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14702 (wait_for_sigstop, linux_resume_one_process)
14703 (regsets_fetch_inferior_registers, linux_send_signal)
14704 (linux_read_auxv): Likewise. Update the types of variables holding
14705 PIDs. Update format string specifiers.
14706 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14707 * remote-utils.c (prepare_resume_reply): Likewise.
14708 * server.c (cont_thread, general_thread, step_thread)
14709 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14710 unsigned long.
14711 (handle_query): Update format specifiers.
14712 (handle_v_cont, main): Use strtoul for thread IDs.
14713 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14714 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14715 (general_thread, step_thread, thread_from_wait)
14716 (old_thread_from_wait): Update.
14717 * target.h (struct thread_resume): Use unsigned long for THREAD.
14718 (struct target_ops): Use unsigned long for arguments to attach and
14719 thread_alive.
14720
dcdb98d2
DJ
147212005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * acinclude.m4: Include bfd/bfd.m4 directly.
14724 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14725 <agriffis@toolchain.org>.
14726 * aclocal.m4, configure: Regenerated.
14727
bec39cab
AC
147282005-01-07 Andrew Cagney <cagney@gnu.org>
14729
14730 * configure.ac: Rename configure.in, require autoconf 2.59.
14731 * configure: Re-generate.
14732
434c4c77
DJ
147332004-12-08 Daniel Jacobowitz <dan@debian.org>
14734
14735 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14736 LIBS when finished.
14737 * aclocal.m4: Regenerated.
14738 * configure: Regenerated.
14739
db1d3e1b
AS
147402004-11-21 Andreas Schwab <schwab@suse.de>
14741
14742 * linux-m68k-low.c (m68k_num_gregs): Define.
14743 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14744 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14745 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14746 (m68k_breakpoint_at): New. Add to the_low_target.
14747
14748 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14749 srv_linux_thread_db to yes.
14750
43360365
JB
147512004-10-20 Joel Brobecker <brobecker@gnat.com>
14752
14753 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14754 (ARCH_SET_FS): Likewise.
14755 (ARCH_GET_FS): Likewise.
14756 (ARCH_GET_GS): Likewise.
14757
fd500816
DJ
147582004-10-16 Daniel Jacobowitz <dan@debian.org>
14759
14760 * linux-i386-low.c (ps_get_thread_area): New.
14761 * linux-x86-64-low.c (ps_get_thread_area): New.
14762 * linux-low.c: Include <sys/syscall.h>.
14763 (linux_kill_one_process): Don't kill the first thread here.
14764 (linux_kill): Kill the first thread here.
14765 (kill_lwp): New function.
14766 (send_sigstop, linux_send_signal): Use it.
14767 * proc-service.c: Clean up #ifdefs.
14768 (fpregset_info): Delete.
14769 (ps_lgetregs): Update and enable implementation.
14770 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14771 implementations.
14772 * remote-utils.c (struct sym_cache, symbol_cache): New.
14773 (input_interrupt): Print a clearer message.
14774 (async_io_enabled): New variable.
14775 (enable_async_io, disable_async_io): Use it. Update comments.
14776 (look_up_one_symbol): Use the symbol cache.
14777 * thread-db.c (thread_db_look_up_symbols): New function.
14778 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14779
f6de3c42
DJ
147802004-10-16 Daniel Jacobowitz <dan@debian.org>
14781
14782 * configure.in: Test for -rdynamic.
14783 * configure: Regenerated.
14784 * Makefile (INTERNAL_LDFLAGS): New.
14785 (gdbserver, gdbreplay): Use it.
14786
2c0fc042
AC
147872004-09-02 Andrew Cagney <cagney@gnu.org>
14788
14789 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14790
075b3282
DJ
147912004-03-23 Daniel Jacobowitz <drow@mvista.com>
14792
14793 * linux-low.c (linux_wait): Clear all_processes list also.
14794
fa6a77dc
DJ
147952004-03-12 Daniel Jacobowitz <drow@mvista.com>
14796
14797 * linux-low.c: Include <errno.h>. Remove extern declaration of
14798 errno.
14799
6d782a97
DJ
148002004-03-12 Daniel Jacobowitz <drow@mvista.com>
14801
14802 * gdbreplay.c, server.h, utils.c: Update copyright years.
14803
3a7fb99b
DJ
148042004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14805
14806 * server.c (main): Print child status or termination signal from
14807 variable 'signal', not 'sig'.
14808
c3e735a6
DJ
148092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14810
14811 * linux-low.c (linux_read_memory): Change return type to
14812 int. Check for and return error from ptrace().
14813 * target.c (read_inferior_memory): Change return type to int. Pass
14814 back return status from the_target->read_memory().
14815 * target.h (struct target_ops): Adapt *read_memory() prototype.
14816 Update comment.
14817 (read_inferior_memory): Adapt prototype.
14818 * server.c (main): Return an error packet if
14819 read_inferior_memory() returns an error.
14820
a59d1c82
DJ
148212004-03-04 Daniel Jacobowitz <drow@mvista.com>
14822
14823 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14824 Unify with other clean targets.
14825
dc3f8883
DJ
148262004-02-29 Daniel Jacobowitz <drow@mvista.com>
14827
14828 * server.c (handle_v_cont): Call set_desired_inferior.
14829
89a208da
DJ
148302004-02-29 Daniel Jacobowitz <drow@mvista.com>
14831
14832 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14833
62ea82f5
DJ
148342004-02-29 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * linux-low.c (linux_wait): Unblock async I/O.
14837 (linux_resume): Block and enable async I/O.
14838 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14839 * server.h (block_async_io, unblock_async_io): Add prototypes.
14840
6910d122
DJ
148412004-02-29 Daniel Jacobowitz <drow@mvista.com>
14842
14843 * remote-utils.c (remote_open): Print a status notice after
14844 opening a TCP port.
14845 * server.c (attach_inferior): Print a status notice after
14846 attaching.
14847
148482004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14849
14850 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14851
c89dc5d4
DJ
148522004-02-26 Daniel Jacobowitz <drow@mvista.com>
14853
14854 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14855 error packet.
14856 * server.c, target.h: Update copyright years.
14857
4b8dad4a
RM
148582004-02-25 Roland McGrath <roland@redhat.com>
14859
14860 * target.h (struct target_ops): New member `read_auxv'.
14861 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14862 * linux-low.c (linux_read_auxv): New function.
14863 (linux_target_ops): Initialize `read_auxv' member to that.
14864
d7446758
JB
148652004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14866
14867 Committed by Jim Blandy <jimb@redhat.com>.
14868
14869 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14870 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14871 instead of GPR_SIZE to distiguish s390 and s390x targets.
14872
5544ad89
DJ
148732004-01-31 Daniel Jacobowitz <drow@mvista.com>
14874
14875 * linux-low.c: Update copyright year.
14876 (check_removed_breakpoint): Clear pending_is_breakpoint.
14877 (linux_set_resume_request, linux_queue_one_thread)
14878 (resume_status_pending_p): New functions.
14879 (linux_continue_one_thread): Use process->resume.
14880 (linux_resume): Only resume threads if there are no pending events.
14881 * linux-low.h (struct process_info): Add resume request
14882 pointer.
14883
2a68b70e
DJ
148842004-01-30 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * regcache.c (new_register_cache): Clear the allocated register
14887 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14888
64386c31
DJ
148892003-10-13 Daniel Jacobowitz <drow@mvista.com>
14890
14891 * linux-low.c (linux_resume): Take a struct thread_resume *
14892 argument.
14893 (linux_wait): Update call.
14894 (resume_ptr): New static variable.
14895 (linux_continue_one_thread): Renamed from
14896 linux_continue_one_process. Use resume_ptr.
14897 (linux_resume): Use linux_continue_one_thread.
14898 * server.c (handle_v_cont, handle_v_requests): New functions.
14899 (myresume): New function.
14900 (main): Handle 'v' case.
14901 * target.h (struct thread_resume): New type.
14902 (struct target_ops): Change argument of "resume" to struct
14903 thread_resume *.
14904 (myresume): Delete macro.
14905
c938e9b0
L
149062003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14907
14908 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14909 (uninstall): Support DESTDIR.
14910
7f313d07
BC
14911Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14912
14913 * configure.srv: Add xscale*linux copy of arm*linux entry.
14914
3b2fc2ea
DJ
149152003-07-24 Daniel Jacobowitz <drow@mvista.com>
14916
14917 * linux-arm-low.c (arm_reinsert_addr): New function.
14918 (the_low_target): Add arm_reinsert_addr.
14919
1c0a559e
MK
149202003-07-08 Mark Kettenis <kettenis@gnu.org>
14921
14922 * mem-break.c: Remove whitespace at end of file.
14923
43d5792c
DJ
149242003-06-28 Daniel Jacobowitz <drow@mvista.com>
14925
14926 * configure.in: Check whether we need to prototype strerror.
14927 * server.h: Optionally prototype strerror.
14928 * gdbreplay.c (perror_with_name): Use strerror.
14929 * linux-low.c (linux_attach_lwp): Use strerror.
14930 * utils.c (perror_with_name): Use strerror.
14931 * config.in, configure: Regenerated.
14932
c8a86edf
DJ
149332003-06-28 Daniel Jacobowitz <drow@mvista.com>
14934
14935 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14936 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14937
73d37363
DJ
149382003-06-20 Daniel Jacobowitz <drow@mvista.com>
14939
14940 * Makefile.in (SFILES): Update.
14941 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14942 low-sun3.c: Remove files.
14943
6ad8ae5c
DJ
149442003-06-17 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14947 (linux_detach_one_process, linux_detach): New functions.
14948 (linux_target_ops): Add linux_detach.
14949 * server.c (main): Handle 'D' packet.
14950 * target.h (struct target_ops): Add "detach" member.
14951 (detach_inferior): Define.
14952
1581182a
MK
149532003-06-13 Mark Kettenis <kettenis@gnu.org>
14954
14955 From Kelley Cook <kelleycook@wideopenwest.com>:
14956 * configure.srv: Accept i[34567]86 variants.
14957
e5379b03
DJ
149582003-06-05 Daniel Jacobowitz <drow@mvista.com>
14959
14960 * linux-low.c (linux_wait_for_event): Correct comment typos.
14961 (linux_resume_one_process): Call check_removed_breakpoint.
14962 (linux_send_signal): New function.
14963 (linux_target_ops): Add linux_send_signal.
14964 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14965 of kill.
14966 * target.h (struct target_ops): Add send_signal.
14967
2ff29de4
JB
149682003-05-29 Jim Blandy <jimb@redhat.com>
14969
14970 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14971 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14972 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14973 away part of the register's value.
14974
254787d4
DJ
149752003-03-26 Daniel Jacobowitz <drow@mvista.com>
14976
14977 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14978 (linux_wait_for_event, linux_init_signals): Likewise.
14979
94e10508
DJ
149802003-03-17 Daniel Jacobowitz <drow@mvista.com>
14981
14982 * configure.in: Check for stdlib.h.
14983 * configure: Regenerated.
14984 * config.in: Regenerated.
14985
4c0711e0
DJ
149862003-01-04 Andreas Schwab <schwab@suse.de>
14987
14988 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14989
ef66e766
AC
149902003-01-02 Andrew Cagney <ac131313@redhat.com>
14991
14992 * Makefile.in: Remove obsolete code.
14993
a1358604
DJ
149942002-11-20 Daniel Jacobowitz <drow@mvista.com>
14995
14996 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14997 defined(PT_FPR0_HI).
14998
23ce3b1c
DJ
149992002-11-17 Stuart Hughes <seh@zee2.com>
15000
15001 * linux-arm-low.c (arm_num_regs): Increase.
15002 (arm_regmap): Include status register.
15003
150042002-11-17 Daniel Jacobowitz <drow@mvista.com>
15005
15006 * linux-low.c (register_addr): Remove incorrect -1 check.
15007
a9fa9f7d
DJ
150082002-08-29 Daniel Jacobowitz <drow@mvista.com>
15009
15010 * linux-low.c (linux_create_inferior): Call setpgid. Return
15011 the new PID.
15012 (unstopped_p, linux_signal_pid): Remove.
15013 (linux_target_ops): Remove linux_signal_pid.
15014 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15015 global instead of target method.
15016 * target.h (struct target_ops): Remove signal_pid. Update comment
15017 for create_inferior.
15018 * server.c (signal_pid): New variable.
15019 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15020 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15021 (attach_inferior): Set signal_pid.
15022
17574093
DJ
150232002-08-23 Daniel Jacobowitz <drow@mvista.com>
15024
15025 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15026
150272002-08-20 Jim Blandy <jimb@redhat.com>
15028
15029 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15030 default for this.
15031
150322002-08-01 Andrew Cagney <cagney@redhat.com>
15033
15034 * Makefile.in: Make chill references obsolete.
15035
150362002-07-24 Kevin Buettner <kevinb@redhat.com>
15037
15038 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15039 * configure: Regenerate.
15040 * config.in: Regenerate.
15041
150422002-07-09 David O'Brien <obrien@FreeBSD.org>
15043
15044 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15045 (perror_with_name, remote_close, remote_open, expect, play): Static.
15046
150472002-07-04 Michal Ludvig <mludvig@suse.cz>
15048
4b8dad4a 15049 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15050 byte offsets instead of an array of indexes.
15051 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15052
150532002-06-13 Daniel Jacobowitz <drow@mvista.com>
15054
15055 * regcache.c: Add comment.
15056
150572002-06-11 Daniel Jacobowitz <drow@mvista.com>
15058
15059 * thread-db.c: New file.
15060 * proc-service.c: New file.
15061 * acinclude.m4: New file.
15062 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15063 proc-service.o, and thread-db.o.
15064 (linux-low.o): Add USE_THREAD_DB.
15065 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15066 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15067 * aclocal.m4: Regenerated.
15068 * config.in: Regenerated.
15069 * configure: Regenerated.
15070 * configure.in: Check for proc_service.h, sys/procfs.h,
15071 thread_db.h, and linux/elf.h headrs.
15072 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15073 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15074 Check for -lthread_db and thread support.
15075 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15076 PowerPC, and SuperH.
15077 * i387-fp.c: Constify arguments.
15078 * i387-fp.h: Likewise.
15079 * inferiors.c: (struct thread_info): Renamed from
15080 `struct inferior_info'. Remove PID member. Use generic inferior
15081 list header. All uses updated.
15082 (inferiors, signal_pid): Removed.
15083 (all_threads): New variable.
15084 (get_thread): Define.
15085 (add_inferior_to_list): New function.
15086 (for_each_inferior): New function.
15087 (change_inferior_id): New function.
15088 (add_inferior): Removed.
15089 (remove_inferior): New function.
15090 (add_thread): New function.
15091 (free_one_thread): New function.
15092 (remove_thread): New function.
15093 (clear_inferiors): Use for_each_inferior and free_one_thread.
15094 (find_inferior): New function.
15095 (find_inferior_id): New function.
15096 (inferior_target_data): Update argument type.
15097 (set_inferior_target_data): Likewise.
15098 (inferior_regcache_data): Likewise.
15099 (set_inferior_regcache_data): Likewise.
15100 * linux-low.c (linux_bp_reinsert): Remove.
15101 (all_processes, stopping_threads, using_thrads)
15102 (struct pending_signals, debug_threads, pid_of): New.
15103 (inferior_pid): Replace with macro.
15104 (struct inferior_linux_data): Remove.
15105 (get_stop_pc, add_process): New functions.
15106 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15107 Use add_process and add_thread.
15108 (linux_attach_lwp): New function, based on old linux_attach. Use
15109 add_process and add_thread. Set stop_expected for new threads.
15110 (linux_attach): New function.
15111 (linux_kill_one_process): New function.
15112 (linux_kill): Kill all LWPs.
15113 (linux_thread_alive): Use find_inferior_id.
15114 (check_removed_breakpoints, status_pending_p): New functions.
15115 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15116 Update. Use WNOHANG. Wait for cloned processes also. Update process
15117 struct for the found process.
15118 (linux_wait_for_event): New function.
15119 (linux_wait): Use it. Support LWPs.
15120 (send_sigstop, wait_for_sigstop, stop_all_processes)
15121 (linux_resume_one_process, linux_continue_one_process): New functions.
15122 (linux_resume): Support LWPs.
15123 (REGISTER_RAW_SIZE): Remove.
15124 (fetch_register): Use register_size instead. Call supply_register.
15125 (usr_store_inferior_registers): Likewise. Call collect_register.
15126 Fix recursive case.
15127 (regsets_fetch_inferior_registers): Improve error message.
15128 (regsets_store_inferior_registers): Add debugging.
15129 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15130 (unstopped_p, linux_signal_pid): New functions.
15131 (linux_target_ops): Add linux_signal_pid.
15132 (linux_init_signals): New function.
15133 (initialize_low): Call it. Initialize using_threads.
15134 * regcache.c (inferior_regcache_data): Add valid
15135 flag.
15136 (get_regcache): Fetch registers lazily. Add fetch argument
15137 and update all callers.
15138 (regcache_invalidate_one, regcache_invalidate): New
15139 functions.
15140 (new_register_cache): Renamed from create_register_cache.
15141 Return the new regcache.
15142 (free_register_cache): Change argument to a void *.
15143 (registers_to_string, registers_from_string): Call get_regcache
15144 with fetch flag set.
15145 (register_data): Make static. Pass fetch flag to get_regcache.
15146 (supply_register): Call get_regcache with fetch flag clear.
15147 (collect_register): Call get_regcache with fetch flag set.
15148 (collect_register_as_string): New function.
15149 * regcache.h: Update.
15150 * remote-utils.c (putpkt): Flush after debug output and use
15151 stderr.
15152 Handle input interrupts while waiting for an ACK.
15153 (input_interrupt): Use signal_pid method.
15154 (getpkt): Flush after debug output and use stderr.
15155 (outreg): Use collect_register_as_string.
15156 (new_thread_notify, dead_thread_notify): New functions.
15157 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15158 and general_thread.
15159 (look_up_one_symbol): Flush after debug output.
15160 * server.c (step_thread, server_waiting): New variables.
15161 (start_inferior): Don't use signal_pid. Update call to mywait.
15162 (attach_inferior): Update call to mywait.
15163 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15164 (main): Don't fetch/store registers explicitly. Use
15165 set_desired_inferior. Support proposed ``Hs'' packet. Update
15166 calls to mywait.
15167 * server.h: Update.
15168 (struct inferior_list, struct_inferior_list_entry): New.
15169 * target.c (set_desired_inferior): New.
15170 (write_inferior_memory): Constify.
15171 (mywait): New function.
15172 * target.h: Update.
15173 (struct target_ops): New signal_pid method.
15174 (mywait): Removed macro, added prototype.
15175
15176 * linux-low.h (regset_func): Removed.
15177 (regset_fill_func, regset_store_func): New.
15178 (enum regset_type): New.
15179 (struct regset_info): Add type field. Use new operation types.
15180 (struct linux_target_ops): stop_pc renamed to get_pc.
15181 Add decr_pc_after_break and breakpoint_at.
15182 (get_process, get_thread_proess, get_process_thread)
15183 (strut process_info, all_processes, linux_attach_lwp)
15184 (thread_db_init): New.
15185
15186 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15187 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15188 (the_low_target): Add new members.
15189 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15190 (i386_store_fpxregset): Constify.
15191 (target_regsets): Add new kind identifier.
15192 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15193 (i386_set_pc): Add debugging.
15194 (i386_breakpoint_at): New function.
15195 (the_low_target): Add new members.
15196 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15197 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15198 (mips_breakpoint_at): New.
15199 (the_low_target): Add new members.
15200 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15201 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15202 (the_low_target): Add new members.
15203 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15204 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15205 (the_low_target): Add new members.
15206 * linux-x86-64-low.c (target_regsets): Add new kind
15207 identifier.
15208
152092002-05-15 Daniel Jacobowitz <drow@mvista.com>
15210
15211 From Martin Pool <mbp@samba.org>:
15212 * server.c (gdbserver_usage): New function.
15213 (main): Call it.
15214
152152002-05-14 Daniel Jacobowitz <drow@mvista.com>
15216
15217 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15218 stop_at -> stop_pc.
15219
152202002-05-04 Andrew Cagney <ac131313@redhat.com>
15221
15222 * Makefile.in: Remove obsolete code.
15223
152242002-04-24 Michal Ludvig <mludvig@suse.cz>
15225
15226 * linux-low.c (regsets_fetch_inferior_registers),
15227 (regsets_store_inferior_registers): Removed cast to int from
15228 ptrace() calls.
15229 * regcache.h: Added declaration of struct inferior_info.
15230
152312002-04-20 Daniel Jacobowitz <drow@mvista.com>
15232
15233 * inferiors.c (struct inferior_info): Add regcache_data.
15234 (add_inferior): Call create_register_cache.
15235 (clear_inferiors): Call free_register_cache.
15236 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15237 * regcache.c (struct inferior_regcache_data): New.
15238 (registers): Remove.
15239 (get_regcache): New function.
15240 (create_register_cache, free_register_cache): New functions.
15241 (set_register_cache): Don't initialize the register cache here.
15242 (registers_to_string, registers_from_string, register_data): Call
15243 get_regcache.
15244 * regcache.h: Add prototypes.
15245 * server.h: Likewise.
15246
152472002-04-20 Daniel Jacobowitz <drow@mvista.com>
15248
15249 * mem-break.c: New file.
15250 * mem-break.h: New file.
15251 * Makefile.in: Add mem-break.o rule; update server.h
15252 dependencies.
15253 * inferiors.c (struct inferior_info): Add target_data
15254 member.
15255 (clear_inferiors): Free target_data member if set.
15256 (inferior_target_data, set_inferior_target_data): New functions.
15257 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15258 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15259 * linux-low.c (linux_bp_reinsert): New variable.
15260 (struct inferior_linux_data): New.
15261 (linux_create_inferior): Use set_inferior_target_data.
15262 (linux_attach): Likewise. Call add_inferior.
15263 (linux_wait_for_one_inferior): New function.
15264 (linux_wait): Call it.
15265 (linux_write_memory): Add const.
15266 (initialize_low): Call set_breakpoint_data.
15267 * linux-low.h (struct linux_target_ops): Add breakpoint
15268 handling members.
15269 * server.c (attach_inferior): Remove extra add_inferior
15270 call.
15271 * server.h: Include mem-break.h. Update inferior.c
15272 prototypes.
15273 * target.c (read_inferior_memory)
15274 (write_inferior_memory): New functions.
15275 * target.h (read_inferior_memory)
15276 (write_inferior_memory): Change macros to prototypes.
15277 (struct target_ops): Update comments. Add const to write_memory
15278 definition.
15279
152802002-04-11 Daniel Jacobowitz <drow@mvista.com>
15281
15282 * linux-low.c (usr_store_inferior_registers): Support
15283 registers which are allowed to fail to store.
15284 * linux-low.h (linux_target_ops): Likewise.
15285 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15286 (ppc_cannot_store_register): FPSCR may not be storable.
15287
152882002-04-09 Daniel Jacobowitz <drow@mvista.com>
15289
15290 * server.h: Include <string.h> if HAVE_STRING_H.
15291 * ChangeLog: Correct paths in last ChangeLog entry.
15292
152932002-04-09 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * linux-low.h: Remove obsolete prototypes.
15296 (struct linux_target_ops): New.
15297 (extern the_low_target): New.
15298 * linux-low.c (num_regs, regmap): Remove declarations.
15299 (register_addr): Use the_low_target explicitly.
15300 (fetch_register): Likewise.
15301 (usr_fetch_inferior_registers): Likewise.
15302 (usr_store_inferior_registers): Likewise.
15303 * linux-arm-low.c (num_regs): Remove.
15304 (arm_num_regs): Define.
15305 (arm_regmap): Renamed from regmap, made static.
15306 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15307 made static.
15308 (arm_cannot_store_register): Renamed from cannot_store_register,
15309 made static.
15310 (the_low_target): New.
15311 * linux-i386-low.c (num_regs): Remove.
15312 (i386_num_regs): Define.
15313 (i386_regmap): Renamed from regmap, made static.
15314 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15315 made static.
15316 (i386_cannot_store_register): Renamed from cannot_store_register,
15317 made static.
15318 (the_low_target): New.
15319 * linux-ia64-low.c (num_regs): Remove.
15320 (ia64_num_regs): Define.
15321 (ia64_regmap): Renamed from regmap, made static.
15322 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15323 made static.
15324 (ia64_cannot_store_register): Renamed from cannot_store_register,
15325 made static.
15326 (the_low_target): New.
15327 * linux-m68k-low.c (num_regs): Remove.
15328 (m68k_num_regs): Define.
15329 (m68k_regmap): Renamed from regmap, made static.
15330 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15331 made static.
15332 (m68k_cannot_store_register): Renamed from cannot_store_register,
15333 made static.
15334 (the_low_target): New.
15335 * linux-mips-low.c (num_regs): Remove.
15336 (mips_num_regs): Define.
15337 (mips_regmap): Renamed from regmap, made static.
15338 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15339 made static.
15340 (mips_cannot_store_register): Renamed from cannot_store_register,
15341 made static.
15342 (the_low_target): New.
15343 * linux-ppc-low.c (num_regs): Remove.
15344 (ppc_num_regs): Define.
15345 (ppc_regmap): Renamed from regmap, made static.
15346 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15347 made static.
15348 (ppc_cannot_store_register): Renamed from cannot_store_register,
15349 made static.
15350 (the_low_target): New.
15351 * linux-s390-low.c (num_regs): Remove.
15352 (s390_num_regs): Define.
15353 (s390_regmap): Renamed from regmap, made static.
15354 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15355 made static.
15356 (s390_cannot_store_register): Renamed from cannot_store_register,
15357 made static.
15358 (the_low_target): New.
15359 * linux-sh-low.c (num_regs): Remove.
15360 (sh_num_regs): Define.
15361 (sh_regmap): Renamed from regmap, made static.
15362 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15363 made static.
15364 (sh_cannot_store_register): Renamed from cannot_store_register,
15365 made static.
15366 (the_low_target): New.
15367 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15368 (the_low_target): New.
15369
153702002-04-09 Daniel Jacobowitz <drow@mvista.com>
15371
15372 * Makefile.in: Add stamp-h target.
15373 * configure.in: Create stamp-h.
15374 * configure: Regenerated.
15375
153762002-04-09 Daniel Jacobowitz <drow@mvista.com>
15377
15378 * inferiors.c: New file.
15379 * target.c: New file.
15380 * target.h: New file.
15381 * Makefile.in: Add target.o and inferiors.o. Update
15382 dependencies.
15383 * linux-low.c (inferior_pid): New static variable,
15384 moved from server.c.
15385 (linux_create_inferior): Renamed from create_inferior.
15386 Call add_inferior. Return 0 on success instead of a PID.
15387 (linux_attach): Renamed from myattach.
15388 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15389 (linux_thread_alive): Renamed from mythread_alive.
15390 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15391 child dies.
15392 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15393 (regsets_store_inferior_registers): Correct error message.
15394 Add missing ``return 0''.
15395 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15396 (linux_store_registers): Renamed from store_inferior_registers.
15397 (linux_read_memory): Renamed from read_inferior_memory.
15398 (linux_write_memory): Renamed from write_inferior_memory.
15399 (linux_target_ops): New structure.
15400 (initialize_low): Call set_target_ops ().
15401 * remote-utils.c (unhexify): New function.
15402 (hexify): New function.
15403 (input_interrupt): Send signals to ``signal_pid''.
15404 * server.c (inferior_pid): Remove.
15405 (start_inferior): Update create_inferior call.
15406 (attach_inferior): Call add_inferior.
15407 (handle_query): New function.
15408 (main): Call handle_query for `q' packets.
15409 * server.h: Include "target.h". Remove obsolete prototypes.
15410 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15411
154122002-04-09 Daniel Jacobowitz <drow@mvista.com>
15413
15414 * Makefile.in: Add WARN_CFLAGS. Update configury
15415 dependencies.
15416 * configure.in: Check for <string.h>
15417 * configure: Regenerate.
15418 * config.in: Regenerate.
15419 * gdbreplay.c: Include needed system headers.
15420 (remote_open): Remove strchr prototype.
15421 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15422 * regcache.c (supply_register): Change buf argument to const void *.
15423 (supply_register_by_name): Likewise.
15424 (collect_register): Change buf argument to void *.
15425 (collect_register_by_name): Likewise.
15426 * regcache.h: Add missing prototypes.
15427 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15428 * server.c (handle_query): New function.
15429 (attached): New static variable, moved out of main.
15430 (main): Quiet longjmp clobber warnings.
15431 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15432 * utils.c (error): Remove NORETURN.
15433 (fatal): Likewise.