]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
x86: Return -1 if bfd_canonicalize_dynamic_reloc returns 0
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f6327dcb
KB
12017-09-21 Kevin Buettner <kevinb@redhat.com>
2
3 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4 (thread_db_thread_handle): Declare.
5 * linux-low.c (linux_target_ops): Initialize thread_handle.
6 * server.c (handle_qxfer_threads_worker): Add support for
7 "handle" attribute.
8 * target.h (struct target_ops): Add new function pointer,
9 thread_handle.
10 (target_thread_handle): Define.
11 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
12 field in lwp.
13 (thread_db_thread_handle): New function.
14
86299109
KB
152017-09-21 Kevin Buettner <kevinb@redhat.com>
16
17 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
18 * linux-low.h (thread_db_notice_clone): Declare.
19 * thread-db.c (thread_db_notice_clone): New function.
20
f557a88a
PA
212017-09-21 Pedro Alves <palves@redhat.com>
22
23 * server.c (gdb_read_memory, handle_status, process_serial_event)
24 (handle_serial_event, handle_target_event): Adjust to
25 set_desired_thread prototype change.
26 * target.c (set_desired_thread): Remove 'use_general' parameter
27 and adjust.
28 * target.h (set_desired_thread): Remove 'use_general' parameter.
29
223ffa71
TT
302017-09-20 Tom Tromey <tom@tromey.com>
31
32 * target.c (target_terminal::terminal_state): Define.
33 (target_terminal::init): Rename from target_terminal_init.
34 (target_terminal::inferior): Rename from
35 target_terminal_inferior.
36 (target_terminal::ours): Rename from target_terminal_ours.
37 (target_terminal::ours_for_output, target_terminal::info): New.
38
04fd3ba9
SM
392017-09-16 Simon Marchi <simon.marchi@ericsson.com>
40
41 * server.c (accumulate_file_name_length): Remove.
42 (emit_dll_description): Adjust to std::string change.
43 (handle_qxfer_libraries): Use std::string to hold document.
44
5e187554
SM
452017-09-16 Simon Marchi <simon.marchi@ericsson.com>
46
47 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
48 return type of xml_escape_text.
49 * server.c (emit_dll_description): Likewise.
50
1526853e
SM
512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
52
53 * server.c (captured_main): Accept argument for --selftest.
54 Update run_tests call.
55 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
56 when registering selftests.
57
c4dfafab
SDJ
582017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
59
60 * regcache.c (get_thread_regcache): Update code to use "std::vector"
61 instead of "VEC" for "target_desc.reg_defs".
62 (regcache_cpy): Likewise.
63 (registers_to_string): Likewise.
64 (registers_from_string): Likewise.
65 (find_regno): Likewise.
66 (supply_regblock): Likewise.
67 (regcache_raw_read_unsigned): Likewise.
68 * tdesc.c (init_target_desc): Likewise.
69 (tdesc_create_reg): Likewise.
70 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
71 (struct target_desc) <reg_defs>: Convert to "std::vector".
72 (target_desc): Do not initialize "reg_defs".
73 (~target_desc): Update code to use "std::vector" instead of "VEC"
74 for "target_desc.reg_defs".
75 (operator==): Likewise.
76
124aceb4
SM
772017-09-15 Simon Marchi <simon.marchi@ericsson.com>
78
79 * inferiors.h (thread_to_gdb_id): Remove.
80 * inferiors.c (thread_to_gdb_id): Remove.
81 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
82 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
83 lynx_store_registers, lynx_read_memory, lynx_write_memory):
84 Likewise.
85 * nto-low.c (nto_fetch_registers, nto_store_registers,
86 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
87
96cde54f
SM
882017-09-15 Simon Marchi <simon.marchi@ericsson.com>
89
90 * inferiors.h (gdb_id_to_thread_id): Remove.
91 * inferiors.c (gdb_id_to_thread_id): Remove.
92 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
93 removal. Move pid declaration closer to where it's used.
94
e8ca139e
SM
952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
96
97 * server.c (handle_detach): New function.
98 (process_serial_event): Move code out, call handle_detach.
99
f8a4e119
SM
1002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
101
102 * server.c (require_running): Rename to ...
103 (require_running_or_return): ... this ...
104 (require_running_or_break): ... and this.
105 (handle_query, process_serial_event): Adjust.
106
0eb0a407
SM
1072017-09-15 Simon Marchi <simon.marchi@ericsson.com>
108
109 * linux-low.c (linux_set_resume_request): Remove unused
110 variables.
111
785922a5
SM
1122017-09-15 Simon Marchi <simon.marchi@ericsson.com>
113
114 * server.c (first_thread_of): Remove.
115 (process_serial_event): Replace usage of first_thread_of with
116 find_any_thread_of_pid.
117 * tracepoint.c (same_process_p): Remove.
118 (gdb_agent_about_to_close): Replace usage of same_process_p with
119 find_any_thread_of_pid.
120 * linux-x86-low.c (same_process_callback): Remove.
121 (x86_arch_setup_process_callback): Replace usage of
122 same_process_callback with find_any_thread_of_pid.
123 * thread-db.c (any_thread_of): Remove.
124 (switch_to_process): Replace usage of any_thread_of with
125 find_any_thread_of_pid.
126 * inferiors.c (thread_pid_matches_callback): Remove.
127 (find_thread_process): Adjust to use find_any_thread_of_pid.
128
a059f00c
SDJ
1292017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
130
131 * regcache.c (get_thread_regcache): Guard calls to "memset"
132 with "!VEC_empty".
133
cc397f3a
SDJ
1342017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
135
136 * linux-low.c (handle_extended_wait): Use
137 "allocate_target_description" instead of "XNEW".
138 * linux-x86-low.c (initialize_low_arch): Likewise.
139
22916b07
YQ
1402017-09-05 Yao Qi <yao.qi@linaro.org>
141
142 * configure.srv (srv_i386_regobj): Remove.
143 (srv_amd64_regobj): Remove.
144 (srv_regobj): Set it to "" for x86 non-linux targets.
145 * linux-x86-tdesc.c (i386_linux_read_description):
146 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
147 (init_registers_i386): Remove the declaration.
148 (tdesc_i386): Remove the declaration.
149 (lynx_i386_arch_setup): Call i386_create_target_description.
150 * nto-x86-low.c: Likewise.
151 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
152 [!__x86_64__]: include arch/i386.h.
153 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
154
38602d55
YQ
1552017-09-05 Yao Qi <yao.qi@linaro.org>
156
157 * configure.srv (srv_amd64_linux_xmlfiles): Remove
158 i386/amd64-XXX-linux from it.
159
44b886ff
YQ
1602017-09-05 Yao Qi <yao.qi@linaro.org>
161
162 * configure.srv: Empty srv_amd64_linux_regobj if $development is
163 false.
164 (ipa_amd64_linux_regobj): Remove.
165 (ipa_x32_linux_regobj): Remove.
166
b4570e4b
YQ
1672017-09-05 Yao Qi <yao.qi@linaro.org>
168
169 * Makefile.in (arch-amd64.o): New rule.
170 * configure.srv: Append arch-amd64.o.
171 * linux-amd64-ipa.c: Include common/x86-xstate.h.
172 (get_ipa_tdesc): Call amd64_linux_read_description.
173 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
174 and init_registers_amd64_XXX.
175 * linux-x86-low.c (x86_linux_read_description): Call
176 amd64_linux_read_description.
177 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
178 (initialize_low_arch): Don't call init_registers_x32_XXX and
179 init_registers_amd64_XXX.
180 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
181 and tdesc_amd64_XXX.
182 [__x86_64__] (amd64_tdesc_test): New function.
183 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
184 and init_registers_amd64_XXX.
185 * linux-x86-tdesc.c: Include arch/amd64.h.
186 (xcr0_to_tdesc_idx): New function.
187 (i386_linux_read_description): New function.
188 (amd64_get_ipa_tdesc_idx): New function.
189 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
190 (amd64_get_ipa_tdesc): Declare.
191
d1f28ea2
YQ
1922017-09-05 Yao Qi <yao.qi@linaro.org>
193
194 * configure.srv (srv_i386_linux_xmlfiles): Remove
195 i386/i386-XXX-linux.xml from it.
196
25a93583
YQ
1972017-09-05 Yao Qi <yao.qi@linaro.org>
198
199 * configure.srv: Set srv_i386_linux_regobj empty if $development
200 is false.
201 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
202 initialize_low_tdesc.
203 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
204 with #if initialize_low_tdesc.
205 * linux-x86-tdesc-selftest.c: New file.
206 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
207
5f035c07
YQ
2082017-09-05 Yao Qi <yao.qi@linaro.org>
209
210 * Makefile.in (arch-i386.o): New rule.
211 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
212 (x86_64-*-linux*): Likewise.
213 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
214 include arch/i386.h.
215 (i386_linux_read_description): Remove code and call
216 i386_create_target_description.
217 * tdesc.c (allocate_target_description): New function.
218 * tdesc.h (set_tdesc_architecture): Remove declaration.
219 (set_tdesc_osabi): Likewise.
220
0abe8a89
YQ
2212017-09-05 Yao Qi <yao.qi@linaro.org>
222
223 * linux-x86-tdesc.c: Don't include <inttypes.h>.
224 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
225 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
226 .xmltarget.
227 * server.c (get_features_xml): Call tdesc_get_features_xml.
228 * tdesc.c (set_tdesc_architecture): New function.
229 (set_tdesc_osabi): New function.
230 (tdesc_get_features_xml): New function.
231 (tdesc_create_feature): Add an argument.
232 * tdesc.h (struct target_desc) <features>: New field.
233 <arch, osabi>: New field.
234 (~target_desc): xfree features, arch, and osabi.
235 (target_desc::oerator==): Don't compare .xmltarget.
236 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
237 (set_tdesc_osabi): Likewise.
238 (tdesc_get_features_xml): Likewise.
239
0a188386
YQ
2402017-09-05 Yao Qi <yao.qi@linaro.org>
241
242 * linux-x86-tdesc.c: Include selftest.h.
243 (i386_tdesc_test): New function.
244 (initialize_low_tdesc): Call selftests::register_test.
245 * tdesc.h: Include regdef.h.
246 (target_desc): Override operator == and !=.
247
f49ff000
YQ
2482017-09-05 Yao Qi <yao.qi@linaro.org>
249
250 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
251 (ipa_obj): Likewise.
252 * linux-i386-ipa.c: Include common/x86-xstate.h
253 (get_ipa_tdesc): Call i386_linux_read_description.
254 (initialize_low_tracepoint): Don't call init_registers_XXX
255 functions, call initialize_low_tdesc instead.
256 * linux-x86-low.c (x86_linux_read_description): Call
257 i386_linux_read_description.
258 (initialize_low_arch): Don't call init_registers_i386_XXX
259 functions, call initialize_low_tdesc.
260 * linux-x86-tdesc.c: New file.
261 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
262 (i386_get_ipa_tdesc_idx): Declare.
263 (i386_get_ipa_tdesc): Declare.
264 (initialize_low_tdesc): Declare.
265
2b68ef2f
YQ
2662017-09-05 Yao Qi <yao.qi@linaro.org>
267
268 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
269 instead of 0.
270
f7000548
YQ
2712017-09-05 Yao Qi <yao.qi@linaro.org>
272
273 * Makefile.in (IPA_OBJS): Add vec-ipa.o
274 * regcache.c (get_thread_regcache): Use VEC_length.
275 (init_register_cache): Likewise.
276 (regcache_cpy): Likewise.
277 (registers_to_string): Iterate reg_defs via VEC_iterate.
278 (find_regno): Likewise.
279 (find_register_by_number): Use VEC_index.
280 (register_size): Call find_register_by_number.
281 (register_data): Call find_register_by_number.
282 (supply_regblock): Use VEC_length.
283 (regcache_raw_read_unsigned): Likewise.
284 * tdesc.c (init_target_desc): Iterate reg_defs via
285 VEC_iterate.
286 (default_description): Update initializer.
287 (copy_target_description): Don't update field num_registers.
288 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
289 <num_registers>: Remove.
290
50a421ac
SM
2912017-09-04 Simon Marchi <simon.marchi@ericsson.com>
292
293 * Makefile.in (.SECONDARY): Define target.
294
23fdd69e
SM
2952017-09-03 Simon Marchi <simon.marchi@ericsson.com>
296
297 * linux-low.c (linux_wait_1): Adjust.
298 * server.c (queue_stop_reply_callback): Adjust.
299
0a2dde4a
SDJ
3002017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
303 QEnvironmentUnset and QEnvironmentReset packets.
304 (handle_query): Inform remote that QEnvironmentHexEncoded,
305 QEnvironmentUnset and QEnvironmentReset are supported.
306
6afd337d
SM
3072017-08-25 Simon Marchi <simon.marchi@ericsson.com>
308
309 * inferiors.h (inferior_target_data): Rename to ...
310 (thread_target_data): ... this.
311 (inferior_regcache_data): Rename to ...
312 (thread_regcache_data): ... this.
313 (set_inferior_regcache_data): Rename to ...
314 (set_thread_regcache_data): ... this.
315 * inferiors.c (inferior_target_data): Rename to ...
316 (thread_target_data): ... this.
317 (inferior_regcache_data): Rename to ...
318 (thread_regcache_data): ... this.
319 (set_inferior_regcache_data): Rename to ...
320 (set_thread_regcache_data): ... this.
321 (free_one_thread): Update.
322 * linux-low.h (get_thread_lwp): Update.
323 * regcache.c (get_thread_regcache): Update.
324 (regcache_invalidate_thread): Update.
325 (free_register_cache_thread): Update.
326 * win32-i386-low.c (update_debug_registers_callback): Update.
327 (win32_get_current_dr): Update.
328 * win32-low.c (thread_rec): Update.
329 (delete_thread_info): Update.
330 (continue_one_thread): Update.
331 (suspend_one_thread): Update.
332
a160cc46
SM
3332017-08-24 Simon Marchi <simon.marchi@ericsson.com>
334
335 * inferiors.c (set_inferior_target_data): Remove.
336 * inferiors.h (set_inferior_target_data): Remove.
337
6d580b63
YQ
3382017-08-18 Yao Qi <yao.qi@linaro.org>
339
340 * Makefile.in (OBS): Add selftest.o.
341 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
342 * configure, config.in: Re-generated.
343 * server.c: Include common/sefltest.h.
344 (captured_main): Handle option --selftest.
345
f5a29eb0
YQ
3462017-08-09 Yao Qi <yao.qi@linaro.org>
347
348 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
349 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
350 i386-avx-mpx.o and i386-mmx.o.
351 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
352 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
353 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
354 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
355 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
356 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
357 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
358 i386/amd64-avx-mpx.xml.
359
57757c2f
YQ
3602017-08-09 Yao Qi <yao.qi@linaro.org>
361
362 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
363 and x32-avx-avx512.o.
364 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
365 i386/x32-avx-avx512.xml.
366
229d26fc
SM
3672017-07-26 Simon Marchi <simon.marchi@ericsson.com>
368
369 * tracepoint.h (enum class fast_tpoint_collect_result): New
370 enumeration.
371 (fast_tracepoint_collecting): Change return type to
372 fast_tpoint_collect_result.
373 * tracepoint.c (fast_tracepoint_collecting): Likewise.
374 * linux-low.h: Include tracepoint.h.
375 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
376 fast_tpoint_collect_result.
377 * linux-low.c (handle_tracepoints): Adjust.
378 (linux_fast_tracepoint_collecting): Change return type to
379 fast_tpoint_collect_result.
380 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
381 linux_wait_1, stuck_in_jump_pad_callback,
382 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
383 proceed_one_lwp): Adjust to type change.
384
2e1e43e1
YQ
3852017-07-10 Yao Qi <yao.qi@linaro.org>
386
387 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
388
adc764e7
YQ
3892017-06-29 Yao Qi <yao.qi@linaro.org>
390
391 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
392 Remove.
393 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
394
a206891a
SM
3952017-06-20 Simon Marchi <simon.marchi@ericsson.com>
396
397 * Makefile.in (IPA_OBJS): Sort and format one item per line.
398
9a6c7d9c
SDJ
3992017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
400
401 * linux-low.c (linux_create_inferior): Adjust code to access the
402 environment information via 'gdb_environ' class.
403 * lynx-low.c (lynx_create_inferior): Likewise.
404 * server.c (our_environ): Make it an instance of 'gdb_environ'.
405 (get_environ): Return a pointer to 'our_environ'.
406 (captured_main): Initialize 'our_environ'.
407 * server.h (get_environ): Adjust prototype.
408 * spu-low.c (spu_create_inferior): Adjust code to access the
409 environment information via 'gdb_environ' class.
410
ae3e2ccf
SM
4112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
412
413 * linux-low.c (linux_read_memory, linux_write_memory): Remove
414 usage of "register" keyword.
415
3e019bdc
SM
4162017-06-17 Simon Marchi <simon.marchi@ericsson.com>
417
418 * configure: Re-generate.
419
8465943a
SM
4202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
421
422 * configure: Re-generate.
423
cf0dd6f0
SM
4242017-06-17 Simon Marchi <simon.marchi@ericsson.com>
425
426 * Makefile.in (COMPILE.pre): Add "-x c++".
427
9845682b
SDJ
4282017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
429
430 * fork-child.c: Conditionally include <signal.h>.
431
aefd8b33
SDJ
4322017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
433
434 * server.c (handle_general_set): Handle new packet
435 "QStartupWithShell".
436 (handle_query): Add "QStartupWithShell" to the list of supported
437 packets.
438 (gdbserver_usage): Add help text explaining the
439 new "--startup-with-shell" and "--no-startup-with-shell" CLI
440 options.
441 (captured_main): Recognize and act upon the presence of the new
442 CLI options.
443
2090129c
SDJ
4442017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
445 Pedro Alves <palves@redhat.com>
446
447 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
448 * configure: Regenerate.
449 * configure.srv (srv_linux_obj): Add "fork-child.o" and
450 "fork-inferior.o".
451 (i[34567]86-*-lynxos*): Likewise.
452 (spu*-*-*): Likewise.
453 * fork-child.c: New file.
454 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
455 and "environ.h".
456 (linux_ptrace_fun): New function.
457 (linux_create_inferior): Adjust function prototype to reflect
458 change on "target.h". Adjust function code to use
459 "fork_inferior".
460 (linux_request_interrupt): Delete "signal_pid".
461 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
462 (lynx_ptrace_fun): New function.
463 (lynx_create_inferior): Adjust function prototype to reflect
464 change on "target.h". Adjust function code to use
465 "fork_inferior".
466 * nto-low.c (nto_create_inferior): Adjust function prototype and
467 code to reflect change on "target.h". Update comments.
468 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
469 "common-terminal.h" and "environ.h".
470 (terminal_fd): Moved to fork-child.c.
471 (old_foreground_pgrp): Likewise.
472 (restore_old_foreground_pgrp): Likewise.
473 (last_status): Make it global.
474 (last_ptid): Likewise.
475 (our_environ): New variable.
476 (startup_with_shell): Likewise.
477 (program_name): Likewise.
478 (program_argv): Rename to...
479 (program_args): ...this.
480 (wrapper_argv): New variable.
481 (start_inferior): Delete function.
482 (get_exec_wrapper): New function.
483 (get_exec_file): Likewise.
484 (get_environ): Likewise.
485 (prefork_hook): Likewise.
486 (post_fork_inferior): Likewise.
487 (postfork_hook): Likewise.
488 (postfork_child_hook): Likewise.
489 (handle_v_run): Update code to deal with arguments coming from the
490 remote host. Update calls from "start_inferior" to
491 "create_inferior".
492 (captured_main): Likewise. Initialize environment variable. Call
493 "have_job_control".
494 * server.h (post_fork_inferior): New prototype.
495 (get_environ): Likewise.
496 (last_status): Declare.
497 (last_ptid): Likewise.
498 (signal_pid): Likewise.
499 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
500 (spu_ptrace_fun): New function.
501 (spu_create_inferior): Adjust function prototype to reflect change
502 on "target.h". Adjust function code to use "fork_inferior".
503 * target.c (target_terminal_init): New function.
504 (target_terminal_inferior): Likewise.
505 (target_terminal_ours): Likewise.
506 * target.h: Include <vector>.
507 (struct target_ops) <create_inferior>: Update prototype.
508 (create_inferior): Update macro.
509 * utils.c (gdb_flush_out_err): New function.
510 * win32-low.c (win32_create_inferior): Adjust function prototype
511 and code to reflect change on "target.h".
512
043a4934
SDJ
5132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
514
515 * inferiors.c (switch_to_thread): New function.
516
15652511
SDJ
5172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
518
519 * Makefile.in (SFILE): Add "common/job-control.c".
520 (OBS): Add "job-control.o".
521
21ea5acd
SDJ
5222017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
523
524 * Makefile: Remove "@host_makefile_frag@".
525
e13cb306
PA
5262017-05-05 Pedro Alves <palves@redhat.com>
527
528 * configure: Regenerate.
529
c94fee56
SDJ
5302017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
531
532 * configure: Regenerate.
533
a0ff9e1a
SM
5342017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
535
536 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
537 software_single_step change of return type to
538 std::vector<CORE_ADDR>.
539 * linux-low.c (install_software_single_step_breakpoints):
540 Likewise.
541 * linux-low.h (install_software_single_step_breakpoints):
542 Likewise.
543
be628ab8
SDJ
5442017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
545
546 * remote-utils.c: Include "gdb_termios.h" instead of
547 "terminal.h".
548 * terminal.h: Delete file.
549
7c5ded6a
SDJ
5502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
551
552 * server.c: Include <vector>.
553 <program_argv, wrapper_argv>: Convert to std::vector.
554 (start_inferior): Rewrite function to use C++.
555 (handle_v_run): Likewise. Update code that calculates the argv
556 based on the vRun packet; use C++.
557 (captured_main): Likewise.
558
436252de
SM
5592017-04-06 Simon Marchi <simon.marchi@ericsson.com>
560
561 * server.c (handle_v_cont): Initialize thread_resume::thread
562 with null_ptid.
563
9bf2a700
PA
5642017-04-05 Pedro Alves <palves@redhat.com>
565
566 * configure: Regenerate.
567
a121b7c1
PA
5682017-04-05 Pedro Alves <palves@redhat.com>
569
570 * gdbreplay.c (sync_error): Constify.
571 * linux-x86-low.c (push_opcode): Constify.
572
21c8a587
PA
5732017-04-05 Pedro Alves <palves@redhat.com>
574
575 * win32-low.c (get_child_debug_event)
576 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
577 Report TARGET_WAITKIND_SPURIOUS instead.
578
fb32b4f7
PA
5792017-04-05 Pedro Alves <palves@redhat.com>
580
581 * remote-utils.c (remote_prepare, remote_open): Constify.
582 * remote-utils.h (remote_prepare, remote_open): Constify.
583 * server.c (captured_main): Constify 'port' handling.
584
65dd1e59
SM
5852017-04-04 Simon Marchi <simon.marchi@ericsson.com>
586
587 * Makefile.in (clean): Clear .deps.
588
8fa5b777
SM
5892017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
590
591 * .gitignore: Remove generated files, replace with wildcard.
592 * (clean): Replace removal of generated files with wildcard.
593 (version.c): Replace with...
594 (version-generated.c): ...this.
595 (xml-builtin.c): Replace with...
596 (xml-builtin-generated.c): ...this.
597 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
598 (%.c: *regformats*): Replace with...
599 (%-generated.c: *regformats*): ...this.
600
a12e714b
MF
6012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
602
603 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
604 (xtensa_fill_gregset): Call collect_register_by_name for
605 threadptr register.
606 (xtensa_store_gregset): Call supply_register_by_name for
607 threadptr register.
608
1a09b50a
MF
6092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
610
611 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
612 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
613 (xtensa_store_gregset): Call supply_register for all registers in
614 a0_regnum..a0_regnum + C0_NREGS range.
615
1a01e7c6
SM
6162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
619 (ax-ipa.o: ax.c): Remove.
620 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
621 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
622 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
623 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
624 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
625
36bc18a8
SM
6262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
627
628 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
629 (print-utils-ipa.o: ../common/print-utils.c): Remove.
630 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
631 (errors-ipa.o: ../common/errors.c): Remove.
632 (format-ipa.o: ../common/format.c): Remove.
633 (common-utils-ipa.o: ../common/common-utils.c): Remove.
634
a8ebe3d5
SM
6352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
636
637 * Makefile.in (%-ipa.o: %.c): New rule.
638 (tracepoint-ipa.o: tracepoint.c): Remove.
639 (utils-ipa.o: utils.c): Remove.
640 (remote-utils-ipa.o: remote-utils.c): Remove.
641 (regcache-ipa.o: regcache.c): Remove.
642 (i386-linux-ipa.o: i386-linux.c): Remove.
643 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
644 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
645 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
646 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
647 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
648 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
649 (amd64-linux-ipa.o: amd64-linux.c): Remove.
650 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
651 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
652 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
653 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
654 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
655 (aarch64-ipa.o: aarch64.c): Remove.
656 (s390-linux32-ipa.o: s390-linux32.c): Remove.
657 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
658 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
659 (s390-linux64-ipa.o: s390-linux64.c): Remove.
660 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
661 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
662 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
663 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
664 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
665 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
666 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
667 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
668 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
669 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
670 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
671 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
672 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
673 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
674 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
675 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
676 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
677 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
678 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
679 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
680 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
681 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
682 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
683 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
684 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
685 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
686 (tdesc-ipa.o: tdesc.c): Remove.
687 (x32-linux-ipa.o: x32-linux.c): Remove.
688 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
689 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
690
50cfacb7
SM
6912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * Makefile.in (%.o: ../arch/%.c): New rule.
694 (arm.o: ../arch/arm.c): Remove.
695 (arm-linux.o: ../arch/arm-linux.c): Remove.
696 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
697 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
698
c5a22423
SM
6992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * Makefile.in (%.o: ../nat/%.c): New rule.
702 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
703 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
704 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
705 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
706 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
707 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
708 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
709 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
710 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
711 (linux-personality.o: ../nat/linux-personality.c): Remove.
712 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
713 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
714 (x86-linux.o: ../nat/x86-linux.c): Remove.
715 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
716 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
717
6bda016b
SM
7182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * Makefile.in (%.o: ../common/%.c): New rule.
721 (signals.o: ../common/signals.c): Remove.
722 (print-utils.o: ../common/print-utils.c): Remove.
723 (rsp-low.o: ../common/rsp-low.c): Remove.
724 (common-utils.o: ../common/common-utils.c): Remove.
725 (posix-strerror.o: ../common/posix-strerror.c): Remove.
726 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
727 (vec.o: ../common/vec.c): Remove.
728 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
729 (xml-utils.o: ../common/xml-utils.c): Remove.
730 (ptid.o: ../common/ptid.c): Remove.
731 (buffer.o: ../common/buffer.c): Remove.
732 (format.o: ../common/format.c): Remove.
733 (filestuff.o: ../common/filestuff.c): Remove.
734 (agent.o: ../common/agent.c): Remove.
735 (errors.o: ../common/errors.c): Remove.
736 (environ.o: ../common/environ.c): Remove.
737 (common-debug.o: ../common/common-debug.c): Remove.
738 (cleanups.o: ../common/cleanups.c): Remove.
739 (common-exceptions.o: ../common/common-exceptions.c): Remove.
740 (fileio.o: ../common/fileio.c): Remove.
741 (common-regcache.o: ../common/common-regcache.c): Remove.
742 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
743 (new-op.o: ../common/new-op.c): Remove.
744 (btrace-common.o: ../common/btrace-common.c): Remove.
745
21122961
SM
7462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
747
748 * Makefile.in (%.o: ../target/%.c): New rule.
749 (waitstatus.o: ../target/waitstatus.c): Remove.
750
c362e621
SM
7512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
752
753 * Makefile.in
754 (%.c: ../regformats/%.dat,
755 (%.c: ../regformats/arm/%.dat,
756 (%.c: ../regformats/i386/%.dat,
757 (%.c: ../regformats/rs6000/%.dat): New rules.
758 (aarch64.c): Remove.
759 (reg-arm.c): Remove.
760 (arm-with-iwmmxt.c): Remove.
761 (arm-with-vfpv2.c): Remove.
762 (arm-with-vfpv3.c): Remove.
763 (arm-with-neon.c): Remove.
764 (reg-bfin.c): Remove.
765 (reg-cris.c): Remove.
766 (reg-crisv32.c): Remove.
767 (i386.c): Remove.
768 (i386-linux.c): Remove.
769 (i386-avx.c): Remove.
770 (i386-avx-linux.c): Remove.
771 (i386-avx-avx512.c): Remove.
772 (i386-avx-avx512-linux.c): Remove.
773 (i386-mpx.c): Remove.
774 (i386-mpx-linux.c): Remove.
775 (i386-avx-mpx-avx512-pku.c): Remove.
776 (i386-avx-mpx-avx512-pku-linux.c): Remove.
777 (i386-avx-mpx.c): Remove.
778 (i386-avx-mpx-linux.c): Remove.
779 (i386-mmx.c): Remove.
780 (i386-mmx-linux.c): Remove.
781 (reg-ia64.c): Remove.
782 (reg-m32r.c): Remove.
783 (reg-m68k.c): Remove.
784 (reg-cf.c): Remove.
785 (mips-linux.c): Remove.
786 (mips-dsp-linux.c): Remove.
787 (mips64-linux.c): Remove.
788 (mips64-dsp-linux.c): Remove.
789 (nios2-linux.c): Remove.
790 (powerpc-32.c): Remove.
791 (powerpc-32l.c): Remove.
792 (powerpc-altivec32l.c): Remove.
793 (powerpc-cell32l.c): Remove.
794 (powerpc-vsx32l.c): Remove.
795 (powerpc-isa205-32l.c): Remove.
796 (powerpc-isa205-altivec32l.c): Remove.
797 (powerpc-isa205-vsx32l.c): Remove.
798 (powerpc-e500l.c): Remove.
799 (powerpc-64l.c): Remove.
800 (powerpc-altivec64l.c): Remove.
801 (powerpc-cell64l.c): Remove.
802 (powerpc-vsx64l.c): Remove.
803 (powerpc-isa205-64l.c): Remove.
804 (powerpc-isa205-altivec64l.c): Remove.
805 (powerpc-isa205-vsx64l.c): Remove.
806 (s390-linux32.c): Remove.
807 (s390-linux32v1.c): Remove.
808 (s390-linux32v2.c): Remove.
809 (s390-linux64.c): Remove.
810 (s390-linux64v1.c): Remove.
811 (s390-linux64v2.c): Remove.
812 (s390-te-linux64.c): Remove.
813 (s390-vx-linux64.c): Remove.
814 (s390-tevx-linux64.c): Remove.
815 (s390x-linux64.c): Remove.
816 (s390x-linux64v1.c): Remove.
817 (s390x-linux64v2.c): Remove.
818 (s390x-te-linux64.c): Remove.
819 (s390x-vx-linux64.c): Remove.
820 (s390x-tevx-linux64.c): Remove.
821 (tic6x-c64xp-linux.c): Remove.
822 (tic6x-c64x-linux.c): Remove.
823 (tic6x-c62x-linux.c): Remove.
824 (reg-sh.c): Remove.
825 (reg-sparc64.c): Remove.
826 (reg-spu.c): Remove.
827 (amd64.c): Remove.
828 (amd64-linux.c): Remove.
829 (amd64-avx.c): Remove.
830 (amd64-avx-linux.c): Remove.
831 (amd64-avx-avx512.c): Remove.
832 (amd64-avx-avx512-linux.c): Remove.
833 (amd64-mpx.c): Remove.
834 (amd64-mpx-linux.c): Remove.
835 (amd64-avx-mpx-avx512-pku.c): Remove.
836 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
837 (amd64-avx-mpx.c): Remove.
838 (amd64-avx-mpx-linux.c): Remove.
839 (x32.c): Remove.
840 (x32-linux.c): Remove.
841 (x32-avx.c): Remove.
842 (x32-avx-linux.c): Remove.
843 (x32-avx-avx512.c): Remove.
844 (x32-avx-avx512-linux.c): Remove.
845 (reg-xtensa.c): Remove.
846 (reg-tilegx.c): Remove.
847 (reg-tilegx32.c): Remove.
848
1672e0d9
SDJ
8492017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
850
851 * Makefile.in (SFILES): Add "common/environ.c".
852 (OBJS): Add "common/environ.h".
853
239b6d10
WT
8542017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
855
856 * configure.ac: Check if the fs_base and gs_base members of
857 `struct user_regs_struct' exist.
858 * config.in: Regenerated.
859 * configure: Likewise.
860
694b382c
AT
8612017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
862
863 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
864 target_read_memory.
865 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
866 (get_next_pcs_syscall_next_pc): Likewise.
867
7dc53023
LM
8682016-12-23 Luis Machado <lgustavo@codesourcery.com>
869
870 * win32-i386-low.c: Fix incorrect reference to a couple source files.
871 * nto-x86-low.c: Likewise.
872
ad02e4fe
SM
8732016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
874
875 * Makefile.in: Include disable-implicit-rules.mk.
876
dcb07cfa
PA
8772016-11-23 Pedro Alves <palves@redhat.com>
878
879 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
880 (debug_vprintf): Use std::chrono::steady_clock instead of
881 gettimeofday. Use '.' instead of ':'.
882 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
883 (get_timestamp): Use std::chrono::steady_clock instead of
884 gettimeofday.
885
8629c02c
SM
8862016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
887
888 * Makefile.in: Fix whitespace formatting.
889
b593ecca
SM
8902016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
891
892 * Makefile.in (SFILES, OBS): Flatten list and order
893 alphabetically.
894
9986ba08
PA
8952016-11-23 Pedro Alves <palves@redhat.com>
896
897 * event-loop.c (handle_file_event): Use warning.
898 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
899 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
900 Use warning.
901
4eefa7bc
PA
9022016-11-23 Pedro Alves <palves@redhat.com>
903
904 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
905 output.
906 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
907 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
908 debug_printf and debug_flush for debug output.
909 * server.c (handle_general_set): Likewise.
910 * thread-db.c (try_thread_db_load): Use debug_printf for debug
911 output.
912
5443506e
SM
9132016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
914
915 * Makefile.in (.c.o): Replace rule with ...
916 (%.o: %.c): ... this one.
917
3b165252
SM
9182016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
919
920 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
921 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
922 make.
923 * configure.ac: Remove checks for the make program.
924 * configure: Re-generate.
925
0bcda685
PA
9262016-10-28 Pedro Alves <palves@redhat.com>
927
928 * Makefile.in (CXX_DIALECT): Get from configure.
929 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
930 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
931 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
932 * config.in: Regenerate.
933 * configure: Regenerate.
934
c3805894
YQ
9352016-10-27 Yao Qi <yao.qi@linaro.org>
936
937 * linux-low.c (linux_supports_range_stepping): Return true if
938 can_software_single_step return true.
939
89342618
YQ
9402016-10-27 Yao Qi <yao.qi@linaro.org>
941
942 * inferiors.c (find_inferior_in_random): New function.
943 * inferiors.h (find_inferior_in_random): Declare.
944 * linux-low.c (linux_wait_for_event_filtered): Call
945 find_inferior_in_random instead of find_inferior.
946
e3652c84
YQ
9472016-10-27 Yao Qi <yao.qi@linaro.org>
948
949 * linux-low.c (linux_wait_1): If single-step breakpoints are
950 inserted, remove them.
951
5a04c4cf
PA
9522016-10-26 Pedro Alves <palves@redhat.com>
953
954 * linux-low.c (handle_extended_wait): Link parent/child fork
955 threads.
956 (linux_wait_1): Unlink them.
957 (linux_set_resume_request): Ignore resume requests for
958 already-resumed and unhandled fork child threads.
959 * linux-low.h (struct lwp_info) <fork_relative>: New field.
960 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
961 New functions.
962 (handle_v_requests) <vCont>: Don't call require_running.
963 * server.h (in_queued_stop_replies): New declaration.
964
cb93dc7f
YQ
9652016-10-24 Yao Qi <yao.qi@linaro.org>
966
967 PR server/20733
968 * linux-aarch64-low.c (append_insns): Cast the return value to
969 'uint32_t *'.
970
a1078bea
YQ
9712016-10-10 Yao Qi <yao.qi@linaro.org>
972
973 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
974
1fb77080
SDJ
9752016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
976
977 * target.c (target_supports_multi_process): New function, moved
978 from...
979 * target.h (target_supports_multi_process): ... here. Remove
980 macro.
981
39b5a3b9
TT
9822016-10-05 Tom Tromey <tom@tromey.com>
983
984 PR remote/20655:
985 * tracepoint.c (handle_tracepoint_bkpts): Check
986 ipa_error_tracepoint, not ipa_stopping_tracepoint.
987
c1d0b70a
YQ
9882016-10-05 Yao Qi <yao.qi@linaro.org>
989
990 * configure.srv: Update the path of arm-*.xml files.
991
0a69eedb
YQ
9922016-10-05 Terry Guo <terry.guo@arm.com>
993 Yao Qi <yao.qi@linaro.org>
994
995 * Makefile.in: Adjust the path of rules.
996 * configure.srv: Update the path of xml files.
997 * regformats/arm-with-iwmmxt.dat: Regenerated.
998 * regformats/arm-with-neon.dat: Likewise.
999 * regformats/arm-with-vfpv2.dat: Likewise.
1000 * regformats/arm-with-vfpv3.dat Likewise.
1001
17e16485
YQ
10022016-09-30 Yao Qi <yao.qi@linaro.org>
1003
1004 PR gdbserver/20627
1005 * target.c (target_stop_and_wait): Don't call
1006 target_continue_no_signal, use resume_stop instead.
1007
edeeb602
YQ
10082016-09-26 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-low.c (linux_wait_1): Call debug_exit.
1011
503b1c39
PA
10122016-09-23 Pedro Alves <palves@redhat.com>
1013
1014 * Makefile.in (SFILES): Add common/new-op.c.
1015 (OBS): Add common/new-op.o.
1016 (new-op.o): New rule.
1017
74172ecf
SM
10182016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * .gitinore: Ignore more files.
1021
fc6cda2e
YQ
10222016-09-21 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1025 23.
1026
bc1e6c81
SDJ
10272016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1028
1029 * server.c (start_inferior): Call target_mourn_inferior instead of
1030 mourn_inferior; pass ptid_t argument to it.
1031 (resume): Likewise.
1032 (handle_target_event): Likewise.
1033 * target.c (target_mourn_inferior): New function.
1034 * target.h (mourn_inferior): Delete macro.
1035
0e00e962
AA
10362016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1037
1038 * linux-low.c (lwp_is_stepping): New function.
1039
1d8cb77d
CL
10402016-09-06 Carl Love <cel@us.ibm.com>
1041
1042 * server.c (start_inferior): Fixed comment, requested comment change
1043 didn't get updated correctly. Removed reference to ptrace () call as
1044 it is only true on Linux systems.
1045
7313bced
CL
10462016-09-06 Carl Love <cel@us.ibm.com>
1047
1048 * server.c (start_inferior): Do not call
1049 function target_post_create_inferior () if the
1050 inferior process has already exited.
1051
cf6de44d
PA
10522016-09-05 Pedro Alves <palves@redhat.com>
1053
1054 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1055 (COMPILE.pre, CC_LD): Use CXX directly.
1056 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1057 * acinclude.m4: Don't include build-with-cxx.m4.
1058 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1059 * configure: Regenerate.
1060
c1da6748
AT
10612016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1062
1063 PR gdb/19495
1064 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1065 call writing data to own_buf.
1066
f2b9e3df
SDJ
10672016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1068
1069 * target.c (mywait): Call target_wait instead of
1070 the_target->wait.
1071 (target_wait): New function.
1072
049a8570
SDJ
10732016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1074
1075 * server.c (start_inferior): New variable 'ptid'. Replace calls
1076 to the_target->resume by target_continue{,_no_signal}, depending
1077 on the case.
1078 * target.c (target_stop_and_wait): Call target_continue_no_signal
1079 instead of the_target->resume.
1080 (target_continue): New function.
1081
3aa5cfa0
AT
10822016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1083
1084 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1085
754653a7
AZ
10862016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1087
1088 PR server/20491
1089 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1090 ps_prochandle.
1091 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1092 * linux-arm-low.c (ps_get_thread_area): Likewise.
1093 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1094 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1095 * linux-mips-low.c (ps_get_thread_area): Likewise.
1096 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1097 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1098 * linux-x86-low.c (ps_get_thread_area): Likewise.
1099 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1100
ed036b40
PA
11012016-08-19 Pedro Alves <palves@redhat.com>
1102
1103 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1104
c8ef42ee
PA
11052016-08-19 Pedro Alves <palves@redhat.com>
1106
1107 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1108 comment. Use memcpy instead of casting through unsigned long.
1109
9c235a72
PA
11102016-08-19 Pedro Alves <palves@redhat.com>
1111
1112 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1113 allocating around 0x80000000.
1114
201506da
PA
11152016-08-19 Pedro Alves <palves@redhat.com>
1116
1117 PR gdb/20415
1118 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1119 (x32-avx512-linux-ipa.o): New rules.
1120 * configure.ac (x86_64-*-linux*): New x32 check.
1121 * configure.srv (ipa_x32_linux_regobj): New.
1122 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1123 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1124 descriptions.
1125 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1126 descriptions.
1127 * configure: Regenerate.
1128
f348d89a
PA
11292016-08-09 Pedro Alves <palves@redhat.com>
1130
1131 PR gdb/18653
1132 * Makefile.in (OBS): Add signals-state-save-restore.o.
1133 (signals-state-save-restore.o): New rule.
1134 * config.in: Regenerate.
1135 * configure: Regenerate.
1136 * linux-low.c: Include "signals-state-save-restore.h".
1137 (linux_create_inferior): Call
1138 restore_original_signals_state.
1139 * server.c: Include "dispositions-save-restore.h".
1140 (captured_main): Call save_original_signals_state.
1141
1baf5149
PA
11422016-08-05 Pedro Alves <palves@redhat.com>
1143
1144 * configure: Regenerate.
1145
fcd4a73d
YQ
11462016-08-04 Yao Qi <yao.qi@linaro.org>
1147
1148 * linux-low.c (regsets_fetch_inferior_registers): Check
1149 errno is ESRCH or not.
1150
979659d0
YQ
11512016-08-02 Yao Qi <yao.qi@linaro.org>
1152
1153 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1154 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1155 (thread_db_load_search): Update.
1156 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1157 td_ta_set_event and td_ta_event_getmsg.
1158
6598661d
PA
11592016-07-26 Pedro Alves <palves@redhat.com>
1160
1161 PR server/20414
1162 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1163 of unsigned long for 64-bit registers and use uint32_t instead of
1164 unsigned int for 32-bit registers.
1165
9cf12d57
PA
11662016-07-26 Pedro Alves <palves@redhat.com>
1167
1168 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1169 to 'ptrace'.
1170
305450ed
TT
11712016-07-21 Tom Tromey <tom@tromey.com>
1172
1173 * configure: Rebuild.
1174
2583da7c
YQ
11752016-07-21 Yao Qi <yao.qi@linaro.org>
1176
1177 * mem-break.c (find_gdb_breakpoint): Cast bp to
1178 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1179
21536b36
YQ
11802016-07-21 Yao Qi <yao.qi@linaro.org>
1181
1182 * server.c (handle_v_requests): Support s and S actions
1183 if target_supports_software_single_step return true.
1184
8901d193
YQ
11852016-07-21 Yao Qi <yao.qi@linaro.org>
1186
1187 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1188 is resume_step, call maybe_hw_step.
1189 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1190 and unstop them.
1191 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1192 breakpoints or not.
1193 (proceed_one_lwp): If resume request is resume_step, install
1194 reinsert breakpoints and call maybe_hw_step.
1195
0e9a339e
YQ
11962016-07-21 Yao Qi <yao.qi@linaro.org>
1197
1198 * linux-low.c (proceed_one_lwp): Declare.
1199 (linux_resume_one_thread): Remove local variable 'step'.
1200 Lift code enqueue signal. Call proceed_one_lwp instead of
1201 linux_resume_one_lwp.
1202
4281b351
YQ
12032016-07-21 Yao Qi <yao.qi@linaro.org>
1204
1205 * linux-low.c (linux_resume_one_thread): Call
1206 enqueue_pending_signal.
1207
984a2c04
YQ
12082016-07-21 Yao Qi <yao.qi@linaro.org>
1209
1210 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1211 * inferiors.c (do_restore_current_thread_cleanup): New function.
1212 (make_cleanup_restore_current_thread): Likewise.
1213 * linux-low.c (install_software_single_step_breakpoints): Call
1214 make_cleanup_restore_current_thread. Switch current_thread to
1215 thread.
1216
bec903c9
YQ
12172016-07-21 Yao Qi <yao.qi@linaro.org>
1218
1219 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1220 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1221 (clone_one_breakpoint): Likewise.
1222 (delete_reinsert_breakpoints): Change parameter to thread.
1223 Callers updated.
1224 (has_reinsert_breakpoints): Likewise.
1225 (uninsert_reinsert_breakpoints): Likewise.
1226 (reinsert_reinsert_breakpoints): Likewise.
1227 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1228 (delete_reinsert_breakpoints): Likewise.
1229 (reinsert_reinsert_breakpoints): Likewise.
1230 (uninsert_reinsert_breakpoints): Likewise.
1231 (has_reinsert_breakpoints): Likewise.
1232
63c40ec7
YQ
12332016-07-21 Yao Qi <yao.qi@linaro.org>
1234
1235 * inferiors.c (get_thread_process): Make parameter const.
1236 * inferiors.h (get_thread_process): Update declaration.
1237 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1238 Add new parameters child_thread and parent_thread. Callers
1239 updated.
1240 * mem-break.h (clone_all_breakpoints): Update declaration.
1241
9aa76cd0
YQ
12422016-07-21 Yao Qi <yao.qi@linaro.org>
1243
1244 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1245 <command_list, handler>: Remove.
1246 (struct gdb_breakpoint): New.
1247 (struct other_breakpoint): New.
1248 (struct reinsert_breakpoint): New.
1249 (is_gdb_breakpoint): New function.
1250 (any_persistent_commands): Update command_list if
1251 is_gdb_breakpoint returns true.
1252 (set_breakpoint): Create breakpoints according to their types.
1253 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1254 (set_gdb_breakpoint_1): Likewise.
1255 (set_gdb_breakpoint): Likewise.
1256 (clear_breakpoint_conditions): Change parameter type to
1257 'struct gdb_breakpoint *'.
1258 (clear_breakpoint_commands): Likewise.
1259 (clear_breakpoint_conditions_and_commands): Likewise.
1260 (add_condition_to_breakpoint): Likewise.
1261 (add_breakpoint_condition): Likewise.
1262 (add_commands_to_breakpoint): Likewise.
1263 (check_breakpoints): Check other_breakpoint.
1264 (clone_one_breakpoint): Clone breakpopint according to its type.
1265 * mem-break.h (struct gdb_breakpoint): Declare.
1266 (set_gdb_breakpoint): Update declaration.
1267 (clear_breakpoint_conditions_and_commands): Likewise.
1268 (add_breakpoint_condition): Likewise.
1269 (add_breakpoint_commands): Likewise.
1270 * server.c (process_point_options): Change parameter type to
1271 'struct gdb_breakpoint *'.
1272
811f8301
YQ
12732016-07-21 Yao Qi <yao.qi@linaro.org>
1274
1275 * mem-break.c (set_breakpoint_at): Rename it to ...
1276 (set_breakpoint_type_at): ... it.
1277 (set_breakpoint_at): Call set_breakpoint_type_at.
1278 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1279 * mem-break.h (set_breakpoint_at): Update comments.
1280
b1c51e36
CLT
12812016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1282
1283 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1284 to buf parameter.
1285 (nios2_store_gregset): Likewise.
1286
ced2dffb
PA
12872016-07-01 Pedro Alves <palves@redhat.com>
1288 Antoine Tremblay <antoine.tremblay@ericsson.com>
1289
1290 * linux-low.c: Change interface to take the target lwp_info
1291 pointer directly and return void. Handle detaching from a zombie
1292 thread.
1293 (linux_detach_lwp_callback): New function.
1294 (linux_detach): Detach from the leader thread after detaching from
1295 the clone threads.
1296
2ac09a5b
YQ
12972016-06-28 Yao Qi <yao.qi@linaro.org>
1298
1299 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1300 for variable new_offset.
1301 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1302 (aarch64_ftrace_insn_reloc_cb): Likewise.
1303 (aarch64_ftrace_insn_reloc_tb): Likewise.
1304 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1305 PRIx64 instead of PRIx32.
1306
79e7fd4f
YQ
13072016-06-28 Yao Qi <yao.qi@linaro.org>
1308
1309 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1310 (the_low_target): Install arm_get_syscall_trapinfo.
1311
061fc021
YQ
13122016-06-28 Yao Qi <yao.qi@linaro.org>
1313
1314 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1315 function.
1316 (the_low_target): Install aarch64_get_syscall_trapinfo.
1317
4cc32bec
YQ
13182016-06-28 Yao Qi <yao.qi@linaro.org>
1319
1320 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1321 Callers updated.
1322 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1323 Remove parameter sysno.
1324 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1325 sysret.
1326
782c1122
AA
13272016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1328
1329 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1330 (s390_emit_ne_goto): Likewise.
1331 (s390_emit_lt_goto): Likewise.
1332 (s390_emit_le_goto): Likewise.
1333 (s390_emit_gt_goto): Likewise.
1334 (s390_emit_ge_goto): Likewise.
1335 (s390x_emit_eq_goto): Likewise.
1336 (s390x_emit_ne_goto): Likewise.
1337 (s390x_emit_lt_goto): Likewise.
1338 (s390x_emit_le_goto): Likewise.
1339 (s390x_emit_gt_goto): Likewise.
1340 (s390x_emit_ge_goto): Likewise.
1341 (s390_emit_ops_impl): Mark variable static.
1342 (s390x_emit_ops): Likewise.
1343
2e7b624b
YQ
13442016-06-17 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-low.c (handle_extended_wait): Call
1347 uninsert_reinsert_breakpoints for the parent process. Remove
1348 reinsert breakpoints from the child process. Reinsert them to
1349 the parent process when vfork is done.
1350 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1351 (reinsert_reinsert_breakpoints): New function.
1352 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1353 (reinsert_reinsert_breakpoints): Declare.
1354
8a81c5d7
YQ
13552016-06-17 Yao Qi <yao.qi@linaro.org>
1356
1357 * linux-low.c (handle_extended_wait): If the parent is doing
1358 step-over, remove the reinsert breakpoints from the forked child.
1359
f50bf8e5
YQ
13602016-06-17 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-low.c (unsuspend_all_lwps): Declare.
1363 (linux_low_filter_event): If thread exited, call finish_step_over.
1364 If step-over is finished, unsuspend other threads.
1365
8376a3cb
YQ
13662016-06-17 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-low.c (linux_resume_one_lwp_throw): Assert
1369 has_reinsert_breakpoints returns false.
1370 * mem-break.c (delete_disabled_breakpoints): Assert
1371 bp type isn't reinsert_breakpoint.
1372
f79b145d
YQ
13732016-06-17 Yao Qi <yao.qi@linaro.org>
1374
1375 * linux-low.c (maybe_hw_step): New function.
1376 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1377 (finish_step_over): Switch current_thread to lwp temporarily,
1378 and assert has_reinsert_breakpoints returns true.
1379 (proceed_one_lwp): Call maybe_hw_step.
1380 * mem-break.c (has_reinsert_breakpoints): New function.
1381 * mem-break.h (has_reinsert_breakpoints): Declare.
1382
0ae534d2
JT
13832016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1384
1385 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1386
fcdad592
YQ
13872016-05-17 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1390 instead of find_inferior.
1391
9e784964
YQ
13922016-05-05 Yao Qi <yao.qi@linaro.org>
1393
1394 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1395 Initialize res to zero.
1396
cf2ebb6e
YQ
13972016-05-05 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1400 to uint32_t.
1401
c1aebf87
UW
14022016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1403
1404 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1405 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1406 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1407
35fd2deb 14082016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1409 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1410
1411 * tracepoint.c (write_inferior_int8): New function.
1412 (cmd_qtenable_disable): Write enable flag using
1413 write_inferior_int8.
1414
484b3c32
YQ
14152016-04-25 Yao Qi <yao.qi@linaro.org>
1416
1417 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1418 (need_step_over_p): Return zero if the LWP has pending signals
1419 can be delivered on software single step target.
1420
85ba7d86
YQ
14212016-04-25 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1424 return instead of error.
1425
3539aa13
YQ
14262016-04-22 Yao Qi <yao.qi@linaro.org>
1427
1428 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1429 to 23.
1430
5b061e98
YQ
14312016-04-22 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1434 signal when stepping over breakpoint with software single
1435 step.
1436
3451269c
PA
14372016-04-21 Pedro Alves <palves@redhat.com>
1438
1439 * linux-s390-low.c (s390_collect_ptrace_register)
1440 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1441 add casts.
1442 (s390_check_regset): Use void * instead of gdb_byte *.
1443
a2358508
PA
14442016-04-20 Pedro Alves <palves@redhat.com>
1445
1446 * configure: Renegerate.
1447
6885166d
YQ
14482016-04-20 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1451 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1452 number 16.
1453 (arm_store_gregset): Likewise.
1454
2b863f51
WT
14552016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1456
1457 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1458 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1459 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1460 (amd64-avx-mpx-linux.c): New rules.
1461 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1462 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1463 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1464 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1465 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1466 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1467 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1468 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1469 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1470 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1471 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1472 * linux-x86-low.c (x86_linux_read_description): Add case for
1473 X86_XSTATE_AVX_MPX_MASK.
1474 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1475 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1476 init_registers_i386_avx_mpx_linux.
1477 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1478 (initialize_low_tracepoint): Call
1479 init_registers_i386_avx_mpx_linux.
1480 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1481 (initialize_low_tracepoint): Call
1482 init_registers_amd64_avx_mpx_linux.
1483 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1484 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1485 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1486 declarations.
1487
9b30624b
PA
14882016-04-18 Pedro Alves <palves@redhat.com>
1489
1490 * configure: Regenerate.
1491
45e3745e
AT
14922016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1493
1494 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1495 (aarch64_emit_sub): Likewise.
1496
2afc13ff
PA
14972016-04-12 Pedro Alves <palves@redhat.com>
1498
1499 * utils.c (prepare_to_throw_exception): Delete.
1500
6e774b13
SM
15012016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1504
4dca19f8
MK
15052016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1506
1507 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1508
d0a9981f
MK
15092016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * linux-aarch64-ipa.c: Add <elf.h> include.
1512 * linux-ppc-ipa.c: Add <elf.h> include.
1513 * linux-s390-ipa.c: Add <elf.h> include.
1514
252db07e
MK
15152016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1516
1517 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1518 (get_raw_reg_ptr): Likewise.
1519 (get_trace_state_variable_value_ptr): Likewise.
1520 (set_trace_state_variable_value_ptr): Likewise.
1521 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1522 char *.
1523
14e2b6d9
MK
15242016-03-31 Wei-cheng Wang <cole945@gmail.com>
1525 Marcin Kościelnicki <koriakin@0x04.net>
1526
1527 PR/17221
1528 * linux-ppc-low.c (emit_insns): New function.
1529 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1530 (ppc_emit_prologue): New function.
1531 (ppc_emit_epilogue): New function.
1532 (ppc_emit_add): New function.
1533 (ppc_emit_sub): New function.
1534 (ppc_emit_mul): New function.
1535 (ppc_emit_lsh): New function.
1536 (ppc_emit_rsh_signed): New function.
1537 (ppc_emit_rsh_unsigned): New function.
1538 (ppc_emit_ext): New function.
1539 (ppc_emit_zero_ext): New function.
1540 (ppc_emit_log_not): New function.
1541 (ppc_emit_bit_and): New function.
1542 (ppc_emit_bit_or): New function.
1543 (ppc_emit_bit_xor): New function.
1544 (ppc_emit_bit_not): New function.
1545 (ppc_emit_equal): New function.
1546 (ppc_emit_less_signed): New function.
1547 (ppc_emit_less_unsigned): New function.
1548 (ppc_emit_ref): New function.
1549 (ppc_emit_const): New function.
1550 (ppc_emit_reg): New function.
1551 (ppc_emit_pop): New function.
1552 (ppc_emit_stack_flush): New function.
1553 (ppc_emit_swap): New function.
1554 (ppc_emit_stack_adjust): New function.
1555 (ppc_emit_call): New function.
1556 (ppc_emit_int_call_1): New function.
1557 (ppc_emit_void_call_2): New function.
1558 (ppc_emit_if_goto): New function.
1559 (ppc_emit_goto): New function.
1560 (ppc_emit_eq_goto): New function.
1561 (ppc_emit_ne_goto): New function.
1562 (ppc_emit_lt_goto): New function.
1563 (ppc_emit_le_goto): New function.
1564 (ppc_emit_gt_goto): New function.
1565 (ppc_emit_ge_goto): New function.
1566 (ppc_write_goto_address): New function.
1567 (ppc_emit_ops_impl): New static variable.
1568 (ppc64v1_emit_prologue): New function.
1569 (ppc64v2_emit_prologue): New function.
1570 (ppc64_emit_epilogue): New function.
1571 (ppc64_emit_add): New function.
1572 (ppc64_emit_sub): New function.
1573 (ppc64_emit_mul): New function.
1574 (ppc64_emit_lsh): New function.
1575 (ppc64_emit_rsh_signed): New function.
1576 (ppc64_emit_rsh_unsigned): New function.
1577 (ppc64_emit_ext): New function.
1578 (ppc64_emit_zero_ext): New function.
1579 (ppc64_emit_log_not): New function.
1580 (ppc64_emit_bit_and): New function.
1581 (ppc64_emit_bit_or): New function.
1582 (ppc64_emit_bit_xor): New function.
1583 (ppc64_emit_bit_not): New function.
1584 (ppc64_emit_equal): New function.
1585 (ppc64_emit_less_signed): New function.
1586 (ppc64_emit_less_unsigned): New function.
1587 (ppc64_emit_ref): New function.
1588 (ppc64_emit_const): New function.
1589 (ppc64v1_emit_reg): New function.
1590 (ppc64v2_emit_reg): New function.
1591 (ppc64_emit_pop): New function.
1592 (ppc64_emit_stack_flush): New function.
1593 (ppc64_emit_swap): New function.
1594 (ppc64v1_emit_call): New function.
1595 (ppc64v2_emit_call): New function.
1596 (ppc64v1_emit_int_call_1): New function.
1597 (ppc64v2_emit_int_call_1): New function.
1598 (ppc64v1_emit_void_call_2): New function.
1599 (ppc64v2_emit_void_call_2): New function.
1600 (ppc64_emit_if_goto): New function.
1601 (ppc64_emit_eq_goto): New function.
1602 (ppc64_emit_ne_goto): New function.
1603 (ppc64_emit_lt_goto): New function.
1604 (ppc64_emit_le_goto): New function.
1605 (ppc64_emit_gt_goto): New function.
1606 (ppc64_emit_ge_goto): New function.
1607 (ppc64v1_emit_ops_impl): New static variable.
1608 (ppc64v2_emit_ops_impl): New static variable.
1609 (ppc_emit_ops): New function.
1610 (linux_low_target): Wire in ppc_emit_ops.
1611
a2174ba4
MK
16122016-03-31 Wei-cheng Wang <cole945@gmail.com>
1613 Marcin Kościelnicki <koriakin@0x04.net>
1614
1615 PR/17221
1616 * Makefile.in: Add powerpc-*-ipa.o
1617 * configure.srv: Add ipa_obj for powerpc*-linux.
1618 * linux-ppc-ipa.c: New file.
1619 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1620 includes.
1621 (PPC_FIELD): New macro.
1622 (PPC_SEXT): New macro.
1623 (PPC_OP6): New macro.
1624 (PPC_BO): New macro.
1625 (PPC_LI): New macro.
1626 (PPC_BD): New macro.
1627 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1628 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1629 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1630 (ppc_get_thread_area): New function.
1631 (is_elfv2_inferior): New function.
1632 (gen_ds_form): New function.
1633 (GEN_STD): New macro.
1634 (GEN_STDU): New macro.
1635 (GEN_LD): New macro.
1636 (GEN_LDU): New macro.
1637 (gen_d_form): New function.
1638 (GEN_ADDI): New macro.
1639 (GEN_ADDIS): New macro.
1640 (GEN_LI): New macro.
1641 (GEN_LIS): New macro.
1642 (GEN_ORI): New macro.
1643 (GEN_ORIS): New macro.
1644 (GEN_LWZ): New macro.
1645 (GEN_STW): New macro.
1646 (GEN_STWU): New macro.
1647 (gen_xfx_form): New function.
1648 (GEN_MFSPR): New macro.
1649 (GEN_MTSPR): New macro.
1650 (GEN_MFCR): New macro.
1651 (GEN_MTCR): New macro.
1652 (GEN_SYNC): New macro.
1653 (GEN_LWSYNC): New macro.
1654 (gen_x_form): New function.
1655 (GEN_OR): New macro.
1656 (GEN_MR): New macro.
1657 (GEN_LWARX): New macro.
1658 (GEN_STWCX): New macro.
1659 (GEN_CMPW): New macro.
1660 (gen_md_form): New function.
1661 (GEN_RLDICL): New macro.
1662 (GEN_RLDICR): New macro.
1663 (gen_i_form): New function.
1664 (GEN_B): New macro.
1665 (GEN_BL): New macro.
1666 (gen_b_form): New function.
1667 (GEN_BNE): New macro.
1668 (GEN_LOAD): New macro.
1669 (GEN_STORE): New macro.
1670 (gen_limm): New function.
1671 (gen_atomic_xchg): New function.
1672 (gen_call): New function.
1673 (ppc_relocate_instruction): New function.
1674 (ppc_install_fast_tracepoint_jump_pad): New function.
1675 (ppc_get_min_fast_tracepoint_insn_len): New function.
1676 (ppc_get_ipa_tdesc_idx): New function.
1677 (the_low_target): Wire in the new functions.
1678 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1679 tdescs.
1680 * linux-ppc-tdesc.h: New file.
1681
a13c4696
MK
16822016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1683
1684 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1685 (alloc_jump_pad_buffer): New function.
1686 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1687 (alloc_jump_pad_buffer): New function.
1688 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1689 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1690 (alloc_jump_pad_buffer): New function.
1691 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1692 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1693 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1694 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1695
1cda1512
MK
16962016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1697
1698 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1699 * linux-amd64-ipa.c: Likewise.
1700 * linux-i386-ipa.c: Likewise.
1701 * linux-s390-ipa.c: Likewise.
1702 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1703 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1704 set_trace_state_variable_value_ptr.
1705 (struct ipa_sym_addresses): Likewise.
1706 (symbol_list): Likewise.
1707 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1708 accessing gdb_collect directly.
1709 (gdb_collect_ptr_type): New typedef.
1710 (get_raw_reg_ptr_type): New typedef.
1711 (get_trace_state_variable_value_ptr_type): New typedef.
1712 (set_trace_state_variable_value_ptr_type): New typedef.
1713 (gdb_collect_ptr): New global.
1714 (get_raw_reg_ptr): New global.
1715 (get_trace_state_variable_value_ptr): New global.
1716 (set_trace_state_variable_value_ptr): New global.
1717 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1718 accessing get_raw_reg directly.
1719 (get_get_tsv_func_addr): Likewise for
1720 get_trace_state_variable_value_ptr.
1721 (get_set_tsv_func_addr): Likewise for
1722 set_trace_state_variable_value_ptr.
1723 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1724
72fb5488
SM
17252016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1726
1727 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1728
28170b88
MK
17292016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1730
1731 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1732 packets.
1733 (relocate_instruction): Remove own_buf.
1734 * server.c (own_buf): Make global.
1735 (handle_v_requests): Make global.
1736 * server.h (own_buf): New declaration.
1737 (handle_v_requests): New prototype.
1738
f39e8743
MK
17392016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1740
1741 PR 18377
1742 * linux-s390-low.c (add_insns): New function.
1743 (s390_emit_prologue): New function.
1744 (s390_emit_epilogue): New function.
1745 (s390_emit_add): New function.
1746 (s390_emit_sub): New function.
1747 (s390_emit_mul): New function.
1748 (s390_emit_lsh): New function.
1749 (s390_emit_rsh_signed): New function.
1750 (s390_emit_rsh_unsigned): New function.
1751 (s390_emit_ext): New function.
1752 (s390_emit_log_not): New function.
1753 (s390_emit_bit_and): New function.
1754 (s390_emit_bit_or): New function.
1755 (s390_emit_bit_xor): New function.
1756 (s390_emit_bit_not): New function.
1757 (s390_emit_equal): New function.
1758 (s390_emit_less_signed): New function.
1759 (s390_emit_less_unsigned): New function.
1760 (s390_emit_ref): New function.
1761 (s390_emit_if_goto): New function.
1762 (s390_emit_goto): New function.
1763 (s390_write_goto_address): New function.
1764 (s390_emit_litpool): New function.
1765 (s390_emit_const): New function.
1766 (s390_emit_call): New function.
1767 (s390_emit_reg): New function.
1768 (s390_emit_pop): New function.
1769 (s390_emit_stack_flush): New function.
1770 (s390_emit_zero_ext): New function.
1771 (s390_emit_swap): New function.
1772 (s390_emit_stack_adjust): New function.
1773 (s390_emit_set_r2): New function.
1774 (s390_emit_int_call_1): New function.
1775 (s390_emit_void_call_2): New function.
1776 (s390_emit_eq_goto): New function.
1777 (s390_emit_ne_goto): New function.
1778 (s390_emit_lt_goto): New function.
1779 (s390_emit_le_goto): New function.
1780 (s390_emit_gt_goto): New function.
1781 (s390_emit_ge_goto): New function.
1782 (s390x_emit_prologue): New function.
1783 (s390x_emit_epilogue): New function.
1784 (s390x_emit_add): New function.
1785 (s390x_emit_sub): New function.
1786 (s390x_emit_mul): New function.
1787 (s390x_emit_lsh): New function.
1788 (s390x_emit_rsh_signed): New function.
1789 (s390x_emit_rsh_unsigned): New function.
1790 (s390x_emit_ext): New function.
1791 (s390x_emit_log_not): New function.
1792 (s390x_emit_bit_and): New function.
1793 (s390x_emit_bit_or): New function.
1794 (s390x_emit_bit_xor): New function.
1795 (s390x_emit_bit_not): New function.
1796 (s390x_emit_equal): New function.
1797 (s390x_emit_less_signed): New function.
1798 (s390x_emit_less_unsigned): New function.
1799 (s390x_emit_ref): New function.
1800 (s390x_emit_if_goto): New function.
1801 (s390x_emit_const): New function.
1802 (s390x_emit_call): New function.
1803 (s390x_emit_reg): New function.
1804 (s390x_emit_pop): New function.
1805 (s390x_emit_stack_flush): New function.
1806 (s390x_emit_zero_ext): New function.
1807 (s390x_emit_swap): New function.
1808 (s390x_emit_stack_adjust): New function.
1809 (s390x_emit_int_call_1): New function.
1810 (s390x_emit_void_call_2): New function.
1811 (s390x_emit_eq_goto): New function.
1812 (s390x_emit_ne_goto): New function.
1813 (s390x_emit_lt_goto): New function.
1814 (s390x_emit_le_goto): New function.
1815 (s390x_emit_gt_goto): New function.
1816 (s390x_emit_ge_goto): New function.
1817 (s390_emit_ops): New function.
1818 (struct linux_target_ops): Fill in emit_ops hook.
1819
abd9baf9
MK
18202016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1821
1822 PR 18377
1823 * Makefile.in: Add s390 IPA files.
1824 * configure.srv: Build IPA for s390.
1825 * linux-s390-ipa.c: New file.
1826 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1827 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1828 (tdesc_s390_linux32): Likewise.
1829 (init_registers_s390_linux32v1): Likewise.
1830 (tdesc_s390_linux32v1): Likewise.
1831 (init_registers_s390_linux32v2): Likewise.
1832 (tdesc_s390_linux32v2): Likewise.
1833 (init_registers_s390_linux64): Likewise.
1834 (tdesc_s390_linux64): Likewise.
1835 (init_registers_s390_linux64v1): Likewise.
1836 (tdesc_s390_linux64v1): Likewise.
1837 (init_registers_s390_linux64v2): Likewise.
1838 (tdesc_s390_linux64v2): Likewise.
1839 (init_registers_s390_te_linux64): Likewise.
1840 (tdesc_s390_te_linux64): Likewise.
1841 (init_registers_s390_vx_linux64): Likewise.
1842 (tdesc_s390_vx_linux64): Likewise.
1843 (init_registers_s390_tevx_linux64): Likewise.
1844 (tdesc_s390_tevx_linux64): Likewise.
1845 (init_registers_s390x_linux64): Likewise.
1846 (tdesc_s390x_linux64): Likewise.
1847 (init_registers_s390x_linux64v1): Likewise.
1848 (tdesc_s390x_linux64v1): Likewise.
1849 (init_registers_s390x_linux64v2): Likewise.
1850 (tdesc_s390x_linux64v2): Likewise.
1851 (init_registers_s390x_te_linux64): Likewise.
1852 (tdesc_s390x_te_linux64): Likewise.
1853 (init_registers_s390x_vx_linux64): Likewise.
1854 (tdesc_s390x_vx_linux64): Likewise.
1855 (init_registers_s390x_tevx_linux64): Likewise.
1856 (tdesc_s390x_tevx_linux64): Likewise.
1857 (have_hwcap_s390_vx): New static variable.
1858 (s390_arch_setup): Fill have_hwcap_s390_vx.
1859 (s390_get_thread_area): New function.
1860 (s390_ft_entry_gpr_esa): New const.
1861 (s390_ft_entry_gpr_zarch): New const.
1862 (s390_ft_entry_misc): New const.
1863 (s390_ft_entry_fr): New const.
1864 (s390_ft_entry_vr): New const.
1865 (s390_ft_main_31): New const.
1866 (s390_ft_main_64): New const.
1867 (s390_ft_exit_fr): New const.
1868 (s390_ft_exit_vr): New const.
1869 (s390_ft_exit_misc): New const.
1870 (s390_ft_exit_gpr_esa): New const.
1871 (s390_ft_exit_gpr_zarch): New const.
1872 (append_insns): New function.
1873 (s390_relocate_instruction): New function.
1874 (s390_install_fast_tracepoint_jump_pad): New function.
1875 (s390_get_min_fast_tracepoint_insn_len): New function.
1876 (s390_get_ipa_tdesc_idx): New function.
1877 (struct linux_target_ops): Wire in the above functions.
1878 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1879 * linux-s390-tdesc.h: New file.
1880
a4105d04
MK
18812016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1882
1883 * linux-s390-low.c (s390_supports_tracepoints): New function.
1884 (struct linux_target_ops): Fill supports_tracepoints hook.
1885
35ac8b3e
YQ
18862016-03-18 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-low.c (lwp_signal_can_be_delivered): New function.
1889 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1890
94610ec4
YQ
18912016-03-18 Yao Qi <yao.qi@linaro.org>
1892
1893 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1894 0 if signal is enqueued. Remove 'signal' from one debugging
1895 message. Move one debugging message to some lines below.
1896 Remove code setting 'signal' to 0.
1897
80aea927
YQ
18982016-03-18 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-low.c (linux_low_filter_event): Remove redundant
1901 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1902
b04fd3be
MK
19032016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1904
1905 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1906 (struct linux_target_ops): Wire in the above.
1907
c40c8d4b
YQ
19082016-03-03 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-low.c: Update comments to start_step_over.
1911
0f8288ae
YQ
19122016-03-03 Yao Qi <yao.qi@linaro.org>
1913
1914 PR server/19736
1915 * linux-low.c (handle_extended_wait): Set child suspended
1916 if event_lwp->bp_reinsert isn't zero.
1917
fdbd04a8
YQ
19182016-03-02 Yao Qi <yao.qi@linaro.org>
1919
1920 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1921 enqueue_pending_signal.
1922
6896a8fa
MK
19232016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1924
1925 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1926 is actually loaded.
1927
ab503087
MK
19282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1929
1930 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1931 (s390_regmap_3264) [!__s390x__]: New global.
1932 (s390_collect_ptrace_register): Skip map entries containing -1.
1933 (s390_supply_ptrace_register): Ditto.
1934 (s390_fill_gprs_high): New function.
1935 (s390_store_gprs_high): New function.
1936 (s390_regsets): Add NT_S390_HIGH_GPRS.
1937 (s390_get_hwcap): Enable on 31-bit.
1938 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1939 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1940 Detect NT_S390_HIGH_GPRS.
1941 (s390_usrregs_info_3264): Enable on 31-bit.
1942 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1943 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1944
ae91f625
MK
19452016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1946
1947 PR gdb/13808
1948 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1949 * configure.srv: Ditto.
1950 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1951 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1952 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1953 (init_registers_amd64_linux): Remove prototype.
1954 (tdesc_amd64_linux): Remove declaration.
1955 (get_ipa_tdesc): New function.
1956 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1957 initialize remaining tdescs.
1958 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1959 (init_registers_i386_linux): Remove prototype.
1960 (tdesc_i386_linux): Remove declaration.
1961 (get_ipa_tdesc): New function.
1962 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1963 initialize remaining tdescs.
1964 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1965 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1966 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1967 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1968 (x86_get_ipa_tdesc_idx): New function.
1969 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1970 * linux-x86-tdesc.h: New file.
1971 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1972 (target_get_ipa_tdesc_idx): New macro.
1973 * tracepoint.c (ipa_tdesc_idx): New macro.
1974 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1975 (symbol_list): Add ipa_tdesc_idx.
1976 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1977 (ipa_tdesc): Remove.
1978 (ipa_tdesc_idx): New variable.
1979 (get_context_regcache): Use get_ipa_tdesc.
1980 (gdb_collect): Ditto.
1981 (gdb_probe): Ditto.
1982 * tracepoint.h (get_ipa_tdesc): New prototype.
1983 (ipa_tdesc): Remove.
1984
e7ad2f14
PA
19852016-02-24 Pedro Alves <palves@redhat.com>
1986
1987 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1988 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1989 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1990 Factor out common code between the USE_SIGTRAP_SIGINFO and
1991 !USE_SIGTRAP_SIGINFO blocks.
1992 (linux_low_filter_event): Call save_stop_reason instead of
1993 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1994 Update comments.
1995 (linux_wait_1): Update comments.
1996
657f9cde
WW
19972016-02-24 Wei-cheng Wang <cole945@gmail.com>
1998
1999 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2000 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2001 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2002 ppc_insert_point, ppc_remove_point.
2003
b00b61e1
MK
20042016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2005
2006 * linux-s390-low.c (s390_supports_z_point_type): New function.
2007 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2008
553cb527
YQ
20092016-02-16 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2012 PC. Get pc from regcache_read_pc.
2013
a5652c21
YQ
20142016-02-12 Yao Qi <yao.qi@linaro.org>
2015
2016 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2017 or linux_get_pc_32bit.
2018 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2019
ed443b61
YQ
20202016-02-12 Yao Qi <yao.qi@linaro.org>
2021
2022 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2023 arm_linux_get_next_pcs_fixup.
2024
020ecd38
MK
20252016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2026
2027 * tracepoint.c (x_tracepoint_action_download): Change
2028 write_inferior_data_ptr to write_inferior_data_pointer.
2029 (cmd_qtstart): Likewise.
2030 (write_inferior_data_ptr): Remove.
2031 (download_agent_expr): Change write_inferior_data_ptr to
2032 write_inferior_data_pointer.
2033 (download_tracepoint_1): Likewise.
2034 (download_tracepoint): Likewise.
2035 (download_trace_state_variables): Likewise.
2036
7cae9051
WW
20372016-02-11 Wei-cheng Wang <cole945@gmail.com>
2038 Marcin Kościelnicki <koriakin@0x04.net>
2039
2040 * tracepoint.c (struct tracepoint_action_ops): Remove.
2041 (struct tracepoint_action): Remove ops.
2042 (m_tracepoint_action_download, r_tracepoint_action_download)
2043 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2044 size and offset accordingly.
2045 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2046 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2047 (tracepoint_action_send, tracepoint_action_download): New functions.
2048 Helpers for trace action handlers.
2049 (add_tracepoint_action): Remove setup actions ops.
2050 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2051
9f6a71b4
YQ
20522016-02-10 Yao Qi <yao.qi@linaro.org>
2053
2054 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2055
1e94266c
SM
20562016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2057
2058 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2059 to AC_OUTPUT.
2060 * configure: Regenerate.
2061
8adce034
SM
20622016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2063
2064 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2065 void * to gdb_byte *.
2066 * linux-low.c (siginfo_fixup): Likewise.
2067 (linux_xfer_siginfo): Likewise.
2068 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2069 Likewise.
2070 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2071
93813b37
WT
20722016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2073
2074 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2075 to srv_tgtobj.
2076 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2077 to srv_tgtobj.
2078 * linux-x86-low.c [__x86_64__]: Include
2079 "nat/amd64-linux-siginfo.h".
2080 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2081 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2082 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2083 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2084 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2085 (cpt_si_fd, si_timerid, si_overrun): Move from
2086 nat/amd64-linux-siginfo.c.
2087 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2088
8424cc97
SM
20892016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2090
2091 * server.c (skip_to_semicolon): Remove.
2092 (process_point_options): Use strchrnul instead of
2093 skip_to_semicolon.
2094
4d18591b
YQ
20952016-01-26 Yao Qi <yao.qi@linaro.org>
2096
2097 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2098 * linux-low.c (install_software_single_step_breakpoints): Don't
2099 call regcache_read_pc.
2100 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2101 argument pc.
2102
d8020970
YQ
21032016-01-26 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-low.c (install_software_single_step_breakpoints): Call
2106 regcache_read_pc instead of get_pc.
2107
8b207339
YQ
21082016-01-26 Yao Qi <yao.qi@linaro.org>
2109
2110 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2111 (unblock_async_io): Rename to ...
2112 (block_unblock_async_io): ... it. New function.
2113 (enable_async_io): Don't install SIGIO handler. Unblock it
2114 instead.
2115 (disable_async_io): Don't ignore SIGIO. Block it instead.
2116 (initialize_async_io): Install SIGIO handler. Don't call
2117 unblock_async_io.
2118
18879fef
YQ
21192016-01-26 Yao Qi <yao.qi@linaro.org>
2120
2121 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2122 first character is '\003', call *the_target->request_interrupt.
2123
a0f8e08a
YQ
21242016-01-25 Yao Qi <yao.qi@linaro.org>
2125
2126 * remote-utils.c (new_thread_notify): Remove.
2127 (dead_thread_notify): Likewise.
2128 * remote-utils.h (new_thread_notify): Remove declaration.
2129 (dead_thread_notify): Likewise.
2130
cc5fd9ab
MK
21312016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2132
2133 * gdb.trace/pending.exp: Fix expected message on continue.
2134
99e8eb11
MK
21352016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2136
2137 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2138 it works properly on big-endian machines where sizeof (CORE_ADDR)
2139 != sizeof (void *).
2140
a994041d
PA
21412016-01-21 Pedro Alves <palves@redhat.com>
2142
2143 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2144 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2145 * configure: Regenerate.
2146
f7a6a40d
YQ
21472016-01-21 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2150 is_thumb and set it according to CPSR saved on the stack.
2151 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2152 arm_sigreturn_next_pc.
2153
6f69e520
YQ
21542016-01-18 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-low.c (linux_set_pc_64bit): New function.
2157 (linux_get_pc_64bit): New function.
2158 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2159 Declare.
2160 * linux-sparc-low.c (debug_threads): Remove declaration.
2161 (sparc_get_pc): Remove.
2162 (the_low_target): Use linux_get_pc_64bit instead of
2163 sparc_get_pc.
2164 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2165 (the_low_target): Use linux_get_pc_64bit and
2166 linux_set_pc_64bit.
2167
276d4552
YQ
21682016-01-18 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-arm-low.c (debug_threads): Remove declaration.
2171 (arm_get_pc, arm_set_pc): Remove.
2172 (the_low_target): Use linux_get_pc_32bit and
2173 linux_set_pc_32bit.
2174 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2175 (the_low_target): Use linux_get_pc_32bit and
2176 linux_set_pc_32bit.
2177 * linux-cris-low.c (debug_threads): Remove declaration.
2178 (cris_get_pc, cris_set_pc,): Remove.
2179 (the_low_target): Use linux_get_pc_32bit and
2180 linux_set_pc_32bit.
2181 * linux-crisv32-low.c (debug_threads): Remove declaration.
2182 (cris_get_pc, cris_set_pc): Remove.
2183 (the_low_target): Use linux_get_pc_32bit and
2184 linux_set_pc_32bit.
2185 * linux-low.c: Include inttypes.h.
2186 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2187 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2188 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2189 (the_low_target): Use linux_get_pc_32bit and
2190 linux_set_pc_32bit.
2191 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2192 (the_low_target): Use linux_get_pc_32bit and
2193 linux_set_pc_32bit.
2194 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2195 (the_low_target): Use linux_get_pc_32bit and
2196 linux_set_pc_32bit.
2197 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2198 (the_low_target): Use linux_get_pc_32bit and
2199 linux_set_pc_32bit.
2200 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2201 (the_low_target): Use linux_get_pc_32bit and
2202 linux_set_pc_32bit.
2203
eb0edac8
GB
22042016-01-18 Gary Benson <gbenson@redhat.com>
2205
2206 * configure.ac (AC_FUNC_FORK): New check.
2207 * config.in: Regenerate.
2208 * configure: Likewise.
2209
1b451dda
YQ
22102016-01-14 Yao Qi <yao.qi@linaro.org>
2211
2212 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2213 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2214 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2215 arm_get_next_pcs_ctor.
2216
82075af2
JS
22172016-01-12 Josh Stone <jistone@redhat.com>
2218 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2219
2220 * inferiors.h: Include "gdb_vecs.h".
2221 (struct process_info): Add syscalls_to_catch.
2222 * inferiors.c (remove_process): Free syscalls_to_catch.
2223 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2224 syscall_return stops.
2225 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2226 * server.c (handle_general_set): Handle QCatchSyscalls.
2227 (handle_query): Report support for QCatchSyscalls.
2228 * target.h (struct target_ops): Add supports_catch_syscall.
2229 (target_supports_catch_syscall): New macro.
2230 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2231 (struct lwp_info): Add syscall_state.
2232 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2233 Maintain syscall_state and syscalls_to_catch across exec.
2234 (get_syscall_trapinfo): New function, proxy to the_low_target.
2235 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2236 (linux_low_filter_event): Toggle syscall_state entry/return for
2237 syscall traps, and set it ignored for all others.
2238 (gdb_catching_syscalls_p): New function.
2239 (gdb_catch_this_syscall_p): New function.
2240 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2241 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2242 (linux_supports_catch_syscall): New function.
2243 (linux_target_ops): Install it.
2244 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2245 (the_low_target): Install it.
2246
8f13a3ce
MF
22472016-01-12 Mike Frysinger <vapier@gentoo.org>
2248
2249 * acinclude.m4: Include new ../warning.m4 file.
2250 * configure: Regenerated.
2251 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2252
5b3da067
MF
22532016-01-12 Mike Frysinger <vapier@gentoo.org>
2254
2255 * ax.c (is_goto_target): Mark static.
2256 * linux-low.c (register_addr): Likewise.
2257 (linux_fetch_registers, linux_store_registers): Likewise.
2258 * mem-break.c (any_persistent_commands): Fix old prototype.
2259 (add_commands_to_breakpoint): Mark static.
2260 * regcache.c (find_register_by_name): Delete unused func.
2261 * remote-utils.c (hex_or_minus_one): Mark static.
2262 * server.c (monitor_show_help): Mark static.
2263 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2264 handle_v_requests): Likewise.
2265
bc504a31
PA
22662016-01-12 Pedro Alves <palves@redhat.com>
2267
2268 Remove use of the registered trademark symbol throughout.
2269
5a0dd67a
YQ
22702016-01-08 Yao Qi <yao.qi@linaro.org>
2271
2272 * remote-utils.c (getpkt): If c is '\003', call target hook
2273 request_interrupt.
2274
b2ca446f
YQ
22752016-01-06 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2278 linux-aarch32-low.c.
2279 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2280 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2281 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2282 (thumb2_breakpoint): Declare.
2283 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2284 linux-aarch32-low.h.
2285 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2286 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2287 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2288
edd88788
JB
22892016-01-01 Joel Brobecker <brobecker@adacore.com>
2290
2291 * gdbreplay.c (gdbreplay_version): Change copyright year in
2292 version message.
2293 * server.c (gdbserver_version): Likewise.
2294
65da7f14
PP
22952015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2296
2297 * server.c (crc32_table): Delete.
2298 (crc32): Use libiberty's xcrc32 function.
2299
4abd5ed2
JB
23002015-12-22 Joel Brobecker <brobecker@adacore.com>
2301
2302 * lynx-low.c (lynx_delete_thread_callback): New function.
2303 (lynx_mourn): Properly delete our process and all of its
2304 threads. Remove call to clear_inferiors.
2305
0e50fe5c
JB
23062015-12-22 Joel Brobecker <brobecker@adacore.com>
2307
2308 * target.c (thread_search_callback): Add check that
2309 the thread_stopped target callback is not NULL before
2310 calling it.
2311
35adc03f
YQ
23122015-12-21 Yao Qi <yao.qi@linaro.org>
2313
2314 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2315 arm breakpoint.
2316
bd2b2909
AT
23172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2318
2319 * server.c (handle_query): Call target_supports_software_single_step.
2320
7fe5e27e
AT
23212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2322
2323 * linux-low.c (single_step): New function.
2324 (linux_resume_one_lwp_throw): Call single_step.
2325 (start_step_over): Likewise.
2326
d9311bfa
AT
23272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2328
2329 * Makefile.in (SFILES): Append arch/arm-linux.c,
2330 arch/arm-get-next-pcs.c.
2331 (arm-linux.o): New rule.
2332 (arm-get-next-pcs.o): New rule.
2333 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2334 arm-linux.o.
2335 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2336 to linux-aarch32-low.c.
2337 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2338 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2339 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2340 (thumb2_breakpoint_len): Likewise.
2341 (arm_is_thumb_mode): Make non-static.
2342 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2343 from linux-aarch32-low.c.
2344 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2345 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2346 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2347 (thumb2_breakpoint_len): Likewise.
2348 (arm_is_thumb_mode): New declaration.
2349 * linux-arm-low.c: Include arch/arm-linux.h
2350 aarch/arm-get-next-pcs.h, sys/syscall.h.
2351 (get_next_pcs_ops): New struct.
2352 (get_next_pcs_addr_bits_remove): New function.
2353 (get_next_pcs_is_thumb): New function.
2354 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2355 (arm_sigreturn_next_pc): Likewise.
2356 (get_next_pcs_syscall_next_pc): Likewise.
2357 (arm_gdbserver_get_next_pcs): Likewise.
2358 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2359 Initialize.
2360 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2361 * server.h: Include gdb_vecs.h.
2362
68ce2059
AT
23632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2364
2365 * Makefile.in (SFILES): Append common/common-regcache.c.
2366 (OBS): Append common-regcache.o.
2367 (common-regcache.o): New rule.
2368 * regcache.c (init_register_cache): Initialize cache to
2369 REG_UNAVAILABLE.
2370 (regcache_raw_read_unsigned): New function.
2371 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2372 register_status enum.
2373
fa5308bd
AT
23742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2375
2376 * linux-aarch64-low.c (the_low_targets): Rename
2377 breakpoint_reinsert_addr to get_next_pcs.
2378 * linux-arm-low.c (the_low_targets): Likewise.
2379 * linux-bfin-low.c (the_low_targets): Likewise.
2380 * linux-cris-low.c (the_low_targets): Likewise.
2381 * linux-crisv32-low.c (the_low_targets): Likewise.
2382 * linux-low.c (can_software_single_step): Likewise.
2383 (install_software_single_step_breakpoints): New function.
2384 (start_step_over): Use install_software_single_step_breakpoints.
2385 * linux-low.h: New CORE_ADDR vector.
2386 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2387 get_next_pcs.
2388 * linux-mips-low.c (the_low_targets): Likewise.
2389 * linux-nios2-low.c (the_low_targets): Likewise.
2390 * linux-sparc-low.c (the_low_targets): Likewise.
2391
4a6ed09b
PA
23922015-12-17 Pedro Alves <palves@redhat.com>
2393
2394 * linux-low.c (linux_kill_one_lwp): Remove references to
2395 LinuxThreads.
2396 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2397 to 'kill'.
2398 (linux_init_signals): Delete.
2399 (initialize_low): Adjust.
2400 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2401
7544db95
PA
24022015-12-16 Pedro Alves <palves@redhat.com>
2403
2404 * configure.ac (compiler warning flags): When testing a
2405 -Wno-foo option, check whether -Wfoo works instead.
2406 * configure: Regenerate.
2407
8020350c
DB
24082015-12-11 Don Breazeal <donb@codesourcery.com>
2409
2410 * server.c (process_serial_event): Don't exit from gdbserver
2411 in remote mode if there are still active inferiors.
2412
db91f502
YQ
24132015-12-11 Yao Qi <yao.qi@linaro.org>
2414
2415 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2416 arm_breakpoint_at if the process is 32-bit.
2417
b37a6290
YQ
24182015-12-11 Yao Qi <yao.qi@linaro.org>
2419
2420 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2421 arm breakpoint.
2422
17b1509a
YQ
24232015-12-07 Yao Qi <yao.qi@linaro.org>
2424
2425 * configure.srv: Append arm.o to srv_tgtobj for
2426 aarch64*-*-linux* target.
2427 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2428 from linux-arm-low.c.
2429 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2430 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2431 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2432 (thumb2_breakpoint_len): Likewise.
2433 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2434 (arm_breakpoint_kinds): Likewise.
2435 (arm_breakpoint_kind_from_pc): Likewise.
2436 (arm_sw_breakpoint_from_kind): Likewise.
2437 (arm_breakpoint_kind_from_current_state): Likewise.
2438 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2439 (arm_sw_breakpoint_from_kind): Declare.
2440 (arm_breakpoint_kind_from_current_state): Declare.
2441 (arm_breakpoint_at): Declare.
2442 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2443 arm_sw_breakpoint_from_kind if process is 32-bit.
2444 (aarch64_breakpoint_kind_from_pc): New function.
2445 (aarch64_breakpoint_kind_from_current_state): New function.
2446 (the_low_target): Initialize fields breakpoint_kind_from_pc
2447 and breakpoint_kind_from_current_state.
2448 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2449 linux-aarch32-low.c.
2450 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2451 (arm_breakpoint, arm_breakpoint_len): Likewise.
2452 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2453 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2454 (arm_is_thumb_mode): Likewise.
2455 (arm_breakpoint_at): Likewise.
2456 (arm_breakpoint_kind_from_pc): Likewise.
2457 (arm_sw_breakpoint_from_kind): Likewise.
2458 (arm_breakpoint_kind_from_current_state): Likewise.
2459
2460 Revert:
2461 2015-08-04 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2464 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2465 * server.c (extended_protocol): Remove "static".
2466 * server.h (extended_protocol): Declare it.
2467
ece66d65
JS
24682015-12-04 Josh Stone <jistone@redhat.com>
2469
2470 * target.h (struct target_ops) <arch_setup>: Rename to ...
2471 (struct target_ops) <post_create_inferior>: ... this.
2472 (target_arch_setup): Rename to ...
2473 (target_post_create_inferior): ... this, calling post_create_inferior.
2474 * server.c (start_inferior): Update target_arch_setup calls to
2475 target_post_create_inferior.
2476 * linux-low.c (linux_low_ptrace_options): Forward declare.
2477 (linux_arch_setup): Update its comment for general use.
2478 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2479 (struct linux_target_ops): Use linux_post_create_inferior.
2480 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2481 to post_create_inferior.
2482 * nto-low.c (struct nto_target_ops): Likewise.
2483 * spu-low.c (struct spu_target_ops): Likewise.
2484 * win32-low.c (struct win32_target_ops): Likewise.
2485
e58c48b4
AT
24862015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2487
2488 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2489
fbec8956
AT
24902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2491
2492 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2493 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2494 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2495 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2496 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2497 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2498 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2499 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2500 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2501 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2502 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2503 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2504
9b4c5f87
AT
25052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2506
2507 * linux-low.c (linux_look_up_symbols): Don't call
2508 linux_supports_traceclone.
2509 * linux-low.h (thread_db_init): Remove use_events argument.
2510 * thread-db.c (thread_db_use_event): Remove global variable.
2511 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2512 (struct thread_db) <td_create_bp>: Remove field.
2513 (thread_db_create_event): Remove function.
2514 (thread_db_enable_reporting): Likewise.
2515 (find_one_thread): Don't check for thread_db_use_events.
2516 (attach_thread): Likewise.
2517 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2518 (try_thread_db_load_1): Don't check for thread_db_use_events.
2519 (thread_db_init): Remove use_events argument and thread events
2520 handling.
2521 (remove_thread_event_breakpoints): Remove function.
2522 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2523
7d00775e
AT
25242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2525
2526 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2527 New function.
2528 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2529 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2530 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2531 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2532 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2533 Initialize.
2534 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2535 New function.
2536 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2537 * linux-low.c (can_hardware_single_step): Use
2538 supports_hardware_single_step.
2539 (can_software_single_step): New function.
2540 (start_step_over): Call can_software_single_step.
2541 (linux_supports_hardware_single_step): New function.
2542 (struct target_ops) <supports_software_single_step>: Initialize.
2543 * linux-low.h (struct linux_target_ops)
2544 <supports_hardware_single_step>: Initialize.
2545 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2547 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2548 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2549 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2550 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2551 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2552 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2553 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2554 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2555 Initialize.
2556 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2557 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2558 Initialize.
2559 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2560 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2561 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2562 New function.
2563 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2564 * target.h (struct target_ops): <supports_software_single_step>:
2565 New field.
2566 (target_supports_software_single_step): New macro.
2567
2d97cd35
AT
25682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2569
2570 * linux-low.c (linux_wait_1): Fix pc advance condition.
2571 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2572 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2573
769ef81f
AT
25742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2575
2576 * linux-arm-low.c (arm_is_thumb_mode): New function.
2577 (arm_breakpoint_at): Use arm_is_thumb_mode.
2578 (arm_breakpoint_kind_from_current_state): New function.
2579 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2580 Initialize.
2581 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2582 (linux_breakpoint_kind_from_current_state): New function.
2583 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2584 * linux-low.h (struct linux_target_ops)
2585 <breakpoint_kind_from_current_state>: New field.
2586 * target.h (struct target_ops): Likewise.
2587 (target_breakpoint_kind_from_current_state): New macro.
2588
1bebeeca
PA
25892015-11-30 Pedro Alves <palves@redhat.com>
2590
2591 * linux-low.c (linux_resume): Wake up the event loop before
2592 returning.
2593
a67a9fae
PA
25942015-11-30 Pedro Alves <palves@redhat.com>
2595
2596 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2597 check.
2598 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2599 to -1.
2600 * target.c (struct thread_search): New structure.
2601 (thread_search_callback): New function.
2602 (prev_general_thread): New global.
2603 (prepare_to_access_memory, done_accessing_memory): New functions.
2604 * target.h (prepare_to_access_memory, done_accessing_memory):
2605 Replace macros with function declarations.
2606
f2faf941
PA
26072015-11-30 Pedro Alves <palves@redhat.com>
2608
2609 PR 14618
2610 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2611 report TARGET_WAITKIND_NO_RESUMED.
2612 * remote-utils.c (prepare_resume_reply): Handle
2613 TARGET_WAITKIND_NO_RESUMED.
2614 * server.c (report_no_resumed): New global.
2615 (handle_query) <qSupported>: Handle "no-resumed+". Report
2616 "no-resumed+" support.
2617 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2618 return error if the client doesn't support no-resumed events.
2619 (push_stop_notification): New function.
2620 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2621 events if the client supports them.
2622
a681f9c9
PA
26232015-11-30 Pedro Alves <palves@redhat.com>
2624
2625 * linux-low.c (thread_still_has_status_pending_p): Don't check
2626 vCont;t here.
2627 (lwp_resumed): New function.
2628 (status_pending_p_callback): Return early if the LWP is not
2629 supposed to be resumed.
2630
65706a29
PA
26312015-11-30 Pedro Alves <palves@redhat.com>
2632
2633 * linux-low.c (handle_extended_wait): Assert that the LWP's
2634 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2635 thread create events, leave the new child's status pending.
2636 (linux_low_filter_event): If GDB wants to hear about thread exit
2637 events, leave the LWP marked dead and don't delete it.
2638 (linux_wait_for_event_filtered): Don't check for thread exit.
2639 (filter_exit_event): New function.
2640 (linux_wait_1): Use it, when returning an exit event.
2641 (linux_resume_one_lwp_throw): Assert that the LWP's
2642 waitstatus is TARGET_WAITKIND_IGNORE.
2643 * remote-utils.c (prepare_resume_reply): Handle
2644 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2645 * server.c (report_thread_events): New global.
2646 (handle_general_set): Handle QThreadEvents.
2647 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2648 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2649 TARGET_WAITKIND_THREAD_EXITED.
2650 * server.h (report_thread_events): Declare.
2651
56cf4bed
PA
26522015-11-30 Pedro Alves <palves@redhat.com>
2653
2654 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2655 the thread's last_resume_kind was resume_stop.
2656
500c1d85
PA
26572015-11-30 Pedro Alves <palves@redhat.com>
2658
2659 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2660 before returning.
2661
de979965
PA
26622015-11-30 Pedro Alves <palves@redhat.com>
2663
2664 * server.c (handle_v_requests): Handle vCtrlC.
2665
34c65914
PA
26662015-11-30 Pedro Alves <palves@redhat.com>
2667
2668 * gdbthread.h (find_any_thread_of_pid): Declare.
2669 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2670 functions.
2671 * server.c (handle_query): If current_thread is NULL, look for
2672 another thread of the selected process.
2673
79efa585 26742015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2675 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2676
2677 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2678 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2679 name in reply.
2680 * target.h (struct target_ops) <thread_name>: New field.
2681 (target_thread_name): New macro.
2682
80d82c19
JB
26832015-11-23 Joel Brobecker <brobecker@adacore.com>
2684
2685 * regcache.h (regcache_invalidate_pid): Add declaration.
2686 * regcache.c (regcache_invalidate_pid): New function, extracted
2687 from regcache_invalidate.
2688 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2689 Add trivial documentation comment.
2690 * lynx-low.c: Use regcache_invalidate_pid instead of
2691 regcache_invalidate.
2692
64da5dd5
JB
26932015-11-23 Joel Brobecker <brobecker@adacore.com>
2694
2695 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2696 and Elf64_auxv_t if the target is Android.
2697
37ce4055
DE
26982015-11-22 Doug Evans <xdje42@gmail.com>
2699
2700 * target.h: #include <sys/types.h>.
2701
06e03fff
PA
27022015-11-19 Pedro Alves <palves@redhat.com>
2703
2704 * linux-low.c (linux_process_qsupported): Change prototype.
2705 Adjust.
2706 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2707 Change prototype.
2708 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2709 and adjust to loop over all features.
2710 * server.c (handle_query) <qSupported>: Adjust to call
2711 target_process_qsupported once, passing it a vector of unprocessed
2712 features.
2713 * target.h (struct target_ops) <process_qsupported>: Change
2714 prototype.
2715 (target_process_qsupported): Adjust.
2716
9a084706
PA
27172015-11-19 Pedro Alves <palves@redhat.com>
2718
2719 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2720 mode.
2721 * configure: Regenerate.
2722
dad44a1f
PA
27232015-11-19 Pedro Alves <palves@redhat.com>
2724
2725 * configure: Regenerate.
2726
231c0592
YQ
27272015-11-19 Yao Qi <yao.qi@linaro.org>
2728
2729 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2730 type to uint32_t.
2731
6c1c9a8b
YQ
27322015-11-19 Yao Qi <yao.qi@linaro.org>
2733
2734 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2735 (struct aarch64_operand): Move enum out.
2736
9caa3311
YQ
27372015-11-19 Yao Qi <yao.qi@linaro.org>
2738
2739 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2740 struct user_fpsimd_state *.
2741 (aarch64_store_fpregset): Likewise.
2742
6a69a054
YQ
27432015-11-19 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2746 struct user_pt_regs *.
2747 (aarch64_store_gregset): Likewise.
2748
1798301e
PA
27492015-11-18 Pedro Alves <palves@redhat.com>
2750
2751 * Makefile.in (all_object_files): Add $IPA_OBJS.
2752
ce7715e2
PA
27532015-11-17 Pedro Alves <palves@redhat.com>
2754
2755 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2756 GDB_SIGNAL_0 and gdb_signal_to_string.
2757
c0879059
PA
27582015-11-17 Pedro Alves <palves@redhat.com>
2759
2760 * win32-low.c (handle_output_debug_string): Remove parameter.
2761 (win32_kill): Remove our_status local and adjust call to
2762 handle_output_debug_string.
2763 (get_child_debug_event): Adjust call to
2764 handle_output_debug_string.
2765
1996e237
SM
27662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2767
2768 * linux-mips-low.c (mips_fill_gregset): Add cast.
2769 (mips_store_gregset): Likewise.
2770 (mips_fill_fpregset): Likewise.
2771 (mips_store_fpregset): Likewise.
2772
cbec665b
SM
27732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2774
2775 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2776 priv.
2777
eb3e3c67
SM
27782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2779
2780 * linux-mips-low.c (mips_linux_new_thread): Change type of
2781 watch_type to enum target_hw_bp_type.
2782
171de4b8
SM
27832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2784
2785 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2786 Change return type to arm_hwbp_type.
2787
04248ead
SM
27882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2789
2790 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2791 (arm_store_gregset): Likewise.
2792 * linux-arm-low.c (arm_get_hwcap): Likewise.
2793 (arm_read_description): Likewise.
2794
04b3479c
SM
27952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2796
2797 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2798
2bc84e8a
SM
27992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2802 (ppc_fill_vsxregset): Likewise.
2803 (ppc_store_vsxregset): Likewise.
2804 (ppc_fill_vrregset): Likewise.
2805 (ppc_store_vrregset): Likewise.
2806 (ppc_fill_evrregset): Likewise.
2807 (ppc_store_evrregset): Likewise.
2808
e6c5bb05
SM
28092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2810
2811 * linux-ppc-low.c (ppc_usrregs_info): Remove
2812 forward-declaration.
2813 (ppc_arch_setup): Move lower in file.
2814
7ea45d72
SM
28152015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2816
2817 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2818 (ps_pdwrite): Likewise.
2819
69291610
HW
28202015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2821
2822 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2823 to after assert checks.
2824
b42945fd
SM
28252015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * proc-service.c (ps_pdread): Add/adjust casts.
2828 (ps_pdwrite): Add/adjust casts.
2829
d6f85c84
SM
28302015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2831
2832 * server.c (handle_search_memory_1): Cast return value of
2833 memmem.
2834
f98cd059
SM
28352015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2836
2837 * server.c (write_qxfer_response): Change type of data to
2838 gdb_byte *.
2839
d2412fa5
PA
28402015-10-29 Pedro Alves <palves@redhat.com>
2841
2842 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2843
c17414a2
PA
28442015-10-29 Pedro Alves <palves@redhat.com>
2845
2846 * tracepoint.c (clear_installed_tracepoints): Add casts.
2847
e053fbc4
PA
28482015-10-29 Pedro Alves <palves@redhat.com>
2849
2850 * server.c (handle_v_cont, process_serial_event): Add enum
2851 gdb_signal casts to signal parsing code.
2852
add67df8
PA
28532015-10-29 Pedro Alves <palves@redhat.com>
2854
2855 * linux-low.h (NULL_REGSET): Define.
2856 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2857 * linux-arm-low.c (arm_regsets): Likewise.
2858 * linux-crisv32-low.c (cris_regsets): Likewise.
2859 * linux-m68k-low.c (m68k_regsets): Likewise.
2860 * linux-mips-low.c (mips_regsets): Likewise.
2861 * linux-nios2-low.c (nios2_regsets): Likewise.
2862 * linux-ppc-low.c (ppc_regsets): Likewise.
2863 * linux-s390-low.c (s390_regsets): Likewise.
2864 * linux-sh-low.c (sh_regsets): Likewise.
2865 * linux-sparc-low.c (sparc_regsets): Likewise.
2866 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2867 * linux-tile-low.c (tile_regsets): Likewise.
2868 * linux-x86-low.c (x86_regsets): Likewise.
2869 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2870
50bc912a
PA
28712015-10-29 Pedro Alves <palves@redhat.com>
2872
2873 * linux-low.h (NULL_REGSET): Define.
2874 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2875 * linux-arm-low.c (arm_regsets): Likewise.
2876 * linux-crisv32-low.c (cris_regsets): Likewise.
2877 * linux-m68k-low.c (m68k_regsets): Likewise.
2878 * linux-mips-low.c (mips_regsets): Likewise.
2879 * linux-nios2-low.c (nios2_regsets): Likewise.
2880 * linux-ppc-low.c (ppc_regsets): Likewise.
2881 * linux-s390-low.c (s390_regsets): Likewise.
2882 * linux-sh-low.c (sh_regsets): Likewise.
2883 * linux-sparc-low.c (sparc_regsets): Likewise.
2884 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2885 * linux-tile-low.c (tile_regsets): Likewise.
2886 * linux-x86-low.c (x86_regsets): Likewise.
2887 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2888
682b2546
DE
28892015-10-26 Doug Evans <dje@google.com>
2890
2891 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2892
963843d4
DE
28932015-10-26 Doug Evans <dje@google.com>
2894
2895 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2896
d41401ac
DE
28972015-10-26 Doug Evans <dje@google.com>
2898
2899 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2900 for debug_printf.
2901 (attach_thread, find_new_threads_callback): Ditto.
2902
3db28855
AT
29032015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2904
2905 * mem-break.h (set_breakpoint_data): Remove.
2906
fb78e89c
AT
29072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2908
2909 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2910 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2911 (initialize_low): Remove set_breakpoint_data call.
2912 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2913 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2914 (initialize_low): Remove set_breakpoint_data call.
2915 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2916 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2917 (initialize_low): Remove set_breakpoint_data call.
2918
2e6ee069
AT
29192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2920
2921 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2922 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2923 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2924 * target.h (target_breakpoint_kind_from_pc): New macro.
2925
1652a986
AT
29262015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2927
2928 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2929 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2930 the default breakpoint kind.
2931
abeead09
AT
29322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2933
2934 * linux-arm-low.c (arm_supports_z_point_type): Add software
2935 breakpoint support.
2936
b0b4b501
AT
29372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2938
2939 * linux-arm-low.c: Refactor breakpoint definitions.
2940 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2941 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2942
8689682c
AT
29432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2944
2945 * Makefile.in: Add arm.c/o.
2946 * configure.srv: Likewise.
2947 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2948 (arm_breakpoint_kind_from_pc): New function.
2949 (arm_sw_breakpoint_from_kind): Return proper kind.
2950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2951
27165294
AT
29522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2953
2954 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2955 removal.
2956 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2957 (struct raw_breakpoint) <size>: Remove.
2958 (struct raw_breakpoint) <kind>: Add.
2959 (bp_size): New function.
2960 (bp_opcode): Likewise.
2961 (find_raw_breakpoint_at): Adjust for kind.
2962 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2963 (remove_memory_breakpoint): Adjust for kind call bp_size.
2964 (set_raw_breakpoint_at): Adjust for kind.
2965 (set_breakpoint): Likewise.
2966 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2967 (delete_raw_breakpoint): Adjust for kind.
2968 (delete_breakpoint): Likewise.
2969 (find_gdb_breakpoint): Likewise.
2970 (set_gdb_breakpoint_1): Likewise.
2971 (set_gdb_breakpoint): Likewise.
2972 (delete_gdb_breakpoint_1): Likewise.
2973 (delete_gdb_breakpoint): Likewise.
2974 (uninsert_raw_breakpoint): Likewise.
2975 (reinsert_raw_breakpoint): Likewise.
2976 (set_breakpoint_data): Remove.
2977 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2978 (check_mem_read): Adjust for kind call bp_size.
2979 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2980 (clone_one_breakpoint): Adjust for kind.
2981 * mem-break.h (set_gdb_breakpoint): Likewise.
2982 (delete_gdb_breakpoint): Likewise.
2983 * server.c (process_serial_event): Likewise.
2984
dd373349
AT
29852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2986
2987 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2988 (struct linux_target_ops) <breakpoint>: Remove.
2989 (struct linux_target_ops) <breakpoint_len>: Remove.
2990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2992 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2993 (arm_sw_breakpoint_from_kind): New function.
2994 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3010 and sw_breakpoint_from_kind to increment the pc.
3011 (linux_breakpoint_kind_from_pc): New function.
3012 (linux_sw_breakpoint_from_kind): New function.
3013 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3014 (initialize_low): Call breakpoint_kind_from_pc and
3015 sw_breakpoint_from_kind to replace breakpoint_data/len.
3016 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3017 New field.
3018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3019 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3020 (struct linux_target_ops) <breakpoint>: Remove.
3021 (struct linux_target_ops) <breakpoint_len>: Remove.
3022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3024 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3025 (struct linux_target_ops) <breakpoint>: Remove.
3026 (struct linux_target_ops) <breakpoint_len>: Remove.
3027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3029 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3030 (struct linux_target_ops) <breakpoint>: Remove.
3031 (struct linux_target_ops) <breakpoint_len>: Remove.
3032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3034 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3035 (struct linux_target_ops) <breakpoint>: Remove.
3036 (struct linux_target_ops) <breakpoint_len>: Remove.
3037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3039 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3040 (struct linux_target_ops) <breakpoint>: Remove.
3041 (struct linux_target_ops) <breakpoint_len>: Remove.
3042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3044 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3045 (struct linux_target_ops) <breakpoint>: Remove.
3046 (struct linux_target_ops) <breakpoint_len>: Remove.
3047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3049 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3050 (struct linux_target_ops) <breakpoint>: Remove.
3051 (struct linux_target_ops) <breakpoint_len>: Remove.
3052 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3053 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3054 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3055 (struct linux_target_ops) <breakpoint>: Remove.
3056 (struct linux_target_ops) <breakpoint_len>: Remove.
3057 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3059 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3060 (struct linux_target_ops) <breakpoint>: Remove.
3061 (struct linux_target_ops) <breakpoint_len>: Remove.
3062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3064 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3065 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3066 (struct linux_target_ops) <breakpoint>: Remove.
3067 (struct linux_target_ops) <breakpoint_len>: Remove.
3068 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3069 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3070 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3071 (struct linux_target_ops) <breakpoint>: Remove.
3072 (struct linux_target_ops) <breakpoint_len>: Remove.
3073 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3074 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3075
4cd98a19
AT
30762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3077
3078 * linux-cris-low.c (cris_get_pc): Remove void arg.
3079
774ee6d2
AR
30802015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3081
3082 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3083 variable name.
3084
833dcd29
AR
30852015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3086
3087 * inferiors.c (thread_pid_matches_callback): New function.
3088 (find_thread_process): New function.
3089 (remove_thread): Reset current_thread.
3090 (remove_process): Assert threads have been removed first.
3091
8d689ee5
YQ
30922015-10-15 Yao Qi <yao.qi@linaro.org>
3093
3094 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3095 if it is 3.
3096 (aarch64_remove_point): Likewise.
3097 * regcache.c (regcache_register_size): New function.
3098
1c2e1515
YQ
30992015-10-12 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c: Update all callers as emit_load_store
3102 is renamed to aarch64_emit_load_store.
3103
e1c587c3
YQ
31042015-10-12 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-aarch64-low.c: Update all callers of function renaming
3107 from emit_insn to aarch64_emit_insn.
3108
b6542f81
YQ
31092015-10-12 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3112 arch/aarch64-insn.h.
3113 (struct aarch64_memory_operand): Likewise.
3114 (ENCODE): Likewise.
3115 (emit_insn): Move to arch/aarch64-insn.c.
3116 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3117 (emit_load_store): Move to arch/aarch64-insn.c.
3118 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3119 (can_encode_int32): Remove.
3120
246994ce
YQ
31212015-10-12 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3124 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3125 (aarch64_relocate_instruction): Likewise.
3126 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3127 (struct aarch64_insn_visitor): Likewise.
3128
0badd99f
YQ
31292015-10-12 Yao Qi <yao.qi@linaro.org>
3130
3131 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3132 (struct aarch64_insn_visitor): New.
3133 (struct aarch64_insn_relocation_data): New.
3134 (aarch64_ftrace_insn_reloc_b): New function.
3135 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3136 (aarch64_ftrace_insn_reloc_cb): Likewise.
3137 (aarch64_ftrace_insn_reloc_tb): Likewise.
3138 (aarch64_ftrace_insn_reloc_adr): Likewise.
3139 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3140 (aarch64_ftrace_insn_reloc_others): Likewise.
3141 (visitor): New.
3142 (aarch64_relocate_instruction): Use visitor.
3143
dfaffe9d
YQ
31442015-10-12 Yao Qi <yao.qi@linaro.org>
3145
3146 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3147 int. Add argument buf.
3148 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3149 aarch64_relocate_instruction.
3150
70b439f0
YQ
31512015-10-12 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3154 argument insn. Remove local variable insn. Don't call
3155 target_read_uint32.
3156 (aarch64_install_fast_tracepoint_jump_pad): Call
3157 target_read_uint32.
3158
7781c06f
YQ
31592015-09-30 Yao Qi <yao.qi@linaro.org>
3160
3161 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3162 (emit_load_store_pair): Likewise.
3163
9a3c8263
SM
31642015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3165
3166 * dll.c (match_dll): Add cast(s).
3167 (unloaded_dll): Likewise.
3168 * linux-low.c (second_thread_of_pid_p): Likewise.
3169 (delete_lwp_callback): Likewise.
3170 (count_events_callback): Likewise.
3171 (select_event_lwp_callback): Likewise.
3172 (linux_set_resume_request): Likewise.
3173 * server.c (accumulate_file_name_length): Likewise.
3174 (emit_dll_description): Likewise.
3175 (handle_qxfer_threads_worker): Likewise.
3176 (visit_actioned_threads): Likewise.
3177 * thread-db.c (any_thread_of): Likewise.
3178 * tracepoint.c (same_process_p): Likewise.
3179 (match_blocktype): Likewise.
3180 (build_traceframe_info_xml): Likewise.
3181
224c3ddb
SM
31822015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3183
3184 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3185 assignment.
3186 (gdb_unparse_agent_expr): Likewise.
3187 * hostio.c (require_data): Likewise.
3188 (handle_pread): Likewise.
3189 * linux-low.c (disable_regset): Likewise.
3190 (fetch_register): Likewise.
3191 (store_register): Likewise.
3192 (get_dynamic): Likewise.
3193 (linux_qxfer_libraries_svr4): Likewise.
3194 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3195 (set_fast_tracepoint_jump): Likewise.
3196 (uninsert_fast_tracepoint_jumps_at): Likewise.
3197 (reinsert_fast_tracepoint_jumps_at): Likewise.
3198 (validate_inserted_breakpoint): Likewise.
3199 (clone_agent_expr): Likewise.
3200 * regcache.c (init_register_cache): Likewise.
3201 * remote-utils.c (putpkt_binary_1): Likewise.
3202 (decode_M_packet): Likewise.
3203 (decode_X_packet): Likewise.
3204 (look_up_one_symbol): Likewise.
3205 (relocate_instruction): Likewise.
3206 (monitor_output): Likewise.
3207 * server.c (handle_search_memory): Likewise.
3208 (handle_qxfer_exec_file): Likewise.
3209 (handle_qxfer_libraries): Likewise.
3210 (handle_qxfer): Likewise.
3211 (handle_query): Likewise.
3212 (handle_v_cont): Likewise.
3213 (handle_v_run): Likewise.
3214 (captured_main): Likewise.
3215 * target.c (write_inferior_memory): Likewise.
3216 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3217 * tracepoint.c (init_trace_buffer): Likewise.
3218 (add_tracepoint_action): Likewise.
3219 (add_traceframe): Likewise.
3220 (add_traceframe_block): Likewise.
3221 (cmd_qtdpsrc): Likewise.
3222 (cmd_qtdv): Likewise.
3223 (cmd_qtstatus): Likewise.
3224 (response_source): Likewise.
3225 (response_tsv): Likewise.
3226 (cmd_qtnotes): Likewise.
3227 (gdb_collect): Likewise.
3228 (initialize_tracepoint): Likewise.
3229
afbe19f8
PL
32302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3231
3232 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3233 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3234 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3235 <NOP>: New.
3236 (enum aarch64_condition_codes): New enum.
3237 (w0): New static global.
3238 (fp): Likewise.
3239 (lr): Likewise.
3240 (struct aarch64_memory_operand) <type>: New
3241 MEMORY_OPERAND_POSTINDEX type.
3242 (postindex_memory_operand): New helper function.
3243 (emit_ret): New function.
3244 (emit_load_store_pair): New function, factored out of emit_stp
3245 with support for MEMORY_OPERAND_POSTINDEX.
3246 (emit_stp): Rewrite using emit_load_store_pair.
3247 (emit_ldp): New function.
3248 (emit_load_store): Likewise.
3249 (emit_ldr): Mention post-index instruction in comment.
3250 (emit_ldrh): New function.
3251 (emit_ldrb): New function.
3252 (emit_ldrsw): Mention post-index instruction in comment.
3253 (emit_str): Likewise.
3254 (emit_subs): New function.
3255 (emit_cmp): Likewise.
3256 (emit_and): Likewise.
3257 (emit_orr): Likewise.
3258 (emit_orn): Likewise.
3259 (emit_eor): Likewise.
3260 (emit_mvn): Likewise.
3261 (emit_lslv): Likewise.
3262 (emit_lsrv): Likewise.
3263 (emit_asrv): Likewise.
3264 (emit_mul): Likewise.
3265 (emit_sbfm): Likewise.
3266 (emit_sbfx): Likewise.
3267 (emit_ubfm): Likewise.
3268 (emit_ubfx): Likewise.
3269 (emit_csinc): Likewise.
3270 (emit_cset): Likewise.
3271 (emit_nop): Likewise.
3272 (emit_ops_insns): New helper function.
3273 (emit_pop): Likewise.
3274 (emit_push): Likewise.
3275 (aarch64_emit_prologue): New function.
3276 (aarch64_emit_epilogue): Likewise.
3277 (aarch64_emit_add): Likewise.
3278 (aarch64_emit_sub): Likewise.
3279 (aarch64_emit_mul): Likewise.
3280 (aarch64_emit_lsh): Likewise.
3281 (aarch64_emit_rsh_signed): Likewise.
3282 (aarch64_emit_rsh_unsigned): Likewise.
3283 (aarch64_emit_ext): Likewise.
3284 (aarch64_emit_log_not): Likewise.
3285 (aarch64_emit_bit_and): Likewise.
3286 (aarch64_emit_bit_or): Likewise.
3287 (aarch64_emit_bit_xor): Likewise.
3288 (aarch64_emit_bit_not): Likewise.
3289 (aarch64_emit_equal): Likewise.
3290 (aarch64_emit_less_signed): Likewise.
3291 (aarch64_emit_less_unsigned): Likewise.
3292 (aarch64_emit_ref): Likewise.
3293 (aarch64_emit_if_goto): Likewise.
3294 (aarch64_emit_goto): Likewise.
3295 (aarch64_write_goto_address): Likewise.
3296 (aarch64_emit_const): Likewise.
3297 (aarch64_emit_call): Likewise.
3298 (aarch64_emit_reg): Likewise.
3299 (aarch64_emit_pop): Likewise.
3300 (aarch64_emit_stack_flush): Likewise.
3301 (aarch64_emit_zero_ext): Likewise.
3302 (aarch64_emit_swap): Likewise.
3303 (aarch64_emit_stack_adjust): Likewise.
3304 (aarch64_emit_int_call_1): Likewise.
3305 (aarch64_emit_void_call_2): Likewise.
3306 (aarch64_emit_eq_goto): Likewise.
3307 (aarch64_emit_ne_goto): Likewise.
3308 (aarch64_emit_lt_goto): Likewise.
3309 (aarch64_emit_le_goto): Likewise.
3310 (aarch64_emit_gt_goto): Likewise.
3311 (aarch64_emit_ge_got): Likewise.
3312 (aarch64_emit_ops_impl): New static global variable.
3313 (aarch64_emit_ops): New target function, return
3314 &aarch64_emit_ops_impl.
3315 (struct linux_target_ops): Install it.
3316
bb903df0
PL
33172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3318
3319 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3320 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3321 aarch64-ipa.o.
3322 * linux-aarch64-ipa.c: New file.
3323 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3324 and endian.h.
3325 (aarch64_get_thread_area): New target method.
3326 (extract_signed_bitfield): New helper function.
3327 (aarch64_decode_ldr_literal): New function.
3328 (enum aarch64_opcodes): New enum.
3329 (struct aarch64_register): New struct.
3330 (struct aarch64_operand): New struct.
3331 (x0): New static global.
3332 (x1): Likewise.
3333 (x2): Likewise.
3334 (x3): Likewise.
3335 (x4): Likewise.
3336 (w2): Likewise.
3337 (ip0): Likewise.
3338 (sp): Likewise.
3339 (xzr): Likewise.
3340 (aarch64_register): New helper function.
3341 (register_operand): Likewise.
3342 (immediate_operand): Likewise.
3343 (struct aarch64_memory_operand): New struct.
3344 (offset_memory_operand): New helper function.
3345 (preindex_memory_operand): Likewise.
3346 (enum aarch64_system_control_registers): New enum.
3347 (ENCODE): New macro.
3348 (emit_insn): New helper function.
3349 (emit_b): New function.
3350 (emit_bcond): Likewise.
3351 (emit_cb): Likewise.
3352 (emit_tb): Likewise.
3353 (emit_blr): Likewise.
3354 (emit_stp): Likewise.
3355 (emit_ldp_q_offset): Likewise.
3356 (emit_stp_q_offset): Likewise.
3357 (emit_load_store): Likewise.
3358 (emit_ldr): Likewise.
3359 (emit_ldrsw): Likewise.
3360 (emit_str): Likewise.
3361 (emit_ldaxr): Likewise.
3362 (emit_stxr): Likewise.
3363 (emit_stlr): Likewise.
3364 (emit_data_processing_reg): Likewise.
3365 (emit_data_processing): Likewise.
3366 (emit_add): Likewise.
3367 (emit_sub): Likewise.
3368 (emit_mov): Likewise.
3369 (emit_movk): Likewise.
3370 (emit_mov_addr): Likewise.
3371 (emit_mrs): Likewise.
3372 (emit_msr): Likewise.
3373 (emit_sevl): Likewise.
3374 (emit_wfe): Likewise.
3375 (append_insns): Likewise.
3376 (can_encode_int32_in): New helper function.
3377 (aarch64_relocate_instruction): New function.
3378 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3379 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3380 (struct linux_target_ops): Install aarch64_get_thread_area,
3381 aarch64_install_fast_tracepoint_jump_pad and
3382 aarch64_get_min_fast_tracepoint_insn_len.
3383
787749ea
PL
33842015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3385
3386 * Makefile.in (aarch64-insn.o): New rule.
3387 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3388
9812b2e6
YQ
33892015-09-21 Yao Qi <yao.qi@linaro.org>
3390
3391 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3392
18fe412b
YQ
33932015-09-21 Yao Qi <yao.qi@linaro.org>
3394
3395 * tracepoint.c (max_jump_pad_size): Remove.
3396
a0cc84cd
YQ
33972015-09-18 Yao Qi <yao.qi@linaro.org>
3398
3399 * linux-aarch64-low.c: Don't include sys/uio.h.
3400 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3401
d78908cf
WW
34022015-09-16 Wei-cheng Wang <cole945@gmail.com>
3403
3404 * tracepoint.c (eval_result_type): Change prototype.
3405 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3406
d57e0d50
PA
34072015-09-15 Pedro Alves <palves@redhat.com>
3408
3409 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3410 Check whether to report exec events instead of checking whether
3411 multiprocess is enabled.
3412
5a676acc
PA
34132015-09-15 Pedro Alves <palves@redhat.com>
3414
3415 PR remote/18965
3416 * remote-utils.c (prepare_resume_reply): Merge
3417 TARGET_WAITKIND_VFORK_DONE switch case with the
3418 TARGET_WAITKIND_FORKED case.
3419
7c5d0fad
YQ
34202015-09-15 Yao Qi <yao.qi@linaro.org>
3421
3422 * server.c (handle_query): Check string comparison using
3423 "else if" instead of "if".
3424
750ce8d1
YQ
34252015-09-15 Yao Qi <yao.qi@linaro.org>
3426
3427 * server.c (vCont_supported): New global variable.
3428 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3429 matches. Append ";vContSupported+" to own_buf.
3430 (handle_v_requests): Append ";s;S" to own_buf if target supports
3431 hardware single step or vCont_supported is false.
3432 (capture_main): Set vCont_supported to zero.
3433
70b90b91
YQ
34342015-09-15 Yao Qi <yao.qi@linaro.org>
3435
3436 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3437 it to ...
3438 (linux_supports_hardware_single_step): ... New function.
3439 (linux_target_ops): Update.
3440 * lynx-low.c (lynx_target_ops): Set field
3441 supports_hardware_single_step to target_can_do_hardware_single_step.
3442 * nto-low.c (nto_target_ops): Likewise.
3443 * spu-low.c (spu_target_ops): Likewise.
3444 * win32-low.c (win32_target_ops): Likewise.
3445 * target.c (target_can_do_hardware_single_step): New function.
3446 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3447 Remove. <supports_hardware_single_step>: New field.
3448 (target_supports_conditional_breakpoints): Remove.
3449 (target_supports_hardware_single_step): New macro.
3450 (target_can_do_hardware_single_step): Declare.
3451 * server.c (handle_query): Use target_supports_hardware_single_step
3452 instead of target_supports_conditional_breakpoints.
3453
ade90bde
YQ
34542015-09-15 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3457 function.
3458 (struct linux_target_ops the_low_target): Install
3459 aarch64_linux_siginfo_fixup.
3460
94585166
DB
34612015-09-11 Don Breazeal <donb@codesourcery.com>
3462 Luis Machado <lgustavo@codesourcery.com>
3463
3464 * linux-low.c (linux_mourn): Static declaration.
3465 (linux_arch_setup): Move in front of
3466 handle_extended_wait.
3467 (linux_arch_setup_thread): New function.
3468 (handle_extended_wait): Handle exec events. Call
3469 linux_arch_setup_thread. Make event_lwp argument a
3470 pointer-to-a-pointer.
3471 (check_zombie_leaders): Do not check stopped threads.
3472 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3473 (linux_low_filter_event): Add lwp and thread for exec'ing
3474 non-leader thread if leader thread has been deleted.
3475 Refactor code into linux_arch_setup_thread and call it.
3476 Pass child lwp pointer by reference to handle_extended_wait.
3477 (linux_wait_for_event_filtered): Update comment.
3478 (linux_wait_1): Prevent clobbering exec event status.
3479 (linux_supports_exec_events): New function.
3480 (linux_target_ops) <supports_exec_events>: Initialize new member.
3481 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3482 new member.
3483 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3484 * server.c (report_exec_events): New global variable.
3485 (handle_query): Handle qSupported query for exec-events feature.
3486 (captured_main): Initialize report_exec_events.
3487 * server.h (report_exec_events): Declare new global variable.
3488 * target.h (struct target_ops) <supports_exec_events>: New
3489 member.
3490 (target_supports_exec_events): New macro.
3491 * win32-low.c (win32_target_ops) <supports_exec_events>:
3492 Initialize new member.
3493
0568462b
MM
34942015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3495
3496 * linux-low.c (linux_low_enable_btrace): Remove.
3497 (linux_target_ops): Replace linux_low_enable_btrace with
3498 linux_enable_btrace.
3499
39edd165
YQ
35002015-09-03 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch64-low.c (aarch64_insert_point): Call
3503 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3504 returns true.
3505
1db33b5a
UW
35062015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3507
3508 * linux-low.c (check_stopped_by_breakpoint): Use
3509 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3510
ab290430
PA
35112015-08-27 Pedro Alves <palves@redhat.com>
3512
3513 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3514
8d749320
SM
35152015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3516
6711b7f8
SM
3517 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3518 the XNEW-family equivalent.
8d749320
SM
3519 (compile_bytecodes): Likewise.
3520 * dll.c (loaded_dll): Likewise.
3521 * event-loop.c (append_callback_event): Likewise.
3522 (create_file_handler): Likewise.
3523 (create_file_event): Likewise.
3524 * hostio.c (handle_open): Likewise.
3525 * inferiors.c (add_thread): Likewise.
3526 (add_process): Likewise.
3527 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3528 * linux-arm-low.c (arm_new_process): Likewise.
3529 (arm_new_thread): Likewise.
3530 * linux-low.c (add_to_pid_list): Likewise.
3531 (linux_add_process): Likewise.
3532 (handle_extended_wait): Likewise.
3533 (add_lwp): Likewise.
3534 (enqueue_one_deferred_signal): Likewise.
3535 (enqueue_pending_signal): Likewise.
3536 (linux_resume_one_lwp_throw): Likewise.
3537 (linux_resume_one_thread): Likewise.
3538 (linux_read_memory): Likewise.
3539 (linux_write_memory): Likewise.
3540 * linux-mips-low.c (mips_linux_new_process): Likewise.
3541 (mips_linux_new_thread): Likewise.
3542 (mips_add_watchpoint): Likewise.
3543 * linux-x86-low.c (initialize_low_arch): Likewise.
3544 * lynx-low.c (lynx_add_process): Likewise.
3545 * mem-break.c (set_raw_breakpoint_at): Likewise.
3546 (set_breakpoint): Likewise.
3547 (add_condition_to_breakpoint): Likewise.
3548 (add_commands_to_breakpoint): Likewise.
3549 (clone_agent_expr): Likewise.
3550 (clone_one_breakpoint): Likewise.
3551 * regcache.c (new_register_cache): Likewise.
3552 * remote-utils.c (look_up_one_symbol): Likewise.
3553 * server.c (queue_stop_reply): Likewise.
3554 (start_inferior): Likewise.
3555 (queue_stop_reply_callback): Likewise.
3556 (handle_target_event): Likewise.
3557 * spu-low.c (fetch_ppc_memory): Likewise.
3558 (store_ppc_memory): Likewise.
3559 * target.c (set_target_ops): Likewise.
3560 * thread-db.c (thread_db_load_search): Likewise.
3561 (try_thread_db_load_1): Likewise.
3562 * tracepoint.c (add_tracepoint): Likewise.
3563 (add_tracepoint_action): Likewise.
3564 (create_trace_state_variable): Likewise.
3565 (cmd_qtdpsrc): Likewise.
3566 (cmd_qtro): Likewise.
3567 (add_while_stepping_state): Likewise.
3568 * win32-low.c (child_add_thread): Likewise.
3569 (get_image_name): Likewise.
3570
ed8b7b42
YQ
35712015-08-25 Yao Qi <yao.qi@linaro.org>
3572
3573 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3574
db3cb7cb
YQ
35752015-08-25 Yao Qi <yao.qi@linaro.org>
3576
3577 * Makefile.in (aarch64-linux.o): New rule.
3578 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3579 srv_tgtobj.
3580 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3581 (aarch64_init_debug_reg_state): Make it extern.
3582 (aarch64_linux_prepare_to_resume): Remove.
3583
f6011a1c
YQ
35842015-08-25 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3587 lwp_arch_private_info and ptid_of_lwp.
3588
88e2cf7e
YQ
35892015-08-25 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3592 Find proc_info by find_process_pid. All callers updated.
3593
5e35436e
YQ
35942015-08-25 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3597 Remove.
3598 (debug_reg_change_callback): Remove.
3599 (aarch64_notify_debug_reg_change): Remove.
3600
4a8a7965
YQ
36012015-08-25 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3604 Call current_lwp_ptid.
3605
32a271ee
YQ
36062015-08-25 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-aarch64-low.c (debug_reg_change_callback): Use
3609 debug_printf.
3610
0d51c8d7
YQ
36112015-08-25 Yao Qi <yao.qi@linaro.org>
3612
3613 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3614
31a43dd5
YQ
36152015-08-25 Yao Qi <yao.qi@linaro.org>
3616
3617 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3618
8ee52567
YQ
36192015-08-25 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3622 the code.
3623
ff3f0f45
YQ
36242015-08-25 Yao Qi <yao.qi@linaro.org>
3625
3626 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3627 Remove.
3628 (debug_reg_change_callback): Remove argument entry and add argument
3629 lwp. Remove local variable thread. Don't print thread id in the
3630 debugging output. Don't check whether pid of thread equals to pid.
3631 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3632 iterate_over_lwps instead find_inferior.
3633
3d40fbb5
PA
36342015-08-24 Pedro Alves <palves@redhat.com>
3635
3636 * inferiors.c (get_first_process): New function.
3637 * inferiors.h (get_first_process): New declaration.
3638 * remote-utils.c (read_ptid): Default to the first process in the
3639 list, instead of to the current thread's process.
3640
438e1e42
PA
36412015-08-24 Pedro Alves <palves@redhat.com>
3642
3643 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3644 * event-loop.c: Likewise.
3645 * remote-utils.c: Likewise.
3646 * tracepoint.c: Likewise.
3647
a8c6d4fc
PA
36482015-08-24 Pedro Alves <palves@redhat.com>
3649
3650 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3651 ptid_get_lwp.
3652
99b0bb12
PA
36532015-08-21 Pedro Alves <palves@redhat.com>
3654
3655 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3656 instead of literal 1.
3657
f8904751
PA
36582015-08-21 Pedro Alves <palves@redhat.com>
3659
3660 * tdesc.c (default_description): Explicitly zero-initialize.
3661
465a859e
PA
36622015-08-21 Pedro Alves <palves@redhat.com>
3663
3664 PR gdb/18749
3665 * inferiors.c (remove_thread): Discard any pending stop reply for
3666 this thread.
3667 * server.c (remove_all_on_match_pid): Rename to ...
3668 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3669 instead of a pid.
3670 (discard_queued_stop_replies): Change parameter to a ptid. Now
3671 extern.
3672 (handle_v_kill, kill_inferior_callback, captured_main)
3673 (process_serial_event): Adjust.
3674 * server.h (discard_queued_stop_replies): Declare.
3675
f0db101d
PA
36762015-08-21 Pedro Alves <palves@redhat.com>
3677
3678 * linux-low.c (wait_for_sigstop): Always switch to no thread
3679 selected if the previously current thread dies.
3680 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3681 process instead of the current thread's.
3682 * remote-utils.c (input_interrupt): Don't check if there's no
3683 current thread.
3684 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3685 current thread to the general thread fails, error out.
3686 (handle_qxfer_auxv, handle_qxfer_libraries)
3687 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3688 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3689 (handle_query): Check if there's a thread selected instead of
3690 checking whether there's any thread in the thread list.
3691 (handle_qxfer_threads, handle_qxfer_btrace)
3692 (handle_qxfer_btrace_conf): Don't error out early if there's no
3693 thread in the thread list.
3694 (handle_v_cont, myresume): Don't set the current thread to the
3695 continue thread.
3696 (process_serial_event) <Hg handling>: Also set thread_id if the
3697 previous general thread is still alive.
3698 (process_serial_event) <g/G handling>: If setting the current
3699 thread to the general thread fails, error out.
3700 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3701 thread's lwp instead of the current thread's.
3702 * target.c (set_desired_thread): If the desired thread was not
3703 found, leave the current thread pointing to NULL. Return an int
3704 (boolean) indicating success.
3705 * target.h (set_desired_thread): Change return type to int.
3706
40045d91
MF
37072015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3708
3709 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3710 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3711 #includes.
3712 (ps_get_thread_area): New function.
3713
45face3b
GB
37142015-08-19 Gary Benson <gbenson@redhat.com>
3715
3716 * hostio.c (handle_pread): Do not attempt to read more data
3717 than hostio_reply_with_data can fit in a packet.
3718
16d5f642
JB
37192015-08-18 Joel Brobecker <brobecker@adacore.com>
3720
3721 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3722
a738da3a
MF
37232015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3724
3725 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3726
33ebda9d
PA
37272015-08-06 Pedro Alves <palves@redhat.com>
3728
3729 * tracepoint.c (expr_eval_result): Now an int.
3730
a44892be
PA
37312015-08-06 Pedro Alves <palves@redhat.com>
3732
3733 * gdbthread.h (struct regcache): Forward declare.
3734 (struct thread_info) <regcache_data>: Now a struct regcache
3735 pointer.
3736 * inferiors.c (inferior_regcache_data)
3737 (set_inferior_regcache_data): Now work with struct regcache
3738 pointers.
3739 * inferiors.h (struct regcache): Forward declare.
3740 (inferior_regcache_data, set_inferior_regcache_data): Now work
3741 with struct regcache pointers.
3742 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3743 (free_register_cache_thread): Remove struct regcache pointer
3744 casts.
3745
608a1e46
PA
37462015-08-06 Pedro Alves <palves@redhat.com>
3747
3748 * server.c (captured_main): On error, print the exception message
3749 to stderr, and if run_once is set, throw a quit.
3750
f0ce0d3a
PA
37512015-08-06 Pedro Alves <palves@redhat.com>
3752
3753 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3754 the current thread.
3755
bf47e248
PA
37562015-08-06 Pedro Alves <palves@redhat.com>
3757
3758 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3759 reading beyond the passed in buffer length.
3760
b6b9ffcc
PL
37612015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3762
3763 * tracepoint.c (symbol_list) <required>: Remove.
3764
863d01bd
PA
37652015-08-06 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3768 count if stopping and suspending threads.
3769 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3770 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3771 (linux_detach): Complete an ongoing step-over.
3772 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3773 throughout.
3774 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3775 (linux_wait_1): If passing a signal to the inferior after
3776 finishing a step-over, unsuspend and re-resume all lwps. If we
3777 see a single-step event but the thread should be continuing, don't
3778 pass the trap to gdb.
3779 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3780 internal_error instead of gdb_assert.
3781 (enqueue_pending_signal): New function.
3782 (check_ptrace_stopped_lwp_gone): Add debug output.
3783 (start_step_over): Use internal_error instead of gdb_assert.
3784 (complete_ongoing_step_over): New function.
3785 (linux_resume_one_thread): Don't resume a suspended thread.
3786 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3787 it stepping.
3788
00db26fa
PA
37892015-08-06 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3792 (linux_thread_alive): Use lwp_is_marked_dead.
3793 (extended_event_reported): Delete.
3794 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3795 instead of extended_event_reported.
3796 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3797 as well.
3798 (lwp_is_marked_dead): New function.
3799 (lwp_running): Use lwp_is_marked_dead.
3800 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3801 comment.
3802
ad071a30
PA
38032015-08-06 Pedro Alves <palves@redhat.com>
3804
3805 * linux-low.c (linux_wait_1): Move fork event output out of the
3806 !report_to_gdb check. Pass event_child->waitstatus to
3807 target_waitstatus_to_string instead of ourstatus.
3808
524b57e6
YQ
38092015-08-04 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3812 if current_thread is 32 bit.
3813
6085d6f6
YQ
38142015-08-04 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3817 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3818 * server.c (extended_protocol): Remove "static".
3819 * server.h (extended_protocol): Declare it.
3820
8a7e4587
YQ
38212015-08-04 Yao Qi <yao.qi@linaro.org>
3822
3823 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3824 both aarch64 and aarch32.
3825 (aarch64_set_pc): Likewise.
3826
3b53ae99
YQ
38272015-08-04 Yao Qi <yao.qi@linaro.org>
3828
3829 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3830 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3831 arm-with-neon.xml to srv_xmlfiles.
3832 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3833 (is_64bit_tdesc): New function.
3834 (aarch64_linux_read_description): New function.
3835 (aarch64_arch_setup): Call aarch64_linux_read_description.
3836 (regs_info): Rename to regs_info_aarch64.
3837 (aarch64_regs_info): Return right regs_info.
3838 (initialize_low_arch): Call initialize_low_arch_aarch32.
3839
bd9e6534
YQ
38402015-08-04 Yao Qi <yao.qi@linaro.org>
3841
3842 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3843 * linux-aarch32-low.c: New file.
3844 * linux-aarch32-low.h: New file.
3845 * linux-arm-low.c (arm_fill_gregset): Move it to
3846 linux-aarch32-low.c.
3847 (arm_store_gregset): Likewise.
3848 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3849 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3850 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3851 (regs_info): Rename to regs_info_arm.
3852 (arm_regs_info): Return regs_info_aarch32 if
3853 have_ptrace_getregset is 1 and target description is
3854 arm_with_neon or arm_with_vfpv3.
3855 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3856 Call initialize_low_arch_aarch32 instead.
3857
ded48a5e
YQ
38582015-08-04 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3861 * linux-low.c: ... here.
3862 * linux-low.h (have_ptrace_getregset): Declare it.
3863
96e9210f
PA
38642015-08-04 Pedro Alves <palves@redhat.com>
3865
3866 * thread-db.c (struct thread_db): Use new typedefs.
3867 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3868 CHK calls.
3869 (disable_thread_event_reporting): Cast result of dlsym to
3870 destination function pointer type.
3871 (thread_db_mourn): Use td_ta_delete_ftype.
3872
af60a1ef
SL
38732015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3874
3875 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3876 arch variant.
3877 (CDX_BREAKPOINT): Define for R2.
3878 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3879 (the_low_target): Add comments.
3880
e8b41681
YQ
38812015-07-30 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-arm-low.c (arm_hwcap): Remove it.
3884 (arm_read_description): New local variable arm_hwcap. Don't
3885 set arm_hwcap to zero.
3886
89abb039
YQ
38872015-07-30 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3890 Use regcache->tdesc instead.
3891 (arm_store_wmmxregset): Likewise.
3892 (arm_fill_vfpregset): Likewise.
3893 (arm_store_vfpregset): Likewise.
3894
deca266c
YQ
38952015-07-30 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-arm-low.c: Include arch/arm.h.
3898 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3899 (arm_store_gregset): Likewise.
3900
aa58a496
SM
39012015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3902
3903 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3904 ptrace's 4th parameter.
3905
50904b25
YQ
39062015-07-27 Yao Qi <yao.qi@linaro.org>
3907
3908 * configure.srv (case aarch64*-*-linux*): Don't set
3909 srv_linux_usrregs.
3910
5826e159
PA
39112015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3912
3913 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3914 sys/ptrace.h.
3915 * linux-arm-low.c: Likewise.
3916 * linux-cris-low.c: Likewise.
3917 * linux-crisv32-low.c: Likewise.
3918 * linux-low.c: Likewise.
3919 * linux-m68k-low.c: Likewise.
3920 * linux-mips-low.c: Likewise.
3921 * linux-nios2-low.c: Likewise.
3922 * linux-s390-low.c: Likewise.
3923 * linux-sparc-low.c: Likewise.
3924 * linux-tic6x-low.c: Likewise.
3925 * linux-tile-low.c: Likewise.
3926 * linux-x86-low.c: Likewise.
3927
54019719
PA
39282015-07-24 Pedro Alves <palves@redhat.com>
3929
3930 * config.in: Regenerate.
3931 * configure: Regenerate.
3932
eb7aa561
PA
39332015-07-24 Pedro Alves <palves@redhat.com>
3934
3935 * acinclude.m4: Include ../ptrace.m4.
3936 * configure.ac: Call GDB_AC_PTRACE.
3937 * config.in, configure: Regenerate.
3938
55d7b841
YQ
39392015-07-24 Yao Qi <yao.qi@linaro.org>
3940
3941 * linux-low.c (linux_create_inferior): Remove setting to
3942 proc->priv->new_inferior.
3943 (linux_attach): Likewise.
3944 (linux_low_filter_event): Likewise.
3945 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3946
c06cbd92
YQ
39472015-07-24 Yao Qi <yao.qi@linaro.org>
3948
3949 * linux-low.c (linux_arch_setup): New function.
3950 (linux_low_filter_event): If proc->tdesc is NULL and
3951 proc->attached is true, call the_low_target.arch_setup.
3952 Otherwise, keep status pending, and return.
3953 (linux_resume_one_lwp_throw): Don't call get_pc if
3954 thread->while_stepping isn't NULL. Don't call
3955 get_thread_regcache if proc->tdesc is NULL.
3956 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3957 (linux_target_ops): Install arch_setup.
3958 * server.c (start_inferior): Call the_target->arch_setup.
3959 * target.h (struct target_ops) <arch_setup>: New field.
3960 (target_arch_setup): New marco.
3961 * lynx-low.c (lynx_target_ops): Update.
3962 * nto-low.c (nto_target_ops): Update.
3963 * spu-low.c (spu_target_ops): Update.
3964 * win32-low.c (win32_target_ops): Update.
3965
5ae3ebba
YQ
39662015-07-24 Yao Qi <yao.qi@linaro.org>
3967
3968 * linux-low.c (linux_add_process): Don't set
3969 proc->priv->new_inferior.
3970 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3971 (linux_attach): Likewise.
3972
eb97750b
YQ
39732015-07-24 Yao Qi <yao.qi@linaro.org>
3974
3975 * server.c (start_inferior): Code refactor.
3976
51aee833
YQ
39772015-07-24 Yao Qi <yao.qi@linaro.org>
3978
3979 * server.c (process_serial_event): Set general_thread.
3980
af1b22f3
YQ
39812015-07-21 Yao Qi <yao.qi@linaro.org>
3982
3983 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3984 aarch64_linux_get_debug_reg_capacity.
3985
554717a3
YQ
39862015-07-17 Yao Qi <yao.qi@linaro.org>
3987
3988 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3989 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3990 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3991 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3992 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3993 (AARCH64_HWP_ALIGNMENT): Likewise.
3994 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3995 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3996 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3997 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3998 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3999 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4000 (struct aarch64_debug_reg_state): Likewise.
4001 (struct arch_lwp_info): Likewise.
4002 (aarch64_align_watchpoint): Likewise.
4003 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4004 (aarch64_watchpoint_length): Likewise.
4005 (aarch64_point_encode_ctrl_reg): Likewise
4006 (aarch64_point_is_aligned): Likewise.
4007 (aarch64_align_watchpoint): Likewise.
4008 (aarch64_linux_set_debug_regs):
4009 (aarch64_dr_state_insert_one_point): Likewise.
4010 (aarch64_dr_state_remove_one_point): Likewise.
4011 (aarch64_handle_breakpoint): Likewise.
4012 (aarch64_handle_aligned_watchpoint): Likewise.
4013 (aarch64_handle_unaligned_watchpoint): Likewise.
4014 (aarch64_handle_watchpoint): Likewise.
4015
c67ca4de
YQ
40162015-07-17 Yao Qi <yao.qi@linaro.org>
4017
4018 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4019 and don't aarch64_get_debug_reg_state. All callers update.
4020 (aarch64_handle_aligned_watchpoint): Likewise.
4021 (aarch64_handle_unaligned_watchpoint): Likewise.
4022 (aarch64_handle_watchpoint): Likewise.
4023 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4024 (aarch64_remove_point): Likewise.
4025
25abf979
YQ
40262015-07-17 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4029 debug_printf.
4030 (aarch64_handle_unaligned_watchpoint): Likewise.
4031
db1ff28b
JK
40322015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4033
4034 Revert the previous 3 commits:
4035 Move gdb_regex* to common/
4036 Move linux_find_memory_regions_full & co.
4037 gdbserver build-id attribute generator
4038
700ca40f
JK
40392015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4040 Jan Kratochvil <jan.kratochvil@redhat.com>
4041
4042 gdbserver build-id attribute generator.
4043 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4044 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4045 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4046 (find_phdr): New.
4047 (get_dynamic): Use find_pdhr to traverse program headers.
4048 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4049 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4050 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4051 (get_hex_build_id): New.
4052 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4053 to reply XML document.
4054
9904185c
JK
40552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4056 Jan Kratochvil <jan.kratochvil@redhat.com>
4057
4058 * target.c: Include target/target-utils.h and fcntl.h.
4059 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4060 (target_fileio_read_stralloc): New functions.
4061
6e5b4429
JK
40622015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4063
4064 * Makefile.in (OBS): Add gdb_regex.o.
4065 (gdb_regex.o): New.
4066 * config.in: Rebuilt.
4067 * configure: Rebuilt.
4068
ddc98fbf
JK
40692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4070 Jan Kratochvil <jan.kratochvil@redhat.com>
4071
4072 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4073 * Makefile.in (OBS): Add target-utils.o.
4074 (linux-maps.o, target-utils.o): New.
4075 * configure.srv (srv_linux_obj): Add linux-maps.o.
4076
e57bb7a0
PL
40772015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4078
4079 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4080 function, return 1.
4081 (the_low_target): Install it.
4082
586b02a9
PA
40832015-07-14 Pedro Alves <palves@redhat.com>
4084
4085 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4086 Instead, ignore ECHILD, and throw an error for other errnos.
4087
58c1b36c
PA
40882015-07-10 Pedro Alves <palves@redhat.com>
4089
4090 * event-loop.c (struct callback_event) <data>: Change type to
4091 gdb_client_data instance instead of gdb_client_data pointer.
4092 (append_callback_event): Adjust.
4093
421530db
PL
40942015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4095
4096 * linux-aarch64-low.c: Add comments for each linux_target_ops
4097 method. Remove comments already covered in target_ops and
4098 linux_target_ops definitions.
4099 (the_low_target): Add comments for each unimplemented method.
4100
c2d65f38
YQ
41012015-07-09 Yao Qi <yao.qi@linaro.org>
4102
4103 * linux-aarch64-low.c (aarch64_regmap): Remove.
4104 (aarch64_usrregs_info): Remove.
4105 (regs_info): Set field usrregs to NULL.
4106
b20a6524
MM
41072015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4108
4109 * linux-low.c: Include "rsp-low.h"
4110 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4111 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4112 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4113 (handle_btrace_enable_pt): New.
4114 (handle_btrace_general_set): Support "pt".
4115 (handle_btrace_conf_general_set): Support "pt:size".
4116
96c97461
PL
41172015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4118
4119 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4120 Z_PACKET_SW_BP.
4121
37d66942
PL
41222015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4123
4124 * linux-aarch64-low.c: Remove comment about endianness.
4125 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4126 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4127 memcmp.
4128
dc06243f
GB
41292015-06-24 Gary Benson <gbenson@redhat.com>
4130
4131 * linux-i386-ipa.c (stdint.h): Do not include.
4132 * lynx-i386-low.c (stdint.h): Likewise.
4133 * lynx-ppc-low.c (stdint.h): Likewise.
4134 * mem-break.c (stdint.h): Likewise.
4135 * thread-db.c (stdint.h): Likewise.
4136 * tracepoint.c (stdint.h): Likewise.
4137 * win32-low.c (stdint.h): Likewise.
4138
124e13d9
SM
41392015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4140
4141 * server.c (write_qxfer_response): Update call to
4142 remote_escape_output.
4143
909c2cda
JK
41442015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4145 Jan Kratochvil <jan.kratochvil@redhat.com>
4146
4147 Merge multiple hex conversions.
4148 * gdbreplay.c (tohex): Rename to 'fromhex'.
4149 (logchar): Use fromhex.
4150
24c05f46
JK
41512015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4152
4153 * server.c (handle_qxfer_libraries): Set `version' attribute for
4154 <library-list>.
4155
14d2069a
GB
41562015-06-10 Gary Benson <gbenson@redhat.com>
4157
4158 * target.h (struct target_ops) <multifs_open>: New field.
4159 <multifs_unlink>: Likewise.
4160 <multifs_readlink>: Likewise.
4161 * linux-low.c (nat/linux-namespaces.h): New include.
4162 (linux_target_ops): Initialize the_target->multifs_open,
4163 the_target->multifs_unlink and the_target->multifs_readlink.
4164 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4165 * hostio.c (hostio_fs_pid): New static variable.
4166 (hostio_handle_new_gdb_connection): New function.
4167 (handle_setfs): Likewise.
4168 (handle_open): Use the_target->multifs_open as appropriate.
4169 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4170 (handle_readlink): Use the_target->multifs_readlink as
4171 appropriate.
4172 (handle_vFile): Handle vFile:setfs packets.
4173 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4174 after target_handle_new_gdb_connection.
4175
4b8b5e72
GB
41762015-06-10 Gary Benson <gbenson@redhat.com>
4177
4178 * configure.ac (AC_CHECK_FUNCS): Add setns.
4179 * config.in: Regenerate.
4180 * configure: Likewise.
4181 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4182 (linux-namespaces.o): New rule.
4183 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4184
3ac2e371
GB
41852015-06-09 Gary Benson <gbenson@redhat.com>
4186
4187 * hostio.c (handle_open): Process mode argument with
4188 fileio_to_host_mode.
4189
ca9b78ce
YQ
41902015-06-01 Yao Qi <yao.qi@linaro.org>
4191
4192 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4193 * linux-x86-low.c: Likewise.
4194
bfacd19d
DB
41952015-05-28 Don Breazeal <donb@codesourcery.com>
4196
4197 * linux-low.c (handle_extended_wait): Initialize
4198 thread_info.last_resume_kind for new fork children.
4199
452003ef
PA
42002015-05-15 Pedro Alves <palves@redhat.com>
4201
4202 * target.h (target_handle_new_gdb_connection): Rewrite using if
4203 wrapped in do/while.
4204
1041a03c
JB
42052015-05-14 Joel Brobecker <brobecker@adacore.com>
4206
4207 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4208 * configure, config.in: Regenerate.
4209 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4210 Declare typedef.
4211
c269dbdb
DB
42122015-05-12 Don Breazeal <donb@codesourcery.com>
4213
4214 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4215 PTRACE_EVENT_VFORK_DONE.
4216 (linux_low_ptrace_options, extended_event_reported): Add vfork
4217 events.
4218 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4219 and "vforkdone" for RSP 'T' Stop Reply Packet.
4220 * server.h (report_vfork_events): Declare
4221 global variable.
4222
3a8a0396
DB
42232015-05-12 Don Breazeal <donb@codesourcery.com>
4224
4225 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4226 (the_low_target) <new_fork>: Initialize new member.
4227 * linux-arm-low.c (arm_new_fork): New function.
4228 (the_low_target) <new_fork>: Initialize new member.
4229 * linux-low.c (handle_extended_wait): Call new target function
4230 new_fork.
4231 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4232 * linux-mips-low.c (mips_add_watchpoint): New function
4233 extracted from mips_insert_point.
4234 (the_low_target) <new_fork>: Initialize new member.
4235 (mips_linux_new_fork): New function.
4236 (mips_insert_point): Call mips_add_watchpoint.
4237 * linux-x86-low.c (x86_linux_new_fork): New function.
4238 (the_low_target) <new_fork>: Initialize new member.
4239
de0d863e
DB
42402015-05-12 Don Breazeal <donb@codesourcery.com>
4241
4242 * linux-low.c (handle_extended_wait): Implement return value,
4243 rename argument 'event_child' to 'event_lwp', handle
4244 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4245 (linux_low_ptrace_options): New function.
4246 (linux_low_filter_event): Call linux_low_ptrace_options,
4247 use different argument fo linux_enable_event_reporting,
4248 use return value from handle_extended_wait.
4249 (extended_event_reported): New function.
4250 (linux_wait_1): Call extended_event_reported and set
4251 status to report fork events.
4252 (linux_write_memory): Add pid to debug message.
4253 (reset_lwp_ptrace_options_callback): New function.
4254 (linux_handle_new_gdb_connection): New function.
4255 (linux_target_ops): Initialize new structure member.
4256 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4257 * lynx-low.c: Initialize new structure member.
4258 * remote-utils.c (prepare_resume_reply): Implement stop reason
4259 "fork" for "T" stop message.
4260 * server.c (handle_query): Call handle_new_gdb_connection.
4261 * server.h (report_fork_events): Declare global flag.
4262 * target.h (struct target_ops) <handle_new_gdb_connection>:
4263 New member.
4264 (target_handle_new_gdb_connection): New macro.
4265 * win32-low.c: Initialize new structure member.
4266
ddcbc397
DB
42672015-05-12 Don Breazeal <donb@codesourcery.com>
4268
4269 * mem-break.c (APPEND_TO_LIST): Define macro.
4270 (clone_agent_expr): New function.
4271 (clone_one_breakpoint): New function.
4272 (clone_all_breakpoints): New function.
4273 * mem-break.h: Declare new functions.
4274
89245bc0
DB
42752015-05-12 Don Breazeal <donb@codesourcery.com>
4276
4277 * linux-low.c (linux_supports_fork_events): New function.
4278 (linux_supports_vfork_events): New function.
4279 (linux_target_ops): Initialize new structure members.
4280 (initialize_low): Call linux_check_ptrace_features.
4281 * lynx-low.c (lynx_target_ops): Initialize new structure
4282 members.
4283 * server.c (report_fork_events, report_vfork_events):
4284 New global flags.
4285 (handle_query): Add new features to qSupported packet and
4286 response.
4287 (captured_main): Initialize new global variables.
4288 * target.h (struct target_ops) <supports_fork_events>:
4289 New member.
4290 <supports_vfork_events>: New member.
4291 (target_supports_fork_events): New macro.
4292 (target_supports_vfork_events): New macro.
4293 * win32-low.c (win32_target_ops): Initialize new structure
4294 members.
4295
835205d0
GB
42962015-05-12 Gary Benson <gbenson@redhat.com>
4297
4298 * server.c (handle_qxfer_exec_file): Use current process
4299 if annex is empty.
4300
21e94bd9
SL
43012015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4302
4303 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4304 Remove HAVE_PTRACE_GETREGS conditionals.
4305 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4306 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4307
45614f15
YQ
43082015-05-08 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-low.c (linux_supports_conditional_breakpoints): New
4311 function.
4312 (linux_target_ops): Install new target method.
4313 * lynx-low.c (lynx_target_ops): Install NULL hook for
4314 supports_conditional_breakpoints.
4315 * nto-low.c (nto_target_ops): Likewise.
4316 * spu-low.c (spu_target_ops): Likewise.
4317 * win32-low.c (win32_target_ops): Likewise.
4318 * server.c (handle_query): Check
4319 target_supports_conditional_breakpoints.
4320 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4321 New field.
4322 (target_supports_conditional_breakpoints): New macro.
4323
80ad801e
PA
43242015-05-06 Pedro Alves <palves@redhat.com>
4325
4326 PR server/18081
4327 * server.c (start_inferior): If the process exits, mourn it.
4328
819843c7
GB
43292015-04-21 Gary Benson <gbenson@redhat.com>
4330
4331 * hostio.c (fileio_open_flags_to_host): Factored out to
4332 fileio_to_host_openflags in common/fileio.c. Single use
4333 updated.
4334
a2d5a9d7
MF
43352015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4336
4337 * linux-xtensa-low.c (xtensa_fill_gregset)
4338 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4339 XCHAL_HAVE_LOOP.
4340
deb44829
MF
43412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4342
4343 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4344 (regs_info): Replace usrregs pointer with NULL.
4345
e57f1de3
GB
43462015-04-17 Gary Benson <gbenson@redhat.com>
4347
4348 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4349 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4350 * server.c (handle_qxfer_exec_file): New function.
4351 (qxfer_packets): Add exec-file entry.
4352 (handle_query): Report qXfer:exec-file:read as supported packet.
4353
62828379
RN
43542015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4355
4356 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4357
b88bb450
GB
43582015-04-09 Gary Benson <gbenson@redhat.com>
4359
4360 * hostio-errno.c (errno_to_fileio_error): Remove function.
4361 Update caller to use remote_fileio_to_fio_error.
4362
c8f4bfdd
YQ
43632015-04-09 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-low.c (linux_insert_point): Call
4366 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4367 (linux_remove_point): Call remove_memory_breakpoint if type is
4368 raw_bkpt_type_sw.
4369 * linux-x86-low.c (x86_insert_point): Don't call
4370 insert_memory_breakpoint.
4371 (x86_remove_point): Don't call remove_memory_breakpoint.
4372
41f98f02
PA
43732015-04-01 Pedro Alves <palves@redhat.com>
4374 Cleber Rosa <crosa@redhat.com>
4375
4376 * server.c (gdbserver_usage): Reorganize and extend the usage
4377 message.
4378
2bf6fb9d
PA
43792015-03-24 Pedro Alves <palves@redhat.com>
4380
4381 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4382 output. Also dump TRAP_TRACE.
4383 (linux_low_filter_event): In debug output, distinguish a
4384 resume_stop SIGSTOP from a delayed SIGSTOP.
4385
369f6daa
GB
43862015-03-24 Gary Benson <gbenson@redhat.com>
4387
4388 * linux-x86-low.c (x86_linux_new_thread): Moved to
4389 nat/x86-linux.c.
4390 (x86_linux_prepare_to_resume): Likewise.
4391
8e5d4070
GB
43922015-03-24 Gary Benson <gbenson@redhat.com>
4393
4394 * Makefile.in (x86-linux-dregs.o): New rule.
4395 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4396 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4397 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4398 (x86_linux_dr_get): Likewise.
4399 (x86_linux_dr_set): Likewise.
4400 (update_debug_registers_callback): Likewise.
4401 (x86_linux_dr_set_addr): Likewise.
4402 (x86_linux_dr_get_addr): Likewise.
4403 (x86_linux_dr_set_control): Likewise.
4404 (x86_linux_dr_get_control): Likewise.
4405 (x86_linux_dr_get_status): Likewise.
4406 (x86_linux_update_debug_registers): Likewise.
4407
2b95d440
GB
44082015-03-24 Gary Benson <gbenson@redhat.com>
4409
4410 * linux-x86-low.c (x86_linux_update_debug_registers):
4411 New function, factored out from...
4412 (x86_linux_prepare_to_resume): ...this.
4413
14b0bc68
GB
44142015-03-24 Gary Benson <gbenson@redhat.com>
4415
4416 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4417 (x86_linux_dr_set): Likewise.
4418 (update_debug_registers_callback): Likewise.
4419 (x86_linux_dr_set_addr): Likewise.
4420 (x86_linux_dr_get_addr): Likewise.
4421 (x86_linux_dr_set_control): Likewise.
4422 (x86_linux_dr_get_control): Likewise.
4423 (x86_linux_dr_get_status): Likewise.
4424 (x86_linux_prepare_to_resume): Likewise.
4425
5dfe6ca8
GB
44262015-03-24 Gary Benson <gbenson@redhat.com>
4427
4428 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4429 Use perror_with_name. Pass string through gettext.
4430 (x86_linux_dr_set): Likewise.
4431
d33472ad
GB
44322015-03-24 Gary Benson <gbenson@redhat.com>
4433
4434 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4435 (x86_linux_dr_set_addr): ...this.
4436 (x86_dr_low_get_addr): Rename to...
4437 (x86_linux_dr_get_addr): ...this.
4438 (x86_dr_low_set_control): Rename to...
4439 (x86_linux_dr_set_control): ...this.
4440 (x86_dr_low_get_control): Rename to...
4441 (x86_linux_dr_get_control): ...this.
4442 (x86_dr_low_get_status): Rename to...
4443 (x86_linux_dr_get_status): ...this.
4444 (x86_dr_low): Update with new function names.
4445
4b134ca1
GB
44462015-03-24 Gary Benson <gbenson@redhat.com>
4447
4448 * Makefile.in (x86-linux.o): New rule.
4449 * configure.srv: Add x86-linux.o to relevant targets.
4450 * linux-low.c (lwp_set_arch_private_info): New function.
4451 (lwp_arch_private_info): Likewise.
4452 * linux-x86-low.c: Include nat/x86-linux.h.
4453 (arch_lwp_info): Removed structure.
4454 (update_debug_registers_callback):
4455 Use lwp_set_debug_registers_changed.
4456 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4457 and lwp_set_debug_registers_changed.
4458 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4459
34c703da
GB
44602015-03-24 Gary Benson <gbenson@redhat.com>
4461
4462 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4463 * linux-arm-low.c (arm_new_thread): Likewise.
4464 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4465 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4466 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4467 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4468
cff068da
GB
44692015-03-24 Gary Benson <gbenson@redhat.com>
4470
4471 * linux-low.c (ptid_of_lwp): New function.
4472 (lwp_is_stopped): Likewise.
4473 (lwp_stop_reason): Likewise.
4474 * linux-x86-low.c (update_debug_registers_callback):
4475 Use lwp_is_stopped.
4476 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4477 lwp_stop_reason.
4478
b2f7c7e8
GB
44792015-03-24 Gary Benson <gbenson@redhat.com>
4480
4481 * linux-low.h (linux_stop_lwp): Remove declaration.
4482
6d4ee8c6
GB
44832015-03-24 Gary Benson <gbenson@redhat.com>
4484
4485 * linux-low.h: Include nat/linux-nat.h.
4486 * linux-low.c (iterate_over_lwps_args): New structure.
4487 (iterate_over_lwps_filter): New function.
4488 (iterate_over_lwps): Likewise.
4489 * linux-x86-low.c (update_debug_registers_callback):
4490 Update signature to what iterate_over_lwps expects.
4491 Remove PID check that iterate_over_lwps now performs.
4492 (x86_dr_low_set_addr): Use iterate_over_lwps.
4493 (x86_dr_low_set_control): Likewise.
4494
70a0bb6b
GB
44952015-03-24 Gary Benson <gbenson@redhat.com>
4496
4497 * linux-x86-low.c (x86_debug_reg_state): New function.
4498 (x86_linux_prepare_to_resume): Use the above.
4499
7b669087
GB
45002015-03-24 Gary Benson <gbenson@redhat.com>
4501
4502 * linux-low.c (current_lwp_ptid): New function.
4503 * linux-x86-low.c: Include nat/linux-nat.h.
4504 (x86_dr_low_get_addr): Use current_lwp_ptid.
4505 (x86_dr_low_get_control): Likewise.
4506 (x86_dr_low_get_status): Likewise.
4507
eef49a3d
PA
45082015-03-20 Pedro Alves <palves@redhat.com>
4509
4510 * tracepoint.c (cmd_qtstatus): Make "str" const.
4511
b2333d22
PA
45122015-03-20 Pedro Alves <palves@redhat.com>
4513
4514 * server.c (handle_general_set): Make "req_str" const.
4515
23f238d3
PA
45162015-03-19 Pedro Alves <palves@redhat.com>
4517
4518 * linux-low.c (linux_resume_one_lwp): Rename to ...
4519 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4520 instead call perror_with_name.
4521 (check_ptrace_stopped_lwp_gone): New function.
4522 (linux_resume_one_lwp): Reimplement as wrapper around
4523 linux_resume_one_lwp_throw that swallows errors if the LWP is
4524 gone.
4525
91baf43f
PA
45262015-03-19 Pedro Alves <palves@redhat.com>
4527
4528 * linux-low.c (count_events_callback, select_event_lwp_callback):
4529 No longer check whether the thread has resume_stop as last resume
4530 kind.
4531
8bf3b159
PA
45322015-03-19 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c (count_events_callback, select_event_lwp_callback):
4535 Use the lwp's status_pending_p field, not the thread's.
4536
b90fc188
PA
45372015-03-19 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (select_event_lwp_callback): Update comments to
4540 no longer mention SIGTRAP.
4541
464b0089
GB
45422015-03-18 Gary Benson <gbenson@redhat.com>
4543
4544 * server.c (handle_query): Do not report vFile:fstat as supported.
4545
aa9e327f
GB
45462015-03-11 Gary Benson <gbenson@redhat.com>
4547
4548 * hostio.c (sys/types.h): New include.
4549 (sys/stat.h): Likewise.
4550 (common-remote-fileio.h): Likewise.
4551 (handle_fstat): New function.
4552 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4553
791c0056
GB
45542015-03-11 Gary Benson <gbenson@redhat.com>
4555
4556 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4557 struct stat.st_blocks and struct stat.st_blksize.
4558 * configure: Regenerate.
4559 * config.in: Likewise.
4560 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4561 (OBS): Add common-remote-fileio.o.
4562 (common-remote-fileio.o): New rule.
4563
9a9df970
PA
45642015-03-09 Pedro Alves <palves@redhat.com>
4565
4566 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4567 'struct sockaddr' pointer in 'accept' call.
4568
9eb1356e
PA
45692015-03-09 Pedro Alves <palves@redhat.com>
4570
4571 Revert:
4572 2015-03-07 Pedro Alves <palves@redhat.com>
4573 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4574 or <winsock2.h> here. Instead include "gdb_socket.h".
4575 (remote_open): Use union gdb_sockaddr_u.
4576 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4577 or <winsock2.h> here. Instead include "gdb_socket.h".
4578 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4579 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4580 or <sys/un.h>.
4581 (init_named_socket, gdb_agent_helper_thread): Use union
4582 gdb_sockaddr_u.
4583
aac331e4
PA
45842015-03-07 Pedro Alves <palves@redhat.com>
4585
4586 * configure.ac (build_warnings): Move
4587 -Wdeclaration-after-statement to the C-specific set.
4588 * configure: Regenerate.
4589
366c75fc
PA
45902015-03-07 Pedro Alves <palves@redhat.com>
4591
4592 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4593 or <winsock2.h> here. Instead include "gdb_socket.h".
4594 (remote_open): Use union gdb_sockaddr_u.
4595 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4596 or <winsock2.h> here. Instead include "gdb_socket.h".
4597 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4598 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4599 or <sys/un.h>.
4600 (init_named_socket, gdb_agent_helper_thread): Use union
4601 gdb_sockaddr_u.
4602
492d29ea
PA
46032015-03-07 Pedro Alves <palves@redhat.com>
4604
4605 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4606 instead.
4607
60a191ed
YQ
46082015-03-06 Yao Qi <yao.qi@linaro.org>
4609
4610 * linux-aarch64-low.c (aarch64_insert_point): Use
4611 show_debug_regs as a boolean.
4612 (aarch64_remove_point): Likewise.
4613
f5771b1d
PA
46142015-03-05 Pedro Alves <palves@redhat.com>
4615
4616 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4617 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4618 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4619 * nto-low.c (nto_target_ops): Likewise.
4620 * spu-low.c (spu_target_ops): Likewise.
4621 * win32-low.c (win32_target_ops): Likewise.
4622
3e572f71
PA
46232015-03-04 Pedro Alves <palves@redhat.com>
4624
72f4393d 4625 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4626 Decide whether a breakpoint triggered based on the SIGTRAP's
4627 siginfo.si_code.
72f4393d
L
4628 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4629 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4630 (linux_low_filter_event): Check for breakpoints before checking
4631 watchpoints.
4632 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4633 siginfo.si_code.
72f4393d
L
4634 (linux_stopped_by_sw_breakpoint)
4635 (linux_supports_stopped_by_sw_breakpoint)
4636 (linux_stopped_by_hw_breakpoint)
4637 (linux_supports_stopped_by_hw_breakpoint): New functions.
4638 (linux_target_ops): Install new target methods.
3e572f71 4639
1ec68e26
PA
46402015-03-04 Pedro Alves <palves@redhat.com>
4641
4642 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4643 * server.c (swbreak_feature, hwbreak_feature): New globals.
4644 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4645 (captured_main): Clear swbreak_feature and hwbreak_feature.
4646 * server.h (swbreak_feature, hwbreak_feature): Declare.
4647 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4648 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4649 supports_stopped_by_hw_breakpoint>: New fields.
4650 (target_supports_stopped_by_sw_breakpoint)
4651 (target_stopped_by_sw_breakpoint)
4652 (target_supports_stopped_by_hw_breakpoint)
4653 (target_stopped_by_hw_breakpoint): Declare.
4654
15c66dd6
PA
46552015-03-04 Pedro Alves <palves@redhat.com>
4656
4657 enum lwp_stop_reason -> enum target_stop_reason
4658 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4659 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4660 (linux_wait_1, stuck_in_jump_pad_callback)
4661 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4662 (linux_stopped_by_watchpoint):
4663 * linux-low.h (enum lwp_stop_reason): Delete.
4664 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4665 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4666
98fc70d6
YQ
46672015-03-04 Yao Qi <yao.qi@linaro.org>
4668
4669 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4670
dd2ac174
GB
46712015-03-03 Gary Benson <gbenson@redhat.com>
4672
4673 * hostio.c (handle_vFile): Fix prefix lengths.
4674
d68e53f4
MM
46752015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4676
4677 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4678 ptr_bits.
4679
bf2d68ab
AA
46802015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4681
4682 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4683 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4684 (clean): Add "rm -f" for above C files.
4685 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4686 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4687 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4688 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4689 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4690 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4691 (init_registers_s390x_vx_linux64)
4692 (init_registers_s390x_tevx_linux64)
4693 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4694 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4695 declarations.
4696 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4697 (s390_store_vxrs_high): New functions.
4698 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4699 NT_S390_VXRS_HIGH.
4700 (s390_arch_setup): Add logic for selecting one of the new target
4701 descriptions. Activate the new vector regsets if applicable.
4702 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4703 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4704 and init_registers_s390x_tevx_linux64.
4705
c966a859
PA
47062015-03-01 Pedro Alves <palves@redhat.com>
4707
4708 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4709 parameter.
4710
4180215b
PA
47112015-02-27 Pedro Alves <palves@redhat.com>
4712
4713 * linux-x86-low.c (u_debugreg_offset): New function.
4714 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4715
749bab01
PA
47162015-02-27 Pedro Alves <palves@redhat.com>
4717
4718 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4719 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4720 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4721 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4722 (ps_lsetfpregs, ps_getpid)
4723 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4724 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4725 (ps_lsetxregs, ps_plog): Declare.
4726
3c14e5a3
PA
47272015-02-27 Pedro Alves <palves@redhat.com>
4728
4729 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4730 IP_AGENT_EXPORT_FUNC.
4731 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4732 IP_AGENT_EXPORT_FUNC.
4733 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4734 (IP_AGENT_EXPORT): Delete.
4735 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4736 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4737 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4738 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4739 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4740 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4741 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4742 (traceframe_read_count, traceframe_write_count)
4743 (traceframes_created, trace_state_variables, get_raw_reg)
4744 (get_trace_state_variable_value, set_trace_state_variable_value)
4745 (ust_loaded, helper_thread_id, cmd_buf): Use
4746 IPA_SYM_EXPORTED_NAME.
4747 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4748 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4749 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4750 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4751 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4752 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4753 EXTERN_C_PUSH/EXTERN_C_POP.
4754 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4755 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4756 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4757 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4758 (traceframe_write_count, traceframe_read_count)
4759 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4760 (about_to_request_buffer_space, get_trace_state_variable_value)
4761 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4762 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4763 EXTERN_C_PUSH/EXTERN_C_POP.
4764 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4765 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4766 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4767 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4768 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4769 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4770 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4771 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4772 Define.
4773 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4774 (IP_AGENT_EXPORT_VAR_DECL): Define.
4775 (tracing): Declare.
4776 (gdb_agent_get_raw_reg): Declare.
4777
fe978cb0
PA
47782015-02-27 Tom Tromey <tromey@redhat.com>
4779 Pedro Alves <palves@redhat.com>
4780
4781 Rename symbols whose names are reserved C++ keywords throughout.
4782
3bc3d82a
PA
47832015-02-27 Pedro Alves <palves@redhat.com>
4784
4785 * Makefile.in (COMPILER): New, get it from autoconf.
4786 (CXX): Get from autoconf instead.
4787 (COMPILE.pre): Use COMPILER.
4788 (CC-LD): Rename to ...
4789 (CC_LD): ... this. Use COMPILER.
4790 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4791 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4792 * acinclude.m4: Include build-with-cxx.m4.
4793 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4794 Disable -Werror by default if building in C++ mode.
4795 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4796 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4797 the C++ compiler. Save/restore CXXFLAGS too.
4798 * configure: Regenerate.
4799
07697489
PA
48002015-02-27 Pedro Alves <palves@redhat.com>
4801
4802 * acinclude.m4: Include libiberty.m4.
4803 * configure.ac: Call libiberty_INIT.
4804 * config.in, configure: Regenerate.
4805
9beb7c4e
PA
48062015-02-26 Pedro Alves <palves@redhat.com>
4807
4808 * linux-low.c (linux_wait_1): When incrementing the PC past a
4809 program breakpoint always use the_low_target.breakpoint_len as
4810 increment, rather than the maximum between that and
4811 the_low_target.decr_pc_after_break.
4812
8090aef2
PA
48132015-02-23 Pedro Alves <palves@redhat.com>
4814
4815 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4816 thread was doing a step-over; always adjust the PC if
4817 we stepped over a permanent breakpoint.
4818 (linux_wait_1): If we stepped over breakpoint that was on top of a
4819 permanent breakpoint, manually advance the PC past it.
4820
bc9540e8
PA
48212015-02-23 Pedro Alves <palves@redhat.com>
4822
4823 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4824 modes.
4825 (x86_fill_gregset, x86_store_gregset): Use it when handling
4826 $orig_eax.
4827
2db9a427
PA
48282015-02-20 Pedro Alves <palves@redhat.com>
4829
4830 * thread-db.c: Include "nat/linux-procfs.h".
4831 (thread_db_init): Skip listing new threads if the kernel supports
4832 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4833
afa8d396
PA
48342015-02-20 Pedro Alves <palves@redhat.com>
4835
4836 * linux-low.c (status_pending_p_callback): Use ptid_match.
4837
c9587f88
AT
48382015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4839
4840 PR breakpoints/16812
4841 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4842 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4843 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4844
b05ec7a5
AT
48452015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4846
4847 PR breakpoints/15956
4848 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4849
d33501a5
MM
48502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4851
4852 * linux-low.c (linux_low_btrace_conf): Print size.
4853 * server.c (handle_btrace_conf_general_set): New.
4854 (hanle_general_set): Call handle_btrace_conf_general_set.
4855 (handle_query): Report Qbtrace-conf:bts:size as supported.
4856
f4abbc16
MM
48572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4858
4859 * linux-low.c (linux_low_enable_btrace): Update parameters.
4860 (linux_low_btrace_conf): New.
4861 (linux_target_ops)<to_btrace_conf>: Initialize.
4862 * server.c (current_btrace_conf): New.
4863 (handle_btrace_enable): Rename to ...
4864 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4865 to target_enable_btrace. Update comment. Update users.
4866 (handle_qxfer_btrace_conf): New.
4867 (qxfer_packets): Add btrace-conf entry.
4868 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4869 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4870 (target_ops)<read_btrace_conf>: New.
4871 (target_enable_btrace): Update parameters.
4872 (target_read_btrace_conf): New.
4873
043c3577
MM
48742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4875
4876 * server.c (handle_btrace_general_set): Remove call to
4877 target_supports_btrace.
4878 (supported_btrace_packets): New.
4879 (handle_query): Call supported_btrace_packets.
4880 * target.h: include btrace-common.h.
4881 (btrace_target_info): Removed.
4882 (supports_btrace, target_supports_btrace): Update parameters.
4883
734b0e4b
MM
48842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4885
4886 * Makefile.in (SFILES): Add common/btrace-common.c.
4887 (OBS): Add common/btrace-common.o.
4888 (btrace-common.o): Add build rules.
4889 * linux-low: Include btrace-common.h.
4890 (linux_low_read_btrace): Use struct btrace_data. Call
4891 btrace_data_init and btrace_data_fini.
4892
d6c146e9
PA
48932015-02-06 Pedro Alves <palves@redhat.com>
4894
4895 * thread-db.c (find_new_threads_callback): Add debug output.
4896
20ba1ce6
PA
48972015-02-04 Pedro Alves <palves@redhat.com>
4898
4899 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4900 (resume_stopped_resumed_lwps): New function.
4901 (linux_wait_for_event_filtered): Use it.
4902
8cc73a39
SDJ
49032015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4904
4905 * Makefile.in (SFILES): Add linux-personality.c.
4906 (linux-personality.o): New rule.
4907 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4908 list of objects to be built.
4909 * linux-low.c: Include nat/linux-personality.h.
4910 (linux_create_inferior): Remove code to disable address space
4911 randomization (moved to ../nat/linux-personality.c). Create
4912 cleanup to disable address space randomization.
4913
fb23d554
SDJ
49142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4915
4916 * Makefile.in (posix-strerror.o): New rule.
4917 (mingw-strerror.o): Likewise.
4918 * configure: Regenerated.
4919 * configure.ac: Source file ../common/common.host. Initialize new
4920 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4921
cdf43629
YQ
49222015-01-14 Yao Qi <yao@codesourcery.com>
4923
4924 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4925 (ppc-linux.o): New rule.
4926 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4927 * configure.ac: AC_CHECK_FUNCS(getauxval).
4928 * config.in: Re-generated.
4929 * configure: Re-generated.
4930 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4931 ppc64_64bit_inferior_p
4932
514c5338
YQ
49332015-01-14 Yao Qi <yao@codesourcery.com>
4934
4935 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4936 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4937 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4938 (PT_ORIG_R3, PT_TRAP): Likewise.
4939 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4940 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4941 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4942
3368c1e5
JB
49432015-01-10 Joel Brobecker <brobecker@adacore.com>
4944
4945 * i387-fp.c (i387_cache_to_xsave): In look over
4946 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4947 zmmh_low_space field by use of zmmh_high_space.
4948
582511be
PA
49492015-01-09 Pedro Alves <palves@redhat.com>
4950
4951 * linux-low.c (step_over_bkpt): Move higher up in the file.
4952 (handle_extended_wait): Don't store the stop_pc here.
4953 (get_stop_pc): Adjust comments and rename to ...
4954 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4955 stopped for a software breakpoint or hardware breakpoint.
4956 (thread_still_has_status_pending_p): New function.
4957 (status_pending_p_callback): Use
4958 thread_still_has_status_pending_p. If the event is no longer
4959 interesting, resume the LWP.
4960 (handle_tracepoints): Add assert.
4961 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4962 (wstatus_maybe_breakpoint): New function.
4963 (cancel_breakpoint): Delete function.
4964 (check_stopped_by_watchpoint): New function, factored out from
4965 linux_low_filter_event.
4966 (lp_status_maybe_breakpoint): Delete function.
4967 (linux_low_filter_event): Remove filter_ptid argument.
4968 Leave thread group exits pending here. Store the LWP's stop PC.
4969 Always leave events pending.
4970 (linux_wait_for_event_filtered): Pull all events out of the
4971 kernel, and leave them all pending.
4972 (count_events_callback, select_event_lwp_callback): Consider all
4973 events.
4974 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4975 (select_event_lwp): Only give preference to the stepping LWP in
4976 all-stop mode. Adjust comments.
4977 (ignore_event): New function.
4978 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4979 references to cancel_breakpoints. Adjust to renames. Also give
4980 equal priority to all LWPs that have had events in non-stop mode.
4981 If reporting a software breakpoint event, unadjust the LWP's PC.
4982 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4983 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4984 Adjust.
4985 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4986 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4987 (linux_stopped_by_watchpoint): Adjust.
4988 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4989 * linux-low.h (enum lwp_stop_reason): New.
4990 (struct lwp_info) <stop_pc>: Adjust comment.
4991 <stopped_by_watchpoint>: Delete field.
4992 <stop_reason>: New field.
4993 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4994 * mem-break.c (software_breakpoint_inserted_here)
4995 (hardware_breakpoint_inserted_here): New function.
4996 * mem-break.h (software_breakpoint_inserted_here)
4997 (hardware_breakpoint_inserted_here): Declare.
4998 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4999 (cancel_breakpoints): Delete.
5000 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5001 (upload_fast_traceframes): Remove references to
5002 cancel_breakpoints.
5003
a33e3959
PA
50042015-01-09 Pedro Alves <palves@redhat.com>
5005
5006 * thread-db.c (find_new_threads_callback): Ignore thread if the
5007 kernel thread ID is -1.
5008
8784d563
PA
50092015-01-09 Pedro Alves <palves@redhat.com>
5010
5011 * linux-low.c (linux_attach_fail_reason_string): Move to
5012 nat/linux-ptrace.c, and rename.
5013 (linux_attach_lwp): Update comment.
5014 (attach_proc_task_lwp_callback): New function.
5015 (linux_attach): Adjust to rename and use
5016 linux_proc_attach_tgid_threads.
5017 (linux_attach_fail_reason_string): Delete declaration.
5018
76f2b779
JB
50192015-01-01 Joel Brobecker <brobecker@adacore.com>
5020
5021 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5022 * server.c (gdbserver_version): Likewise.
5023
fafcc06a
SDJ
50242014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5025
5026 * remote-utils.c: Include ctype.h.
5027 (input_interrupt): Explicitly handle the case when the char
5028 received is the NUL byte. Improve the printing of non-ASCII
5029 characters.
5030
beed38b8
JB
50312014-12-16 Joel Brobecker <brobecker@adacore.com>
5032
5033 * linux-low.c (linux_low_filter_event): Update call to
5034 linux_enable_event_reporting following the addition of
5035 a new parameter to that function.
5036
bf330350
CU
50372014-12-16 Catalin Udma <catalin.udma@freescale.com>
5038
5039 PR server/17457
5040 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5041 (AARCH64_FPCR_REGNO): Likewise.
5042 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5043 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5044 (aarch64_store_fpregset): Likewise.
5045
5227d625
JB
50462014-12-15 Joel Brobecker <brobecker@adacore.com>
5047
5048 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5049 Remove FIXME comment about assumption about N.
5050
f93b65a0
JB
50512014-12-13 Joel Brobecker <brobecker@adacore.com>
5052
5053 * configure.ac: If large-file support is disabled in GDBserver,
5054 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5055 * configure: Regenerate.
5056
e5a9158d
AA
50572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5058
5059 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5060 warning upon ENODATA from ptrace.
5061 * linux-s390-low.c (s390_store_tdb): New.
5062 (s390_regsets): Add regset for NT_S390_TDB.
5063
feea5f36
AA
50642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5065
5066 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5067 without a fill_function.
5068 * linux-s390-low.c (s390_fill_last_break): Remove.
5069 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5070 (s390_arch_setup): Use regset's size instead of fill_function for
5071 loop end condition.
5072
098dbe61
AA
50732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5074
5075 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5076 the regset's store function when ptrace returned an error.
5077 * regcache.c (get_thread_regcache): Invalidate register cache
5078 before fetching inferior's registers.
5079
28eef672
AA
50802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5081
5082 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5083 while-loop as for-loop.
5084 (regsets_store_inferior_registers): Likewise.
5085
bdca27a2
YQ
50862014-11-28 Yao Qi <yao@codesourcery.com>
5087
5088 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5089 * config.in, configure: Re-generate.
5090 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5091 is defined.
5092
9c232dda
YQ
50932014-11-21 Yao Qi <yao@codesourcery.com>
5094
5095 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5096 (AC_CHECK_HEADERS): Remove malloc.h.
5097 * configure: Re-generated.
5098 * config.in: Re-generated.
5099 * server.h: Don't include alloca.h and malloc.h.
5100 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5101 Don't include malloc.h.
5102
43968415
JB
51032014-11-17 Joel Brobecker <brobecker@adacore.com>
5104
5105 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5106 corresponding ERRNO check in same block.
5107
40e91bc7
PA
51082014-11-12 Pedro Alves <palves@redhat.com>
5109
5110 * server.c (cont_thread): Update comment.
5111 (start_inferior, attach_inferior): No longer clear cont_thread.
5112 (handle_v_cont): No longer set cont_thread.
5113 (captured_main): Clear cont_thread each time a GDB connects.
5114
c2c118cf
PA
51152014-11-12 Pedro Alves <palves@redhat.com>
5116
5117 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5118 thread, and don't resume all threads if the Hc thread has exited.
5119
78708b7c
PA
51202014-11-12 Pedro Alves <palves@redhat.com>
5121
5122 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5123 the process group instead of to a specific LWP.
5124
a2abc7de
PA
51252014-10-15 Pedro Alves <palves@redhat.com>
5126
5127 PR server/17487
5128 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5129 parameter.
5130 (arm_set_thread_context): Delete.
5131 (the_low_target): Adjust.
5132 * win32-i386-low.c (debug_registers_changed)
5133 (debug_registers_used): Delete.
5134 (update_debug_registers_callback): New function.
5135 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5136 needing to update their debug registers.
5137 (win32_get_current_dr): New function.
5138 (x86_dr_low_get_addr, x86_dr_low_get_control)
5139 (x86_dr_low_get_status): Fetch the debug register from the thread
5140 record's context.
5141 (i386_initial_stuff): Adjust.
5142 (i386_get_thread_context): Remove current_event parameter. Don't
5143 clear debug_registers_changed nor copy DR values to
5144 debug_reg_state.
5145 (i386_set_thread_context): Delete.
5146 (i386_prepare_to_resume): New function.
5147 (i386_thread_added): Mark the thread as needing to update irs
5148 debug registers.
5149 (the_low_target): Remove i386_set_thread_context and install
5150 i386_prepare_to_resume.
5151 * win32-low.c (win32_get_thread_context): Adjust.
5152 (win32_set_thread_context): Use SetThreadContext
5153 directly.
5154 (win32_prepare_to_resume): New function.
5155 (win32_require_context): New function, factored out from ...
5156 (thread_rec): ... this.
5157 (continue_one_thread): Call win32_prepare_to_resume on each thread
5158 we're about to continue.
5159 (win32_resume): Call win32_prepare_to_resume on the event thread.
5160 * win32-low.h (struct win32_thread_info)
5161 <debug_registers_changed>: New field.
5162 (struct win32_target_ops): Change prototype of set_thread_context,
5163 delete set_thread_context and add prepare_to_resume.
5164 (win32_require_context): New declaration.
5165
a442d071
GB
51662014-10-08 Gary Benson <gbenson@redhat.com>
5167
5168 * server.h: Do not include common-exceptions.h.
5169
6f1947e8
GB
51702014-10-08 Gary Benson <gbenson@redhat.com>
5171
5172 * server.h: Do not include cleanups.h.
5173
63b434a4
JH
51742014-09-30 James Hogan <james.hogan@imgtec.com>
5175
5176 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5177 mips64-dsp-linux.c.
5178
c4d9ceb6
YQ
51792014-09-23 Yao Qi <yao@codesourcery.com>
5180
5181 * linux-low.c (lp_status_maybe_breakpoint): New function.
5182 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5183 (count_events_callback): Likewise.
5184 (select_event_lwp_callback): Likewise.
5185 (cancel_breakpoints_callback): Likewise.
5186
89a5711c
DB
51872014-09-19 Don Breazeal <donb@codesourcery.com>
5188
5189 * linux-low.c (handle_extended_wait): Call
5190 linux_ptrace_get_extended_event.
5191 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5192 linux_is_extended_waitstatus.
5193
bffc0964
JB
51942014-09-16 Joel Brobecker <brobecker@adacore.com>
5195
5196 * Makefile.in (CPPFLAGS): Define.
5197 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5198 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5199
0bfdf32f
GB
52002014-09-16 Gary Benson <gbenson@redhat.com>
5201
5202 * inferiors.h (current_inferior): Renamed as...
5203 (current_thread): New variable. All uses updated.
5204 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5205 (maybe_move_out_of_jump_pad): Likewise.
5206 (cancel_breakpoint): Likewise.
5207 (linux_low_filter_event): Likewise.
5208 (wait_for_sigstop): Likewise.
5209 (linux_resume_one_lwp): Likewise.
5210 (need_step_over_p): Likewise.
5211 (start_step_over): Likewise.
5212 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5213 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5214 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5215 and save_inferior as saved_thread.
5216 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5217 saved_thread.
5218 (regcache_invalidate_thread): Likewise.
5219 * remote-utils.c (prepare_resume_reply): Likewise.
5220 * thread-db.c (thread_db_get_tls_address): Likewise.
5221 (disable_thread_event_reporting): Likewise.
5222 (remove_thread_event_breakpoints): Likewise.
5223 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5224 as saved_thread.
5225 * target.h (set_desired_inferior): Renamed as...
5226 (set_desired_thread): New declaration. All uses updated.
5227 * server.c (myresume): Updated comment to reference thread instead
5228 of inferior.
5229 (handle_serial_event): Likewise.
5230 (handle_target_event): Likewise.
5231
361c8ade
GB
52322014-09-12 Tom Tromey <tromey@redhat.com>
5233 Gary Benson <gbenson@redhat.com>
5234
5235 * regcache.h: Include common-regcache.h.
5236 (regcache_read_pc): Don't declare.
5237 * regcache.c (get_thread_regcache_for_ptid): New function.
5238
bd9269f7
GB
52392014-09-11 Tom Tromey <tromey@redhat.com>
5240 Gary Benson <gbenson@redhat.com>
5241
5242 * symbol.c: New file.
5243 * Makefile.in (SFILES): Add symbol.c.
5244 (OBS): Add symbol.o.
5245
f8c1d06b
GB
52462014-09-11 Gary Benson <gbenson@redhat.com>
5247
5248 * target.c (target_stop_ptid, target_continue_ptid): New
5249 functions.
5250
721ec300
GB
52512014-09-11 Tom Tromey <tromey@redhat.com>
5252 Gary Benson <gbenson@redhat.com>
5253
5254 * target.h: Include target/target.h.
5255 * target.c (target_read_memory, target_read_uint32)
5256 (target_write_memory): New functions.
5257
c5e92cca
GB
52582014-09-11 Gary Benson <gbenson@redhat.com>
5259
5260 * server.h (debug_hw_points): Don't declare.
5261 * server.c (debug_hw_points): Don't define. Replace all uses
5262 with show_debug_regs.
5263 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5264 all uses with show_debug_regs.
5265
2e4bb98a
EBM
52662014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5267
5268 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5269 endianness into account.
5270 (ppc_supply_ptrace_register): Likewise.
5271
ac740bc7
JH
52722014-09-03 James Hogan <james.hogan@imgtec.com>
5273
5274 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5275 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5276
97ea6506
GB
52772014-09-03 Gary Benson <gbenson@redhat.com>
5278
5279 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5280 ALL_DEBUG_ADDRESS_REGISTERS.
5281
df7e5265
GB
52822014-09-02 Gary Benson <gbenson@redhat.com>
5283
5284 * i386-low.h: Renamed as...
5285 * x86-low.h: New file. All type, function and variable name
5286 prefixes changed from "i386_" to "x86_". All references updated.
5287 * i386-low.c: Renamed as...
5288 * x86-low.c: New file. All type, function and variable name
5289 prefixes changed from "i386_" to "x86_". All references updated.
5290
ed859da7
GB
52912014-09-02 Gary Benson <gbenson@redhat.com>
5292
5293 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5294 (x86_linux_new_thread): Likewise.
5295
860789c7
GB
52962014-08-29 Gary Benson <gbenson@redhat.com>
5297
5298 * server.h (setjmp.h): Do not include.
5299 (toplevel): Do not declare.
5300 (common-exceptions.h): Include.
5301 (cleanups.h): Likewise.
5302 * server.c (toplevel): Do not define.
5303 (exit_code): New static global.
5304 (detach_or_kill_for_exit_cleanup): New function.
5305 (main): New function. Original main renamed to...
5306 (captured_main): New function.
5307 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5308
ff55e1b5
GB
53092014-08-29 Gary Benson <gbenson@redhat.com>
5310
5311 * Makefile.in (SFILES): Add common/common-exceptions.c.
5312 (OBS): Add common-exceptions.o.
5313 (common-exceptions.o): New rule.
5314 * utils.c (prepare_to_throw_exception): New function.
5315
e9bcb658
GB
53162014-08-29 Gary Benson <gbenson@redhat.com>
5317
5318 * config.in: Regenerate.
5319 * configure: Likewise.
5320
e3180625
GB
53212014-08-29 Gary Benson <gbenson@redhat.com>
5322
5323 * Makefile.in (SFILES): Add common/cleanups.c.
5324 (OBS): cleanups.o.
5325 (cleanups.o): New rule.
5326
e3d6ba5d
GB
53272014-08-29 Gary Benson <gbenson@redhat.com>
5328
5329 * utils.c (internal_vwarning): New function.
5330
7096e886
GB
53312014-08-28 Gary Benson <gbenson@redhat.com>
5332
5333 * utils.h (fatal): Remove declaration.
5334 * utils.c (fatal): Remove function.
5335
14ce3192
GB
53362014-08-28 Gary Benson <gbenson@redhat.com>
5337
5338 * tracepoint.c (gdb_agent_init): Replace fatal with
5339 perror_with_name.
5340 (initialize_tracepoint): Likewise.
5341
50278d59
GB
53422014-08-28 Gary Benson <gbenson@redhat.com>
5343
5344 * remote-utils.c (remote_prepare): Replace fatal with error.
5345
aa96c426
GB
53462014-08-28 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-low.c (linux_async): Replace fatal with warning.
5349 Tidy up and return.
5350 (linux_start_non_stop): Return -1 if linux_async failed.
5351
f7160e97
GB
53522014-08-28 Gary Benson <gbenson@redhat.com>
5353
5354 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5355 gdb_assert.
5356 (i386_dr_low_get_addr): Remove vague comment.
5357 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5358 gdb_assert.
5359
38e08fca
GB
53602014-08-28 Gary Benson <gbenson@redhat.com>
5361
5362 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5363 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5364 internal_error.
5365 (linux_resume_one_lwp): Likewise.
5366 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5367 gdb_assert.
5368 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5369 with internal_error.
5370 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5371 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5372 (find_register_by_name): Replace fatal with internal_error.
5373 (find_regno): Likewise.
5374 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5375 * thread-db.c (thread_db_create_event): Likewise.
5376 (thread_db_load_search): Likewise.
5377 (try_thread_db_load_1): Likewise.
5378 * tracepoint.c (get_jump_space_head): Replace fatal with
5379 internal_error.
5380 (claim_trampoline_space): Likewise.
5381 (have_fast_tracepoint_trampoline_buffer): Likewise.
5382 (cmd_qtstart): Likewise.
5383 (stop_tracing): Likewise.
5384 (fast_tracepoint_collecting): Likewise.
5385 (target_malloc): Likewise.
5386 (download_tracepoint): Likewise.
5387 (download_trace_state_variables): Replace check with gdb_assert.
5388 (upload_fast_traceframes): Replace fatal with internal_error.
5389
34abf635
GB
53902014-08-19 Tom Tromey <tromey@redhat.com>
5391 Gary Benson <gbenson@redhat.com>
5392
5393 * Makefile.in (SFILES): Add common/common-debug.c.
5394 (OBS): Add common-debug.o.
5395 (common-debug.o): New rule.
5396 * debug.h (debug_printf): Don't declare.
5397 * debug.c (debug_printf): Renamed and rewritten as...
5398 (debug_vprintf): New function.
5399
f6e94d78
GB
54002014-08-19 Gary Benson <gbenson@redhat.com>
5401
5402 * utils.h: Do not include print-utils.h.
5403
9239eeab
GB
54042014-08-19 Tom Tromey <tromey@redhat.com>
5405 Gary Benson <gbenson@redhat.com>
5406
5407 * server.h: Add static assertion.
5408 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5409
ef87c8bb
GB
54102014-08-19 Tom Tromey <tromey@redhat.com>
5411 Gary Benson <gbenson@redhat.com>
5412
5413 * Makefile.in (SFILES): Add common/errors.c.
5414 (OBS): Add errors.o.
5415 (IPA_OBS): Add errors-ipa.o.
5416 (errors.o): New rule.
5417 (errors-ipa.o): Likewise.
5418 * utils.h (perror_with_name, error, warning): Don't declare.
5419 * utils.c (warning): Renamed and rewritten as...
5420 (vwarning): New function.
5421 (error): Renamed and rewritten as...
5422 (verror): New function.
5423 (internal_error): Renamed and rewritten as...
5424 (internal_verror): New function.
5425
bb974a24
GB
54262014-08-07 Gary Benson <gbenson@redhat.com>
5427
5428 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5429 * configure: Regenerate.
5430 * config.in: Likewise.
5431 * server.h: Do not include errno.h.
5432 * event-loop.c: Likewise.
5433 * hostio-errno.c: Likewise.
5434 * linux-low.c: Likewise.
5435 * remote-utils.c: Likewise.
5436 * spu-low.c: Likewise.
5437 * utils.c: Likewise.
5438 * gdbreplay.c: Unconditionally include errno.h.
5439
6d3d12eb
GB
54402014-08-07 Gary Benson <gbenson@redhat.com>
5441
5442 * server.h: Do not include string.h.
5443 * event-loop.c: Likewise.
5444 * linux-low.c: Likewise.
5445 * regcache.c: Likewise.
5446 * remote-utils.c: Likewise.
5447 * spu-low.c: Likewise.
5448 * utils.c: Likewise.
5449
dccbb609
GB
54502014-08-07 Gary Benson <gbenson@redhat.com>
5451
5452 * server.h: Do not include gdb_assert.h.
5453
e76df0d0
GB
54542014-08-07 Gary Benson <gbenson@redhat.com>
5455
5456 * server.h: Do not include common-utils.h.
5457
4cb9c816
GB
54582014-08-07 Gary Benson <gbenson@redhat.com>
5459
5460 * server.h: Do not include ptid.h.
5461 * notif.h: Likewise.
5462
3995eeee
GB
54632014-08-07 Gary Benson <gbenson@redhat.com>
5464
5465 * server.h: Do not include gdb_locale.h.
5466
cb9f1a9b
GB
54672014-08-07 Gary Benson <gbenson@redhat.com>
5468
5469 * server.h: Do not include gdb/signals.h.
5470 * win32-low.c: Likewise.
5471
a5fceff8
GB
54722014-08-07 Gary Benson <gbenson@redhat.com>
5473
5474 * server.h: Do not include pathmax.h.
5475
b9391142
GB
54762014-08-07 Gary Benson <gbenson@redhat.com>
5477
5478 * server.h: Do not include libiberty.h.
5479 * linux-bfin-low.c: Likewise.
5480
0e443c87
GB
54812014-08-07 Gary Benson <gbenson@redhat.com>
5482
5483 * server.h: Do not include ansidecl.h.
5484
8ebb3f56
GB
54852014-08-07 Gary Benson <gbenson@redhat.com>
5486
5487 * linux-x86-low.c: Do not include stddef.h.
5488 * lynx-ppc-low.c: Likewise.
5489 * tracepoint.c: Likewise.
5490
8980bdf6
GB
54912014-08-07 Gary Benson <gbenson@redhat.com>
5492
5493 * server.h: Do not include stdarg.h.
5494 * nto-low.c: Likewise.
5495
d7096f71
GB
54962014-08-07 Gary Benson <gbenson@redhat.com>
5497
5498 * server.h: Do not include stdlib.h.
5499 * inferiors.c: Likewise.
5500 * linux-low.c: Likewise.
5501 * regcache.c: Likewise.
5502 * spu-low.c: Likewise.
5503 * tracepoint.c: Likewise.
5504 * utils.c: Likewise.
5505
d02f550d
GB
55062014-08-07 Gary Benson <gbenson@redhat.com>
5507
5508 * server.h: Do not include stdio.h.
5509 * linux-low.c: Likewise.
5510 * remote-utils.c: Likewise.
5511 * spu-low.c: Likewise.
5512 * utils.c: Likewise.
5513 * wincecompat.c: Likewise.
5514
87f6c4e3
GB
55152014-08-06 Gary Benson <gbenson@redhat.com>
5516
5517 * regcache.c (init_register_cache): Move conditionals inside if.
5518
7089dca4
GB
55192014-08-06 Gary Benson <gbenson@redhat.com>
5520
5521 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5522
462f517e
GB
55232014-07-31 Gary Benson <gbenson@redhat.com>
5524
5525 * ax.h: Do not include server.h.
5526 * gdbthread.h: Likewise.
5527 * lynx-low.h: Likewise.
5528 * notif.h: Likewise.
5529
976411d6
GB
55302014-07-30 Gary Benson <gbenson@redhat.com>
5531
5532 * server.h: Include common-defs.h.
5533 Do not include config.h or build-gnulib-gdbserver/config.h.
5534
d41f6d8e
GB
55352014-07-30 Gary Benson <gbenson@redhat.com>
5536
5537 * hostio-errno.c: Move server.h to top of includes list.
5538 * inferiors.c: Likewise.
5539 * linux-x86-low.c: Likewise.
5540 * notif.c: Include server.h.
5541
314c6a35
TT
55422014-07-24 Tom Tromey <tromey@redhat.com>
5543 Gary Benson <gbenson@redhat.com>
5544
5545 * server.h (CORE_ADDR): Now unsigned.
5546
69ff6be5
PA
55472014-07-16 Pedro Alves <palves@redhat.com>
5548
5549 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5550
ce9e3fe7
PA
55512014-07-15 Pedro Alves <palves@redhat.com>
5552
5553 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5554 copy.
5555
e76126e8
PA
55562014-07-11 Pedro Alves <palves@redhat.com>
5557
5558 * linux-low.c (kill_wait_lwp): New function, based on
5559 kill_one_lwp_callback, but use my_waitpid directly.
5560 (kill_one_lwp_callback, linux_kill): Use it.
5561
8e9db26e
PA
55622014-06-23 Pedro Alves <palves@redhat.com>
5563
5564 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5565 before setting DR0..DR3.
5566
698b3e08
GB
55672014-06-20 Gary Benson <gbenson@redhat.com>
5568
5569 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5570 * configure: Regenerated.
5571 * config.in: Likewise.
5572
125f8a3d
GB
55732014-06-20 Gary Benson <gbenson@redhat.com>
5574
5575 * Makefile.in (SFILES): Update locations for files moved
5576 from common to nat.
5577 (object file files): Reordered.
5578
42995dbd
GB
55792014-06-20 Gary Benson <gbenson@redhat.com>
5580
5581 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5582 (i386_dr_low_set_addr): Likewise.
5583 (i386_dr_low_get_addr): Likewise.
5584 (i386_dr_low_can_set_control): Likewise.
5585 (i386_dr_low_set_control): Likewise.
5586 (i386_dr_low_get_control): Likewise.
5587 (i386_dr_low_get_status): Likewise.
5588 (i386_get_debug_register_length): Likewise.
5589 * linux-x86-low.c (i386_dr_low_set_addr):
5590 Changed signature. Made static.
5591 (i386_dr_low_get_addr): Likewise.
5592 (i386_dr_low_set_control): Likewise.
5593 (i386_dr_low_get_control): Likewise.
5594 (i386_dr_low_get_status): Likewise.
5595 (i386_dr_low): New global variable.
5596 * win32-i386-low.c (i386_dr_low_set_addr):
5597 Changed signature. Made static.
5598 (i386_dr_low_get_addr): Likewise.
5599 (i386_dr_low_set_control): Likewise.
5600 (i386_dr_low_get_control): Likewise.
5601 (i386_dr_low_get_status): Likewise.
5602 (i386_dr_low): New global variable.
5603
e1d2394b
MS
56042014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5605
5606 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5607 * Makefile.in (AR, AR_FLAGS): Define.
5608 * configure: Regenerate.
5609
3a8ee006
GB
56102014-06-19 Gary Benson <gbenson@redhat.com>
5611
5612 * Makefile.in (i386-dregs.o): New rule.
5613 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5614 * i386-low.c (target.h): Remove include.
5615 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5616 (DR_CONTROL_SHIFT): Likewise.
5617 (DR_CONTROL_SIZE): Likewise.
5618 (DR_RW_EXECUTE): Likewise.
5619 (DR_RW_WRITE): Likewise.
5620 (DR_RW_READ): Likewise.
5621 (DR_RW_IORW): Likewise.
5622 (DR_LEN_1): Likewise.
5623 (DR_LEN_2): Likewise.
5624 (DR_LEN_4): Likewise.
5625 (DR_LEN_8): Likewise.
5626 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5627 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5628 (DR_ENABLE_SIZE): Likewise.
5629 (DR_LOCAL_SLOWDOWN): Likewise.
5630 (DR_GLOBAL_SLOWDOWN): Likewise.
5631 (DR_CONTROL_RESERVED): Likewise.
5632 (I386_DR_CONTROL_MASK): Likewise.
5633 (I386_DR_VACANT): Likewise.
5634 (I386_DR_LOCAL_ENABLE): Likewise.
5635 (I386_DR_GLOBAL_ENABLE): Likewise.
5636 (I386_DR_DISABLE): Likewise.
5637 (I386_DR_SET_RW_LEN): Likewise.
5638 (I386_DR_GET_RW_LEN): Likewise.
5639 (I386_DR_WATCH_HIT): Likewise.
5640 (i386_wp_op_t): Likewise.
5641 (i386_show_dr): Likewise.
5642 (i386_length_and_rw_bits): Likewise.
5643 (i386_insert_aligned_watchpoint): Likewise.
5644 (i386_remove_aligned_watchpoint): Likewise.
5645 (i386_handle_nonaligned_watchpoint): Likewise.
5646 i386_update_inferior_debug_regs(): Likewise.
5647 (i386_dr_insert_watchpoint): Likewise.
5648 (i386_dr_remove_watchpoint): Likewise.
5649 (i386_dr_region_ok_for_watchpoint): Likewise.
5650 (i386_dr_stopped_data_address): Likewise.
5651 (i386_dr_stopped_by_watchpoint): Likewise.
5652
8f26655c
GB
56532014-06-19 Gary Benson <gbenson@redhat.com>
5654
5655 * i386-low.c (i386_dr_show): Renamed to
5656 i386_show_dr and made static. All uses updated.
5657 (i386_dr_length_and_rw_bits): Renamed to
5658 i386_length_and_rw_bits and made static.
5659 All uses updated.
5660 (i386_dr_insert_aligned_watchpoint): Renamed to
5661 i386_insert_aligned_watchpoint and made static.
5662 All uses updated.
5663 (i386_dr_remove_aligned_watchpoint): Renamed to
5664 i386_remove_aligned_watchpoint and made static.
5665 All uses updated.
5666 (i386_dr_update_inferior_debug_regs): Renamed to
5667 i386_update_inferior_debug_regs and made static.
5668 All uses updated.
5669
b9228891
GB
56702014-06-18 Gary Benson <gbenson@redhat.com>
5671
5171def3
GB
5672 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5673 (i386_dr_low_can_set_control): Likewise.
5674 (i386_get_debug_register_length): Likewise.
5675 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5676 (i386_dr_low_can_set_control): Likewise.
5677 (i386_get_debug_register_length): Likewise.
5678
56792014-06-17 Gary Benson <gbenson@redhat.com>
5680
b9228891
GB
5681 * i386-low.h (i386-dregs.h): New include.
5682 (DR_FIRSTADDR): Now in i386-dregs.h.
5683 (DR_LASTADDR): Likewise.
5684 (DR_NADDR): Likewise.
5685 (DR_STATUS): Likewise.
5686 (DR_CONTROL): Likewise.
5687 (i386_debug_reg_state): Likewise.
5688 (i386_dr_insert_watchpoint): Likewise.
5689 (i386_dr_remove_watchpoint): Likewise.
5690 (i386_dr_region_ok_for_watchpoint): Likewise.
5691 (i386_dr_stopped_data_address): Likewise.
5692 (i386_dr_stopped_by_watchpoint): Likewise.
5693 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5694
4be83cc2
GB
56952014-06-18 Gary Benson <gbenson@redhat.com>
5696
5697 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5698 i386_dr_insert_watchpoint.
5699 (i386_low_remove_watchpoint): Renamed to
5700 i386_dr_remove_watchpoint.
5701 (i386_low_region_ok_for_watchpoint): Renamed to
5702 i386_dr_region_ok_for_watchpoint.
5703 (i386_low_stopped_data_address): Renamed to
5704 i386_dr_stopped_data_address.
5705 (i386_low_stopped_by_watchpoint): Renamed to
5706 i386_dr_stopped_by_watchpoint.
5707 * i386-low.c (i386_show_dr): Renamed to
5708 i386_dr_show and made nonstatic. All uses updated.
5709 (i386_length_and_rw_bits): Renamed to
5710 i386_dr_length_and_rw_bits and made nonstatic.
5711 All uses updated.
5712 (i386_insert_aligned_watchpoint): Renamed to
5713 i386_dr_insert_aligned_watchpoint and made nonstatic.
5714 All uses updated.
5715 (i386_remove_aligned_watchpoint): Renamed to
5716 i386_dr_remove_aligned_watchpoint and made nonstatic.
5717 All uses updated.
5718 (i386_update_inferior_debug_regs): Renamed to
5719 i386_dr_update_inferior_debug_regs and made nonstatic.
5720 All uses updated.
5721 (i386_low_insert_watchpoint): Renamed to
5722 i386_dr_insert_watchpoint. All uses updated.
5723 (i386_low_remove_watchpoint): Renamed to
5724 i386_dr_remove_watchpoint. All uses updated.
5725 (i386_low_region_ok_for_watchpoint): Renamed to
5726 i386_dr_region_ok_for_watchpoint. All uses updated.
5727 (i386_low_stopped_data_address): Renamed to
5728 i386_dr_stopped_data_address. All uses updated.
5729 (i386_low_stopped_by_watchpoint): Renamed to
5730 i386_dr_stopped_by_watchpoint. All uses updated.
5731
131aa0d4
GB
57322014-06-18 Gary Benson <gbenson@redhat.com>
5733
5734 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5735 (i386_dr_low_can_set_control): Likewise.
5736 (i386_insert_aligned_watchpoint): New check.
5737
d9305f7f
GB
57382014-06-18 Gary Benson <gbenson@redhat.com>
5739
5740 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5741 Renamed to state.
5742
e927c9fc
GB
57432014-06-18 Gary Benson <gbenson@redhat.com>
5744
5745 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5746 instead of fatal and error.
5747 (i386_handle_nonaligned_watchpoint): Likewise.
5748
1b6d4134
GB
57492014-06-18 Gary Benson <gbenson@redhat.com>
5750
5751 * i386-low.c (i386_get_debug_register_length): New macro.
5752 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5753 (i386_show_dr): Use debug_printf instead of fprintf. Use
5754 phex to format values.
5755
6e62758f
GB
57562014-06-18 Gary Benson <gbenson@redhat.com>
5757
5758 * i386-low.h: Comment changes.
5759 * i386-low.c: Likewise.
5760
fc6e2f03
GB
57612014-06-18 Gary Benson <gbenson@redhat.com>
5762
5763 * i386-low.c: Whitespace changes.
5764
f9d1eeed
TT
57652014-06-12 Tom Tromey <tromey@redhat.com>
5766
5767 * utils.c (freeargv): Remove.
5768
0b04e523
TT
57692014-06-12 Tom Tromey <tromey@redhat.com>
5770
5771 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5772 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5773 (parse_debug_format_options): Likewise.
5774 (gdbserver_usage): Likewise.
5775 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5776 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5777 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5778 against libiberty.
5779 ($(LIBGNU)): Depend on libiberty.
5780 (all-lib): Recurse into all subdirs.
5781 (install-only): Invoke "install" target in subdirs.
5782 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5783 targets.
5784 * configure: Rebuild.
5785 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5786 for vasprintf, vsnprintf, or gettimeofday.
5787 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5788 srv_tgtobj.
5789
270c9937
JB
57902014-06-05 Joel Brobecker <brobecker@adacore.com>
5791
5792 * development.sh: Delete.
5793 * Makefile.in (config.status): Adjust dependency on development.sh.
5794 * configure.ac: Adjust development.sh source call.
5795 * configure: Regenerate.
5796
0a261ed8
PA
57972014-06-02 Pedro Alves <palves@redhat.com>
5798
5799 * ax.c (gdb_free_agent_expr): New function.
5800 * ax.h (gdb_free_agent_expr): New declaration.
5801 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5802 list.
5803 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5804 static.
5805 (clear_breakpoint_conditions_and_commands): New function.
5806 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5807 (clear_breakpoint_conditions_and_commands): New declaration.
5808
e9dae05e
RR
58092014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5810
5811 * linux-aarch64-low.c (asm/ptrace.h): Include.
5812
5876f503
JK
58132014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5814
5815 Fix TLS access for -static -pthread.
5816 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5817 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5818 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5819
802e8e6d
PA
58202014-05-20 Pedro Alves <palves@redhat.com>
5821
5822 * linux-aarch64-low.c (aarch64_insert_point)
5823 (aarch64_remove_point): No longer check whether the type is
5824 supported here. Adjust to new interface.
5825 (the_low_target): Install aarch64_supports_z_point_type as
5826 supports_z_point_type method.
5827 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5828 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5829 instead of a Z packet char. Adjust.
5830 (arm_supports_z_point_type): New function.
5831 (arm_insert_point, arm_remove_point): Adjust to new interface.
5832 (the_low_target): Install arm_supports_z_point_type.
5833 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5834 (cris_insert_point, cris_remove_point): Adjust to new interface.
5835 Don't check whether the type is supported here.
5836 (the_low_target): Install cris_supports_z_point_type.
5837 * linux-low.c (linux_supports_z_point_type): New function.
5838 (linux_insert_point, linux_remove_point): Adjust to new interface.
5839 * linux-low.h (struct linux_target_ops) <insert_point,
5840 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5841 raw_breakpoint pointer parameter.
5842 <supports_z_point_type>: New method.
5843 * linux-mips-low.c (mips_supports_z_point_type): New function.
5844 (mips_insert_point, mips_remove_point): Adjust to new interface.
5845 Use mips_supports_z_point_type.
5846 (the_low_target): Install mips_supports_z_point_type.
5847 * linux-ppc-low.c (the_low_target): Install NULL as
5848 supports_z_point_type method.
5849 * linux-s390-low.c (the_low_target): Install NULL as
5850 supports_z_point_type method.
5851 * linux-sparc-low.c (the_low_target): Install NULL as
5852 supports_z_point_type method.
5853 * linux-x86-low.c (x86_supports_z_point_type): New function.
5854 (x86_insert_point): Adjust to new insert_point interface. Use
5855 insert_memory_breakpoint. Adjust to new
5856 i386_low_insert_watchpoint interface.
5857 (x86_remove_point): Adjust to remove_point interface. Use
5858 remove_memory_breakpoint. Adjust to new
5859 i386_low_remove_watchpoint interface.
5860 (the_low_target): Install x86_supports_z_point_type.
5861 * lynx-low.c (lynx_target_ops): Install NULL as
5862 supports_z_point_type callback.
5863 * nto-low.c (nto_supports_z_point_type): New.
5864 (nto_insert_point, nto_remove_point): Adjust to new interface.
5865 (nto_target_ops): Install nto_supports_z_point_type.
5866 * mem-break.c: Adjust intro comment.
5867 (struct raw_breakpoint) <raw_type, size>: New fields.
5868 <inserted>: Update comment.
5869 <shlib_disabled>: Delete field.
5870 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5871 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5872 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5873 (raw_bkpt_type_to_target_hw_bp_type): New function.
5874 (find_enabled_raw_code_breakpoint_at): New function.
5875 (find_raw_breakpoint_at): New type and size parameters. Use them.
5876 (insert_memory_breakpoint): New function, based off
5877 set_raw_breakpoint_at.
5878 (remove_memory_breakpoint): New function.
5879 (set_raw_breakpoint_at): Reimplement.
5880 (set_breakpoint): New, based on set_breakpoint_at.
5881 (set_breakpoint_at): Reimplement.
5882 (delete_raw_breakpoint): Go through the_target->remove_point
5883 instead of assuming memory breakpoints.
5884 (find_gdb_breakpoint_at): Delete.
5885 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5886 (find_gdb_breakpoint): New function.
5887 (set_gdb_breakpoint_at): Delete.
5888 (z_type_supported): New function.
5889 (set_gdb_breakpoint_1): New function, loosely based off
5890 set_gdb_breakpoint_at.
5891 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5892 (delete_gdb_breakpoint_at): Delete.
5893 (delete_gdb_breakpoint_1): New function, loosely based off
5894 delete_gdb_breakpoint_at.
5895 (delete_gdb_breakpoint): New function.
5896 (clear_gdb_breakpoint_conditions): Rename to ...
5897 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5898 breakpoint.
5899 (add_condition_to_breakpoint): Make static.
5900 (add_breakpoint_condition): Take a struct breakpoint pointer
5901 instead of an address. Adjust.
5902 (gdb_condition_true_at_breakpoint): Rename to ...
5903 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5904 z_type parameter.
5905 (gdb_condition_true_at_breakpoint): Reimplement.
5906 (add_breakpoint_commands): Take a struct breakpoint pointer
5907 instead of an address. Adjust.
5908 (gdb_no_commands_at_breakpoint): Rename to ...
5909 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5910 parameter. Return true if no breakpoint was found. Change debug
5911 output.
5912 (gdb_no_commands_at_breakpoint): Reimplement.
5913 (run_breakpoint_commands): Rename to ...
5914 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5915 and change return type to boolean.
5916 (run_breakpoint_commands): New function.
5917 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5918 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5919 breakpoint. Go through the_target->remove_point instead of
5920 assuming memory breakpoint.
5921 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5922 software and hardware breakpoints.
5923 (reinsert_raw_breakpoint): Go through the_target->insert_point
5924 instead of assuming memory breakpoint.
5925 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5926 software and hardware breakpoints.
5927 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5928 Check both software and hardware breakpoints.
5929 (validate_inserted_breakpoint): Assert the breakpoint is a
5930 software breakpoint. Set the inserted flag to -1 instead of
5931 setting shlib_disabled.
5932 (delete_disabled_breakpoints): Adjust.
5933 (validate_breakpoints): Only validate software breakpoints.
5934 Adjust to inserted flag change.
5935 (check_mem_read, check_mem_write): Skip breakpoint types other
5936 than software breakpoints. Adjust to inserted flag change.
5937 * mem-break.h (enum raw_bkpt_type): New enum.
5938 (raw_breakpoint, struct process_info): Forward declare.
5939 (Z_packet_to_target_hw_bp_type): Delete declaration.
5940 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5941 (set_gdb_breakpoint, delete_gdb_breakpoint)
5942 (clear_breakpoint_conditions): New declarations.
5943 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5944 (breakpoint_inserted_here): Update comment.
5945 (add_breakpoint_condition, add_breakpoint_commands): Replace
5946 address parameter with a breakpoint pointer parameter.
5947 (gdb_breakpoint_here): Update comment.
5948 (delete_gdb_breakpoint_at): Delete.
5949 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5950 * server.c (process_point_options): Take a struct breakpoint
5951 pointer instead of an address. Adjust.
5952 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5953 delete_gdb_breakpoint.
5954 * spu-low.c (spu_target_ops): Install NULL as
5955 supports_z_point_type method.
5956 * target.h: Include mem-break.h.
5957 (struct target_ops) <prepare_to_access_memory>: Update comment.
5958 <supports_z_point_type>: New field.
5959 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5960 instead of a char. Also take a raw breakpoint pointer.
5961 * win32-arm-low.c (the_low_target): Install NULL as
5962 supports_z_point_type.
5963 * win32-i386-low.c (i386_supports_z_point_type): New function.
5964 (i386_insert_point, i386_remove_point): Adjust to new interface.
5965 (the_low_target): Install i386_supports_z_point_type.
5966 * win32-low.c (win32_supports_z_point_type): New function.
5967 (win32_insert_point, win32_remove_point): Adjust to new interface.
5968 (win32_target_ops): Install win32_supports_z_point_type.
5969 * win32-low.h (struct win32_target_ops):
5970 <supports_z_point_type>: New method.
5971 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5972 instead of a char. Also take a raw breakpoint pointer.
5973
932539e3
PA
59742014-05-20 Pedro Alves <palves@redhat.com>
5975
5976 * mem-break.h: Include break-common.h.
5977 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5978 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5979 (Z_packet_to_target_hw_bp_type): New declaration.
5980 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5981 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5982 (Z_PACKET_ACCESS_WP): Delete macros.
5983 (Z_packet_to_hw_type): Delete function.
5984 * i386-low.h: Don't include break-common.h here.
5985 (Z_packet_to_hw_type): Delete declaration.
5986 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5987 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5988 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5989 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5990 * linux-aarch64-low.c: Don't include break-common.h here.
5991 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5992 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5993 (Z_packet_to_target_hw_bp_type): Delete function.
5994 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5995 function.
5996 (mips_insert_point, mips_remove_point): Use
5997 Z_packet_to_target_hw_bp_type.
5998
4ff0d3d8
PA
59992014-05-20 Pedro Alves <palves@redhat.com>
6000
6001 * linux-aarch64-low.c: Include break-common.h.
6002 (enum target_point_type): Delete.
6003 (Z_packet_to_point_type): Rename to ...
6004 (Z_packet_to_target_hw_bp_type): ... this, and return a
6005 target_hw_bp_type instead.
6006 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6007 instead of an enum target_point_type.
6008 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6009 breakpoint type.
6010 (aarch64_dr_state_insert_one_point)
6011 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6012 (aarch64_handle_aligned_watchpoint)
6013 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6014 Take an enum target_hw_bp_type instead of an enum
6015 target_point_type.
6016 (aarch64_supports_z_point_type): New function.
6017 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6018 use Z_packet_to_target_hw_bp_type.
6019
786dc519
JB
60202014-05-20 Joel Brobecker <brobecker@adacore.com>
6021
6022 * configure.ac: Only use -Werror by default when DEVELOPMENT
6023 is true.
6024 * configure: Regenerate.
6025
9e0aa64f
JK
60262014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6027
6028 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6029 * linux-x86-low.c (X86_64_USER_REGS): New.
6030 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6031
2b577b92
YQ
60322014-04-28 Yao Qi <yao@codesourcery.com>
6033
6034 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6035 name.
6036
94611da2
PA
60372014-04-25 Pedro Alves <palves@redhat.com>
6038
6039 PR server/16255
6040 * linux-low.c (linux_attach_fail_reason_string): New function.
6041 (linux_attach_lwp): Delete.
6042 (linux_attach_lwp_1): Rename to ...
6043 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6044 argument. Remove "initial" parameter. Return int instead of
6045 void. Don't error or warn here.
6046 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6047 failure to attach to the tgid. Call warning when failing to
6048 attach to an lwp.
6049 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6050 argument. Remove "initial" parameter. Return int instead of
6051 void. Don't error or warn here.
6052 (linux_attach_fail_reason_string): New declaration.
6053 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6054 interface change. Use linux_attach_fail_reason_string.
6055
01f9f808
MS
60562014-04-24 Michael Sturm <michael.sturm@mintel.com>
6057 Walfred Tedeschi <walfred.tedeschi@intel.com>
6058
6059 * Makefile.in: Added rules to handle new files
6060 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6061 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6062 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6063 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6064 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6065 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6066 x32-avx512-linux.o.
6067 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6068 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6069 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6070 i386/x32-avx512.xml.
6071 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6072 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6073 i386/x32-avx512-linux.xml.
6074 * i387-fp.c (num_avx512_k_registers): New constant for number
6075 of K registers.
6076 (num_avx512_zmmh_low_registers): New constant for number of
6077 lower ZMM registers (0-15).
6078 (num_avx512_zmmh_high_registers): New constant for number of
6079 higher ZMM registers (16-31).
6080 (num_avx512_ymmh_registers): New contant for number of higher
6081 YMM registers (ymm16-31 added by avx521 on x86_64).
6082 (num_avx512_xmm_registers): New constant for number of higher
6083 XMM registers (xmm16-31 added by AVX512 on x86_64).
6084 (struct i387_xsave): Add space for AVX512 registers.
6085 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6086 Add code to handle AVX512 registers.
6087 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6088 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6089 prototypei from generated file.
6090 (tdesc_amd64_avx512_linux): Likewise.
6091 (init_registers_x32_avx512_linux): Likewise.
6092 (tdesc_x32_avx512_linux): Likewise.
6093 (init_registers_i386_avx512_linux): Likewise.
6094 (tdesc_i386_avx512_linux): Likewise.
6095 (x86_64_regmap): Add AVX512 registers.
6096 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6097 mask.
6098 (initialize_low_arch): Add code to initialize AVX512 registers.
6099
51aa91f9
PA
61002014-04-23 Pedro Alves <palves@redhat.com>
6101
6102 * mem-break.c (find_gdb_breakpoint_at): Make static.
6103 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6104
a4165e94
PA
61052014-04-23 Pedro Alves <palves@redhat.com>
6106
6107 * i386-low.c: Don't include break-common.h here.
6108 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6109 prototype to take target_hw_bp_type as argument instead of a Z
6110 packet char.
6111 * i386-low.h: Include break-common.h here.
6112 (Z_packet_to_hw_type): Declare.
6113 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6114 prototypes.
6115 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6116 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6117 (x86_remove_point): Convert the packet number to a
6118 target_hw_bp_type before calling i386_low_remove_watchpoint.
6119 * win32-i386-low.c (i386_insert_point): Convert the packet number
6120 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6121 (i386_remove_point): Convert the packet number to a
6122 target_hw_bp_type before calling i386_low_remove_watchpoint.
6123
b8acf843
PA
61242014-04-23 Pedro Alves <palves@redhat.com>
6125
6126 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6127
d708bcd1
PA
61282014-04-10 Pedro Alves <palves@redhat.com>
6129
6130 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6131 Check if the condition or command is NULL before checking if the
6132 breakpoint is known. On success, return true.
6133 * mem-break.h (add_breakpoint_condition): Document return.
6134 (add_breakpoint_commands): Add describing comment.
6135 * server.c (skip_to_semicolon): New function.
6136 (process_point_options): Use it.
6137
2eec7d5b
PA
61382014-04-09 Pedro Alves <palves@redhat.com>
6139
6140 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6141 to lwpid_of.
6142
fa96cb38
PA
61432014-02-27 Pedro Alves <palves@redhat.com>
6144
6145 PR 12702
6146 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6147 macros.
6148 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6149 output.
6150 (last_thread_of_process_p): Take a PID argument instead of a
6151 thread pointer.
6152 (linux_wait_for_lwp): Delete.
6153 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6154 functions.
6155 (linux_low_filter_event): New function, party factored out from
6156 linux_wait_for_event.
6157 (linux_wait_for_event): Rename to ...
6158 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6159 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6160 sigsuspend. Check for zombie leaders.
6161 (linux_wait_for_event): Reimplement as wrapper around
6162 linux_wait_for_event_filtered.
6163 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6164 a normal or signal exit is seen, it's the whole process exiting.
6165 (wait_for_sigstop): No longer a for_each_inferior callback.
6166 Rewrite on top of linux_wait_for_event_filtered.
6167 (stop_all_lwps): Call wait_for_sigstop directly.
6168 * server.c (resume, handle_target_event): Handle
6169 TARGET_WAITKIND_NO_RESUMED.
6170
d763de10
JB
61712014-02-26 Joel Brobecker <brobecker@adacore.com>
6172
6173 * win32-low.c (psapi_get_dll_name,
6174 * win32_CreateToolhelp32Snapshot): Delete.
6175 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6176 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6177 Delete.
6178 (handle_load_dll): Add function description.
6179 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6180
850a0f76
JB
61812014-02-26 Joel Brobecker <brobecker@adacore.com>
6182
6183 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6184 Add comment.
6185 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6186 base address when calling win32_add_one_solib.
6187 (handle_load_dll): Delete local variable load_addr.
6188 Remove 0x1000 offset applied to DLL base address when calling
6189 win32_add_one_solib.
6190 (handle_unload_dll): Add comment.
6191
f25b3fc3
JB
61922014-02-26 Joel Brobecker <brobecker@adacore.com>
6193
6194 * win32-low.c (win32_add_all_dlls): Renames
6195 win32_ensure_ntdll_loaded. Rewrite function documentation.
6196 Adjust implementation to always load all DLLs.
6197 Add 0x1000 offset to DLL base address when calling
6198 win32_add_one_solib.
6199 (child_initialization_done): New static global.
6200 (do_initial_child_stuff): Set child_initialization_done to
6201 zero during child initialization, and 1 after. Replace call
6202 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6203 Add comment.
6204 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6205 (handle_unload_dll): Add function documentation.
6206 (get_child_debug_event): Ignore load and unload DLL events
6207 during child initialization.
6208
d86d4aaf
DE
62092014-02-20 Doug Evans <dje@google.com>
6210
3bc32da3 6211 Remove global all_lwps.
d86d4aaf
DE
6212 * inferiors.h (ptid_of): Move here from linux-low.h.
6213 (pid_of, lwpid_of): Ditto.
6214 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6215 parameter is a struct thread_info * now.
6216 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6217 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6218 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6219 directly.
6220 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6221 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6222 * linux-arm-low.c (update_registers_callback): Update, "entry"
6223 parameter is a struct thread_info * now.
6224 Fetch lwpid from current_inferior directly.
6225 (arm_insert_point): Pass &all_threads to find_inferior instead of
6226 &all_lwps.
6227 (arm_remove_point): Ditto.
6228 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6229 (arm_prepare_to_resume): Fetch pid from thread.
6230 (arm_read_description): Fetch lwpid from current_inferior directly.
6231 * linux-low.c (all_lwps): Delete.
6232 (delete_lwp): Delete call to remove_inferior.
6233 (handle_extended_wait): Fetch lwpid from thread.
6234 (add_lwp): Don't set lwp->entry.id. Remove call to
6235 add_inferior_to_list.
6236 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6237 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6238 (kill_one_lwp_callback): Ditto.
6239 (linux_kill): Don't dereference NULL pointer.
6240 Fetch ptid,lwpid from thread.
6241 (get_detach_signal): Fetch ptid from thread.
6242 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6243 Simplify call to regcache_invalidate_thread.
6244 (delete_lwp_callback): Update, "entry" parameter is a
6245 struct thread_info * now. Fetch pid from thread.
6246 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6247 (status_pending_p_callback): Update, "entry" parameter is a
6248 struct thread_info * now. Fetch ptid from thread.
6249 (find_lwp_pid): Update, "entry" parameter is a
6250 struct thread_info * now.
6251 (linux_wait_for_lwp): Fetch pid from thread.
6252 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6253 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6254 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6255 (dequeue_one_deferred_signal): Ditto.
6256 (cancel_breakpoint): Fetch ptid from current_inferior.
6257 (linux_wait_for_event): Pass &all_threads to find_inferior,
6258 not &all_lwps. Fetch ptid, lwpid from thread.
6259 (count_events_callback): Update, "entry" parameter is a
6260 struct thread_info * now.
6261 (select_singlestep_lwp_callback): Ditto.
6262 (select_event_lwp_callback): Ditto.
6263 (cancel_breakpoints_callback): Ditto.
6264 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6265 not &all_lwps.
6266 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6267 (unsuspend_one_lwp): Update, "entry" parameter is a
6268 struct thread_info * now.
6269 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6270 not &all_lwps.
6271 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6272 Fetch lwpid from thread, not lwp.
6273 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6274 Pass &all_threads to find_inferior, not &all_lwps.
6275 (send_sigstop): Fetch lwpid from thread, not lwp.
6276 (send_sigstop_callback): Update, "entry" parameter is a
6277 struct thread_info * now.
6278 (suspend_and_send_sigstop_callback): Ditto.
6279 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6280 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6281 struct thread_info * now.
6282 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6283 from thread, lwp.
6284 (lwp_running): Update, "entry" parameter is a
6285 struct thread_info * now.
6286 (stop_all_lwps): Fetch ptid from thread.
6287 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6288 (linux_resume_one_lwp): Fetch lwpid from thread.
6289 (linux_set_resume_request): Update, "entry" parameter is a
6290 struct thread_info * now. Fetch pid, lwpid from thread.
6291 (resume_status_pending_p): Update, "entry" parameter is a
6292 struct thread_info * now.
6293 (need_step_over_p): Ditto. Fetch lwpid from thread.
6294 (start_step_over): Fetch lwpid from thread.
6295 (linux_resume_one_thread): Update, "entry" parameter is a
6296 struct thread_info * now. Fetch lwpid from thread.
6297 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6298 (proceed_one_lwp): Update, "entry" parameter is a
6299 struct thread_info * now. Fetch lwpid from thread.
6300 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6301 struct thread_info * now.
6302 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6303 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6304 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6305 directly.
6306 (regsets_store_inferior_registers): Ditto.
6307 (fetch_register, store_register): Ditto.
6308 (linux_read_memory, linux_write_memory): Ditto.
6309 (linux_request_interrupt): Ditto.
6310 (linux_read_auxv): Ditto.
6311 (linux_xfer_siginfo): Ditto.
6312 (linux_qxfer_spu): Ditto.
6313 (linux_qxfer_libraries_svr4): Ditto.
6314 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6315 moved to inferiors.h.
6316 (get_lwp): Delete.
6317 (get_thread_lwp): Update.
6318 (struct lwp_info): Delete member "entry". Simplify comment for
6319 member "thread".
6320 (all_lwps): Delete.
6321 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6322 current_inferior directly.
6323 (update_watch_registers_callback): Update, "entry" parameter is a
6324 struct thread_info * now. Fetch pid from thread.
6325 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6326 (mips_insert_point): Fetch lwpid from current_inferior.
6327 Pass &all_threads to find_inferior, not &all_lwps.
6328 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6329 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6330 directly.
6331 (mips_stopped_data_address): Ditto.
6332 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6333 directly.
6334 * linux-tile-low.c (tile_arch_setup): Ditto.
6335 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6336 (update_debug_registers_callback): Update, "entry" parameter is a
6337 struct thread_info * now. Fetch pid from thread.
6338 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6339 Pass &all_threads to find_inferior, not &all_lwps.
6340 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6341 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6342 Pass &all_threads to find_inferior, not &all_lwps.
6343 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6344 (i386_dr_low_get_status): Ditto.
6345 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6346 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6347 (x86_linux_read_description): Ditto.
6348 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6349
3b8361aa
DE
63502014-02-20 Doug Evans <dje@google.com>
6351
6352 * inferiors.c (get_first_inferior): Fix buglet.
6353
f7667f0d
DE
63542014-02-19 Doug Evans <dje@google.com>
6355
6356 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6357 * inferiors.c (add_thread): Change result type to struct thread_info *.
6358 All callers updated.
6359 (add_lwp): Call add_thread here instead of in callers.
6360 All callers updated.
6361 * linux-low.h (get_lwp_thread): Rewrite.
6362 (struct lwp_info): New member "thread".
6363
b3312d80
DE
63642014-02-19 Doug Evans <dje@google.com>
6365
6366 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6367 All callers updated.
6368
ecc6f45c
DE
63692014-02-19 Doug Evans <dje@google.com>
6370
6371 * inferiors.c (add_thread): Fix whitespace.
6372
649ebbca
DE
63732014-02-19 Doug Evans <dje@google.com>
6374
6375 * dll.c (clear_dlls): Replace accessing list implemention details
6376 with API function.
6377 * gdbthread.h (get_first_thread): Declare.
6378 * inferiors.c (for_each_inferior_with_data): New function.
6379 (get_first_thread): New function.
6380 (find_thread_ptid): Simplify.
6381 (get_first_inferior): New function.
6382 (clear_list): Delete.
6383 (one_inferior_p): New function.
6384 (clear_inferior_list): New function.
6385 (clear_inferiors): Update.
6386 * inferiors.h (for_each_inferior_with_data): Declare.
6387 (clear_inferior_list): Declare.
6388 (one_inferior_p): Declare.
6389 (get_first_inferior): Declare.
6390 * linux-low.c (linux_wait_for_event): Replace accessing list
6391 implemention details with API function.
6392 * server.c (target_running): Ditto.
6393 (accumulate_file_name_length): New function.
6394 (emit_dll_description): New function.
6395 (handle_qxfer_libraries): Replace accessing list implemention
6396 details with API function.
6397 (handle_qxfer_threads_worker): New function.
6398 (handle_qxfer_threads_proper): Replace accessing list implemention
6399 details with API function.
6400 (handle_query): Ditto.
6401 (visit_actioned_threads_callback_ftype): New typedef.
6402 (visit_actioned_threads_data): New struct.
6403 (visit_actioned_threads): Rewrite to be find_inferior callback.
6404 (resume): Call find_inferior.
6405 (handle_status): Replace accessing list implemention
6406 details with API function.
6407 (process_serial_event): Replace accessing list implemention details
6408 with API function.
6409 * target.c (set_desired_inferior): Replace accessing list implemention
6410 details with API function.
6411 * tracepoint.c (same_process_p): New function.
6412 (gdb_agent_about_to_close): Replace accessing list implemention
6413 details with API function.
6414 * win32-low.c (child_delete_thread): Replace accessing list
6415 implemention details with API function.
6416 (match_dll_by_basename): New function.
6417 (dll_is_loaded_by_basename): New function.
6418 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6419 details call to dll_is_loaded_by_basename.
6420
80894984
DE
64212014-02-19 Doug Evans <dje@google.com>
6422
6423 * dll.h (struct dll_info): Add comment.
6424 * gdbthread.h (struct thread_info): Add comment.
6425 (current_ptid): Simplify.
6426 * inferiors.c (add_process): Update.
6427 (remove_process): Update.
6428 * inferiors.h (struct process_info): Rename member "head" to "entry".
6429 * linux-low.c (delete_lwp): Update.
6430 (add_lwp): Update.
6431 (last_thread_of_process_p): Update.
6432 (kill_one_lwp_callback, linux_kill): Update.
6433 (status_pending_p_callback): Update.
6434 (wait_for_sigstop): Update. Simplify read of ptid.
6435 (start_step_over): Update.
6436 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6437 (get_lwp_thread): Update.
6438 (struct lwp_info): Rename member "head" to "entry".
6439 * regcache.h (inferior_list_entry): Delete.
6440 * server.c (kill_inferior_callback): Update.
6441 (detach_or_kill_inferior_callback): Update.
6442 (print_started_pid): Update.
6443 (print_attached_pid): Update.
6444 (process_serial_event): Simplify read of ptid.
6445 * thread-db.c (thread_db_create_event): Update.
6446 (thread_db_get_tls_address): Update.
6447 * win32-low.c (current_inferior_ptid): Simplify.
6448
46917d26
TT
64492014-02-19 Tom Tromey <tromey@redhat.com>
6450
6451 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6452 argument.
6453 (target_supports_btrace): Update.
6454
0759a81e
YQ
64552014-02-14 Yao Qi <yao@codesourcery.com>
6456
6457 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6458 (rsp-low-ipa.o): New target.
6459
a7191e8b
TT
64602014-02-12 Tom Tromey <tromey@redhat.com>
6461
6462 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6463 convert_ascii_to_int.
6464 * regcache.c (registers_to_string): Likewise.
6465 * remote-utils.c (decode_M_packet): Likewise.
6466 * server.c (process_serial_event): Likewise.
6467
ff0e980e
TT
64682014-02-12 Tom Tromey <tromey@redhat.com>
6469
6470 * server.c (handle_query, handle_v_run): Use hex2bin, not
6471 unhexify.
6472 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6473
e9371aff
TT
64742014-02-12 Tom Tromey <tromey@redhat.com>
6475
6476 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6477 convert_int_to_ascii.
6478 * regcache.c (registers_to_string, collect_register_as_string):
6479 Likewise.
6480 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6481 Likewise.
6482 * server.c (process_serial_event): Likewise.
6483 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6484 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6485
971dc0b8
TT
64862014-02-12 Tom Tromey <tromey@redhat.com>
6487
6488 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6489 bin2hex, not hexify.
6490 * tracepoint.c (cmd_qtstatus): Likewise.
6491
0a822afb
TT
64922014-02-12 Tom Tromey <tromey@redhat.com>
6493
6494 * remote-utils.c (monitor_output): Pass explicit length to
6495 hexify.
6496
9c3d6531
TT
64972014-02-12 Tom Tromey <tromey@redhat.com>
6498
6499 * tracepoint.c: Include rsp-low.h.
6500 * server.c: Include rsp-low.h.
6501 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6502 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6503 declare.
6504 * remote-utils.c: Include rsp-low.h.
6505 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6506 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6507 (convert_int_to_ascii, convert_ascii_to_int): Move to
6508 common/rsp-low.c.
6509 * regcache.c: Include rsp-low.h.
6510 * ax.c: Include rsp-low.h.
6511 * Makefile.in (SFILES): Add common/rsp-low.c.
6512 (OBS): Add rsp-low.o.
6513 (rsp-low.o): New target.
6514
01fd3ea5
TT
65152014-02-12 Tom Tromey <tromey@redhat.com>
6516
6517 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6518 Include print-utils.h.
6519 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6520 (plongest, thirty_two, phex_nz): Remove.
6521 * Makefile.in (SFILES): Add common/print-utils.c.
6522 (OBS): Add print-utils.o.
6523 (print-utils-ipa.o): New target.
6524 (print-utils.o): New target.
6525 (IPA_OBJS): Add print-utils-ipa.o.
6526
e99dc820
TT
65272014-02-06 Tom Tromey <tromey@redhat.com>
6528
6529 * Makefile.in (SFILES): Fix indentation.
6530
ee1e2d4f
DE
65312014-02-05 Doug Evans <dje@google.com>
6532
6533 * linux-low.c (linux_wait_for_event): Improve comment.
6534 (linux_wait_1): Keep current_inferior in sync with event_child.
6535
f5a02773
DE
65362014-01-22 Doug Evans <dje@google.com>
6537
6538 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6539
87ce2a04
DE
65402014-01-22 Doug Evans <dje@google.com>
6541
6542 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6543 * configure: Regenerate.
6544 * config.in: Regenerate.
6545 * Makefile.in (SFILES): Add debug.c.
6546 (OBS): Add debug.o.
6547 * debug.c: New file.
6548 * debug.h: New file.
6549 * linux-aarch64-low.c (*): Update all debugging printfs to use
6550 debug_printf instead of fprintf.
6551 * linux-arm-low.c (*): Ditto.
6552 * linux-cris-low.c (*): Ditto.
6553 * linux-crisv32-low.c (*): Ditto.
6554 * linux-m32r-low.c (*): Ditto.
6555 * linux-sparc-low.c (*): Ditto.
6556 * linux-x86.c (*): Ditto.
6557 * linux-low.c (*): Ditto.
6558 (linux_wait_1): Add calls to debug_enter, debug_exit.
6559 (linux_wait): Remove redundant debugging printf.
6560 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6561 (linux_resume, unstop_all_lwps): Ditto.
6562 * mem-break.c (*): Update all debugging printfs to use
6563 debug_printf instead of fprintf.
6564 * remote-utils.c (*): Ditto.
6565 * thread-db.c (*): Ditto.
6566 * server.c #include <ctype.h>, "gdb_vecs.h".
6567 (debug_threads): Moved to debug.c.
6568 (*): Update all debugging printfs to use debug_printf instead of
6569 fprintf.
6570 (start_inferior): Replace call to fflush with call to debug_flush.
6571 (monitor_show_help): Mention set debug-format.
6572 (parse_debug_format_options): New function.
6573 (handle_monitor_command): Handle "monitor set debug-format".
6574 (gdbserver_usage): Mention --debug-format.
6575 (main): Parse --debug-format.
6576 * server.h (debug_threads): Declaration moved to debug.h.
6577 #include "debug.h".
6578 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6579 trace_debug_1 that uses debug_printf.
6580 (tracepoint_look_up_symbols): Update all debugging printfs to use
6581 debug_printf instead of fprintf.
6582
e671835b
BS
65832014-01-20 Baruch Siach <baruch@tkos.co.il>
6584
6585 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6586 sys/ptrace.h.
6587
b5737fa9
PA
65882014-01-17 Pedro Alves <palves@redhat.com>
6589
ea38d2a9 6590 PR build/16445
c7faa97a
PA
6591 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6592 defined after including gdb_proc_service.h.
b5737fa9 6593
40ed484e
DE
65942014-01-16 Doug Evans <dje@google.com>
6595
6596 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6597 (match_dll): Use it.
6598
969c39fb
MM
65992014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6600
6601 * target.h (target_ops) <read_btrace>: Change parameters and
6602 return type to allow error reporting.
6603 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6604 trace reading errors on.
6605 * linux-low.c (linux_low_read_btrace): Pass trace reading
6606 errors on.
6607 (linux_low_disable_btrace): New.
6608
ab7f45ba
DE
66092014-01-15 Doug Evans <dje@google.com>
6610
6611 * inferiors.c (thread_id_to_gdb_id): Delete.
6612 * inferiors.h (thread_id_to_gdb_id): Delete.
6613
66af0f44
EZ
66142014-01-13 Eli Zaretskii <eliz@gnu.org>
6615
6616 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6617 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6618 versions.
6619
9939e131
PA
66202014-01-08 Pedro Alves <palves@redhat.com>
6621
6622 * server.c (handle_status): Don't discard previous queued stop
6623 replies or thread's pending status here.
6624 (main) <disconnection>: Do it here instead.
6625
b7ea362b
PA
66262014-01-08 Pedro Alves <palves@redhat.com>
6627
6628 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6629 * server.c (visit_actioned_threads, handle_pending_status): New
6630 function.
6631 (handle_v_cont): Factor out parts to ...
6632 (resume): ... this new function. If in all-stop, and a thread
6633 being resumed has a pending status, report it without actually
6634 resuming.
6635 (myresume): Adjust to use the new 'resume' function.
6636 (clear_pending_status_callback, set_pending_status_callback)
6637 (find_status_pending_thread_callback): New functions.
6638 (handle_status): Handle the case of multiple threads having
6639 interesting statuses to report. Report threads' real last signal
6640 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6641 with an interesting thread to report the status for, instead of
6642 always reporting the status of the first thread.
6643
28498c42
JB
66442014-01-01 Joel Brobecker <brobecker@adacore.com>
6645
6646 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6647 * gdbreplay.c (gdbreplay_version): Likewise.
6648
f45c82da
YZ
66492013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6650
6651 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6652 iov.iov_len with the real length in use.
6653
379a5e2d
JB
66542013-12-13 Joel Brobecker <brobecker@adacore.com>
6655
6656 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6657 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6658 for all targets that use win32-low.c.
6659 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6660 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6661
4210d83e
PA
66622013-12-13 Pedro Alves <palves@redhat.com>
6663
6664 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6665 if equal to TARGET_WAITKIND_LOADED.
6666 * win32-low.c (cached_status): New static global.
6667 (win32_wait): Add declaration.
6668 (do_initial_child_stuff): Flush all initial pending debug events
6669 up to the initial breakpoint.
6670 (win32_wait): If CACHED_STATUS was set, return that instead
6671 of doing a real wait. Remove the code resuming the execution
6672 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6673 during the initial phase. Also remove the code changing
6674 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6675 TARGET_WAITKIND_STOPPED.
6676
e7f0d979
YQ
66772013-12-11 Yao Qi <yao@codesourcery.com>
6678
6679 * notif.c (handle_notif_ack): Return 0 if no notification
6680 matches.
6681
ebcf782c
DE
66822013-11-20 Doug Evans <dje@google.com>
6683
6684 * linux-low.c (linux_set_resume_request): Fix comment.
6685
20ad9378
DE
66862013-11-20 Doug Evans <dje@google.com>
6687
6688 * linux-low.c (resume_status_pending_p): Tweak comment.
6689
a196ebeb
WT
66902013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6691
6692 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6693 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6694 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6695 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6696 (srv_amd64_regobj): Add amd64-mpx.o.
6697 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6698 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6699 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6700 * i387-fp.c (num_pl_bnd_register) Added constant.
6701 (num_pl_bnd_cfg_registers) Added constant.
6702 (struct i387_xsave) Added reserved area and MPX fields.
6703 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6704 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6705 function.
6706 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6707 (init_registers_amd64_mpx_linux): Declare new function.
6708 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6709 (x86_64_regmap): Add MPX registers.
6710 (x86_linux_read_description): Add MPX case.
6711 (initialize_low_arch): Initialize MPX targets.
6712
0080a2f6
TT
67132013-11-18 Tom Tromey <tromey@redhat.com>
6714
6715 * configure: Rebuild.
6716 * configure.ac: Don't check for stdlib.h.
6717 * gdbreplay.c: Unconditionally include stdlib.h.
6718
2978b111
TT
67192013-11-18 Tom Tromey <tromey@redhat.com>
6720
6721 * config.in: Rebuild.
6722 * configure: Rebuild.
6723 * configure.ac: Don't use AC_HEADER_DIRENT.
6724
a3d08894
TT
67252013-11-18 Tom Tromey <tromey@redhat.com>
6726
6727 * server.h: Don't check HAVE_STRING_H.
6728 * gdbreplay.c: Don't check HAVE_STRING_H.
6729 * configure: Rebuild.
6730
0a5dd17d
TT
67312013-11-18 Tom Tromey <tromey@redhat.com>
6732
6733 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6734 LIBGNU.
6735
1bd2f0ba
TT
67362013-11-08 Tom Tromey <tromey@redhat.com>
6737
6738 * configure, config.in: Rebuild.
6739 * configure.ac: Remove unused configury.
6740
3266f10b
TT
67412013-11-08 Tom Tromey <tromey@redhat.com>
6742
6743 * acinclude.m4: Include common.m4, codeset.m4.
6744 * configure, config.in: Rebuild.
6745 * configure.ac: Use GDB_AC_COMMON.
6746
6682d959
AA
67472013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6748
6749 * linux-s390-low.c (HWCAP_S390_TE): New define.
6750 (s390_arch_setup): Consider the TE field in the HWCAP for
6751 determining 'have_regset_tdb'.
6752
fd0a4d76
SDJ
67532013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6754
6755 PR gdb/16014
6756 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6757 call to sizeof.
6758
1a3d890b
PA
67592013-10-02 Pedro Alves <palves@redhat.com>
6760
6761 * server.c (process_serial_event): Don't output "GDBserver
6762 exiting" if GDB is connected through stdio.
6763 * target.c (mywait): Likewise, be silent if GDB is connected
6764 through stdio.
6765
97ad4581
JB
67662013-10-01 Joel Brobecker <brobecker@adacore.com>
6767
6768 * lynx-low.c (lynx_add_threads_after_attach): New function.
6769 (lynx_attach): Remove call to add_thread. Add call to
6770 lynx_add_threads_after_attach instead.
6771
5b4e221c
MF
67722013-09-28 Mike Frysinger <vapier@gentoo.org>
6773
6774 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6775 * config.in, configure: Regenerated.
6776
ee47b2f8
YQ
67772013-09-18 Yao Qi <yao@codesourcery.com>
6778
6779 PR server/15959
6780 * server.c (start_inferior): Clear 'resume_info'.
6781
d6707650 67822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6783
d6707650
JW
6784 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6785 for each register.
6786
9243dd0e 67872013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6788
9243dd0e
JW
6789 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6790 linux-tile-low.o to srv_tgtobj.
6791
c623a6ef
WN
67922013-09-16 Will Newton <will.newton@linaro.org>
6793
6794 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6795 out regs.
6796
fb71d39e
PA
67972013-09-06 Pedro Alves <palves@redhat.com>
6798
6799 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6800 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6801 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6802 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6803 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6804 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6805
8e7e9910
PA
68062013-09-06 Pedro Alves <palves@redhat.com>
6807
6808 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6809 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6810
7c3a12ca
PA
68112013-09-06 Pedro Alves <palves@redhat.com>
6812
6813 * linux-amd64-ipa.c: Include tracepoint.h.
6814 * linux-i386-ipa.c: Include tracepoint.h.
6815
8eb3d7b6
RW
68162013-09-06 Ricard Wanderlof <ricardw@axis.com>
6817
6818 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6819 (ps_get_thread_area): New function.
6820
eddddb9d
RW
68212013-09-06 Ricard Wanderlof <ricardw@axis.com>
6822
6823 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6824 (initialize_low_arch): Call init_registers_crisv32 rather than
6825 init_register_crisv32.
6826
533b0600
PA
68272013-09-05 Pedro Alves <palves@redhat.com>
6828
6829 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6830 to ...
6831 * hostio.h: ... this new file.
6832 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6833 win32-low.c: Include hostio.h.
6834
0ce3d3b5
PA
68352013-09-05 Pedro Alves <palves@redhat.com>
6836
6837 * server.h (gdb_client_data, handler_func, callback_handler_func)
6838 (delete_file_handler, add_file_handler, append_callback_event)
6839 (delete_callback_event, start_event_loop, initialize_event_loop):
6840 Move to event-loop.h and include it.
6841 * event-loop.h: New file.
6842
799cdc37
PA
68432013-09-05 Pedro Alves <palves@redhat.com>
6844
6845 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6846 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6847 (loaded_dll, unloaded_dll): Move to ...
6848 * dll.h: ... this new file.
6849 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6850
6a6bbd9d
PA
68512013-09-05 Pedro Alves <palves@redhat.com>
6852
6853 * server.h (current_process, get_thread_process, all_processes)
6854 (add_inferior_to_list, for_each_inferior, current_inferior)
6855 (remove_inferior, add_process, remove_process, find_process_pid)
6856 (have_started_inferiors_p, have_attached_inferiors_p)
6857 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6858 (clear_inferiors, find_inferior, find_inferior_id)
6859 (inferior_target_data, set_inferior_target_data)
6860 (inferior_regcache_data, set_inferior_regcache_data): Move to
6861 inferiors.h, and include it.
6862 * inferiors.h: New file.
6863
f699aaba
PA
68642013-09-05 Pedro Alves <palves@redhat.com>
6865
6866 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6867 Move ...
72f4393d 6868 * ax.h: ... here.
f699aaba 6869
c144c7a0
PA
68702013-09-05 Pedro Alves <palves@redhat.com>
6871
6872 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6873 tracepoint.h.
6874 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6875 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6876 (handle_tracepoint_general_set, handle_tracepoint_query)
6877 (tracepoint_finished_step, tracepoint_was_hit)
6878 (release_while_stepping_state_list, current_traceframe)
6879 (in_readonly_region, traceframe_read_mem)
6880 (fetch_traceframe_registers, traceframe_read_sdata)
6881 (traceframe_read_info, struct fast_tpoint_collect_status)
6882 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6883 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6884 (supply_fast_tracepoint_registers)
6885 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6886 (ipa_tdesc, claim_trampoline_space)
6887 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6888 (agent_mem_read, agent_get_trace_state_variable_value)
6889 (agent_set_trace_state_variable_value, agent_tsv_read)
6890 (agent_mem_read_string, get_raw_reg_func_addr)
6891 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6892 * tracepoint.h: ... this new file.
6893
ff42e6ab
PA
68942013-09-05 Pedro Alves <palves@redhat.com>
6895
6896 * server.h (perror_with_name, error, fatal, warning, paddress)
6897 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6898 include it.
6899 * utils.h: New file.
6900
541af0f4
PA
69012013-09-05 Pedro Alves <palves@redhat.com>
6902
6903 * server.h (remote_debug, noack_mode, transport_is_reliable)
6904 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6905 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6906 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6907 (write_enn, initialize_async_io, enable_async_io)
6908 (disable_async_io, check_remote_input_interrupt_request)
6909 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6910 (dead_thread_notify, prepare_resume_reply)
6911 (decode_address_to_semicolon, decode_address, decode_m_packet)
6912 (decode_M_packet, decode_X_packet, decode_xfer_write)
6913 (decode_search_memory_packet, unhexify, hexify)
6914 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6915 (look_up_one_symbol, relocate_instruction)
6916 (monitor_output): Move to remote-utils.h, and include it.
6917 * remote-utils.h: New file.
6918
eebdf26b
PA
69192013-09-05 Pedro Alves <palves@redhat.com>
6920
6921 * server.h (_): Delete.
6922
3aafd2ff
PA
69232013-09-02 Pedro Alves <palves@redhat.com>
6924
6925 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6926 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6927 allocated.
6928 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6929
cee83bcb
PM
69302013-09-02 Pierre Muller <muller@sourceware.org>
6931
6932 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6933 or WriteProcessMemory complete successfully and handle
6934 ERROR_PARTIAL_COPY error.
6935
9a13b2fa
PA
69362013-09-02 Pedro Alves <palves@redhat.com>
6937
6938 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6939 error instead of EIO.
6940
602e3198
JK
69412013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6942
6943 PR server/15604
6944 * linux-low.c: Include filestuff.h.
6945 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6946 * lynx-low.c: Include filestuff.h.
6947 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6948 * server.c: Include filestuff.h.
6949 (main): Call notice_open_fds.
6950 * spu-low.c: Include filestuff.h.
6951 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6952
96d7229d
LM
69532013-08-22 Luis Machado <lgustavo@codesourcery.com>
6954
6955 * Makefile.in: Explain why ../target and ../nat are not
6956 listed as include file search paths.
6957 (linux-waitpid.o): New object file rule.
6958 * configure.srv (srv_native_linux_obj): New variable.
6959 Replace all occurrences of linux native object files with
6960 $srv_native_linux_obj.
6961 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6962 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6963 (linux_enable_event_reporting): Remove declaration.
6964 (my_waitpid): Moved to common/linux-waitpid.c.
6965 (linux_wait_for_event): Pass ptid when calling
6966 linux_enable_event_reporting.
6967 (linux_supports_tracefork_flag): Remove.
6968 (linux_enable_event_reporting): Likewise.
6969 (linux_tracefork_grandchild): Remove.
6970 (STACK_SIZE): Moved to common/linux-ptrace.c.
6971 (linux_tracefork_child): Remove.
6972 (linux_test_for_tracefork): Remove.
6973 (linux_look_up_symbols): Call linux_supports_traceclone.
6974 (initialize_low): Remove call to linux_test_for_tracefork.
6975 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6976 common/linux-ptrace.h.
6977 (PTRACE_TYPE_ARG4): Likewise.
6978 Include linux-ptrace.h.
6979
32940073
PA
69802013-08-21 Pedro Alves <palves@redhat.com>
6981
6982 * config.in: Renegerate.
6983
33b60d58 69842013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6985
33b60d58
LM
6986 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6987 (SFILES): Remove $(srcdir)/common/target-common.c and
6988 add $(srcdir)/target/waitstatus.c.
6989 (OBS): Remove target-common.o and add waitstatus.o.
6990 (server_h): Remove $(srcdir)/../common/target-common.h and
6991 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6992 and $(srcdir)/../target/waitstatus.h.
6993 (target-common.o): Remove.
6994 (waitstatus.o): New target object file.
6995 * target.h: Do not include target-common.h and
6996 include target/resume.h, target/wait.h and
6997 target/waitstatus.h.
6998
b8e1b30e
LM
69992013-08-13 Luis Machado <lgustavo@codesourcery.com>
7000
7001 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7002 to PTRACE_TYPE_ARG3.
7003 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7004 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7005 PTRACE_TYPE_ARG4.
7006 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7007 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7008
7a60ad40
YQ
70092013-07-27 Jie Zhang <jie@codesourcery.com>
7010 Daniel Jacobowitz <dan@codesourcery.com>
7011 Yao Qi <yao@codesourcery.com>
7012
7013 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7014 (mips-linux-watch.o): New rule.
7015 (mips_linux_watch_h): New variable.
7016 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7017 srv_tgtobj.
7018 * linux-mips-low.c: Include mips-linux-watch.h.
7019 (struct arch_process_info, struct arch_lwp_info): New.
7020 (update_watch_registers_callback): New function.
7021 (mips_linux_new_process, mips_linux_new_thread) New functions.
7022 (mips_linux_prepare_to_resume, mips_insert_point): New
7023 functions.
7024 (mips_remove_point, mips_stopped_by_watchpoint): New
7025 functions.
7026 (rsp_bp_type_to_target_hw_bp_type): New function.
7027 (mips_stopped_data_address): New function.
7028 (the_low_target): Add watchpoint support functions.
7029
de6f69ad
YQ
70302013-07-27 Yao Qi <yao@codesourcery.com>
7031
7032 * i386-low.c: Include break-common.h.
7033 (enum target_hw_bp_type): Remove.
7034
3360c0bf
LM
70352013-07-24 Luis Machado <lgustavo@codesourcery.com>
7036
7037 * Makefile.in (SFILES): /common/target-common.c.
7038 (OBS): Add target-common.o.
7039 (server_h): Add $(srcdir)/../common/target-common.h.
7040 (target-common.o): New target.
7041 * server.c (queue_stop_reply_callback): Free
7042 status string after use.
7043 * target.c (target_waitstatus_to_string): Remove.
7044 * target.h: Include target-common.h.
7045 (resume_kind): Likewise.
7046 (target_waitkind): Likewise.
7047 (target_waitstatus): Likewise.
7048 (TARGET_WNOHANG): Likewise.
7049
bd885420
YQ
70502013-07-04 Yao Qi <yao@codesourcery.com>
7051
7052 * Makefile.in (host_alias): Use @host_noncanonical@.
7053 (target_alias): Use @target_noncanonical@.
7054 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7055 ACX_NONCANONICAL_HOST.
7056 * configure: Regenerated.
7057
7058 Revert:
7059 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7060
7061 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7062 * configure: Rebuild.
7063 * Makefile.in (version_host, version_target): Get from configure.
7064 (version.c): Use $(version_host) and $(version_target).
7065
17ef446e
PA
70662013-07-03 Pedro Alves <palves@redhat.com>
7067
7068 * Makefile.in (config.status): Depend on development.sh.
7069 * acinclude.m4: Include libmcheck.m4.
7070 * configure: Regenerate.
7071
7a9a7487
MG
70722013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7073
7074 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7075 attribute inside the parentheses.
7076 (winapi_DebugSetProcessKillOnExit): Ditto.
7077 (winapi_DebugBreakProcess): Ditto.
7078 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7079
49b64de6
MG
70802013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7081
7082 * notif.h (notif_event): Add a dummy member to avoid compiler
7083 errors.
7084
d5749ee7
PA
70852013-07-01 Pedro Alves <palves@redhat.com>
7086
7087 * hostio.c (HOSTIO_PATH_MAX): Define.
7088 (require_filename, handle_open, handle_unlink, handle_readlink):
7089 Use it.
7090
d8d2a3ee
PA
70912013-07-01 Pedro Alves <palves@redhat.com>
7092
7093 * server.h: Include "pathmax.h".
7094 * linux-low.c: Don't include sys/param.h.
7095 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7096 MAXPATHLEN.
7097 * win32-low.c: Don't include sys/param.h.
7098 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7099
bc7dea8d
PA
71002013-07-01 Pedro Alves <palves@redhat.com>
7101
7102 * event-loop.c: Don't check HAVE_UNISTD_H before including
7103 <unistd.h>.
7104 * gdbreplay.c: Likewise.
7105 * remote-utils.c: Likewise.
7106 * server.c: Likewise.
7107 * configure.ac: Don't check for unistd.h.
7108 * configure: Regenerate.
7109
d6c2da54
TT
71102013-06-28 Tom Tromey <tromey@redhat.com>
7111
7112 * Makefile.in (version.c): Use version.in, not
7113 common/version.in.
7114
257b6bec
MG
71152013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7116
7117 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7118 * configure: Rebuild.
7119 * Makefile.in (version_host, version_target): Get from configure.
7120 (version.c): Use $(version_host) and $(version_target).
7121
86ebe149
DK
71222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7123
7124 Fix trace-status to output user name without trailing colon.
7125 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7126
f30aa5af
DK
71272013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7128
7129 Fix trace-status to output proper start-time and stop-time.
7130 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7131 output start time and stop time in hex as gdb expects.
7132
28a93511
YQ
71332013-06-26 Pedro Alves <pedro@codesourcery.com>
7134
7135 * tracepoint.c (build_traceframe_info_xml): Output trace state
7136 variables present in the trace buffer.
7137
01208463
TT
71382013-06-24 Tom Tromey <tromey@redhat.com>
7139
7140 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7141 create-version.sh.
7142 (version.o): Remove.
7143 * gdbreplay.c: Include version.h.
7144 (version, host_name): Don't declare.
7145 * server.h: Include version.h.
7146 (version, host_name): Don't declare.
7147
760256f9
PA
71482013-06-12 Pedro Alves <palves@redhat.com>
7149
7150 * linux-x86-low.c (linux_is_elf64): Delete global.
7151 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7152 with local linux_pid_exe_is_elf_64_file use.
7153
030031ee
PA
71542013-06-11 Pedro Alves <palves@redhat.com>
7155
7156 * linux-low.c (regset_disabled, disable_regset): New functions.
7157 (regsets_fetch_inferior_registers)
7158 (regsets_store_inferior_registers): Use them.
7159 (initialize_regsets_info); Don't allocate the disabled_regsets
7160 array here.
7161 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7162 comment.
7163
5da6eb0a
PA
71642013-06-11 Pedro Alves <palves@redhat.com>
7165
7166 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7167 xmalloc.
7168
7e5aaa09
PA
71692013-06-11 Pedro Alves <palves@redhat.com>
7170
7171 * linux-x86-low.c (initialize_low_arch): Call
7172 init_registers_x32_avx_linux.
7173
d878444c
JK
71742013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7175
7176 Fix compatibility with Android Bionic.
7177 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7178 it is not empty.
7179
3aee8918
PA
71802013-06-07 Pedro Alves <palves@redhat.com>
7181
5f2b57b5 7182 PR server/14823
3aee8918
PA
7183 * Makefile.in (OBS): Add tdesc.o.
7184 (IPA_OBJS): Add tdesc-ipa.o.
7185 (tdesc-ipa.o): New rule.
7186 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7187 interface.
7188 * linux-low.c (new_inferior): Delete.
7189 (disabled_regsets, num_regsets): Delete.
7190 (linux_add_process): Adjust to set the new per-process
7191 new_inferior flag.
7192 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7193 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7194 was a stop. When calling arch_setup, switch the current inferior
7195 to the thread that got an event.
7196 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7197 (regsets_fetch_inferior_registers)
7198 (regsets_store_inferior_registers): New regsets_info parameter.
7199 Adjust to use it.
7200 (linux_register_in_regsets): New regs_info parameter. Adjust to
7201 use it.
7202 (register_addr, fetch_register, store_register): New usrregs_info
7203 parameter. Adjust to use it.
7204 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7205 parameter regs_info. Adjust to use it.
7206 (linux_fetch_registers): Get the current inferior's regs_info, and
7207 adjust to use it.
7208 (linux_store_registers): Ditto.
7209 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7210 (initialize_low): Don't initialize the target_regsets here. Call
7211 initialize_low_arch.
7212 * linux-low.h (target_regsets): Delete declaration.
7213 (struct regsets_info): New.
7214 (struct usrregs_info): New.
7215 (struct regs_info): New.
7216 (struct process_info_private) <new_inferior>: New field.
7217 (struct linux_target_ops): Delete the num_regs, regmap, and
7218 regset_bitmap fields. New field regs_info.
7219 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7220 * i387-fp.c (num_xmm_registers): Delete.
7221 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7222 calls to new interface.
7223 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7224 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7225 Infer the number of xmm registers from the regcache's target
7226 description.
7227 * i387-fp.h (num_xmm_registers): Delete.
7228 * inferiors.c (add_thread): Don't install the thread's regcache
7229 here.
7230 * proc-service.c (gregset_info): Fetch the current inferior's
7231 regs_info. Adjust to use it.
7232 * regcache.c: Include tdesc.h.
7233 (register_bytes, reg_defs, num_registers)
7234 (gdbserver_expedite_regs): Delete.
7235 (get_thread_regcache): If the thread doesn't have a regcache yet,
7236 create one, instead of aborting gdbserver.
7237 (regcache_invalidate_one): Rename to ...
7238 (regcache_invalidate_thread): ... this.
7239 (regcache_invalidate_one): New.
7240 (regcache_invalidate): Only invalidate registers of the current
7241 process.
7242 (init_register_cache): Add target_desc parameter, and use it.
7243 (new_register_cache): Ditto. Assert the target description has a
7244 non zero registers_size.
7245 (regcache_cpy): Add assertions. Adjust.
7246 (realloc_register_cache, set_register_cache): Delete.
7247 (registers_to_string, registers_from_string): Adjust.
7248 (find_register_by_name, find_regno, find_register_by_number)
7249 (register_cache_size): Add target_desc parameter, and use it.
7250 (free_register_cache_thread, free_register_cache_thread_one)
7251 (regcache_release, register_cache_size): New.
7252 (register_size): Add target_desc parameter, and use it.
7253 (register_data, supply_register, supply_register_zeroed)
7254 (supply_regblock, supply_register_by_name, collect_register)
7255 (collect_register_as_string, collect_register_by_name): Adjust.
7256 * regcache.h (struct target_desc): Forward declare.
7257 (struct regcache) <tdesc>: New field.
7258 (init_register_cache, new_register_cache): Add target_desc
7259 parameter.
7260 (regcache_invalidate_thread): Declare.
7261 (regcache_invalidate_one): Delete declaration.
7262 (regcache_release): Declare.
7263 (find_register_by_number, register_cache_size, register_size)
7264 (find_regno): Add target_desc parameter.
7265 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7266 declarations.
7267 * remote-utils.c: Include tdesc.h.
7268 (outreg, prepare_resume_reply): Adjust.
7269 * server.c: Include tdesc.h.
7270 (gdbserver_xmltarget): Delete declaration.
7271 (get_features_xml, process_serial_event): Adjust.
7272 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7273 declare.
7274 (struct process_info) <tdesc>: New field.
7275 (ipa_tdesc): Declare.
7276 * tdesc.c: New file.
7277 * tdesc.h: New file.
7278 * tracepoint.c: Include tdesc.h.
7279 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7280 (get_context_regcache): Adjust to pass ipa_tdesc down.
7281 (do_action_at_tracepoint): Adjust to get the register cache size
7282 from the context regcache's description.
7283 (traceframe_walk_blocks): Adjust to get the register cache size
7284 from the current trace frame's description.
7285 (traceframe_get_pc): Adjust to get current trace frame's
7286 description and pass it down.
7287 (gdb_collect): Adjust to get the register cache size from the
7288 IPA's description.
7289 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7290 (gdbserver_xmltarget): Delete.
7291 (initialize_low_tracepoint): Set the ipa's target description.
7292 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7293 (initialize_low_tracepoint): Set the ipa's target description.
7294 * linux-x86-low.c: Include tdesc.h.
7295 [__x86_64__] (is_64bit_tdesc): New.
7296 (ps_get_thread_area, x86_get_thread_area): Use it.
7297 (i386_cannot_store_register): Rename to ...
7298 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7299 (i386_cannot_fetch_register): Rename to ...
7300 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7301 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7302 to new interface.
7303 (target_regsets): Rename to ...
7304 (x86_regsets): ... this.
7305 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7306 interface.
7307 (x86_siginfo_fixup): Use is_64bit_tdesc.
7308 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7309 (tdesc_x32_avx_linux, tdesc_x32_linux)
7310 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7311 Declare.
7312 (x86_linux_update_xmltarget): Delete.
7313 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7314 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7315 (AMD64_LINUX_USER64_CS): New.
7316 (x86_linux_read_description): New, based on
7317 x86_linux_update_xmltarget.
7318 (same_process_callback): New.
7319 (x86_arch_setup_process_callback): New.
7320 (x86_linux_update_xmltarget): New.
7321 (x86_regsets_info): New.
7322 (amd64_linux_regs_info): New.
7323 (i386_linux_usrregs_info): New.
7324 (i386_linux_regs_info): New.
7325 (x86_linux_regs_info): New.
7326 (x86_arch_setup): Reimplement.
7327 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7328 (x86_emit_ops): Ditto.
7329 (the_low_target): Adjust. Install x86_linux_regs_info,
7330 x86_cannot_fetch_register, and x86_cannot_store_register.
7331 (initialize_low_arch): New.
7332 * linux-ia64-low.c (tdesc_ia64): Declare.
7333 (ia64_fetch_register): Adjust.
7334 (ia64_usrregs_info, regs_info): New globals.
7335 (ia64_regs_info): New function.
7336 (the_low_target): Adjust.
7337 (initialize_low_arch): New function.
7338 * linux-sparc-low.c (tdesc_sparc64): Declare.
7339 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7340 Adjust.
7341 (sparc_arch_setup): New function.
7342 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7343 (the_low_target): Adjust.
7344 (initialize_low_arch): New function.
7345 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7346 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7347 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7348 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7349 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7350 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7351 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7352 (tdesc_powerpc_isa205_vsx64l): Declare.
7353 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7354 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7355 (ppc_set_pc, ppc_get_hwcap): Adjust.
7356 (ppc_usrregs_info): Forward declare.
7357 (!__powerpc64__) ppc_regmap_adjusted: New global.
7358 (ppc_arch_setup): Adjust to the current process'es target
7359 description.
7360 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7361 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7362 (ppc_store_evrregset): Adjust.
7363 (target_regsets): Rename to ...
7364 (ppc_regsets): ... this, and make static.
7365 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7366 (ppc_regs_info): New function.
7367 (the_low_target): Adjust.
7368 (initialize_low_arch): New function.
7369 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7370 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7371 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7372 (tdesc_s390x_linux64v2): Declare.
7373 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7374 (s390_fill_gregset, s390_store_last_break): Adjust.
7375 (target_regsets): Rename to ...
7376 (s390_regsets): ... this, and make static.
7377 (s390_get_pc, s390_set_pc): Adjust.
7378 (s390_get_hwcap): New target_desc parameter, and use it.
7379 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7380 (s390_arch_setup): Adjust to set the current process'es target
7381 description. Don't adjust the regmap.
7382 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7383 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7384 (regs_info_3264): New globals.
7385 (s390_regs_info): New function.
7386 (the_low_target): Adjust.
7387 (initialize_low_arch): New function.
7388 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7389 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7390 [__mips64] (init_registers_mips_linux)
7391 (init_registers_mips_dsp_linux): Delete defines.
7392 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7393 (have_dsp): New global.
7394 (mips_read_description): New, based on mips_arch_setup.
7395 (mips_arch_setup): Reimplement.
7396 (get_usrregs_info): New function.
7397 (mips_cannot_fetch_register, mips_cannot_store_register)
7398 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7399 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7400 (target_regsets): Rename to ...
7401 (mips_regsets): ... this, and make static.
7402 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7403 (dsp_regs_info, regs_info): New globals.
7404 (mips_regs_info): New function.
7405 (the_low_target): Adjust.
7406 (initialize_low_arch): New function.
7407 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7408 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7409 Declare.
7410 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7411 (arm_read_description): New, with bits factored from
7412 arm_arch_setup.
7413 (arm_arch_setup): Reimplement.
7414 (target_regsets): Rename to ...
7415 (arm_regsets): ... this, and make static.
7416 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7417 (arm_regs_info): New function.
7418 (the_low_target): Adjust.
7419 (initialize_low_arch): New function.
7420 * linux-m68k-low.c (tdesc_m68k): Declare.
7421 (target_regsets): Rename to ...
7422 (m68k_regsets): ... this, and make static.
7423 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7424 (m68k_regs_info): New function.
7425 (m68k_arch_setup): New function.
7426 (the_low_target): Adjust.
7427 (initialize_low_arch): New function.
7428 * linux-sh-low.c (tdesc_sharch): Declare.
7429 (target_regsets): Rename to ...
7430 (sh_regsets): ... this, and make static.
7431 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7432 (sh_regs_info, sh_arch_setup): New functions.
7433 (the_low_target): Adjust.
7434 (initialize_low_arch): New function.
7435 * linux-bfin-low.c (tdesc_bfin): Declare.
7436 (bfin_arch_setup): New function.
7437 (bfin_usrregs_info, regs_info): New globals.
7438 (bfin_regs_info): New function.
7439 (the_low_target): Adjust.
7440 (initialize_low_arch): New function.
7441 * linux-cris-low.c (tdesc_cris): Declare.
7442 (cris_arch_setup): New function.
7443 (cris_usrregs_info, regs_info): New globals.
7444 (cris_regs_info): New function.
7445 (the_low_target): Adjust.
7446 (initialize_low_arch): New function.
7447 * linux-cris-low.c (tdesc_crisv32): Declare.
7448 (cris_arch_setup): New function.
7449 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7450 (cris_regs_info): New function.
7451 (the_low_target): Adjust.
7452 (initialize_low_arch): New function.
7453 * linux-m32r-low.c (tdesc_m32r): Declare.
7454 (m32r_arch_setup): New function.
7455 (m32r_usrregs_info, regs_info): New globals.
7456 (m32r_regs_info): Adjust.
7457 (initialize_low_arch): New function.
7458 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7459 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7460 (tic6x_usrregs_info): Forward declare.
7461 (tic6x_read_description): New function, based on ...
7462 (tic6x_arch_setup): ... this. Reimplement.
7463 (target_regsets): Rename to ...
7464 (tic6x_regsets): ... this, and make static.
7465 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7466 (tic6x_regs_info): New function.
7467 (the_low_target): Adjust.
7468 (initialize_low_arch): New function.
7469 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7470 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7471 (target_regsets): Rename to ...
7472 (xtensa_regsets): ... this, and make static.
7473 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7474 globals.
7475 (xtensa_arch_setup, xtensa_regs_info): New functions.
7476 (the_low_target): Adjust.
7477 (initialize_low_arch): New function.
7478 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7479 (nios2_arch_setup): Set the current process'es tdesc.
7480 (target_regsets): Rename to ...
7481 (nios2_regsets): ... this.
7482 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7483 (nios2_regs_info): New function.
7484 (the_low_target): Adjust.
7485 (initialize_low_arch): New function.
a261b8f5
PA
7486 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7487 (aarch64_arch_setup): Set the current process'es tdesc.
7488 (target_regsets): Rename to ...
7489 (aarch64_regsets): ... this.
7490 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7491 (aarch64_regs_info): New function.
7492 (the_low_target): Adjust.
7493 (initialize_low_arch): New function.
3aee8918
PA
7494 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7495 globals.
7496 (target_regsets): Rename to ...
7497 (tile_regsets): ... this.
7498 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7499 (tile_regs_info): New function.
7500 (tile_arch_setup): Set the current process'es tdesc.
7501 (the_low_target): Adjust.
7502 (initialize_low_arch): New function.
7503 * spu-low.c (tdesc_spu): Declare.
7504 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7505 * win32-arm-low.c (tdesc_arm): Declare.
7506 (arm_arch_setup): New function.
7507 (the_low_target): Install arm_arch_setup instead of
7508 init_registers_arm.
7509 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7510 (init_windows_x86): Rename to ...
7511 (i386_arch_setup): ... this. Set `win32_tdesc'.
7512 (the_low_target): Adjust.
7513 * win32-low.c (win32_tdesc): New global.
7514 (child_add_thread): Don't create the thread cache here.
7515 (do_initial_child_stuff): Set the new process'es tdesc.
7516 * win32-low.h (struct target_desc): Forward declare.
7517 (win32_tdesc): Declare.
7518 * lynx-i386-low.c (tdesc_i386): Declare global.
7519 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7520 * lynx-low.c (lynx_tdesc): New global.
7521 (lynx_add_process): Set the new process'es tdesc.
7522 * lynx-low.h (struct target_desc): Forward declare.
7523 (lynx_tdesc): Declare global.
7524 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7525 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7526 * nto-low.c (nto_tdesc): New global.
7527 (do_attach): Set the new process'es tdesc.
7528 * nto-low.h (struct target_desc): Forward declare.
7529 (nto_tdesc): Declare.
7530 * nto-x86-low.c (tdesc_i386): Declare.
7531 (nto_x86_arch_setup): Set `nto_tdesc'.
7532
b1fbec62
GB
75332013-06-04 Gary Benson <gbenson@redhat.com>
7534
7535 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7536 to qSupported response when appropriate.
7537 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7538 with nonzero-length annex.
7539 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7540 arguments supplied in annex.
7541
d1ec4ce7
DE
75422013-05-31 Doug Evans <dje@google.com>
7543
ac44adcb 7544 PR server/15594
d1ec4ce7
DE
7545 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7546 64 bits in 64-cross-32 environment.
7547
9b25f2d3
PA
75482013-05-28 Pedro Alves <palves@redhat.com>
7549
7550 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7551 (aarch64-without-fpu.c): Delete rule.
7552 * configure.srv (aarch64*-*-linux*): Remove references to
7553 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7554 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7555 declaration.
7556
6740dc9c
PA
75572013-05-24 Pedro Alves <palves@redhat.com>
7558
7559 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7560 instead of strchr/decode_address. Error if the range isn't split
7561 with a ','. Don't assume there's be a ':' in the action.
7562
c2d6af84
PA
75632013-05-23 Yao Qi <yao@codesourcery.com>
7564 Pedro Alves <palves@redhat.com>
7565
7566 * linux-low.c (lwp_in_step_range): New function.
7567 (linux_wait_1): If the thread was range stepping and stopped
7568 outside the stepping range, report the stop to GDB. Otherwise,
7569 continue stepping. Add range stepping debug output.
7570 (linux_set_resume_request): Copy the step range from the resume
7571 request to the lwp.
7572 (linux_supports_range_stepping): New.
7573 (linux_target_ops) <supports_range_stepping>: Set to
7574 linux_supports_range_stepping.
7575 * linux-low.h (struct linux_target_ops)
7576 <supports_range_stepping>: New field.
7577 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7578 * linux-x86-low.c (x86_supports_range_stepping): New.
7579 (the_low_target) <supports_range_stepping>: Set to
7580 x86_supports_range_stepping.
7581 * server.c (handle_v_cont): Handle 'r' action.
7582 (handle_v_requests): Append ";r" if the target supports range
7583 stepping.
7584 * target.h (struct thread_resume) <step_range_start,
7585 step_range_end>: New fields.
7586 (struct target_ops) <supports_range_stepping>:
7587 New field.
7588 (target_supports_range_stepping): New macro.
7589
58794e1a
JB
75902013-05-17 Joel Brobecker <brobecker@adacore.com>
7591
7592 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7593 confusion in comment.
7594
d631c5a7
JB
75952013-05-17 Joel Brobecker <brobecker@adacore.com>
7596
7597 * lynx-low.c (struct process_info_private): New type.
7598 (lynx_add_process): New function.
7599 (lynx_create_inferior, lynx_attach): Replace calls to
7600 add_process by calls to lynx_add_process.
7601 (lynx_resume): If PTID is null, then try using
7602 current_process()->private->last_wait_event_ptid.
7603 Add comments.
7604 (lynx_clear_inferiors): Delete. The contents of that function
7605 has been inlined in lynx_mourn;
7606 (lynx_wait_1): Save the ptid in the process's private data.
7607 (lynx_mourn): Free the process' private data. Replace call
7608 to lynx_clear_inferiors by call to clear_inferiors.
7609
96f7a20f
YQ
76102013-05-17 Yao Qi <yao@codesourcery.com>
7611
7612 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7613 the right place.
7614
db0dfaa0
LM
76152013-05-16 Luis Machado <lgustavo@codesourcery.com>
7616
7617 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7618 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7619 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7620 PT_TEXT_END_ADDR guards. Update comments.
7621 (linux_target_op) <read_offsets>: Conditionally define to
7622 linux_read_offsets if the target is UCLIBC and if it defines
7623 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7624
68f5f838
SL
76252013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7626 Andrew Jenner <andrew@codesourcery.com>
7627
7628 * Makefile.in (SFILES): Add linux-nios2-low.c.
7629 (clean): Add action to delete nios2-linux.c.
7630 (nios2-linux.c): New rule.
7631 * configure.srv: Add nios2*-*-linux*.
7632 * linux-nios2-low.c: New.
7633
1ebff1fd
HAQ
76342013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7635
7636 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7637
f6150862
HZ
76382013-04-25 Hui Zhu <hui@codesourcery.com>
7639
7640 PR gdb/15186
f6150862
HZ
7641 * ax.c (ax_printf): Add fflush.
7642
614c279d
TT
76432013-04-22 Tom Tromey <tromey@redhat.com>
7644
7645 * Makefile.in (SFILES): Add filestuff.c.
7646 (OBS): Add filestuff.o.
7647 (filestuff.o): New target.
7648 * config.in, configure: Rebuild.
7649 * configure.ac: Check for fdwalk, pipe2.
7650
7d4e5717
PA
76512013-04-17 Pedro Alves <palves@redhat.com>
7652
7653 * configure.ac (USE_THREAD_DB): Delete variable.
7654 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7655 Don't AC_SUBST USE_THREAD_DB.
7656 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7657 * config.in, configure: Regenerate.
7658
d5c93e41
PA
76592013-04-16 Pedro Alves <palves@redhat.com>
7660
7661 * linux-low.h (struct lwp_info) <thread_known>: Move under
7662 the USE_THREAD_DB #ifdef.
7663
04f5fe89
PA
76642013-04-16 Pedro Alves <palves@redhat.com>
7665
7666 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7667 (linux-low.o): Delete rule.
7668 * linux-low.h: Always include "gdb_thread_db.h" instead of
7669 conditionally including thread_db.h.
7670 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7671 HAVE_THREAD_DB_H.
7672
480b27bf
JK
76732013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7674
7675 * Makefile.in (install-only): Fix make install regression.
7676
43662968
JK
76772013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7678
7679 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7680 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7681 installation.
7682 * gdbserver.1: Remove.
7683
3e74e146
PA
76842013-03-22 Pedro Alves <palves@redhat.com>
7685
7686 * linux-low.c (handle_extended_wait): Don't call
7687 linux_enable_event_reporting.
7688
a8347a2a
TT
76892013-03-15 Tony Theodore <tonyt@logyst.com>
7690
7691 PR build/9098:
7692 * Makefile.in (SHELL): Use @SHELL@.
7693
eeb56fa7
SDJ
76942013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7695
7696 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7697 compiler warning.
7698
4fa7e2ff
JB
76992013-03-13 Joel Brobecker <brobecker@adacore.com>
7700
7701 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7702 Remove extraneous NULL element.
7703
8ddb1965
YQ
77042013-03-13 Yao Qi <yao@codesourcery.com>
7705
7706 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7707 'V' block in trace frame.
7708
9accd112
MM
77092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7710
7711 * target.h (struct target_ops): Add btrace ops.
7712 (target_supports_btrace): New macro.
7713 (target_enable_btrace): New macro.
7714 (target_disable_btrace): New macro.
7715 (target_read_btrace): New macro.
7716 * gdbthread.h (struct thread_info): Add btrace field.
7717 * server.c: Include btrace-common.h.
7718 (handle_btrace_general_set): New function.
7719 (handle_btrace_enable): New function.
7720 (handle_btrace_disable): New function.
7721 (handle_general_set): Call handle_btrace_general_set.
7722 (handle_qxfer_btrace): New function.
7723 (struct qxfer qxfer_packets[]): Add btrace entry.
7724 * inferiors.c (remove_thread): Disable btrace.
7725 * linux-low: Include linux-btrace.h.
7726 (linux_low_enable_btrace): New function.
7727 (linux_low_read_btrace): New function.
7728 (linux_target_ops): Add btrace ops.
7729 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7730 Add srv_linux_btrace=yes.
7731 (x86_64-*-linux*): Add linux-btrace.o.
7732 Add srv_linux_btrace=yes.
7733 * configure.ac: Define HAVE_LINUX_BTRACE.
7734 * config.in: Regenerated.
7735 * configure: Regenerated.
7736
5cc22e4c
MM
77372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7738
7739 * server.c (handle_qxfer): Preserve error message if -3 is
7740 returned.
7741 (qxfer): Document the -3 return value.
7742
7c97f91e
MM
77432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7744
7745 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7746 (linux_btrace_h): New variable.
7747 (linux-btrace.o): New rule.
7748
be9a119c 77492013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7750 Hafiz Abid Qadeer <abidh@codesourcery.com>
7751
7752 * tracepoint.c (trace_buffer_size): New global.
7753 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7754 (init_trace_buffer): Change to one-argument function. Allocate
7755 trace buffer memory.
7756 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7757 handle QTBuffer:size packet.
7758 (cmd_bigqtbuffer_size): New function.
7759 (initialize_tracepoint): Call init_trace_buffer with
7760 DEFAULT_TRACE_BUFFER_SIZE.
7761 * server.c (handle_query): Add QTBuffer:size in the
7762 supported packets.
7763
e64f7499
YQ
77642013-03-07 Yao Qi <yao@codesourcery.com>
7765
7766 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7767 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7768 of -1.
7769 (cmd_qtsp): Adjust condition. Do post increment.
7770 Set cur_action and cur_step_action back to 0.
7771
f0ae6fc3
PA
77722013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7773
7774 PR server/15236
7775 * linux-low.c (linux_write_memory): Return early success if LEN is
7776 zero.
7777
b5b0b0af
CV
77782013-03-05 Corinna Vinschen <vinschen@redhat.de>
7779
334ad4a8 7780 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7781
589bc927
TT
77822013-02-28 Tom Tromey <tromey@redhat.com>
7783
7784 * configure.ac: Invoke AC_SYS_LARGEFILE.
7785 * configure, config.in: Rebuild.
7786
dfe07582
CV
77872013-02-28 Corinna Vinschen <vinschen@redhat.com>
7788
7789 * win32-low.c: Throughout, fix format strings and casts of
7790 printf-like functions to avoid type related warnings on all
7791 platforms.
7792 (get_child_debug_event): Print dwDebugEventCode as hex since
7793 that's how it's usually documented.
7794
736cd585
YQ
77952013-02-28 Yao Qi <yao@codesourcery.com>
7796
7797 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7798 pulongest.
7799
e1f58301
JW
78002013-02-27 Jiong Wang <jiwang@tilera.com>
7801
7802 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7803 (reg-tilegx32.c): New rule.
7804 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7805 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7806 different register info initializer according to elf class.
7807 (init_registers_tilgx32): New function. The tilegx32 register info
7808 initializer.
7809 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7810 (tile_store_gregset): Likewise.
7811
d171ca78
YQ
78122013-02-27 Yao Qi <yao@codesourcery.com>
7813
7814 * server.c (process_point_options): Print debug message when
7815 debug_threads is true.
7816
282bbdf3
YQ
78172013-02-26 Yao Qi <yao@codesourcery.com>
7818
7819 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7820
aca22551
PA
78212013-02-19 Pedro Alves <palves@redhat.com>
7822 Kai Tietz <ktietz@redhat.com>
7823
7824 PR gdb/15161
7825
7826 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7827 instead of strtoul to extract address from packet.
7828 (process_serial_event) <'z'>: Likewise.
7829
4f3cee1c
YQ
78302013-02-18 Yao Qi <yao@codesourcery.com>
7831
7832 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7833
8e1d55a3
PA
78342013-02-14 Pedro Alves <palves@redhat.com>
7835
7836 Plug memory leak.
7837
7838 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7839 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7840
458820da
PA
78412013-02-14 Pedro Alves <palves@redhat.com>
7842
7843 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7844
baea0dae
PA
78452013-02-14 Pedro Alves <palves@redhat.com>
7846
7847 * tracepoint.c (save_string): Delete.
7848 (add_tracepoint_action): Use savestring instead of save_string.
7849
0b1afbb3
PA
78502013-02-12 Pedro Alves <palves@redhat.com>
7851
7852 * linux-xtensa-low.c: Ditto.
7853 * xtensa-xtregs.c: Ditto.
7854
8a4ac37e
PA
78552013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7856
7857 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7858 thread_db.
7859
148de6bb
MS
78602013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7861
7862 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7863 aarch64_num_wp_regs and aarch64_num_bp_regs to
7864 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7865
55fac6e0
MS
78662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7867
7868 * linux-aarch64-low.c (ps_get_thread_area): Replace
7869 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7870
176eb98c
MS
78712013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7872 Marcus Shawcroft <marcus.shawcroft@arm.com>
7873 Nigel Stephens <nigel.stephens@arm.com>
7874 Yufeng Zhang <yufeng.zhang@arm.com>
7875
7876 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7877 (aarch64.c, aarch64-without-fpu.c): New targets.
7878 * configure.srv (aarch64*-*-linux*): New.
7879 * linux-aarch64-low.c: New file.
7880
56f7af9c
MS
78812013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7882
43aaf8b6 7883 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7884 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7885 (dequeue_one_deferred_signal, linux_resume_one_thread)
7886 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7887 (linux_tracefork_grandchild, linux_test_for_tracefork)
7888 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7889 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7890 where the argument is 0.
7891
60f662b0
YQ
78922013-01-25 Yao Qi <yao@codesourcery.com>
7893
7894 * event-loop.c: Include "queue.h".
7895 (gdb_event_p): New typedef.
7896 (struct gdb_event) <next_event>: Remove.
7897 (event_queue): Change to QUEUE(gdb_event_p).
7898 (async_queue_event): Remove.
7899 (gdb_event_xfree): New.
7900 (initialize_event_loop): New.
7901 (process_event): Use API from QUEUE.
7902 (wait_for_event): Likewise.
7903 * server.c (main): Call initialize_event_loop.
7904 * server.h (initialize_event_loop): Declare.
7905
5ae4861a
YQ
79062013-01-18 Yao Qi <yao@codesourcery.com>
7907
7908 * ax.h (struct eval_agent_expr_context): New.
7909 (gdb_eval_agent_expr): Update declaration.
7910 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7911 TFRAME. Add new argument CTX.
7912 * server.h (struct eval_agent_expr_context): Declare.
7913 (agent_mem_read, agent_tsv_read): Update declaration.
7914 (agent_mem_read_string): Likewise.
7915 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7916 (add_traceframe_block): Add new argument TPOINT.
7917 Increase TPOINT->traceframe_usage.
7918 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7919 eval_tracepoint_agent_expr.
7920 (condition_true_at_tracepoint): Likewise.
7921 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7922 (agent_mem_read_string, agent_tsv_read): Likewise.
7923
85e00e85
YQ
79242013-01-16 Yao Qi <yao@codesourcery.com>
7925
7926 * linux-low.c (linux_resume_one_lwp): Don't check
7927 'lwp->bp_reinsert != 0'.
7928
4039cf45
JB
79292013-01-07 Joel Brobecker <brobecker@adacore.com>
7930 Pedro Alves <palves@redhat.com>
7931
7932 * lynx-low.c (ptrace_request_to_str): Define a temporary
7933 macro and use it to simplify this function's implementation.
7934
9044dee2
JB
79352013-01-07 Joel Brobecker <brobecker@adacore.com>
7936
7937 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7938 sets errno.
7939
e6352c8f
JB
79402013-01-07 Joel Brobecker <brobecker@adacore.com>
7941
7942 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7943
50681a27
JB
79442013-01-07 Joel Brobecker <brobecker@adacore.com>
7945
7946 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7947
3f6e77ef
JB
79482013-01-07 Joel Brobecker <brobecker@adacore.com>
7949
7950 * lynx-low.c (lynx_resume): Use the resume_info parameter
7951 to determine the ptid for the lynx_ptrace call, unless
7952 it is equal to minus_one_ptid, in which case we use the
7953 ptid of the current_inferior.
7954 (lynx_wait_1): After having received a thread create/exit
7955 event, resume the inferior's execution using the signaling
7956 thread's ptid, rather than the old ptid.
7957
7fda33ae
JB
79582013-01-07 Joel Brobecker <brobecker@adacore.com>
7959
7960 * lynx-low.c (lynx_resume): Delete variable ret.
7961
b9786c74
JB
79622013-01-01 Joel Brobecker <brobecker@adacore.com>
7963
7964 * gdbreplay.c (gdbreplay_version): Update copyright year.
7965 * server.c (gdbserver_version): Likewise.
7966
8b93d60f
JB
79672012-12-17 Joel Brobecker <brobecker@adacore.com>
7968
7969 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7970 new thread.
7971
037335a7
JB
79722012-12-17 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (ptrace_request_to_str): Add handling for
7975 PTRACE_GETTRACESIG.
7976
52d4cbd8
JB
79772012-12-17 Joel Brobecker <brobecker@adacore.com>
7978
7979 * lynx-low.c (lynx_attach): Delete variable new_process.
7980
ab8f6ca9
JB
79812012-12-17 Joel Brobecker <brobecker@adacore.com>
7982
7983 * lynx-low.c (lynx_create_inferior): Delete variable
7984 new_process.
7985
78cbc024
JB
79862012-12-17 Joel Brobecker <brobecker@adacore.com>
7987
7988 * lynx-low.c (ptrace_request_to_str): Do not handle
7989 PTRACE_GETTHREADLIST if this macro does not exist.
7990
14a00470
YQ
79912012-12-15 Yao Qi <yao@codesourcery.com>
7992
7993 * Makefile.in (OBS): Add notif.o.
7994 * notif.c, notif.h: New.
7995 * server.c: Include "notif.h".
7996 (struct vstop_notif) <next>: Remove.
7997 <base>: New field.
7998 (queue_stop_reply): Update.
7999 (push_event, send_next_stop_reply): Remove.
8000 (discard_queued_stop_replies): Update.
8001 (notif_stop): New variable.
8002 (handle_v_stopped): Remove.
8003 (handle_v_requests): Don't call handle_v_stopped. Call
8004 handle_ack_notif instead.
8005 (queue_stop_reply_callback): Call notif_event_enque instead
8006 of queue_stop_reply.
8007 (handle_status): Don't call send_next_stop_reply, call
8008 notif_write_event instead.
8009 (kill_inferior_callback): Likewise.
8010 (detach_or_kill_inferior_callback): Likewise.
8011 (main): Call initialize_notif.
8012 (process_serial_event): Call QUEUE_is_empty.
8013 (handle_target_event): Call notif_push instead of push event.
8014 * server.h (push_event): Remove declaration.
8015
61c125b9
TT
80162012-12-10 Tom Tromey <tromey@redhat.com>
8017
8018 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8019 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8020 macros.
8021 (.c.o): Rewrite.
8022 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8023 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8024 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8025 (amd64-linux-ipa.o, ax.o): Rewrite.
8026 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8027 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8028 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8029 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8030 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8031 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8032 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8033 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8034 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8035 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8036 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8037 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8038 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8039 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8040 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8041 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8042 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8043 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8044 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8045 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8046 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8047 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8048 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8049 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8050 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8051 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8052 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8053 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8054 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8055 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8056 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8057 (reg-tilegx.o): Remove.
8058 (all_object_files): New macro.
8059 Include .deps files.
8060 * aclocal.m4, configure: Rebuild.
8061 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8062 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8063 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8064
e90e9ad9
TT
80652012-12-05 Tom Tromey <tromey@redhat.com>
8066
8067 PR gdb/14917:
8068 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8069
02d403bf 80702012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8071
8072 * configure.ac: Check for linux/perf_event.h.
8073 * config.in: Regenerated.
8074 * configure: Regenerated.
8075
0270a750
PA
80762012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8077
8078 * hostio.c (handle_readlink): Decrease buffer size
8079 parameter passed to readlink by one byte.
8080
8c29b58e
YQ
80812012-11-26 Yao Qi <yao@codesourcery.com>
8082
8083 * configure.ac (build_warnings): Append '-Wempty-body'.
8084 * configure: Regenerated.
8085 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8086 body.
8087
8bdce1ff
PM
80882012-11-15 Pierre Muller <muller@sourceware.org>
8089
8090 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8091 * config.in: Regenerate.
8092 * configure: Regenerate.
8093 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8094 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8095 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8096 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8097 header.
8098 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8099 instead of <sys/wait.h> header.
8100 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8101
02d403bf 81022012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8103
8104 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8105 (various make rules): Remove -DGDBSERVER
8106
fbd5db48
YQ
81072012-11-09 Yao Qi <yao@codesourcery.com>
8108
8109 * spu-low.c (current_ptid): Move it to ..
8110 * gdbthread.h: ... here. New.
8111 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8112 * server.c (myresume, process_serial_event): Likewise.
8113 * thread-db.c (thread_db_find_new_threads): Likewise.
8114 * tracepoint.c (run_inferior_command): Likewise.
8115
b3dc46ff
AB
81162012-10-01 Andrew Burgess <aburgess@broadcom.com>
8117
8118 * server.c (handle_search_memory_1): Include access length in
8119 warning message.
8120
07c04788
HPN
81212012-09-05 Michael Brandt <michael.brandt@axis.com>
8122
8123 * linux-crisv32-low.c: Fix compile errors.
8124
918d227b
YQ
81252012-09-04 Yao Qi <yao@codesourcery.com>
8126
8127 * tracepoint.c (cmd_qtsv): Adjust debug message.
8128 Don't check CUR_TPOINT.
8129
18c1b81a
YQ
81302012-08-28 Yao Qi <yao@codesourcery.com>
8131
8132 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8133 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8134 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8135 Remove declarations of xmalloc, xreallloc, xstrdup and
8136 freeargv.
8137 * Makefile.in (libiberty_h): New.
8138 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8139 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8140
dc82f37b
YQ
81412012-08-23 Yao Qi <yao@codesourcery.com>
8142
8143 * server.h: Remove declaration of 'xsnprintf'.
8144
406b1477
KS
81452012-08-22 Keith Seitz <keiths@redhat.com>
8146
8147 * server.h: Include build-gnulib-gbserver/config.h.
8148 * gdbreplay.c: Likewise.
8149
e6712ff1
DE
81502012-08-08 Doug Evans <dje@google.com>
8151
8152 * Makefile.in (SFILES): Add gdb_vecs.c.
8153 (OBS): Add gdb_vecs.o.
8154 (gdb_vecs_h, host_defs_h): New variables.
8155 (thread-db.o): Add $(gdb_vecs_h) dependency.
8156 (gdb_vecs.o): New rule.
8157 * thread-db.c: #include "gdb_vecs.h".
8158 (thread_db_load_search): Use a vector to iterate over path elements.
8159 Handle text appearing after "$pdir".
8160
8161 * configure.ac: Add check for strstr.
8162 * config.in: Regenerate.
8163 * configure: Regenerate.
8164
7c3270ae
UW
81652012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8166
8167 * hostio.c (handle_pread): If pread fails, fall back to attempting
8168 lseek/read.
8169 (handle_pwrite): Likewise for pwrite.
8170
b62e2b27
UW
81712012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8172
8173 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8174 between unsupported TYPE and unimplementable ADDR/LEN combination.
8175 (arm_insert_point): Act on new return value.
8176
78a99e91
PA
81772012-07-31 Pedro Alves <palves@redhat.com>
8178
8179 * server.c (process_point_options): Only skip tokens if we find
8180 one that is unrecognized. Don't treat 'X' specially while
8181 skipping unrecognized tokens.
8182
fcf303ab
UW
81832012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8184
8185 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8186 to 4-byte-align HW breakpoint addresses for Thumb.
8187
7255706c
YQ
81882012-07-27 Yao Qi <yao@codesourcery.com>
8189
8190 PR remote/14161.
8191
8192 * server.h: Declare gdb_agent_about_to_close.
8193 * target.c (kill_inferior): Include "agent.h".
8194 New. Send command 'kill'.
8195 * target.h (kill_inferior): Removed macro.
8196 * tracepoint.c (gdb_agent_about_to_close): New.
8197 (gdb_agent_helper_thread): Handle command 'close'.
8198 Wait endlessly until the inferior stops.
8199 Install gdb_agent_remove_socket to atexit hook.
8200 (agent_socket_name): New static variable.
8201 (gdb_agent_socket_init): Replace local variable 'name' with
8202 'agent_socket_name'.
8203 (gdb_agent_remove_socket): New.
8204
5a3f286f
YQ
82052012-07-27 Yao Qi <yao@codesourcery.com>
8206
8207 * server.c (process_point_options): Stop at 'X' when parsing.
8208
961bd387
ME
82092012-07-19 Michael Eager <eager@eagercon.com>
8210
a261b8f5 8211 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8212 to hw_execute.
8213 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8214 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8215 hardware breakpoint.
8216
aa7c7447
JK
82172012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8218
8219 * gdbserver/linux-low.c (initialize_low): Call
8220 linux_ptrace_init_warnings.
8221
7f216e7c
DE
82222012-07-02 Doug Evans <dje@google.com>
8223
8224 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8225 pointer to int.
8226
d3ce09f5
SS
82272012-07-02 Stan Shebs <stan@codesourcery.com>
8228
8229 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8230 (ax.o): Add it to build rule.
8231 (ax-ipa.o): Ditto.
8232 (OBS): Add format.o.
8233 (IPA_OBS): Add format.o.
8234 * server.c (handle_query): Claim support for breakpoint commands.
8235 (process_point_options): Add command case.
8236 (process_serial_event): Leave running if there are printfs in
8237 effect.
8238 * mem-break.h (any_persistent_commands): Declare.
8239 (add_breakpoint_commands): Declare.
8240 (gdb_no_commands_at_breakpoint): Declare.
8241 (run_breakpoint_commands): Declare.
8242 * mem-break.c (struct point_command_list): New struct.
8243 (struct breakpoint): New field command_list.
8244 (any_persistent_commands): New function.
8245 (add_commands_to_breakpoint): New function.
8246 (add_breakpoint_commands): New function.
8247 (gdb_no_commands_at_breakpoint): New function.
8248 (run_breakpoint_commands): New function.
8249 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8250 locally.
8251 * ax.c: Include format.h.
8252 (ax_printf): New function.
8253 (gdb_eval_agent_expr): Add printf opcode.
8254
2f8f6aed
YQ
82552012-06-13 Yao Qi <yao@codesourcery.com>
8256
8257 * server.c (start_inferior): Remove duplicated writes to fields
8258 'last_resume_kind' and 'last_status' of 'current_inferior'.
8259
0c9070b3
YQ
82602012-06-12 Yao Qi <yao@codesourcery.com>
8261 Pedro Alves <palves@redhat.com>
8262
8263 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8264 comment.
8265 * server.c (handle_v_cont): Extend comment.
8266
c52daf70
YQ
82672012-06-11 Yao Qi <yao@codesourcery.com>
8268
8269 * linux-low.c (linux_attach): Add 'static'.
8270
d38bbb0a
YQ
82712012-06-06 Yao Qi <yao@codesourcery.com>
8272
8273 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8274
89dc0afd
JK
82752012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8276
8277 Fix gcc -flto compilation warning.
8278 * server.c (main): Make variable multi_mode and attach volatile.
8279
75f62ce7
TJB
82802012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8281
8282 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8283 if the platform doesn't know about it.
8284
65f479b6
PA
82852012-05-30 Jeff Kenton <jkenton@tilera.com>
8286
8287 * Makefile.in (SFILES): Add linux-tile-low.c.
8288 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8289 * configure.srv: Handle tilegx-*-linux*.
8290 * linux-tile-low.c: New file.
8291
0c5bf5a9
JK
82922012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8293
8294 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8295
a493e3e2
PA
82962012-05-24 Pedro Alves <palves@redhat.com>
8297
8298 PR gdb/7205
8299
43aaf8b6 8300 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8301
2ea28649
PA
83022012-05-24 Pedro Alves <palves@redhat.com>
8303
8304 PR gdb/7205
8305
8306 Replace target_signal with gdb_signal throughout.
8307
8d409d16
MR
83082012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8309
8310 * linux-low.c (linux_store_registers): Avoid the copying sequence
8311 when no data has been retrieved by ptrace.
8312
23512c01
MGD
83132012-05-22 Will Deacon <will.deacon@arm.com>
8314
8315 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8316 Include asm/ptrace.h.
8317 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8318 already defined.
8319
4934b29e
MR
83202012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8321
8322 * linux-low.c (linux_store_registers): Don't re-retrieve data
8323 with ptrace that has already been obtained from /proc. Always
8324 copy any data retrieved with ptrace to the buffer supplied.
8325
bde24c0a
PA
83262012-05-11 Yao Qi <yao@codesourcery.com>
8327 Pedro Alves <palves@redhat.com>
8328
8329 * linux-low.c (enum stopping_threads_kind): New.
8330 (stopping_threads): Change type to `enum stopping_threads_kind'.
8331 (handle_extended_wait): If stopping and suspending threads, leave
8332 the new_lwp suspended too.
8333 (linux_wait_for_event): Adjust.
8334 (stop_all_lwps): Set `stopping_threads' to
8335 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8336 whether we're suspending threads or just stopping them. Assert no
8337 recursion happens.
8338
623b6bdf
YQ
83392012-04-29 Yao Qi <yao@codesourcery.com>
8340
8341 * server.h: Move some code to ...
8342 * gdbthread.h: ... here. New.
8343 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8344 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8345 (nto-low.o, win32-low.o): Likewise.
8346 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8347 * regcache.c, remote-utils.c, server.c: Likewise.
8348 * target.c, tracepoint.c, win32-low.c: Likewise.
8349
f15f9948
TJB
83502012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8351
8352 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8353 (PTRACE_ARG4_TYPE): Likewise.
8354 (PTRACE_XFER_TYPE): Likewise.
8355 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8356 ptrace to PTRACE_ARG3_TYPE.
8357 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8358 (PTRACE_ARG4_TYPE): Likewise.
8359 (PTRACE_XFER_TYPE): Likewise.
8360 (linux_detach_one_lwp): Cast fourth argument of
8361 ptrace to long then PTRACE_ARG4_TYPE.
8362 (regsets_fetch_inferior_registers): Cast third argument of
8363 ptrace to long then PTRACE_ARG3_TYPE.
8364 (regsets_store_inferior_registers): Likewise.
8365
38ea300a
PA
83662012-04-20 Pedro Alves <palves@redhat.com>
8367
8368 * configure: Regenerate.
8369
c971b7fa
PA
83702012-04-19 Pedro Alves <palves@redhat.com>
8371
43aaf8b6 8372 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8373 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8374 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8375 (all, install-only, uninstall, clean-info, all-lib, clean): No
8376 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8377 (maintainer-clean realclean distclean): Use subdir_do.
8378 (subdir_do): New.
8379 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8380 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8381 * acinclude.m4: Include acx_configure_dir.m4.
8382 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8383 calls. Call AC_PROG_RANLIB. Configure gnulib using
8384 ACX_CONFIGURE_DIR.
8385 (GNULIB): New.
8386 (GNULIB_STDINT_H): Adjust.
8387 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8388 * gdbreplay.c: Include build-gnulib/config.h.
8389 * server.h: Likewise.
8390 * aclocal.m4: Regenerate.
8391 * config.in: Regenerate.
8392 * configure: Regenerate.
c971b7fa 8393
809277f8
PA
83942012-04-19 Pedro Alves <palves@redhat.com>
8395
8396 * Makefile.in (LIBGNU, INCGNU): Adjust.
8397 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8398 (all, install-only, uninstall, clean-info, all-lib, clean)
8399 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8400 * configure.ac: Adjust AC_OUTPUT output.
8401 * aclocal.m4: Regenerate.
8402 * configure: Regenerate.
8403
fd9bb8b8
PA
84042012-04-19 Pedro Alves <palves@redhat.com>
8405
8406 * Makefile.in (generated_files): New.
8407 (server_h): Remove the explicit dependency on config.h, and depend
8408 on $generated_files.
8409
1c298c66
PA
84102012-04-19 Pedro Alves <palves@redhat.com>
8411
8412 * Makefile.in (INCGNU): Add -Ignulib.
8413
57c4b50b
PA
84142012-04-19 Pedro Alves <palves@redhat.com>
8415
8416 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8417 (INCGNU): ... this, and spell out -I here.
8418 (GNULIB_LIB): Rename to ...
8419 (LIBGNU): ... this.
8420 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8421
1030e047
PA
84222012-04-19 Pedro Alves <palves@redhat.com>
8423
8424 * config.in: Regenerate.
8425
447d4319
PA
84262012-04-19 Pedro Alves <palves@redhat.com>
8427
8428 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8429 * server.h (memmem): Remove declaration.
8430 * config.in: Regenerate.
8431 * configure: Regenerate.
8432
aad9eab9
YQ
84332012-04-19 Yao Qi <yao@codesourcery.com>
8434
8435 * Makefile.in (SFILES): Add common/vec.c.
8436 (OBS): Add vec.o.
8437 (vec.o): New rule.
8438
3e10640f
YQ
84392012-04-19 Yao Qi <yao@codesourcery.com>
8440
8441 * remote-utils.c (prepare_resume_reply): Replace with macro
8442 target_core_of_thread.
8443 * server.c (handle_qxfer_threads_proper): Likewise.
8444 * target.h (traget_core_of_thread): New macro.
8445
71622373
PA
84462012-04-18 Pedro Alves <palves@redhat.com>
8447
8448 * aclocal.m4: Regenerate.
8449 * configure: Regenerate.
8450
80d26939
YQ
84512012-04-16 Yao Qi <yao@codesourcery.com>
8452
8453 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8454 duplicated on address.
8455
42476b70
YQ
84562012-04-16 Yao Qi <yao@codesourcery.com>
8457
8458 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8459 (struct tracepoint_action_ops) <send>: New field.
8460 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8461 (agent_expr_send, x_tracepoint_action_send): New.
8462 (l_tracepoint_action_send): New.
8463 (cmd_qtdp): Download and install tracepoint
8464 according to `use_agent'.
8465 (run_inferior_command): Add one more parameter `len'.
8466 Update callers.
8467 (tracepoint_send_agent): New.
8468 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8469
7bc83639
YQ
84702012-04-16 Yao Qi <yao@codesourcery.com>
8471
8472 * tracepoint.c (download_tracepoints): Moved to ...
8473 (cmd_qtstart): ... here.
8474
5f18041e
YQ
84752012-04-14 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c: Include inttypes.h.
8478 (struct collect_memory_action): Use sized types.
8479 (struct tracepoint): Likewise.
8480 (cmd_qtdp, stop_tracing): Update print specifiers.
8481 (cmd_qtp, response_tracepoint): Likewise.
8482 (collect_data_at_tracepoint): Likewise.
8483 (collect_data_at_step): Likewise.
8484
55a8c076
YQ
84852012-04-14 Yao Qi <yao@codesourcery.com>
8486
8487 Import gnulib module inttypes.
8488 * aclocal.m4, config.in, configure: Regenerated.
8489
dc750257
YQ
84902012-04-14 Yao Qi <yao@codesourcery.com>
8491
8492 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8493 Makefile and config.status at last.
8494
0ab5faf9
YQ
84952012-04-13 Yao Qi <yao@codesourcery.com>
8496
8497 * tracepoint.c: Include stdint.h unconditionally.
8498
18f5fd81
TJB
84992012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8500
8501 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8502 on BFD_HAVE_SYS_PROCFS_TYPE.
8503 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8504 * configure: Regenerate.
8505 * config.in: Likewise.
8506
4d47af5c
L
85072012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8508
8509 * Makefile.in (clean): Also remove x32.c x32-linux.c
8510 x32-avx.c x32-avx-linux.c.
8511 (x32.o): New target.
8512 (x32.c): Likewise.
8513 (x32-linux.o): Likewise.
8514 (x32-linux.c): Likewise.
8515 (x32-avx.o): Likewise.
8516 (x32-avx.c): Likewise.
8517 (x32-avx-linux.o): Likewise.
8518 (x32-avx-linux.c): Likewise.
8519
8520 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8521 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8522 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8523 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8524 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8525 i386/x32-avx-linux.xml.
8526
8527 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8528 (init_registers_x32_avx_linux): Likwise.
8529 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8530 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8531
ecedbe58
PA
85322012-04-13 Pedro Alves <palves@redhat.com>
8533
8534 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8535 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8536 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8537 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8538 the sub-make.
8539
c92b5177
L
85402012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8541
8542 * linux-x86-low.c (compat_x32_clock_t): New.
8543 (compat_x32_siginfo_t): Likewise.
8544 (compat_x32_siginfo_from_siginfo): Likewise.
8545 (siginfo_from_compat_x32_siginfo): Likewise.
8546 (linux_is_elf64): Likewise.
8547 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8548 and siginfo_from_compat_x32_siginfo for x32.
8549 (x86_arch_setup): Set linux_is_elf64.
8550
214d508e
L
85512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8552
8553 PR gdb/13969
8554 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8555 e_machine field.
8556 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8557 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8558 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8559 compatible with process.
8560
c9a1864a
YQ
85612012-04-12 Yao Qi <yao@codesourcery.com>
8562
8563 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8564 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8565 (install-only, install-info, clean): Handle sub dir gnulib.
8566 (all-lib, am--refresh): New targets.
8567 (memmem.o): Remove target.
8568 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8569 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8570 (AC_REPLACE_FUNCS): Remove memmem.
8571 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8572 (AC_OUTPUT): Generate Makefile in gnulib/.
8573 * aclocal.m4, config.in, configure: Regenerated.
8574
367ba2c2
MR
85752012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8576
8577 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8578
9d236627
PA
85792012-04-05 Pedro Alves <palves@redhat.com>
8580
8581 -Werror=strict-aliasing
8582
8583 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8584 pointer.
8585
111217b3
PA
85862012-04-04 Pedro Alves <palves@redhat.com>
8587
8588 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8589 (sparc_store_gregset_from_stack, sparc_store_gregset)
8590 (sparc_breakpoint_at): Fix formatting.
8591
8365dcf5
TJB
85922012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8593
8594 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8595 are available.
8596 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8597 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8598 * config.in: Regenerate.
8599 * configure: Likewise.
8600
689cc2ae
PA
86012012-03-29 Pedro Alves <palves@redhat.com>
8602
8603 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8604 Correct ptrace arguments.
8605
c14dfd32
PA
86062012-03-28 Pedro Alves <palves@redhat.com>
8607
8608 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8609 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8610 (IA64_FR1_REGNUM): New defines.
8611 (ia64_fetch_register): New.
8612 (the_low_target): Install it.
8613 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8614 field.
8615 * linux-low.c (linux_fetch_registers): Try the
8616 the_low_target.fetch_register hook first.
8617
8618 * linux-arm-low.c (the_low_target): Adjust.
8619 * linux-bfin-low.c (the_low_target): Adjust.
8620 * linux-cris-low.c (the_low_target): Adjust.
8621 * linux-crisv32-low.c (the_low_target): Adjust.
8622 * linux-m32r-low.c (the_low_target): Adjust.
8623 * linux-m68k-low.c (the_low_target): Adjust.
8624 * linux-mips-low.c (the_low_target): Adjust.
8625 * linux-ppc-low.c (the_low_target): Adjust.
8626 * linux-s390-low.c (the_low_target): Adjust.
8627 * linux-sh-low.c (the_low_target): Adjust.
8628 * linux-sparc-low.c (the_low_target): Adjust.
8629 * linux-tic6x-low.c (the_low_target): Adjust.
8630 * linux-x86-low.c (the_low_target): Adjust.
8631 * linux-xtensa-low.c (the_low_target): Adjust.
8632
63c88e13
PA
86332012-03-26 Pedro Alves <palves@redhat.com>
8634
8635 * server.c (handle_qxfer_libraries): Don't bail early if
8636 the_target->qxfer_libraries_svr4 is not NULL.
8637
fb723180
PA
86382012-03-26 Pedro Alves <palves@redhat.com>
8639
8640 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8641
0afae3cf
PA
86422012-03-23 Pedro Alves <palves@redhat.com>
8643
8644 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8645 "library-list-svr4" element's start tag when the the DSO list is
8646 empty.
8647
485f1ee4
PA
86482012-03-23 Pedro Alves <palves@redhat.com>
8649
8650 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8651 a variable whose type size is the same as the inferior's pointer
8652 size.
8653
a5362b9a
TS
86542012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8655
8656 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8657 struct siginfo.
8658 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8659 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8660 * linux-low.h: Include <signal.h>.
8661 (struct siginfo): Remove forward declaration.
8662 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8663 struct siginfo.
8664
d226c142
MF
86652012-03-21 Mike Frysinger <vapier@gentoo.org>
8666
8667 * .gitignore: Ignore more files.
8668
122f36ef
PA
86692012-03-19 Pedro Alves <palves@redhat.com>
8670 Jan Kratochvil <jan.kratochvil@redhat.com>
8671
8672 * server.c (cont_thread, general_thread): Add describing comments.
8673 (start_inferior): Clear `cont_thread'.
8674 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8675 of a process.
8676
fc3e5175
YQ
86772012-03-15 Yao Qi <yao@codesourcery.com>
8678
8679 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8680 handling to ...
8681 (cmd_qtdp): ... here.
8682
8d0d92cd
YQ
86832012-03-15 Yao Qi <yao@codesourcery.com>
8684
8685 * tracepoint.c (struct tracepoint_action_ops): New.
8686 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8687 (m_tracepoint_action_download): New.
8688 (r_tracepoint_action_download): New.
8689 (x_tracepoint_action_download): New.
8690 (l_tracepoint_action_download): New.
8691 (add_tracepoint_action): Install `action->ops' according type.
8692 (download_tracepoint_1): Move code `download' function pointer
8693 of various tracepoint_action_ops.
8694
87b0bb13
JK
86952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8696
8697 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8698 linux_ptrace_attach_warnings.
8699
5f572dec
JK
87002012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8701
8702 * Makefile.in (linux-ptrace.o): New.
8703 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8704 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8705 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8706 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8707 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8708 of these targets.
8709 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8710
f4647387
YQ
87112012-03-08 Yao Qi <yao@codesourcery.com>
8712 Pedro Alves <palves@redhat.com>
8713
8714 Fix PR server/13392.
8715 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8716 offset of JMP insn.
8717 * tracepoint.c (remove_tracepoint): New.
8718 (cmd_qtdp): Call remove_tracepoint when failed to install.
8719
9b224c5e
PA
87202012-03-07 Pedro Alves <palves@redhat.com>
8721
8722 * linux-low.c (get_detach_signal): New.
8723 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8724 Pass on pending signals to PTRACE_DETACH. Check the result of the
8725 ptrace call.
8726 * server.c (program_signals, program_signals_p): New.
8727 (handle_general_set): Handle QProgramSignals.
8728 * server.h (program_signals, program_signals_p): Declare.
8729
e237a7e2
JK
87302012-03-05 Pedro Alves <palves@redhat.com>
8731 Jan Kratochvil <jan.kratochvil@redhat.com>
8732
8733 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8734 New comment why.
8735
5808517f
YQ
87362012-03-03 Yao Qi <yao@codesourcery.com>
8737
8738 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8739 agent_look_up_symbols.
8740
58b4daa5
YQ
87412012-03-03 Yao Qi <yao@codesourcery.com>
8742
8743 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8744 (linux-x86-low.o): Likewise.
8745 * server.h: Remove in_process_agent_loaded.
8746 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8747 common/agent.c.
8748 Update callers.
8749
8ffcbaaf
YQ
87502012-03-03 Yao Qi <yao@codesourcery.com>
8751
8752 * tracepoint.c (gdb_agent_capability): New global.
8753 (in_process_agent_loaded_ust): Renamed to
8754 `in_process_agent_supports_ust'.
8755 Update callers.
8756 (in_process_agent_supports_ust): Call agent_capability_check.
8757 (clear_installed_tracepoints): Assert that agent supports
8758 agent.
8759
d1feda86
YQ
87602012-03-03 Yao Qi <yao@codesourcery.com>
8761
8762 * linux-low.c (linux_supports_agent): New.
8763 (linux_target_ops): Initialize field `supports_agent' with
8764 linux_supports_agent.
8765 * target.h (struct target_ops) <supports_agent>: New.
8766 (target_supports_agent): New macro.
8767 * server.c (handle_general_set): Handle packet 'QAgent'.
8768 (handle_query): Send `QAgent+'.
8769 * Makefile.in (server.o): Depends on agent.h.
8770
2fa291ac
YQ
87712012-03-03 Yao Qi <yao@codesourcery.com>
8772
8773 * Makefile.in (OBS): Add agent.o.
8774 Add new rule for agent.o.
8775 Track dependence of tracepoint.c on agent.h.
8776 * tracepoint.c (run_inferior_command_1):
8777 (run_inferior_command): Call agent_run_command.
8778 (gdb_ust_connect_sync_socket): Deleted. Move it to
8779 common/agent.c.
8780 (resume_thread, stop_thread): Likewise.
8781 (gdb_ust_socket_init): Renamed to ...
8782 (gdb_agent_socket_init): ... New.
8783 (gdb_ust_thread): Renamed to ...
8784 (gdb_agent_helper_thread): ... New.
8785 (gdb_ust_init): Move some code to ...
8786 (gdb_agent_init): ... here. New.
8787 [HAVE_UST]: Call gdb_ust_init.
8788 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8789 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8790 * config.in, configure: Regenerated.
8791
05044653
PA
87922012-03-02 Pedro Alves <palves@redhat.com>
8793
8794 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8795 * linux-low.c (struct simple_pid_list): New.
8796 (stopped_pids): New a struct simple_pid_list pointer.
8797 (add_to_pid_list, pull_pid_from_list): New.
8798 (handle_extended_wait): Don't assume the first signal new children
8799 report is SIGSTOP. Adjust call to pull_pid_from_list.
8800 (linux_wait_for_lwp): Adjust.
8801
8d00225b
YQ
88022012-03-02 Yao Qi <yao@codesourcery.com>
8803
8804 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8805 debug log.
8806
19560ba5
YQ
88072012-03-02 Yao Qi <yao@codesourcery.com>
8808
8809 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8810 `stop_pc' and `tpoint'. Update caller.
8811
1faeff08
MR
88122012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8813
8814 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8815 * linux-low.c (use_linux_regsets): New macro.
8816 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8817 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8818 (linux_register_in_regsets): New function.
8819 (usr_fetch_inferior_registers): Skip registers covered by
8820 regsets.
8821 (usr_store_inferior_registers): Likewise.
8822 (usr_fetch_inferior_registers): New macro.
8823 (usr_store_inferior_registers): Likewise.
8824 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8825 (linux_store_registers): Likewise.
8826 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8827 prototype.
8828 (init_registers_mips64_dsp_linux): Likewise.
8829 (init_registers_mips_linux): New macro.
8830 (init_registers_mips_dsp_linux): Likewise.
8831 (mips_dsp_num_regs): Likewise.
8832 (DSP_BASE, DSP_CONTROL): New fallback macros.
8833 (mips_base_regs): New macro.
8834 (mips_regmap): Use it. Fix the size.
8835 (mips_dsp_regmap): New variable.
8836 (mips_dsp_regset_bitmap): Likewise.
8837 (mips_arch_setup): New function.
8838 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8839 than mips_regmap.
8840 (mips_cannot_store_register): Likewise.
8841 (the_low_target): Update .arch_setup, .num_regs and .regmap
8842 initializers. Add .regset_bitmap initializer.
8843 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8844 initializer.
8845 * linux-bfin-low.c (the_low_target): Likewise.
8846 * linux-cris-low.c (the_low_target): Likewise.
8847 * linux-crisv32-low.c (the_low_target): Likewise.
8848 * linux-ia64-low.c (the_low_target): Likewise.
8849 * linux-m32r-low.c (the_low_target): Likewise.
8850 * linux-m68k-low.c (the_low_target): Likewise.
8851 * linux-ppc-low.c (the_low_target): Likewise.
8852 * linux-s390-low.c (the_low_target): Likewise.
8853 * linux-sh-low.c (the_low_target): Likewise.
8854 * linux-sparc-low.c (the_low_target): Likewise.
8855 * linux-tic6x-low.c (the_low_target): Likewise.
8856 * linux-x86-low.c (the_low_target): Likewise.
8857 * linux-xtensa-low.c (the_low_target): Likewise.
8858 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8859 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8860 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8861 srv_xmlfiles.
8862 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8863 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8864
c03e6ccc
YQ
88652012-02-29 Yao Qi <yao@codesourcery.com>
8866 Pedro Alves <palves@redhat.com>
8867
8868 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8869 `step_over_finished' is true.
8870
644cebc9
PA
88712012-02-27 Pedro Alves <palves@redhat.com>
8872
8873 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8874 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8875
c14d7ab2
PA
88762012-02-27 Pedro Alves <palves@redhat.com>
8877
8878 PR server/9684
8879 * linux-low.c (pid_is_stopped): New.
8880 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8881
412c89dd
LM
88822012-02-25 Luis Machado <lgustavo@codesourcery.com>
8883
8884 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8885 of conditions.
8886
b745defe
MR
88872012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8888
8889 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8890
9f3a5c85
LM
88912012-02-24 Luis Machado <lgustavo@codesourcery>
8892
8893 * server.c (handle_query): Advertise support for target-side
8894 breakpoint condition evaluation.
8895 (process_point_options): New function.
8896 (process_serial_event): When inserting a breakpoint, check for
8897 a target-side condition that should be evaluated.
8898
8899 * mem-break.c: Include regcache.h and ax.h.
8900 (point_cond_list_t): New data structure.
8901 (breakpoint) <cond_list>: New field.
8902 (find_gdb_breakpoint_at): Make non-static.
8903 (delete_gdb_breakpoint_at): Clear any target-side
8904 conditions.
8905 (clear_gdb_breakpoint_conditions): New function.
8906 (add_condition_to_breakpoint): Likewise.
8907 (add_breakpoint_condition): Likewise.
8908 (gdb_condition_true_at_breakpoint): Likewise.
8909 (gdb_breakpoint_here): Return result directly instead
8910 of going through a local variable.
8911
8912 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8913 (clear_gdb_breakpoint_conditions): Likewise.
8914 (add_breakpoint_condition): Likewise.
8915 (gdb_condition_true_at_breakpoint): Likewise.
8916
8917 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8918 (need_step_over_p): Take target-side breakpoint condition into
8919 consideration.
8920
5e1dc496
LM
89212012-02-24 Luis Machado <lgustavo@codesourcery>
8922
8923 * server.h: Include tracepoint.h.
8924 (agent_mem_read, agent_get_trace_state_variable_value,
8925 agent_set_trace_state_variable_value,
8926 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8927 get_set_tsv_func_addr): New prototypes.
8928
8929 * ax.h: New include file.
8930 * ax.c: New source file.
8931
8932 * tracepoint.c: Include ax.h.
8933 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8934 agent_expr, eval_result_type): Move to ax.h.
8935 (parse_agent_expr): Rename to ...
8936 (gdb_parse_agent_expr): ... this, make it non-static and move
8937 to ax.h.
8938 (unparse_agent_expr) Rename to ...
8939 (gdb_unparse_agent_expr): ... this, make it non-static and move
8940 to ax.h.
8941 (eval_agent_expr): Rename to ...
8942 (eval_tracepoint_agent_expr): ... this.
8943 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8944 forward declarations.
8945 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8946 (agent_get_trace_state_variable_value): New function.
8947 (agent_set_trace_state_variable_value): New function.
8948 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8949 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8950 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8951 (condition_true_at_tracepoint): Likewise.
8952 (parse_agent_expr): Rename to ...
8953 (gdb_parse_agent_expr): ... this and move to ax.c.
8954 (unparse_agent_expr): Rename to ...
8955 (gdb_unparse_agent_expr): ... this and move to ax.c.
8956 (gdb_agent_op_name): Move to ax.c.
8957 (eval_agent_expr): Rename to ...
8958 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8959 and move to ax.c.
8960 (eval_tracepoint_agent_expr): New function.
8961 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8962 non-static.
5e1dc496
LM
8963 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8964 ax.c.
8965 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8966 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8967 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8968 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8969 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8970 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8971 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8972 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8973 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8974 (compile_bytecodes): Remove forward declaration.
8975 (is_goto_target): Move to ax.c.
8976 (compile_bytecodes): Move to ax.c and call
8977 agent_get_trace_state_variable_value (...) and
8978 agent_set_trace_state_variable_value (...).
8979
8980 * Makefile.in: Update ax.c and IPA dependencies.
8981
277e4e52
PA
89822012-02-24 Pedro Alves <palves@redhat.com>
8983
8984 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8985 (cmd_bigqtbuffer_circular): ... this. Only handle
8986 'QTBuffer:circular:'.
8987 (handle_tracepoint_general_set): Adjust.
8988
bf4c19f7
YQ
89892012-02-16 Yao Qi <yao@codesourcery.com>
8990
8991 * inferiors.c: Move code to ...
8992 * dll.c: .... here. New.
8993 * server.h: Declare clear_dlls.
8994 * Makefile.in (SFILES): Add dll.c.
8995 (OBS): Add dll.o
8996 (dll.o): New rule.
8997
d73f2619
YQ
89982012-02-11 Yao Qi <yao@codesourcery.com>
8999
9000 * server.c: (handle_monitor_command): Add a new parameter
9001 `own_buf'.
9002 (handle_query): Update caller.
9003
f8255c2a
JB
90042012-02-09 Joel Brobecker <brobecker@adacore.com>
9005
9006 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9007 * configure, config.in: Regenerate.
9008 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9009 is not defined.
9010
da84f473
PA
90112012-02-02 Pedro Alves <palves@redhat.com>
9012
9013 Try SIGKILL first, then PTRACE_KILL.
9014 * linux-low.c (linux_kill_one_lwp): New.
9015 (linux_kill_one_lwp): Rename to ...
9016 (kill_one_lwp_callback): ... this. Use the new
9017 linux_kill_one_lwp.
9018
e886a173
PA
90192012-02-02 Pedro Alves <palves@redhat.com>
9020
9021 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9022 inferior.
9023
be07f1a2
PA
90242012-01-27 Pedro Alves <palves@redhat.com>
9025
9026 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9027 (elf_64_file_p): Make static.
9028 (linux_pid_exe_is_elf_64_file): New.
9029 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9030 Delete declarations.
9031 (linux_pid_exe_is_elf_64_file): Declare.
9032 * linux-x86-low.c (x86_arch_setup): Use
9033 linux_pid_exe_is_elf_64_file.
9034
d8301ad1
JK
90352012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9036
9037 * linux-low.c (linux_wait_for_event_1): Rename to ...
9038 (linux_wait_for_event): ... here and merge it with former
9039 linux_wait_for_event - new variable wait_ptid, use it.
9040 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9041
01b17894
PA
90422012-01-23 Pedro Alves <palves@redhat.com>
9043
9044 * server.c (main): Avoid yet another case of infinite loop while
9045 detaching/killing after a longjmp.
9046
e825046f
JK
90472012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9048
9049 Code cleanup.
9050 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9051
b9e7b9c3
UW
90522012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9053
9054 * hostio.c (handle_readlink): New function.
9055 (handle_vFile): Call it to handle "vFile:readlink" packets.
9056
901f9912
UW
90572012-01-20 Pedro Alves <palves@redhat.com>
9058 Ulrich Weigand <ulrich.weigand@linaro.org>
9059
9060 * server.c (handle_v_requests): Only support vAttach and vRun to
9061 start multiple processes when in extended protocol mode.
9062
fc1ab1a0
PA
90632012-01-17 Pedro Alves <palves@redhat.com>
9064
9065 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9066 memalign plus mprotect to allocate the scratch buffer.
9067
7d5d4e98
PA
90682012-01-13 Pedro Alves <palves@redhat.com>
9069
9070 * server.c (attach_inferior): Clear `cont_thread'.
9071
f128d5e9
PA
90722012-01-13 Pedro Alves <palves@redhat.com>
9073
9074 * server.c (main): Avoid infinite loop while detaching/killing
9075 after a longjmp.
9076
06db92f0
DE
90772012-01-09 Doug Evans <dje@google.com>
9078
9079 * server.c (start_inferior): Set last_ptid in --wrapper case.
9080
32d92999
YQ
90812012-01-06 Yao Qi <yao@codesourcery.com>
9082
9083 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9084 defined.
9085 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9086
5e0a92a9
YQ
90872012-01-04 Yao Qi <yao@codesourcery.com>
9088
9089 * tracepoint.c (cmd_qtdp): Print debug message
9090 for static tracepoint.
9091
ae639e8c
YQ
90922012-01-04 Yao Qi <yao@codesourcery.com>
9093
9094 * tracepoint.c (trace_vdebug): Differentiate debug message
9095 between gdbserver and IPA.
9096
f72429c5
YQ
90972012-01-03 Yao Qi <yao@codesourcery.com>
9098
9099 * tracepoint.c (tracepoint_was_hit): Don't collect for
9100 static tracepoint.
9101
12c3e59c
JB
91022012-01-02 Joel Brobecker <brobecker@adacore.com>
9103
9104 * terminal.h: Reformat copyright header.
9105
67827812
JB
91062012-01-02 Joel Brobecker <brobecker@adacore.com>
9107
9108 * server.c (gdbserver_version): Update copyright year.
9109 * gdbreplay.c (gdbreplay_version): Likewise.
9110
3e52c33d
JK
91112011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9112
9113 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9114
9115 Revert:
9116 2011-12-18 Hui Zhu <teawater@gmail.com>
9117 * linux-low.c (linux_create_inferior): Save return value to ret.
9118
66f1260e
HZ
91192011-12-18 Hui Zhu <teawater@gmail.com>
9120
9121 * linux-low.c (linux_create_inferior): Save return value to ret.
9122
e77616d7
DE
91232011-12-16 Doug Evans <dje@google.com>
9124
e7b06c57
DE
9125 * linux-low.c (linux_create_inferior): If stdio connection,
9126 redirect stdin from /dev/null, stdout to stderr.
9127 * remote-utils.c (remote_is_stdio): New static global.
9128 (remote_connection_is_stdio): New function.
9129 (remote_prepare): Handle stdio connection.
9130 (remote_open): Ditto.
9131 (remote_close): Don't close stdin for stdio connections.
9132 (read_prim,write_prim): New functions. Replace all calls to
9133 read/write to these.
9134 * server.c (main): Watch for "-" argument. Move call to
9135 remote_prepare before start_inferior.
9136 * server.h (STDIO_CONNECTION_NAME): New macro.
9137 (remote_connection_is_stdio): Declare.
9138
e77616d7
DE
9139 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9140 in debugging output.
9141
82067193
YQ
91422011-12-15 Yao Qi <yao@codesourcery.com>
9143
9144 * tracepoint.c: Include sys/syscall.h.
9145 (gdb_ust_thread): Remove preprocessor conditional.
9146
82bfbe7e
PA
91472011-12-14 Pedro Alves <pedro@codesourcery.com>
9148
9149 * linux-low.c (linux_detach_one_lwp): Call
9150 the_low_target.prepare_to_resume before detaching.
9151
712c6575
YQ
91522011-12-14 Yao Qi <yao@codesourcery.com>
9153
9154 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9155 of write.
9156
d54d1edf
YQ
91572011-12-14 Yao Qi <yao@codesourcery.com>
9158
9159 * i386-low.c (i386_low_stopped_data_address): Initialize local
9160 variable `control'.
9161
6210a125
PA
91622011-12-13 Pedro Alves <pedro@codesourcery.com>
9163
9164 PR remote/13492
9165
9166 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9167 DR_CONTROL unless necessary. Extend comments.
9168 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9169 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9170
2ece8244
YQ
91712011-12-13 Yao Qi <yao@codesourcery.com>
9172
9173 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9174 macros.
9175 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9176
784867a5
JK
91772011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9178
9179 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9180 Print new debug message for such case.
9181
6bf36717
JK
91822011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9183
9184 Fix overlapping memcpy.
9185 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9186 the read_inferior_memory transfer.
9187 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9188 write_inferior_memory transfer.
9189 (set_fast_tracepoint_jump): New variable buf. Use it for the
9190 read_inferior_memory and write_inferior_memory transfers.
9191 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9192 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9193 Use it for the write_inferior_memory transfer.
9194 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9195 buffers.
9196
50275556
MR
91972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9198
9199 * linux-low.c (fetch_register, store_register): Make code
9200 consistent, fix formatting.
9201
7325beb4
MR
92022011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9203
9204 * linux-low.c (usr_store_inferior_registers): Factor out code
9205 to handle individual registers into...
9206 (store_register): ... this new function.
9207
c642a434
UW
92082011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9209
9210 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9211 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9212 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9213 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9214 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9215 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9216 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9217 (srv_xmlfiles): Add new XML files.
9218
9219 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9220 and <sys/uio.h>.
9221 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9222 (init_registers_s390_linux32v1): Add prototype.
9223 (init_registers_s390_linux32v2): Likewise.
9224 (init_registers_s390_linux64v1): Likewise.
9225 (init_registers_s390_linux64v2): Likewise.
9226 (init_registers_s390x_linux64v1): Likewise.
9227 (init_registers_s390x_linux64v2): Likewise.
9228 (s390_num_regs): Increment to 52.
9229 (s390_regmap): Add orig_r2 register.
9230 (s390_num_regs_3264): Increment to 68.
9231 (s390_regmap_3264): Add orig_r2 register.
9232 (s390_collect_ptrace_register): Handle orig_r2 register.
9233 (s390_supply_ptrace_register): Likewise.
9234 (s390_fill_last_break): New function.
9235 (s390_store_last_break): Likewise.
9236 (s390_fill_system_call): New function.
9237 (s390_store_system_call): Likewise.
9238 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9239 register sets.
9240 (s390_check_regset): New function.
9241 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9242 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9243 Update target_regsets for available register sets.
9244
2268b414
JK
92452011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9246 Jan Kratochvil <jan.kratochvil@redhat.com>
9247
9248 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9249 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9250 New.
9251 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9252 * linux-low.h (struct process_info_private): New member r_debug.
9253 * server.c (handle_qxfer_libraries): Call
9254 the_target->qxfer_libraries_svr4.
9255 (handle_qxfer_libraries_svr4): New function.
9256 (qxfer_packets): New entry "libraries-svr4".
9257 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9258 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9259 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9260 PACKET_qXfer_libraries_svr4.
9261
d6db1fab
UW
92622011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9263
9264 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9265 PSW address/mask between 8-byte and 16-byte formats.
9266 (s390_supply_ptrace_register): Likewise.
9267 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9268 basic addressing mode bit.
9269
242f5f1c
SS
92702011-11-24 Stan Shebs <stan@codesourcery.com>
9271
9272 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9273
f196051f
SS
92742011-11-17 Stan Shebs <stan@codesourcery.com>
9275
9276 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9277 (tracing_start_time): New global.
9278 (tracing_stop_time): New global.
9279 (tracing_user_name): New global.
9280 (tracing_notes): New global.
9281 (tracing_stop_note): New global.
9282 (cmd_qtstart): Set traceframe_usage, start_time.
9283 (stop_tracing): Set stop_time.
9284 (cmd_qtstatus): Report additional status.
9285 (cmd_qtp): New function.
9286 (handle_tracepoint_query): Call it.
9287 (cmd_qtnotes): New function.
9288 (handle_tracepoint_general_set): Call it.
9289 (get_timestamp): Rename from tsv_get_timestamp.
9290
405f8e94
SS
92912011-11-14 Stan Shebs <stan@codesourcery.com>
9292 Kwok Cheung Yeung <kcy@codesourcery.com>
9293
9294 * linux-x86-low.c (small_jump_insn): New.
9295 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9296 trampoline and error message, build a trampoline and issue a small
9297 jump instruction to it.
9298 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9299 trampoline and error message.
9300 (x86_get_min_fast_tracepoint_insn_len): New.
9301 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9302 * linux-low.h (struct linux_target_ops): Add arguments to
9303 install_fast_tracepoint_jump_pad operation, add new operation.
9304 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9305 arguments.
9306 (linux_get_min_fast_tracepoint_insn_len): New function.
9307 (linux_target_op): Add new operation.
9308 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9309 (gdb_trampoline_buffer_end): Ditto.
9310 (gdb_trampoline_buffer_error): Ditto.
9311 (struct ipa_sym_addresses): Add fields for new IPA variables.
9312 (symbol_list): Add entries for new IPA variables.
9313 (struct tracepoint): Add fields to hold the address range of the
9314 trampoline used by the tracepoint.
9315 (trampoline_buffer_head): New static variable.
9316 (trampoline_buffer_tail): Ditto.
9317 (claim_trampoline_space): New function.
9318 (have_fast_tracepoint_trampoline_buffer): New function.
9319 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9320 structure.
9321 (install_fast_tracepoint): Ditto, also add error buffer argument.
9322 (cmd_qtminftpilen): New function.
9323 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9324 (fast_tracepoint_from_trampoline_address): New function.
9325 (fast_tracepoint_collecting): Handle trampoline as part of jump
9326 pad space.
9327 (set_trampoline_buffer_space): New function.
9328 (initialize_tracepoint): Initialize new IPA variables.
9329 * target.h (struct target_ops): Add arguments to
9330 install_fast_tracepoint_jump_pad operation, add new
9331 get_min_fast_tracepoint_insn_len operation.
9332 (target_get_min_fast_tracepoint_insn_len): New.
9333 (install_fast_tracepoint_jump_pad): Add arguments.
9334 * server.h (IPA_BUFSIZ): Define.
9335 * linux-i386-ipa.c: Include extra header files.
9336 (initialize_fast_tracepoint_trampoline_buffer): New function.
9337 (initialize_low_tracepoint): Call it.
9338 * server.h (set_trampoline_buffer_space): Declare.
9339 (claim_trampoline_space): Ditto.
9340 (have_fast_tracepoint_trampoline_buffer): Ditto.
9341
1e4d1764
YQ
93422011-11-14 Yao Qi <yao@codesourcery.com>
9343
9344 * server.c (handle_query): Handle InstallInTrace for qSupported.
9345 * tracepoint.c (add_tracepoint): Sort list.
9346 (install_tracepoint, download_tracepoint): New.
9347 (cmd_qtdp): Call them to install and download tracepoints.
9348 (sort_tracepoints): Removed.
9349 (cmd_qtstart): Update.
9350
5c73ff4e
YQ
93512011-11-14 Yao Qi <yao@codesourcery.com>
9352
9353 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9354 * mem-break.h: Declare.
9355 * tracepoint.c (cmd_qtstart): Move some code to ...
9356 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9357 New.
9358 (download_tracepoints): Move some code to ...
9359 (download_tracepoint_1): ... here. New.
9360
86a30030
YQ
93612011-11-08 Yao Qi <yao@codesourcery.com>
9362
9363 * remote-utils.c (relocate_instruction): A comment fix.
9364
8d26e50c
JB
93652011-11-07 Joel Brobecker <brobecker@adacore.com>
9366
9367 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9368 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9369 dr_status_mirror and dr_control_mirror from debug_reg_state.
9370 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9371 (i386_initial_stuff): Remove use of deleted globals.
9372 (i386_get_thread_context, i386_set_thread_context,
9373 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9374 from debug_reg_state.
9375
a59306a3
YQ
93762011-11-05 Yao Qi <yao@codesourcery.com>
9377
9378 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9379 address as TPOINT's.
9380
3065dfb6
SS
93812011-11-02 Stan Shebs <stan@codesourcery.com>
9382
9383 * tracepoint.c (agent_mem_read_string): New function.
9384 (eval_agent_expr): Call it for tracenz.
9385 * server.c (handle_query): Report support for tracenz.
9386
fd0d8c7c
YQ
93872011-11-02 Yao Qi <yao@codesourcery.com>
9388
9389 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9390
609086b1
YQ
93912011-11-02 Yao Qi <yao@codesourcery.com>
9392
9393 * target.h: Fix a typo in comment.
9394
b9fd1791
PA
93952011-10-31 Pedro Alves <pedro@codesourcery.com>
9396
9397 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9398 clobber the breakpoints' shadows with fast tracepoint jumps.
9399 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9400 * target.c (write_inferior_memory): Also pass MYADDR down to
9401 check_mem_write.
9402
03583c20
UW
94032011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9404
9405 * configure.ac: Check support for personality routine.
9406 * configure: Regenerate.
9407 * config.in: Likewise.
9408 * linux-low.c: Include <sys/personality.h>.
9409 Define ADDR_NO_RANDOMIZE if necessary.
9410 (linux_create_inferior): Disable address space randomization when
9411 forking inferior, if requested.
9412 (linux_supports_disable_randomization): New function.
9413 (linux_target_ops): Install it.
9414 * server.h (disable_randomization): Declare.
9415 * server.c (disable_randomization): New global variable.
9416 (handle_general_set): Handle QDisableRandomization.
9417 (handle_query): Likewise for qSupported.
9418 (main): Support --disable-randomization and --no-disable-randomization
9419 command line arguments.
9420 * target.h (struct target_ops): Add supports_disable_randomization.
9421 (target_supports_disable_randomization): New macro.
9422
723b724b
MF
94232011-09-29 Mike Frysinger <vapier@gentoo.org>
9424
9425 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9426 ifdef check.
9427 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9428 [!PT_GETDSBT] (target_loadmap): New definition.
9429 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9430 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9431 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9432 and PT_GETDSBT to LINUX_LOADMAP.
9433 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9434 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9435
55329a5c 94362011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9437
9438 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9439 (arm_linux_hwbp_cap): New static variable.
9440 (arm_linux_get_hwbp_cap): Replace by ...
9441 (arm_linux_init_hwbp_cap): ... this new function.
9442 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9443 (arm_linux_get_hw_watchpoint_count): Likewise.
9444 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9445 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9446 (arm_prepare_to_resume): Use perror_with_name instead of error.
9447
55329a5c 94482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9449
9450 * linux-arm-low.c: Include <signal.h>.
9451 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9452 (struct arm_linux_hwbp_cap): New data type.
9453 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9454 (struct arm_linux_hw_breakpoint): New data type.
9455 (MAX_BPTS, MAX_WPTS): Define.
9456 (struct arch_process_info, struct arch_lwp_info): New data types.
9457 (arm_linux_get_hwbp_cap): New function.
9458 (arm_linux_get_hw_breakpoint_count): Likewise.
9459 (arm_linux_get_hw_watchpoint_count): Likewise.
9460 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9461 (arm_hwbp_control_initialize): Likewise.
9462 (arm_hwbp_control_is_enabled): Likewise.
9463 (arm_hwbp_control_is_initialized): Likewise.
9464 (arm_hwbp_control_disable): Likewise.
9465 (arm_linux_hw_breakpoint_equal): Likewise.
9466 (arm_linux_hw_point_initialize): Likewise.
9467 (struct update_registers_data): New data structure.
9468 (update_registers_callback: New function.
9469 (arm_insert_point): Likewise.
9470 (arm_remove_point): Likewise.
9471 (arm_stopped_by_watchpoint): Likewise.
9472 (arm_stopped_data_address): Likewise.
9473 (arm_new_process): Likewise.
9474 (arm_new_thread): Likewise.
9475 (arm_prepare_to_resume): Likewise.
9476 (the_low_target): Register arm_insert_point, arm_remove_point,
9477 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9478 arm_new_thread, and arm_prepare_to_resume.
9479
6b9801d4
SS
94802011-09-15 Stan Shebs <stan@codesourcery.com>
9481
9482 * server.h (struct emit_ops): Add compare-goto fields.
9483 * tracepoint.c (gdb_agent_op_sizes): New table.
9484 (emit_eq_goto): New function.
9485 (emit_ne_goto): New function.
9486 (emit_lt_goto): New function.
9487 (emit_le_goto): New function.
9488 (emit_gt_goto): New function.
9489 (emit_ge_goto): New function.
9490 (is_goto_target): New function.
9491 (compile_bytecodes): Recognize special cases of compare-goto
9492 combinations and call specialized emitters for them.
9493 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9494 (amd64_emit_ne_goto): New function.
9495 (amd64_emit_lt_goto): New function.
9496 (amd64_emit_le_goto): New function.
9497 (amd64_emit_gt_goto): New function.
9498 (amd64_emit_ge_goto): New function.
9499 (amd64_emit_ops): Add the new functions.
9500 (i386_emit_eq_goto): New function.
9501 (i386_emit_ne_goto): New function.
9502 (i386_emit_lt_goto): New function.
9503 (i386_emit_le_goto): New function.
9504 (i386_emit_gt_goto): New function.
9505 (i386_emit_ge_goto): New function.
9506 (i386_emit_ops): Add the new functions.
9507
bf15cbda
SS
95082011-09-08 Stan Shebs <stan@codesourcery.com>
9509
9510 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9511 (i386_emit_epilogue): Restore %ebx.
9512
943ca1dd
JZ
95132011-08-31 Jie Zhang <jzhang918@gmail.com>
9514
9515 * server.c (step_thread): Remove definition.
9516 (process_serial_event): Don't handle Hs.
9517 * server.h (step_thread): Remove declaration.
9518 * target.c (set_desired_inferior): Remove use of step_thread.
9519
e3deef73
LM
95202011-08-24 Luis Machado <lgustavo@codesourcery.com>
9521
9522 * linux-low.c: Include linux-procfs.h.
9523 (linux_attach_lwp_1): Update comments.
9524 (linux_attach): Scan for existing threads when attaching to a
9525 process that is the tgid.
9526 * Makefile.in: Update dependencies.
9527
13da1c97
LM
95282011-08-24 Luis Machado <lgustavo@codesourcery.com>
9529
9530 * configure.srv: Add linux-procfs.o dependencies.
9531
881127c9
YQ
95322011-08-14 Yao Qi <yao@codesourcery.com>
9533
9534 * target.h (struct target_ops): Fix indent.
9535 * win32-low.c (win32_target_ops): Fix comment.
9536
58dbd541
YQ
95372011-08-14 Andrew Jenner <andrew@codesourcery.com>
9538 Yao Qi <yao@codesourcery.com>
9539
9540 * Makefile.in (clean): Remove tic6x-*.c files.
9541 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9542 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9543 (tic6x-c64xp-linux.c): Likewise.
9544 * configure.srv: Add support for tic6x-*-uclinux.
9545 * linux-tic6x-low.c: New.
9546 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9547
78d85199
YQ
95482011-08-14 Andrew Stubbs <ams@codesourcery.com>
9549 Yao Qi <yao@codesourcery.com>
9550
9551 * target.h (struct target_ops): Add read_loadmap.
9552 * linux-low.c (struct target_loadseg): New type.
9553 (struct target_loadmap): New type.
9554 (linux_read_loadmap): New function.
9555 (linux_target_ops): Add linux_read_loadmap.
9556 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9557 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9558 to NULL.
78d85199 9559
a959a88d
EZ
95602011-08-05 Eli Zaretskii <eliz@gnu.org>
9561
9562 * win32-low.c: Include <stdint.h>.
9563
1ced966e
PA
95642011-07-22 Pedro Alves <pedro@codesourcery.com>
9565
9566 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9567 to the inferior here.
9568 (i386_remove_aligned_watchpoint): Ditto.
9569 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9570 fit part of the watchpoint in the debug registers.
9571 (i386_update_inferior_debug_regs): New.
9572 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9573 registers, and only update the inferior on success.
9574 (i386_low_remove_watchpoint): Ditto.
9575
d26e3629
KY
95762011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9577
9578 * linux-low.c (compare_ints, unique, list_threads, show_process,
9579 linux_core_of_thread): Delete.
9580 (linux_target_ops): Change linux_core_of_thread to
9581 linux_common_core_of_thread.
9582 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9583 * utils.c (malloc_failure): Change type of argument.
9584 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9585 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9586 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9587 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9588 (IPA_OBJS): Add common-utils-ipa.o.
9589 (ptid_h, linux_osdata_h): New macros.
9590 (server_h): Add common/common-utils.h, common/xml-utils.h,
9591 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9592 common/ptid.h.
9593 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9594 ptid.o, buffer.o): New rules.
9595 (linux-low.o): Add common/linux-osdata.h as a dependency.
9596 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9597 * configure.ac: Add AC_HEADER_DIRENT check.
9598 * config.in: Regenerate.
9599 * configure: Regenerate.
9600 * remote-utils.c (xml_escape_text): Delete.
9601 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9602 buffer_xml_printf): Move to common/buffer.c.
9603 * server.c (main): Remove call to initialize_inferiors.
9604 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9605 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9606 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9607 internal_error, gdb_assert, gdb_assert_fail): Delete.
9608 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9609 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9610 common/buffer.h.
9611 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9612 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9613 initialize_inferiors): Delete.
9614
2275a1a7
PA
96152011-07-20 Pedro Alves <pedro@codesourcery.com>
9616
9617 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9618 symbol error.
9619
0a5b1e09
PA
96202011-05-31 Pedro Alves <pedro@codesourcery.com>
9621
9622 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9623 assertion.
9624 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9625
6938fd34
YQ
96262011-05-26 Yao Qi <yao@codesourcery.com>
9627
9628 * Makefile.in (thread-db.o): Track dependence to
9629 common/gdb_thread_db.h.
9630 * thread-db.c: include gdb_thread_db.h from right place.
9631
b481f9e0
TT
96322011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9633
9634 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9635 __FILE__ and __LINE__ to internal_error.
9636
98a5dd13
DE
96372011-05-13 Doug Evans <dje@google.com>
9638
9639 * thread-db.c (try_thread_db_load_from_sdir): New function.
9640 (try_thread_db_load_from_dir): New function.
9641 (thread_db_load_search): Handle $sdir, ignore $pdir.
9642 Remove trying of system directories if search of
9643 libthread-db-search-path fails, that is now done via $sdir.
9644
d248b706
KY
96452011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9646
9647 * server.c (handle_query): Add EnableDisableTracepoints to the list
9648 of supported features.
43aaf8b6 9649 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9650 tracepoints.
43aaf8b6
PA
9651 (cmd_qtenable_disable): New.
9652 (cmd_qtstart): Install tracepoints even if disabled.
9653 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9654 receiving a QTEnable or QTDisable packet.
9655 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9656 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9657 tracepoints.
9658 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9659
84e578fb
DE
96602011-05-10 Doug Evans <dje@google.com>
9661
9662 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9663
71f55dd8
DE
96642011-05-04 Doug Evans <dje@google.com>
9665
9666 * linux-low.c (linux_join): Skip process lookup.
9667 * spu-low.c (spu_join): Ditto.
9668 * server.c (join_inferiors_callback): Delete.
9669 (process_serial_event): For 'D' packet (detach) call join_inferior
9670 directly.
9671
4d393d60
JM
96722011-05-04 Joseph Myers <joseph@codesourcery.com>
9673
9674 * README: Don't mention xscale*-*-linux*.
9675 * configure.srv (xscale*-*-linux*): Don't handle target.
9676
b00ad6ff
NF
96772011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9678
9679 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9680 casting pointers.
9681 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9682 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9683 (i386_emit_void_call_2): Likewise.
9684
af96c192
YQ
96852011-04-26 Yao Qi <yao@codesourcery.com>
9686
43aaf8b6
PA
9687 * linux-low.c: Move common macros to linux-ptrace.h.
9688 Include linux-ptrace.h.
af96c192
YQ
9689 * Makefile.in (linux_ptrace_h): New.
9690 (linux-low.o): Depends on linux-ptrace.h.
9691
03f2bd59
JK
96922011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9693
9694 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9695 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9696 (remote_prepare): New function with most of the TCP code from ...
9697 (remote_open): ... here. Detect PORT here unconditionally. Move also
9698 setting transport_is_reliable.
9699 * server.c (run_once): New variable.
9700 (gdbserver_usage): Document it.
9701 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9702 the first run if RUN_ONCE.
9703 * server.h (run_once, remote_prepare): New declarations.
9704
7a9dd1b2
TT
97052011-04-19 Tom Tromey <tromey@redhat.com>
9706
9707 * win32-low.c (handle_load_dll): Remove duplicate "the".
9708
81239425
PM
97092011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9710
9711 Remove support for old Cygwin 1.5 versions.
9712 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9713 function to avoid warning.
9714 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9715 warning.
9716
9e0627f1
PM
97172011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9718
9719 * gdbserver/server.h (Macro _): Define it if not available.
9720
588eebee
MS
97212011-03-14 Michael Snyder <msnyder@vmware.com>
9722
348af9f7 9723 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9724
43f70d4c
JB
97252011-03-10 Joel Brobecker <brobecker@adacore.com>
9726
9727 * Makefile.in (maintainer-clean realclean distclean): Remove
9728 "make ... subdir_do" command.
9729
348af9f7
MS
97302011-03-10 Michael Snyder <msnyder@vmware.com>
9731
9732 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9733
9734 * server.c (handle_v_run): Free alloced buffer on early return.
9735
e637a4f5
YQ
97362011-03-09 Yao Qi <yao@codesourcery.com>
9737
9738 Revert:
9739 2011-03-04 Yao Qi <yao@codesourcery.com>
9740
9741 * Makefile.in: Remove GNU make feature --directory.
9742
9743 2011-03-05 Yao Qi <yao@codesourcery.com>
9744
9745 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9746 (subdir_do): New make target. Copied from gdb/Makefile.
9747 (maintainer-clean, realclean, distclean, clean): Call corresponding
9748 make targets in common/Makefile.
9749
9750 2011-02-11 Yao Qi <yao@codesourcery.com>
9751
9752 * configure.ac: Call AC_PROG_RANLIB.
9753 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9754 * configure: Regenerate.
9755
e6edda56
JK
97562011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9757
9758 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9759
e5141119
JB
97602011-03-06 Yao Qi <yao@codesourcery.com>
9761
9762 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9763
64794aa4
JB
97642011-03-05 Yao Qi <yao@codesourcery.com>
9765
9766 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9767 (subdir_do): New make target. Copied from gdb/Makefile.
9768 (maintainer-clean, realclean, distclean, clean): Call corresponding
9769 make targets in common/Makefile.
9770
7a762829
YQ
97712011-03-04 Yao Qi <yao@codesourcery.com>
9772
9773 * Makefile.in: Remove GNU make feature --directory.
9774
348af9f7
MS
97752011-03-04 Michael Snyder <msnyder@vmware.com>
9776
9777 * server.c (queue_stop_reply): Call xmalloc not malloc.
9778
97792011-03-02 Michael Snyder <msnyder@vmware.com>
9780
9781 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9782
9f72fee2
MS
97832011-02-28 Michael Snyder <msnyder@vmware.com>
9784
588eebee
MS
9785 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9786 (cmd_qtframe): Ditto.
9787 (cmd_qtbuffer): Ditto.
9788 (cmd_bigqtbuffer): Ditto.
9789
9f72fee2
MS
9790 * utils.c (decimal2str): Initialize 'width' to nine, then
9791 don't mess with it.
9792
8040bd49
UW
97932011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9794
9795 * hostio.c (require_data): Free *data, not data.
9796
7e52cbd0
JK
97972011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9798
9799 * hostio.c (require_data): Use free, not xfree.
9800
9130f83e
MS
98012011-02-27 Michael Snyder <msnyder@vmware.com>
9802
4b812f4e
MS
9803 * server.c (handle_query): Discard unused value.
9804
9130f83e
MS
9805 * hostio.c (require_data): Free malloc memory before returning
9806 error.
9807
69d37113
MS
98082011-02-26 Michael Snyder <msnyder@vmware.com>
9809
9810 * linux-low.c (list_threads): Call closedir for dirent.
9811
35f5825a
MS
98122011-02-27 Michael Snyder <msnyder@vmware.com>
9813
2a589cef
MS
9814 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9815 a case statement falls through.
9816
0adea5f7
MS
9817 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9818
35f5825a
MS
9819 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9820 in comparison.
9821
238f1c74
MS
98222011-02-26 Michael Snyder <msnyder@vmware.com>
9823
9824 * utils.c (decimal2str): Eliminate dead code and dead param.
9825 (pulongest): Drop dead param from call to decimal2str.
9826 (plongest): Ditto.
9827
633ff500
JB
98282011-02-24 Joel Brobecker <brobecker@adacore.com>
9829
9830 Revert the following patch (not approved yet):
9831 2011-02-21 Hui Zhu <teawater@gmail.com>
9832 * tracepoint.c (tp_printf): New function.
9833 (eval_agent_expr): Handle gdb_agent_op_printf.
9834
f9c6ff72
HZ
98352011-02-21 Hui Zhu <teawater@gmail.com>
9836
9837 * tracepoint.c (tp_printf): New function.
9838 (eval_agent_expr): Handle gdb_agent_op_printf.
9839
94d5e490
TT
98402011-02-18 Tom Tromey <tromey@redhat.com>
9841
9842 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9843 (tracepoint.o): Likewise.
9844 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9845 (gdb_agent_op_names): Likewise.
9846
c7f96d2b
TT
98472011-02-18 Tom Tromey <tromey@redhat.com>
9848
9849 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9850 gdb_agent_op_rot>: New constants.
9851 (gdb_agent_op_names): Add pick and roll.
9852 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9853 cases.
9854
0feedb2c
JK
98552011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9856
9857 * aclocal.m4: Regenerated with aclocal-1.11.1.
9858
b3b9301e
PA
98592011-02-14 Pedro Alves <pedro@codesourcery.com>
9860
9861 * server.c (handle_qxfer_traceframe_info): New.
9862 (qxfer_packets): Register "traceframe-info".
9863 (handle_query): Report support for qXfer:traceframe-info:read+.
9864 * tracepoint.c (match_blocktype): New.
9865 (traceframe_find_block_type): Rename to ...
9866 (traceframe_walk_blocks): ... this. Add callback filter argument,
9867 and use it.
9868 (traceframe_find_block_type): New, reimplemented on top of
9869 traceframe_walk_blocks.
9870 (build_traceframe_info_xml): New.
9871 (traceframe_read_info): New.
9872 * server.h (traceframe_read_info): Declare.
9873
4f3e6fb7
YQ
98742011-02-11 Yao Qi <yao@codesourcery.com>
9875
9876 * configure.ac: Call AC_PROG_RANLIB.
9877 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9878 * configure: Regenerate.
9879
764880b7
PA
98802011-02-07 Pedro Alves <pedro@codesourcery.com>
9881
9882 * server.c (gdb_read_memory): Change return semantics to allow
9883 partial transfers.
9884 (handle_search_memory_1): Adjust.
9885 (process_serial_event) <'m' packet>: Handle partial transfers.
9886 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9887
1c79eb8a
PA
98882011-01-28 Pedro Alves <pedro@codesourcery.com>
9889
9890 * regcache.c (init_register_cache): Initialize
9891 regcache->register_status.
9892 (free_register_cache): Release regcache->register_status.
9893 (regcache_cpy): Copy register_status.
9894 (registers_to_string): Print 'x's for unavailable registers.
9895 (supply_register): Mark the register's status valid or
9896 unavailable, depending on whether a buffer was passed in or not.
9897 (supply_register_zeroed): New.
9898 (supply_regblock): Mark the registers' status valid or
9899 unavailable, depending on whether a buffer was passed in or not.
9900 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9901 (struct regcache): New `register_status' field.
9902 (supply_register_zeroed): Declare.
9903 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9904 supply_register_zeroed, rather than passing a NULL buffer to
9905 supply_register.
9906 * tracepoint.c (fetch_traceframe_registers): Update comment.
9907
85724a0e
PA
99082011-01-28 Pedro Alves <pedro@codesourcery.com>
9909
9910 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9911 buffer explicit.
9912
d08aafef
PA
99132011-01-25 Pedro Alves <pedro@codesourcery.com>
9914
9915 * server.h (decode_xfer_write): Change prototype.
9916 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9917 and don't extract the annex here.
9918 * server.c (decode_xfer_read): Remove `annex' parameter,
9919 and don't extract the annex here.
9920 (decode_xfer): New.
9921 (struct qxfer): New.
9922 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9923 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9924 (handle_qxfer_statictrace): New functions, abstracted out from
9925 handle_query, and made to use the struct qxfer interface.
9926 (handle_threads_qxfer_proper): Rename to ...
9927 (handle_qxfer_threads_proper): ... this.
9928 (handle_threads_qxfer): Rename to ...
9929 (handle_qxfer_threads): ... this. Adjust.
9930 (qxfer_packets): New array.
9931 (handle_qxfer): New function.
9932 (handle_query): Use handle_qxfer.
9933
493e2a69
MS
99342011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9935
9936 * gdbreplay.c: Shorten lines of >= 80 columns.
9937 * linux-low.c: Ditto.
9938 * linux-ppc-low.c: Ditto.
9939 * linux-s390-low.c: Ditto.
9940 * linux-sparc-low.c: Ditto.
9941 * linux-x86-low.c: Ditto.
9942 * linux-xtensa-low.c: Ditto.
9943 * mem-break.c: Ditto.
9944 * nto-low.c: Ditto.
9945 * regcache.h: Ditto.
9946 * remote-utils.c: Ditto.
9947 * server.c: Ditto.
9948 * server.h: Ditto.
9949 * thread-db.c: Ditto.
9950 * tracepoint.c: Ditto.
9951 * utils.c: Ditto.
9952 * win32-low.h: Ditto.
9953
44944448
JB
99542011-01-05 Joel Brobecker <brobecker@adacore.com>
9955
9956 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9957 update.
9958
71ce852c
JB
99592011-01-01 Joel Brobecker <brobecker@adacore.com>
9960
9961 * server.c (gdbserver_version): Update copyright year in version
9962 output.
9963 * gdbreplay.c (gdbreplay_version): Ditto.
9964
eb826dc6
MF
99652010-12-29 Jie Zhang <jie.zhang@analog.com>
9966
9967 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9968 * linux-bfin-low.c: New file.
9969 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9970 PT_DATA_ADDR for BFIN targets.
9971 * Makefile.in (SFILES): Add linux-bfin-low.c.
9972 (clean): Remove reg-bfin.c.
9973 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9974 * README: Mention supported Blackfin targets.
9975
39ab222a
MF
99762010-12-23 Mike Frysinger <vapier@gentoo.org>
9977
9978 * .gitignore: New file.
9979
a1f2ce7d
MF
99802010-11-16 Mike Frysinger <vapier@gentoo.org>
9981
9982 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9983
f474844c
JZ
99842010-10-22 Jie Zhang <jie@codesourcery.com>
9985
9986 * Makefile.in: Add FLAGS_TO_PASS variable.
9987 (install): Remove dependency of install-only and recursively
9988 invoke make for install-only.
9989
f1048712
DE
99902010-10-04 Doug Evans <dje@google.com>
9991
9992 * Makefile.in (uninstall): Use $(DESTDIR).
9993
b53a1623
PA
99942010-09-24 Pedro Alves <pedro@codesourcery.com>
9995
e6ee044d
PA
9996 PR gdb/11842
9997
b53a1623
PA
9998 * linux-x86-low.c (compat_siginfo_from_siginfo)
9999 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10000 si_code is < 0. Check for si_code == SI_TIMER before checking for
10001 si_code < 0.
10002
fa1bd1e4
JB
100032010-09-13 Joel Brobecker <brobecker@adacore.com>
10004
10005 * lynx-i386-low.c: New file.
10006 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10007
47fac8f8
JB
100082010-09-13 Joel Brobecker <brobecker@adacore.com>
10009
10010 * lynx-low.c (ptrace_request_to_str): Remove handling for
10011 request values that have been removed in LynxOS 5.x.
10012
1adfc54d
JB
100132010-09-13 Joel Brobecker <brobecker@adacore.com>
10014
10015 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10016 <ptrace.h>
10017
c2a66c29
NS
100182010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10019
10020 * configure.ac: Add --enable-inprocess-agent option.
10021 * configure: Rebuilt.
10022
32fcada3
YQ
100232010-09-06 Yao Qi <yao@codesourcery.com>
10024
10025 * linux-low.c (linux_kill): Remove unused variable.
10026 (linux_stabilize_threads): Likewise.
10027 * server.c (start_inferior): Likewise.
10028 (queue_stop_reply_callback): Likewise.
10029 * tracepoint.c (do_action_at_tracepoint): Likewise.
10030
0cccb683
YQ
100312010-09-06 Yao Qi <yao@codesourcery.com>
10032
10033 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10034 on return.
10035
423ec54c
JK
100362010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10037
10038 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10039
12ac6819
PA
100402010-09-06 Pedro Alves <pedro@codesourcery.com>
10041
10042 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10043 "$(IPA_DEPFILES)".
10044
8ed54b31
JB
100452010-09-01 Joel Brobecker <brobecker@adacore.com>
10046
10047 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10048 gdbserver/lynx-ppc-low.c: New files.
10049 * Makefile.in (lynx_low_h): New variable.
10050 (lynx-low.o, lynx-ppc-low.o): New rules.
10051 * configure.ac: On LynxOS, link with -lnetinet.
10052 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10053 * configure: regenerate.
10054
bb0116a4
JB
100552010-09-01 Joel Brobecker <brobecker@adacore.com>
10056
10057 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10058 * configure.ac: Add check for vasprintf and vsnprintf.
10059 * configure, config.in: Regenerate.
10060 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10061
a778ab81 100622010-09-01 Joel Brobecker <brobecker@adacore.com>
10063
10064 * gdbreplay.c: Move include of alloca.h up, next to include of
10065 malloc.h.
10066 * server.h: Add include of malloc.h.
10067 * mem-break.c: Remove include of malloc.h.
10068 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10069
8b034a19 100702010-09-01 Joel Brobecker <brobecker@adacore.com>
10071
10072 * Makefile.in (memmem.o): Build with -Wno-error.
10073
100742010-09-01 Joel Brobecker <brobecker@adacore.com>
10075
10076 * utils.c (xsnprintf): Make non-static.
10077 * server.h: Add xsnprintf declaration.
10078 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10079 replace calls to snprintf by calls to xsnprintf throughout.
10080
100812010-09-01 Joel Brobecker <brobecker@adacore.com>
10082
10083 * configure.ac: Add configure check for alloca.
10084 * configure, config.in: Regenerate.
10085 * server.h: Include alloca.h if it exists.
10086 * gdbreplay.c: Include alloca.h if it exists.
10087
1a981360
PA
100882010-08-28 Pedro Alves <pedro@codesourcery.com>
10089
10090 * linux-low.c (__SIGRTMIN): Define if not already defined.
10091 (linux_create_inferior): Check for __ANDROID__ rather than
10092 __SIGRTMIN.
10093 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10094 are already deferred.
10095 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10096 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10097 stopped and already has a pending signal to report.
10098 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10099 a pending signal to report or is moving out of a jump pad.
10100 (linux_init_signals): Check for __ANDROID__ rather than
10101 __SIGRTMIN.
10102
b4d51a55
PA
101032010-08-28 Pedro Alves <pedro@codesourcery.com>
10104
10105 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10106 debug_threads check. Avoid a linear search when not doing debug
10107 output.
10108
ec48365d
PA
101092010-08-27 Pedro Alves <pedro@codesourcery.com>
10110
10111 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10112 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10113 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10114 (process_event): Change local fd's type to gdb_fildes_t.
10115 (create_file_handler): Adjust prototype.
10116 (delete_file_handler): Adjust prototype.
10117 (handle_file_event): Adjust prototype. Use pfildes.
10118 (create_file_event): Adjsut prototype.
10119 * remote-utils.c (remote_desc, listen_desc): Change type to
10120 gdb_fildes_t.
10121 * server.h: New gdb_fildes_t typedef.
10122 [USE_WIN32API]: Include winsock2.h.
10123 (delete_file_handler, add_file_handler): Adjust prototypes.
10124 (pfildes): Declare.
10125 * utils.c (pfildes): New.
10126
854d88f0
PA
101272010-08-27 Pedro Alves <pedro@codesourcery.com>
10128
10129 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10130 * configure: Regenerate.
10131
0146f85b
PA
101322010-08-27 Pedro Alves <pedro@codesourcery.com>
10133
10134 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10135 (linux_done_accessing_memory): ... this.
10136 (linux_target_ops): Adjust.
10137 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10138 * nto-low.c (nto_target_ops): Adjust comment.
10139 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10140 * spu-low.c (spu_target_ops): Adjust comment.
10141 * target.h (target_ops): Rename unprepare_to_access_memory field
10142 to done_accessing_memory.
10143 (unprepare_to_access_memory): Rename to ...
10144 (done_accessing_memory): ... this.
10145
90d74c30
PA
101462010-08-26 Pedro Alves <pedro@codesourcery.com>
10147
10148 * linux-low.c (linux_prepare_to_access_memory): New.
10149 (linux_unprepare_to_access_memory): New.
10150 (linux_target_ops): Install them.
10151 * server.c (read_memory): Rename to ...
10152 (gdb_read_memory): ... this. Use
10153 prepare_to_access_memory/prepare_to_access_memory.
10154 (write_memory): Rename to ...
10155 (gdb_write_memory): ... this. Use
10156 prepare_to_access_memory/prepare_to_access_memory.
10157 (handle_search_memory_1): Adjust.
10158 (process_serial_event): Adjust.
10159 * target.h (struct target_ops): New fields
10160 prepare_to_access_memory and unprepare_to_access_memory.
10161 (prepare_to_access_memory, unprepare_to_access_memory): New.
10162 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10163 prepare_to_access_memory/prepare_to_access_memory.
10164 * nto-low.c (nto_target_ops): Adjust.
10165 * spu-low.c (spu_target_ops): Adjust.
10166 * win32-low.c (win32_target_ops): Adjust.
10167
fd467969
PA
101682010-08-26 Pedro Alves <pedro@codesourcery.com>
10169
10170 * Makefile.in (WARN_CFLAGS): Get it from configure.
10171 (WERROR_CFLAGS): New.
10172 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10173 * configure.ac: Introduce --enable-werror, which adds -Werror to
10174 the compiler command line. Enabled by default. Disable with
10175 --disable-werror. Add -Wdeclaration-after-statement
10176 Wpointer-arith and -Wformat-nonliteral to warning flags.
10177 * configure: Regenerate.
10178
331e2f5f
PA
101792010-08-26 Pedro Alves <pedro@codesourcery.com>
10180
10181 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10182
e581f2b4
PA
101832010-08-26 Pedro Alves <pedro@codesourcery.com>
10184
10185 * gdbreplay.c (remote_error): New.
10186 (gdbchar): New.
10187 (expect): Use gdbchar. Check for error reading from GDB.
10188 Clarify sync error output.
10189 (play): Check for errors writing to GDB.
10190 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10191 * remote-utils.c (getpkt): Check for errors writing to the remote
10192 descriptor.
10193
3c11dd79
PA
101942010-08-25 Pedro Alves <pedro@codesourcery.com>
10195
10196 * linux-low.c (linux_wait_1): Move non-debugging code out of
10197 `debug_threads' control.
10198
d20a8ad9
PA
101992010-08-25 Pedro Alves <pedro@codesourcery.com>
10200
10201 * linux-low.c (linux_wait_1): Don't set last_status here.
10202 * server.c (push_event, queue_stop_reply_callback): Assert we're
10203 not pushing a TARGET_WAITKIND_IGNORE event.
10204 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10205 (myresume, handle_target_event): Set the thread's last_resume_kind
10206 and last_status from the target returned status.
10207
964e4306
PA
102082010-08-25 Pedro Alves <pedro@codesourcery.com>
10209
10210 PR threads/10729
10211
10212 * linux-x86-low.c (update_debug_registers_callback): New.
10213 (i386_dr_low_set_addr): Use it.
10214 (i386_dr_low_get_addr): New.
10215 (i386_dr_low_set_control): Use update_debug_registers_callback.
10216 (i386_dr_low_get_control): New.
10217 (i386_dr_low_get_status): Adjust.
10218 * linux-low.c (linux_stop_lwp): New.
10219 * linux-low.h (linux_stop_lwp): Declare.
10220
10221 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10222 argument instead of a i386_debug_reg_state.
10223 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10224 a i386_debug_reg_state.
10225 (i386_insert_aligned_watchpoint): Adjust.
10226 (i386_remove_aligned_watchpoint): Adjust.
10227 (i386_low_stopped_data_address): Read the debug registers from the
10228 inferior instead of from the mirrors.
10229 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10230 (i386_dr_low_get_addr): Declare.
10231 (i386_dr_low_get_control): Declare.
10232 (i386_dr_low_get_status): Change prototype.
10233
10234 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10235 (i386_dr_low_get_addr): New.
10236 (i386_dr_low_get_control): New.
10237 (i386_dr_low_get_status): Adjust prototype. Return
10238 dr_status_mirror.
10239 (i386_initial_stuff): Clear dr_status_mirror and
10240 dr_control_mirror.
10241 (i386_get_thread_context): Adjust.
10242 (i386_set_thread_context): Adjust.
10243 (i386_thread_added): Adjust.
10244
5f21a75b
PA
102452010-08-24 Pedro Alves <pedro@codesourcery.com>
10246
10247 * linux-low.h (linux_thread_area): Delete declaration.
10248
3e4c1235
TS
102492010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10250
10251 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10252 after its termination.
10253
1971b033
PA
102542010-08-09 Pedro Alves <pedro@codesourcery.com>
10255
10256 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10257 (gdb_wants_all_stopped): Delete.
10258 (linux_wait_1): Don't call them.
10259 * server.c (handle_v_cont): Tag all threads as want-stopped.
10260 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10261 stopped as "client-wants-stopped".
10262
310444ac
PA
102632010-07-31 Pedro Alves <pedro@codesourcery.com>
10264
10265 * Makefile.in (signals_h): New.
10266 (server_h): Depend on it.
10267 (server.o): Don't depend on $(signals_def).
10268 (signals.o): Depend on $(signals_def).
10269
a19cae16
JK
102702010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10271
10272 * Makefile.in (signals_def): New.
10273 (server_h): Append include/gdb/signals.h and signals_def.
10274 (server.o): Append signals_def.
10275
30d50328
JK
102762010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10277
10278 * server.c (handle_target_event): Use target_signal_to_host for
10279 resume_info.sig initialization.
10280 * target.h (struct thread_resume) <sig>: New comment.
10281
5c3216e2
OS
102822010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10283
c6f46ca0
OS
10284 * server.c (handle_query): strcpy() the returned string from paddress()
10285 instead of sprintf().
5c3216e2
OS
10286 * utils.c (paddress): Return phex_nz().
10287
6bd31874
JB
102882010-07-07 Joel Brobecker <brobecker@adacore.com>
10289
10290 * server.c (handle_v_cont): Call mourn_inferior if process
10291 just exited.
10292 (myresume): Likewise.
10293
0fb4aa4b
PA
102942010-07-01 Pedro Alves <pedro@codesourcery.com>
10295
10296 Static tracepoints, and integration with UST.
10297
10298 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10299 * mem-break.c (uninsert_all_breakpoints)
10300 (reinsert_all_breakpoints): New.
10301 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10302 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10303 (gdb_agent_ust_loaded, helper_thread_id)
10304 (gdb_agent_helper_thread_id): New macros.
10305 (struct ipa_sym_addresses): Add addr_ust_loaded,
10306 addr_helper_thread_id, addr_cmd_buf.
10307 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10308 (in_process_agent_loaded_ust): New.
10309 (write_e_ust_not_loaded): New.
10310 (maybe_write_ipa_ust_not_loaded): New.
10311 (struct collect_static_trace_data_action): New.
10312 (enum tracepoint_type) <static_tracepoint>: New.
10313 (struct tracepoint) <handle>: Mention static tracepoints.
10314 (struct static_tracepoint_ctx): New.
10315 (CMD_BUF_SIZE): New.
10316 (add_tracepoint_action): Handle static tracepoint actions.
10317 (unprobe_marker_at): New.
10318 (clear_installed_tracepoints): Handle static tracepoints.
10319 (cmd_qtdp): Handle static tracepoints.
10320 (probe_marker_at): New.
10321 (cmd_qtstart): Handle static tracepoints.
10322 (response_tracepoint): Handle static tracepoints.
10323 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10324 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10325 (get_context_regcache): Handle static tracepoints.
10326 (do_action_at_tracepoint): Handle static tracepoint actions.
10327 (traceframe_find_block_type): Handle static trace data blocks.
10328 (traceframe_read_sdata): New.
10329 (download_tracepoints): Download static tracepoint actions.
10330 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10331 (GDB_PROBE_NAME): New.
10332 (ust_ops): New.
10333 (GET_UST_SYM): New.
10334 (USTF): New.
10335 (dlsym_ust): New.
10336 (ust_marker_to_static_tracepoint): New.
10337 (gdb_probe): New.
10338 (collect_ust_data_at_tracepoint): New.
10339 (gdb_ust_probe): New.
10340 (UNIX_PATH_MAX, SOCK_DIR): New.
10341 (gdb_ust_connect_sync_socket): New.
10342 (resume_thread, stop_thread): New.
10343 (run_inferior_command): New.
10344 (init_named_socket): New.
10345 (gdb_ust_socket_init): New.
10346 (cstr_to_hexstr): New.
10347 (next_st): New.
10348 (first_marker, next_marker): New.
10349 (response_ust_marker): New.
10350 (cmd_qtfstm, cmd_qtsstm): New.
10351 (unprobe_marker_at, probe_marker_at): New.
10352 (cmd_qtstmat, gdb_ust_thread): New.
10353 (gdb_ust_init): New.
10354 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10355 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10356 (ST_REGENTRY): New.
10357 (x86_64_st_collect_regmap): New.
10358 (X86_64_NUM_ST_COLLECT_GREGS): New.
10359 (AMD64_RIP_REGNUM): New.
10360 (supply_static_tracepoint_registers): New.
10361 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10362 (ST_REGENTRY): New.
10363 (i386_st_collect_regmap): New.
10364 (i386_NUM_ST_COLLECT_GREGS): New.
10365 (supply_static_tracepoint_registers): New.
10366 * server.c (handle_query): Handle qXfer:statictrace:read.
10367 <qSupported>: Report support for StaticTracepoints, and
10368 qXfer:statictrace:read features.
10369 * server.h (traceframe_read_sdata)
10370 (supply_static_tracepoint_registers): Declare.
10371 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10372 (unpack_varlen_hex): Include in IPA build.
10373 * Makefile.in (ustlibs, ustinc): New.
10374 (IPA_OBJS): Add remote-utils-ipa.o.
10375 ($(IPA_LIB)): Link -ldl and -lpthread.
10376 (UST_CFLAGS): New.
10377 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10378 * config.in, configure: Regenerate.
10379
9e4344e5
PA
103802010-06-20 Ian Lance Taylor <iant@google.com>
10381 Pedro Alves <pedro@codesourcery.com>
10382
10383 * linux-x86-low.c (always_true): Delete.
10384 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10385 trying to fool the compiler with always_true.
10386
c6beb2cb
PA
103872010-06-20 Pedro Alves <pedro@codesourcery.com>
10388
10389 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10390 conditions in gdbserver.
10391
d2ed6730
UW
103922010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * spu-low.c (spu_read_memory): Wrap around local store limit.
10395 (spu_write_memory): Likewise.
10396
4e29fb54
PA
103972010-06-15 Pedro Alves <pedro@codesourcery.com>
10398
10399 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10400 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10401 LONGEST uses.
10402 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10403 uses.
10404 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10405 uses with LONGEST uses.
10406
6a271cae
PA
104072010-06-14 Stan Shebs <stan@codesourcery.com>
10408 Pedro Alves <pedro@codesourcery.com>
10409
10410 Bytecode compiler.
10411
10412 * linux-x86-low.c: Include limits.h.
10413 (add_insns): New.
10414 (always_true): New.
10415 (EMIT_ASM): New.
10416 (EMIT_ASM32): New.
10417 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10418 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10419 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10420 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10421 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10422 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10423 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10424 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10425 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10426 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10427 (amd64_emit_void_call_2): New.
10428 (amd64_emit_ops): New.
10429 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10430 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10431 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10432 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10433 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10434 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10435 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10436 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10437 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10438 (i386_emit_stack_adjust, i386_emit_int_call_1)
10439 (i386_emit_void_call_2): New.
10440 (i386_emit_ops): New.
10441 (x86_emit_ops): New.
10442 (the_low_target): Install x86_emit_ops.
10443 * server.h (struct emit_ops): New.
10444 (get_raw_reg_func_addr): Declare.
10445 (current_insn_ptr, emit_error): Declare.
10446 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10447 (set_trace_state_variable_value): New defines.
10448 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10449 addr_get_trace_state_variable_value and
10450 addr_set_trace_state_variable_value.
10451 (symbol_list): New fields for get_raw_reg,
10452 get_trace_state_variable_value and set_trace_state_variable_value.
10453 (condfn): New typedef.
10454 (struct tracepoint): New field `compiled_cond'.
10455 (do_action_at_tracepoint): Clear compiled_cond.
10456 (get_trace_state_variable_value, set_trace_state_variable_value):
10457 Export in the IPA.
10458 (condition_true_at_tracepoint): If there's a compiled condition,
10459 run that.
10460 (current_insn_ptr, emit_error): New globals.
10461 (struct bytecode_address): New.
10462 (get_raw_reg_func_addr): New.
10463 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10464 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10465 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10466 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10467 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10468 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10469 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10470 (compile_tracepoint_condition, compile_bytecodes): New.
10471 * target.h (emit_ops): Forward declare.
10472 (struct target_ops): New field emit_ops.
10473 (target_emit_ops): New.
10474 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10475 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10476 * linux-low.c (linux_emit_ops): New.
10477 (linux_target_ops): Install it.
10478 * linux-low.h (struct linux_target_ops): New field emit_ops.
10479
92b72907
UW
104802010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10481
10482 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10483 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10484
fa593d66
PA
104852010-06-01 Pedro Alves <pedro@codesourcery.com>
10486 Stan Shebs <stan@codesourcery.com>
10487
10488 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10489 (all): Depend on $(extra_libraries).
10490 (install-only): Install the IPA.
10491 (IPA_OBJS, IPA_LIB): New.
10492 (clean): Remove the IPA lib.
10493 (IPAGENT_CFLAGS): New.
10494 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10495 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10496 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10497 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10498 * configure.ac: Check for atomic builtins support in the compiler.
10499 (IPA_DEPFILES, extra_libraries): Define.
10500 * configure.srv (ipa_obj): Add description.
10501 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10502 (i[34567]86-*-linux*): Set ipa_obj.
10503 (x86_64-*-linux*): Set ipa_obj.
10504 * linux-low.c (stabilizing_threads): New.
10505 (supports_fast_tracepoints): New.
10506 (linux_detach): Stabilize threads before detaching.
10507 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10508 the lwp is either not stabilizing, or is moving out of a jump pad.
10509 (linux_fast_tracepoint_collecting): New.
10510 (maybe_move_out_of_jump_pad): New.
10511 (enqueue_one_deferred_signal): New.
10512 (dequeue_one_deferred_signal): New.
10513 (linux_wait_for_event_1): If moving out of a jump pad, defer
10514 pending signals to later.
10515 (linux_stabilize_threads): New.
10516 (linux_wait_1): Check if threads need moving out of jump pads, and
10517 do it if so.
10518 (stuck_in_jump_pad_callback): New.
10519 (move_out_of_jump_pad_callback): New.
10520 (lwp_running): New.
10521 (linux_resume_one_lwp): Handle moving out of jump pads.
10522 (linux_set_resume_request): Dequeue deferred signals.
10523 (need_step_over_p): Also step over fast tracepoint jumps.
10524 (start_step_over): Also uninsert fast tracepoint jumps.
10525 (finish_step_over): Also reinsert fast tracepoint jumps.
10526 (linux_install_fast_tracepoint_jump): New.
10527 (linux_target_ops): Install linux_stabilize_threads and
10528 linux_install_fast_tracepoint_jump_pad.
10529 * linux-low.h (linux_target_ops) <get_thread_area,
10530 install_fast_tracepoint_jump_pad>: New fields.
10531 (struct lwp_info) <collecting_fast_tracepoint,
10532 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10533 (linux_get_thread_area): Declare.
10534 * linux-x86-low.c (jump_insn): New.
10535 (x86_get_thread_area): New.
10536 (append_insns): New.
10537 (push_opcode): New.
10538 (amd64_install_fast_tracepoint_jump_pad): New.
10539 (i386_install_fast_tracepoint_jump_pad): New.
10540 (x86_install_fast_tracepoint_jump_pad): New.
10541 (the_low_target): Install x86_get_thread_area and
10542 x86_install_fast_tracepoint_jump_pad.
10543 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10544 (struct fast_tracepoint_jump): New.
10545 (fast_tracepoint_jump_insn): New.
10546 (fast_tracepoint_jump_shadow): New.
10547 (find_fast_tracepoint_jump_at): New.
10548 (fast_tracepoint_jump_here): New.
10549 (delete_fast_tracepoint_jump): New.
10550 (set_fast_tracepoint_jump): New.
10551 (uninsert_fast_tracepoint_jumps_at): New.
10552 (reinsert_fast_tracepoint_jumps_at): New.
10553 (set_breakpoint_at): Use write_inferior_memory.
10554 (uninsert_raw_breakpoint): Use write_inferior_memory.
10555 (check_mem_read): Mask out fast tracepoint jumps.
10556 (check_mem_write): Mask out fast tracepoint jumps.
10557 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10558 (set_fast_tracepoint_jump): Declare.
10559 (delete_fast_tracepoint_jump)
10560 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10561 (reinsert_fast_tracepoint_jumps_at): Declare.
10562 * regcache.c: Don't compile many functions when building the
10563 in-process agent library.
10564 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10565 the register buffer in the heap.
10566 (free_register_cache): If the register buffer isn't owned by the
10567 regcache, don't free it.
10568 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10569 pre-existing register caches.
10570 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10571 type.
10572 (convert_ascii_to_int): : Constify `from' parameter type.
10573 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10574 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10575 the needed buffer in-place.
10576 (relocate_instruction): New.
10577 * server.c (handle_query) <qSymbols>: If the target supports
10578 tracepoints, give it a chance of looking up symbols. Report
10579 support for fast tracepoints.
10580 (handle_status): Stabilize threads.
10581 (process_serial_event): Adjust.
10582 * server.h (struct fast_tracepoint_jump): Forward declare.
10583 (struct process_info) <fast_tracepoint_jumps>: New field.
10584 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10585 (decode_X_packet, decode_M_packet): Adjust.
10586 (relocate_instruction): Declare.
10587 (in_process_agent_loaded): Declare.
10588 (tracepoint_look_up_symbols): Declare.
10589 (struct fast_tpoint_collect_status): Declare.
10590 (fast_tracepoint_collecting): Declare.
10591 (force_unlock_trace_buffer): Declare.
10592 (handle_tracepoint_bkpts): Declare.
10593 (initialize_low_tracepoint)
10594 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10595 * target.h (struct target_ops) <stabilize_threads,
10596 install_fast_tracepoint_jump_pad>: New fields.
10597 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10598 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10599 [HAVE_STDINT_H]: Include stdint.h.
10600 (trace_debug_1): Rename to ...
10601 (trace_vdebug): ... this.
10602 (trace_debug): Rename to ...
10603 (trace_debug_1): ... this. Add `level' parameter.
10604 (trace_debug): New.
10605 (ATTR_USED, ATTR_NOINLINE): New.
10606 (IP_AGENT_EXPORT): New.
10607 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10608 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10609 (about_to_request_buffer_space, trace_buffer_is_full)
10610 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10611 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10612 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10613 (traceframe_write_count, traceframes_created)
10614 (trace_state_variables)
10615 New renaming defines.
10616 (struct ipa_sym_addresses): New.
10617 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10618 (symbol_list): New.
10619 (ipa_sym_addrs): New.
10620 (all_tracepoint_symbols_looked_up): New.
10621 (in_process_agent_loaded): New.
10622 (write_e_ipa_not_loaded): New.
10623 (maybe_write_ipa_not_loaded): New.
10624 (tracepoint_look_up_symbols): New.
10625 (debug_threads) [IN_PROCESS_AGENT]: New.
10626 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10627 (UNKNOWN_SIDE_EFFECTS): New.
10628 (stop_tracing): New.
10629 (flush_trace_buffer): New.
10630 (stop_tracing_bkpt): New.
10631 (flush_trace_buffer_bkpt): New.
10632 (read_inferior_integer): New.
10633 (read_inferior_uinteger): New.
10634 (read_inferior_data_pointer): New.
10635 (write_inferior_data_pointer): New.
10636 (write_inferior_integer): New.
10637 (write_inferior_uinteger): New.
10638 (struct collect_static_trace_data_action): Delete.
10639 (enum tracepoint_type): New.
10640 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10641 <actions_str, step_actions, step_actions_str>: Only include in
10642 GDBserver.
fa593d66
PA
10643 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10644 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10645 (tracepoints): Use IP_AGENT_EXPORT.
10646 (last_tracepoint): Don't include in the IPA.
10647 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10648 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10649 (alloced_trace_state_variables): New.
10650 (trace_state_variables): Use IP_AGENT_EXPORT.
10651 (traceframe_t): Delete unused variable.
10652 (circular_trace_buffer): Don't include in the IPA.
10653 (trace_buffer_start): Delete.
10654 (struct trace_buffer_control): New.
10655 (trace_buffer_free): Delete.
10656 (struct ipa_trace_buffer_control): New.
10657 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10658 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10659 New.
10660 (trace_buffer_ctrl): New.
10661 (TRACE_BUFFER_CTRL_CURR): New.
10662 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10663 Reimplement as macros.
10664 (trace_buffer_wrap): Delete.
10665 (traceframe_write_count, traceframe_read_count)
10666 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10667 (struct tracepoint_hit_ctx) <type>: New field.
10668 (struct fast_tracepoint_ctx): New.
10669 (memory_barrier): New.
10670 (cmpxchg): New.
10671 (record_tracepoint_error): Update atomically in the IPA.
10672 (clear_inferior_trace_buffer): New.
10673 (about_to_request_buffer_space): New.
10674 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10675 updating the same buffer.
10676 (add_tracepoint): Default the tracepoint's type to trap
10677 tracepoint, and orig_size to -1.
10678 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10679 internal variables.
10680 (create_trace_state_variable): New parameter `gdb'. Handle it.
10681 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10682 (cmd_qtdp): Handle fast tracepoints.
10683 (cmd_qtdv): Adjust.
10684 (max_jump_pad_size): New.
10685 (gdb_jump_pad_head): New.
10686 (get_jump_space_head): New.
10687 (claim_jump_space): New.
10688 (sort_tracepoints): New.
10689 (MAX_JUMP_SIZE): New.
10690 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10691 IPA.
10692 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10693 support. Upload fast traceframes, and delete internal IPA
10694 breakpoints.
10695 (stop_tracing_handler): New.
10696 (flush_trace_buffer_handler): New.
10697 (cmd_qtstop): Upload fast tracepoints.
10698 (response_tracepoint): Handle fast tracepoints.
10699 (tracepoint_finished_step): Upload fast traceframes. Set the
10700 tracepoint hit context's tracepoint type.
10701 (handle_tracepoint_bkpts): New.
10702 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10703 type. Add comment about fast tracepoints.
10704 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10705 non-existing action_str field.
10706 (get_context_regcache): Handle fast tracepoints.
10707 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10708 to the regcache.
10709 (fast_tracepoint_from_jump_pad_address): New.
10710 (fast_tracepoint_from_ipa_tpoint_address): New.
10711 (collecting_t): New.
10712 (force_unlock_trace_buffer): New.
10713 (fast_tracepoint_collecting): New.
10714 (collecting): New.
10715 (gdb_collect): New.
10716 (write_inferior_data_ptr): New.
10717 (target_tp_heap): New.
10718 (target_malloc): New.
10719 (download_agent_expr): New.
10720 (UALIGN): New.
10721 (download_tracepoints): New.
10722 (download_trace_state_variables): New.
10723 (upload_fast_traceframes): New.
10724 (IPA_FIRST_TRACEFRAME): New.
10725 (IPA_NEXT_TRACEFRAME_1): New.
10726 (IPA_NEXT_TRACEFRAME): New.
10727 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10728 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10729 (gdb_jump_pad_buffer_end): New.
10730 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10731 (initialize_tracepoint): Adjust.
10732 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10733 buffer. Initialize the low module.
10734 * utils.c (PREFIX, TOOLNAME): New.
10735 (malloc_failure): Use PREFIX.
10736 (error): In the IPA, an error causes an exit.
10737 (fatal, warning): Use PREFIX.
10738 (internal_error): Use TOOLNAME.
10739 (NUMCELLS): Increase to 10.
10740 * configure, config.in: Regenerate.
10741
d149dd1d
PA
107422010-06-01 Pedro Alves <pedro@codesourcery.com>
10743
10744 * server.c (handle_query) <qSupported>: Do two passes over the
10745 qSupported string to avoid nesting strtok.
10746
f6528abd
JK
107472010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10748
10749 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10750 (CDEPS): New.
10751 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10752 -Wl,--dynamic-list.
10753 * configure: Regenerate.
10754 * proc-service.list: New.
10755
ca2a87a0
JK
107562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10757
10758 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10759 New comment.
10760
363a6e9f
OS
107612010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10762
10763 * gdbreplay.c (remote_open): Check error return from socket() call by
10764 its equality to -1 not by it being negative.
10765 * remote-utils.c (remote_open): Likewise.
10766
d23b6cb1
PA
107672010-05-23 Pedro Alves <pedro@codesourcery.com>
10768
10769 * config.h: Regenerate.
10770
28d3cf85
MK
107712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10772
10773 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10774 doesn't provide PTRACE_GET_THREAD_AREA.
10775
fea36a59
MK
107762010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10777
10778 * linux-m68k-low.c: Include <asm/ptrace.h>
10779 (ps_get_thread_area): Implement.
10780
24b066ba
DE
107812010-05-03 Doug Evans <dje@google.com>
10782
10783 * event-loop.c (struct callback_event): New struct.
10784 (callback_list): New global.
10785 (append_callback_event, delete_callback_event): New functions.
10786 (process_callback): New function.
10787 (start_event_loop): Call it.
10788 * remote-utils.c (NOT_SCHEDULED): Define.
10789 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10790 moved out of readchar.
10791 (readchar): Rewrite. Call reschedule before returning.
10792 (reset_readchar): New function.
10793 (remote_close): Call it.
10794 (process_remaining, reschedule): New functions.
10795 * server.h (callback_handler_func): New typedef.
10796 (append_callback_event, delete_callback_event): Declare.
10797
9836d6ea
PA
107982010-05-03 Pedro Alves <pedro@codesourcery.com>
10799
10800 * proc-service.c (ps_pglobal_lookup): Use
10801 thread_db_look_up_one_symbol.
10802 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10803 parameter. Use it instead of all_symbols_looked_up.
10804 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10805 field.
10806 (all_symbols_looked_up): Don't declare.
10807 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10808 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10809 field.
10810 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10811 Set all_symbols_looked_up here.
10812 (thread_db_look_up_one_symbol): New.
10813 (thread_db_get_tls_address): Adjust.
10814 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10815 thread_db object on the heap, and tentatively set it in the
10816 process structure.
10817 (thread_db_init): Don't set all_symbols_looked_up here.
10818 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10819
7984d532
PA
108202010-05-03 Pedro Alves <pedro@codesourcery.com>
10821
10822 * linux-low.c (linux_kill, linux_detach): Adjust.
10823 (status_pending_p_callback): Remove redundant statement. Check
10824 for !TARGET_WAITIKIND_IGNORE, instead of
10825 TARGET_WAITKIND_STOPPED.
10826 (handle_tracepoints): Make sure LWP is locked. Adjust.
10827 (linux_wait_for_event_1): Adjust.
10828 (linux_cancel_breakpoints): New.
10829 (unsuspend_one_lwp): New.
10830 (unsuspend_all_lwps): New.
10831 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10832 (send_sigstop_callback): Change return type to int, add new
10833 `except' parameter and handle it.
10834 (suspend_and_send_sigstop_callback): New.
10835 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10836 pass them down. If SUSPEND, also increment the lwp's suspend
10837 count.
10838 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10839 (need_step_over_p): Don't consider suspended LWPs.
10840 (start_step_over): Adjust.
10841 (proceed_one_lwp): Change return type to int, add new `except'
10842 parameter and handle it.
10843 (unsuspend_and_proceed_one_lwp): New.
10844 (proceed_all_lwps): Use find_inferior instead of
10845 for_each_inferior.
10846 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10847 also decrement the suspend count of LWPs. Pass `except' down,
10848 instead of hacking its suspend count.
10849 (linux_pause_all): Add `freeze' parameter. Adjust.
10850 (linux_unpause_all): New.
10851 (linux_target_ops): Install linux_unpause_all.
10852 * server.c (handle_status): Adjust.
10853 * target.h (struct target_ops): New fields `unpause_all' and
10854 `cancel_breakpoints'. Add new parameter to `pause_all'.
10855 (pause_all): Add new `freeze' parameter.
10856 (unpause_all): New.
10857 (cancel_breakpoints): New.
10858 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10859 cancel breakpoints.
10860 (cmd_qtstart): Pause threads.
10861 (stop_tracing): Pause threads, and cancel breakpoints.
10862 * win32-low.c (win32_target_ops): Adjust.
10863
e471f25b
PA
108642010-05-03 Pedro Alves <pedro@codesourcery.com>
10865
10866 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10867 the inferior right away from here...
10868 (linux_wait_1): ... to here, and adjust to check the thread's
10869 last_resume_kind instead of the lwp's step or stop_expected flags.
10870
1915ef4f
PA
108712010-05-02 Pedro Alves <pedro@codesourcery.com>
10872
10873 * README: Use consistent `GDB' and `GDBserver' spellings.
10874
f9e39928
PA
108752010-05-02 Pedro Alves <pedro@codesourcery.com>
10876
10877 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10878 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10879 (linux_detach_one_lwp): Assume the lwp is stopped.
10880 (any_thread_of): Delete.
10881 (linux_detach): Stop all lwps here. Don't blindly delete all
10882 breakpoints.
10883 (delete_lwp_callback): New.
10884 (linux_mourn): Delete all lwps of the process that is gone.
10885 (linux_wait_1): Don't delete the last lwp of the process here.
10886 * mem-break.h (mark_breakpoints_out): Declare.
10887 * mem-break.c (mark_breakpoints_out): New.
10888 (free_all_breakpoints): Use it.
10889 * server.c (handle_target_event): If the process is gone, mark
10890 breakpoints out.
10891 * thread-db.c (struct thread_db) <create_bp>: New field.
10892 (thread_db_enable_reporting): Fix prototype. Store a thread event
10893 breakpoint reference in the thread_db struct.
10894 (thread_db_load_search): Clear the thread_db object.
10895 (try_thread_db_load_1): Ditto.
10896 (switch_to_process): New.
10897 (disable_thread_event_reporting): Use it.
10898 (remove_thread_event_breakpoints): New.
10899 (thread_db_detach, thread_db_mourn): Use it.
10900
1e7fc18c
PA
109012010-05-01 Pedro Alves <pedro@codesourcery.com>
10902
10903 * linux-low.c (linux_enable_event_reporting): New.
10904 (linux_wait_for_event_1, handle_extended_wait): Use it.
10905
02fc4de7
PA
109062010-04-30 Pedro Alves <pedro@codesourcery.com>
10907
10908 * linux-low.c (linux_kill_one_lwp, linux_kill)
10909 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10910 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10911 SIGSTOP even if the LWP is stopped.
10912 (send_sigstop_callback): New.
10913 (stop_all_lwps): Use send_sigstop_callback instead.
10914 (linux_resume_one_thread): Adjust.
10915 (proceed_one_lwp): Still proceed an LWP that the client has
10916 requested to stop, if we haven't reported it as stopped yet. Make
10917 sure that LWPs the client want stopped, have a pending SIGSTOP.
10918
bc3b5632
DE
109192010-04-26 Doug Evans <dje@google.com>
10920
ae1ada35
DE
10921 * server.c (handle_general_set): Make static.
10922
bc3b5632
DE
10923 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10924 Print received char after testing for error/eof instead of before.
10925 (input_interrupt): Tweak comment.
10926
65730243
DE
109272010-04-23 Doug Evans <dje@google.com>
10928
10929 * server.c (start_inferior): Print inferior argv if --debug.
10930
a8ae7dc0
AR
109312010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10932
10933 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10934 * nto-x86-low.c: Include server.h
10935
1c07cc19
PM
109362010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10937
10938 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10939 be consistent with other sources of this directory.
10940 (init_registers_amd64): Correct name of source file of this function
10941 in the comment.
10942
e0a61e09
PM
109432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10944
10945 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10946 64-bit executables.
10947
54709339
PM
109482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10949
10950 * win32-i386-low.c: Add 64-bit support.
10951 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10952 (init_registers_amd64): Declare.
10953 (mappings): Add 64-bit version of array.
10954 (init_windows_x86): New function.
10955 (the_low_target): Change init_arch field to init_windows_x86.
10956
e8f0053d
PM
109572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10958
10959 * win32-low.c: Adapt to support also 64-bit architecture.
10960 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10961 (get_image_name): Use SIZE_T type for local variable `done'.
10962 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10963 (toolhelp_get_dll_name): Idem.
10964 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10965 Use uintptr_t typecast to avoid warning.
10966 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10967 (handle_exception): Use phex_nz to avoid warning.
10968 (win32_wait): Remove unused local variable `process'.
10969
c481e77e
PM
109702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10971
10972 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10973 `amd64-avx.o'.
10974
12ea4b69
PM
109752010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10976
10977 * configure.ac: Use `ws2_32' library for srv_mingw.
10978 * configure: Regenerate.
10979 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10980 * remote-utils.c: Likewise.
10981
f6d1620c
L
109822010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10983
10984 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10985 if __x86_64__ is defined.
10986
8e642873
PM
109872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10988
10989 * configure: Regenerate.
10990
711e434b
PM
109912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10992
10993 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10994 * target.h (target_ops): New get_tib_address field.
10995 * win32-low.h (win32_thread_info): Add thread_local_base field.
10996 * win32-low.c (child_add_thread): Add tlb argument.
10997 Set thread_local_base field to TLB.
10998 (get_child_debug_event): Adapt to child_add_thread change.
10999 (win32_get_tib_address): New function.
11000 (win32_target_ops): Set get_tib_address field to
11001 win32_get_tib_address.
11002 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11003
505106cd
PA
110042010-04-12 Pedro Alves <pedro@codesourcery.com>
11005
505106cd
PA
11006 * linux-low.c (linux_mourn): Also remove the process.
11007 * server.c (handle_target_event): Don't remove the process here.
11008 * nto-low.c (nto_mourn): New.
11009 (nto_target_ops): Install it.
11010 * spu-low.c (spu_mourn): New.
11011 (spu_target_ops): Install it.
11012 * win32-low.c (win32_mourn): New.
11013 (win32_target_ops): Install it.
11014
e8470a06
PA
110152010-04-12 Pedro Alves <pedro@codesourcery.com>
11016
11017 * server.h (buffer_xml_printf): Remove redundant `;'.
11018
45ba0d02
PA
110192010-04-12 Pedro Alves <pedro@codesourcery.com>
11020
11021 * regcache.c (set_register_cache): Invalidate regcaches before
11022 changing the register cache layout.
11023 (regcache_invalidate_one): Allow a NULL regcache.
11024 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11025 regcaches before changing the register cache layout or the target
11026 regsets.
11027
59e04013
L
110282010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11029
11030 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11031 variable warning on Linux/x86-64.
11032
8336d594
PA
110332010-04-11 Pedro Alves <pedro@codesourcery.com>
11034
11035 GDBserver disconnected tracing support.
11036
11037 * linux-low.c (linux_remove_process): Delete.
11038 (add_lwp): Don't set last_resume_kind here.
11039 (linux_kill): Use `mourn'.
11040 (linux_detach): Use `thread_db_detach', and `mourn'.
11041 (linux_mourn): New.
11042 (linux_attach_lwp_1): Adjust comment.
11043 (linux_attach): last_resume_kind moved the thread_info; adjust.
11044 (status_pending_p_callback): Adjust.
11045 (linux_wait_for_event_1): Adjust.
11046 (count_events_callback, select_singlestep_lwp_callback)
11047 (select_event_lwp_callback, cancel_breakpoints_callback)
11048 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11049 (proceed_one_lwp): Adjust.
11050 (linux_async): Add debug output.
11051 (linux_thread_stopped): New.
11052 (linux_pause_all): New.
11053 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11054 linux_pause_all.
11055 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11056 (thread_db_free): Delete declaration.
11057 (thread_db_detach, thread_db_mourn): Declare.
11058 * thread-db.c (thread_db_init): Use thread_db_mourn.
11059 (thread_db_free): Delete, split in two.
11060 (disable_thread_event_reporting): New.
11061 (thread_db_detach): New.
11062 (thread_db_mourn): New.
11063
11064 * server.h (struct thread_info) <last_resume_kind>: New field.
11065 <attached>: Add comment.
11066 <gdb_detached>: New field.
11067 (handler_func): Change return type to int.
11068 (handle_serial_event, handle_target_event): Ditto.
11069 (gdb_connected): Declare.
11070 (tracing): Delete.
11071 (disconnected_tracing): Declare.
11072 (stop_tracing): Declare.
11073
11074 * server.c (handle_query) <qSupported>: Report support for
11075 disconnected tracing.
11076 (queue_stop_reply_callback): Account for running threads.
11077 (gdb_wants_thread_stopped): New.
11078 (gdb_wants_all_threads_stopped): New.
11079 (gdb_reattached_process): New.
11080 (handle_status): Clear the `gdb_detached' flag of all processes.
11081 In all-stop, stop all threads.
11082 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11083 (process_serial_event): If the remote connection breaks, or if an
11084 exit was forced with "monitor exit", force an event loop exit.
11085 Handle disconnected tracing on detach.
11086 (handle_serial_event): Adjust.
11087 (handle_target_event): If GDB isn't connected, forward events back
11088 to the inferior, unless the last process exited, in which case,
11089 exit gdbserver. Adjust interface.
11090
11091 * remote-utils.c (remote_open): Don't block in accept. Instead
11092 register an event loop source on the listen socket file
11093 descriptor. Refactor bits into ...
11094 (listen_desc): ... this new global.
11095 (gdb_connected): ... this new function.
11096 (enable_async_notification): ... this new function.
11097 (handle_accept_event): ... this new function.
11098 (remote_close): Clear remote_desc.
11099
11100 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11101
11102 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11103 New fields.
11104 (mourn_inferior): Define.
11105 (target_process_qsupported): Avoid the dangling else problem.
11106 (thread_stopped): Define.
11107 (pause_all): Define.
11108 (target_waitstatus_to_string): Declare.
11109 * target.c (target_waitstatus_to_string): New.
11110
11111 * tracepoint.c (tracing): Make extern.
11112 (disconnected_tracing): New.
11113 (stop_tracing): Make extern. Handle tracing stops due to GDB
11114 disconnecting.
11115 (cmd_qtdisconnected): New.
11116 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11117 (handle_tracepoint_general_set): Handle QTDisconnected.
11118
11119 * event-loop.c (event_handler_func): Change return type to int.
11120 (process_event): Bail out if the event handler wants the event
11121 loop to stop.
11122 (handle_file_event): Ditto.
11123 (start_event_loop): Bail out if the event handler wants the event
11124 loop to stop.
11125
11126 * nto-low.c (nto_target_ops): Adjust.
11127 * spu-low.c (spu_wait): Don't remove the process here.
11128 (spu_target_ops): Adjust.
11129 * win32-low.c (win32_wait): Don't remove the process here.
11130 (win32_target_ops): Adjust.
11131
5d267c4c
PA
111322010-04-11 Pedro Alves <pedro@codesourcery.com>
11133
11134 * regcache.c (realloc_register_cache): Invalidate inferior's
11135 regcache before recreating it.
11136
623ccd72
PA
111372010-04-09 Pedro Alves <pedro@codesourcery.com>
11138
11139 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11140
219f2f23
PA
111412010-04-09 Stan Shebs <stan@codesourcery.com>
11142 Pedro Alves <pedro@codesourcery.com>
11143
11144 * server.h (LONGEST): New.
11145 (struct thread_info) <while_stepping>: New field.
11146 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11147 Declare.
11148 (initialize_tracepoint, handle_tracepoint_general_set)
11149 (handle_tracepoint_query, tracepoint_finished_step)
11150 (tracepoint_was_hit, release_while_stepping_state_list):
11151 (current_traceframe): Declare.
11152 * server.c (handle_general_set): Handle tracepoint packets.
11153 (read_memory): New.
11154 (write_memory): New.
11155 (handle_search_memory_1): Use read_memory.
11156 (handle_query): Report support for conditional tracepoints, trace
11157 state variables, and tracepoint sources. Handle tracepoint
11158 queries.
11159 (main): Initialize the tracepoints module.
11160 (process_serial_event): Handle traceframe reads/writes.
11161
11162 * linux-low.c (handle_tracepoints): New.
11163 (linux_wait_1): Call it.
11164 (linux_resume_one_lwp): Handle while-stepping.
11165 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11166 (linux_target_ops): Install them.
11167 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11168 New field.
11169 * linux-x86-low.c (x86_supports_tracepoints): New.
11170 (the_low_target). Install it.
11171
11172 * mem-break.h (delete_breakpoint): Declare.
11173 * mem-break.c (delete_breakpoint): Make external.
11174
11175 * target.h (struct target_ops): Add `supports_tracepoints',
11176 `read_pc', and `write_pc' fields.
11177 (target_supports_tracepoints): Define.
11178 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11179 (phex_nz): New.
11180
11181 * regcache.h (struct regcache) <registers_owned>: New field.
11182 (init_register_cache, regcache_cpy): Declare.
11183 (regcache_read_pc, regcache_write_pc): Declare.
11184 (register_cache_size): Declare.
11185 (supply_regblock): Declare.
11186 * regcache.c (init_register_cache): New.
11187 (new_register_cache): Use it.
11188 (regcache_cpy): New.
11189 (register_cache_size): New.
11190 (supply_regblock): New.
11191 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11192
219f2f23
PA
11193 * tracepoint.c: New.
11194
11195 * Makefile.in (OBS): Add tracepoint.o.
11196 (tracepoint.o): New rule.
11197
3a13a53b
L
111982010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11199
11200 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11201 (i386-mmx.o): New.
11202 (i386-mmx.c): Likewise.
11203 (i386-mmx-linux.o): Likewise.
11204 (i386-mmx-linux.c): Likewise.
11205
11206 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11207 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11208 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11209 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11210
11211 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11212 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11213 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11214
1570b33e
L
112152010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11216
11217 * Makefile.in (clean): Updated.
11218 (i386-avx.o): New.
11219 (i386-avx.c): Likewise.
11220 (i386-avx-linux.o): Likewise.
11221 (i386-avx-linux.c): Likewise.
11222 (amd64-avx.o): Likewise.
11223 (amd64-avx.c): Likewise.
11224 (amd64-avx-linux.o): Likewise.
11225 (amd64-avx-linux.c): Likewise.
11226
11227 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11228 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11229 (srv_amd64_regobj): Add amd64-avx.o.
11230 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11231 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11232 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11233 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11234 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11235 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11236 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11237
11238 * i387-fp.c: Include "i386-xstate.h".
11239 (i387_xsave): New.
11240 (i387_cache_to_xsave): Likewise.
11241 (i387_xsave_to_cache): Likewise.
11242 (x86_xcr0): Likewise.
11243
11244 * i387-fp.h (i387_cache_to_xsave): Likewise.
11245 (i387_xsave_to_cache): Likewise.
11246 (x86_xcr0): Likewise.
11247
11248 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11249 * linux-crisv32-low.c (target_regsets): Likewise.
11250 * linux-m68k-low.c (target_regsets): Likewise.
11251 * linux-mips-low.c (target_regsets): Likewise.
11252 * linux-ppc-low.c (target_regsets): Likewise.
11253 * linux-s390-low.c (target_regsets): Likewise.
11254 * linux-sh-low.c (target_regsets): Likewise.
11255 * linux-sparc-low.c (target_regsets): Likewise.
11256 * linux-xtensa-low.c (target_regsets): Likewise.
11257
11258 * linux-low.c: Include <sys/uio.h>.
11259 (regsets_fetch_inferior_registers): Support nt_type.
11260 (regsets_store_inferior_registers): Likewise.
11261 (linux_process_qsupported): New.
11262 (linux_target_ops): Add linux_process_qsupported.
11263
11264 * linux-low.h (regset_info): Add nt_type.
11265 (linux_target_ops): Add process_qsupported.
11266
11267 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11268 and <sys/uio.h>.
11269 (init_registers_i386_avx_linux): New.
11270 (init_registers_amd64_avx_linux): Likewise.
11271 (xmltarget_i386_linux_no_xml): Likewise.
11272 (xmltarget_amd64_linux_no_xml): Likewise.
11273 (PTRACE_GETREGSET): Likewise.
11274 (PTRACE_SETREGSET): Likewise.
11275 (x86_fill_xstateregset): Likewise.
11276 (x86_store_xstateregset): Likewise.
11277 (use_xml): Likewise.
11278 (x86_linux_update_xmltarget): Likewise.
11279 (x86_linux_process_qsupported): Likewise.
11280 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11281 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11282 init_registers_i386_linux here. Call
11283 x86_linux_update_xmltarget.
11284 (the_low_target): Add x86_linux_process_qsupported.
11285
11286 * server.c (handle_query): Call target_process_qsupported.
11287
11288 * target.h (target_ops): Add process_qsupported.
11289 (target_process_qsupported): New.
11290
fc7238bb
PA
112912010-04-03 Pedro Alves <pedro@codesourcery.com>
11292
11293 * inferiors.c (add_thread): Set last_status kind to
11294 TARGET_WAITKIND_IGNORE.
11295 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11296 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11297 (linux_wait_1): Move `thread' local definition to block that uses
11298 it. Don't NULL initialize `event_child'.
11299 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11300 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11301 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11302
bdabb078
PA
113032010-04-01 Pedro Alves <pedro@codesourcery.com>
11304
11305 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11306 an extended waitstatus, or by a watchpoint.
11307 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11308 thread was stepping or has been stopped by a watchpoint.
11309
d3bbe7a0
PA
113102010-04-01 Pedro Alves <pedro@codesourcery.com>
11311
11312 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11313 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11314 of another, then delete the previous, and validate all
11315 breakpoints.
11316 (validate_inserted_breakpoint): New.
11317 (delete_disabled_breakpoints): New.
11318 (validate_breakpoints): New.
11319 (check_mem_read): Validate breakpoints before trusting their
11320 shadow. Delete disabled breakpoints.
11321 (check_mem_write): Validate breakpoints before trusting they
11322 should be inserted. Delete disabled breakpoints.
11323 * mem-break.h (validate_breakpoints):
11324 * server.c (handle_query): Validate breakpoints when we see a
11325 qSymbol query.
11326
8b07ae33
PA
113272010-04-01 Pedro Alves <pedro@codesourcery.com>
11328
11329 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11330 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11331 if we could tell there's a GDB breakpoint at stop_pc.
11332 (need_step_over_p): Don't do a step over if we find a GDB
11333 breakpoint at the resume PC.
11334
11335 * mem-break.c (struct raw_breakpoint): New.
11336 (enum bkpt_type): New type `gdb_breakpoint'.
11337 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11338 fields. New field `raw'.
11339 (find_raw_breakpoint_at): New.
11340 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11341 breakpoint instead.
11342 (set_breakpoint_at): Adjust.
11343 (delete_raw_breakpoint): New.
11344 (release_breakpoint): New.
11345 (delete_breakpoint): Rename to...
11346 (delete_breakpoint_1): ... this. Add proc parameter. Use
11347 release_breakpoint. Return ENOENT.
11348 (delete_breakpoint): Reimplement.
11349 (find_breakpoint_at): Delete.
11350 (find_gdb_breakpoint_at): New.
11351 (delete_breakpoint_at): Delete.
11352 (set_gdb_breakpoint_at): New.
11353 (delete_gdb_breakpoint_at): New.
11354 (gdb_breakpoint_here): New.
11355 (set_reinsert_breakpoint): Use release_breakpoint.
11356 (uninsert_breakpoint): Rename to ...
11357 (uninsert_raw_breakpoint): ... this.
11358 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11359 (reinsert_raw_breakpoint): Change parameter type to
11360 raw_breakpoint.
11361 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11362 instead.
11363 (check_breakpoints): Adjust. Use release_breakpoint.
11364 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11365 (breakpoint_inserted_here): Ditto.
11366 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11367 Don't trust the breakpoint's shadow if it is not inserted.
11368 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11369 (delete_all_breakpoints): Adjust.
11370 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11371 use delete_breakpoint_1.
11372
11373 * mem-break.h (breakpoints_supported): Delete declaration.
11374 (set_gdb_breakpoint_at): Declare.
11375 (gdb_breakpoint_here): Declare.
11376 (delete_breakpoint_at): Delete.
11377 (delete_gdb_breakpoint_at): Declare.
11378
11379 * server.h (struct raw_breakpoint): Forward declare.
11380 (struct process_info): New field `raw_breakpoints'.
11381
11382 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11383 breakpoints.
11384
6bf5e0ba
PA
113852010-03-24 Pedro Alves <pedro@codesourcery.com>
11386
11387 * linux-low.c (status_pending_p_callback): Fix comment.
11388 (linux_wait_for_event_1): Move most of the internal breakpoint
11389 handling from here...
11390 (linux_wait_1): ... to here.
11391 (count_events_callback): New.
11392 (select_singlestep_lwp_callback): New.
11393 (select_event_lwp_callback): New.
11394 (cancel_breakpoints_callback): New.
11395 (select_event_lwp): New.
11396 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11397 priority to all LWPs that have had events that should be reported
11398 to the client. Cancel breakpoints when about to reporting the
11399 event to the client, not while stopping lwps. No longer cancel
11400 finished single-steps here.
11401 (cancel_finished_single_step): Delete.
11402 (cancel_finished_single_steps): Delete.
11403
414a389f
PA
114042010-03-24 Pedro Alves <pedro@codesourcery.com>
11405
11406 * mem-break.c (enum bkpt_type): New.
11407 (struct breakpoint): New field `type'.
11408 (set_breakpoint_at): Change return type to struct breakpoint
11409 pointer. Set type to `other_breakpoint' by default.
11410 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11411 in the breakpoint list.
11412 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11413 (reinsert_breakpoint): Rename to ...
11414 (reinsert_raw_breakpoint): ... this.
11415 (reinsert_breakpoints_at): Adjust.
11416 * mem-break.h (struct breakpoint): Declare.
11417 (set_breakpoint_at): Change return type to struct breakpoint
11418 pointer.
11419
2280c721
PA
114202010-03-24 Pedro Alves <pedro@codesourcery.com>
11421
11422 * server.c (handle_query): Assign, not compare.
11423
d50171e4
PA
114242010-03-24 Pedro Alves <pedro@codesourcery.com>
11425
11426 Teach linux gdbserver to step-over-breakpoints.
11427
11428 * linux-low.c (can_hardware_single_step): New.
11429 (supports_breakpoints): New.
11430 (handle_extended_wait): If stopping threads, read the stop pc of
11431 the new cloned LWP.
11432 (get_pc): New.
11433 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11434 low target doesn't support retrieving the PC.
11435 (add_lwp): Set last_resume_kind to resume_continue.
11436 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11437 (linux_attach): Don't clear stop_expected. Set the lwp's
11438 last_resume_kind to resume_stop.
11439 (linux_detach_one_lwp): Don't check for removed breakpoints.
11440 (check_removed_breakpoint): Delete.
11441 (status_pending_p): Rename to ...
11442 (status_pending_p_callback): ... this. Don't check for removed
11443 breakpoints. Don't consider threads that are stopped from GDB's
11444 perspective.
11445 (linux_wait_for_lwp): Always read the stop_pc here.
11446 (cancel_breakpoint): New.
11447 (step_over_bkpt): New global.
11448 (linux_wait_for_event_1): Implement stepping over breakpoints.
11449 (gdb_wants_lwp_stopped): New.
11450 (gdb_wants_all_stopped): New.
11451 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11452 single-step traps here. Store the thread's last reported target
11453 wait status.
11454 (send_sigstop): Don't clear stop_expected. Always set it,
11455 instead.
11456 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11457 (cancel_finished_single_step): New.
11458 (cancel_finished_single_steps): New.
11459 (wait_for_sigstop): Don't cancel finished single-step traps here.
11460 (linux_resume_one_lwp): Don't check for removed breakpoints.
11461 Don't set `step' on non-hardware step archs.
11462 (linux_set_resume_request): Ignore resume_stop requests if already
11463 stopping or stopped. Set the lwp's last_resume_kind.
11464 (resume_status_pending_p): Don't check for removed breakpoints.
11465 (need_step_over_p): New.
11466 (start_step_over): New.
11467 (finish_step_over): New.
11468 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11469 requests. Clear the thread's last reported target waitstatus.
11470 Don't use the `suspended' flag. Don't consider pending breakpoints.
11471 (linux_resume): Start a step-over if necessary.
11472 (proceed_one_lwp): New.
11473 (proceed_all_lwps): New.
11474 (unstop_all_lwps): New.
11475 * linux-low.h (struct lwp_info): Rewrite comment for the
11476 `suspended' flag. Add the `stop_pc' field. Delete the
11477 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11478 Add `'last_resume_kind' and `need_step_over' fields.
11479 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11480 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11481 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11482 (set_raw_breakpoint_at): New.
11483 (set_breakpoint_at): Rewrite to use it.
11484 (reinsert_breakpoint_handler): Delete.
11485 (set_reinsert_breakpoint): New.
11486 (reinsert_breakpoint_by_bp): Delete.
11487 (delete_reinsert_breakpoints): New.
11488 (uninsert_breakpoint): Rewrite.
11489 (uninsert_breakpoints_at): New.
11490 (reinsert_breakpoint): Rewrite.
11491 (reinsert_breakpoints_at): New.
11492 (check_breakpoints): Rewrite.
11493 (breakpoint_here): New.
11494 (breakpoint_inserted_here): New.
11495 (check_mem_read): Adjust.
11496 * mem-break.h (breakpoints_supported, breakpoint_here)
11497 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11498 (reinsert_breakpoint_by_bp): Delete declaration.
11499 (delete_reinsert_breakpoints): Declare.
11500 (reinsert_breakpoint): Delete declaration.
11501 (reinsert_breakpoints_at): Declare.
11502 (uninsert_breakpoint): Delete declaration.
11503 (uninsert_breakpoints_at): Declare.
11504 (check_breakpoints): Adjust prototype.
11505 * server.h: Adjust include order.
11506 (struct thread_info): Declare here. Add a `last_status' field.
11507
30ba68cb
MS
115082010-03-23 Michael Snyder <msnyder@vmware.com>
11509
11510 * server.c (crc32): New function.
11511 (handle_query): Add handling for 'qCRC:' request.
11512
b9a881c2
PA
115132010-03-23 Pedro Alves <pedro@codesourcery.com>
11514
11515 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11516 lwp had been stopped by a watchpoint.
11517
e92d13d5
PA
115182010-03-16 Pedro Alves <pedro@codesourcery.com>
11519
11520 * server.h (internal_error): Declare.
11521 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11522 * utils.c (internal_error): New function.
11523
64daa791
AS
115242010-03-15 Andreas Schwab <schwab@redhat.com>
11525
11526 * configure.srv: Fix typo setting srv_regobj.
11527
f52cd8cd
PA
115282010-03-15 Pedro Alves <pedro@codesourcery.com>
11529
11530 * linux-low.c (fetch_register): Avoid passing a non string literal
11531 format to `error'.
11532 (usr_store_inferior_registers): Ditto.
11533
93ae6fdc
PA
115342010-03-14 Pedro Alves <pedro@codesourcery.com>
11535
11536 * linux-low.c (linux_write_memory): Bail out early if peeking
11537 memory failed.
11538
c3adc08c
PA
115392010-03-14 Pedro Alves <pedro@codesourcery.com>
11540
11541 * linux-low.h (struct lwp_info): New fields
11542 `stopped_by_watchpoint' and `stopped_data_address'.
11543 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11544 here, and cache them in the lwp object.
11545 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11546 directly.
11547 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11548 field.
11549 (linux_stopped_by_watchpoint): Rewrite.
11550 (linux_stopped_data_address): Rewrite.
11551
bce522a2
PA
115522010-03-06 Simo Melenius <simo.melenius@iki.fi>
11553
11554 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11555 switching the current inferior, not before.
11556
90884b2b
L
115572010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11558
11559 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11560 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11561 i386-linux.c and amd64-linux.c.
11562 (reg-i386.o): Removed.
11563 (reg-i386.c): Likewise.
11564 (reg-i386-linux.o): Likewise.
11565 (reg-i386-linux.c): Likewise.
11566 (reg-x86-64.o): Likewise.
11567 (reg-x86-64.c): Likewise.
11568 (reg-x86-64-linux.o): Likewise.
11569 (reg-x86-64-linux.c): Likewise.
11570 (i386.o): New.
11571 (i386.c): Likewise.
11572 (i386-linux.o): Likewise.
11573 (i386-linux.c): Likewise.
11574 (amd64.o): Likewise.
11575 (amd64.c): Likewise.
11576 (amd64-linux.o): Likewise.
11577 (amd64-linux.c): Likewise.
11578
11579 * configure.srv (srv_i386_regobj): New.
11580 (srv_i386_linux_regobj): Likewise.
11581 (srv_amd64_regobj): Likewise.
11582 (srv_amd64_linux_regobj): Likewise.
11583 (srv_i386_32bit_xmlfiles): Likewise.
11584 (srv_i386_64bit_xmlfiles): Likewise.
11585 (srv_i386_xmlfiles): Likewise.
11586 (srv_amd64_xmlfiles): Likewise.
11587 (srv_i386_linux_xmlfiles): Likewise.
11588 (srv_amd64_linux_xmlfiles): Likewise.
11589 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11590 srv_xmlfiles to $srv_i386_xmlfiles.
11591 (i[34567]86-*-mingw32ce*): Likewise.
11592 (i[34567]86-*-mingw*): Likewise.
11593 (i[34567]86-*-nto*): Likewise.
11594 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11595 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11596 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11597 (x86_64-*-linux*): Likewise.
11598
11599 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11600 (init_registers_amd64_linux): New.
11601 (x86_arch_setup): Replace init_registers_x86_64_linux with
11602 init_registers_amd64_linux.
11603
193f13e6
MK
116042010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11605
11606 * configure.ac: Check for libdl. If it is not available link against
11607 static libthread_db.
11608 * configure: Regenerate.
11609
85d721b8
PA
116102010-02-22 Pedro Alves <pedro@codesourcery.com>
11611
11612 PR9605
11613
11614 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11615 handing a read watchpoint.
11616 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11617
6076632b
DE
116182010-02-12 Doug Evans <dje@google.com>
11619
11620 * linux-low.c (linux_supports_tracefork_flag): Document.
11621 (linux_look_up_symbols): Add comment.
11622
3327ccf7
L
116232010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11624
11625 * regcache.c (supply_register): Clear regcache if buf is NULL.
11626
0718675c 116272010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11628 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11629
11630 * inferiors.c (find_inferior): Add function documentation.
11631 (unloaded_dll): Handle the case where the unloaded dll has not
11632 been previously registered in the dll list.
11633
177321bd
DJ
116342010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11637 (thumb2_breakpoint): New.
11638 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11639
2b009048
DJ
116402010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11641
11642 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11643 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11644 breakpoints.
11645
3be029c7
PA
116462010-01-21 Pedro Alves <pedro@codesourcery.com>
11647
11648 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11649
18f5de3b
JK
116502010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11651
11652 * linux-s390-low.c (s390_collect_ptrace_register)
11653 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11654
3743bb4f
DE
116552010-01-21 Doug Evans <dje@google.com>
11656
14ce3065
DE
11657 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11658 (PTRACE_ARG4_TYPE): New macro.
11659 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11660 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11661 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11662 (usr_store_inferior_registers): Ditto.
11663 (linux_read_memory, linux_write_memory): Ditto.
11664 (linux_test_for_tracefork): Ditto.
11665
3743bb4f
DE
11666 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11667 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11668
8b315be5
PA
116692010-01-21 Pedro Alves <pedro@codesourcery.com>
11670
11671 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11672 target.
11673
85492558
PA
116742010-01-21 Pedro Alves <pedro@codesourcery.com>
11675
11676 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11677 prototype to take a regcache. Adjust.
11678
442ea881
PA
116792010-01-20 Pedro Alves <pedro@codesourcery.com>
11680
11681 * regcache.h (struct thread_info): Forward declare.
11682 (struct regcache): New.
11683 (new_register_cache): Adjust prototype.
11684 (get_thread_regcache): Declare.
11685 (free_register_cache): Adjust prototype.
11686 (registers_to_string, registers_from_string): Ditto.
11687 (supply_register, supply_register_by_name, collect_register)
11688 (collect_register_as_string, collect_register_by_name): Ditto.
11689 * regcache.c (struct inferior_regcache_data): Delete.
11690 (get_regcache): Rename to ...
11691 (get_thread_regcache): ... this. Adjust. Switch inferior before
11692 fetching registers.
11693 (regcache_invalidate_one): Adjust.
11694 (regcache_invalidate): Fix prototype.
11695 (new_register_cache): Return the new register cache.
11696 (free_register_cache): Change prototype.
11697 (realloc_register_cache): Adjust.
11698 (registers_to_string): Change prototype to take a regcache. Adjust.
11699 (registers_from_string): Ditto.
11700 (register_data): Ditto.
11701 (supply_register): Ditto.
11702 (supply_register_by_name): Ditto.
11703 (collect_register): Ditto.
11704 (collect_register_as_string): Ditto.
11705 (collect_register_by_name): Ditto.
11706 * server.c (process_serial_event): Adjust.
11707 * linux-low.h (regset_fill_func, regset_store_func): Change
11708 prototype.
11709 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11710 Change prototype.
11711 * linux-low.c (get_stop_pc): Adjust.
11712 (check_removed_breakpoint): Adjust.
11713 (linux_wait_for_event): Adjust.
11714 (linux_resume_one_lwp): Adjust.
11715 (fetch_register): Add regcache parameter. Adjust.
11716 (usr_store_inferior_registers): Ditto.
11717 (regsets_fetch_inferior_registers): Ditto.
11718 (regsets_store_inferior_registers): Ditto.
11719 (linux_fetch_registers, linux_store_registers): Ditto.
11720 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11721 regcache. Adjust.
43aaf8b6
PA
11722 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11723 Ditto.
442ea881
PA
11724 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11725 prototype to take a regcache.
11726 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11727 * remote-utils.c (convert_ascii_to_int, outreg)
11728 (prepare_resume_reply): Change prototype to take a regcache.
11729 Adjust.
11730 * target.h (struct target_ops) <fetch_registers, store_registers>:
11731 Change prototype to take a regcache.
11732 (fetch_inferior_registers, store_inferior_registers): Change
11733 prototype to take a regcache. Adjust.
11734 * proc-service.c (ps_lgetregs): Adjust.
11735 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11736 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11737 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11738 take a regcache. Adjust.
11739 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11740 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11741 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11742 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11743 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11744 (cris_cannot_fetch_register):
11745 (cris_breakpoint_at): Change prototype to take a regcache.
11746 Adjust.
11747 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11748 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11749 to take a regcache. Adjust.
11750 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11751 Adjust.
11752 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11753 take a regcache. Adjust.
11754 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11755 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11756 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11757 * linux-mips-low.c (mips_get_pc):
11758 (mips_set_pc): Change prototype to take a regcache. Adjust.
11759 (mips_reinsert_addr): Adjust.
11760 (mips_collect_register): Change prototype to take a regcache.
11761 Adjust.
11762 (mips_supply_register):
11763 (mips_collect_register_32bit, mips_supply_register_32bit)
11764 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11765 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11766 * linux-ppc-low.c (ppc_supply_ptrace_register)
11767 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11768 (parse_spufs_run): Adjust.
11769 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11770 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11771 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11772 take a regcache. Adjust.
11773 * linux-s390-low.c (s390_collect_ptrace_register)
11774 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11775 (s390_set_pc): Change prototype to take a regcache. Adjust.
11776 (s390_arch_setup): Adjust.
11777 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11778 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11779 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11780 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11781 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11782 regcache. Adjust.
11783 (sparc_breakpoint_at): Adjust.
11784 * linux-xtensa-low.c (xtensa_fill_gregset):
11785 (xtensa_store_gregset):
11786 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11787 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11788 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11789 prototype to take a regcache. Adjust.
11790 * win32-arm-low.c (arm_fetch_inferior_register)
11791 (arm_store_inferior_register): Change prototype to take a
11792 regcache. Adjust.
11793 * win32-i386-low.c (i386_fetch_inferior_register)
11794 (i386_store_inferior_register): Change prototype to take a
11795 regcache. Adjust.
11796 * win32-low.c (child_fetch_inferior_registers)
11797 (child_store_inferior_registers): Change prototype to take a
11798 regcache. Adjust.
11799 (win32_wait): Adjust.
11800 (win32_fetch_inferior_registers): Change prototype to take a
11801 regcache. Adjust.
11802 (win32_store_inferior_registers): Adjust.
11803 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11804 store_inferior_register>: Change prototype to take a regcache.
11805
60c3d7b0
DE
118062010-01-20 Doug Evans <dje@google.com>
11807
11808 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11809 #ifdef.
11810 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11811 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11812
dc146f7c
VP
118132010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11814
11815 * linux-low.c (linux_core_of_thread): New.
11816 (compare_ints, show_process, list_threads): New.
11817 (linux_qxfer_osdata): Report threads and cores.
11818 (linux_target_op): Register linux_core_of_thread.
11819 * remote-utils.c (prepare_resume_reply): Report the core.
11820 (buffer_xml_printf): Support %d specifier.
11821 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11822 New.
11823 (handle_query): Handle qXfer:threads. Announce availability
11824 thereof.
11825 * target.h (struct target_ops): New field core_of_thread.
11826
7803799a
UW
118272010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11828
11829 * Makefile.in (clean): Remove new generated files.
11830 (reg-s390.o, reg-s390.c): Remove rules.
11831 (reg-s390x.o, reg-s390x.c): Likewise.
11832 (s390-linux32.o, s390-linux32.c): Add rules.
11833 (s390-linux64.o, s390-linux64.c): Likewise.
11834 (s390x-linux64.o, s390x-linux64.c): Likewise.
11835 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11836 * linux-s390-low.c: Include <elf.h>.
11837 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11838 (init_registers_s390): Remove prototype.
11839 (init_registers_s390x): Likewise.
11840 (init_registers_s390_linux32): Add prototype.
11841 (init_registers_s390_linux64): Likewise.
11842 (init_registers_s390x_linux64): Likewise.
11843 (s390_num_regs_3264): New define.
11844 (s390_regmap_3264): New global variable.
11845 (s390_cannot_fetch_register): Remove obsolete check.
11846 (s390_cannot_store_register): Likewise.
11847 (s390_collect_ptrace_register): Handle upper/lower register halves.
11848 (s390_supply_ptrace_register): Likewise.
11849 (s390_fill_gregset): Update to register number changes.
11850 (s390_get_hwcap): New routine.
11851 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11852 Install appropriate regmap and register set.
11853
6e7ffa39
JB
118542010-01-01 Joel Brobecker <brobecker@adacore.com>
11855
11856 * server.c (gdbserver_version): Update copyright year to 2010.
11857 * gdbreplay.c (gdbreplay_version): Likewise.
11858
957f3f49
DE
118592009-12-28 Doug Evans <dje@google.com>
11860
11861 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11862 elf/external.h. Include <elf.h> instead but only if necessary.
11863
ca5c370d
PA
118642009-12-28 Pedro Alves <pedro@codesourcery.com>
11865
11866 * linux-low.c (linux_remove_process): Remove `detaching'
11867 parameter. Don't release/detach from thread_db here.
11868 (linux_kill): Release/detach from thread_db here, ...
11869 (linux_detach): ... and here, before actually detaching.
11870 (linux_wait_1): ... and here, when a process exits.
11871 * thread-db.c (any_thread_of): New.
11872 (thread_db_free): Switch the current inferior to a thread of the
11873 passed in process.
11874
4ee62156
DE
118752009-12-21 Doug Evans <dje@google.com>
11876
d90e6a88
DE
11877 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11878
c5f62d5f
DE
11879 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11880 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11881 warning ifndef __NR_tkill. Move setting of errno there too.
11882 Delete unnecessary resetting of errno after syscall.
11883 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11884
10e86dd7
DE
11885 * configure.ac: Check for dladdr.
11886 * config.in: Regenerate.
11887 * configure: Regenerate.
11888 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11889 (try_thread_db_load): Update.
11890
4ee62156
DE
11891 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11892
00f515da
DE
118932009-12-18 Doug Evans <dje@google.com>
11894
e9464885
DE
11895 * event-loop.c: Include unistd.h if it exists.
11896
07d4f67e
DE
11897 * linux-low.c (my_waitpid): Move definition away from being in
11898 between linux_tracefork_child/linux_test_for_tracefork.
11899
00f515da
DE
11900 * gdb_proc_service.h (psaddr_t): Fix type.
11901 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11902 signature to match glibc.
11903
1de1badb
DE
119042009-12-16 Doug Evans <dje@google.com>
11905
11906 * linux-low.c (linux_read_memory): Fix argument to read.
11907
aeeb81d1
PA
119082009-11-26 Pedro Alves <pedro@codesourcery.com>
11909
11910 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11911 events, don't leave current_inferior pointing at null.
11912
10357975
PA
119132009-11-26 Pedro Alves <pedro@codesourcery.com>
11914
11915 * win32-low.c (LOG): Delete.
11916 (OUTMSG): Output to stderr.
11917 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11918 on compile time LOG macro.
11919 (win32_wait): Fix debug output.
11920
cf6e3471
PA
119212009-11-26 Pedro Alves <pedro@codesourcery.com>
11922
11923 * win32-low.c (win32_add_one_solib): If the dll name is
11924 "ntdll.dll", prepend the system directory to the dll path.
11925
0c85e18e
MK
119262009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11927
11928 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11929
9ac544ce 119302009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11931 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11932
11933 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11934 * configure.ac: Check for __mcoldfire__ and set
11935 gdb_cv_m68k_is_coldfire.
11936 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11937 reg-cf.o and reg-m68k.o.
11938 * configure: Regenerated.
11939
fd7dd3e6
PA
119402009-11-16 Pedro Alves <pedro@codesourcery.com>
11941
11942 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11943 Pass it to thread_db_free.
11944 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11945 proper `detaching' argument to linux_remove_process.
11946 * linux-low.h (thread_db_free): Add `detaching' parameter.
11947 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11948 to thread_db_free.
11949 (thread_db_free): Add `detaching' parameter. Only
11950 call td_ta_clear_event if detaching from process.
11951
75aa492e
MK
119522009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11953
11954 * thread-db.c (thread_db_free): Fix typo.
11955
21e1bee4
PP
119562009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11957
11958 PR gdb/10838
11959 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11960
8838b45e
NS
119612009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11962
11963 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11964 with an i686 compiler.
11965 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11966 needed.
11967 * configure: Rebuilt.
11968
8a35fb51
SL
119692009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11970
11971 PR gdb/10783
11972
11973 * server.c (handle_search_memory_1): Correct read_addr initialization
11974 in loop for searching subsequent chunks.
11975
96f15937
PP
119762009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11977
11978 * configure.ac: New --with-libthread-db option.
11979 * thread-db.c: Allow direct dependence on libthread_db.
11980 (thread_db_free): Adjust.
11981 * config.in: Regenerate.
11982 * configure: Likewise.
889bf7c5 11983
5f7d1694
PP
119842009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11985
11986 PR gdb/10757
11987 * thread-db.c (attach_thread): New function.
11988 (maybe_attach_thread): Return success/failure.
11989 (find_new_threads_callback): Adjust.
889bf7c5
PA
11990 (thread_db_find_new_threads): Loop until no new threads.
11991
88e3b899
PA
119922009-10-13 Pedro Alves <pedro@codesourcery.com>
11993
11994 * proc-service.c (ps_lgetregs): Formatting.
11995
cdbfd419
PP
119962009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11997
11998 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11999 * configure.ac: Adjust.
12000 * linux-low.h (struct process_info_private): Move members to struct
12001 thread_db.
12002 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12003 * linux-low.c (linux_remove_process): Adjust.
12004 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12005 * server.c (handle_query): Move code ...
12006 (handle_monitor_command): ... here. New function.
12007 * target.h (struct target_ops): New member.
12008 * thread-db.c (struct thread_db): New.
12009 (libthread_db_search_path): New variable.
12010 (thread_db_create_event, thread_db_enable_reporting)
12011 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12012 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12013 (try_thread_db_load_1, dladdr_to_soname): New functions.
12014 (try_thread_db_load, thread_db_load_search): New functions.
12015 (thread_db_init): Search for libthread_db.
12016 (thread_db_free): New function.
12017 (thread_db_handle_monitor_command): Likewise.
12018 * config.in: Regenerate.
12019 * configure: Regenerate.
889bf7c5 12020
4168d2d6
UW
120212009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12022
12023 * spu-low.c (spu_kill): Wait for inferior to terminate.
12024 Call clear_inferiors.
12025 (spu_detach): Call clear_inferiors.
12026
81ecdfbb
RW
120272009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12028
12029 * aclocal.m4: Regenerate.
12030 * config.in: Likewise.
12031 * configure: Likewise.
12032
0b9ff2c0
UW
120332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12034
12035 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12036 (parse_spufs_run): New function.
12037 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12038 (ppc_breakpoint_at): Handle SPU breakpoints.
12039
efcbbd14
UW
120402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12041
12042 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12043 (SPUFS_MAGIC): Define.
12044 (spu_enumerate_spu_ids): New function.
12045 (linux_qxfer_spu): New function.
12046 (linux_target_ops): Install linux_qxfer_spu.
12047
f4d9bade
UW
120482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12049
12050 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12051 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12052 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12053 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12054 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12055 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12056 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12057 (init_registers_powerpc_cell32l): Add prototype.
12058 (init_registers_powerpc_cell64l): Likewise.
12059 (ppc_arch_setup): Detect Cell/B.E. architecture.
12060
96e946ca
RW
120612009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12062
12063 * Makefile.in (datarootdir): New variable.
12064
58d6951d
DJ
120652009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12066
12067 * linux-low.c (linux_write_memory): Update debugging output.
12068 * Makefile.in (clean): Add new descriptions.
12069 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12070 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12071 * configure.srv: Add new files for arm*-*-linux*.
12072 * linux-arm-low.c: Add new declarations.
12073 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12074 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12075 (HWCAP_VFPv3D16): New.
12076 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12077 instead of __IWMMXT__.
12078 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12079 (arm_arch_setup): New.
12080 (target_regsets): Remove #ifdef. Add VFP regset.
12081 (the_low_target): Use arm_arch_setup.
12082
12b42a12
DJ
120832009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12084
12085 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12086 the main thread again.
12087
ac8c974e
AR
120882009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12089
12090 Adding Neutrino gdbserver.
12091 * configure: Regenerated.
12092 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12093 * configure.srv (i[34567]86-*-nto*): New target.
12094 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12095 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12096 (nto_comctrl) [__QNX__]: New function.
12097 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12098
4424e0c3 120992009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12100
12101 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12102 srv_tgtobj.
12103
912cf4ba
PA
121042009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12105 Pedro Alves <pedro@codesourcery.com>
12106
12107 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12108 don't support CONTEXT_EXTENDED_REGISTERS.
12109 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12110 (the_low_target): Install them.
12111 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12112 failing with ERROR_PIPE_NOT_CONNECTED.
12113
aa5ca48f
DE
121142009-06-30 Doug Evans <dje@google.com>
12115 Pierre Muller <muller@ics.u-strasbg.fr>
12116
12117 Add h/w watchpoint support to x86-linux, win32-i386.
12118 * Makefile.in (SFILES): Add i386-low.c
12119 (i386_low_h): Define.
12120 (i386-low.o): Add dependencies.
12121 (linux-x86-low.o): Add i386-low.h dependency.
12122 (win32-i386-low.o): Ditto.
12123 * i386-low.c: New file.
12124 * i386-low.h: New file.
12125 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12126 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12127 * linux-low.c (linux_add_process): Initialize arch_private.
12128 (linux_remove_process): Free arch_private.
12129 (add_lwp): Initialize arch_private.
12130 (delete_lwp): Free arch_private.
12131 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12132 provided.
12133 * linux-low.h (process_info_private): New member arch_private.
12134 (lwp_info): New member arch_private.
12135 (linux_target_ops): New members new_process, new_thread,
12136 prepare_to_resume.
12137 (ptid_of): New macro.
12138 * linux-x86-low.c: Include stddef.h, i386-low.h.
12139 (arch_process_info): New struct.
12140 (arch_lwp_info): New struct.
12141 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12142 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12143 (i386_dr_low_get_status): New function.
12144 (x86_insert_point, x86_remove_point): New functions.
12145 (x86_stopped_by_watchpoint): New function.
12146 (x86_stopped_data_address): New function.
12147 (x86_linux_new_process, x86_linux_new_thread): New functions.
12148 (x86_linux_prepare_to_resume): New function.
12149 (the_low_target): Add entries for insert_point, remove_point,
12150 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12151 prepare_to_resume.
12152 * server.c (debug_hw_points): New global.
12153 (monitor_show_help): Document set debug-hw-points.
12154 (handle_query): Process "set debug-hw-points".
12155 * server.h (debug_hw_points): Declare.
12156 (paddress): Declare.
12157 * utils.c (NUMCELLS, CELLSIZE): New macros.
12158 (get_sell, xsnprintf, paddress): New functions.
12159 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12160 remove_point, stopped_by_watchpoint, stopped_data_address.
12161 * win32-i386-low.c: Include i386-low.h.
12162 (debug_reg_state): Replaces dr.
12163 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12164 (i386_dr_low_get_status): New function.
12165 (i386_insert_point, i386_remove_point): New functions.
12166 (i386_stopped_by_watchpoint): New function.
12167 (i386_stopped_data_address): New function.
12168 (i386_initial_stuff): Update.
12169 (get_thread_context,set_thread_context,i386_thread_added): Update.
12170 (the_low_target): Add entries for insert_point,
12171 remove_point, stopped_by_watchpoint, stopped_data_address.
12172 * win32-low.c (win32_insert_watchpoint): New function.
12173 (win32_remove_watchpoint): New function.
12174 (win32_stopped_by_watchpoint): New function.
12175 (win32_stopped_data_address): New function.
12176 (win32_target_ops): Add entries for insert_watchpoint,
12177 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12178 * win32-low.h (win32_target_ops): New members insert_point,
12179 remove_point, stopped_by_watchpoint, stopped_data_address.
12180
d993e290
PA
121812009-06-25 Pedro Alves <pedro@codesourcery.com>
12182
12183 * server.c (process_serial_event): Re-return unsupported, not
12184 error, if the type isn't recognized. Re-allow supporting only
12185 insert or remove packets. Also call require_running for
12186 breakpoints. Add missing break statement to default case. Tidy.
12187 * target.h (struct target_ops): Rename insert_watchpoint to
12188 insert_point, and remove_watchpoint to remove_point.
12189
12190 * linux-low.h (struct linux_target_ops): Likewise.
12191 * linux-low.c (linux_insert_watchpoint): Rename to ...
12192 (linux_insert_point): ... this. Adjust.
12193 (linux_remove_watchpoint): Rename to ...
12194 (linux_remove_point): ... this. Adjust.
12195 (linux_target_ops): Adjust.
12196 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12197 (cris_insert_point): ... this.
12198 (cris_remove_watchpoint): Rename to ...
12199 (cris_remove_point): ... this.
12200 (the_low_target): Adjust.
12201
0f54c268
PM
122022009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12203
12204 * server.c (handle_v_kill): Pass signal_pid to
12205 kill_inferior if multi_process is zero.
12206
c6314022
AR
122072009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12208
12209 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12210 * target.h (target_ops): Comment for *_watchpoint to make it clear
12211 the functions can get types '0' and '1'.
12212
4463ce24
AR
122132009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12214
12215 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12216 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12217 * regcache.c (get_regcache): Likewise.
12218 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12219 * win32-low.c (child_fetch_inferior_registers): Remove check for
12220 regno 0.
12221
cf8fd78b
PA
122222009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12223 Pedro Alves <pedro@codesourcery.com>
12224
12225 * target.h (struct target_ops) <supports_multi_process>: New
12226 callback.
12227 (target_supports_multi_process): New.
12228 * server.c (handle_query): Even if GDB reports support, only
12229 enable multi-process if the target also supports it. Report
12230 multi-process support only if the target backend supports it.
12231 * linux-low.c (linux_supports_multi_process): New function.
12232 (linux_target_ops): Install it as target_supports_multi_process
12233 callback.
12234
47c0c975
DE
122352009-05-24 Doug Evans <dje@google.com>
12236
e09875d4
DE
12237 Global renaming of find_thread_pid to find_thread_ptid.
12238 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12239 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12240 All callers updated.
12241
e27d73f6
DE
12242 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12243 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12244 directly.
12245
47c0c975
DE
12246 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12247 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12248 (linux_resume_one_lwp): Ditto.
12249
2acc282a
DE
122502009-05-23 Doug Evans <dje@google.com>
12251
12252 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12253 from struct inferior_list_entry * to struct lwp_info *.
12254 All callers updated.
12255
9f1036c1
DE
122562009-05-13 Doug Evans <dje@google.com>
12257
12258 * linux-x86-low.c: Don't include assert.h.
12259 (x86_siginfo_fixup): Use fatal, not assert.
12260 (x86_arch_setup): Fix comment.
12261
d0722149
DE
122622009-05-12 Doug Evans <dje@google.com>
12263
12264 Biarch support for i386/amd64 gdbserver.
12265 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12266 Add linux-x86-low.c.
12267 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12268 (linux-x86-low.o): Add.
12269 * linux-x86-64-low.c: Delete.
12270 * linux-i386-low.c: Delete.
12271 * linux-x86-low.c: New file.
12272 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12273 linux-x86-low.o.
12274 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12275 linux-x86-low.o.
12276 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12277 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12278 (linux_child_pid_to_exec_file): New function.
12279 (elf_64_header_p, elf_64_file_p): New functions.
12280 (siginfo_fixup): New function.
12281 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12282 give target a chance to convert layout.
12283 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12284 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12285
fdeb2a12
DE
122862009-05-07 Doug Evans <dje@google.com>
12287
12288 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12289 (regsets_store_inferior_registers): Ditto.
12290
a6dbe5df
PA
122912009-05-06 Pedro Alves <pedro@codesourcery.com>
12292
12293 PR server/10048
12294
12295 * linux-low.c (must_set_ptrace_flags): Delete.
12296 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12297 of the global.
12298 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12299 `lwp->must_set_ptrace_flags' instead.
ba42693b 12300 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12301 (linux_wait_1): ... not here.
12302
5091eb23
DE
123032009-04-30 Doug Evans <dje@google.com>
12304
9f767825
DE
12305 * inferiors.c (started_inferior_callback): New function.
12306 (attached_inferior_callback): New function.
12307 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12308 * server.c (print_started_pid, print_attached_pid): New functions.
12309 (detach_or_kill_for_exit): New function.
12310 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12311 * server.h (have_started_inferiors_p): Declare.
12312 (have_attached_inferiors_p): Declare.
12313
5091eb23
DE
12314 * inferiors.c (remove_process): Fix memory leak, free process.
12315 * linux-low.c (linux_remove_process): New function.
12316 (linux_kill): Call it instead of remove_process.
12317 (linux_detach, linux_wait_1): Ditto.
12318
155c8968
PA
123192009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12320
12321 * configure.srv: Add x86 Windows CE target.
12322
7fe519cb
UW
123232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12324
12325 * inferiors.c (get_thread_process): Make global.
12326 * server.h (get_thread_process): Add prototype.
12327 * thread-db.c (find_one_thread): Use get_thread_process
12328 instead of current_process.
12329 (thread_db_get_tls_address): Do not crash if called when
12330 thread layer is not yet initialized.
12331
5472f405
UW
123322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12333
12334 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12335 * spu-low.c (current_tid): Rename to ...
12336 (current_ptid): ... this.
12337 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12338 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12339 ptid_get_lwp (current_ptid) instead of current_tid.
12340 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12341 instead of current_tid. Use find_process_pid to verify pid
12342 argument is valid. Pass proper argument to remove_process.
12343 (spu_thread_alive): Compare current_ptid instead of current_tid.
12344 (spu_resume): Likewise.
12345
55ac2b99
PA
123462009-04-02 Pedro Alves <pedro@codesourcery.com>
12347
12348 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12349 variable.
12350
95954743
PA
123512009-04-01 Pedro Alves <pedro@codesourcery.com>
12352
12353 Implement the multiprocess extensions, and add linux multiprocess
12354 support.
12355
12356 * server.h (ULONGEST): Declare.
12357 (struct ptid, ptid_t): New.
12358 (minus_one_ptid, null_ptid): Declare.
12359 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12360 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12361 (struct inferior_list_entry): Change `id' type from unsigned from
12362 to ptid_t.
12363 (struct sym_cache, struct breakpoint, struct
12364 process_info_private): Forward declare.
12365 (struct process_info): Declare.
12366 (current_process): Declare.
12367 (all_processes): Declare.
12368 (initialize_inferiors): Declare.
12369 (add_thread): Adjust to use ptid_t.
12370 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12371 (add_process, remove_process, find_thread_pid): Declare.
12372 (find_inferior_id): Adjust to use ptid_t.
12373 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12374 (multi_process): Declare.
12375 (push_event): Adjust to use ptid_t.
12376 (read_ptid, write_ptid): Declare.
12377 (prepare_resume_reply): Adjust to use ptid_t.
12378 (clear_symbol_cache): Declare.
12379 * inferiors.c (all_processes): New.
12380 (null_ptid, minus_one_ptid): New.
12381 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12382 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12383 (add_thread): Change unsigned long to ptid. Remove gdb_id
12384 parameter. Adjust.
12385 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12386 (gdb_id_to_thread): Rename to ...
12387 (find_thread_pid): ... this. Change unsigned long to ptid.
12388 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12389 (loaded_dll, pull_pid_from_list): Adjust.
12390 (add_process, remove_process, find_process_pid)
12391 (get_thread_process, current_process, initialize_inferiors): New.
12392 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12393 (struct target_waitstatus) <related_pid>: Ditto.
12394 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12395 return type to int.
12396 (struct target_ops) <join>: Add `pid' argument.
12397 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12398 (struct target_ops) <wait>: Add `ptid' field. Change return type
12399 to ptid.
12400 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12401 (mywait): Add `ptid' argument. Change return type to ptid_t.
12402 (target_pid_to_str): Declare.
12403 * target.c (set_desired_inferior): Adjust to use ptids.
12404 (mywait): Add new `ptid' argument. Adjust.
12405 (target_pid_to_str): New.
12406 * mem-break.h (free_all_breakpoints): Declare.
12407 * mem-break.c (breakpoints): Delelete.
12408 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12409 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12410 to use per-process breakpoint list.
12411 (free_all_breakpoints): New.
12412 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12413 (symbol_cache, all_symbols_looked_up): Delete.
12414 (hexchars): New.
12415 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12416 read_ptid): New.
12417 (prepare_resume_reply): Change ptid argument's type from unsigned
12418 long to ptid_t. Adjust. Implement W;process and X;process.
12419 (free_sym_cache, clear_symbol_cache): New.
12420 (look_up_one_symbol): Adjust to per-process symbol cache. *
12421 * server.c (cont_thread, general_thread, step_thread): Change type
12422 to ptid_t.
12423 (attached): Delete.
12424 (multi_process): New.
12425 (last_ptid): Change type to ptid_t.
12426 (struct vstop_notif) <ptid>: Change type to ptid_t.
12427 (queue_stop_reply, push_event): Change `ptid' argument's type to
12428 ptid_t.
12429 (discard_queued_stop_replies): Add `pid' argument.
12430 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12431 changes. Don't reference the `attached' global.
12432 (attach_inferior): Adjust to mywait interface changes.
12433 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12434 features. Handle and report "multiprocess+". Handle
12435 "qAttached:PID".
12436 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12437 changes.
12438 (handle_v_kill): New.
12439 (handle_v_stopped): Adjust to use target_pid_to_str.
12440 (handle_v_requests): Allow multiple attaches and runs when
12441 multiprocess extensions are in effect. Handle "vKill".
12442 (myresume): Adjust to use ptids.
12443 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12444 (handle_status): Adjust to discard_queued_stop_replies interface
12445 change.
12446 (first_thread_of, kill_inferior_callback)
12447 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12448 (main): Call initialize_inferiors. Adjust to use ptids, killing
12449 and detaching from all inferiors. Handle multiprocess packet
12450 variants.
12451 * linux-low.h: Include gdb_proc_service.h.
12452 (struct process_info_private): New.
12453 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12454 <lwpid_of>: Use ptid_get_lwp.
12455 (get_lwp_thread): Adjust.
12456 (struct lwp_info): Add `dead' member.
12457 (find_lwp_pid): Declare.
12458 * linux-low.c (thread_db_active): Delete.
12459 (new_inferior): Adjust comment.
12460 (inferior_pid): Delete.
12461 (linux_add_process): New.
12462 (handle_extended_wait): Adjust.
12463 (add_lwp): Change unsigned long to ptid.
12464 (linux_create_inferior): Add process to processes table. Adjust
12465 to use ptids. Don't set new_inferior here.
12466 (linux_attach_lwp): Rename to ...
12467 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12468 it. Adjust to use ptids.
12469 (linux_attach_lwp): New.
12470 (linux_attach): Add process to processes table. Don't set
12471 new_inferior here.
12472 (struct counter): New.
12473 (second_thread_of_pid_p, last_thread_of_process_p): New.
12474 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12475 multiple processes.
12476 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12477 processes. Remove process from process table.
12478 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12479 to multiple processes.
12480 (any_thread_of): New.
12481 (linux_detach): Add `pid' argument, and handle it. Remove process
12482 from processes table.
12483 (linux_join): Add `pid' argument. Handle it.
12484 (linux_thread_alive): Change unsighed long argument to ptid_t.
12485 Consider dead lwps as not being alive.
12486 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12487 threads we're not interested in.
12488 (same_lwp, find_lwp_pid): New.
12489 (linux_wait_for_lwp): Change `pid' argument's type from int to
12490 ptid_t. Adjust.
12491 (linux_wait_for_event): Rename to ...
12492 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12493 from int to ptid_t. Adjust.
12494 (linux_wait_for_event): New.
12495 (linux_wait_1): Add `ptid' argument. Change return type to
12496 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12497 that exit from the process table.
12498 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12499 Adjust.
12500 (mark_lwp_dead): New.
12501 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12502 stopping all threads, mark its main lwp as dead.
12503 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12504 ptids.
12505 (fetch_register, usr_store_inferior_registers)
12506 (regsets_fetch_inferior_registers)
12507 (regsets_store_inferior_registers, linux_read_memory)
12508 (linux_write_memory): Inline `inferior_pid'.
12509 (linux_look_up_symbols): Adjust to use per-process
12510 `thread_db_active'.
12511 (linux_request_interrupt): Adjust to use ptids.
12512 (linux_read_auxv): Inline `inferior_pid'.
12513 (initialize_low): Don't reference thread_db_active.
12514 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12515 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12516 (ps_getpid): Return the pid of the current inferior.
12517 * thread-db.c (proc_handle, thread_agent): Delete.
12518 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12519 per-process data.
12520 (find_one_thread): Change argument type to ptid_t. Adjust to
12521 per-process data.
12522 (maybe_attach_thread): Adjust to per-process data and ptids.
12523 (thread_db_find_new_threads): Ditto.
12524 (thread_db_init): Ditto.
12525 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12526 processes table. Adjust to use ptids.
12527 (spu_kill, spu_detach): Adjust interface. Remove process from
12528 processes table.
12529 (spu_join, spu_thread_alive): Adjust interface.
12530 (spu_wait): Adjust interface. Remove process from processes
12531 table. Adjust to use ptids.
12532 * win32-low.c (current_inferior_tid): Delete.
12533 (current_inferior_ptid): New.
12534 (debug_event_ptid): New.
12535 (thread_rec): Take a ptid. Adjust.
12536 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12537 (child_delete_thread): Ditto.
12538 (do_initial_child_stuff): Add `attached' argument. Add process to
12539 processes table.
12540 (child_fetch_inferior_registers, child_store_inferior_registers):
12541 Adjust.
12542 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12543 (win32_attach): Pass 1 to do_initial_child_stuff.
12544 (win32_kill): Adjust interface. Remove process from processes
12545 table.
12546 (win32_detach): Ditto.
12547 (win32_join): Adjust interface.
12548 (win32_thread_alive): Take a ptid.
12549 (win32_resume): Adjust to use ptids.
12550 (get_child_debug_event): Ditto.
12551 (win32_wait): Adjust interface. Remove exiting process from
12552 processes table.
12553
bd99dc85
PA
125542009-04-01 Pedro Alves <pedro@codesourcery.com>
12555
12556 Non-stop mode support.
12557
12558 * server.h (non_stop): Declare.
12559 (gdb_client_data, handler_func): Declare.
12560 (delete_file_handler, add_file_handler, start_event_loop):
12561 Declare.
12562 (handle_serial_event, handle_target_event, push_event)
12563 (putpkt_notif): Declare.
12564 * target.h (enum resume_kind): New.
12565 (struct thread_resume): Replace `step' field by `kind' field.
12566 (TARGET_WNOHANG): Define.
12567 (struct target_ops) <wait>: Add `options' argument.
12568 <supports_non_stop, async, start_non_stop>: New fields.
12569 (target_supports_non_stop, target_async): New.
12570 (start_non_stop): Declare.
12571 (mywait): Add `options' argument.
12572 * target.c (mywait): Add `options' argument. Print child exit
12573 notifications here.
12574 (start_non_stop): New.
12575 * server.c (non_stop, own_buf, mem_buf): New globals.
12576 (struct vstop_notif): New.
12577 (notif_queue): New global.
12578 (queue_stop_reply, push_event, discard_queued_stop_replies)
12579 (send_next_stop_reply): New.
12580 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12581 interface changes.
12582 (attach_inferior): In non-stop mode, don't wait for the target
12583 here.
12584 (handle_general_set): Handle QNonStop.
12585 (handle_query): When handling qC, return the current general
12586 thread, instead of the first thread of the list.
12587 (handle_query): If the backend supports non-stop mode, include
12588 QNonStop+ in the qSupported query response.
12589 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12590 and non-stop mode.
12591 (handle_v_attach, handle_v_run): Handle non-stop mode.
12592 (handle_v_stopped): New.
12593 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12594 (myresume): Adjust to use resume_kind. Handle non-stop.
12595 (queue_stop_reply_callback): New.
12596 (handle_status): Handle non-stop mode.
12597 (main): Clear non_stop flag on reconnection. Use the event-loop.
12598 Refactor serial protocol handling from here ...
12599 (process_serial_event): ... to this new function. When GDB
12600 selects any thread, select one here. In non-stop mode, wait until
12601 GDB acks all pending events before exiting.
12602 (handle_serial_event, handle_target_event): New.
12603 * remote-utils.c (remote_open): Install remote_desc in the event
12604 loop.
12605 (remote_close): Remove remote_desc from the event loop.
12606 (putpkt_binary): Rename to...
12607 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12608 (putpkt_binary): New as wrapper around putpkt_binary_1.
12609 (putpkt_notif): New.
12610 (prepare_resume_reply): In non-stop mode, don't change the
12611 general_thread.
12612 * event-loop.c: New.
12613 * Makefile.in (OBJ): Add event-loop.o.
12614 (event-loop.o): New rule.
12615
12616 * linux-low.h (pid_of): Moved here.
12617 (lwpid_of): New.
12618 (get_lwp_thread): Use lwpid_of.
12619 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12620 * linux-low.c (pid_of): Delete.
12621 (inferior_pid): Use lwpid_of.
12622 (linux_event_pipe): New.
12623 (target_is_async_p): New.
12624 (delete_lwp): New.
12625 (handle_extended_wait): Use lwpid_of.
12626 (add_lwp): Don't set lwpid field.
12627 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12628 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12629 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12630 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12631 first. Adjust to linux_wait_for_event interface changes. Use
12632 lwpid_of.
12633 (linux_detach): Don't delete the main lwp here.
12634 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12635 (status_pending_p): Don't consider explicitly suspended lwps.
12636 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12637 pointer. Add OPTIONS argument. Change return type to int. Use
12638 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12639 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12640 pointer. Add status pointer argument. Return a pid instead of a
12641 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12642 changes. In non-stop mode, don't switch to a random thread.
12643 (linux_wait): Rename to...
12644 (linux_wait_1): ... this. Add target_options argument, and handle
12645 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12646 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12647 clean exit and signal exit code. Don't stop all threads in
12648 non-stop mode. In all-stop mode, only stop all threads when
12649 reporting a stop to GDB. Handle explicit thread stop requests.
12650 (async_file_flush, async_file_mark): New.
12651 (linux_wait): New.
12652 (send_sigstop): Use lwpid_of.
12653 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12654 interface changes. In non-stop mode, don't switch to a random
12655 thread.
12656 (linux_resume_one_lwp): Use lwpid_of.
12657 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12658 (linux_resume_one_thread): ... this. Handle resume_stop. In
12659 non-stop mode, don't look for pending flag in all threads.
12660 (resume_status_pending_p): Don't consider explicitly suspended
12661 threads.
12662 (my_waitpid): Reimplement. Emulate __WALL.
12663 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12664 Use lwpid_of.
12665 (sigchld_handler, linux_supports_non_stop, linux_async)
12666 (linux_start_non_stop): New.
12667 (linux_target_ops): Register linux_supports_non_stop, linux_async
12668 and linux_start_non_stop.
12669 (initialize_low): Install SIGCHLD handler.
12670 * thread-db.c (thread_db_create_event, find_one_thread)
12671 (thread_db_get_tls_address): Use lwpid_of.
12672 * win32-low.c (win32_detach): Adjust to use resume_kind.
12673 (win32_wait): Add `options' argument.
12674 * spu-low.c (spu_resume): Adjust to use resume_kind.
12675 (spu_wait): Add `options' argument.
12676
5b1c542e
PA
126772009-04-01 Pedro Alves <pedro@codesourcery.com>
12678
12679 Decouple target code from remote protocol.
12680
12681 * target.h (enum target_waitkind): New.
12682 (struct target_waitstatus): New.
12683 (struct target_ops) <wait>: Return an unsigned long. Take a
12684 target_waitstatus pointer instead of a char pointer.
12685 (mywait): Likewise.
12686 * target.c (mywait): Change prototype to return an unsigned long.
12687 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12688 * server.h (thread_from_wait, old_thread_from_wait): Delete
12689 declarations.
12690 (prepare_resume_reply): Change prototype to take a
12691 target_waitstatus.
12692 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12693 (last_status, last_ptid): New.
12694 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12695 pid instead of a signal.
12696 (attach_inferior): Remove "status" and "signal" parameters.
12697 Adjust.
12698 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12699 not as an address.
12700 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12701 (handle_v_requests, myresume): Remove "status" and "signal"
12702 parameters. Adjust.
12703 (handle_status): New.
12704 (main): Delete local `status'. Adjust.
12705 * remote-utils.c: Include target.h.
12706 (prepare_resume_reply): Change prototype to take a
12707 target_waitstatus. Adjust.
12708
12709 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12710 interface.
12711 * spu-low.c (spu_wait): Adjust.
12712 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12713 Delete.
12714 (win32_wait): Adjust.
12715
2bd7c093
PA
127162009-04-01 Pedro Alves <pedro@codesourcery.com>
12717
12718 * target.h (struct thread_resume): Delete leave_stopped member.
12719 (struct target_ops): Add a `n' argument to the `resume' callback.
12720 * server.c (start_inferior): Adjust.
12721 (handle_v_cont, myresume): Adjust.
12722 * linux-low.c (check_removed_breakpoint): Adjust to resume
12723 interface change, and to removed leave_stopped field.
12724 (resume_ptr): Delete.
12725 (struct thread_resume_array): New.
12726 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12727 resume interface change.
12728 (linux_continue_one_thread, linux_queue_one_thread)
12729 (resume_status_pending_p): Check if the resume field is NULL
12730 instead of checking the leave_stopped member.
12731 (linux_resume): Adjust to the target resume interface change.
12732 * spu-low.c (spu_resume): Adjust to the target resume interface
12733 change.
12734 * win32-low.c (win32_detach, win32_resume): Ditto.
12735
c35fafde
PA
127362009-04-01 Pedro Alves <pedro@codesourcery.com>
12737
12738 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12739 flag.
12740 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12741 pending.
12742 (linux_continue_one_thread): Only preserve the stepping flag if
12743 there's a pending breakpoint.
12744
0a59d50b
PA
127452009-03-31 Pedro Alves <pedro@codesourcery.com>
12746
12747 * server.c (main): After the inferior having exited, call
12748 remote_close before exiting gdbserver.
12749
f04c6d38
TJB
127502009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12751
12752 Fix size of FPSCR in Power 7 processors.
12753 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12754 (PPC_FEATURE_HAS_DFP): New #define.
12755 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12756 size of the FPSCR.
12757
78e5cee6
PA
127582009-03-23 Pedro Alves <pedro@codesourcery.com>
12759
12760 * server.c (handle_query) Whitespace and formatting.
12761
1b3f6016
PA
127622009-03-22 Pedro Alves <pedro@codesourcery.com>
12763
12764 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12765 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12766 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12767 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12768 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12769 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12770 Makefile.in, configure.ac: Fix whitespace throughout.
12771 * configure: Regenerate.
12772
a07b2135
PA
127732009-03-22 Pedro Alves <pedro@codesourcery.com>
12774
12775 * inferiors.c (find_inferior): Make it safe for the callback
12776 function to delete the currently iterated inferior.
12777
67cc2626
PA
127782009-03-22 Pedro Alves <pedro@codesourcery.com>
12779
12780 * Makefile.in (linuw_low_h): Move higher.
12781 (thread-db.o): Depend on $(linux_low_h).
12782
54a0b537
PA
127832009-03-17 Pedro Alves <pedro@codesourcery.com>
12784
12785 Rename "process" to "lwp" throughout.
12786
12787 * linux-low.c (all_processes): Rename to...
12788 (all_lwps): ... this.
12789 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12790 (add_process): Rename to ...
12791 (add_lwp): ... this. Adjust.
12792 (linux_create_inferior): Adjust.
12793 (linux_attach_lwp): Adjust.
12794 (linux_attach): Adjust.
12795 (linux_kill_one_process): Rename to ...
12796 (linux_kill_one_lwp): ... this. Adjust.
12797 (linux_kill): Adjust.
12798 (linux_detach_one_process): Rename to ...
12799 (linux_detach_one_lwp): ... this. Adjust.
12800 (linux_detach): Adjust.
12801 (check_removed_breakpoint): Adjust.
12802 (status_pending_p): Adjust.
12803 (linux_wait_for_process): Rename to ...
12804 (linux_wait_for_lwp): ... this. Adjust.
12805 (linux_wait_for_event): Adjust.
12806 (send_sigstop): Adjust.
12807 (wait_for_sigstop): Adjust.
12808 (stop_all_processes): Rename to ...
12809 (stop_all_lwps): ... this.
12810 (linux_resume_one_process): Rename to ...
12811 (linux_resume_one_lwp): ... this. Adjust.
12812 (linux_set_resume_request, linux_continue_one_thread)
12813 (linux_queue_one_thread, resume_status_pending_p)
12814 (usr_store_inferior_registers, regsets_store_inferior_registers)
12815 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12816 Adjust.
12817 * linux-low.h (get_process): Rename to ...
12818 (get_lwp): ... this. Adjust.
12819 (get_thread_process): Rename to ...
12820 (get_thread_lwp): ... this. Adjust.
12821 (get_process_thread): Rename to ...
12822 (get_lwp_thread): ... this. Adjust.
12823 (struct process_info): Rename to ...
12824 (struct lwp_info): ... this.
12825 (all_processes): Rename to ...
12826 (all_lwps): ... this.
12827 * proc-service.c (ps_lgetregs): Adjust.
12828 * thread-db.c (thread_db_create_event, find_one_thread)
12829 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12830
0b16c5cf
PA
128312009-03-14 Pedro Alves <pedro@codesourcery.com>
12832
12833 * server.c (handle_query): Handle "qAttached".
12834
32de4b9d
NS
128352009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12836
12837 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12838 GPLv3, update license URL.
12839
2aecd87f
DE
128402009-03-01 Doug Evans <dje@google.com>
12841
93efd302 12842 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12843 (server_h): Add gdb_signals.h.
12844 (signals.o): Update.
12845 * server.h (target_signal_from_host,target_signal_to_host_p)
12846 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12847
86b1f9c5
PM
128482009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12849
12850 * remote-utils.c (getpkt): Also generate remote-debug
12851 information if noack_mode is set.
12852
4aa995e1
PA
128532009-02-06 Pedro Alves <pedro@codesourcery.com>
12854
12855 * server.c (handle_query): Report qXfer:siginfo:read and
12856 qXfer:siginfo:write as supported and handle them.
12857 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12858 * linux-low.c (linux_xfer_siginfo): New.
12859 (linux_target_ops): Set it.
12860
62709adf
PA
128612009-01-26 Pedro Alves <pedro@codesourcery.com>
12862
12863 * server.c (gdbserver_usage): Mention --remote-debug.
12864 (main): Accept '--remote-debug' switch.
12865
aef93bd7
DE
128662009-01-18 Doug Evans <dje@google.com>
12867
12868 * regcache.c (new_register_cache): No need to check result of xcalloc.
12869 * server.c (handle_search_memory): Back out calls to xmalloc,
12870 result is checked and error is returned to user upon failure.
12871 (handle_query): Ditto. Add more checks for result of malloc.
12872 (handle_v_cont): Check result of malloc, report error back to
12873 user upon failure.
12874 (handle_v_run): Ditto. Call freeargv.
12875 * server.h (freeargv): Declare.
12876 * utils.c (freeargv): New fn.
12877
54363045
DE
128782009-01-15 Doug Evans <dje@google.com>
12879
f626972c
DE
12880 * gdbreplay.c (perror_with_name): Make arg const char *.
12881 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12882 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12883 * utils.c (perror_with_name): Make arg const char *.
54363045 12884
18aae699
PA
128852009-01-14 Pedro Alves <pedro@codesourcery.com>
12886
12887 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12888 when handling a EXIT_PROCESS_DEBUG_EVENT.
12889
ff703abe
JB
128902009-01-06 Joel Brobecker <brobecker@adacore.com>
12891
12892 * gdbreplay.c (gdbreplay_version): Update copyright year.
12893 * server.c (gdbserver_version): Likewise.
12894
f21cc1a2 128952009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12896
12897 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12898 (handle_extended_wait): Improve comment.
0e21c1ec 12899
bca929d3
DE
129002008-12-13 Doug Evans <dje@google.com>
12901
12902 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12903 * server.h (ATTR_MALLOC): New macro.
12904 (xmalloc,xcalloc,xstrdup): Declare.
12905 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12906 * inferiors.c: Ditto.
12907 * linux-low.c: Ditto.
12908 * mem-break.c: Ditto.
12909 * regcache.c: Ditto.
12910 * remote-utils.c: Ditto.
12911 * server.c: Ditto.
12912 * target.c: Ditto.
12913 * win32-low.c: Ditto.
12914
97438e3f
DE
129152008-12-12 Doug Evans <dje@google.com>
12916
896c7fbb
DE
12917 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12918 in debugging printf.
12919
97438e3f
DE
12920 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12921
e3b886f8
DE
129222008-12-09 Doug Evans <dje@google.com>
12923
12924 * linux-low.h (struct process_info): Delete member tid, unused.
12925 * thread-db.c (find_one_thread): Update.
12926 (maybe_attach_thread): Update.
12927
07e059b5
VP
129282008-12-02 Pedro Alves <pedro@codesourcery.com>
12929
889bf7c5
PA
12930 * target.h (struct target_ops): Add qxfer_osdata member.
12931 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12932 and dirent.h.
12933 (linux_qxfer_osdata): New functions.
12934 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12935 callback.
12936 * server.c (handle_query): Handle "qXfer:osdata:read:".
12937 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12938 (buffer_xml_printf): New functions.
12939 * server.h (struct buffer): New.
12940 (buffer_grow_str, buffer_grow_str0): New macros.
12941 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12942 (buffer_xml_printf): Declare.
07e059b5 12943
4cab47ab
DE
129442008-11-24 Doug Evans <dje@google.com>
12945
12946 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12947
f142445f
DJ
129482008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12949
12950 * server.c (handle_v_run): Always use the supplied argument list.
12951
d0107bb6 129522008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12953
d0107bb6
BW
12954 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12955 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12956
2c4ad781
TJB
129572008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12958
12959 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12960 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12961 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12962 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12963 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12964 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12965 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12966 XML target descriptions.
12967 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12968 when inferior is running on an ISA 2.05 or later processor. Add
12969 special case to return offset for full 64-bit slot of FPSCR when
12970 in 32-bits.
12971
dfb64f85
DJ
129722008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12973
12974 * Makefile.in (SFILES, clean): Added sparc64 files.
12975 (reg-sparc64.o, reg-sparc64.c): New.
12976 * configure.srv (sparc*-*-linux*): New configuration.
12977 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12978 syscall arguments for SPARC.
12979 (regsets_store_inferior_registers): Likewise.
12980 * linux-sparc-low.c: New file.
12981
66b6e1dd
DE
129822008-10-21 Doug Evans <dje@google.com>
12983
12984 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12985 (READLINE_DIR,READLINE_DEP): Delete.
12986 (INTERNAL_CFLAGS): Update.
12987 (LINTFLAGS): Update.
12988
9b710a42
PA
129892008-10-10 Pedro Alves <pedro@codesourcery.com>
12990
12991 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12992 whole argv from the last run, not just argv[0].
12993
5822d809
PA
129942008-09-08 Pedro Alves <pedro@codesourcery.com>
12995
12996 * regcache.c (new_register_cache): Return NULL if the register
12997 cache size isn't known yet.
12998 (free_register_cache): Avoid dereferencing a NULL regcache.
12999
74aac56f
DJ
130002008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13001
13002 * configure.srv: Merge MIPS and MIPS64.
13003
400b20f5
MR
130042008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13005
13006 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13007
677c5bb1
LM
130082008-08-18 Luis Machado <luisgpm@br.ibm.com>
13009
13010 * Makefile.in: Add required vsx dependencies.
13011
13012 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13013 Declare init_registers_powerpc_vsx32l.
13014 Declare init_registers_powerpc_vsx64l.
13015 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13016 (ppc_arch_setup): Check for VSX in hwcap.
13017 (ppc_fill_vsxregset): New function.
13018 (ppc_store_vsxregset): New function.
13019 Add new VSX entry in regset_info target_regsets.
13020
13021 * configure.srv: Add new VSX dependencies.
13022
a6f3e723
SL
130232008-08-12 Pedro Alves <pedro@codesourcery.com>
13024
13025 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13026 (remote_open): Set or clear transport_is_reliable.
13027 (putpkt_binary): Don't expect acks in noack mode.
13028 (getpkt): Don't send ack/nac in noack mode.
13029 * server.c (handle_general_set): Handle QStartNoAckMode.
13030 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13031 qSupported.
13032 (main): Reset noack_mode on every connection.
13033 * server.h (noack_mode): Declare.
13034
a417dc56
RW
130352008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13036
13037 * Makefile.in (GDBREPLAY_OBS): New variable.
13038 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13039
3221518c
UW
130402008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13041 Daniel Jacobowitz <dan@codesourcery.com>
13042
13043 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13044 (usr_store_inferior_registers): Likewise.
13045 (regsets_store_inferior_registers): Likewise.
13046
ec56be1b
PA
130472008-07-31 Rolf Jansen <rj@surtec.com>
13048 Pedro Alves <pedro@codesourcery.com>
13049
13050 * configure.ac: Check for memmem declaration.
13051 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13052 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13053 (disable_packet_qfThreadInfo): Unconditionally compile.
13054 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13055 * configure, config.in: Regenerate.
13056
2fe5e3ff
DE
130572008-07-28 Doug Kwan <dougkwan@google.com>
13058
13059 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13060 (linux_write_memory): Remove declaration of errno.
13061
836acd6d
UW
130622008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13063
13064 * linux-low.c (handle_extended_wait): Do not use "status"
13065 variable uninitialized.
13066
aeba519e
PA
130672008-07-07 Pedro Alves <pedro@codesourcery.com>
13068
13069 * server.c (handle_v_attach): Inhibit reporting dll changes.
13070
db42f210
PA
130712008-06-27 Pedro Alves <pedro@codesourcery.com>
13072
13073 * remote-utils.c (prepare_resume_reply): If requested, don't
13074 output "thread:TID" in the T stop reply.
13075
13076 * server.c (disable_packet_vCont, disable_packet_Tthread)
13077 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13078 (handle_query): If requested, disable support for qC, qfThreadInfo
13079 and qsThreadInfo.
13080 (handle_v_requests): If requested, disable support for vCont.
13081 (gdbserver_show_disableable): New.
13082 (main): Handle --disable-packet and --disable-packet=LIST.
13083
13084 * server.h (disable_packet_vCont, disable_packet_Tthread)
13085 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13086
8e4c5421
CD
130872008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13088
13089 * server.c (gdbserver_usage): Mention --version.
13090
6e23a804
DJ
130912008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13092
13093 * Makefile.in (gdbreplay.o): New rule.
13094
90aa6a40
JM
130952008-06-06 Joseph Myers <joseph@codesourcery.com>
13096
13097 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13098 message, not gdbserver.
13099
c16158bc 131002008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13101 Nathan Sidwell <nathan@codesourcery.com>
13102 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13103
13104 * acinclude.m4: Include ../../config/acx.m4.
13105 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13106 * configure, config.in: Regenerate.
13107 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13108 * server.c (gdbserver_version): Print PKGVERSION.
13109 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13110 (main): Adjust gdbserver_usage calls.
13111 * gdbreplay.c (version, host_name): Add declarations.
13112 (gdbreplay_version, gdbreplay_usage): New.
13113 (main): Accept --version and --help options.
13114
aeb75bf5
DJ
131152008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13118 (arm_breakpoint_at): Handle Thumb.
13119 (the_low_target): Add comment.
13120
76b233dd
UW
131212008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13122
13123 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13124
08388c79
DE
131252008-05-09 Doug Evans <dje@google.com>
13126
a3c83fae
DE
13127 * server.h (decode_search_memory_packet): Declare.
13128 * remote-utils.c (decode_search_memory_packet): New fn.
13129 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13130 (handle_search_memory): New fn.
13131 (handle_query): Process qSearch:memory packets.
13132
bb9c3d36
UW
131332008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13134
13135 * regcache.c (registers_length): Remove.
13136 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13137 full register packet.
13138 * regcache.h (registers_length): Remove prototype.
13139 * server.h (PBUFSIZ): Define to 16384.
13140
7284e1be
UW
131412008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13142
13143 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13144 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13145 powerpc-64l.o, and powerpc-altivec64l.o.
13146 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13147 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13148 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13149 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13150 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13151 to srv_xmlfiles.
13152
13153 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13154 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13155 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13156 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13157 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13158 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13159 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13160 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13161 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13162 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13163 (clean): Update.
13164
13165 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13166 (init_registers_powerpc_32l): ... this new prototype.
13167 (init_registers_powerpc_32): Remove, replace by ...
13168 (init_registers_powerpc_altivec32l): ... this new prototype.
13169 (init_registers_powerpc_e500): Remove, replace by ...
13170 (init_registers_powerpc_e500l): ... this new prototype.
13171 (init_registers_ppc64): Remove, replace by ...
13172 (init_registers_powerpc_64l): ... this new prototype.
13173 (init_registers_powerpc_64): Remove, replace by ...
13174 (init_registers_powerpc_altivec64l): ... this new prototype.
13175 (ppc_num_regs): Set to 73.
13176 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13177 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13178 (ppc_cannot_store_register): Handle orig_r3 and trap.
13179 (ppc_arch_setup): Update init_registers_... calls.
13180 (ppc_fill_gregset): Handle orig_r3 and trap.
13181
13182 * inferiors.c (clear_inferiors): Reset current_inferior.
13183
fdc59709
PB
131842008-04-23 Paolo Bonzini <bonzini@gnu.org>
13185
889bf7c5
PA
13186 * acinclude.m4: Add override.m4.
13187 * configure: Regenerate.
fdc59709 13188
c9b2f845
UW
131892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13190
13191 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13192 initial call to init_register_ppc64.
13193
550512b8
UW
131942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13195
43aaf8b6
PA
13196 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13197 single powerpc*-*-linux* case.
550512b8
UW
13198 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13199
b6430ec3
UW
132002008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13201
13202 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13203 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13204 from reg_xmlfiles.
13205 * linux-ppc-low.c: Include <elf.h>.
13206 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13207 (ppc_hwcap): New global variable.
13208 (ppc_regmap): Remove __SPE__ #ifdef sections.
13209 (ppc_regmap_e500): New global variable.
13210 (ppc_cannot_store_register): Update __SPE__ special case.
13211 (ppc_get_hwcap): New function.
13212 (ppc_arch_setup): Use it to determine whether inferior supports
13213 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13214 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13215 Do not access registers if target does not support AltiVec.
13216 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13217 Do not access registers if target does not support SPE.
13218 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13219
52fa2412
UW
132202008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13221
13222 * linux-low.c (disabled_regsets, num_regsets): New.
13223 (use_regsets_p): Delete.
13224 (linux_wait_for_process): Clear disabled_regsets.
13225 (regsets_fetch_inferior_registers): Check and set it.
13226 (regsets_store_inferior_registers): Likewise.
13227 (linux_fetch_registers, linux_store_registers): Do not use
13228 use_regsets_p.
13229 (initialize_low): Allocate disabled_regsets.
13230
e28b3332
DJ
132312008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * Makefile.in (LIBOBJS): New.
13234 (OBS): Use LIBOBJS.
13235 (memmem.o): New rule.
13236 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13237 * configure: Regenerated.
13238
4536995d
UW
132392008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13240
13241 * server.c (handle_query): Never return "unsupported" for
13242 qXfer:features:read queries.
13243
221c031f
UW
132442008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13245
13246 * server.c (get_features_xml): Fix inverted condition.
13247 (handle_query): Always support qXfer:feature:read.
13248
ccd213ac
DJ
132492008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13250
13251 * server.c (wrapper_argv): New.
13252 (start_inferior): Handle wrapper_argv. If set, expect an extra
13253 trap.
13254 (gdbserver_usage): Document --wrapper.
13255 (main): Parse --wrapper.
13256
6fe305f7
UW
132572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13258
13259 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13260 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13261 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13262 (ppc_set_pc): Likewise.
13263 (ppc_arch_setup): New function.
13264 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13265 of collect_register.
889bf7c5 13266 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13267
5b0a002e
UW
132682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13271 instead of linux-ppc64-low.o.
13272 * linux-ppc64-low.c: Remove file.
13273 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13274 (linux-ppc64-low.o): Remove rule.
13275
13276 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13277 (init_registers_powerpc_64): Likewise.
13278 (ppc_regmap): Conditionally define depending on __powerpc64__.
13279 (ppc_cannot_store_register): Do not special-case "fpscr" when
13280 compiled on __powerpc64__.
13281 (ppc_collect_ptrace_register): New function.
13282 (ppc_supply_ptrace_register): New function.
13283 (ppc_breakpoint): Change type to "unsigned int".
13284 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13285 (the_low_target): Conditionally provide initializers for the
889bf7c5 13286 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13287 collect_ptrace_register and supply_ptrace_register members.
13288
9b4b61c8
UW
132892008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13290
13291 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13292 * server.c (gdbserver_xmltarget): Define.
13293 (get_features_xml): Use it to replace "target.xml" and arch_string.
13294
13295 * configure.srv: Remove srv_xmltarget. Add XML files that were
13296 mentioned there to srv_xmlfiles instead. Remove conditional tests
13297 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13298 srv_xmlfiles and srv_regobj to include all possible choices.
13299 * configure.ac (srv_xmltarget): Remove.
13300 (srv_xmlfiles): Do not add "target.xml".
13301 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13302 checks for supplementary target information.
13303 * configure: Regenerate.
13304 * Makefile.in (XML_TARGET): Remove.
13305 (target.xml): Remove rule.
13306 (clean): Do not clean up target.xml.
13307 (.PRECIOUS): Do not mention target.xml.
13308
13309 * target.h (struct target_ops): Remove arch_string member.
13310 * linux-low.c (linux_arch_string): Remove.
13311 (linux_target_ops): Remove arch_string initializer.
13312 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13313 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13314 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13315 * spu-low.c (spu_arch_string): Remove.
13316 (spu_target_ops): Remove arch_string initializer.
13317 * win32-low.c (win32_arch_string): Remove.
13318 (win32_target_ops): Remove arch_string initializer.
13319 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13320 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13321 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13322
ee1a7ae4
UW
133232008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13324
13325 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13326 by collect_ptrace_register and supply_ptrace_register hooks.
13327 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13328 instead of checking for the_low_target.left_pad_xfer.
13329 (usr_store_inferior_registers): Use collect_ptrace_register callback
13330 instead of checking for the_low_target.left_pad_xfer.
13331
13332 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13333 (s390_supply_ptrace_register): Likewise.
13334 (s390_fill_gregset): Call s390_collect_ptrace_register.
13335 (the_low_target): Update.
13336
13337 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13338 (ppc_supply_ptrace_register): Likewise.
13339 (the_low_target): Update.
13340
13341 * linux-i386-low.c (the_low_target): Update.
13342 * linux-x86-64-low.c (the_low_target): Update.
13343
d61ddec4
UW
133442008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13345
13346 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13347 reg-s390.o and reg-s390x.o.
13348
13349 * linux-low.c (new_inferior): New global variable.
13350 (linux_create_inferior, linux_attach): Set it.
13351 (linux_wait_for_process): Call the_low_target.arch_setup after the
13352 target has stopped for the first time.
13353 (initialize_low): Do not call the_low_target.arch_setup.
13354
13355 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13356 (s390_set_pc): Likewise.
13357 (s390_arch_setup): New function.
13358 (the_low_target): Use s390_arch_setup as arch_setup routine.
13359
13360 * regcache.c (realloc_register_cache): New function.
13361 (set_register_cache): Call it for each existing regcache.
13362
d05b4ac3
UW
133632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13364
13365 * server.h (init_registers): Remove prototype.
13366
13367 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13368 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13369 instead of init_registers ().
13370 * linux-arm-low.c (init_registers_arm): Add prototype.
13371 (init_registers_arm_with_iwmmxt): Likewise.
13372 (the_low_target): Add initializer for arch_setup field.
13373 * linux-cris-low.c (init_registers_cris): Add prototype.
13374 (the_low_target): Add initializer for arch_setup field.
13375 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13376 (the_low_target): Add initializer for arch_setup field.
13377 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13378 (the_low_target): Add initializer for arch_setup field.
13379 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13380 (the_low_target): Add initializer for arch_setup field.
13381 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13382 (the_low_target): Add initializer for arch_setup field.
13383 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13384 (the_low_target): Add initializer for arch_setup field.
13385 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13386 (init_registers_mips64_linux): Likewise.
13387 (the_low_target): Add initializer for arch_setup field.
13388 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13389 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13390 (the_low_target): Add initializer for arch_setup field.
13391 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13392 (init_registers_powerpc_64): Likewise.
13393 (the_low_target): Add initializer for arch_setup field.
13394 * linux-s390-low.c (init_registers_s390): Add prototype.
13395 (init_registers_s390x): Likewise.
13396 (the_low_target): Add initializer for arch_setup field.
13397 * linux-sh-low.c (init_registers_sh): Add prototype.
13398 (the_low_target): Add initializer for arch_setup field.
13399 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13400 (the_low_target): Add initializer for arch_setup field.
13401 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13402 (the_low_target): Add initializer for arch_setup field.
13403
13404 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13405 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13406 instead of init_registers ().
13407 * win32-arm-low.c (init_registers_arm): Add prototype.
13408 (the_low_target): Add initializer for arch_setup field.
13409 * win32-i386-low.c (init_registers_i386): Add prototype.
13410 (the_low_target): Add initializer for arch_setup field.
13411
13412 * spu-low.c (init_registers_spu): Add prototype.
13413 (initialize_low): Call initialie_registers_spu () instead of
13414 initialize_registers ().
13415
fd96d250
PA
134162008-02-19 Pedro Alves <pedro@codesourcery.com>
13417
13418 * server.c (handle_v_requests): When handling the vRun and vAttach
13419 packets, if already debugging a process, don't kill it. Return an
13420 error instead.
13421
d41b6bb4
DJ
134222008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13423
13424 * server.c (handle_query): Correct length check.
13425
5ac588cf
PA
134262008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13427
13428 * win32-low.c (do_initial_child_stuff): Add process handle
13429 parameter. Set current_process_handle and current_process_id from the
13430 parameters. Clear globals.
13431 (win32_create_inferior): Don't set current_process_handle and
13432 current_process_id here. Instead pass them on the call to
13433 do_initial_child_stuff.
13434 (win32_attach): Likewise.
13435 (win32_clear_inferiors): New.
13436 (win32_kill): Don't close the current process handle or the
13437 current thread handle here. Instead call win32_clear_inferiors.
13438 (win32_detach): Don't open a new handle to the process. Call
13439 win32_clear_inferiors.
13440 (win32_join): Don't rely on current_process_handle; open a new
13441 handle using the process id.
13442 (win32_wait): Call win32_clear_inferiors when the inferior process
13443 has exited.
13444
ecd7ecbc
DJ
134452008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * server.c (monitor_show_help): Add "exit".
13448
1525d545
MG
134492008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13450
ecd7ecbc 13451 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13452 (clean): Add reg-xtensa.c.
13453 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13454 * configure.srv (xtensa*-*-linux*) New target.
13455 * linux-xtensa-low.c: New.
13456 * xtensa-xtregs.c: New.
1525d545 13457
59a016f0
PA
134582008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13459
13460 * hostio.c: Don't include errno.h.
13461 (errno_to_fileio_errno): Move to hostio-errno.
13462 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13463 error number outputting to the target->hostio_last_error callback.
13464 (hostio_packet_error): Use FILEIO_EINVAL directly.
13465 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13466 calls to hostio_error.
13467 * hostio-errno.c: New.
13468 * server.h (hostio_last_error_from_errno): Declare.
13469 * target.h (target_ops): Add hostio_last_error member.
13470 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13471 as hostio_last_error handler.
889bf7c5 13472 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13473 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13474 (wince_hostio_last_error): New functions.
13475 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13476 as hostio_last_error handler.
13477 (win32_target_ops) [!_WIN32_WCE]: Register
13478 hostio_last_error_from_errno as hostio_last_error handler.
13479 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13480 (hostio-errno.o): New rule.
13481 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13482 * configure.srv (srv_hostio_err_objs): New variable. Default to
13483 hostio-errno.o.
13484 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13485 * configure: Regenerate.
13486
2d717e4f
DJ
134872008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13488
13489 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13490 (linux_kill, linux_detach): Clean up the process list.
13491 * remote-utils.c (remote_open): Improve port number parsing.
13492 (putpkt_binary, input_interrupt): Only send interrupts if the target
13493 is running.
13494 * server.c (extended_protocol): Make static.
13495 (attached): Define earlier.
13496 (exit_requested, response_needed, program_argv): New variables.
13497 (target_running): New.
13498 (start_inferior): Clear attached here.
13499 (attach_inferior): Set attached here.
13500 (require_running): Define.
13501 (handle_query): Use require_running and target_running. Implement
13502 "monitor exit".
13503 (handle_v_attach, handle_v_run): New.
13504 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13505 (gdbserver_usage): Update.
13506 (main): Redo argument parsing. Handle --debug and --multi. Handle
13507 --attach along with other options or after the port. Save
13508 program_argv. Support no initial program. Resynchronize
13509 communication with GDB after an error. Handle "monitor exit".
13510 Use require_running and target_running. Always allow the extended
13511 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13512 restart in extended mode.
13513 * README: Refer to the GDB manual. Update --attach usage.
13514
7407e2de
AS
135152007-12-20 Andreas Schwab <schwab@suse.de>
13516
13517 * linux-low.c (STACK_SIZE): Define.
13518 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13519 (linux_test_for_tracefork): Likewise.
13520
b65d95c5
DJ
135212007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13522
13523 * linux-low.c (linux_wait_for_event): Update messages. Do not
13524 reinsert auto-delete breakpoints.
13525 * mem-break.c (struct breakpoint): Change return type of handler to
13526 int.
13527 (set_breakpoint_at): Update handler type.
13528 (reinsert_breakpoint_handler): Return 1 instead of calling
13529 delete_breakpoint.
13530 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13531 setting a new one.
13532 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13533 * mem-break.h (set_breakpoint_at): Update handler type.
13534 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13535 * win32-low.c (auto_delete_breakpoint): New.
13536 (get_child_debug_event): Use it.
13537
4e799345
DJ
135382007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13539
13540 * configure.ac: Check for pread and pwrite.
13541 * hostio.c (handle_pread): Fall back to lseek and read.
13542 (handle_pwrite): Fall back to lseek and write.
13543 * config.in, configure: Regenerated.
13544
27524b67
DJ
135452007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * server.c (myresume): Add own_buf argument.
13548 (main): Update calls.
13549
a20d5e98
DJ
135502007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13553 * remote-utils.c (remote_open): Do not call disable_async_io.
13554 (block_async_io): Delete.
13555 (unblock_async_io): Make static.
13556 (initialize_async_io): New.
13557 * server.c (handle_v_cont): Handle async I/O here.
13558 (myresume): Likewise. Move other common resume tasks here...
13559 (main): ... from here. Call initialize_async_io. Disable async
13560 I/O before the main loop.
13561 * server.h (initialize_async_io): Declare.
13562 (block_async_io, unblock_async_io): Delete prototypes.
13563 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13564
b79d787e
DJ
135652007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13566
13567 * remote-utils.c (readchar): Allow binary data in received messages.
13568
d97903b2
PA
135692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13570
13571 * win32-low.c (attaching): New global.
13572 (win32_create_inferior): Clear the `attaching' global.
13573 (win32_attach): Set the `attaching' global.
13574 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13575 attaching. Only set a breakpoint at the entry point if not
13576 attaching.
13577
311de423
PA
135782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13579
13580 * server.c (main): Don't report dll events on the initial
13581 connection on attaches.
13582
6c2d16d2
PA
135832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13584
13585 * server.c (main): Relax numerical bases supported for the pid of
13586 the --attach command line argument.
13587
5ca906e6
PA
135882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13589
13590 * win32-low.c (win32_attach): Call OpenProcess before
13591 DebugActiveProcess, not after. Add last error output to error
13592 call.
13593
9c6c8194
PA
135942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13595
13596 * win32-low.c (win32_get_thread_context)
13597 (win32_set_thread_context): New functions.
13598 (thread_rec): Use win32_get_thread_context.
13599 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13600 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13601 field.
13602
4d5d1aaa
PA
136032007-12-03 Leo Zayas
13604 Pedro Alves <pedro_alves@portugalmail.pt>
13605
13606 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13607 global variables.
13608 (child_add_thread): Minor cleanup.
13609 (child_continue): Resume artificially suspended threads before
13610 calling ContinueDebugEvent.
13611 (suspend_one_thread): New.
13612 (fake_breakpoint_event): New.
13613 (get_child_debug_event): Change return type to int. Check here if
13614 gdb sent an interrupt request. If a soft interrupt was requested,
13615 fake a breakpoint event. Return 0 if there is no event to handle,
13616 and 1 otherwise.
13617 (win32_wait): Don't check here if gdb sent an interrupt request.
13618 Ensure there is a valid event to handle.
13619 (win32_request_interrupt): Add soft interruption method as last
13620 resort.
13621
c436e841
PA
136222007-12-03 Leo Zayas
13623 Pedro Alves <pedro_alves@portugalmail.pt>
13624
13625 * win32-low.h (win32_thread_info): Add descriptions to the
13626 structure members. Replace `suspend_count' counter by a
13627 `suspended' flag.
13628 * win32-low.c (thread_rec): Update condition of when to get the
13629 context from the inferior. Rely on ContextFlags being set if it
13630 has already been retrieved. Only suspend the inferior thread if
13631 we haven't already. Warn if that fails.
13632 (continue_one_thread): s/suspend_count/suspended/. Only call
13633 ResumeThread once. Warn if that fails.
13634
e7b5fa67
PA
136352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13636
13637 * win32-low.c (win32_wait): Don't read from the inferior when it
13638 has already exited.
13639
a385171d
PA
136402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13641
13642 * Makefile.in (win32_low_h): New variable.
13643 (win32-low.o): Add dependency on $(win32_low_h).
13644 (win32-arm-low.o, win32-i386-low.o): New rules.
13645
f80c84b3
DJ
136462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * hostio.c: Correct copyright year.
13649
a6b151f1
DJ
136502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * Makefile.in (OBS): Add hostio.o.
13653 (hostio.o): New rule.
13654 * server.h (handle_vFile): Declare.
13655 * hostio.c: New file.
13656 * server.c (handle_v_requests): Take packet_len and new_packet_len
13657 for binary packets. Call handle_vFile.
13658 (main): Update call to handle_v_requests.
13659
f9387fc3
DJ
136602007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * linux-low.c: Include <sched.h>.
13663
51c2684e
DJ
136642007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * linux-low.c (linux_tracefork_grandchild): New.
13667 (linux_tracefork_child): Use clone.
13668 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13669
75f83163
JB
136702007-10-31 Joel Brobecker <brobecker@adacore.com>
13671
13672 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13673
da5898ce
DJ
136742007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13677
24a09b5f
DJ
136782007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * inferiors.c (change_inferior_id): Delete.
13681 (add_pid_to_list, pull_pid_from_list): New.
13682 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13683 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13684 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13685 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13686 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13687 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13688 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13689 (using_threads): Always set to 1.
13690 (handle_extended_wait): New.
13691 (add_process): Do not set TID.
13692 (linux_create_inferior): Set must_set_ptrace_flags.
13693 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13694 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13695 (linux_thread_alive): Rename TID argument to LWPID.
13696 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13697 (linux_wait_for_event): Do not use TID or check using_threads. Update
13698 call to dead_thread_notify. Call handle_extended_wait.
13699 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13700 (send_sigstop): Delete sigstop_sent.
13701 (wait_for_sigstop): Avoid TID.
13702 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13703 (linux_test_for_tracefork): New.
13704 (linux_lookup_signals): Use thread_db_active and
13705 linux_supports_tracefork_flag.
13706 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13707 * linux-low.h (get_process_thread): Avoid TID.
13708 (struct process_ifo): Move thread_known and tid to the end. Remove
13709 sigstop_sent.
13710 (linux_attach_lwp, thread_db_init): Update prototypes.
13711 * server.h (change_inferior_id): Delete prototype.
13712 (add_pid_to_list, pull_pid_from_list): New prototypes.
13713 * thread-db.c (thread_db_use_events): New.
13714 (find_first_thread): Rename to...
13715 (find_one_thread): ...this. Update callers and messages. Do not
13716 call fatal. Check thread_db_use_events. Do not call
13717 change_inferior_id or new_thread_notify.
13718 (maybe_attach_thread): Update. Do not call new_thread_notify.
13719 (thread_db_init): Set thread_db_use_events. Check use_events.
13720 * utils.c (fatal, warning): Correct message prefix.
13721
30ed0a8f
DJ
137222007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13723
13724 * Makefile.in (clean): Remove new files.
13725 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13726 (powerpc-64.o, powerpc-64.c): New rules.
13727 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13728 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13729 with SPE.
13730 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13731 SPE targets.
13732 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13733 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13734 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13735 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13736 (target_regsets): Add AltiVec and SPE register sets.
13737 * configure.ac: Check for AltiVec and SPE.
13738 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13739 (ppc_fill_vrregset, ppc_store_vrregset): New.
13740 (target_regsets): Add AltiVec register set.
13741 * configure: Regenerated.
13742
fd462a61
DJ
137432007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13744
13745 * linux-low.c (O_LARGEFILE): Define.
13746 (linux_read_memory): Use /proc/PID/mem.
13747 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13748 * configure, config.in: Regenerated.
13749
69f223ed
DJ
137502007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13751
13752 * linux-low.c (linux_wait_for_event): Do not pass signals while
13753 single-stepping.
13754
aec18585
PA
137552007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13756
13757 * win32-low.c (create_process): New.
13758 (win32_create_inferior): Use create_process instead of
13759 CreateProcess. If create_process failed retry appending an ".exe"
13760 suffix. Store the GetLastError result immediatelly after
13761 create_process calls and use it on the call to error.
13762
34d86ddd
PA
137632007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13764
13765 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13766
5a0e3bd0
JB
137672007-08-23 Joel Brobecker <brobecker@adacore.com>
13768
13769 * configure.ac: Switch license to GPLv3.
13770
f88c79e6
MS
137712007-08-01 Michael Snyder <msnyder@access-company.com>
13772
13773 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13774
6b3d9b83
PA
137752007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13776
13777 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13778 typedef.
13779 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13780 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13781 CloseToolhelp32Snapshot.
13782 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13783 CloseToolhelp32Snapshot.
13784
c588c53c
MS
137852007-07-27 Michael Snyder <michael.snyder@access-company.com>
13786
13787 * server.c (main): Check for inferior exit before main loop.
13788
aa0403d9
PA
137892007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13790
13791 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13792 instead of on tmp_desc.
13793
255e7678
DJ
137942007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13795 Daniel Jacobowitz <dan@codesourcery.com>
13796
13797 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13798 (add_thread): Minor cleanups.
13799 (clear_inferiors): Move lower in the file. Clear the DLL
13800 list.
13801 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13802 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13803 (xml_escape_text): New.
13804 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13805 for qSupported.
13806 (handle_v_cont): Report errors.
13807 (gdbserver_version): Update.
13808 (main): Correct size of own_buf. Do not report initial DLL events.
13809 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13810 (unloaded_dll, xml_escape_text): New.
13811 * win32-low.c (enum target_waitkind): Update comments.
13812 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13813 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13814 (win32_EnumProcessModules, win32_GetModuleInformation)
13815 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13816 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13817 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13818 (win32_Module32First, win32_Module32Next, load_toolhelp)
13819 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13820 (get_child_debug_event): Handle DLL events.
13821 (win32_wait): Likewise.
13822
0d37add9
DJ
138232007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13826 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13827
45e2715e
PA
138282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13829
13830 * win32-low.c (handle_output_debug_string): Ignore event if not
13831 waiting.
13832
c5674cf1
PA
138332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13834
13835 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13836
2bbe3cc1
DJ
138372007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13840
ae13219e
DJ
138412007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * inferiors.c (change_inferior_id): Add comment.
13844 * linux-low.c (check_removed_breakpoint): Add an early
13845 prototype. Improve debug output.
13846 (linux_attach): Doc update.
13847 (linux_detach_one_process, linux_detach): Clean up before releasing
13848 each process.
13849 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13850 * linux-low.h (struct process_info): Doc improvement.
13851 * mem-break.c (delete_all_breakpoints): New.
13852 * mem-break.h (delete_all_breakpoints): New prototype.
13853 * thread-db.c (find_first_thread): New.
13854 (thread_db_create_event): Call it instead of
13855 thread_db_find_new_threads. Clean up unused variables.
13856 (maybe_attach_thread): Remove first thread handling.
13857 (thread_db_find_new_threads): Use find_first_thread.
13858 (thread_db_get_tls_address): Likewise.
13859
4105de34
DJ
138602007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * thread-db.c (thread_db_find_new_threads): Add prototype.
13863 (thread_db_create_event): Check for the main thread before adding
13864 a new thread.
13865 (maybe_attach_thread): Only enable event reporting if TID == 0.
13866 (thread_db_get_tls_address): Check for new threads.
13867
2b876972
DJ
138682007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13869
13870 * linux-low.c (linux_create_inferior): Try execv before execvp.
13871 * spu-low.c (spu_create_inferior): Likewise.
13872
7a245884
DJ
138732007-06-13 Mike Frysinger <vapier@gentoo.org>
13874
13875 * linux-low.c (linux_create_inferior): Change execv to execvp.
13876 * spu-low.c (spu_create_inferior): Likewies.
13877
117ce543
DJ
138782007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13879
13880 * Makefile.in (clean): Clean new files instead of deleted ones.
13881 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13882 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13883 rules.
13884 * configure.srv: Specify XML files and new regformats for MIPS and
13885 MIPS64 GNU/Linux.
13886 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13887 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13888 an entry for the restart register.
13889 (mips_cannot_fetch_register, mips_cannot_store_register)
13890 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13891 register names to match the XML descriptions.
13892 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13893 restart register instead of $0.
13894
0e7f50da
UW
138952007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13896 Markus Deuling <deuling@de.ibm.com>
13897
13898 * remote-utils.c (decode_xfer_write): New function.
13899 * server.h (decode_xfer_write): Add prototype.
13900 * server.c (handle_query): Add PACKET_LEN argument. Support
13901 qXfer:spu:read and qXfer:spu:write packets.
13902 (main): Pass packet_len to handle_query.
13903 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13904 * target.h (target_ops): Add qxfer_spu.
13905
374c1d38
UW
139062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13907
13908 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13909 accessing non-seekable spufs files.
13910
bb63802a
UW
139112007-05-16 Markus Deuling <deuling@de.ibm.com>
13912
889bf7c5 13913 * server.c (handle_query): Add reply for qC packet.
bb63802a 13914
7390519e
PA
139152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13916 Leo Zayas <lerele@champenstudios@com>
13917
13918 * server.h (check_remote_input_interrupt_request): New function.
13919 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13920 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13921 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13922 (check_remote_input_interrupt_request): New function.
13923 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13924 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13925 winapi_GenerateConsoleCtrlEvent): New typedefs.
13926 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13927 to 250 ms.
13928 (win32_wait): Check for remote interrupt request
13929 with check_remote_input_interrupt_request.
13930 (win32_request_interrupt): New function.
13931 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13932
34b34921
PA
139332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13934
13935 * win32-low.c (debug_registers_changed,
13936 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13937 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13938 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13939 (thread_rec): Get context using the low target.
13940 (child_add_thread): Call thread_added on the low target,
13941 which does the same thing.
13942 (regptr): Delete.
13943 (do_initial_child_stuff): Remove debug registers references.
13944 Set context using the low target. Resume threads after
13945 setting the contexts.
13946 (child_continue): Remove dead variable. Remove debug
13947 registers references.
13948 (child_fetch_inferior_registers): Go through the low target.
13949 (do_child_store_inferior_registers): Remove.
13950 (child_store_inferior_registers): Go through the low target.
13951 (win32_resume): Remove debug registers references.
13952 Set context using the low target.
13953 (handle_exception): Change return type to void. Don't record
13954 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13955 first chance exception.
889bf7c5 13956 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13957 goto loop. Always return after waiting for debug event.
13958 (win32_wait): Convert to switch statement. Handle spurious
13959 events.
13960
13961 * win32-i386-low.c (debug_registers_changed,
13962 debug_registers_used): New.
13963 (initial_stuff): Rename to ...
13964 (i386_initial_stuff): ... this. Clear debug registers
13965 state variables.
13966 (store_debug_registers): Delete.
13967 (i386_get_thread_context): New.
13968 (load_debug_registers): Delete.
13969 (i386_set_thread_context): New.
13970 (i386_thread_added): New.
13971 (single_step): Rename to ...
13972 (i386_single_step): ... this.
13973 (do_fetch_inferior_registers): Rename to ...
13974 (i386_fetch_inferior_register): ... this.
13975 (i386_store_inferior_register): New.
13976 (the_low_target): Adapt to new interface.
13977
13978 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13979 (arm_get_thread_context): New.
13980 (arm_set_thread_context): New.
13981 (regptr): New.
13982 (do_fetch_inferior_registers): Rename to ...
13983 (arm_fetch_inferior_register): ... this.
13984 (arm_store_inferior_register): New.
13985 (arm_wince_breakpoint): Reimplement as unsigned long.
13986 (arm_wince_breakpoint_len): Define.
13987 (the_low_target): Adapt to new interface.
13988
13989 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13990 load_debug_registers. Add get_thread_context, set_thread_context,
13991 thread_added and store_inferior_register. Rename
13992 fetch_inferior_registers to fetch_inferior_register.
13993 (regptr): Remove declaration.
13994
dd6953e1
PA
139952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13996
13997 * linux-low.c (linux_detach): Change return type to int. Return 0.
13998 * spu-low.c (spu_detach): Likewise.
13999
444d6139
PA
140002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14001
14002 * target.h (target_ops): Change return type of detach to int.
14003 Add join.
14004 (join_inferior): New.
14005 * server.c (main): Don't skip detach support on mingw32.
14006 If the inferior doesn't support detaching return error.
14007 Call join_inferior instead of using waitpid.
14008 * linux-low.c (linux_join): New.
14009 (linux_target_op): Add linux_join.
14010 * spu-low.c (spu_join): New.
14011 (spu_target_ops): Add spu_join.
14012 * win32-low.c (win32_detach): Adapt to new interface.
14013 Reopen current_process_handle before detaching. Issue a child
14014 resume before detaching.
14015 (win32_join): New.
14016 (win32_target_op): Add win32_join.
14017
1d5315fe
PA
140182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * win32-low.c (win32-attach): Fix return value.
14021 * target.h (target_ops): Describe ATTACH return values.
14022
bf914831
PA
140232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14024
14025 * win32-low.c (GETPROCADDRESS): Define.
14026 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14027 (winapi_DebugSetProcessKillOnExit): Likewise.
14028 (win32_create_inferior): Force usage of ansi CreateProcessA.
14029 (win32_attach): Use GETPROCADDRESS.
14030 (win32_detach): Likewise.
14031
f72f3e60
PA
140322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14033
14034 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14035
ed50f18f
PA
140362007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14037
14038 * win32-low.c: Commit leftover changes from 2007-03-29.
14039
0c2ead7e
DJ
140402007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14041
14042 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14043 fields short instead of int. Add explicit padding.
14044 (i387_cache_to_fsave): Remove unnecessary casts.
14045 (i387_fsave_to_cache): Doc fix.
14046 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14047
73725ff3
DJ
140482007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14049
14050 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14051 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14052
d99f33d8
PA
140532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14054
14055 * configure.srv (arm*-*-mingw32ce*): Move near the other
14056 arm targets.
14057
68070c10
PA
140582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14059
2482afc6 14060 * configure.ac: Add errno checking.
68070c10
PA
14061 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14062 sys/file.h and malloc.h.
14063 (AC_CHECK_DECLS): Add perror.
14064 (srv_mingwce): Handle.
2482afc6 14065 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14066 win32-i386-low.o to srv_tgtobj.
14067 (i[34567]86-*-mingw*): Likewise.
14068 (arm*-*-mingw32ce*): Add case.
14069 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14070 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14071 [__MINGW32CE__] (strerror): New function.
14072 [__MINGW32CE__] (errno): Define to GetLastError.
14073 [__MINGW32CE__] (COUNTOF): New macro.
14074 (remote_open): Remove extra close call.
14075 * mem-break.c (delete_breakpoint_at): New function.
14076 * mem-break.h (delete_breakpoint_at): Declare.
14077 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14078 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14079 [USE_WIN32API] (read, write): Add char* casts.
14080 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14081 * server.h: Include wincecompat.h on Windows CE.
14082 [HAVE_ERRNO_H]: Check.
14083 (perror): Declare if not declared.
14084 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14085 (perror_with_name): Remove errno declaration.
14086 * wincecompat.h: New.
14087 * wincecompat.c: New.
14088 * win32-low.h: New.
14089 * win32-arm-low.c: New.
14090 * win32-i386-low.c: New.
14091 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14092 (OUTMSG2): Make it safe.
14093 (_T): New macro.
14094 (COUNTOF): New macro.
14095 (NUM_REGS): Get it from the low target.
14096 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14097 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14098 (thread_rec): Let low target handle debug registers.
14099 (child_add_thread): Likewise.
14100 (child_init_thread_list): Likewise.
14101 (continue_one_thread): Likewise.
14102 (regptr): New.
14103 (do_child_fetch_inferior_registers): Move to ...
14104 * win32-i386-low.c: ... here, and rename to ...
14105 (do_fetch_inferior_registers): ... this.
889bf7c5 14106 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14107 Go through the low target.
14108 (do_child_store_inferior_registers): Use regptr.
14109 (strwinerror): New function.
14110 (win32_create_inferior): Handle Windows CE.
14111 Use strwinerror instead of strerror on Windows error
14112 codes. Add program to the error output.
14113 Don't close the main thread handle on Windows CE.
14114 (win32_attach): Use coredll.dll on Windows CE.
14115 (win32_kill): Close current process and current
14116 thread handles.
14117 (win32_detach): Use coredll.dll on Windows CE.
14118 (win32_resume): Let low target handle debug registers, and
14119 step request.
14120 (handle_exception): Add/Remove initial breakpoint. Avoid
14121 non-existant WSTOPSIG on Windows CE.
14122 (win32_read_inferior_memory): Cast to remove warning.
14123 (win32_arch_string): Go through the low target.
14124 (initialize_low): Call set_breakpoint_data with the low
14125 target's breakpoint.
14126 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14127 FOP_REGNUM, mappings): Move to ...
14128 * win32-i386-low.c: ... here.
14129 * win32-low.c (win32_thread_info): Move to ...
14130 * win32-low.h: ... here.
14131 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14132 win32-arm-low.c and wincecompat.c.
14133 (all:): Add $EXEEXT.
14134 (install-only:): Likewise.
14135 (gdbserver:): Likewise.
14136 (gdbreplay:): Likewise.
14137 * config.in: Regenerate.
14138 * configure: Regenerate.
14139
41093d81
PA
141402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14141
14142 * win32-low.c: Rename typedef thread_info to
14143 win32_thread_info throughout.
14144
544afa54
PA
141452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14146
14147 * win32-i386-low.c: Rename to ...
14148 * win32-low.c: ... this.
14149 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14150 * Makefile.in: Likewise.
14151
bce7165d
PA
141522007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14153
14154 * remote-utils.c (monitor_output): Constify msg parameter.
14155 * server.h (monitor_output): Likewise.
14156 * win32-i386-low.c (handle_output_debug_string): New.
14157 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14158 handle_output_debug_string.
14159 (get_child_debug_event): Likewise.
14160
506c7aa0
DJ
141612007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14162
14163 * server.c (main): Correct strtoul check.
14164
42c81e2a
DJ
141652007-03-27 Jon Ringle <jon@ringle.org>
14166
14167 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14168
9453113a
DJ
141692007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14170
14171 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14172
64a69107
DJ
141732007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * terminal.h: Check HAVE_SGTTY_H.
14176
141772007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14178
14179 * remote-utils.c (remote_open): Print out the assigned port number.
14180
c74d0ad8
DJ
141812007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14182
14183 * remote-utils.c (monitor_output): New function.
14184 * server.c (debug_threads): Define here.
14185 (monitor_show_help): New function.
14186 (handle_query): Handle qRcmd.
14187 (main): Do not handle 'd' packet.
14188 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14189 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14190 of debug_threads.
14191
de7c3b4a
PA
141922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14193
14194 * Makefile.in (EXEEXT): New.
14195 (clean): Use $(EXEEXT).
14196
ef57601b
PA
141972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14198
14199 * target.h (target_ops): Rename send_signal to request_interrupt,
14200 and remove enum target_signal parameter.
14201 * linux-low.c (linux_request_interrupt): Rename from
14202 linux_send_signal, and always send SIGINT.
14203 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14204 and always send SIGINT.
14205 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14206 of send_signal.
14207 (input_interrupt): Likewise.
14208
820f2bda
PA
142092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14210
14211 * server.c (get_features_xml): Check if target implemented
14212 arch_string.
14213 * win32-i386-low.c (win32_arch_string): New.
14214 (win32_target_ops): Add win32_arch_string as arch_string member.
14215
ab39bf24
UW
142162007-02-22 Markus Deuling <deuling@de.ibm.com>
14217
14218 * spu-low.c (spu_arch_string): New.
14219 (spu_target_ops): Add spu_arch_string.
14220
61ff6e04
DJ
142212007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14224 * configure.ac: Do not check for terminal.h.
14225 * configure, config.in: Regenerated.
14226
fb1e4ffc
DJ
142272007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14228
14229 * Makefile.in (OBS): Add $(XML_BUILTIN).
14230 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14231 (clean): Update.
14232 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14233 (arm-with-iwmmxt.c): New.
14234 * config.in, configure: Regenerate.
14235 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14236 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14237 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14238 (arm*-*-linux*): Add iWMMXt and regset support.
14239 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14240 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14241 (arm_store_wmmxregset, target_regsets): New.
14242 * server.c (get_features_xml): Take annex argument. Check builtin
14243 XML documents.
14244 (handle_query): Handle multiple annexes.
14245
0f48aa01
DJ
142462007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * remote-utils.c [USE_WIN32API] (read, write): Define.
14249 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14250 write.
14251
23181151
DJ
142522007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * linux-i386-low.c (the_low_target): Set arch_string.
14255 * linux-x86-64-low.c (the_low_target): Likewise.
14256 * linux-low.c (linux_arch_string): New.
14257 (linux_target_ops): Add it.
14258 * linux-low.h (struct linux_target_ops): Add arch_string.
14259 * server.c (write_qxfer_response): Use const void * for DATA.
14260 (get_features_xml): New.
14261 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14262 * target.h (struct target_ops): Add arch_string method.
14263
9d606399
DJ
142642007-01-03 Denis Pilat <denis.pilat@st.com>
14265 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * linux-low.c (linux_kill): Handle being called with no threads.
14268 * win32-i386-low.c (win32_kill): Likewise.
14269 (get_child_debug_event): Clear current_process_handle.
14270
142712006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14272 Daniel Jacobowitz <dan@codesourcery.com>
14273
14274 * remote-utils.c (remote_open): Check the type of specified
14275 serial port devices before opening them.
14276 * server.c (main): Kill the inferior if an error occurs during
14277 the first remote_open.
14278
a5e13d24
DJ
142792006-12-05 Markus Deuling <deuling@de.ibm.com>
14280
14281 * README: Update supported targets.
14282
186947f7
DJ
142832006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14284
14285 * Makefile.in (clean): Remove reg-mips64.c.
14286 (reg-mips64.c, reg-mips64.o): New rules.
14287 * configure.srv: Handle mips64. Include regset support for mips.
14288 * linux-mips-low.c (union mips_register): New.
14289 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14290 (mips_breakpoint, mips_breakpoint_at): Use int.
14291 (mips_collect_register, mips_supply_register)
14292 (mips_collect_register_32bit, mips_supply_register_32bit)
14293 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14294 (mips_store_fpregset, target_regsets): New.
14295 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14296
a13e2c95
UW
142972006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14298
14299 * configure.srv: Add target "spu*-*-*".
14300 * Makefile.in (clean): Remove reg-spu.c.
14301 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14302 * spu-low.c: New file.
14303
cb7283db
DJ
143042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * configure.ac: Correct td_thr_tls_get_addr test.
14307 * configure: Regenerated.
14308
89be2091
DJ
143092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * linux-low.c (linux_wait_for_event): Reformat. Use the
14312 pass_signals array.
14313 * remote-utils.c (decode_address_to_semicolon): New.
14314 * server.c (pass_signals, handle_general_set): New.
14315 (handle_query): Mention QPassSignals for qSupported.
14316 (main): Call handle_general_set.
14317 * server.h (pass_signals, decode_address_to_semicolon): New.
14318
000ef4f0
DJ
143192006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * server.c (handle_query): Correct error handling for read_auxv.
14322
b7149293
UW
143232005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14324
14325 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14326 and srv_linux_thread_db to yes.
14327 * linux-s390-low.c (s390_fill_gregset): New function.
14328 (target_regsets): Define data structure.
14329
dae5f5cf
DJ
143302006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14333 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14334 * config.in, configure: Regenerated.
14335 * inferiors.c (gdb_id_to_thread): New function.
14336 (gdb_id_to_thread_id): Use it.
14337 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14338 * linux-low.h (struct process_info): Add th member.
14339 (thread_db_get_tls_address): New prototype.
14340 * remote-utils.c (decode_address): Make non-static.
14341 * server.c (handle_query): Handle qGetTLSAddr.
14342 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14343 * target.h (struct target_ops): Add get_tls_address.
14344 * thread-db.c (maybe_attach_thread): Save the thread handle.
14345 (thread_db_get_tls_address): New.
14346
32ca6d61
DJ
143472006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14350 (linux_resume_one_process): Take a siginfo_t *. Update all
14351 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14352 (struct pending_signals): Add a siginfo_t.
14353 (linux_wait_for_process): Always set last_status.
14354 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14355 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14356 * linux-low.h (struct process_info): Add last_status.
14357
5ffff7c1
DJ
143582006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14359
14360 * remote-utils.c (try_rle): New function.
14361 (putpkt_binary): Use it.
14362
8695c747
DJ
143632006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14364
14365 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14366 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14367 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14368 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14369 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14370 point registers.
14371
290fadea
RS
143722006-08-08 Richard Sandiford <richard@codesourcery.com>
14373
14374 * server.c (terminal_fd): New variable.
14375 (old_foreground_pgrp): Likewise.
14376 (restore_old_foreground_pgrp): New function.
14377 (start_inferior): Record the terminal file descriptor in terminal_fd
14378 and its original foreground group in old_foreground_pgrp. Register
14379 restore_old_foreground_pgrp with atexit().
14380
9f2e1e63
DJ
143812006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14382
14383 * server.c (handle_query): Correct qPart to qXfer.
14384
b80864fb
DJ
143852006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * configure.ac: Check for more headers which are missing on
14388 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14389 * configure.srv: Add Cygwin and mingw32.
14390 * remote-utils.c: Don't include headers unconditionally which
14391 are missing on mingw32. Include <winsock.h> for mingw32.
14392 (remote_open): Adjust for mingw32 support. Flush
14393 standard error after writing to it.
14394 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14395 (unblock_async_io, enable_async_io, disable_async_io)
14396 (readchar, getpkt): Update for Winsock support.
14397 (prepare_resume_reply): Expect a protocol signal number.
14398 * server.c: Disable <sys/wait.h> on mingw32.
14399 (start_inferior): Adjust for mingw32 support. Flush
14400 standard error after writing to it.
14401 (attach_inferior): Likewise. Use protocol signal
14402 numbers.
14403 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14404 and names.
14405 * win32-i386-low.c: New file.
14406 * Makefile.in (XM_CLIBS): Set.
14407 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14408 (win32-i386-low.o): New dependency rule.
14409 * linux-low.c (linux_wait): Use target signal numbers.
14410 * target.h (struct target_ops): Doc fix.
14411 * server.h (target_signal_to_name): New prototype.
14412 * gdbreplay.c: Don't include headers unconditionally which
14413 are missing on mingw32. Include <winsock.h> for mingw32.
14414 (remote_close, remote_open): Adjust for Winsock support.
14415 * configure, config.in: Regenerated.
14416
0876f84a
DJ
144172006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * server.c (decode_xfer_read, write_qxfer_response): New.
14420 (handle_query): Take a packet length argument. Handle
14421 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14422 the qSupported response.
14423 (main): Update call to handle_query.
14424
01f9e8fa
DJ
144252006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14426
14427 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14428 (putpkt_binary): Renamed from putpkt and adjusted for binary
14429 data.
14430 (putpkt): New wrapper for putpkt_binary.
14431 (readchar): Don't mask off the high bit.
14432 (decode_X_packet): New function.
14433 * server.c (main): Call putpkt_binary if a handler sets the packet
14434 length. Save the length of the incoming packet. Handle 'X'.
14435 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14436
be2a5f71
DJ
144372006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14438
14439 * server.c (handle_query): Handle qSupported.
14440
ea025f5f
DJ
144412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * remote-utils.c (all_symbols_looked_up): New variable.
14444 (look_up_one_symbol): Check it.
14445 * server.h (look_up_one_symbol): New declaration.
14446 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14447
9308fc88
DJ
144482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14451 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14452 (PTRACE_GET_THREAD_AREA): Define.
14453 (ps_get_thread_area): New function.
14454
52fb6437
NS
144552006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14456
14457 * configure.srv (m68k*-*-uclinux*): New target.
14458 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14459 (linux_resume_one_process): Remove extraneous cast.
14460 (linux_read_offsets): New.
14461 (linux_target_op): Add linux_read_offsets on mmuless systems.
14462 * server.c (handle_query): Add qOffsets logic.
14463 * target.h (struct target_ops): Add read_offsets.
14464
21b0f40c
DJ
144652006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14466
14467 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14468 (PTRACE_GET_THREAD_AREA): Define.
14469 (ps_get_thread_area): New function.
14470 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14471 (linux-x86-64-low.o): Update.
14472
0050a760
DJ
144732006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14474
14475 * configure.ac: Remove checks for prfpregset_t.
14476 * gdb_proc_service.h: New file.
14477 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14478 new "gdb_proc_service.h".
14479 * proc-service.c: Likewise.
14480 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14481 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14482 * Makefile.in (gdb_proc_service_h): Updated.
14483 * configure, config.in: Regenerated.
14484
b92a518e
DJ
144852006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * remote-utils.c (prepare_resume_reply): Move declaration
14488 of gdb_id_from_wait to the top of the block.
14489
545587ee
DJ
144902006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * linux-low.c (regsets_store_inferior_registers): Read the regset
14493 from the target before filling it.
14494
9db87ebd
DJ
144952006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * server.c (attach_inferior): Return SIGTRAP for a successful
14498 attach.
14499
dd24457d
DJ
145002006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14501
14502 * Makefile.in (OBS): Add version.o.
14503 (STAGESTUFF): Delete.
14504 (version.o): Add dependencies.
14505 (version.c): Replace rule.
14506 (clean): Remove version.c.
14507 * server.c (gdbserver_version): New.
14508 (gdbserver_usage): Use printf.
14509 (main): Handle --version and --help.
14510 * server.h (version, host_name): Add declarations.
14511
6f0f660e
EZ
145122005-12-23 Eli Zaretskii <eliz@gnu.org>
14513
889bf7c5
PA
14514 * linux-arm-low.c:
14515 * linux-arm-low.c:
14516 * inferiors.c:
14517 * i387-fp.h:
14518 * i387-fp.c:
14519 * gdbreplay.c:
14520 * regcache.c:
14521 * proc-service.c:
14522 * mem-break.h:
14523 * mem-break.c:
14524 * linux-x86-64-low.c:
14525 * linux-sh-low.c:
14526 * linux-s390-low.c:
14527 * linux-ppc64-low.c:
14528 * linux-ppc-low.c:
14529 * linux-mips-low.c:
14530 * linux-m68k-low.c:
14531 * linux-m32r-low.c:
14532 * linux-low.h:
14533 * linux-low.c:
14534 * linux-ia64-low.c:
14535 * linux-i386-low.c:
14536 * linux-crisv32-low.c:
14537 * thread-db.c:
14538 * terminal.h:
14539 * target.h:
14540 * target.c:
14541 * server.h:
14542 * server.c:
14543 * remote-utils.c:
14544 * regcache.h:
14545 * utils.c:
14546 * Makefile.in:
14547 * configure.ac:
6f0f660e
EZ
14548 * gdbserver.1: Add (C) after Copyright. Update the FSF
14549 address.
14550
9d1fb177
DJ
145512005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14554 (arm_breakpoint_at): Recognize both breakpoints.
14555 (the_low_target): Use the correct breakpoint instruction.
14556
011a70c2
DJ
145572005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14558
14559 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14560 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14561 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14562 (the_low_target): Update.
14563
7fb85e41
AS
145642005-10-25 Andreas Schwab <schwab@suse.de>
14565
14566 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14567
14568 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14569 (ia64_num_regs): Reduce to 462.
14570
3db0444b
DJ
145712005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * acinclude.m4: Correct quoting.
14574 * aclocal.m4: Regenerated.
14575
14576 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14577 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14578 (thread_db_init): Call thread_db_err_str.
14579 * configure.ac: Check for TD_VERSION.
14580 * config.in, configure: Regenerated.
14581
bee0189a
DJ
145822005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14583
14584 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14585
e9d25b98
DJ
145862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14589 is not available. Define HAVE_PTRACE_GETREGS if it is.
14590 * config.in, configure: Regenerated.
14591 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14592 * linux-i386-low.c, linux-m68k-low.c: Update to use
14593 HAVE_PTRACE_GETREGS.
14594 * linux-low.c (regsets_fetch_inferior_registers)
14595 (regsets_store_inferior_registers): Only return 0 if we processed
14596 GENERAL_REGS.
14597 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14598 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14599
a06660f7
DJ
146002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * inferiors.c (struct thread_info): Add gdb_id.
14603 (add_thread): Add gdb_id argument.
14604 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14605 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14606 calls to add_thread.
14607 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14608 * server.c (handle_query): Use thread_to_gdb_id.
14609 (handle_v_cont, main): Use gdb_id_to_thread_id.
14610 * server.h (add_thread): Update prototype.
14611 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14612 prototypes.
14613
5a1f5858
DJ
146142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14615
14616 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14617 left-padded registers.
14618 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14619 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14620
e122f1f5
SE
146212005-07-01 Steve Ellcey <sje@cup.hp.com>
14622
14623 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14624 * configure: Regenerate.
14625 * config.in: Regenerate.
14626 * server.h (NEED_DECLARATION_STRERROR):
14627 Replace with !HAVE_DECL_STRERROR.
14628
d592fa2f
DJ
146292005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * linux-low.c (linux_wait, linux_send_signal): Don't test
14632 an unsigned long variable for > 0 if it could be MAX_ULONG.
14633 * server.c (myresume): Likewise.
14634 * target.c (set_desired_inferior): Likewise.
14635
ccbd4912
MK
146362005-06-13 Mark Kettenis <kettenis@gnu.org>
14637
14638 * configure.ac: Simplify and improve check for socklen_t.
14639 * configure, config.in: Regenerate.
14640
f450004a
DJ
146412005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14642
14643 * acconfig.h: Remove.
14644 * configure.ac: Add a test for socklen_t. Use three-argument
14645 AC_DEFINE throughout.
14646 * config.in: Regenerated using autoheader 2.59.
14647 * configure: Regenerated.
14648
14649 * gdbreplay.c (socklen_t): Provide a default.
14650 (remote_open): Use socklen_t.
14651 * remote-utils.c (socklen_t): Provide a default.
14652 (remote_open): Use socklen_t.
14653 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14654 unsigned char.
14655
14656 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14657 char for buffers.
14658 * linux-low.c (linux_read_memory, linux_write_memory)
14659 (linux_read_auxv): Likewise.
14660 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14661 (check_mem_write): Likewise.
14662 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14663 Likewise.
14664 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14665 (registers_from_string, register_data): Likewise.
14666 * server.c (handle_query, main): Likewise.
14667 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14668 (decode_M_packet): Likewise.
14669 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14670 * target.h (struct target_ops): Update read_memory, write_memory,
14671 and read_auxv.
14672 (read_inferior_memory, write_inferior_memory): Update.
14673 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14674 to unsigned char *.
14675 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14676 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14677 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14678 linux-s390-low.c, linux-sh-low.c: Update for changes in
14679 read_inferior_memory and the_low_target->breakpoint.
14680
eee84df1
DJ
146812005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14682
14683 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14684 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14685 * configure.srv: Add powerpc64-*-linux*.
14686 * linux-ppc64-low.c: New file.
14687
45b134e5
OF
146882005-05-23 Orjan Friberg <orjanf@axis.com>
14689
14690 * linux-cris-low.c: New file with support for CRIS.
14691 * linux-crisv32-low.c: Ditto for CRISv32.
14692 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14693 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14694 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14695 reg-crisv32.o, and reg-crisv32.c to make rules.
14696 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14697 recognized targets.
14698
48d93c75
UW
146992005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14700
14701 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14702 of sizeof (PTRACE_XFER_TYPE).
14703 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14704
e013ee27
OF
147052005-05-12 Orjan Friberg <orjanf@axis.com>
14706
889bf7c5 14707 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14708 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14709 pointers for hardware watchpoint support.
14710 * linux-low.h (struct linux_target_ops): Ditto.
14711 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14712 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14713 to linux_target_ops.
14714 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14715 reply packet.
14716 * server.c (main): Recognize 'Z' and 'z' packets.
14717
b0ded00b
UW
147182005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14719
14720 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14721 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14722 (the_low_target): Add new members.
14723
8643e2ad
DJ
147242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * proc-service.c (ps_lgetregs): Search all_processes instead of
14727 all_threads.
14728
fc620387
DJ
147292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * server.c (start_inferior): Change return type to int.
14732 (attach_inferior): Change sigptr to int *.
14733 (handle_v_cont, handle_v_requests): Change signal to int *.
14734 (main): Change signal to int.
14735
147362005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14737
14738 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14739 * configure.srv: Add m32r*-*-linux*.
14740 * linux-m32r-low.c: New file.
14741
e0e76420
DJ
147422005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14743
14744 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14745
a1928bad
DJ
147462005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14749 Take unsigned long arguments for PIDs.
14750 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14751 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14752 (wait_for_sigstop, linux_resume_one_process)
14753 (regsets_fetch_inferior_registers, linux_send_signal)
14754 (linux_read_auxv): Likewise. Update the types of variables holding
14755 PIDs. Update format string specifiers.
14756 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14757 * remote-utils.c (prepare_resume_reply): Likewise.
14758 * server.c (cont_thread, general_thread, step_thread)
14759 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14760 unsigned long.
14761 (handle_query): Update format specifiers.
14762 (handle_v_cont, main): Use strtoul for thread IDs.
14763 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14764 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14765 (general_thread, step_thread, thread_from_wait)
14766 (old_thread_from_wait): Update.
14767 * target.h (struct thread_resume): Use unsigned long for THREAD.
14768 (struct target_ops): Use unsigned long for arguments to attach and
14769 thread_alive.
14770
dcdb98d2
DJ
147712005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14772
14773 * acinclude.m4: Include bfd/bfd.m4 directly.
14774 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14775 <agriffis@toolchain.org>.
14776 * aclocal.m4, configure: Regenerated.
14777
bec39cab
AC
147782005-01-07 Andrew Cagney <cagney@gnu.org>
14779
14780 * configure.ac: Rename configure.in, require autoconf 2.59.
14781 * configure: Re-generate.
14782
434c4c77
DJ
147832004-12-08 Daniel Jacobowitz <dan@debian.org>
14784
14785 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14786 LIBS when finished.
14787 * aclocal.m4: Regenerated.
14788 * configure: Regenerated.
14789
db1d3e1b
AS
147902004-11-21 Andreas Schwab <schwab@suse.de>
14791
14792 * linux-m68k-low.c (m68k_num_gregs): Define.
14793 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14794 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14795 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14796 (m68k_breakpoint_at): New. Add to the_low_target.
14797
14798 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14799 srv_linux_thread_db to yes.
14800
43360365
JB
148012004-10-20 Joel Brobecker <brobecker@gnat.com>
14802
14803 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14804 (ARCH_SET_FS): Likewise.
14805 (ARCH_GET_FS): Likewise.
14806 (ARCH_GET_GS): Likewise.
14807
fd500816
DJ
148082004-10-16 Daniel Jacobowitz <dan@debian.org>
14809
14810 * linux-i386-low.c (ps_get_thread_area): New.
14811 * linux-x86-64-low.c (ps_get_thread_area): New.
14812 * linux-low.c: Include <sys/syscall.h>.
14813 (linux_kill_one_process): Don't kill the first thread here.
14814 (linux_kill): Kill the first thread here.
14815 (kill_lwp): New function.
14816 (send_sigstop, linux_send_signal): Use it.
14817 * proc-service.c: Clean up #ifdefs.
14818 (fpregset_info): Delete.
14819 (ps_lgetregs): Update and enable implementation.
14820 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14821 implementations.
14822 * remote-utils.c (struct sym_cache, symbol_cache): New.
14823 (input_interrupt): Print a clearer message.
14824 (async_io_enabled): New variable.
14825 (enable_async_io, disable_async_io): Use it. Update comments.
14826 (look_up_one_symbol): Use the symbol cache.
14827 * thread-db.c (thread_db_look_up_symbols): New function.
14828 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14829
f6de3c42
DJ
148302004-10-16 Daniel Jacobowitz <dan@debian.org>
14831
14832 * configure.in: Test for -rdynamic.
14833 * configure: Regenerated.
14834 * Makefile (INTERNAL_LDFLAGS): New.
14835 (gdbserver, gdbreplay): Use it.
14836
2c0fc042
AC
148372004-09-02 Andrew Cagney <cagney@gnu.org>
14838
14839 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14840
075b3282
DJ
148412004-03-23 Daniel Jacobowitz <drow@mvista.com>
14842
14843 * linux-low.c (linux_wait): Clear all_processes list also.
14844
fa6a77dc
DJ
148452004-03-12 Daniel Jacobowitz <drow@mvista.com>
14846
14847 * linux-low.c: Include <errno.h>. Remove extern declaration of
14848 errno.
14849
6d782a97
DJ
148502004-03-12 Daniel Jacobowitz <drow@mvista.com>
14851
14852 * gdbreplay.c, server.h, utils.c: Update copyright years.
14853
3a7fb99b
DJ
148542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14855
14856 * server.c (main): Print child status or termination signal from
14857 variable 'signal', not 'sig'.
14858
c3e735a6
DJ
148592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14860
14861 * linux-low.c (linux_read_memory): Change return type to
14862 int. Check for and return error from ptrace().
14863 * target.c (read_inferior_memory): Change return type to int. Pass
14864 back return status from the_target->read_memory().
14865 * target.h (struct target_ops): Adapt *read_memory() prototype.
14866 Update comment.
14867 (read_inferior_memory): Adapt prototype.
14868 * server.c (main): Return an error packet if
14869 read_inferior_memory() returns an error.
14870
a59d1c82
DJ
148712004-03-04 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14874 Unify with other clean targets.
14875
dc3f8883
DJ
148762004-02-29 Daniel Jacobowitz <drow@mvista.com>
14877
14878 * server.c (handle_v_cont): Call set_desired_inferior.
14879
89a208da
DJ
148802004-02-29 Daniel Jacobowitz <drow@mvista.com>
14881
14882 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14883
62ea82f5
DJ
148842004-02-29 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * linux-low.c (linux_wait): Unblock async I/O.
14887 (linux_resume): Block and enable async I/O.
14888 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14889 * server.h (block_async_io, unblock_async_io): Add prototypes.
14890
6910d122
DJ
148912004-02-29 Daniel Jacobowitz <drow@mvista.com>
14892
14893 * remote-utils.c (remote_open): Print a status notice after
14894 opening a TCP port.
14895 * server.c (attach_inferior): Print a status notice after
14896 attaching.
14897
148982004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14899
14900 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14901
c89dc5d4
DJ
149022004-02-26 Daniel Jacobowitz <drow@mvista.com>
14903
14904 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14905 error packet.
14906 * server.c, target.h: Update copyright years.
14907
4b8dad4a
RM
149082004-02-25 Roland McGrath <roland@redhat.com>
14909
14910 * target.h (struct target_ops): New member `read_auxv'.
14911 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14912 * linux-low.c (linux_read_auxv): New function.
14913 (linux_target_ops): Initialize `read_auxv' member to that.
14914
d7446758
JB
149152004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14916
14917 Committed by Jim Blandy <jimb@redhat.com>.
14918
14919 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14920 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14921 instead of GPR_SIZE to distiguish s390 and s390x targets.
14922
5544ad89
DJ
149232004-01-31 Daniel Jacobowitz <drow@mvista.com>
14924
14925 * linux-low.c: Update copyright year.
14926 (check_removed_breakpoint): Clear pending_is_breakpoint.
14927 (linux_set_resume_request, linux_queue_one_thread)
14928 (resume_status_pending_p): New functions.
14929 (linux_continue_one_thread): Use process->resume.
14930 (linux_resume): Only resume threads if there are no pending events.
14931 * linux-low.h (struct process_info): Add resume request
14932 pointer.
14933
2a68b70e
DJ
149342004-01-30 Daniel Jacobowitz <drow@mvista.com>
14935
14936 * regcache.c (new_register_cache): Clear the allocated register
14937 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14938
64386c31
DJ
149392003-10-13 Daniel Jacobowitz <drow@mvista.com>
14940
14941 * linux-low.c (linux_resume): Take a struct thread_resume *
14942 argument.
14943 (linux_wait): Update call.
14944 (resume_ptr): New static variable.
14945 (linux_continue_one_thread): Renamed from
14946 linux_continue_one_process. Use resume_ptr.
14947 (linux_resume): Use linux_continue_one_thread.
14948 * server.c (handle_v_cont, handle_v_requests): New functions.
14949 (myresume): New function.
14950 (main): Handle 'v' case.
14951 * target.h (struct thread_resume): New type.
14952 (struct target_ops): Change argument of "resume" to struct
14953 thread_resume *.
14954 (myresume): Delete macro.
14955
c938e9b0
L
149562003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14957
14958 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14959 (uninstall): Support DESTDIR.
14960
7f313d07
BC
14961Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14962
14963 * configure.srv: Add xscale*linux copy of arm*linux entry.
14964
3b2fc2ea
DJ
149652003-07-24 Daniel Jacobowitz <drow@mvista.com>
14966
14967 * linux-arm-low.c (arm_reinsert_addr): New function.
14968 (the_low_target): Add arm_reinsert_addr.
14969
1c0a559e
MK
149702003-07-08 Mark Kettenis <kettenis@gnu.org>
14971
14972 * mem-break.c: Remove whitespace at end of file.
14973
43d5792c
DJ
149742003-06-28 Daniel Jacobowitz <drow@mvista.com>
14975
14976 * configure.in: Check whether we need to prototype strerror.
14977 * server.h: Optionally prototype strerror.
14978 * gdbreplay.c (perror_with_name): Use strerror.
14979 * linux-low.c (linux_attach_lwp): Use strerror.
14980 * utils.c (perror_with_name): Use strerror.
14981 * config.in, configure: Regenerated.
14982
c8a86edf
DJ
149832003-06-28 Daniel Jacobowitz <drow@mvista.com>
14984
14985 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14986 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14987
73d37363
DJ
149882003-06-20 Daniel Jacobowitz <drow@mvista.com>
14989
14990 * Makefile.in (SFILES): Update.
14991 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14992 low-sun3.c: Remove files.
14993
6ad8ae5c
DJ
149942003-06-17 Daniel Jacobowitz <drow@mvista.com>
14995
14996 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14997 (linux_detach_one_process, linux_detach): New functions.
14998 (linux_target_ops): Add linux_detach.
14999 * server.c (main): Handle 'D' packet.
15000 * target.h (struct target_ops): Add "detach" member.
15001 (detach_inferior): Define.
15002
1581182a
MK
150032003-06-13 Mark Kettenis <kettenis@gnu.org>
15004
15005 From Kelley Cook <kelleycook@wideopenwest.com>:
15006 * configure.srv: Accept i[34567]86 variants.
15007
e5379b03
DJ
150082003-06-05 Daniel Jacobowitz <drow@mvista.com>
15009
15010 * linux-low.c (linux_wait_for_event): Correct comment typos.
15011 (linux_resume_one_process): Call check_removed_breakpoint.
15012 (linux_send_signal): New function.
15013 (linux_target_ops): Add linux_send_signal.
15014 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15015 of kill.
15016 * target.h (struct target_ops): Add send_signal.
15017
2ff29de4
JB
150182003-05-29 Jim Blandy <jimb@redhat.com>
15019
15020 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15021 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15022 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15023 away part of the register's value.
15024
254787d4
DJ
150252003-03-26 Daniel Jacobowitz <drow@mvista.com>
15026
15027 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15028 (linux_wait_for_event, linux_init_signals): Likewise.
15029
94e10508
DJ
150302003-03-17 Daniel Jacobowitz <drow@mvista.com>
15031
15032 * configure.in: Check for stdlib.h.
15033 * configure: Regenerated.
15034 * config.in: Regenerated.
15035
4c0711e0
DJ
150362003-01-04 Andreas Schwab <schwab@suse.de>
15037
15038 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15039
ef66e766
AC
150402003-01-02 Andrew Cagney <ac131313@redhat.com>
15041
15042 * Makefile.in: Remove obsolete code.
15043
a1358604
DJ
150442002-11-20 Daniel Jacobowitz <drow@mvista.com>
15045
15046 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15047 defined(PT_FPR0_HI).
15048
23ce3b1c
DJ
150492002-11-17 Stuart Hughes <seh@zee2.com>
15050
15051 * linux-arm-low.c (arm_num_regs): Increase.
15052 (arm_regmap): Include status register.
15053
150542002-11-17 Daniel Jacobowitz <drow@mvista.com>
15055
15056 * linux-low.c (register_addr): Remove incorrect -1 check.
15057
a9fa9f7d
DJ
150582002-08-29 Daniel Jacobowitz <drow@mvista.com>
15059
15060 * linux-low.c (linux_create_inferior): Call setpgid. Return
15061 the new PID.
15062 (unstopped_p, linux_signal_pid): Remove.
15063 (linux_target_ops): Remove linux_signal_pid.
15064 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15065 global instead of target method.
15066 * target.h (struct target_ops): Remove signal_pid. Update comment
15067 for create_inferior.
15068 * server.c (signal_pid): New variable.
15069 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15070 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15071 (attach_inferior): Set signal_pid.
15072
17574093
DJ
150732002-08-23 Daniel Jacobowitz <drow@mvista.com>
15074
15075 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15076
150772002-08-20 Jim Blandy <jimb@redhat.com>
15078
15079 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15080 default for this.
15081
150822002-08-01 Andrew Cagney <cagney@redhat.com>
15083
15084 * Makefile.in: Make chill references obsolete.
15085
150862002-07-24 Kevin Buettner <kevinb@redhat.com>
15087
15088 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15089 * configure: Regenerate.
15090 * config.in: Regenerate.
15091
150922002-07-09 David O'Brien <obrien@FreeBSD.org>
15093
15094 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15095 (perror_with_name, remote_close, remote_open, expect, play): Static.
15096
150972002-07-04 Michal Ludvig <mludvig@suse.cz>
15098
4b8dad4a 15099 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15100 byte offsets instead of an array of indexes.
15101 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15102
151032002-06-13 Daniel Jacobowitz <drow@mvista.com>
15104
15105 * regcache.c: Add comment.
15106
151072002-06-11 Daniel Jacobowitz <drow@mvista.com>
15108
15109 * thread-db.c: New file.
15110 * proc-service.c: New file.
15111 * acinclude.m4: New file.
15112 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15113 proc-service.o, and thread-db.o.
15114 (linux-low.o): Add USE_THREAD_DB.
15115 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15116 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15117 * aclocal.m4: Regenerated.
15118 * config.in: Regenerated.
15119 * configure: Regenerated.
15120 * configure.in: Check for proc_service.h, sys/procfs.h,
15121 thread_db.h, and linux/elf.h headrs.
15122 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15123 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15124 Check for -lthread_db and thread support.
15125 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15126 PowerPC, and SuperH.
15127 * i387-fp.c: Constify arguments.
15128 * i387-fp.h: Likewise.
15129 * inferiors.c: (struct thread_info): Renamed from
15130 `struct inferior_info'. Remove PID member. Use generic inferior
15131 list header. All uses updated.
15132 (inferiors, signal_pid): Removed.
15133 (all_threads): New variable.
15134 (get_thread): Define.
15135 (add_inferior_to_list): New function.
15136 (for_each_inferior): New function.
15137 (change_inferior_id): New function.
15138 (add_inferior): Removed.
15139 (remove_inferior): New function.
15140 (add_thread): New function.
15141 (free_one_thread): New function.
15142 (remove_thread): New function.
15143 (clear_inferiors): Use for_each_inferior and free_one_thread.
15144 (find_inferior): New function.
15145 (find_inferior_id): New function.
15146 (inferior_target_data): Update argument type.
15147 (set_inferior_target_data): Likewise.
15148 (inferior_regcache_data): Likewise.
15149 (set_inferior_regcache_data): Likewise.
15150 * linux-low.c (linux_bp_reinsert): Remove.
15151 (all_processes, stopping_threads, using_thrads)
15152 (struct pending_signals, debug_threads, pid_of): New.
15153 (inferior_pid): Replace with macro.
15154 (struct inferior_linux_data): Remove.
15155 (get_stop_pc, add_process): New functions.
15156 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15157 Use add_process and add_thread.
15158 (linux_attach_lwp): New function, based on old linux_attach. Use
15159 add_process and add_thread. Set stop_expected for new threads.
15160 (linux_attach): New function.
15161 (linux_kill_one_process): New function.
15162 (linux_kill): Kill all LWPs.
15163 (linux_thread_alive): Use find_inferior_id.
15164 (check_removed_breakpoints, status_pending_p): New functions.
15165 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15166 Update. Use WNOHANG. Wait for cloned processes also. Update process
15167 struct for the found process.
15168 (linux_wait_for_event): New function.
15169 (linux_wait): Use it. Support LWPs.
15170 (send_sigstop, wait_for_sigstop, stop_all_processes)
15171 (linux_resume_one_process, linux_continue_one_process): New functions.
15172 (linux_resume): Support LWPs.
15173 (REGISTER_RAW_SIZE): Remove.
15174 (fetch_register): Use register_size instead. Call supply_register.
15175 (usr_store_inferior_registers): Likewise. Call collect_register.
15176 Fix recursive case.
15177 (regsets_fetch_inferior_registers): Improve error message.
15178 (regsets_store_inferior_registers): Add debugging.
15179 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15180 (unstopped_p, linux_signal_pid): New functions.
15181 (linux_target_ops): Add linux_signal_pid.
15182 (linux_init_signals): New function.
15183 (initialize_low): Call it. Initialize using_threads.
15184 * regcache.c (inferior_regcache_data): Add valid
15185 flag.
15186 (get_regcache): Fetch registers lazily. Add fetch argument
15187 and update all callers.
15188 (regcache_invalidate_one, regcache_invalidate): New
15189 functions.
15190 (new_register_cache): Renamed from create_register_cache.
15191 Return the new regcache.
15192 (free_register_cache): Change argument to a void *.
15193 (registers_to_string, registers_from_string): Call get_regcache
15194 with fetch flag set.
15195 (register_data): Make static. Pass fetch flag to get_regcache.
15196 (supply_register): Call get_regcache with fetch flag clear.
15197 (collect_register): Call get_regcache with fetch flag set.
15198 (collect_register_as_string): New function.
15199 * regcache.h: Update.
15200 * remote-utils.c (putpkt): Flush after debug output and use
15201 stderr.
15202 Handle input interrupts while waiting for an ACK.
15203 (input_interrupt): Use signal_pid method.
15204 (getpkt): Flush after debug output and use stderr.
15205 (outreg): Use collect_register_as_string.
15206 (new_thread_notify, dead_thread_notify): New functions.
15207 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15208 and general_thread.
15209 (look_up_one_symbol): Flush after debug output.
15210 * server.c (step_thread, server_waiting): New variables.
15211 (start_inferior): Don't use signal_pid. Update call to mywait.
15212 (attach_inferior): Update call to mywait.
15213 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15214 (main): Don't fetch/store registers explicitly. Use
15215 set_desired_inferior. Support proposed ``Hs'' packet. Update
15216 calls to mywait.
15217 * server.h: Update.
15218 (struct inferior_list, struct_inferior_list_entry): New.
15219 * target.c (set_desired_inferior): New.
15220 (write_inferior_memory): Constify.
15221 (mywait): New function.
15222 * target.h: Update.
15223 (struct target_ops): New signal_pid method.
15224 (mywait): Removed macro, added prototype.
15225
15226 * linux-low.h (regset_func): Removed.
15227 (regset_fill_func, regset_store_func): New.
15228 (enum regset_type): New.
15229 (struct regset_info): Add type field. Use new operation types.
15230 (struct linux_target_ops): stop_pc renamed to get_pc.
15231 Add decr_pc_after_break and breakpoint_at.
15232 (get_process, get_thread_proess, get_process_thread)
15233 (strut process_info, all_processes, linux_attach_lwp)
15234 (thread_db_init): New.
15235
15236 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15237 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15238 (the_low_target): Add new members.
15239 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15240 (i386_store_fpxregset): Constify.
15241 (target_regsets): Add new kind identifier.
15242 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15243 (i386_set_pc): Add debugging.
15244 (i386_breakpoint_at): New function.
15245 (the_low_target): Add new members.
15246 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15247 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15248 (mips_breakpoint_at): New.
15249 (the_low_target): Add new members.
15250 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15251 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15252 (the_low_target): Add new members.
15253 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15254 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15255 (the_low_target): Add new members.
15256 * linux-x86-64-low.c (target_regsets): Add new kind
15257 identifier.
15258
152592002-05-15 Daniel Jacobowitz <drow@mvista.com>
15260
15261 From Martin Pool <mbp@samba.org>:
15262 * server.c (gdbserver_usage): New function.
15263 (main): Call it.
15264
152652002-05-14 Daniel Jacobowitz <drow@mvista.com>
15266
15267 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15268 stop_at -> stop_pc.
15269
152702002-05-04 Andrew Cagney <ac131313@redhat.com>
15271
15272 * Makefile.in: Remove obsolete code.
15273
152742002-04-24 Michal Ludvig <mludvig@suse.cz>
15275
15276 * linux-low.c (regsets_fetch_inferior_registers),
15277 (regsets_store_inferior_registers): Removed cast to int from
15278 ptrace() calls.
15279 * regcache.h: Added declaration of struct inferior_info.
15280
152812002-04-20 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * inferiors.c (struct inferior_info): Add regcache_data.
15284 (add_inferior): Call create_register_cache.
15285 (clear_inferiors): Call free_register_cache.
15286 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15287 * regcache.c (struct inferior_regcache_data): New.
15288 (registers): Remove.
15289 (get_regcache): New function.
15290 (create_register_cache, free_register_cache): New functions.
15291 (set_register_cache): Don't initialize the register cache here.
15292 (registers_to_string, registers_from_string, register_data): Call
15293 get_regcache.
15294 * regcache.h: Add prototypes.
15295 * server.h: Likewise.
15296
152972002-04-20 Daniel Jacobowitz <drow@mvista.com>
15298
15299 * mem-break.c: New file.
15300 * mem-break.h: New file.
15301 * Makefile.in: Add mem-break.o rule; update server.h
15302 dependencies.
15303 * inferiors.c (struct inferior_info): Add target_data
15304 member.
15305 (clear_inferiors): Free target_data member if set.
15306 (inferior_target_data, set_inferior_target_data): New functions.
15307 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15308 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15309 * linux-low.c (linux_bp_reinsert): New variable.
15310 (struct inferior_linux_data): New.
15311 (linux_create_inferior): Use set_inferior_target_data.
15312 (linux_attach): Likewise. Call add_inferior.
15313 (linux_wait_for_one_inferior): New function.
15314 (linux_wait): Call it.
15315 (linux_write_memory): Add const.
15316 (initialize_low): Call set_breakpoint_data.
15317 * linux-low.h (struct linux_target_ops): Add breakpoint
15318 handling members.
15319 * server.c (attach_inferior): Remove extra add_inferior
15320 call.
15321 * server.h: Include mem-break.h. Update inferior.c
15322 prototypes.
15323 * target.c (read_inferior_memory)
15324 (write_inferior_memory): New functions.
15325 * target.h (read_inferior_memory)
15326 (write_inferior_memory): Change macros to prototypes.
15327 (struct target_ops): Update comments. Add const to write_memory
15328 definition.
15329
153302002-04-11 Daniel Jacobowitz <drow@mvista.com>
15331
15332 * linux-low.c (usr_store_inferior_registers): Support
15333 registers which are allowed to fail to store.
15334 * linux-low.h (linux_target_ops): Likewise.
15335 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15336 (ppc_cannot_store_register): FPSCR may not be storable.
15337
153382002-04-09 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * server.h: Include <string.h> if HAVE_STRING_H.
15341 * ChangeLog: Correct paths in last ChangeLog entry.
15342
153432002-04-09 Daniel Jacobowitz <drow@mvista.com>
15344
15345 * linux-low.h: Remove obsolete prototypes.
15346 (struct linux_target_ops): New.
15347 (extern the_low_target): New.
15348 * linux-low.c (num_regs, regmap): Remove declarations.
15349 (register_addr): Use the_low_target explicitly.
15350 (fetch_register): Likewise.
15351 (usr_fetch_inferior_registers): Likewise.
15352 (usr_store_inferior_registers): Likewise.
15353 * linux-arm-low.c (num_regs): Remove.
15354 (arm_num_regs): Define.
15355 (arm_regmap): Renamed from regmap, made static.
15356 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15357 made static.
15358 (arm_cannot_store_register): Renamed from cannot_store_register,
15359 made static.
15360 (the_low_target): New.
15361 * linux-i386-low.c (num_regs): Remove.
15362 (i386_num_regs): Define.
15363 (i386_regmap): Renamed from regmap, made static.
15364 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15365 made static.
15366 (i386_cannot_store_register): Renamed from cannot_store_register,
15367 made static.
15368 (the_low_target): New.
15369 * linux-ia64-low.c (num_regs): Remove.
15370 (ia64_num_regs): Define.
15371 (ia64_regmap): Renamed from regmap, made static.
15372 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15373 made static.
15374 (ia64_cannot_store_register): Renamed from cannot_store_register,
15375 made static.
15376 (the_low_target): New.
15377 * linux-m68k-low.c (num_regs): Remove.
15378 (m68k_num_regs): Define.
15379 (m68k_regmap): Renamed from regmap, made static.
15380 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15381 made static.
15382 (m68k_cannot_store_register): Renamed from cannot_store_register,
15383 made static.
15384 (the_low_target): New.
15385 * linux-mips-low.c (num_regs): Remove.
15386 (mips_num_regs): Define.
15387 (mips_regmap): Renamed from regmap, made static.
15388 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15389 made static.
15390 (mips_cannot_store_register): Renamed from cannot_store_register,
15391 made static.
15392 (the_low_target): New.
15393 * linux-ppc-low.c (num_regs): Remove.
15394 (ppc_num_regs): Define.
15395 (ppc_regmap): Renamed from regmap, made static.
15396 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15397 made static.
15398 (ppc_cannot_store_register): Renamed from cannot_store_register,
15399 made static.
15400 (the_low_target): New.
15401 * linux-s390-low.c (num_regs): Remove.
15402 (s390_num_regs): Define.
15403 (s390_regmap): Renamed from regmap, made static.
15404 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15405 made static.
15406 (s390_cannot_store_register): Renamed from cannot_store_register,
15407 made static.
15408 (the_low_target): New.
15409 * linux-sh-low.c (num_regs): Remove.
15410 (sh_num_regs): Define.
15411 (sh_regmap): Renamed from regmap, made static.
15412 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15413 made static.
15414 (sh_cannot_store_register): Renamed from cannot_store_register,
15415 made static.
15416 (the_low_target): New.
15417 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15418 (the_low_target): New.
15419
154202002-04-09 Daniel Jacobowitz <drow@mvista.com>
15421
15422 * Makefile.in: Add stamp-h target.
15423 * configure.in: Create stamp-h.
15424 * configure: Regenerated.
15425
154262002-04-09 Daniel Jacobowitz <drow@mvista.com>
15427
15428 * inferiors.c: New file.
15429 * target.c: New file.
15430 * target.h: New file.
15431 * Makefile.in: Add target.o and inferiors.o. Update
15432 dependencies.
15433 * linux-low.c (inferior_pid): New static variable,
15434 moved from server.c.
15435 (linux_create_inferior): Renamed from create_inferior.
15436 Call add_inferior. Return 0 on success instead of a PID.
15437 (linux_attach): Renamed from myattach.
15438 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15439 (linux_thread_alive): Renamed from mythread_alive.
15440 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15441 child dies.
15442 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15443 (regsets_store_inferior_registers): Correct error message.
15444 Add missing ``return 0''.
15445 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15446 (linux_store_registers): Renamed from store_inferior_registers.
15447 (linux_read_memory): Renamed from read_inferior_memory.
15448 (linux_write_memory): Renamed from write_inferior_memory.
15449 (linux_target_ops): New structure.
15450 (initialize_low): Call set_target_ops ().
15451 * remote-utils.c (unhexify): New function.
15452 (hexify): New function.
15453 (input_interrupt): Send signals to ``signal_pid''.
15454 * server.c (inferior_pid): Remove.
15455 (start_inferior): Update create_inferior call.
15456 (attach_inferior): Call add_inferior.
15457 (handle_query): New function.
15458 (main): Call handle_query for `q' packets.
15459 * server.h: Include "target.h". Remove obsolete prototypes.
15460 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15461
154622002-04-09 Daniel Jacobowitz <drow@mvista.com>
15463
15464 * Makefile.in: Add WARN_CFLAGS. Update configury
15465 dependencies.
15466 * configure.in: Check for <string.h>
15467 * configure: Regenerate.
15468 * config.in: Regenerate.
15469 * gdbreplay.c: Include needed system headers.
15470 (remote_open): Remove strchr prototype.
15471 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15472 * regcache.c (supply_register): Change buf argument to const void *.
15473 (supply_register_by_name): Likewise.
15474 (collect_register): Change buf argument to void *.
15475 (collect_register_by_name): Likewise.
15476 * regcache.h: Add missing prototypes.
15477 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15478 * server.c (handle_query): New function.
15479 (attached): New static variable, moved out of main.
15480 (main): Quiet longjmp clobber warnings.
15481 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15482 * utils.c (error): Remove NORETURN.
15483 (fatal): Likewise.