]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix powerpc comment typo
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
256642e8
PA
12017-09-29 Pedro Alves <palves@redhat.com>
2
3 * ax.c (gdb_parse_agent_expr): Constify.
4 * ax.h (gdb_parse_agent_expr): Constify.
5 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6 Constify.
7 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
8 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
9 * remote-utils.h (read_ptid): Constify.
10 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
11 (process_point_options, process_serial_event): Constify.
12 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
13 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
14 (cmd_qtbuffer): Constify.
15
5b9ca4d4
PA
162017-09-29 Pedro Alves <palves@redhat.com>
17
18 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
19 fails.
20
94c207e0
PA
212017-09-29 Pedro Alves <palves@redhat.com>
22
23 * linux-low.c (handle_extended_wait): Pass parent thread instead
24 of process to thread_db_notice_clone.
25 * linux-low.h (thread_db_notice_clone): Replace parent process
26 parameter with parent thread parameter.
27 * thread-db.c (find_one_thread): Add comment.
28 (thread_db_notice_clone): Replace parent process parameter with
29 parent thread parameter. Temporarily switch to the parent thread.
30
75352e28
SDJ
312017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
32
33 * gdbthread.h: Include "common-gdbthread.h".
34 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
35 "if" when validating the ptid.
36 * remote-utils.c: Include "gdbthread.h".
37 (prepare_resume_reply): Use "switch_to_thread".
38 * target.c (done_accessing_memory): Likewise.
39
ad339634
AA
402017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
41
42 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
43 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
44 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
45 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
46 s390x-gs-linux64-ipa.o to ipa_obj.
47 * linux-s390-low.c (HWCAP_S390_GS): New define.
48 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
49 New functions.
50 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
51 (s390_arch_setup): Check for guarded-storage support and choose
52 appropriate tdesc.
53 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
54 init_registers_s390x_gs_linux64.
55 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
56 enum value.
57 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
58 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
59
cc4d742f
SM
602017-09-22 Simon Marchi <simon.marchi@ericsson.com>
61
62 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
63
f6327dcb
KB
642017-09-21 Kevin Buettner <kevinb@redhat.com>
65
66 * linux-low.h (struct lwp_info): Add new field, thread_handle.
67 (thread_db_thread_handle): Declare.
68 * linux-low.c (linux_target_ops): Initialize thread_handle.
69 * server.c (handle_qxfer_threads_worker): Add support for
70 "handle" attribute.
71 * target.h (struct target_ops): Add new function pointer,
72 thread_handle.
73 (target_thread_handle): Define.
74 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
75 field in lwp.
76 (thread_db_thread_handle): New function.
77
86299109
KB
782017-09-21 Kevin Buettner <kevinb@redhat.com>
79
80 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
81 * linux-low.h (thread_db_notice_clone): Declare.
82 * thread-db.c (thread_db_notice_clone): New function.
83
f557a88a
PA
842017-09-21 Pedro Alves <palves@redhat.com>
85
86 * server.c (gdb_read_memory, handle_status, process_serial_event)
87 (handle_serial_event, handle_target_event): Adjust to
88 set_desired_thread prototype change.
89 * target.c (set_desired_thread): Remove 'use_general' parameter
90 and adjust.
91 * target.h (set_desired_thread): Remove 'use_general' parameter.
92
223ffa71
TT
932017-09-20 Tom Tromey <tom@tromey.com>
94
95 * target.c (target_terminal::terminal_state): Define.
96 (target_terminal::init): Rename from target_terminal_init.
97 (target_terminal::inferior): Rename from
98 target_terminal_inferior.
99 (target_terminal::ours): Rename from target_terminal_ours.
100 (target_terminal::ours_for_output, target_terminal::info): New.
101
04fd3ba9
SM
1022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
103
104 * server.c (accumulate_file_name_length): Remove.
105 (emit_dll_description): Adjust to std::string change.
106 (handle_qxfer_libraries): Use std::string to hold document.
107
5e187554
SM
1082017-09-16 Simon Marchi <simon.marchi@ericsson.com>
109
110 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
111 return type of xml_escape_text.
112 * server.c (emit_dll_description): Likewise.
113
1526853e
SM
1142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
115
116 * server.c (captured_main): Accept argument for --selftest.
117 Update run_tests call.
118 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
119 when registering selftests.
120
c4dfafab
SDJ
1212017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
122
123 * regcache.c (get_thread_regcache): Update code to use "std::vector"
124 instead of "VEC" for "target_desc.reg_defs".
125 (regcache_cpy): Likewise.
126 (registers_to_string): Likewise.
127 (registers_from_string): Likewise.
128 (find_regno): Likewise.
129 (supply_regblock): Likewise.
130 (regcache_raw_read_unsigned): Likewise.
131 * tdesc.c (init_target_desc): Likewise.
132 (tdesc_create_reg): Likewise.
133 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
134 (struct target_desc) <reg_defs>: Convert to "std::vector".
135 (target_desc): Do not initialize "reg_defs".
136 (~target_desc): Update code to use "std::vector" instead of "VEC"
137 for "target_desc.reg_defs".
138 (operator==): Likewise.
139
124aceb4
SM
1402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
141
142 * inferiors.h (thread_to_gdb_id): Remove.
143 * inferiors.c (thread_to_gdb_id): Remove.
144 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
145 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
146 lynx_store_registers, lynx_read_memory, lynx_write_memory):
147 Likewise.
148 * nto-low.c (nto_fetch_registers, nto_store_registers,
149 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
150
96cde54f
SM
1512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
152
153 * inferiors.h (gdb_id_to_thread_id): Remove.
154 * inferiors.c (gdb_id_to_thread_id): Remove.
155 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
156 removal. Move pid declaration closer to where it's used.
157
e8ca139e
SM
1582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
159
160 * server.c (handle_detach): New function.
161 (process_serial_event): Move code out, call handle_detach.
162
f8a4e119
SM
1632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
164
165 * server.c (require_running): Rename to ...
166 (require_running_or_return): ... this ...
167 (require_running_or_break): ... and this.
168 (handle_query, process_serial_event): Adjust.
169
0eb0a407
SM
1702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
171
172 * linux-low.c (linux_set_resume_request): Remove unused
173 variables.
174
785922a5
SM
1752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
176
177 * server.c (first_thread_of): Remove.
178 (process_serial_event): Replace usage of first_thread_of with
179 find_any_thread_of_pid.
180 * tracepoint.c (same_process_p): Remove.
181 (gdb_agent_about_to_close): Replace usage of same_process_p with
182 find_any_thread_of_pid.
183 * linux-x86-low.c (same_process_callback): Remove.
184 (x86_arch_setup_process_callback): Replace usage of
185 same_process_callback with find_any_thread_of_pid.
186 * thread-db.c (any_thread_of): Remove.
187 (switch_to_process): Replace usage of any_thread_of with
188 find_any_thread_of_pid.
189 * inferiors.c (thread_pid_matches_callback): Remove.
190 (find_thread_process): Adjust to use find_any_thread_of_pid.
191
a059f00c
SDJ
1922017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
193
194 * regcache.c (get_thread_regcache): Guard calls to "memset"
195 with "!VEC_empty".
196
cc397f3a
SDJ
1972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
198
199 * linux-low.c (handle_extended_wait): Use
200 "allocate_target_description" instead of "XNEW".
201 * linux-x86-low.c (initialize_low_arch): Likewise.
202
22916b07
YQ
2032017-09-05 Yao Qi <yao.qi@linaro.org>
204
205 * configure.srv (srv_i386_regobj): Remove.
206 (srv_amd64_regobj): Remove.
207 (srv_regobj): Set it to "" for x86 non-linux targets.
208 * linux-x86-tdesc.c (i386_linux_read_description):
209 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
210 (init_registers_i386): Remove the declaration.
211 (tdesc_i386): Remove the declaration.
212 (lynx_i386_arch_setup): Call i386_create_target_description.
213 * nto-x86-low.c: Likewise.
214 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
215 [!__x86_64__]: include arch/i386.h.
216 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
217
38602d55
YQ
2182017-09-05 Yao Qi <yao.qi@linaro.org>
219
220 * configure.srv (srv_amd64_linux_xmlfiles): Remove
221 i386/amd64-XXX-linux from it.
222
44b886ff
YQ
2232017-09-05 Yao Qi <yao.qi@linaro.org>
224
225 * configure.srv: Empty srv_amd64_linux_regobj if $development is
226 false.
227 (ipa_amd64_linux_regobj): Remove.
228 (ipa_x32_linux_regobj): Remove.
229
b4570e4b
YQ
2302017-09-05 Yao Qi <yao.qi@linaro.org>
231
232 * Makefile.in (arch-amd64.o): New rule.
233 * configure.srv: Append arch-amd64.o.
234 * linux-amd64-ipa.c: Include common/x86-xstate.h.
235 (get_ipa_tdesc): Call amd64_linux_read_description.
236 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
237 and init_registers_amd64_XXX.
238 * linux-x86-low.c (x86_linux_read_description): Call
239 amd64_linux_read_description.
240 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
241 (initialize_low_arch): Don't call init_registers_x32_XXX and
242 init_registers_amd64_XXX.
243 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
244 and tdesc_amd64_XXX.
245 [__x86_64__] (amd64_tdesc_test): New function.
246 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
247 and init_registers_amd64_XXX.
248 * linux-x86-tdesc.c: Include arch/amd64.h.
249 (xcr0_to_tdesc_idx): New function.
250 (i386_linux_read_description): New function.
251 (amd64_get_ipa_tdesc_idx): New function.
252 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
253 (amd64_get_ipa_tdesc): Declare.
254
d1f28ea2
YQ
2552017-09-05 Yao Qi <yao.qi@linaro.org>
256
257 * configure.srv (srv_i386_linux_xmlfiles): Remove
258 i386/i386-XXX-linux.xml from it.
259
25a93583
YQ
2602017-09-05 Yao Qi <yao.qi@linaro.org>
261
262 * configure.srv: Set srv_i386_linux_regobj empty if $development
263 is false.
264 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
265 initialize_low_tdesc.
266 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
267 with #if initialize_low_tdesc.
268 * linux-x86-tdesc-selftest.c: New file.
269 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
270
5f035c07
YQ
2712017-09-05 Yao Qi <yao.qi@linaro.org>
272
273 * Makefile.in (arch-i386.o): New rule.
274 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
275 (x86_64-*-linux*): Likewise.
276 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
277 include arch/i386.h.
278 (i386_linux_read_description): Remove code and call
279 i386_create_target_description.
280 * tdesc.c (allocate_target_description): New function.
281 * tdesc.h (set_tdesc_architecture): Remove declaration.
282 (set_tdesc_osabi): Likewise.
283
0abe8a89
YQ
2842017-09-05 Yao Qi <yao.qi@linaro.org>
285
286 * linux-x86-tdesc.c: Don't include <inttypes.h>.
287 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
288 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
289 .xmltarget.
290 * server.c (get_features_xml): Call tdesc_get_features_xml.
291 * tdesc.c (set_tdesc_architecture): New function.
292 (set_tdesc_osabi): New function.
293 (tdesc_get_features_xml): New function.
294 (tdesc_create_feature): Add an argument.
295 * tdesc.h (struct target_desc) <features>: New field.
296 <arch, osabi>: New field.
297 (~target_desc): xfree features, arch, and osabi.
298 (target_desc::oerator==): Don't compare .xmltarget.
299 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
300 (set_tdesc_osabi): Likewise.
301 (tdesc_get_features_xml): Likewise.
302
0a188386
YQ
3032017-09-05 Yao Qi <yao.qi@linaro.org>
304
305 * linux-x86-tdesc.c: Include selftest.h.
306 (i386_tdesc_test): New function.
307 (initialize_low_tdesc): Call selftests::register_test.
308 * tdesc.h: Include regdef.h.
309 (target_desc): Override operator == and !=.
310
f49ff000
YQ
3112017-09-05 Yao Qi <yao.qi@linaro.org>
312
313 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
314 (ipa_obj): Likewise.
315 * linux-i386-ipa.c: Include common/x86-xstate.h
316 (get_ipa_tdesc): Call i386_linux_read_description.
317 (initialize_low_tracepoint): Don't call init_registers_XXX
318 functions, call initialize_low_tdesc instead.
319 * linux-x86-low.c (x86_linux_read_description): Call
320 i386_linux_read_description.
321 (initialize_low_arch): Don't call init_registers_i386_XXX
322 functions, call initialize_low_tdesc.
323 * linux-x86-tdesc.c: New file.
324 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
325 (i386_get_ipa_tdesc_idx): Declare.
326 (i386_get_ipa_tdesc): Declare.
327 (initialize_low_tdesc): Declare.
328
2b68ef2f
YQ
3292017-09-05 Yao Qi <yao.qi@linaro.org>
330
331 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
332 instead of 0.
333
f7000548
YQ
3342017-09-05 Yao Qi <yao.qi@linaro.org>
335
336 * Makefile.in (IPA_OBJS): Add vec-ipa.o
337 * regcache.c (get_thread_regcache): Use VEC_length.
338 (init_register_cache): Likewise.
339 (regcache_cpy): Likewise.
340 (registers_to_string): Iterate reg_defs via VEC_iterate.
341 (find_regno): Likewise.
342 (find_register_by_number): Use VEC_index.
343 (register_size): Call find_register_by_number.
344 (register_data): Call find_register_by_number.
345 (supply_regblock): Use VEC_length.
346 (regcache_raw_read_unsigned): Likewise.
347 * tdesc.c (init_target_desc): Iterate reg_defs via
348 VEC_iterate.
349 (default_description): Update initializer.
350 (copy_target_description): Don't update field num_registers.
351 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
352 <num_registers>: Remove.
353
50a421ac
SM
3542017-09-04 Simon Marchi <simon.marchi@ericsson.com>
355
356 * Makefile.in (.SECONDARY): Define target.
357
23fdd69e
SM
3582017-09-03 Simon Marchi <simon.marchi@ericsson.com>
359
360 * linux-low.c (linux_wait_1): Adjust.
361 * server.c (queue_stop_reply_callback): Adjust.
362
0a2dde4a
SDJ
3632017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
364
365 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
366 QEnvironmentUnset and QEnvironmentReset packets.
367 (handle_query): Inform remote that QEnvironmentHexEncoded,
368 QEnvironmentUnset and QEnvironmentReset are supported.
369
6afd337d
SM
3702017-08-25 Simon Marchi <simon.marchi@ericsson.com>
371
372 * inferiors.h (inferior_target_data): Rename to ...
373 (thread_target_data): ... this.
374 (inferior_regcache_data): Rename to ...
375 (thread_regcache_data): ... this.
376 (set_inferior_regcache_data): Rename to ...
377 (set_thread_regcache_data): ... this.
378 * inferiors.c (inferior_target_data): Rename to ...
379 (thread_target_data): ... this.
380 (inferior_regcache_data): Rename to ...
381 (thread_regcache_data): ... this.
382 (set_inferior_regcache_data): Rename to ...
383 (set_thread_regcache_data): ... this.
384 (free_one_thread): Update.
385 * linux-low.h (get_thread_lwp): Update.
386 * regcache.c (get_thread_regcache): Update.
387 (regcache_invalidate_thread): Update.
388 (free_register_cache_thread): Update.
389 * win32-i386-low.c (update_debug_registers_callback): Update.
390 (win32_get_current_dr): Update.
391 * win32-low.c (thread_rec): Update.
392 (delete_thread_info): Update.
393 (continue_one_thread): Update.
394 (suspend_one_thread): Update.
395
a160cc46
SM
3962017-08-24 Simon Marchi <simon.marchi@ericsson.com>
397
398 * inferiors.c (set_inferior_target_data): Remove.
399 * inferiors.h (set_inferior_target_data): Remove.
400
6d580b63
YQ
4012017-08-18 Yao Qi <yao.qi@linaro.org>
402
403 * Makefile.in (OBS): Add selftest.o.
404 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
405 * configure, config.in: Re-generated.
406 * server.c: Include common/sefltest.h.
407 (captured_main): Handle option --selftest.
408
f5a29eb0
YQ
4092017-08-09 Yao Qi <yao.qi@linaro.org>
410
411 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
412 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
413 i386-avx-mpx.o and i386-mmx.o.
414 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
415 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
416 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
417 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
418 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
419 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
420 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
421 i386/amd64-avx-mpx.xml.
422
57757c2f
YQ
4232017-08-09 Yao Qi <yao.qi@linaro.org>
424
425 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
426 and x32-avx-avx512.o.
427 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
428 i386/x32-avx-avx512.xml.
429
229d26fc
SM
4302017-07-26 Simon Marchi <simon.marchi@ericsson.com>
431
432 * tracepoint.h (enum class fast_tpoint_collect_result): New
433 enumeration.
434 (fast_tracepoint_collecting): Change return type to
435 fast_tpoint_collect_result.
436 * tracepoint.c (fast_tracepoint_collecting): Likewise.
437 * linux-low.h: Include tracepoint.h.
438 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
439 fast_tpoint_collect_result.
440 * linux-low.c (handle_tracepoints): Adjust.
441 (linux_fast_tracepoint_collecting): Change return type to
442 fast_tpoint_collect_result.
443 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
444 linux_wait_1, stuck_in_jump_pad_callback,
445 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
446 proceed_one_lwp): Adjust to type change.
447
2e1e43e1
YQ
4482017-07-10 Yao Qi <yao.qi@linaro.org>
449
450 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
451
adc764e7
YQ
4522017-06-29 Yao Qi <yao.qi@linaro.org>
453
454 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
455 Remove.
456 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
457
a206891a
SM
4582017-06-20 Simon Marchi <simon.marchi@ericsson.com>
459
460 * Makefile.in (IPA_OBJS): Sort and format one item per line.
461
9a6c7d9c
SDJ
4622017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
463
464 * linux-low.c (linux_create_inferior): Adjust code to access the
465 environment information via 'gdb_environ' class.
466 * lynx-low.c (lynx_create_inferior): Likewise.
467 * server.c (our_environ): Make it an instance of 'gdb_environ'.
468 (get_environ): Return a pointer to 'our_environ'.
469 (captured_main): Initialize 'our_environ'.
470 * server.h (get_environ): Adjust prototype.
471 * spu-low.c (spu_create_inferior): Adjust code to access the
472 environment information via 'gdb_environ' class.
473
ae3e2ccf
SM
4742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
475
476 * linux-low.c (linux_read_memory, linux_write_memory): Remove
477 usage of "register" keyword.
478
3e019bdc
SM
4792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
480
481 * configure: Re-generate.
482
8465943a
SM
4832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
484
485 * configure: Re-generate.
486
cf0dd6f0
SM
4872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
488
489 * Makefile.in (COMPILE.pre): Add "-x c++".
490
9845682b
SDJ
4912017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
492
493 * fork-child.c: Conditionally include <signal.h>.
494
aefd8b33
SDJ
4952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
496
497 * server.c (handle_general_set): Handle new packet
498 "QStartupWithShell".
499 (handle_query): Add "QStartupWithShell" to the list of supported
500 packets.
501 (gdbserver_usage): Add help text explaining the
502 new "--startup-with-shell" and "--no-startup-with-shell" CLI
503 options.
504 (captured_main): Recognize and act upon the presence of the new
505 CLI options.
506
2090129c
SDJ
5072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
508 Pedro Alves <palves@redhat.com>
509
510 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
511 * configure: Regenerate.
512 * configure.srv (srv_linux_obj): Add "fork-child.o" and
513 "fork-inferior.o".
514 (i[34567]86-*-lynxos*): Likewise.
515 (spu*-*-*): Likewise.
516 * fork-child.c: New file.
517 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
518 and "environ.h".
519 (linux_ptrace_fun): New function.
520 (linux_create_inferior): Adjust function prototype to reflect
521 change on "target.h". Adjust function code to use
522 "fork_inferior".
523 (linux_request_interrupt): Delete "signal_pid".
524 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
525 (lynx_ptrace_fun): New function.
526 (lynx_create_inferior): Adjust function prototype to reflect
527 change on "target.h". Adjust function code to use
528 "fork_inferior".
529 * nto-low.c (nto_create_inferior): Adjust function prototype and
530 code to reflect change on "target.h". Update comments.
531 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
532 "common-terminal.h" and "environ.h".
533 (terminal_fd): Moved to fork-child.c.
534 (old_foreground_pgrp): Likewise.
535 (restore_old_foreground_pgrp): Likewise.
536 (last_status): Make it global.
537 (last_ptid): Likewise.
538 (our_environ): New variable.
539 (startup_with_shell): Likewise.
540 (program_name): Likewise.
541 (program_argv): Rename to...
542 (program_args): ...this.
543 (wrapper_argv): New variable.
544 (start_inferior): Delete function.
545 (get_exec_wrapper): New function.
546 (get_exec_file): Likewise.
547 (get_environ): Likewise.
548 (prefork_hook): Likewise.
549 (post_fork_inferior): Likewise.
550 (postfork_hook): Likewise.
551 (postfork_child_hook): Likewise.
552 (handle_v_run): Update code to deal with arguments coming from the
553 remote host. Update calls from "start_inferior" to
554 "create_inferior".
555 (captured_main): Likewise. Initialize environment variable. Call
556 "have_job_control".
557 * server.h (post_fork_inferior): New prototype.
558 (get_environ): Likewise.
559 (last_status): Declare.
560 (last_ptid): Likewise.
561 (signal_pid): Likewise.
562 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
563 (spu_ptrace_fun): New function.
564 (spu_create_inferior): Adjust function prototype to reflect change
565 on "target.h". Adjust function code to use "fork_inferior".
566 * target.c (target_terminal_init): New function.
567 (target_terminal_inferior): Likewise.
568 (target_terminal_ours): Likewise.
569 * target.h: Include <vector>.
570 (struct target_ops) <create_inferior>: Update prototype.
571 (create_inferior): Update macro.
572 * utils.c (gdb_flush_out_err): New function.
573 * win32-low.c (win32_create_inferior): Adjust function prototype
574 and code to reflect change on "target.h".
575
043a4934
SDJ
5762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
577
578 * inferiors.c (switch_to_thread): New function.
579
15652511
SDJ
5802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
581
582 * Makefile.in (SFILE): Add "common/job-control.c".
583 (OBS): Add "job-control.o".
584
21ea5acd
SDJ
5852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
586
587 * Makefile: Remove "@host_makefile_frag@".
588
e13cb306
PA
5892017-05-05 Pedro Alves <palves@redhat.com>
590
591 * configure: Regenerate.
592
c94fee56
SDJ
5932017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
594
595 * configure: Regenerate.
596
a0ff9e1a
SM
5972017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
600 software_single_step change of return type to
601 std::vector<CORE_ADDR>.
602 * linux-low.c (install_software_single_step_breakpoints):
603 Likewise.
604 * linux-low.h (install_software_single_step_breakpoints):
605 Likewise.
606
be628ab8
SDJ
6072017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
608
609 * remote-utils.c: Include "gdb_termios.h" instead of
610 "terminal.h".
611 * terminal.h: Delete file.
612
7c5ded6a
SDJ
6132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
614
615 * server.c: Include <vector>.
616 <program_argv, wrapper_argv>: Convert to std::vector.
617 (start_inferior): Rewrite function to use C++.
618 (handle_v_run): Likewise. Update code that calculates the argv
619 based on the vRun packet; use C++.
620 (captured_main): Likewise.
621
436252de
SM
6222017-04-06 Simon Marchi <simon.marchi@ericsson.com>
623
624 * server.c (handle_v_cont): Initialize thread_resume::thread
625 with null_ptid.
626
9bf2a700
PA
6272017-04-05 Pedro Alves <palves@redhat.com>
628
629 * configure: Regenerate.
630
a121b7c1
PA
6312017-04-05 Pedro Alves <palves@redhat.com>
632
633 * gdbreplay.c (sync_error): Constify.
634 * linux-x86-low.c (push_opcode): Constify.
635
21c8a587
PA
6362017-04-05 Pedro Alves <palves@redhat.com>
637
638 * win32-low.c (get_child_debug_event)
639 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
640 Report TARGET_WAITKIND_SPURIOUS instead.
641
fb32b4f7
PA
6422017-04-05 Pedro Alves <palves@redhat.com>
643
644 * remote-utils.c (remote_prepare, remote_open): Constify.
645 * remote-utils.h (remote_prepare, remote_open): Constify.
646 * server.c (captured_main): Constify 'port' handling.
647
65dd1e59
SM
6482017-04-04 Simon Marchi <simon.marchi@ericsson.com>
649
650 * Makefile.in (clean): Clear .deps.
651
8fa5b777
SM
6522017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
653
654 * .gitignore: Remove generated files, replace with wildcard.
655 * (clean): Replace removal of generated files with wildcard.
656 (version.c): Replace with...
657 (version-generated.c): ...this.
658 (xml-builtin.c): Replace with...
659 (xml-builtin-generated.c): ...this.
660 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
661 (%.c: *regformats*): Replace with...
662 (%-generated.c: *regformats*): ...this.
663
a12e714b
MF
6642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
665
666 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
667 (xtensa_fill_gregset): Call collect_register_by_name for
668 threadptr register.
669 (xtensa_store_gregset): Call supply_register_by_name for
670 threadptr register.
671
1a09b50a
MF
6722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
673
674 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
675 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
676 (xtensa_store_gregset): Call supply_register for all registers in
677 a0_regnum..a0_regnum + C0_NREGS range.
678
1a01e7c6
SM
6792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
682 (ax-ipa.o: ax.c): Remove.
683 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
684 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
685 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
686 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
687 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
688
36bc18a8
SM
6892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
692 (print-utils-ipa.o: ../common/print-utils.c): Remove.
693 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
694 (errors-ipa.o: ../common/errors.c): Remove.
695 (format-ipa.o: ../common/format.c): Remove.
696 (common-utils-ipa.o: ../common/common-utils.c): Remove.
697
a8ebe3d5
SM
6982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
699
700 * Makefile.in (%-ipa.o: %.c): New rule.
701 (tracepoint-ipa.o: tracepoint.c): Remove.
702 (utils-ipa.o: utils.c): Remove.
703 (remote-utils-ipa.o: remote-utils.c): Remove.
704 (regcache-ipa.o: regcache.c): Remove.
705 (i386-linux-ipa.o: i386-linux.c): Remove.
706 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
707 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
708 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
709 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
710 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
711 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
712 (amd64-linux-ipa.o: amd64-linux.c): Remove.
713 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
714 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
715 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
716 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
717 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
718 (aarch64-ipa.o: aarch64.c): Remove.
719 (s390-linux32-ipa.o: s390-linux32.c): Remove.
720 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
721 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
722 (s390-linux64-ipa.o: s390-linux64.c): Remove.
723 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
724 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
725 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
726 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
727 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
728 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
729 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
730 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
731 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
732 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
733 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
734 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
735 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
736 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
737 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
738 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
739 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
740 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
741 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
742 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
743 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
744 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
745 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
746 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
747 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
748 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
749 (tdesc-ipa.o: tdesc.c): Remove.
750 (x32-linux-ipa.o: x32-linux.c): Remove.
751 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
752 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
753
50cfacb7
SM
7542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * Makefile.in (%.o: ../arch/%.c): New rule.
757 (arm.o: ../arch/arm.c): Remove.
758 (arm-linux.o: ../arch/arm-linux.c): Remove.
759 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
760 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
761
c5a22423
SM
7622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
763
764 * Makefile.in (%.o: ../nat/%.c): New rule.
765 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
766 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
767 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
768 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
769 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
770 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
771 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
772 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
773 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
774 (linux-personality.o: ../nat/linux-personality.c): Remove.
775 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
776 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
777 (x86-linux.o: ../nat/x86-linux.c): Remove.
778 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
779 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
780
6bda016b
SM
7812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * Makefile.in (%.o: ../common/%.c): New rule.
784 (signals.o: ../common/signals.c): Remove.
785 (print-utils.o: ../common/print-utils.c): Remove.
786 (rsp-low.o: ../common/rsp-low.c): Remove.
787 (common-utils.o: ../common/common-utils.c): Remove.
788 (posix-strerror.o: ../common/posix-strerror.c): Remove.
789 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
790 (vec.o: ../common/vec.c): Remove.
791 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
792 (xml-utils.o: ../common/xml-utils.c): Remove.
793 (ptid.o: ../common/ptid.c): Remove.
794 (buffer.o: ../common/buffer.c): Remove.
795 (format.o: ../common/format.c): Remove.
796 (filestuff.o: ../common/filestuff.c): Remove.
797 (agent.o: ../common/agent.c): Remove.
798 (errors.o: ../common/errors.c): Remove.
799 (environ.o: ../common/environ.c): Remove.
800 (common-debug.o: ../common/common-debug.c): Remove.
801 (cleanups.o: ../common/cleanups.c): Remove.
802 (common-exceptions.o: ../common/common-exceptions.c): Remove.
803 (fileio.o: ../common/fileio.c): Remove.
804 (common-regcache.o: ../common/common-regcache.c): Remove.
805 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
806 (new-op.o: ../common/new-op.c): Remove.
807 (btrace-common.o: ../common/btrace-common.c): Remove.
808
21122961
SM
8092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * Makefile.in (%.o: ../target/%.c): New rule.
812 (waitstatus.o: ../target/waitstatus.c): Remove.
813
c362e621
SM
8142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * Makefile.in
817 (%.c: ../regformats/%.dat,
818 (%.c: ../regformats/arm/%.dat,
819 (%.c: ../regformats/i386/%.dat,
820 (%.c: ../regformats/rs6000/%.dat): New rules.
821 (aarch64.c): Remove.
822 (reg-arm.c): Remove.
823 (arm-with-iwmmxt.c): Remove.
824 (arm-with-vfpv2.c): Remove.
825 (arm-with-vfpv3.c): Remove.
826 (arm-with-neon.c): Remove.
827 (reg-bfin.c): Remove.
828 (reg-cris.c): Remove.
829 (reg-crisv32.c): Remove.
830 (i386.c): Remove.
831 (i386-linux.c): Remove.
832 (i386-avx.c): Remove.
833 (i386-avx-linux.c): Remove.
834 (i386-avx-avx512.c): Remove.
835 (i386-avx-avx512-linux.c): Remove.
836 (i386-mpx.c): Remove.
837 (i386-mpx-linux.c): Remove.
838 (i386-avx-mpx-avx512-pku.c): Remove.
839 (i386-avx-mpx-avx512-pku-linux.c): Remove.
840 (i386-avx-mpx.c): Remove.
841 (i386-avx-mpx-linux.c): Remove.
842 (i386-mmx.c): Remove.
843 (i386-mmx-linux.c): Remove.
844 (reg-ia64.c): Remove.
845 (reg-m32r.c): Remove.
846 (reg-m68k.c): Remove.
847 (reg-cf.c): Remove.
848 (mips-linux.c): Remove.
849 (mips-dsp-linux.c): Remove.
850 (mips64-linux.c): Remove.
851 (mips64-dsp-linux.c): Remove.
852 (nios2-linux.c): Remove.
853 (powerpc-32.c): Remove.
854 (powerpc-32l.c): Remove.
855 (powerpc-altivec32l.c): Remove.
856 (powerpc-cell32l.c): Remove.
857 (powerpc-vsx32l.c): Remove.
858 (powerpc-isa205-32l.c): Remove.
859 (powerpc-isa205-altivec32l.c): Remove.
860 (powerpc-isa205-vsx32l.c): Remove.
861 (powerpc-e500l.c): Remove.
862 (powerpc-64l.c): Remove.
863 (powerpc-altivec64l.c): Remove.
864 (powerpc-cell64l.c): Remove.
865 (powerpc-vsx64l.c): Remove.
866 (powerpc-isa205-64l.c): Remove.
867 (powerpc-isa205-altivec64l.c): Remove.
868 (powerpc-isa205-vsx64l.c): Remove.
869 (s390-linux32.c): Remove.
870 (s390-linux32v1.c): Remove.
871 (s390-linux32v2.c): Remove.
872 (s390-linux64.c): Remove.
873 (s390-linux64v1.c): Remove.
874 (s390-linux64v2.c): Remove.
875 (s390-te-linux64.c): Remove.
876 (s390-vx-linux64.c): Remove.
877 (s390-tevx-linux64.c): Remove.
878 (s390x-linux64.c): Remove.
879 (s390x-linux64v1.c): Remove.
880 (s390x-linux64v2.c): Remove.
881 (s390x-te-linux64.c): Remove.
882 (s390x-vx-linux64.c): Remove.
883 (s390x-tevx-linux64.c): Remove.
884 (tic6x-c64xp-linux.c): Remove.
885 (tic6x-c64x-linux.c): Remove.
886 (tic6x-c62x-linux.c): Remove.
887 (reg-sh.c): Remove.
888 (reg-sparc64.c): Remove.
889 (reg-spu.c): Remove.
890 (amd64.c): Remove.
891 (amd64-linux.c): Remove.
892 (amd64-avx.c): Remove.
893 (amd64-avx-linux.c): Remove.
894 (amd64-avx-avx512.c): Remove.
895 (amd64-avx-avx512-linux.c): Remove.
896 (amd64-mpx.c): Remove.
897 (amd64-mpx-linux.c): Remove.
898 (amd64-avx-mpx-avx512-pku.c): Remove.
899 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
900 (amd64-avx-mpx.c): Remove.
901 (amd64-avx-mpx-linux.c): Remove.
902 (x32.c): Remove.
903 (x32-linux.c): Remove.
904 (x32-avx.c): Remove.
905 (x32-avx-linux.c): Remove.
906 (x32-avx-avx512.c): Remove.
907 (x32-avx-avx512-linux.c): Remove.
908 (reg-xtensa.c): Remove.
909 (reg-tilegx.c): Remove.
910 (reg-tilegx32.c): Remove.
911
1672e0d9
SDJ
9122017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
913
914 * Makefile.in (SFILES): Add "common/environ.c".
915 (OBJS): Add "common/environ.h".
916
239b6d10
WT
9172017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
918
919 * configure.ac: Check if the fs_base and gs_base members of
920 `struct user_regs_struct' exist.
921 * config.in: Regenerated.
922 * configure: Likewise.
923
694b382c
AT
9242017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
925
926 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
927 target_read_memory.
928 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
929 (get_next_pcs_syscall_next_pc): Likewise.
930
7dc53023
LM
9312016-12-23 Luis Machado <lgustavo@codesourcery.com>
932
933 * win32-i386-low.c: Fix incorrect reference to a couple source files.
934 * nto-x86-low.c: Likewise.
935
ad02e4fe
SM
9362016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
937
938 * Makefile.in: Include disable-implicit-rules.mk.
939
dcb07cfa
PA
9402016-11-23 Pedro Alves <palves@redhat.com>
941
942 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
943 (debug_vprintf): Use std::chrono::steady_clock instead of
944 gettimeofday. Use '.' instead of ':'.
945 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
946 (get_timestamp): Use std::chrono::steady_clock instead of
947 gettimeofday.
948
8629c02c
SM
9492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
950
951 * Makefile.in: Fix whitespace formatting.
952
b593ecca
SM
9532016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
954
955 * Makefile.in (SFILES, OBS): Flatten list and order
956 alphabetically.
957
9986ba08
PA
9582016-11-23 Pedro Alves <palves@redhat.com>
959
960 * event-loop.c (handle_file_event): Use warning.
961 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
962 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
963 Use warning.
964
4eefa7bc
PA
9652016-11-23 Pedro Alves <palves@redhat.com>
966
967 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
968 output.
969 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
970 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
971 debug_printf and debug_flush for debug output.
972 * server.c (handle_general_set): Likewise.
973 * thread-db.c (try_thread_db_load): Use debug_printf for debug
974 output.
975
5443506e
SM
9762016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
977
978 * Makefile.in (.c.o): Replace rule with ...
979 (%.o: %.c): ... this one.
980
3b165252
SM
9812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
982
983 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
984 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
985 make.
986 * configure.ac: Remove checks for the make program.
987 * configure: Re-generate.
988
0bcda685
PA
9892016-10-28 Pedro Alves <palves@redhat.com>
990
991 * Makefile.in (CXX_DIALECT): Get from configure.
992 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
993 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
994 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
995 * config.in: Regenerate.
996 * configure: Regenerate.
997
c3805894
YQ
9982016-10-27 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-low.c (linux_supports_range_stepping): Return true if
1001 can_software_single_step return true.
1002
89342618
YQ
10032016-10-27 Yao Qi <yao.qi@linaro.org>
1004
1005 * inferiors.c (find_inferior_in_random): New function.
1006 * inferiors.h (find_inferior_in_random): Declare.
1007 * linux-low.c (linux_wait_for_event_filtered): Call
1008 find_inferior_in_random instead of find_inferior.
1009
e3652c84
YQ
10102016-10-27 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-low.c (linux_wait_1): If single-step breakpoints are
1013 inserted, remove them.
1014
5a04c4cf
PA
10152016-10-26 Pedro Alves <palves@redhat.com>
1016
1017 * linux-low.c (handle_extended_wait): Link parent/child fork
1018 threads.
1019 (linux_wait_1): Unlink them.
1020 (linux_set_resume_request): Ignore resume requests for
1021 already-resumed and unhandled fork child threads.
1022 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1023 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1024 New functions.
1025 (handle_v_requests) <vCont>: Don't call require_running.
1026 * server.h (in_queued_stop_replies): New declaration.
1027
cb93dc7f
YQ
10282016-10-24 Yao Qi <yao.qi@linaro.org>
1029
1030 PR server/20733
1031 * linux-aarch64-low.c (append_insns): Cast the return value to
1032 'uint32_t *'.
1033
a1078bea
YQ
10342016-10-10 Yao Qi <yao.qi@linaro.org>
1035
1036 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1037
1fb77080
SDJ
10382016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1039
1040 * target.c (target_supports_multi_process): New function, moved
1041 from...
1042 * target.h (target_supports_multi_process): ... here. Remove
1043 macro.
1044
39b5a3b9
TT
10452016-10-05 Tom Tromey <tom@tromey.com>
1046
1047 PR remote/20655:
1048 * tracepoint.c (handle_tracepoint_bkpts): Check
1049 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1050
c1d0b70a
YQ
10512016-10-05 Yao Qi <yao.qi@linaro.org>
1052
1053 * configure.srv: Update the path of arm-*.xml files.
1054
0a69eedb
YQ
10552016-10-05 Terry Guo <terry.guo@arm.com>
1056 Yao Qi <yao.qi@linaro.org>
1057
1058 * Makefile.in: Adjust the path of rules.
1059 * configure.srv: Update the path of xml files.
1060 * regformats/arm-with-iwmmxt.dat: Regenerated.
1061 * regformats/arm-with-neon.dat: Likewise.
1062 * regformats/arm-with-vfpv2.dat: Likewise.
1063 * regformats/arm-with-vfpv3.dat Likewise.
1064
17e16485
YQ
10652016-09-30 Yao Qi <yao.qi@linaro.org>
1066
1067 PR gdbserver/20627
1068 * target.c (target_stop_and_wait): Don't call
1069 target_continue_no_signal, use resume_stop instead.
1070
edeeb602
YQ
10712016-09-26 Yao Qi <yao.qi@linaro.org>
1072
1073 * linux-low.c (linux_wait_1): Call debug_exit.
1074
503b1c39
PA
10752016-09-23 Pedro Alves <palves@redhat.com>
1076
1077 * Makefile.in (SFILES): Add common/new-op.c.
1078 (OBS): Add common/new-op.o.
1079 (new-op.o): New rule.
1080
74172ecf
SM
10812016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1082
1083 * .gitinore: Ignore more files.
1084
fc6cda2e
YQ
10852016-09-21 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1088 23.
1089
bc1e6c81
SDJ
10902016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1091
1092 * server.c (start_inferior): Call target_mourn_inferior instead of
1093 mourn_inferior; pass ptid_t argument to it.
1094 (resume): Likewise.
1095 (handle_target_event): Likewise.
1096 * target.c (target_mourn_inferior): New function.
1097 * target.h (mourn_inferior): Delete macro.
1098
0e00e962
AA
10992016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1100
1101 * linux-low.c (lwp_is_stepping): New function.
1102
1d8cb77d
CL
11032016-09-06 Carl Love <cel@us.ibm.com>
1104
1105 * server.c (start_inferior): Fixed comment, requested comment change
1106 didn't get updated correctly. Removed reference to ptrace () call as
1107 it is only true on Linux systems.
1108
7313bced
CL
11092016-09-06 Carl Love <cel@us.ibm.com>
1110
1111 * server.c (start_inferior): Do not call
1112 function target_post_create_inferior () if the
1113 inferior process has already exited.
1114
cf6de44d
PA
11152016-09-05 Pedro Alves <palves@redhat.com>
1116
1117 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1118 (COMPILE.pre, CC_LD): Use CXX directly.
1119 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1120 * acinclude.m4: Don't include build-with-cxx.m4.
1121 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1122 * configure: Regenerate.
1123
c1da6748
AT
11242016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1125
1126 PR gdb/19495
1127 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1128 call writing data to own_buf.
1129
f2b9e3df
SDJ
11302016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1131
1132 * target.c (mywait): Call target_wait instead of
1133 the_target->wait.
1134 (target_wait): New function.
1135
049a8570
SDJ
11362016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1137
1138 * server.c (start_inferior): New variable 'ptid'. Replace calls
1139 to the_target->resume by target_continue{,_no_signal}, depending
1140 on the case.
1141 * target.c (target_stop_and_wait): Call target_continue_no_signal
1142 instead of the_target->resume.
1143 (target_continue): New function.
1144
3aa5cfa0
AT
11452016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1146
1147 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1148
754653a7
AZ
11492016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1150
1151 PR server/20491
1152 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1153 ps_prochandle.
1154 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1155 * linux-arm-low.c (ps_get_thread_area): Likewise.
1156 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1157 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1158 * linux-mips-low.c (ps_get_thread_area): Likewise.
1159 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1160 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1161 * linux-x86-low.c (ps_get_thread_area): Likewise.
1162 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1163
ed036b40
PA
11642016-08-19 Pedro Alves <palves@redhat.com>
1165
1166 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1167
c8ef42ee
PA
11682016-08-19 Pedro Alves <palves@redhat.com>
1169
1170 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1171 comment. Use memcpy instead of casting through unsigned long.
1172
9c235a72
PA
11732016-08-19 Pedro Alves <palves@redhat.com>
1174
1175 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1176 allocating around 0x80000000.
1177
201506da
PA
11782016-08-19 Pedro Alves <palves@redhat.com>
1179
1180 PR gdb/20415
1181 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1182 (x32-avx512-linux-ipa.o): New rules.
1183 * configure.ac (x86_64-*-linux*): New x32 check.
1184 * configure.srv (ipa_x32_linux_regobj): New.
1185 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1186 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1187 descriptions.
1188 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1189 descriptions.
1190 * configure: Regenerate.
1191
f348d89a
PA
11922016-08-09 Pedro Alves <palves@redhat.com>
1193
1194 PR gdb/18653
1195 * Makefile.in (OBS): Add signals-state-save-restore.o.
1196 (signals-state-save-restore.o): New rule.
1197 * config.in: Regenerate.
1198 * configure: Regenerate.
1199 * linux-low.c: Include "signals-state-save-restore.h".
1200 (linux_create_inferior): Call
1201 restore_original_signals_state.
1202 * server.c: Include "dispositions-save-restore.h".
1203 (captured_main): Call save_original_signals_state.
1204
1baf5149
PA
12052016-08-05 Pedro Alves <palves@redhat.com>
1206
1207 * configure: Regenerate.
1208
fcd4a73d
YQ
12092016-08-04 Yao Qi <yao.qi@linaro.org>
1210
1211 * linux-low.c (regsets_fetch_inferior_registers): Check
1212 errno is ESRCH or not.
1213
979659d0
YQ
12142016-08-02 Yao Qi <yao.qi@linaro.org>
1215
1216 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1217 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1218 (thread_db_load_search): Update.
1219 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1220 td_ta_set_event and td_ta_event_getmsg.
1221
6598661d
PA
12222016-07-26 Pedro Alves <palves@redhat.com>
1223
1224 PR server/20414
1225 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1226 of unsigned long for 64-bit registers and use uint32_t instead of
1227 unsigned int for 32-bit registers.
1228
9cf12d57
PA
12292016-07-26 Pedro Alves <palves@redhat.com>
1230
1231 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1232 to 'ptrace'.
1233
305450ed
TT
12342016-07-21 Tom Tromey <tom@tromey.com>
1235
1236 * configure: Rebuild.
1237
2583da7c
YQ
12382016-07-21 Yao Qi <yao.qi@linaro.org>
1239
1240 * mem-break.c (find_gdb_breakpoint): Cast bp to
1241 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1242
21536b36
YQ
12432016-07-21 Yao Qi <yao.qi@linaro.org>
1244
1245 * server.c (handle_v_requests): Support s and S actions
1246 if target_supports_software_single_step return true.
1247
8901d193
YQ
12482016-07-21 Yao Qi <yao.qi@linaro.org>
1249
1250 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1251 is resume_step, call maybe_hw_step.
1252 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1253 and unstop them.
1254 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1255 breakpoints or not.
1256 (proceed_one_lwp): If resume request is resume_step, install
1257 reinsert breakpoints and call maybe_hw_step.
1258
0e9a339e
YQ
12592016-07-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-low.c (proceed_one_lwp): Declare.
1262 (linux_resume_one_thread): Remove local variable 'step'.
1263 Lift code enqueue signal. Call proceed_one_lwp instead of
1264 linux_resume_one_lwp.
1265
4281b351
YQ
12662016-07-21 Yao Qi <yao.qi@linaro.org>
1267
1268 * linux-low.c (linux_resume_one_thread): Call
1269 enqueue_pending_signal.
1270
984a2c04
YQ
12712016-07-21 Yao Qi <yao.qi@linaro.org>
1272
1273 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1274 * inferiors.c (do_restore_current_thread_cleanup): New function.
1275 (make_cleanup_restore_current_thread): Likewise.
1276 * linux-low.c (install_software_single_step_breakpoints): Call
1277 make_cleanup_restore_current_thread. Switch current_thread to
1278 thread.
1279
bec903c9
YQ
12802016-07-21 Yao Qi <yao.qi@linaro.org>
1281
1282 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1283 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1284 (clone_one_breakpoint): Likewise.
1285 (delete_reinsert_breakpoints): Change parameter to thread.
1286 Callers updated.
1287 (has_reinsert_breakpoints): Likewise.
1288 (uninsert_reinsert_breakpoints): Likewise.
1289 (reinsert_reinsert_breakpoints): Likewise.
1290 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1291 (delete_reinsert_breakpoints): Likewise.
1292 (reinsert_reinsert_breakpoints): Likewise.
1293 (uninsert_reinsert_breakpoints): Likewise.
1294 (has_reinsert_breakpoints): Likewise.
1295
63c40ec7
YQ
12962016-07-21 Yao Qi <yao.qi@linaro.org>
1297
1298 * inferiors.c (get_thread_process): Make parameter const.
1299 * inferiors.h (get_thread_process): Update declaration.
1300 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1301 Add new parameters child_thread and parent_thread. Callers
1302 updated.
1303 * mem-break.h (clone_all_breakpoints): Update declaration.
1304
9aa76cd0
YQ
13052016-07-21 Yao Qi <yao.qi@linaro.org>
1306
1307 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1308 <command_list, handler>: Remove.
1309 (struct gdb_breakpoint): New.
1310 (struct other_breakpoint): New.
1311 (struct reinsert_breakpoint): New.
1312 (is_gdb_breakpoint): New function.
1313 (any_persistent_commands): Update command_list if
1314 is_gdb_breakpoint returns true.
1315 (set_breakpoint): Create breakpoints according to their types.
1316 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1317 (set_gdb_breakpoint_1): Likewise.
1318 (set_gdb_breakpoint): Likewise.
1319 (clear_breakpoint_conditions): Change parameter type to
1320 'struct gdb_breakpoint *'.
1321 (clear_breakpoint_commands): Likewise.
1322 (clear_breakpoint_conditions_and_commands): Likewise.
1323 (add_condition_to_breakpoint): Likewise.
1324 (add_breakpoint_condition): Likewise.
1325 (add_commands_to_breakpoint): Likewise.
1326 (check_breakpoints): Check other_breakpoint.
1327 (clone_one_breakpoint): Clone breakpopint according to its type.
1328 * mem-break.h (struct gdb_breakpoint): Declare.
1329 (set_gdb_breakpoint): Update declaration.
1330 (clear_breakpoint_conditions_and_commands): Likewise.
1331 (add_breakpoint_condition): Likewise.
1332 (add_breakpoint_commands): Likewise.
1333 * server.c (process_point_options): Change parameter type to
1334 'struct gdb_breakpoint *'.
1335
811f8301
YQ
13362016-07-21 Yao Qi <yao.qi@linaro.org>
1337
1338 * mem-break.c (set_breakpoint_at): Rename it to ...
1339 (set_breakpoint_type_at): ... it.
1340 (set_breakpoint_at): Call set_breakpoint_type_at.
1341 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1342 * mem-break.h (set_breakpoint_at): Update comments.
1343
b1c51e36
CLT
13442016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1345
1346 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1347 to buf parameter.
1348 (nios2_store_gregset): Likewise.
1349
ced2dffb
PA
13502016-07-01 Pedro Alves <palves@redhat.com>
1351 Antoine Tremblay <antoine.tremblay@ericsson.com>
1352
1353 * linux-low.c: Change interface to take the target lwp_info
1354 pointer directly and return void. Handle detaching from a zombie
1355 thread.
1356 (linux_detach_lwp_callback): New function.
1357 (linux_detach): Detach from the leader thread after detaching from
1358 the clone threads.
1359
2ac09a5b
YQ
13602016-06-28 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1363 for variable new_offset.
1364 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1365 (aarch64_ftrace_insn_reloc_cb): Likewise.
1366 (aarch64_ftrace_insn_reloc_tb): Likewise.
1367 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1368 PRIx64 instead of PRIx32.
1369
79e7fd4f
YQ
13702016-06-28 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1373 (the_low_target): Install arm_get_syscall_trapinfo.
1374
061fc021
YQ
13752016-06-28 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1378 function.
1379 (the_low_target): Install aarch64_get_syscall_trapinfo.
1380
4cc32bec
YQ
13812016-06-28 Yao Qi <yao.qi@linaro.org>
1382
1383 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1384 Callers updated.
1385 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1386 Remove parameter sysno.
1387 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1388 sysret.
1389
782c1122
AA
13902016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1391
1392 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1393 (s390_emit_ne_goto): Likewise.
1394 (s390_emit_lt_goto): Likewise.
1395 (s390_emit_le_goto): Likewise.
1396 (s390_emit_gt_goto): Likewise.
1397 (s390_emit_ge_goto): Likewise.
1398 (s390x_emit_eq_goto): Likewise.
1399 (s390x_emit_ne_goto): Likewise.
1400 (s390x_emit_lt_goto): Likewise.
1401 (s390x_emit_le_goto): Likewise.
1402 (s390x_emit_gt_goto): Likewise.
1403 (s390x_emit_ge_goto): Likewise.
1404 (s390_emit_ops_impl): Mark variable static.
1405 (s390x_emit_ops): Likewise.
1406
2e7b624b
YQ
14072016-06-17 Yao Qi <yao.qi@linaro.org>
1408
1409 * linux-low.c (handle_extended_wait): Call
1410 uninsert_reinsert_breakpoints for the parent process. Remove
1411 reinsert breakpoints from the child process. Reinsert them to
1412 the parent process when vfork is done.
1413 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1414 (reinsert_reinsert_breakpoints): New function.
1415 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1416 (reinsert_reinsert_breakpoints): Declare.
1417
8a81c5d7
YQ
14182016-06-17 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-low.c (handle_extended_wait): If the parent is doing
1421 step-over, remove the reinsert breakpoints from the forked child.
1422
f50bf8e5
YQ
14232016-06-17 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-low.c (unsuspend_all_lwps): Declare.
1426 (linux_low_filter_event): If thread exited, call finish_step_over.
1427 If step-over is finished, unsuspend other threads.
1428
8376a3cb
YQ
14292016-06-17 Yao Qi <yao.qi@linaro.org>
1430
1431 * linux-low.c (linux_resume_one_lwp_throw): Assert
1432 has_reinsert_breakpoints returns false.
1433 * mem-break.c (delete_disabled_breakpoints): Assert
1434 bp type isn't reinsert_breakpoint.
1435
f79b145d
YQ
14362016-06-17 Yao Qi <yao.qi@linaro.org>
1437
1438 * linux-low.c (maybe_hw_step): New function.
1439 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1440 (finish_step_over): Switch current_thread to lwp temporarily,
1441 and assert has_reinsert_breakpoints returns true.
1442 (proceed_one_lwp): Call maybe_hw_step.
1443 * mem-break.c (has_reinsert_breakpoints): New function.
1444 * mem-break.h (has_reinsert_breakpoints): Declare.
1445
0ae534d2
JT
14462016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1447
1448 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1449
fcdad592
YQ
14502016-05-17 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1453 instead of find_inferior.
1454
9e784964
YQ
14552016-05-05 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1458 Initialize res to zero.
1459
cf2ebb6e
YQ
14602016-05-05 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1463 to uint32_t.
1464
c1aebf87
UW
14652016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1466
1467 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1468 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1469 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1470
35fd2deb 14712016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1472 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1473
1474 * tracepoint.c (write_inferior_int8): New function.
1475 (cmd_qtenable_disable): Write enable flag using
1476 write_inferior_int8.
1477
484b3c32
YQ
14782016-04-25 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1481 (need_step_over_p): Return zero if the LWP has pending signals
1482 can be delivered on software single step target.
1483
85ba7d86
YQ
14842016-04-25 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1487 return instead of error.
1488
3539aa13
YQ
14892016-04-22 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1492 to 23.
1493
5b061e98
YQ
14942016-04-22 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1497 signal when stepping over breakpoint with software single
1498 step.
1499
3451269c
PA
15002016-04-21 Pedro Alves <palves@redhat.com>
1501
1502 * linux-s390-low.c (s390_collect_ptrace_register)
1503 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1504 add casts.
1505 (s390_check_regset): Use void * instead of gdb_byte *.
1506
a2358508
PA
15072016-04-20 Pedro Alves <palves@redhat.com>
1508
1509 * configure: Renegerate.
1510
6885166d
YQ
15112016-04-20 Yao Qi <yao.qi@linaro.org>
1512
1513 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1514 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1515 number 16.
1516 (arm_store_gregset): Likewise.
1517
2b863f51
WT
15182016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1519
1520 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1521 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1522 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1523 (amd64-avx-mpx-linux.c): New rules.
1524 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1525 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1526 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1527 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1528 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1529 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1530 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1531 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1532 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1533 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1534 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1535 * linux-x86-low.c (x86_linux_read_description): Add case for
1536 X86_XSTATE_AVX_MPX_MASK.
1537 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1538 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1539 init_registers_i386_avx_mpx_linux.
1540 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1541 (initialize_low_tracepoint): Call
1542 init_registers_i386_avx_mpx_linux.
1543 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1544 (initialize_low_tracepoint): Call
1545 init_registers_amd64_avx_mpx_linux.
1546 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1547 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1548 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1549 declarations.
1550
9b30624b
PA
15512016-04-18 Pedro Alves <palves@redhat.com>
1552
1553 * configure: Regenerate.
1554
45e3745e
AT
15552016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1556
1557 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1558 (aarch64_emit_sub): Likewise.
1559
2afc13ff
PA
15602016-04-12 Pedro Alves <palves@redhat.com>
1561
1562 * utils.c (prepare_to_throw_exception): Delete.
1563
6e774b13
SM
15642016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1567
4dca19f8
MK
15682016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1569
1570 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1571
d0a9981f
MK
15722016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1573
1574 * linux-aarch64-ipa.c: Add <elf.h> include.
1575 * linux-ppc-ipa.c: Add <elf.h> include.
1576 * linux-s390-ipa.c: Add <elf.h> include.
1577
252db07e
MK
15782016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1579
1580 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1581 (get_raw_reg_ptr): Likewise.
1582 (get_trace_state_variable_value_ptr): Likewise.
1583 (set_trace_state_variable_value_ptr): Likewise.
1584 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1585 char *.
1586
14e2b6d9
MK
15872016-03-31 Wei-cheng Wang <cole945@gmail.com>
1588 Marcin Kościelnicki <koriakin@0x04.net>
1589
1590 PR/17221
1591 * linux-ppc-low.c (emit_insns): New function.
1592 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1593 (ppc_emit_prologue): New function.
1594 (ppc_emit_epilogue): New function.
1595 (ppc_emit_add): New function.
1596 (ppc_emit_sub): New function.
1597 (ppc_emit_mul): New function.
1598 (ppc_emit_lsh): New function.
1599 (ppc_emit_rsh_signed): New function.
1600 (ppc_emit_rsh_unsigned): New function.
1601 (ppc_emit_ext): New function.
1602 (ppc_emit_zero_ext): New function.
1603 (ppc_emit_log_not): New function.
1604 (ppc_emit_bit_and): New function.
1605 (ppc_emit_bit_or): New function.
1606 (ppc_emit_bit_xor): New function.
1607 (ppc_emit_bit_not): New function.
1608 (ppc_emit_equal): New function.
1609 (ppc_emit_less_signed): New function.
1610 (ppc_emit_less_unsigned): New function.
1611 (ppc_emit_ref): New function.
1612 (ppc_emit_const): New function.
1613 (ppc_emit_reg): New function.
1614 (ppc_emit_pop): New function.
1615 (ppc_emit_stack_flush): New function.
1616 (ppc_emit_swap): New function.
1617 (ppc_emit_stack_adjust): New function.
1618 (ppc_emit_call): New function.
1619 (ppc_emit_int_call_1): New function.
1620 (ppc_emit_void_call_2): New function.
1621 (ppc_emit_if_goto): New function.
1622 (ppc_emit_goto): New function.
1623 (ppc_emit_eq_goto): New function.
1624 (ppc_emit_ne_goto): New function.
1625 (ppc_emit_lt_goto): New function.
1626 (ppc_emit_le_goto): New function.
1627 (ppc_emit_gt_goto): New function.
1628 (ppc_emit_ge_goto): New function.
1629 (ppc_write_goto_address): New function.
1630 (ppc_emit_ops_impl): New static variable.
1631 (ppc64v1_emit_prologue): New function.
1632 (ppc64v2_emit_prologue): New function.
1633 (ppc64_emit_epilogue): New function.
1634 (ppc64_emit_add): New function.
1635 (ppc64_emit_sub): New function.
1636 (ppc64_emit_mul): New function.
1637 (ppc64_emit_lsh): New function.
1638 (ppc64_emit_rsh_signed): New function.
1639 (ppc64_emit_rsh_unsigned): New function.
1640 (ppc64_emit_ext): New function.
1641 (ppc64_emit_zero_ext): New function.
1642 (ppc64_emit_log_not): New function.
1643 (ppc64_emit_bit_and): New function.
1644 (ppc64_emit_bit_or): New function.
1645 (ppc64_emit_bit_xor): New function.
1646 (ppc64_emit_bit_not): New function.
1647 (ppc64_emit_equal): New function.
1648 (ppc64_emit_less_signed): New function.
1649 (ppc64_emit_less_unsigned): New function.
1650 (ppc64_emit_ref): New function.
1651 (ppc64_emit_const): New function.
1652 (ppc64v1_emit_reg): New function.
1653 (ppc64v2_emit_reg): New function.
1654 (ppc64_emit_pop): New function.
1655 (ppc64_emit_stack_flush): New function.
1656 (ppc64_emit_swap): New function.
1657 (ppc64v1_emit_call): New function.
1658 (ppc64v2_emit_call): New function.
1659 (ppc64v1_emit_int_call_1): New function.
1660 (ppc64v2_emit_int_call_1): New function.
1661 (ppc64v1_emit_void_call_2): New function.
1662 (ppc64v2_emit_void_call_2): New function.
1663 (ppc64_emit_if_goto): New function.
1664 (ppc64_emit_eq_goto): New function.
1665 (ppc64_emit_ne_goto): New function.
1666 (ppc64_emit_lt_goto): New function.
1667 (ppc64_emit_le_goto): New function.
1668 (ppc64_emit_gt_goto): New function.
1669 (ppc64_emit_ge_goto): New function.
1670 (ppc64v1_emit_ops_impl): New static variable.
1671 (ppc64v2_emit_ops_impl): New static variable.
1672 (ppc_emit_ops): New function.
1673 (linux_low_target): Wire in ppc_emit_ops.
1674
a2174ba4
MK
16752016-03-31 Wei-cheng Wang <cole945@gmail.com>
1676 Marcin Kościelnicki <koriakin@0x04.net>
1677
1678 PR/17221
1679 * Makefile.in: Add powerpc-*-ipa.o
1680 * configure.srv: Add ipa_obj for powerpc*-linux.
1681 * linux-ppc-ipa.c: New file.
1682 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1683 includes.
1684 (PPC_FIELD): New macro.
1685 (PPC_SEXT): New macro.
1686 (PPC_OP6): New macro.
1687 (PPC_BO): New macro.
1688 (PPC_LI): New macro.
1689 (PPC_BD): New macro.
1690 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1691 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1692 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1693 (ppc_get_thread_area): New function.
1694 (is_elfv2_inferior): New function.
1695 (gen_ds_form): New function.
1696 (GEN_STD): New macro.
1697 (GEN_STDU): New macro.
1698 (GEN_LD): New macro.
1699 (GEN_LDU): New macro.
1700 (gen_d_form): New function.
1701 (GEN_ADDI): New macro.
1702 (GEN_ADDIS): New macro.
1703 (GEN_LI): New macro.
1704 (GEN_LIS): New macro.
1705 (GEN_ORI): New macro.
1706 (GEN_ORIS): New macro.
1707 (GEN_LWZ): New macro.
1708 (GEN_STW): New macro.
1709 (GEN_STWU): New macro.
1710 (gen_xfx_form): New function.
1711 (GEN_MFSPR): New macro.
1712 (GEN_MTSPR): New macro.
1713 (GEN_MFCR): New macro.
1714 (GEN_MTCR): New macro.
1715 (GEN_SYNC): New macro.
1716 (GEN_LWSYNC): New macro.
1717 (gen_x_form): New function.
1718 (GEN_OR): New macro.
1719 (GEN_MR): New macro.
1720 (GEN_LWARX): New macro.
1721 (GEN_STWCX): New macro.
1722 (GEN_CMPW): New macro.
1723 (gen_md_form): New function.
1724 (GEN_RLDICL): New macro.
1725 (GEN_RLDICR): New macro.
1726 (gen_i_form): New function.
1727 (GEN_B): New macro.
1728 (GEN_BL): New macro.
1729 (gen_b_form): New function.
1730 (GEN_BNE): New macro.
1731 (GEN_LOAD): New macro.
1732 (GEN_STORE): New macro.
1733 (gen_limm): New function.
1734 (gen_atomic_xchg): New function.
1735 (gen_call): New function.
1736 (ppc_relocate_instruction): New function.
1737 (ppc_install_fast_tracepoint_jump_pad): New function.
1738 (ppc_get_min_fast_tracepoint_insn_len): New function.
1739 (ppc_get_ipa_tdesc_idx): New function.
1740 (the_low_target): Wire in the new functions.
1741 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1742 tdescs.
1743 * linux-ppc-tdesc.h: New file.
1744
a13c4696
MK
17452016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1746
1747 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1748 (alloc_jump_pad_buffer): New function.
1749 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1750 (alloc_jump_pad_buffer): New function.
1751 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1752 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1753 (alloc_jump_pad_buffer): New function.
1754 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1755 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1756 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1757 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1758
1cda1512
MK
17592016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1760
1761 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1762 * linux-amd64-ipa.c: Likewise.
1763 * linux-i386-ipa.c: Likewise.
1764 * linux-s390-ipa.c: Likewise.
1765 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1766 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1767 set_trace_state_variable_value_ptr.
1768 (struct ipa_sym_addresses): Likewise.
1769 (symbol_list): Likewise.
1770 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1771 accessing gdb_collect directly.
1772 (gdb_collect_ptr_type): New typedef.
1773 (get_raw_reg_ptr_type): New typedef.
1774 (get_trace_state_variable_value_ptr_type): New typedef.
1775 (set_trace_state_variable_value_ptr_type): New typedef.
1776 (gdb_collect_ptr): New global.
1777 (get_raw_reg_ptr): New global.
1778 (get_trace_state_variable_value_ptr): New global.
1779 (set_trace_state_variable_value_ptr): New global.
1780 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1781 accessing get_raw_reg directly.
1782 (get_get_tsv_func_addr): Likewise for
1783 get_trace_state_variable_value_ptr.
1784 (get_set_tsv_func_addr): Likewise for
1785 set_trace_state_variable_value_ptr.
1786 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1787
72fb5488
SM
17882016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1791
28170b88
MK
17922016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1793
1794 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1795 packets.
1796 (relocate_instruction): Remove own_buf.
1797 * server.c (own_buf): Make global.
1798 (handle_v_requests): Make global.
1799 * server.h (own_buf): New declaration.
1800 (handle_v_requests): New prototype.
1801
f39e8743
MK
18022016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1803
1804 PR 18377
1805 * linux-s390-low.c (add_insns): New function.
1806 (s390_emit_prologue): New function.
1807 (s390_emit_epilogue): New function.
1808 (s390_emit_add): New function.
1809 (s390_emit_sub): New function.
1810 (s390_emit_mul): New function.
1811 (s390_emit_lsh): New function.
1812 (s390_emit_rsh_signed): New function.
1813 (s390_emit_rsh_unsigned): New function.
1814 (s390_emit_ext): New function.
1815 (s390_emit_log_not): New function.
1816 (s390_emit_bit_and): New function.
1817 (s390_emit_bit_or): New function.
1818 (s390_emit_bit_xor): New function.
1819 (s390_emit_bit_not): New function.
1820 (s390_emit_equal): New function.
1821 (s390_emit_less_signed): New function.
1822 (s390_emit_less_unsigned): New function.
1823 (s390_emit_ref): New function.
1824 (s390_emit_if_goto): New function.
1825 (s390_emit_goto): New function.
1826 (s390_write_goto_address): New function.
1827 (s390_emit_litpool): New function.
1828 (s390_emit_const): New function.
1829 (s390_emit_call): New function.
1830 (s390_emit_reg): New function.
1831 (s390_emit_pop): New function.
1832 (s390_emit_stack_flush): New function.
1833 (s390_emit_zero_ext): New function.
1834 (s390_emit_swap): New function.
1835 (s390_emit_stack_adjust): New function.
1836 (s390_emit_set_r2): New function.
1837 (s390_emit_int_call_1): New function.
1838 (s390_emit_void_call_2): New function.
1839 (s390_emit_eq_goto): New function.
1840 (s390_emit_ne_goto): New function.
1841 (s390_emit_lt_goto): New function.
1842 (s390_emit_le_goto): New function.
1843 (s390_emit_gt_goto): New function.
1844 (s390_emit_ge_goto): New function.
1845 (s390x_emit_prologue): New function.
1846 (s390x_emit_epilogue): New function.
1847 (s390x_emit_add): New function.
1848 (s390x_emit_sub): New function.
1849 (s390x_emit_mul): New function.
1850 (s390x_emit_lsh): New function.
1851 (s390x_emit_rsh_signed): New function.
1852 (s390x_emit_rsh_unsigned): New function.
1853 (s390x_emit_ext): New function.
1854 (s390x_emit_log_not): New function.
1855 (s390x_emit_bit_and): New function.
1856 (s390x_emit_bit_or): New function.
1857 (s390x_emit_bit_xor): New function.
1858 (s390x_emit_bit_not): New function.
1859 (s390x_emit_equal): New function.
1860 (s390x_emit_less_signed): New function.
1861 (s390x_emit_less_unsigned): New function.
1862 (s390x_emit_ref): New function.
1863 (s390x_emit_if_goto): New function.
1864 (s390x_emit_const): New function.
1865 (s390x_emit_call): New function.
1866 (s390x_emit_reg): New function.
1867 (s390x_emit_pop): New function.
1868 (s390x_emit_stack_flush): New function.
1869 (s390x_emit_zero_ext): New function.
1870 (s390x_emit_swap): New function.
1871 (s390x_emit_stack_adjust): New function.
1872 (s390x_emit_int_call_1): New function.
1873 (s390x_emit_void_call_2): New function.
1874 (s390x_emit_eq_goto): New function.
1875 (s390x_emit_ne_goto): New function.
1876 (s390x_emit_lt_goto): New function.
1877 (s390x_emit_le_goto): New function.
1878 (s390x_emit_gt_goto): New function.
1879 (s390x_emit_ge_goto): New function.
1880 (s390_emit_ops): New function.
1881 (struct linux_target_ops): Fill in emit_ops hook.
1882
abd9baf9
MK
18832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1884
1885 PR 18377
1886 * Makefile.in: Add s390 IPA files.
1887 * configure.srv: Build IPA for s390.
1888 * linux-s390-ipa.c: New file.
1889 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1890 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1891 (tdesc_s390_linux32): Likewise.
1892 (init_registers_s390_linux32v1): Likewise.
1893 (tdesc_s390_linux32v1): Likewise.
1894 (init_registers_s390_linux32v2): Likewise.
1895 (tdesc_s390_linux32v2): Likewise.
1896 (init_registers_s390_linux64): Likewise.
1897 (tdesc_s390_linux64): Likewise.
1898 (init_registers_s390_linux64v1): Likewise.
1899 (tdesc_s390_linux64v1): Likewise.
1900 (init_registers_s390_linux64v2): Likewise.
1901 (tdesc_s390_linux64v2): Likewise.
1902 (init_registers_s390_te_linux64): Likewise.
1903 (tdesc_s390_te_linux64): Likewise.
1904 (init_registers_s390_vx_linux64): Likewise.
1905 (tdesc_s390_vx_linux64): Likewise.
1906 (init_registers_s390_tevx_linux64): Likewise.
1907 (tdesc_s390_tevx_linux64): Likewise.
1908 (init_registers_s390x_linux64): Likewise.
1909 (tdesc_s390x_linux64): Likewise.
1910 (init_registers_s390x_linux64v1): Likewise.
1911 (tdesc_s390x_linux64v1): Likewise.
1912 (init_registers_s390x_linux64v2): Likewise.
1913 (tdesc_s390x_linux64v2): Likewise.
1914 (init_registers_s390x_te_linux64): Likewise.
1915 (tdesc_s390x_te_linux64): Likewise.
1916 (init_registers_s390x_vx_linux64): Likewise.
1917 (tdesc_s390x_vx_linux64): Likewise.
1918 (init_registers_s390x_tevx_linux64): Likewise.
1919 (tdesc_s390x_tevx_linux64): Likewise.
1920 (have_hwcap_s390_vx): New static variable.
1921 (s390_arch_setup): Fill have_hwcap_s390_vx.
1922 (s390_get_thread_area): New function.
1923 (s390_ft_entry_gpr_esa): New const.
1924 (s390_ft_entry_gpr_zarch): New const.
1925 (s390_ft_entry_misc): New const.
1926 (s390_ft_entry_fr): New const.
1927 (s390_ft_entry_vr): New const.
1928 (s390_ft_main_31): New const.
1929 (s390_ft_main_64): New const.
1930 (s390_ft_exit_fr): New const.
1931 (s390_ft_exit_vr): New const.
1932 (s390_ft_exit_misc): New const.
1933 (s390_ft_exit_gpr_esa): New const.
1934 (s390_ft_exit_gpr_zarch): New const.
1935 (append_insns): New function.
1936 (s390_relocate_instruction): New function.
1937 (s390_install_fast_tracepoint_jump_pad): New function.
1938 (s390_get_min_fast_tracepoint_insn_len): New function.
1939 (s390_get_ipa_tdesc_idx): New function.
1940 (struct linux_target_ops): Wire in the above functions.
1941 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1942 * linux-s390-tdesc.h: New file.
1943
a4105d04
MK
19442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1945
1946 * linux-s390-low.c (s390_supports_tracepoints): New function.
1947 (struct linux_target_ops): Fill supports_tracepoints hook.
1948
35ac8b3e
YQ
19492016-03-18 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-low.c (lwp_signal_can_be_delivered): New function.
1952 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1953
94610ec4
YQ
19542016-03-18 Yao Qi <yao.qi@linaro.org>
1955
1956 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1957 0 if signal is enqueued. Remove 'signal' from one debugging
1958 message. Move one debugging message to some lines below.
1959 Remove code setting 'signal' to 0.
1960
80aea927
YQ
19612016-03-18 Yao Qi <yao.qi@linaro.org>
1962
1963 * linux-low.c (linux_low_filter_event): Remove redundant
1964 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1965
b04fd3be
MK
19662016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1967
1968 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1969 (struct linux_target_ops): Wire in the above.
1970
c40c8d4b
YQ
19712016-03-03 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-low.c: Update comments to start_step_over.
1974
0f8288ae
YQ
19752016-03-03 Yao Qi <yao.qi@linaro.org>
1976
1977 PR server/19736
1978 * linux-low.c (handle_extended_wait): Set child suspended
1979 if event_lwp->bp_reinsert isn't zero.
1980
fdbd04a8
YQ
19812016-03-02 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1984 enqueue_pending_signal.
1985
6896a8fa
MK
19862016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1987
1988 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1989 is actually loaded.
1990
ab503087
MK
19912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1992
1993 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1994 (s390_regmap_3264) [!__s390x__]: New global.
1995 (s390_collect_ptrace_register): Skip map entries containing -1.
1996 (s390_supply_ptrace_register): Ditto.
1997 (s390_fill_gprs_high): New function.
1998 (s390_store_gprs_high): New function.
1999 (s390_regsets): Add NT_S390_HIGH_GPRS.
2000 (s390_get_hwcap): Enable on 31-bit.
2001 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2002 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2003 Detect NT_S390_HIGH_GPRS.
2004 (s390_usrregs_info_3264): Enable on 31-bit.
2005 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2006 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2007
ae91f625
MK
20082016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2009
2010 PR gdb/13808
2011 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2012 * configure.srv: Ditto.
2013 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2014 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2015 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2016 (init_registers_amd64_linux): Remove prototype.
2017 (tdesc_amd64_linux): Remove declaration.
2018 (get_ipa_tdesc): New function.
2019 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2020 initialize remaining tdescs.
2021 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2022 (init_registers_i386_linux): Remove prototype.
2023 (tdesc_i386_linux): Remove declaration.
2024 (get_ipa_tdesc): New function.
2025 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2026 initialize remaining tdescs.
2027 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2028 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2029 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2030 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2031 (x86_get_ipa_tdesc_idx): New function.
2032 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2033 * linux-x86-tdesc.h: New file.
2034 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2035 (target_get_ipa_tdesc_idx): New macro.
2036 * tracepoint.c (ipa_tdesc_idx): New macro.
2037 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2038 (symbol_list): Add ipa_tdesc_idx.
2039 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2040 (ipa_tdesc): Remove.
2041 (ipa_tdesc_idx): New variable.
2042 (get_context_regcache): Use get_ipa_tdesc.
2043 (gdb_collect): Ditto.
2044 (gdb_probe): Ditto.
2045 * tracepoint.h (get_ipa_tdesc): New prototype.
2046 (ipa_tdesc): Remove.
2047
e7ad2f14
PA
20482016-02-24 Pedro Alves <palves@redhat.com>
2049
2050 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2051 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2052 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2053 Factor out common code between the USE_SIGTRAP_SIGINFO and
2054 !USE_SIGTRAP_SIGINFO blocks.
2055 (linux_low_filter_event): Call save_stop_reason instead of
2056 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2057 Update comments.
2058 (linux_wait_1): Update comments.
2059
657f9cde
WW
20602016-02-24 Wei-cheng Wang <cole945@gmail.com>
2061
2062 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2063 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2064 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2065 ppc_insert_point, ppc_remove_point.
2066
b00b61e1
MK
20672016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2068
2069 * linux-s390-low.c (s390_supports_z_point_type): New function.
2070 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2071
553cb527
YQ
20722016-02-16 Yao Qi <yao.qi@linaro.org>
2073
2074 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2075 PC. Get pc from regcache_read_pc.
2076
a5652c21
YQ
20772016-02-12 Yao Qi <yao.qi@linaro.org>
2078
2079 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2080 or linux_get_pc_32bit.
2081 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2082
ed443b61
YQ
20832016-02-12 Yao Qi <yao.qi@linaro.org>
2084
2085 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2086 arm_linux_get_next_pcs_fixup.
2087
020ecd38
MK
20882016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2089
2090 * tracepoint.c (x_tracepoint_action_download): Change
2091 write_inferior_data_ptr to write_inferior_data_pointer.
2092 (cmd_qtstart): Likewise.
2093 (write_inferior_data_ptr): Remove.
2094 (download_agent_expr): Change write_inferior_data_ptr to
2095 write_inferior_data_pointer.
2096 (download_tracepoint_1): Likewise.
2097 (download_tracepoint): Likewise.
2098 (download_trace_state_variables): Likewise.
2099
7cae9051
WW
21002016-02-11 Wei-cheng Wang <cole945@gmail.com>
2101 Marcin Kościelnicki <koriakin@0x04.net>
2102
2103 * tracepoint.c (struct tracepoint_action_ops): Remove.
2104 (struct tracepoint_action): Remove ops.
2105 (m_tracepoint_action_download, r_tracepoint_action_download)
2106 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2107 size and offset accordingly.
2108 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2109 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2110 (tracepoint_action_send, tracepoint_action_download): New functions.
2111 Helpers for trace action handlers.
2112 (add_tracepoint_action): Remove setup actions ops.
2113 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2114
9f6a71b4
YQ
21152016-02-10 Yao Qi <yao.qi@linaro.org>
2116
2117 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2118
1e94266c
SM
21192016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2120
2121 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2122 to AC_OUTPUT.
2123 * configure: Regenerate.
2124
8adce034
SM
21252016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2126
2127 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2128 void * to gdb_byte *.
2129 * linux-low.c (siginfo_fixup): Likewise.
2130 (linux_xfer_siginfo): Likewise.
2131 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2132 Likewise.
2133 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2134
93813b37
WT
21352016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2136
2137 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2138 to srv_tgtobj.
2139 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2140 to srv_tgtobj.
2141 * linux-x86-low.c [__x86_64__]: Include
2142 "nat/amd64-linux-siginfo.h".
2143 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2144 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2145 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2146 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2147 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2148 (cpt_si_fd, si_timerid, si_overrun): Move from
2149 nat/amd64-linux-siginfo.c.
2150 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2151
8424cc97
SM
21522016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2153
2154 * server.c (skip_to_semicolon): Remove.
2155 (process_point_options): Use strchrnul instead of
2156 skip_to_semicolon.
2157
4d18591b
YQ
21582016-01-26 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2161 * linux-low.c (install_software_single_step_breakpoints): Don't
2162 call regcache_read_pc.
2163 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2164 argument pc.
2165
d8020970
YQ
21662016-01-26 Yao Qi <yao.qi@linaro.org>
2167
2168 * linux-low.c (install_software_single_step_breakpoints): Call
2169 regcache_read_pc instead of get_pc.
2170
8b207339
YQ
21712016-01-26 Yao Qi <yao.qi@linaro.org>
2172
2173 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2174 (unblock_async_io): Rename to ...
2175 (block_unblock_async_io): ... it. New function.
2176 (enable_async_io): Don't install SIGIO handler. Unblock it
2177 instead.
2178 (disable_async_io): Don't ignore SIGIO. Block it instead.
2179 (initialize_async_io): Install SIGIO handler. Don't call
2180 unblock_async_io.
2181
18879fef
YQ
21822016-01-26 Yao Qi <yao.qi@linaro.org>
2183
2184 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2185 first character is '\003', call *the_target->request_interrupt.
2186
a0f8e08a
YQ
21872016-01-25 Yao Qi <yao.qi@linaro.org>
2188
2189 * remote-utils.c (new_thread_notify): Remove.
2190 (dead_thread_notify): Likewise.
2191 * remote-utils.h (new_thread_notify): Remove declaration.
2192 (dead_thread_notify): Likewise.
2193
cc5fd9ab
MK
21942016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2195
2196 * gdb.trace/pending.exp: Fix expected message on continue.
2197
99e8eb11
MK
21982016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2199
2200 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2201 it works properly on big-endian machines where sizeof (CORE_ADDR)
2202 != sizeof (void *).
2203
a994041d
PA
22042016-01-21 Pedro Alves <palves@redhat.com>
2205
2206 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2207 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2208 * configure: Regenerate.
2209
f7a6a40d
YQ
22102016-01-21 Yao Qi <yao.qi@linaro.org>
2211
2212 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2213 is_thumb and set it according to CPSR saved on the stack.
2214 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2215 arm_sigreturn_next_pc.
2216
6f69e520
YQ
22172016-01-18 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-low.c (linux_set_pc_64bit): New function.
2220 (linux_get_pc_64bit): New function.
2221 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2222 Declare.
2223 * linux-sparc-low.c (debug_threads): Remove declaration.
2224 (sparc_get_pc): Remove.
2225 (the_low_target): Use linux_get_pc_64bit instead of
2226 sparc_get_pc.
2227 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2228 (the_low_target): Use linux_get_pc_64bit and
2229 linux_set_pc_64bit.
2230
276d4552
YQ
22312016-01-18 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-arm-low.c (debug_threads): Remove declaration.
2234 (arm_get_pc, arm_set_pc): Remove.
2235 (the_low_target): Use linux_get_pc_32bit and
2236 linux_set_pc_32bit.
2237 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2238 (the_low_target): Use linux_get_pc_32bit and
2239 linux_set_pc_32bit.
2240 * linux-cris-low.c (debug_threads): Remove declaration.
2241 (cris_get_pc, cris_set_pc,): Remove.
2242 (the_low_target): Use linux_get_pc_32bit and
2243 linux_set_pc_32bit.
2244 * linux-crisv32-low.c (debug_threads): Remove declaration.
2245 (cris_get_pc, cris_set_pc): Remove.
2246 (the_low_target): Use linux_get_pc_32bit and
2247 linux_set_pc_32bit.
2248 * linux-low.c: Include inttypes.h.
2249 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2250 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2251 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2252 (the_low_target): Use linux_get_pc_32bit and
2253 linux_set_pc_32bit.
2254 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2255 (the_low_target): Use linux_get_pc_32bit and
2256 linux_set_pc_32bit.
2257 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2258 (the_low_target): Use linux_get_pc_32bit and
2259 linux_set_pc_32bit.
2260 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2261 (the_low_target): Use linux_get_pc_32bit and
2262 linux_set_pc_32bit.
2263 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2264 (the_low_target): Use linux_get_pc_32bit and
2265 linux_set_pc_32bit.
2266
eb0edac8
GB
22672016-01-18 Gary Benson <gbenson@redhat.com>
2268
2269 * configure.ac (AC_FUNC_FORK): New check.
2270 * config.in: Regenerate.
2271 * configure: Likewise.
2272
1b451dda
YQ
22732016-01-14 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2276 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2277 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2278 arm_get_next_pcs_ctor.
2279
82075af2
JS
22802016-01-12 Josh Stone <jistone@redhat.com>
2281 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2282
2283 * inferiors.h: Include "gdb_vecs.h".
2284 (struct process_info): Add syscalls_to_catch.
2285 * inferiors.c (remove_process): Free syscalls_to_catch.
2286 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2287 syscall_return stops.
2288 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2289 * server.c (handle_general_set): Handle QCatchSyscalls.
2290 (handle_query): Report support for QCatchSyscalls.
2291 * target.h (struct target_ops): Add supports_catch_syscall.
2292 (target_supports_catch_syscall): New macro.
2293 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2294 (struct lwp_info): Add syscall_state.
2295 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2296 Maintain syscall_state and syscalls_to_catch across exec.
2297 (get_syscall_trapinfo): New function, proxy to the_low_target.
2298 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2299 (linux_low_filter_event): Toggle syscall_state entry/return for
2300 syscall traps, and set it ignored for all others.
2301 (gdb_catching_syscalls_p): New function.
2302 (gdb_catch_this_syscall_p): New function.
2303 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2304 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2305 (linux_supports_catch_syscall): New function.
2306 (linux_target_ops): Install it.
2307 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2308 (the_low_target): Install it.
2309
8f13a3ce
MF
23102016-01-12 Mike Frysinger <vapier@gentoo.org>
2311
2312 * acinclude.m4: Include new ../warning.m4 file.
2313 * configure: Regenerated.
2314 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2315
5b3da067
MF
23162016-01-12 Mike Frysinger <vapier@gentoo.org>
2317
2318 * ax.c (is_goto_target): Mark static.
2319 * linux-low.c (register_addr): Likewise.
2320 (linux_fetch_registers, linux_store_registers): Likewise.
2321 * mem-break.c (any_persistent_commands): Fix old prototype.
2322 (add_commands_to_breakpoint): Mark static.
2323 * regcache.c (find_register_by_name): Delete unused func.
2324 * remote-utils.c (hex_or_minus_one): Mark static.
2325 * server.c (monitor_show_help): Mark static.
2326 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2327 handle_v_requests): Likewise.
2328
bc504a31
PA
23292016-01-12 Pedro Alves <palves@redhat.com>
2330
2331 Remove use of the registered trademark symbol throughout.
2332
5a0dd67a
YQ
23332016-01-08 Yao Qi <yao.qi@linaro.org>
2334
2335 * remote-utils.c (getpkt): If c is '\003', call target hook
2336 request_interrupt.
2337
b2ca446f
YQ
23382016-01-06 Yao Qi <yao.qi@linaro.org>
2339
2340 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2341 linux-aarch32-low.c.
2342 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2343 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2344 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2345 (thumb2_breakpoint): Declare.
2346 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2347 linux-aarch32-low.h.
2348 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2349 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2350 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2351
edd88788
JB
23522016-01-01 Joel Brobecker <brobecker@adacore.com>
2353
2354 * gdbreplay.c (gdbreplay_version): Change copyright year in
2355 version message.
2356 * server.c (gdbserver_version): Likewise.
2357
65da7f14
PP
23582015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2359
2360 * server.c (crc32_table): Delete.
2361 (crc32): Use libiberty's xcrc32 function.
2362
4abd5ed2
JB
23632015-12-22 Joel Brobecker <brobecker@adacore.com>
2364
2365 * lynx-low.c (lynx_delete_thread_callback): New function.
2366 (lynx_mourn): Properly delete our process and all of its
2367 threads. Remove call to clear_inferiors.
2368
0e50fe5c
JB
23692015-12-22 Joel Brobecker <brobecker@adacore.com>
2370
2371 * target.c (thread_search_callback): Add check that
2372 the thread_stopped target callback is not NULL before
2373 calling it.
2374
35adc03f
YQ
23752015-12-21 Yao Qi <yao.qi@linaro.org>
2376
2377 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2378 arm breakpoint.
2379
bd2b2909
AT
23802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2381
2382 * server.c (handle_query): Call target_supports_software_single_step.
2383
7fe5e27e
AT
23842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2385
2386 * linux-low.c (single_step): New function.
2387 (linux_resume_one_lwp_throw): Call single_step.
2388 (start_step_over): Likewise.
2389
d9311bfa
AT
23902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2391
2392 * Makefile.in (SFILES): Append arch/arm-linux.c,
2393 arch/arm-get-next-pcs.c.
2394 (arm-linux.o): New rule.
2395 (arm-get-next-pcs.o): New rule.
2396 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2397 arm-linux.o.
2398 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2399 to linux-aarch32-low.c.
2400 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2401 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2402 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2403 (thumb2_breakpoint_len): Likewise.
2404 (arm_is_thumb_mode): Make non-static.
2405 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2406 from linux-aarch32-low.c.
2407 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2408 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2409 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2410 (thumb2_breakpoint_len): Likewise.
2411 (arm_is_thumb_mode): New declaration.
2412 * linux-arm-low.c: Include arch/arm-linux.h
2413 aarch/arm-get-next-pcs.h, sys/syscall.h.
2414 (get_next_pcs_ops): New struct.
2415 (get_next_pcs_addr_bits_remove): New function.
2416 (get_next_pcs_is_thumb): New function.
2417 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2418 (arm_sigreturn_next_pc): Likewise.
2419 (get_next_pcs_syscall_next_pc): Likewise.
2420 (arm_gdbserver_get_next_pcs): Likewise.
2421 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2422 Initialize.
2423 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2424 * server.h: Include gdb_vecs.h.
2425
68ce2059
AT
24262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2427
2428 * Makefile.in (SFILES): Append common/common-regcache.c.
2429 (OBS): Append common-regcache.o.
2430 (common-regcache.o): New rule.
2431 * regcache.c (init_register_cache): Initialize cache to
2432 REG_UNAVAILABLE.
2433 (regcache_raw_read_unsigned): New function.
2434 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2435 register_status enum.
2436
fa5308bd
AT
24372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2438
2439 * linux-aarch64-low.c (the_low_targets): Rename
2440 breakpoint_reinsert_addr to get_next_pcs.
2441 * linux-arm-low.c (the_low_targets): Likewise.
2442 * linux-bfin-low.c (the_low_targets): Likewise.
2443 * linux-cris-low.c (the_low_targets): Likewise.
2444 * linux-crisv32-low.c (the_low_targets): Likewise.
2445 * linux-low.c (can_software_single_step): Likewise.
2446 (install_software_single_step_breakpoints): New function.
2447 (start_step_over): Use install_software_single_step_breakpoints.
2448 * linux-low.h: New CORE_ADDR vector.
2449 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2450 get_next_pcs.
2451 * linux-mips-low.c (the_low_targets): Likewise.
2452 * linux-nios2-low.c (the_low_targets): Likewise.
2453 * linux-sparc-low.c (the_low_targets): Likewise.
2454
4a6ed09b
PA
24552015-12-17 Pedro Alves <palves@redhat.com>
2456
2457 * linux-low.c (linux_kill_one_lwp): Remove references to
2458 LinuxThreads.
2459 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2460 to 'kill'.
2461 (linux_init_signals): Delete.
2462 (initialize_low): Adjust.
2463 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2464
7544db95
PA
24652015-12-16 Pedro Alves <palves@redhat.com>
2466
2467 * configure.ac (compiler warning flags): When testing a
2468 -Wno-foo option, check whether -Wfoo works instead.
2469 * configure: Regenerate.
2470
8020350c
DB
24712015-12-11 Don Breazeal <donb@codesourcery.com>
2472
2473 * server.c (process_serial_event): Don't exit from gdbserver
2474 in remote mode if there are still active inferiors.
2475
db91f502
YQ
24762015-12-11 Yao Qi <yao.qi@linaro.org>
2477
2478 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2479 arm_breakpoint_at if the process is 32-bit.
2480
b37a6290
YQ
24812015-12-11 Yao Qi <yao.qi@linaro.org>
2482
2483 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2484 arm breakpoint.
2485
17b1509a
YQ
24862015-12-07 Yao Qi <yao.qi@linaro.org>
2487
2488 * configure.srv: Append arm.o to srv_tgtobj for
2489 aarch64*-*-linux* target.
2490 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2491 from linux-arm-low.c.
2492 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2493 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2494 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2495 (thumb2_breakpoint_len): Likewise.
2496 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2497 (arm_breakpoint_kinds): Likewise.
2498 (arm_breakpoint_kind_from_pc): Likewise.
2499 (arm_sw_breakpoint_from_kind): Likewise.
2500 (arm_breakpoint_kind_from_current_state): Likewise.
2501 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2502 (arm_sw_breakpoint_from_kind): Declare.
2503 (arm_breakpoint_kind_from_current_state): Declare.
2504 (arm_breakpoint_at): Declare.
2505 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2506 arm_sw_breakpoint_from_kind if process is 32-bit.
2507 (aarch64_breakpoint_kind_from_pc): New function.
2508 (aarch64_breakpoint_kind_from_current_state): New function.
2509 (the_low_target): Initialize fields breakpoint_kind_from_pc
2510 and breakpoint_kind_from_current_state.
2511 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2512 linux-aarch32-low.c.
2513 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2514 (arm_breakpoint, arm_breakpoint_len): Likewise.
2515 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2516 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2517 (arm_is_thumb_mode): Likewise.
2518 (arm_breakpoint_at): Likewise.
2519 (arm_breakpoint_kind_from_pc): Likewise.
2520 (arm_sw_breakpoint_from_kind): Likewise.
2521 (arm_breakpoint_kind_from_current_state): Likewise.
2522
2523 Revert:
2524 2015-08-04 Yao Qi <yao.qi@linaro.org>
2525
2526 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2527 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2528 * server.c (extended_protocol): Remove "static".
2529 * server.h (extended_protocol): Declare it.
2530
ece66d65
JS
25312015-12-04 Josh Stone <jistone@redhat.com>
2532
2533 * target.h (struct target_ops) <arch_setup>: Rename to ...
2534 (struct target_ops) <post_create_inferior>: ... this.
2535 (target_arch_setup): Rename to ...
2536 (target_post_create_inferior): ... this, calling post_create_inferior.
2537 * server.c (start_inferior): Update target_arch_setup calls to
2538 target_post_create_inferior.
2539 * linux-low.c (linux_low_ptrace_options): Forward declare.
2540 (linux_arch_setup): Update its comment for general use.
2541 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2542 (struct linux_target_ops): Use linux_post_create_inferior.
2543 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2544 to post_create_inferior.
2545 * nto-low.c (struct nto_target_ops): Likewise.
2546 * spu-low.c (struct spu_target_ops): Likewise.
2547 * win32-low.c (struct win32_target_ops): Likewise.
2548
e58c48b4
AT
25492015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2550
2551 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2552
fbec8956
AT
25532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2554
2555 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2556 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2557 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2558 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2559 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2560 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2561 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2562 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2563 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2564 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2565 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2566 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2567
9b4c5f87
AT
25682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2569
2570 * linux-low.c (linux_look_up_symbols): Don't call
2571 linux_supports_traceclone.
2572 * linux-low.h (thread_db_init): Remove use_events argument.
2573 * thread-db.c (thread_db_use_event): Remove global variable.
2574 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2575 (struct thread_db) <td_create_bp>: Remove field.
2576 (thread_db_create_event): Remove function.
2577 (thread_db_enable_reporting): Likewise.
2578 (find_one_thread): Don't check for thread_db_use_events.
2579 (attach_thread): Likewise.
2580 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2581 (try_thread_db_load_1): Don't check for thread_db_use_events.
2582 (thread_db_init): Remove use_events argument and thread events
2583 handling.
2584 (remove_thread_event_breakpoints): Remove function.
2585 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2586
7d00775e
AT
25872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2588
2589 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2590 New function.
2591 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2592 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2594 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2595 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2596 Initialize.
2597 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2598 New function.
2599 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2600 * linux-low.c (can_hardware_single_step): Use
2601 supports_hardware_single_step.
2602 (can_software_single_step): New function.
2603 (start_step_over): Call can_software_single_step.
2604 (linux_supports_hardware_single_step): New function.
2605 (struct target_ops) <supports_software_single_step>: Initialize.
2606 * linux-low.h (struct linux_target_ops)
2607 <supports_hardware_single_step>: Initialize.
2608 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2610 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2611 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2612 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2613 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2614 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2616 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2617 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2618 Initialize.
2619 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2620 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2621 Initialize.
2622 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2624 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2625 New function.
2626 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2627 * target.h (struct target_ops): <supports_software_single_step>:
2628 New field.
2629 (target_supports_software_single_step): New macro.
2630
2d97cd35
AT
26312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2632
2633 * linux-low.c (linux_wait_1): Fix pc advance condition.
2634 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2635 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2636
769ef81f
AT
26372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2638
2639 * linux-arm-low.c (arm_is_thumb_mode): New function.
2640 (arm_breakpoint_at): Use arm_is_thumb_mode.
2641 (arm_breakpoint_kind_from_current_state): New function.
2642 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2643 Initialize.
2644 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2645 (linux_breakpoint_kind_from_current_state): New function.
2646 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2647 * linux-low.h (struct linux_target_ops)
2648 <breakpoint_kind_from_current_state>: New field.
2649 * target.h (struct target_ops): Likewise.
2650 (target_breakpoint_kind_from_current_state): New macro.
2651
1bebeeca
PA
26522015-11-30 Pedro Alves <palves@redhat.com>
2653
2654 * linux-low.c (linux_resume): Wake up the event loop before
2655 returning.
2656
a67a9fae
PA
26572015-11-30 Pedro Alves <palves@redhat.com>
2658
2659 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2660 check.
2661 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2662 to -1.
2663 * target.c (struct thread_search): New structure.
2664 (thread_search_callback): New function.
2665 (prev_general_thread): New global.
2666 (prepare_to_access_memory, done_accessing_memory): New functions.
2667 * target.h (prepare_to_access_memory, done_accessing_memory):
2668 Replace macros with function declarations.
2669
f2faf941
PA
26702015-11-30 Pedro Alves <palves@redhat.com>
2671
2672 PR 14618
2673 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2674 report TARGET_WAITKIND_NO_RESUMED.
2675 * remote-utils.c (prepare_resume_reply): Handle
2676 TARGET_WAITKIND_NO_RESUMED.
2677 * server.c (report_no_resumed): New global.
2678 (handle_query) <qSupported>: Handle "no-resumed+". Report
2679 "no-resumed+" support.
2680 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2681 return error if the client doesn't support no-resumed events.
2682 (push_stop_notification): New function.
2683 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2684 events if the client supports them.
2685
a681f9c9
PA
26862015-11-30 Pedro Alves <palves@redhat.com>
2687
2688 * linux-low.c (thread_still_has_status_pending_p): Don't check
2689 vCont;t here.
2690 (lwp_resumed): New function.
2691 (status_pending_p_callback): Return early if the LWP is not
2692 supposed to be resumed.
2693
65706a29
PA
26942015-11-30 Pedro Alves <palves@redhat.com>
2695
2696 * linux-low.c (handle_extended_wait): Assert that the LWP's
2697 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2698 thread create events, leave the new child's status pending.
2699 (linux_low_filter_event): If GDB wants to hear about thread exit
2700 events, leave the LWP marked dead and don't delete it.
2701 (linux_wait_for_event_filtered): Don't check for thread exit.
2702 (filter_exit_event): New function.
2703 (linux_wait_1): Use it, when returning an exit event.
2704 (linux_resume_one_lwp_throw): Assert that the LWP's
2705 waitstatus is TARGET_WAITKIND_IGNORE.
2706 * remote-utils.c (prepare_resume_reply): Handle
2707 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2708 * server.c (report_thread_events): New global.
2709 (handle_general_set): Handle QThreadEvents.
2710 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2711 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2712 TARGET_WAITKIND_THREAD_EXITED.
2713 * server.h (report_thread_events): Declare.
2714
56cf4bed
PA
27152015-11-30 Pedro Alves <palves@redhat.com>
2716
2717 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2718 the thread's last_resume_kind was resume_stop.
2719
500c1d85
PA
27202015-11-30 Pedro Alves <palves@redhat.com>
2721
2722 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2723 before returning.
2724
de979965
PA
27252015-11-30 Pedro Alves <palves@redhat.com>
2726
2727 * server.c (handle_v_requests): Handle vCtrlC.
2728
34c65914
PA
27292015-11-30 Pedro Alves <palves@redhat.com>
2730
2731 * gdbthread.h (find_any_thread_of_pid): Declare.
2732 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2733 functions.
2734 * server.c (handle_query): If current_thread is NULL, look for
2735 another thread of the selected process.
2736
79efa585 27372015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2738 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2739
2740 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2741 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2742 name in reply.
2743 * target.h (struct target_ops) <thread_name>: New field.
2744 (target_thread_name): New macro.
2745
80d82c19
JB
27462015-11-23 Joel Brobecker <brobecker@adacore.com>
2747
2748 * regcache.h (regcache_invalidate_pid): Add declaration.
2749 * regcache.c (regcache_invalidate_pid): New function, extracted
2750 from regcache_invalidate.
2751 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2752 Add trivial documentation comment.
2753 * lynx-low.c: Use regcache_invalidate_pid instead of
2754 regcache_invalidate.
2755
64da5dd5
JB
27562015-11-23 Joel Brobecker <brobecker@adacore.com>
2757
2758 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2759 and Elf64_auxv_t if the target is Android.
2760
37ce4055
DE
27612015-11-22 Doug Evans <xdje42@gmail.com>
2762
2763 * target.h: #include <sys/types.h>.
2764
06e03fff
PA
27652015-11-19 Pedro Alves <palves@redhat.com>
2766
2767 * linux-low.c (linux_process_qsupported): Change prototype.
2768 Adjust.
2769 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2770 Change prototype.
2771 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2772 and adjust to loop over all features.
2773 * server.c (handle_query) <qSupported>: Adjust to call
2774 target_process_qsupported once, passing it a vector of unprocessed
2775 features.
2776 * target.h (struct target_ops) <process_qsupported>: Change
2777 prototype.
2778 (target_process_qsupported): Adjust.
2779
9a084706
PA
27802015-11-19 Pedro Alves <palves@redhat.com>
2781
2782 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2783 mode.
2784 * configure: Regenerate.
2785
dad44a1f
PA
27862015-11-19 Pedro Alves <palves@redhat.com>
2787
2788 * configure: Regenerate.
2789
231c0592
YQ
27902015-11-19 Yao Qi <yao.qi@linaro.org>
2791
2792 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2793 type to uint32_t.
2794
6c1c9a8b
YQ
27952015-11-19 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2798 (struct aarch64_operand): Move enum out.
2799
9caa3311
YQ
28002015-11-19 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2803 struct user_fpsimd_state *.
2804 (aarch64_store_fpregset): Likewise.
2805
6a69a054
YQ
28062015-11-19 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2809 struct user_pt_regs *.
2810 (aarch64_store_gregset): Likewise.
2811
1798301e
PA
28122015-11-18 Pedro Alves <palves@redhat.com>
2813
2814 * Makefile.in (all_object_files): Add $IPA_OBJS.
2815
ce7715e2
PA
28162015-11-17 Pedro Alves <palves@redhat.com>
2817
2818 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2819 GDB_SIGNAL_0 and gdb_signal_to_string.
2820
c0879059
PA
28212015-11-17 Pedro Alves <palves@redhat.com>
2822
2823 * win32-low.c (handle_output_debug_string): Remove parameter.
2824 (win32_kill): Remove our_status local and adjust call to
2825 handle_output_debug_string.
2826 (get_child_debug_event): Adjust call to
2827 handle_output_debug_string.
2828
1996e237
SM
28292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2830
2831 * linux-mips-low.c (mips_fill_gregset): Add cast.
2832 (mips_store_gregset): Likewise.
2833 (mips_fill_fpregset): Likewise.
2834 (mips_store_fpregset): Likewise.
2835
cbec665b
SM
28362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2839 priv.
2840
eb3e3c67
SM
28412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2842
2843 * linux-mips-low.c (mips_linux_new_thread): Change type of
2844 watch_type to enum target_hw_bp_type.
2845
171de4b8
SM
28462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2847
2848 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2849 Change return type to arm_hwbp_type.
2850
04248ead
SM
28512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2852
2853 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2854 (arm_store_gregset): Likewise.
2855 * linux-arm-low.c (arm_get_hwcap): Likewise.
2856 (arm_read_description): Likewise.
2857
04b3479c
SM
28582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2859
2860 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2861
2bc84e8a
SM
28622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2863
2864 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2865 (ppc_fill_vsxregset): Likewise.
2866 (ppc_store_vsxregset): Likewise.
2867 (ppc_fill_vrregset): Likewise.
2868 (ppc_store_vrregset): Likewise.
2869 (ppc_fill_evrregset): Likewise.
2870 (ppc_store_evrregset): Likewise.
2871
e6c5bb05
SM
28722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2873
2874 * linux-ppc-low.c (ppc_usrregs_info): Remove
2875 forward-declaration.
2876 (ppc_arch_setup): Move lower in file.
2877
7ea45d72
SM
28782015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2879
2880 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2881 (ps_pdwrite): Likewise.
2882
69291610
HW
28832015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2884
2885 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2886 to after assert checks.
2887
b42945fd
SM
28882015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2889
2890 * proc-service.c (ps_pdread): Add/adjust casts.
2891 (ps_pdwrite): Add/adjust casts.
2892
d6f85c84
SM
28932015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2894
2895 * server.c (handle_search_memory_1): Cast return value of
2896 memmem.
2897
f98cd059
SM
28982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2899
2900 * server.c (write_qxfer_response): Change type of data to
2901 gdb_byte *.
2902
d2412fa5
PA
29032015-10-29 Pedro Alves <palves@redhat.com>
2904
2905 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2906
c17414a2
PA
29072015-10-29 Pedro Alves <palves@redhat.com>
2908
2909 * tracepoint.c (clear_installed_tracepoints): Add casts.
2910
e053fbc4
PA
29112015-10-29 Pedro Alves <palves@redhat.com>
2912
2913 * server.c (handle_v_cont, process_serial_event): Add enum
2914 gdb_signal casts to signal parsing code.
2915
add67df8
PA
29162015-10-29 Pedro Alves <palves@redhat.com>
2917
2918 * linux-low.h (NULL_REGSET): Define.
2919 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2920 * linux-arm-low.c (arm_regsets): Likewise.
2921 * linux-crisv32-low.c (cris_regsets): Likewise.
2922 * linux-m68k-low.c (m68k_regsets): Likewise.
2923 * linux-mips-low.c (mips_regsets): Likewise.
2924 * linux-nios2-low.c (nios2_regsets): Likewise.
2925 * linux-ppc-low.c (ppc_regsets): Likewise.
2926 * linux-s390-low.c (s390_regsets): Likewise.
2927 * linux-sh-low.c (sh_regsets): Likewise.
2928 * linux-sparc-low.c (sparc_regsets): Likewise.
2929 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2930 * linux-tile-low.c (tile_regsets): Likewise.
2931 * linux-x86-low.c (x86_regsets): Likewise.
2932 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2933
50bc912a
PA
29342015-10-29 Pedro Alves <palves@redhat.com>
2935
2936 * linux-low.h (NULL_REGSET): Define.
2937 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2938 * linux-arm-low.c (arm_regsets): Likewise.
2939 * linux-crisv32-low.c (cris_regsets): Likewise.
2940 * linux-m68k-low.c (m68k_regsets): Likewise.
2941 * linux-mips-low.c (mips_regsets): Likewise.
2942 * linux-nios2-low.c (nios2_regsets): Likewise.
2943 * linux-ppc-low.c (ppc_regsets): Likewise.
2944 * linux-s390-low.c (s390_regsets): Likewise.
2945 * linux-sh-low.c (sh_regsets): Likewise.
2946 * linux-sparc-low.c (sparc_regsets): Likewise.
2947 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2948 * linux-tile-low.c (tile_regsets): Likewise.
2949 * linux-x86-low.c (x86_regsets): Likewise.
2950 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2951
682b2546
DE
29522015-10-26 Doug Evans <dje@google.com>
2953
2954 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2955
963843d4
DE
29562015-10-26 Doug Evans <dje@google.com>
2957
2958 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2959
d41401ac
DE
29602015-10-26 Doug Evans <dje@google.com>
2961
2962 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2963 for debug_printf.
2964 (attach_thread, find_new_threads_callback): Ditto.
2965
3db28855
AT
29662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2967
2968 * mem-break.h (set_breakpoint_data): Remove.
2969
fb78e89c
AT
29702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2971
2972 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2973 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2974 (initialize_low): Remove set_breakpoint_data call.
2975 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2976 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2977 (initialize_low): Remove set_breakpoint_data call.
2978 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2979 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2980 (initialize_low): Remove set_breakpoint_data call.
2981
2e6ee069
AT
29822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2983
2984 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2985 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2986 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2987 * target.h (target_breakpoint_kind_from_pc): New macro.
2988
1652a986
AT
29892015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2990
2991 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2992 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2993 the default breakpoint kind.
2994
abeead09
AT
29952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2996
2997 * linux-arm-low.c (arm_supports_z_point_type): Add software
2998 breakpoint support.
2999
b0b4b501
AT
30002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3001
3002 * linux-arm-low.c: Refactor breakpoint definitions.
3003 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3004 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3005
8689682c
AT
30062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3007
3008 * Makefile.in: Add arm.c/o.
3009 * configure.srv: Likewise.
3010 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3011 (arm_breakpoint_kind_from_pc): New function.
3012 (arm_sw_breakpoint_from_kind): Return proper kind.
3013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3014
27165294
AT
30152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3016
3017 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3018 removal.
3019 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3020 (struct raw_breakpoint) <size>: Remove.
3021 (struct raw_breakpoint) <kind>: Add.
3022 (bp_size): New function.
3023 (bp_opcode): Likewise.
3024 (find_raw_breakpoint_at): Adjust for kind.
3025 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3026 (remove_memory_breakpoint): Adjust for kind call bp_size.
3027 (set_raw_breakpoint_at): Adjust for kind.
3028 (set_breakpoint): Likewise.
3029 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3030 (delete_raw_breakpoint): Adjust for kind.
3031 (delete_breakpoint): Likewise.
3032 (find_gdb_breakpoint): Likewise.
3033 (set_gdb_breakpoint_1): Likewise.
3034 (set_gdb_breakpoint): Likewise.
3035 (delete_gdb_breakpoint_1): Likewise.
3036 (delete_gdb_breakpoint): Likewise.
3037 (uninsert_raw_breakpoint): Likewise.
3038 (reinsert_raw_breakpoint): Likewise.
3039 (set_breakpoint_data): Remove.
3040 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3041 (check_mem_read): Adjust for kind call bp_size.
3042 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3043 (clone_one_breakpoint): Adjust for kind.
3044 * mem-break.h (set_gdb_breakpoint): Likewise.
3045 (delete_gdb_breakpoint): Likewise.
3046 * server.c (process_serial_event): Likewise.
3047
dd373349
AT
30482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3049
3050 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3051 (struct linux_target_ops) <breakpoint>: Remove.
3052 (struct linux_target_ops) <breakpoint_len>: Remove.
3053 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3054 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3055 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3056 (arm_sw_breakpoint_from_kind): New function.
3057 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3058 (struct linux_target_ops) <breakpoint>: Remove.
3059 (struct linux_target_ops) <breakpoint_len>: Remove.
3060 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3062 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3063 (struct linux_target_ops) <breakpoint>: Remove.
3064 (struct linux_target_ops) <breakpoint_len>: Remove.
3065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3067 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3068 (struct linux_target_ops) <breakpoint>: Remove.
3069 (struct linux_target_ops) <breakpoint_len>: Remove.
3070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3072 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3073 and sw_breakpoint_from_kind to increment the pc.
3074 (linux_breakpoint_kind_from_pc): New function.
3075 (linux_sw_breakpoint_from_kind): New function.
3076 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3077 (initialize_low): Call breakpoint_kind_from_pc and
3078 sw_breakpoint_from_kind to replace breakpoint_data/len.
3079 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3080 New field.
3081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3082 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3083 (struct linux_target_ops) <breakpoint>: Remove.
3084 (struct linux_target_ops) <breakpoint_len>: Remove.
3085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3087 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3088 (struct linux_target_ops) <breakpoint>: Remove.
3089 (struct linux_target_ops) <breakpoint_len>: Remove.
3090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3092 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3093 (struct linux_target_ops) <breakpoint>: Remove.
3094 (struct linux_target_ops) <breakpoint_len>: Remove.
3095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3097 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3098 (struct linux_target_ops) <breakpoint>: Remove.
3099 (struct linux_target_ops) <breakpoint_len>: Remove.
3100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3102 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3103 (struct linux_target_ops) <breakpoint>: Remove.
3104 (struct linux_target_ops) <breakpoint_len>: Remove.
3105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3107 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3108 (struct linux_target_ops) <breakpoint>: Remove.
3109 (struct linux_target_ops) <breakpoint_len>: Remove.
3110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3112 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3113 (struct linux_target_ops) <breakpoint>: Remove.
3114 (struct linux_target_ops) <breakpoint_len>: Remove.
3115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3117 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3118 (struct linux_target_ops) <breakpoint>: Remove.
3119 (struct linux_target_ops) <breakpoint_len>: Remove.
3120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3122 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3123 (struct linux_target_ops) <breakpoint>: Remove.
3124 (struct linux_target_ops) <breakpoint_len>: Remove.
3125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3127 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3128 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3129 (struct linux_target_ops) <breakpoint>: Remove.
3130 (struct linux_target_ops) <breakpoint_len>: Remove.
3131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3133 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3134 (struct linux_target_ops) <breakpoint>: Remove.
3135 (struct linux_target_ops) <breakpoint_len>: Remove.
3136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3138
4cd98a19
AT
31392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3140
3141 * linux-cris-low.c (cris_get_pc): Remove void arg.
3142
774ee6d2
AR
31432015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3144
3145 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3146 variable name.
3147
833dcd29
AR
31482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3149
3150 * inferiors.c (thread_pid_matches_callback): New function.
3151 (find_thread_process): New function.
3152 (remove_thread): Reset current_thread.
3153 (remove_process): Assert threads have been removed first.
3154
8d689ee5
YQ
31552015-10-15 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3158 if it is 3.
3159 (aarch64_remove_point): Likewise.
3160 * regcache.c (regcache_register_size): New function.
3161
1c2e1515
YQ
31622015-10-12 Yao Qi <yao.qi@linaro.org>
3163
3164 * linux-aarch64-low.c: Update all callers as emit_load_store
3165 is renamed to aarch64_emit_load_store.
3166
e1c587c3
YQ
31672015-10-12 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-aarch64-low.c: Update all callers of function renaming
3170 from emit_insn to aarch64_emit_insn.
3171
b6542f81
YQ
31722015-10-12 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3175 arch/aarch64-insn.h.
3176 (struct aarch64_memory_operand): Likewise.
3177 (ENCODE): Likewise.
3178 (emit_insn): Move to arch/aarch64-insn.c.
3179 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3180 (emit_load_store): Move to arch/aarch64-insn.c.
3181 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3182 (can_encode_int32): Remove.
3183
246994ce
YQ
31842015-10-12 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3187 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3188 (aarch64_relocate_instruction): Likewise.
3189 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3190 (struct aarch64_insn_visitor): Likewise.
3191
0badd99f
YQ
31922015-10-12 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3195 (struct aarch64_insn_visitor): New.
3196 (struct aarch64_insn_relocation_data): New.
3197 (aarch64_ftrace_insn_reloc_b): New function.
3198 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3199 (aarch64_ftrace_insn_reloc_cb): Likewise.
3200 (aarch64_ftrace_insn_reloc_tb): Likewise.
3201 (aarch64_ftrace_insn_reloc_adr): Likewise.
3202 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3203 (aarch64_ftrace_insn_reloc_others): Likewise.
3204 (visitor): New.
3205 (aarch64_relocate_instruction): Use visitor.
3206
dfaffe9d
YQ
32072015-10-12 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3210 int. Add argument buf.
3211 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3212 aarch64_relocate_instruction.
3213
70b439f0
YQ
32142015-10-12 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3217 argument insn. Remove local variable insn. Don't call
3218 target_read_uint32.
3219 (aarch64_install_fast_tracepoint_jump_pad): Call
3220 target_read_uint32.
3221
7781c06f
YQ
32222015-09-30 Yao Qi <yao.qi@linaro.org>
3223
3224 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3225 (emit_load_store_pair): Likewise.
3226
9a3c8263
SM
32272015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3228
3229 * dll.c (match_dll): Add cast(s).
3230 (unloaded_dll): Likewise.
3231 * linux-low.c (second_thread_of_pid_p): Likewise.
3232 (delete_lwp_callback): Likewise.
3233 (count_events_callback): Likewise.
3234 (select_event_lwp_callback): Likewise.
3235 (linux_set_resume_request): Likewise.
3236 * server.c (accumulate_file_name_length): Likewise.
3237 (emit_dll_description): Likewise.
3238 (handle_qxfer_threads_worker): Likewise.
3239 (visit_actioned_threads): Likewise.
3240 * thread-db.c (any_thread_of): Likewise.
3241 * tracepoint.c (same_process_p): Likewise.
3242 (match_blocktype): Likewise.
3243 (build_traceframe_info_xml): Likewise.
3244
224c3ddb
SM
32452015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3246
3247 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3248 assignment.
3249 (gdb_unparse_agent_expr): Likewise.
3250 * hostio.c (require_data): Likewise.
3251 (handle_pread): Likewise.
3252 * linux-low.c (disable_regset): Likewise.
3253 (fetch_register): Likewise.
3254 (store_register): Likewise.
3255 (get_dynamic): Likewise.
3256 (linux_qxfer_libraries_svr4): Likewise.
3257 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3258 (set_fast_tracepoint_jump): Likewise.
3259 (uninsert_fast_tracepoint_jumps_at): Likewise.
3260 (reinsert_fast_tracepoint_jumps_at): Likewise.
3261 (validate_inserted_breakpoint): Likewise.
3262 (clone_agent_expr): Likewise.
3263 * regcache.c (init_register_cache): Likewise.
3264 * remote-utils.c (putpkt_binary_1): Likewise.
3265 (decode_M_packet): Likewise.
3266 (decode_X_packet): Likewise.
3267 (look_up_one_symbol): Likewise.
3268 (relocate_instruction): Likewise.
3269 (monitor_output): Likewise.
3270 * server.c (handle_search_memory): Likewise.
3271 (handle_qxfer_exec_file): Likewise.
3272 (handle_qxfer_libraries): Likewise.
3273 (handle_qxfer): Likewise.
3274 (handle_query): Likewise.
3275 (handle_v_cont): Likewise.
3276 (handle_v_run): Likewise.
3277 (captured_main): Likewise.
3278 * target.c (write_inferior_memory): Likewise.
3279 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3280 * tracepoint.c (init_trace_buffer): Likewise.
3281 (add_tracepoint_action): Likewise.
3282 (add_traceframe): Likewise.
3283 (add_traceframe_block): Likewise.
3284 (cmd_qtdpsrc): Likewise.
3285 (cmd_qtdv): Likewise.
3286 (cmd_qtstatus): Likewise.
3287 (response_source): Likewise.
3288 (response_tsv): Likewise.
3289 (cmd_qtnotes): Likewise.
3290 (gdb_collect): Likewise.
3291 (initialize_tracepoint): Likewise.
3292
afbe19f8
PL
32932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3294
3295 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3296 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3297 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3298 <NOP>: New.
3299 (enum aarch64_condition_codes): New enum.
3300 (w0): New static global.
3301 (fp): Likewise.
3302 (lr): Likewise.
3303 (struct aarch64_memory_operand) <type>: New
3304 MEMORY_OPERAND_POSTINDEX type.
3305 (postindex_memory_operand): New helper function.
3306 (emit_ret): New function.
3307 (emit_load_store_pair): New function, factored out of emit_stp
3308 with support for MEMORY_OPERAND_POSTINDEX.
3309 (emit_stp): Rewrite using emit_load_store_pair.
3310 (emit_ldp): New function.
3311 (emit_load_store): Likewise.
3312 (emit_ldr): Mention post-index instruction in comment.
3313 (emit_ldrh): New function.
3314 (emit_ldrb): New function.
3315 (emit_ldrsw): Mention post-index instruction in comment.
3316 (emit_str): Likewise.
3317 (emit_subs): New function.
3318 (emit_cmp): Likewise.
3319 (emit_and): Likewise.
3320 (emit_orr): Likewise.
3321 (emit_orn): Likewise.
3322 (emit_eor): Likewise.
3323 (emit_mvn): Likewise.
3324 (emit_lslv): Likewise.
3325 (emit_lsrv): Likewise.
3326 (emit_asrv): Likewise.
3327 (emit_mul): Likewise.
3328 (emit_sbfm): Likewise.
3329 (emit_sbfx): Likewise.
3330 (emit_ubfm): Likewise.
3331 (emit_ubfx): Likewise.
3332 (emit_csinc): Likewise.
3333 (emit_cset): Likewise.
3334 (emit_nop): Likewise.
3335 (emit_ops_insns): New helper function.
3336 (emit_pop): Likewise.
3337 (emit_push): Likewise.
3338 (aarch64_emit_prologue): New function.
3339 (aarch64_emit_epilogue): Likewise.
3340 (aarch64_emit_add): Likewise.
3341 (aarch64_emit_sub): Likewise.
3342 (aarch64_emit_mul): Likewise.
3343 (aarch64_emit_lsh): Likewise.
3344 (aarch64_emit_rsh_signed): Likewise.
3345 (aarch64_emit_rsh_unsigned): Likewise.
3346 (aarch64_emit_ext): Likewise.
3347 (aarch64_emit_log_not): Likewise.
3348 (aarch64_emit_bit_and): Likewise.
3349 (aarch64_emit_bit_or): Likewise.
3350 (aarch64_emit_bit_xor): Likewise.
3351 (aarch64_emit_bit_not): Likewise.
3352 (aarch64_emit_equal): Likewise.
3353 (aarch64_emit_less_signed): Likewise.
3354 (aarch64_emit_less_unsigned): Likewise.
3355 (aarch64_emit_ref): Likewise.
3356 (aarch64_emit_if_goto): Likewise.
3357 (aarch64_emit_goto): Likewise.
3358 (aarch64_write_goto_address): Likewise.
3359 (aarch64_emit_const): Likewise.
3360 (aarch64_emit_call): Likewise.
3361 (aarch64_emit_reg): Likewise.
3362 (aarch64_emit_pop): Likewise.
3363 (aarch64_emit_stack_flush): Likewise.
3364 (aarch64_emit_zero_ext): Likewise.
3365 (aarch64_emit_swap): Likewise.
3366 (aarch64_emit_stack_adjust): Likewise.
3367 (aarch64_emit_int_call_1): Likewise.
3368 (aarch64_emit_void_call_2): Likewise.
3369 (aarch64_emit_eq_goto): Likewise.
3370 (aarch64_emit_ne_goto): Likewise.
3371 (aarch64_emit_lt_goto): Likewise.
3372 (aarch64_emit_le_goto): Likewise.
3373 (aarch64_emit_gt_goto): Likewise.
3374 (aarch64_emit_ge_got): Likewise.
3375 (aarch64_emit_ops_impl): New static global variable.
3376 (aarch64_emit_ops): New target function, return
3377 &aarch64_emit_ops_impl.
3378 (struct linux_target_ops): Install it.
3379
bb903df0
PL
33802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3381
3382 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3383 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3384 aarch64-ipa.o.
3385 * linux-aarch64-ipa.c: New file.
3386 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3387 and endian.h.
3388 (aarch64_get_thread_area): New target method.
3389 (extract_signed_bitfield): New helper function.
3390 (aarch64_decode_ldr_literal): New function.
3391 (enum aarch64_opcodes): New enum.
3392 (struct aarch64_register): New struct.
3393 (struct aarch64_operand): New struct.
3394 (x0): New static global.
3395 (x1): Likewise.
3396 (x2): Likewise.
3397 (x3): Likewise.
3398 (x4): Likewise.
3399 (w2): Likewise.
3400 (ip0): Likewise.
3401 (sp): Likewise.
3402 (xzr): Likewise.
3403 (aarch64_register): New helper function.
3404 (register_operand): Likewise.
3405 (immediate_operand): Likewise.
3406 (struct aarch64_memory_operand): New struct.
3407 (offset_memory_operand): New helper function.
3408 (preindex_memory_operand): Likewise.
3409 (enum aarch64_system_control_registers): New enum.
3410 (ENCODE): New macro.
3411 (emit_insn): New helper function.
3412 (emit_b): New function.
3413 (emit_bcond): Likewise.
3414 (emit_cb): Likewise.
3415 (emit_tb): Likewise.
3416 (emit_blr): Likewise.
3417 (emit_stp): Likewise.
3418 (emit_ldp_q_offset): Likewise.
3419 (emit_stp_q_offset): Likewise.
3420 (emit_load_store): Likewise.
3421 (emit_ldr): Likewise.
3422 (emit_ldrsw): Likewise.
3423 (emit_str): Likewise.
3424 (emit_ldaxr): Likewise.
3425 (emit_stxr): Likewise.
3426 (emit_stlr): Likewise.
3427 (emit_data_processing_reg): Likewise.
3428 (emit_data_processing): Likewise.
3429 (emit_add): Likewise.
3430 (emit_sub): Likewise.
3431 (emit_mov): Likewise.
3432 (emit_movk): Likewise.
3433 (emit_mov_addr): Likewise.
3434 (emit_mrs): Likewise.
3435 (emit_msr): Likewise.
3436 (emit_sevl): Likewise.
3437 (emit_wfe): Likewise.
3438 (append_insns): Likewise.
3439 (can_encode_int32_in): New helper function.
3440 (aarch64_relocate_instruction): New function.
3441 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3442 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3443 (struct linux_target_ops): Install aarch64_get_thread_area,
3444 aarch64_install_fast_tracepoint_jump_pad and
3445 aarch64_get_min_fast_tracepoint_insn_len.
3446
787749ea
PL
34472015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3448
3449 * Makefile.in (aarch64-insn.o): New rule.
3450 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3451
9812b2e6
YQ
34522015-09-21 Yao Qi <yao.qi@linaro.org>
3453
3454 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3455
18fe412b
YQ
34562015-09-21 Yao Qi <yao.qi@linaro.org>
3457
3458 * tracepoint.c (max_jump_pad_size): Remove.
3459
a0cc84cd
YQ
34602015-09-18 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-aarch64-low.c: Don't include sys/uio.h.
3463 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3464
d78908cf
WW
34652015-09-16 Wei-cheng Wang <cole945@gmail.com>
3466
3467 * tracepoint.c (eval_result_type): Change prototype.
3468 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3469
d57e0d50
PA
34702015-09-15 Pedro Alves <palves@redhat.com>
3471
3472 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3473 Check whether to report exec events instead of checking whether
3474 multiprocess is enabled.
3475
5a676acc
PA
34762015-09-15 Pedro Alves <palves@redhat.com>
3477
3478 PR remote/18965
3479 * remote-utils.c (prepare_resume_reply): Merge
3480 TARGET_WAITKIND_VFORK_DONE switch case with the
3481 TARGET_WAITKIND_FORKED case.
3482
7c5d0fad
YQ
34832015-09-15 Yao Qi <yao.qi@linaro.org>
3484
3485 * server.c (handle_query): Check string comparison using
3486 "else if" instead of "if".
3487
750ce8d1
YQ
34882015-09-15 Yao Qi <yao.qi@linaro.org>
3489
3490 * server.c (vCont_supported): New global variable.
3491 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3492 matches. Append ";vContSupported+" to own_buf.
3493 (handle_v_requests): Append ";s;S" to own_buf if target supports
3494 hardware single step or vCont_supported is false.
3495 (capture_main): Set vCont_supported to zero.
3496
70b90b91
YQ
34972015-09-15 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3500 it to ...
3501 (linux_supports_hardware_single_step): ... New function.
3502 (linux_target_ops): Update.
3503 * lynx-low.c (lynx_target_ops): Set field
3504 supports_hardware_single_step to target_can_do_hardware_single_step.
3505 * nto-low.c (nto_target_ops): Likewise.
3506 * spu-low.c (spu_target_ops): Likewise.
3507 * win32-low.c (win32_target_ops): Likewise.
3508 * target.c (target_can_do_hardware_single_step): New function.
3509 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3510 Remove. <supports_hardware_single_step>: New field.
3511 (target_supports_conditional_breakpoints): Remove.
3512 (target_supports_hardware_single_step): New macro.
3513 (target_can_do_hardware_single_step): Declare.
3514 * server.c (handle_query): Use target_supports_hardware_single_step
3515 instead of target_supports_conditional_breakpoints.
3516
ade90bde
YQ
35172015-09-15 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3520 function.
3521 (struct linux_target_ops the_low_target): Install
3522 aarch64_linux_siginfo_fixup.
3523
94585166
DB
35242015-09-11 Don Breazeal <donb@codesourcery.com>
3525 Luis Machado <lgustavo@codesourcery.com>
3526
3527 * linux-low.c (linux_mourn): Static declaration.
3528 (linux_arch_setup): Move in front of
3529 handle_extended_wait.
3530 (linux_arch_setup_thread): New function.
3531 (handle_extended_wait): Handle exec events. Call
3532 linux_arch_setup_thread. Make event_lwp argument a
3533 pointer-to-a-pointer.
3534 (check_zombie_leaders): Do not check stopped threads.
3535 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3536 (linux_low_filter_event): Add lwp and thread for exec'ing
3537 non-leader thread if leader thread has been deleted.
3538 Refactor code into linux_arch_setup_thread and call it.
3539 Pass child lwp pointer by reference to handle_extended_wait.
3540 (linux_wait_for_event_filtered): Update comment.
3541 (linux_wait_1): Prevent clobbering exec event status.
3542 (linux_supports_exec_events): New function.
3543 (linux_target_ops) <supports_exec_events>: Initialize new member.
3544 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3545 new member.
3546 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3547 * server.c (report_exec_events): New global variable.
3548 (handle_query): Handle qSupported query for exec-events feature.
3549 (captured_main): Initialize report_exec_events.
3550 * server.h (report_exec_events): Declare new global variable.
3551 * target.h (struct target_ops) <supports_exec_events>: New
3552 member.
3553 (target_supports_exec_events): New macro.
3554 * win32-low.c (win32_target_ops) <supports_exec_events>:
3555 Initialize new member.
3556
0568462b
MM
35572015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3558
3559 * linux-low.c (linux_low_enable_btrace): Remove.
3560 (linux_target_ops): Replace linux_low_enable_btrace with
3561 linux_enable_btrace.
3562
39edd165
YQ
35632015-09-03 Yao Qi <yao.qi@linaro.org>
3564
3565 * linux-aarch64-low.c (aarch64_insert_point): Call
3566 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3567 returns true.
3568
1db33b5a
UW
35692015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3570
3571 * linux-low.c (check_stopped_by_breakpoint): Use
3572 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3573
ab290430
PA
35742015-08-27 Pedro Alves <palves@redhat.com>
3575
3576 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3577
8d749320
SM
35782015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3579
6711b7f8
SM
3580 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3581 the XNEW-family equivalent.
8d749320
SM
3582 (compile_bytecodes): Likewise.
3583 * dll.c (loaded_dll): Likewise.
3584 * event-loop.c (append_callback_event): Likewise.
3585 (create_file_handler): Likewise.
3586 (create_file_event): Likewise.
3587 * hostio.c (handle_open): Likewise.
3588 * inferiors.c (add_thread): Likewise.
3589 (add_process): Likewise.
3590 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3591 * linux-arm-low.c (arm_new_process): Likewise.
3592 (arm_new_thread): Likewise.
3593 * linux-low.c (add_to_pid_list): Likewise.
3594 (linux_add_process): Likewise.
3595 (handle_extended_wait): Likewise.
3596 (add_lwp): Likewise.
3597 (enqueue_one_deferred_signal): Likewise.
3598 (enqueue_pending_signal): Likewise.
3599 (linux_resume_one_lwp_throw): Likewise.
3600 (linux_resume_one_thread): Likewise.
3601 (linux_read_memory): Likewise.
3602 (linux_write_memory): Likewise.
3603 * linux-mips-low.c (mips_linux_new_process): Likewise.
3604 (mips_linux_new_thread): Likewise.
3605 (mips_add_watchpoint): Likewise.
3606 * linux-x86-low.c (initialize_low_arch): Likewise.
3607 * lynx-low.c (lynx_add_process): Likewise.
3608 * mem-break.c (set_raw_breakpoint_at): Likewise.
3609 (set_breakpoint): Likewise.
3610 (add_condition_to_breakpoint): Likewise.
3611 (add_commands_to_breakpoint): Likewise.
3612 (clone_agent_expr): Likewise.
3613 (clone_one_breakpoint): Likewise.
3614 * regcache.c (new_register_cache): Likewise.
3615 * remote-utils.c (look_up_one_symbol): Likewise.
3616 * server.c (queue_stop_reply): Likewise.
3617 (start_inferior): Likewise.
3618 (queue_stop_reply_callback): Likewise.
3619 (handle_target_event): Likewise.
3620 * spu-low.c (fetch_ppc_memory): Likewise.
3621 (store_ppc_memory): Likewise.
3622 * target.c (set_target_ops): Likewise.
3623 * thread-db.c (thread_db_load_search): Likewise.
3624 (try_thread_db_load_1): Likewise.
3625 * tracepoint.c (add_tracepoint): Likewise.
3626 (add_tracepoint_action): Likewise.
3627 (create_trace_state_variable): Likewise.
3628 (cmd_qtdpsrc): Likewise.
3629 (cmd_qtro): Likewise.
3630 (add_while_stepping_state): Likewise.
3631 * win32-low.c (child_add_thread): Likewise.
3632 (get_image_name): Likewise.
3633
ed8b7b42
YQ
36342015-08-25 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3637
db3cb7cb
YQ
36382015-08-25 Yao Qi <yao.qi@linaro.org>
3639
3640 * Makefile.in (aarch64-linux.o): New rule.
3641 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3642 srv_tgtobj.
3643 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3644 (aarch64_init_debug_reg_state): Make it extern.
3645 (aarch64_linux_prepare_to_resume): Remove.
3646
f6011a1c
YQ
36472015-08-25 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3650 lwp_arch_private_info and ptid_of_lwp.
3651
88e2cf7e
YQ
36522015-08-25 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3655 Find proc_info by find_process_pid. All callers updated.
3656
5e35436e
YQ
36572015-08-25 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3660 Remove.
3661 (debug_reg_change_callback): Remove.
3662 (aarch64_notify_debug_reg_change): Remove.
3663
4a8a7965
YQ
36642015-08-25 Yao Qi <yao.qi@linaro.org>
3665
3666 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3667 Call current_lwp_ptid.
3668
32a271ee
YQ
36692015-08-25 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch64-low.c (debug_reg_change_callback): Use
3672 debug_printf.
3673
0d51c8d7
YQ
36742015-08-25 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3677
31a43dd5
YQ
36782015-08-25 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3681
8ee52567
YQ
36822015-08-25 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3685 the code.
3686
ff3f0f45
YQ
36872015-08-25 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3690 Remove.
3691 (debug_reg_change_callback): Remove argument entry and add argument
3692 lwp. Remove local variable thread. Don't print thread id in the
3693 debugging output. Don't check whether pid of thread equals to pid.
3694 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3695 iterate_over_lwps instead find_inferior.
3696
3d40fbb5
PA
36972015-08-24 Pedro Alves <palves@redhat.com>
3698
3699 * inferiors.c (get_first_process): New function.
3700 * inferiors.h (get_first_process): New declaration.
3701 * remote-utils.c (read_ptid): Default to the first process in the
3702 list, instead of to the current thread's process.
3703
438e1e42
PA
37042015-08-24 Pedro Alves <palves@redhat.com>
3705
3706 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3707 * event-loop.c: Likewise.
3708 * remote-utils.c: Likewise.
3709 * tracepoint.c: Likewise.
3710
a8c6d4fc
PA
37112015-08-24 Pedro Alves <palves@redhat.com>
3712
3713 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3714 ptid_get_lwp.
3715
99b0bb12
PA
37162015-08-21 Pedro Alves <palves@redhat.com>
3717
3718 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3719 instead of literal 1.
3720
f8904751
PA
37212015-08-21 Pedro Alves <palves@redhat.com>
3722
3723 * tdesc.c (default_description): Explicitly zero-initialize.
3724
465a859e
PA
37252015-08-21 Pedro Alves <palves@redhat.com>
3726
3727 PR gdb/18749
3728 * inferiors.c (remove_thread): Discard any pending stop reply for
3729 this thread.
3730 * server.c (remove_all_on_match_pid): Rename to ...
3731 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3732 instead of a pid.
3733 (discard_queued_stop_replies): Change parameter to a ptid. Now
3734 extern.
3735 (handle_v_kill, kill_inferior_callback, captured_main)
3736 (process_serial_event): Adjust.
3737 * server.h (discard_queued_stop_replies): Declare.
3738
f0db101d
PA
37392015-08-21 Pedro Alves <palves@redhat.com>
3740
3741 * linux-low.c (wait_for_sigstop): Always switch to no thread
3742 selected if the previously current thread dies.
3743 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3744 process instead of the current thread's.
3745 * remote-utils.c (input_interrupt): Don't check if there's no
3746 current thread.
3747 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3748 current thread to the general thread fails, error out.
3749 (handle_qxfer_auxv, handle_qxfer_libraries)
3750 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3751 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3752 (handle_query): Check if there's a thread selected instead of
3753 checking whether there's any thread in the thread list.
3754 (handle_qxfer_threads, handle_qxfer_btrace)
3755 (handle_qxfer_btrace_conf): Don't error out early if there's no
3756 thread in the thread list.
3757 (handle_v_cont, myresume): Don't set the current thread to the
3758 continue thread.
3759 (process_serial_event) <Hg handling>: Also set thread_id if the
3760 previous general thread is still alive.
3761 (process_serial_event) <g/G handling>: If setting the current
3762 thread to the general thread fails, error out.
3763 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3764 thread's lwp instead of the current thread's.
3765 * target.c (set_desired_thread): If the desired thread was not
3766 found, leave the current thread pointing to NULL. Return an int
3767 (boolean) indicating success.
3768 * target.h (set_desired_thread): Change return type to int.
3769
40045d91
MF
37702015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3771
3772 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3773 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3774 #includes.
3775 (ps_get_thread_area): New function.
3776
45face3b
GB
37772015-08-19 Gary Benson <gbenson@redhat.com>
3778
3779 * hostio.c (handle_pread): Do not attempt to read more data
3780 than hostio_reply_with_data can fit in a packet.
3781
16d5f642
JB
37822015-08-18 Joel Brobecker <brobecker@adacore.com>
3783
3784 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3785
a738da3a
MF
37862015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3787
3788 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3789
33ebda9d
PA
37902015-08-06 Pedro Alves <palves@redhat.com>
3791
3792 * tracepoint.c (expr_eval_result): Now an int.
3793
a44892be
PA
37942015-08-06 Pedro Alves <palves@redhat.com>
3795
3796 * gdbthread.h (struct regcache): Forward declare.
3797 (struct thread_info) <regcache_data>: Now a struct regcache
3798 pointer.
3799 * inferiors.c (inferior_regcache_data)
3800 (set_inferior_regcache_data): Now work with struct regcache
3801 pointers.
3802 * inferiors.h (struct regcache): Forward declare.
3803 (inferior_regcache_data, set_inferior_regcache_data): Now work
3804 with struct regcache pointers.
3805 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3806 (free_register_cache_thread): Remove struct regcache pointer
3807 casts.
3808
608a1e46
PA
38092015-08-06 Pedro Alves <palves@redhat.com>
3810
3811 * server.c (captured_main): On error, print the exception message
3812 to stderr, and if run_once is set, throw a quit.
3813
f0ce0d3a
PA
38142015-08-06 Pedro Alves <palves@redhat.com>
3815
3816 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3817 the current thread.
3818
bf47e248
PA
38192015-08-06 Pedro Alves <palves@redhat.com>
3820
3821 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3822 reading beyond the passed in buffer length.
3823
b6b9ffcc
PL
38242015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3825
3826 * tracepoint.c (symbol_list) <required>: Remove.
3827
863d01bd
PA
38282015-08-06 Pedro Alves <palves@redhat.com>
3829
3830 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3831 count if stopping and suspending threads.
3832 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3833 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3834 (linux_detach): Complete an ongoing step-over.
3835 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3836 throughout.
3837 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3838 (linux_wait_1): If passing a signal to the inferior after
3839 finishing a step-over, unsuspend and re-resume all lwps. If we
3840 see a single-step event but the thread should be continuing, don't
3841 pass the trap to gdb.
3842 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3843 internal_error instead of gdb_assert.
3844 (enqueue_pending_signal): New function.
3845 (check_ptrace_stopped_lwp_gone): Add debug output.
3846 (start_step_over): Use internal_error instead of gdb_assert.
3847 (complete_ongoing_step_over): New function.
3848 (linux_resume_one_thread): Don't resume a suspended thread.
3849 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3850 it stepping.
3851
00db26fa
PA
38522015-08-06 Pedro Alves <palves@redhat.com>
3853
3854 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3855 (linux_thread_alive): Use lwp_is_marked_dead.
3856 (extended_event_reported): Delete.
3857 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3858 instead of extended_event_reported.
3859 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3860 as well.
3861 (lwp_is_marked_dead): New function.
3862 (lwp_running): Use lwp_is_marked_dead.
3863 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3864 comment.
3865
ad071a30
PA
38662015-08-06 Pedro Alves <palves@redhat.com>
3867
3868 * linux-low.c (linux_wait_1): Move fork event output out of the
3869 !report_to_gdb check. Pass event_child->waitstatus to
3870 target_waitstatus_to_string instead of ourstatus.
3871
524b57e6
YQ
38722015-08-04 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3875 if current_thread is 32 bit.
3876
6085d6f6
YQ
38772015-08-04 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3880 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3881 * server.c (extended_protocol): Remove "static".
3882 * server.h (extended_protocol): Declare it.
3883
8a7e4587
YQ
38842015-08-04 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3887 both aarch64 and aarch32.
3888 (aarch64_set_pc): Likewise.
3889
3b53ae99
YQ
38902015-08-04 Yao Qi <yao.qi@linaro.org>
3891
3892 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3893 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3894 arm-with-neon.xml to srv_xmlfiles.
3895 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3896 (is_64bit_tdesc): New function.
3897 (aarch64_linux_read_description): New function.
3898 (aarch64_arch_setup): Call aarch64_linux_read_description.
3899 (regs_info): Rename to regs_info_aarch64.
3900 (aarch64_regs_info): Return right regs_info.
3901 (initialize_low_arch): Call initialize_low_arch_aarch32.
3902
bd9e6534
YQ
39032015-08-04 Yao Qi <yao.qi@linaro.org>
3904
3905 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3906 * linux-aarch32-low.c: New file.
3907 * linux-aarch32-low.h: New file.
3908 * linux-arm-low.c (arm_fill_gregset): Move it to
3909 linux-aarch32-low.c.
3910 (arm_store_gregset): Likewise.
3911 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3912 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3913 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3914 (regs_info): Rename to regs_info_arm.
3915 (arm_regs_info): Return regs_info_aarch32 if
3916 have_ptrace_getregset is 1 and target description is
3917 arm_with_neon or arm_with_vfpv3.
3918 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3919 Call initialize_low_arch_aarch32 instead.
3920
ded48a5e
YQ
39212015-08-04 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3924 * linux-low.c: ... here.
3925 * linux-low.h (have_ptrace_getregset): Declare it.
3926
96e9210f
PA
39272015-08-04 Pedro Alves <palves@redhat.com>
3928
3929 * thread-db.c (struct thread_db): Use new typedefs.
3930 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3931 CHK calls.
3932 (disable_thread_event_reporting): Cast result of dlsym to
3933 destination function pointer type.
3934 (thread_db_mourn): Use td_ta_delete_ftype.
3935
af60a1ef
SL
39362015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3937
3938 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3939 arch variant.
3940 (CDX_BREAKPOINT): Define for R2.
3941 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3942 (the_low_target): Add comments.
3943
e8b41681
YQ
39442015-07-30 Yao Qi <yao.qi@linaro.org>
3945
3946 * linux-arm-low.c (arm_hwcap): Remove it.
3947 (arm_read_description): New local variable arm_hwcap. Don't
3948 set arm_hwcap to zero.
3949
89abb039
YQ
39502015-07-30 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3953 Use regcache->tdesc instead.
3954 (arm_store_wmmxregset): Likewise.
3955 (arm_fill_vfpregset): Likewise.
3956 (arm_store_vfpregset): Likewise.
3957
deca266c
YQ
39582015-07-30 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-arm-low.c: Include arch/arm.h.
3961 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3962 (arm_store_gregset): Likewise.
3963
aa58a496
SM
39642015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3967 ptrace's 4th parameter.
3968
50904b25
YQ
39692015-07-27 Yao Qi <yao.qi@linaro.org>
3970
3971 * configure.srv (case aarch64*-*-linux*): Don't set
3972 srv_linux_usrregs.
3973
5826e159
PA
39742015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3975
3976 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3977 sys/ptrace.h.
3978 * linux-arm-low.c: Likewise.
3979 * linux-cris-low.c: Likewise.
3980 * linux-crisv32-low.c: Likewise.
3981 * linux-low.c: Likewise.
3982 * linux-m68k-low.c: Likewise.
3983 * linux-mips-low.c: Likewise.
3984 * linux-nios2-low.c: Likewise.
3985 * linux-s390-low.c: Likewise.
3986 * linux-sparc-low.c: Likewise.
3987 * linux-tic6x-low.c: Likewise.
3988 * linux-tile-low.c: Likewise.
3989 * linux-x86-low.c: Likewise.
3990
54019719
PA
39912015-07-24 Pedro Alves <palves@redhat.com>
3992
3993 * config.in: Regenerate.
3994 * configure: Regenerate.
3995
eb7aa561
PA
39962015-07-24 Pedro Alves <palves@redhat.com>
3997
3998 * acinclude.m4: Include ../ptrace.m4.
3999 * configure.ac: Call GDB_AC_PTRACE.
4000 * config.in, configure: Regenerate.
4001
55d7b841
YQ
40022015-07-24 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-low.c (linux_create_inferior): Remove setting to
4005 proc->priv->new_inferior.
4006 (linux_attach): Likewise.
4007 (linux_low_filter_event): Likewise.
4008 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4009
c06cbd92
YQ
40102015-07-24 Yao Qi <yao.qi@linaro.org>
4011
4012 * linux-low.c (linux_arch_setup): New function.
4013 (linux_low_filter_event): If proc->tdesc is NULL and
4014 proc->attached is true, call the_low_target.arch_setup.
4015 Otherwise, keep status pending, and return.
4016 (linux_resume_one_lwp_throw): Don't call get_pc if
4017 thread->while_stepping isn't NULL. Don't call
4018 get_thread_regcache if proc->tdesc is NULL.
4019 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4020 (linux_target_ops): Install arch_setup.
4021 * server.c (start_inferior): Call the_target->arch_setup.
4022 * target.h (struct target_ops) <arch_setup>: New field.
4023 (target_arch_setup): New marco.
4024 * lynx-low.c (lynx_target_ops): Update.
4025 * nto-low.c (nto_target_ops): Update.
4026 * spu-low.c (spu_target_ops): Update.
4027 * win32-low.c (win32_target_ops): Update.
4028
5ae3ebba
YQ
40292015-07-24 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-low.c (linux_add_process): Don't set
4032 proc->priv->new_inferior.
4033 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4034 (linux_attach): Likewise.
4035
eb97750b
YQ
40362015-07-24 Yao Qi <yao.qi@linaro.org>
4037
4038 * server.c (start_inferior): Code refactor.
4039
51aee833
YQ
40402015-07-24 Yao Qi <yao.qi@linaro.org>
4041
4042 * server.c (process_serial_event): Set general_thread.
4043
af1b22f3
YQ
40442015-07-21 Yao Qi <yao.qi@linaro.org>
4045
4046 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4047 aarch64_linux_get_debug_reg_capacity.
4048
554717a3
YQ
40492015-07-17 Yao Qi <yao.qi@linaro.org>
4050
4051 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4052 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4053 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4054 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4055 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4056 (AARCH64_HWP_ALIGNMENT): Likewise.
4057 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4058 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4059 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4060 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4061 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4062 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4063 (struct aarch64_debug_reg_state): Likewise.
4064 (struct arch_lwp_info): Likewise.
4065 (aarch64_align_watchpoint): Likewise.
4066 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4067 (aarch64_watchpoint_length): Likewise.
4068 (aarch64_point_encode_ctrl_reg): Likewise
4069 (aarch64_point_is_aligned): Likewise.
4070 (aarch64_align_watchpoint): Likewise.
4071 (aarch64_linux_set_debug_regs):
4072 (aarch64_dr_state_insert_one_point): Likewise.
4073 (aarch64_dr_state_remove_one_point): Likewise.
4074 (aarch64_handle_breakpoint): Likewise.
4075 (aarch64_handle_aligned_watchpoint): Likewise.
4076 (aarch64_handle_unaligned_watchpoint): Likewise.
4077 (aarch64_handle_watchpoint): Likewise.
4078
c67ca4de
YQ
40792015-07-17 Yao Qi <yao.qi@linaro.org>
4080
4081 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4082 and don't aarch64_get_debug_reg_state. All callers update.
4083 (aarch64_handle_aligned_watchpoint): Likewise.
4084 (aarch64_handle_unaligned_watchpoint): Likewise.
4085 (aarch64_handle_watchpoint): Likewise.
4086 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4087 (aarch64_remove_point): Likewise.
4088
25abf979
YQ
40892015-07-17 Yao Qi <yao.qi@linaro.org>
4090
4091 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4092 debug_printf.
4093 (aarch64_handle_unaligned_watchpoint): Likewise.
4094
db1ff28b
JK
40952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4096
4097 Revert the previous 3 commits:
4098 Move gdb_regex* to common/
4099 Move linux_find_memory_regions_full & co.
4100 gdbserver build-id attribute generator
4101
700ca40f
JK
41022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4103 Jan Kratochvil <jan.kratochvil@redhat.com>
4104
4105 gdbserver build-id attribute generator.
4106 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4107 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4108 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4109 (find_phdr): New.
4110 (get_dynamic): Use find_pdhr to traverse program headers.
4111 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4112 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4113 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4114 (get_hex_build_id): New.
4115 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4116 to reply XML document.
4117
9904185c
JK
41182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4119 Jan Kratochvil <jan.kratochvil@redhat.com>
4120
4121 * target.c: Include target/target-utils.h and fcntl.h.
4122 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4123 (target_fileio_read_stralloc): New functions.
4124
6e5b4429
JK
41252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4126
4127 * Makefile.in (OBS): Add gdb_regex.o.
4128 (gdb_regex.o): New.
4129 * config.in: Rebuilt.
4130 * configure: Rebuilt.
4131
ddc98fbf
JK
41322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4133 Jan Kratochvil <jan.kratochvil@redhat.com>
4134
4135 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4136 * Makefile.in (OBS): Add target-utils.o.
4137 (linux-maps.o, target-utils.o): New.
4138 * configure.srv (srv_linux_obj): Add linux-maps.o.
4139
e57bb7a0
PL
41402015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4141
4142 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4143 function, return 1.
4144 (the_low_target): Install it.
4145
586b02a9
PA
41462015-07-14 Pedro Alves <palves@redhat.com>
4147
4148 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4149 Instead, ignore ECHILD, and throw an error for other errnos.
4150
58c1b36c
PA
41512015-07-10 Pedro Alves <palves@redhat.com>
4152
4153 * event-loop.c (struct callback_event) <data>: Change type to
4154 gdb_client_data instance instead of gdb_client_data pointer.
4155 (append_callback_event): Adjust.
4156
421530db
PL
41572015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4158
4159 * linux-aarch64-low.c: Add comments for each linux_target_ops
4160 method. Remove comments already covered in target_ops and
4161 linux_target_ops definitions.
4162 (the_low_target): Add comments for each unimplemented method.
4163
c2d65f38
YQ
41642015-07-09 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-aarch64-low.c (aarch64_regmap): Remove.
4167 (aarch64_usrregs_info): Remove.
4168 (regs_info): Set field usrregs to NULL.
4169
b20a6524
MM
41702015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4171
4172 * linux-low.c: Include "rsp-low.h"
4173 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4174 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4175 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4176 (handle_btrace_enable_pt): New.
4177 (handle_btrace_general_set): Support "pt".
4178 (handle_btrace_conf_general_set): Support "pt:size".
4179
96c97461
PL
41802015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4181
4182 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4183 Z_PACKET_SW_BP.
4184
37d66942
PL
41852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4186
4187 * linux-aarch64-low.c: Remove comment about endianness.
4188 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4189 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4190 memcmp.
4191
dc06243f
GB
41922015-06-24 Gary Benson <gbenson@redhat.com>
4193
4194 * linux-i386-ipa.c (stdint.h): Do not include.
4195 * lynx-i386-low.c (stdint.h): Likewise.
4196 * lynx-ppc-low.c (stdint.h): Likewise.
4197 * mem-break.c (stdint.h): Likewise.
4198 * thread-db.c (stdint.h): Likewise.
4199 * tracepoint.c (stdint.h): Likewise.
4200 * win32-low.c (stdint.h): Likewise.
4201
124e13d9
SM
42022015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4203
4204 * server.c (write_qxfer_response): Update call to
4205 remote_escape_output.
4206
909c2cda
JK
42072015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4208 Jan Kratochvil <jan.kratochvil@redhat.com>
4209
4210 Merge multiple hex conversions.
4211 * gdbreplay.c (tohex): Rename to 'fromhex'.
4212 (logchar): Use fromhex.
4213
24c05f46
JK
42142015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4215
4216 * server.c (handle_qxfer_libraries): Set `version' attribute for
4217 <library-list>.
4218
14d2069a
GB
42192015-06-10 Gary Benson <gbenson@redhat.com>
4220
4221 * target.h (struct target_ops) <multifs_open>: New field.
4222 <multifs_unlink>: Likewise.
4223 <multifs_readlink>: Likewise.
4224 * linux-low.c (nat/linux-namespaces.h): New include.
4225 (linux_target_ops): Initialize the_target->multifs_open,
4226 the_target->multifs_unlink and the_target->multifs_readlink.
4227 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4228 * hostio.c (hostio_fs_pid): New static variable.
4229 (hostio_handle_new_gdb_connection): New function.
4230 (handle_setfs): Likewise.
4231 (handle_open): Use the_target->multifs_open as appropriate.
4232 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4233 (handle_readlink): Use the_target->multifs_readlink as
4234 appropriate.
4235 (handle_vFile): Handle vFile:setfs packets.
4236 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4237 after target_handle_new_gdb_connection.
4238
4b8b5e72
GB
42392015-06-10 Gary Benson <gbenson@redhat.com>
4240
4241 * configure.ac (AC_CHECK_FUNCS): Add setns.
4242 * config.in: Regenerate.
4243 * configure: Likewise.
4244 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4245 (linux-namespaces.o): New rule.
4246 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4247
3ac2e371
GB
42482015-06-09 Gary Benson <gbenson@redhat.com>
4249
4250 * hostio.c (handle_open): Process mode argument with
4251 fileio_to_host_mode.
4252
ca9b78ce
YQ
42532015-06-01 Yao Qi <yao.qi@linaro.org>
4254
4255 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4256 * linux-x86-low.c: Likewise.
4257
bfacd19d
DB
42582015-05-28 Don Breazeal <donb@codesourcery.com>
4259
4260 * linux-low.c (handle_extended_wait): Initialize
4261 thread_info.last_resume_kind for new fork children.
4262
452003ef
PA
42632015-05-15 Pedro Alves <palves@redhat.com>
4264
4265 * target.h (target_handle_new_gdb_connection): Rewrite using if
4266 wrapped in do/while.
4267
1041a03c
JB
42682015-05-14 Joel Brobecker <brobecker@adacore.com>
4269
4270 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4271 * configure, config.in: Regenerate.
4272 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4273 Declare typedef.
4274
c269dbdb
DB
42752015-05-12 Don Breazeal <donb@codesourcery.com>
4276
4277 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4278 PTRACE_EVENT_VFORK_DONE.
4279 (linux_low_ptrace_options, extended_event_reported): Add vfork
4280 events.
4281 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4282 and "vforkdone" for RSP 'T' Stop Reply Packet.
4283 * server.h (report_vfork_events): Declare
4284 global variable.
4285
3a8a0396
DB
42862015-05-12 Don Breazeal <donb@codesourcery.com>
4287
4288 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4289 (the_low_target) <new_fork>: Initialize new member.
4290 * linux-arm-low.c (arm_new_fork): New function.
4291 (the_low_target) <new_fork>: Initialize new member.
4292 * linux-low.c (handle_extended_wait): Call new target function
4293 new_fork.
4294 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4295 * linux-mips-low.c (mips_add_watchpoint): New function
4296 extracted from mips_insert_point.
4297 (the_low_target) <new_fork>: Initialize new member.
4298 (mips_linux_new_fork): New function.
4299 (mips_insert_point): Call mips_add_watchpoint.
4300 * linux-x86-low.c (x86_linux_new_fork): New function.
4301 (the_low_target) <new_fork>: Initialize new member.
4302
de0d863e
DB
43032015-05-12 Don Breazeal <donb@codesourcery.com>
4304
4305 * linux-low.c (handle_extended_wait): Implement return value,
4306 rename argument 'event_child' to 'event_lwp', handle
4307 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4308 (linux_low_ptrace_options): New function.
4309 (linux_low_filter_event): Call linux_low_ptrace_options,
4310 use different argument fo linux_enable_event_reporting,
4311 use return value from handle_extended_wait.
4312 (extended_event_reported): New function.
4313 (linux_wait_1): Call extended_event_reported and set
4314 status to report fork events.
4315 (linux_write_memory): Add pid to debug message.
4316 (reset_lwp_ptrace_options_callback): New function.
4317 (linux_handle_new_gdb_connection): New function.
4318 (linux_target_ops): Initialize new structure member.
4319 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4320 * lynx-low.c: Initialize new structure member.
4321 * remote-utils.c (prepare_resume_reply): Implement stop reason
4322 "fork" for "T" stop message.
4323 * server.c (handle_query): Call handle_new_gdb_connection.
4324 * server.h (report_fork_events): Declare global flag.
4325 * target.h (struct target_ops) <handle_new_gdb_connection>:
4326 New member.
4327 (target_handle_new_gdb_connection): New macro.
4328 * win32-low.c: Initialize new structure member.
4329
ddcbc397
DB
43302015-05-12 Don Breazeal <donb@codesourcery.com>
4331
4332 * mem-break.c (APPEND_TO_LIST): Define macro.
4333 (clone_agent_expr): New function.
4334 (clone_one_breakpoint): New function.
4335 (clone_all_breakpoints): New function.
4336 * mem-break.h: Declare new functions.
4337
89245bc0
DB
43382015-05-12 Don Breazeal <donb@codesourcery.com>
4339
4340 * linux-low.c (linux_supports_fork_events): New function.
4341 (linux_supports_vfork_events): New function.
4342 (linux_target_ops): Initialize new structure members.
4343 (initialize_low): Call linux_check_ptrace_features.
4344 * lynx-low.c (lynx_target_ops): Initialize new structure
4345 members.
4346 * server.c (report_fork_events, report_vfork_events):
4347 New global flags.
4348 (handle_query): Add new features to qSupported packet and
4349 response.
4350 (captured_main): Initialize new global variables.
4351 * target.h (struct target_ops) <supports_fork_events>:
4352 New member.
4353 <supports_vfork_events>: New member.
4354 (target_supports_fork_events): New macro.
4355 (target_supports_vfork_events): New macro.
4356 * win32-low.c (win32_target_ops): Initialize new structure
4357 members.
4358
835205d0
GB
43592015-05-12 Gary Benson <gbenson@redhat.com>
4360
4361 * server.c (handle_qxfer_exec_file): Use current process
4362 if annex is empty.
4363
21e94bd9
SL
43642015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4365
4366 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4367 Remove HAVE_PTRACE_GETREGS conditionals.
4368 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4369 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4370
45614f15
YQ
43712015-05-08 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-low.c (linux_supports_conditional_breakpoints): New
4374 function.
4375 (linux_target_ops): Install new target method.
4376 * lynx-low.c (lynx_target_ops): Install NULL hook for
4377 supports_conditional_breakpoints.
4378 * nto-low.c (nto_target_ops): Likewise.
4379 * spu-low.c (spu_target_ops): Likewise.
4380 * win32-low.c (win32_target_ops): Likewise.
4381 * server.c (handle_query): Check
4382 target_supports_conditional_breakpoints.
4383 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4384 New field.
4385 (target_supports_conditional_breakpoints): New macro.
4386
80ad801e
PA
43872015-05-06 Pedro Alves <palves@redhat.com>
4388
4389 PR server/18081
4390 * server.c (start_inferior): If the process exits, mourn it.
4391
819843c7
GB
43922015-04-21 Gary Benson <gbenson@redhat.com>
4393
4394 * hostio.c (fileio_open_flags_to_host): Factored out to
4395 fileio_to_host_openflags in common/fileio.c. Single use
4396 updated.
4397
a2d5a9d7
MF
43982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4399
4400 * linux-xtensa-low.c (xtensa_fill_gregset)
4401 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4402 XCHAL_HAVE_LOOP.
4403
deb44829
MF
44042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4405
4406 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4407 (regs_info): Replace usrregs pointer with NULL.
4408
e57f1de3
GB
44092015-04-17 Gary Benson <gbenson@redhat.com>
4410
4411 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4412 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4413 * server.c (handle_qxfer_exec_file): New function.
4414 (qxfer_packets): Add exec-file entry.
4415 (handle_query): Report qXfer:exec-file:read as supported packet.
4416
62828379
RN
44172015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4418
4419 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4420
b88bb450
GB
44212015-04-09 Gary Benson <gbenson@redhat.com>
4422
4423 * hostio-errno.c (errno_to_fileio_error): Remove function.
4424 Update caller to use remote_fileio_to_fio_error.
4425
c8f4bfdd
YQ
44262015-04-09 Yao Qi <yao.qi@linaro.org>
4427
4428 * linux-low.c (linux_insert_point): Call
4429 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4430 (linux_remove_point): Call remove_memory_breakpoint if type is
4431 raw_bkpt_type_sw.
4432 * linux-x86-low.c (x86_insert_point): Don't call
4433 insert_memory_breakpoint.
4434 (x86_remove_point): Don't call remove_memory_breakpoint.
4435
41f98f02
PA
44362015-04-01 Pedro Alves <palves@redhat.com>
4437 Cleber Rosa <crosa@redhat.com>
4438
4439 * server.c (gdbserver_usage): Reorganize and extend the usage
4440 message.
4441
2bf6fb9d
PA
44422015-03-24 Pedro Alves <palves@redhat.com>
4443
4444 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4445 output. Also dump TRAP_TRACE.
4446 (linux_low_filter_event): In debug output, distinguish a
4447 resume_stop SIGSTOP from a delayed SIGSTOP.
4448
369f6daa
GB
44492015-03-24 Gary Benson <gbenson@redhat.com>
4450
4451 * linux-x86-low.c (x86_linux_new_thread): Moved to
4452 nat/x86-linux.c.
4453 (x86_linux_prepare_to_resume): Likewise.
4454
8e5d4070
GB
44552015-03-24 Gary Benson <gbenson@redhat.com>
4456
4457 * Makefile.in (x86-linux-dregs.o): New rule.
4458 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4459 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4460 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4461 (x86_linux_dr_get): Likewise.
4462 (x86_linux_dr_set): Likewise.
4463 (update_debug_registers_callback): Likewise.
4464 (x86_linux_dr_set_addr): Likewise.
4465 (x86_linux_dr_get_addr): Likewise.
4466 (x86_linux_dr_set_control): Likewise.
4467 (x86_linux_dr_get_control): Likewise.
4468 (x86_linux_dr_get_status): Likewise.
4469 (x86_linux_update_debug_registers): Likewise.
4470
2b95d440
GB
44712015-03-24 Gary Benson <gbenson@redhat.com>
4472
4473 * linux-x86-low.c (x86_linux_update_debug_registers):
4474 New function, factored out from...
4475 (x86_linux_prepare_to_resume): ...this.
4476
14b0bc68
GB
44772015-03-24 Gary Benson <gbenson@redhat.com>
4478
4479 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4480 (x86_linux_dr_set): Likewise.
4481 (update_debug_registers_callback): Likewise.
4482 (x86_linux_dr_set_addr): Likewise.
4483 (x86_linux_dr_get_addr): Likewise.
4484 (x86_linux_dr_set_control): Likewise.
4485 (x86_linux_dr_get_control): Likewise.
4486 (x86_linux_dr_get_status): Likewise.
4487 (x86_linux_prepare_to_resume): Likewise.
4488
5dfe6ca8
GB
44892015-03-24 Gary Benson <gbenson@redhat.com>
4490
4491 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4492 Use perror_with_name. Pass string through gettext.
4493 (x86_linux_dr_set): Likewise.
4494
d33472ad
GB
44952015-03-24 Gary Benson <gbenson@redhat.com>
4496
4497 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4498 (x86_linux_dr_set_addr): ...this.
4499 (x86_dr_low_get_addr): Rename to...
4500 (x86_linux_dr_get_addr): ...this.
4501 (x86_dr_low_set_control): Rename to...
4502 (x86_linux_dr_set_control): ...this.
4503 (x86_dr_low_get_control): Rename to...
4504 (x86_linux_dr_get_control): ...this.
4505 (x86_dr_low_get_status): Rename to...
4506 (x86_linux_dr_get_status): ...this.
4507 (x86_dr_low): Update with new function names.
4508
4b134ca1
GB
45092015-03-24 Gary Benson <gbenson@redhat.com>
4510
4511 * Makefile.in (x86-linux.o): New rule.
4512 * configure.srv: Add x86-linux.o to relevant targets.
4513 * linux-low.c (lwp_set_arch_private_info): New function.
4514 (lwp_arch_private_info): Likewise.
4515 * linux-x86-low.c: Include nat/x86-linux.h.
4516 (arch_lwp_info): Removed structure.
4517 (update_debug_registers_callback):
4518 Use lwp_set_debug_registers_changed.
4519 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4520 and lwp_set_debug_registers_changed.
4521 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4522
34c703da
GB
45232015-03-24 Gary Benson <gbenson@redhat.com>
4524
4525 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4526 * linux-arm-low.c (arm_new_thread): Likewise.
4527 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4528 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4529 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4530 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4531
cff068da
GB
45322015-03-24 Gary Benson <gbenson@redhat.com>
4533
4534 * linux-low.c (ptid_of_lwp): New function.
4535 (lwp_is_stopped): Likewise.
4536 (lwp_stop_reason): Likewise.
4537 * linux-x86-low.c (update_debug_registers_callback):
4538 Use lwp_is_stopped.
4539 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4540 lwp_stop_reason.
4541
b2f7c7e8
GB
45422015-03-24 Gary Benson <gbenson@redhat.com>
4543
4544 * linux-low.h (linux_stop_lwp): Remove declaration.
4545
6d4ee8c6
GB
45462015-03-24 Gary Benson <gbenson@redhat.com>
4547
4548 * linux-low.h: Include nat/linux-nat.h.
4549 * linux-low.c (iterate_over_lwps_args): New structure.
4550 (iterate_over_lwps_filter): New function.
4551 (iterate_over_lwps): Likewise.
4552 * linux-x86-low.c (update_debug_registers_callback):
4553 Update signature to what iterate_over_lwps expects.
4554 Remove PID check that iterate_over_lwps now performs.
4555 (x86_dr_low_set_addr): Use iterate_over_lwps.
4556 (x86_dr_low_set_control): Likewise.
4557
70a0bb6b
GB
45582015-03-24 Gary Benson <gbenson@redhat.com>
4559
4560 * linux-x86-low.c (x86_debug_reg_state): New function.
4561 (x86_linux_prepare_to_resume): Use the above.
4562
7b669087
GB
45632015-03-24 Gary Benson <gbenson@redhat.com>
4564
4565 * linux-low.c (current_lwp_ptid): New function.
4566 * linux-x86-low.c: Include nat/linux-nat.h.
4567 (x86_dr_low_get_addr): Use current_lwp_ptid.
4568 (x86_dr_low_get_control): Likewise.
4569 (x86_dr_low_get_status): Likewise.
4570
eef49a3d
PA
45712015-03-20 Pedro Alves <palves@redhat.com>
4572
4573 * tracepoint.c (cmd_qtstatus): Make "str" const.
4574
b2333d22
PA
45752015-03-20 Pedro Alves <palves@redhat.com>
4576
4577 * server.c (handle_general_set): Make "req_str" const.
4578
23f238d3
PA
45792015-03-19 Pedro Alves <palves@redhat.com>
4580
4581 * linux-low.c (linux_resume_one_lwp): Rename to ...
4582 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4583 instead call perror_with_name.
4584 (check_ptrace_stopped_lwp_gone): New function.
4585 (linux_resume_one_lwp): Reimplement as wrapper around
4586 linux_resume_one_lwp_throw that swallows errors if the LWP is
4587 gone.
4588
91baf43f
PA
45892015-03-19 Pedro Alves <palves@redhat.com>
4590
4591 * linux-low.c (count_events_callback, select_event_lwp_callback):
4592 No longer check whether the thread has resume_stop as last resume
4593 kind.
4594
8bf3b159
PA
45952015-03-19 Pedro Alves <palves@redhat.com>
4596
4597 * linux-low.c (count_events_callback, select_event_lwp_callback):
4598 Use the lwp's status_pending_p field, not the thread's.
4599
b90fc188
PA
46002015-03-19 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (select_event_lwp_callback): Update comments to
4603 no longer mention SIGTRAP.
4604
464b0089
GB
46052015-03-18 Gary Benson <gbenson@redhat.com>
4606
4607 * server.c (handle_query): Do not report vFile:fstat as supported.
4608
aa9e327f
GB
46092015-03-11 Gary Benson <gbenson@redhat.com>
4610
4611 * hostio.c (sys/types.h): New include.
4612 (sys/stat.h): Likewise.
4613 (common-remote-fileio.h): Likewise.
4614 (handle_fstat): New function.
4615 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4616
791c0056
GB
46172015-03-11 Gary Benson <gbenson@redhat.com>
4618
4619 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4620 struct stat.st_blocks and struct stat.st_blksize.
4621 * configure: Regenerate.
4622 * config.in: Likewise.
4623 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4624 (OBS): Add common-remote-fileio.o.
4625 (common-remote-fileio.o): New rule.
4626
9a9df970
PA
46272015-03-09 Pedro Alves <palves@redhat.com>
4628
4629 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4630 'struct sockaddr' pointer in 'accept' call.
4631
9eb1356e
PA
46322015-03-09 Pedro Alves <palves@redhat.com>
4633
4634 Revert:
4635 2015-03-07 Pedro Alves <palves@redhat.com>
4636 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4637 or <winsock2.h> here. Instead include "gdb_socket.h".
4638 (remote_open): Use union gdb_sockaddr_u.
4639 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4640 or <winsock2.h> here. Instead include "gdb_socket.h".
4641 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4642 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4643 or <sys/un.h>.
4644 (init_named_socket, gdb_agent_helper_thread): Use union
4645 gdb_sockaddr_u.
4646
aac331e4
PA
46472015-03-07 Pedro Alves <palves@redhat.com>
4648
4649 * configure.ac (build_warnings): Move
4650 -Wdeclaration-after-statement to the C-specific set.
4651 * configure: Regenerate.
4652
366c75fc
PA
46532015-03-07 Pedro Alves <palves@redhat.com>
4654
4655 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4656 or <winsock2.h> here. Instead include "gdb_socket.h".
4657 (remote_open): Use union gdb_sockaddr_u.
4658 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4659 or <winsock2.h> here. Instead include "gdb_socket.h".
4660 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4661 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4662 or <sys/un.h>.
4663 (init_named_socket, gdb_agent_helper_thread): Use union
4664 gdb_sockaddr_u.
4665
492d29ea
PA
46662015-03-07 Pedro Alves <palves@redhat.com>
4667
4668 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4669 instead.
4670
60a191ed
YQ
46712015-03-06 Yao Qi <yao.qi@linaro.org>
4672
4673 * linux-aarch64-low.c (aarch64_insert_point): Use
4674 show_debug_regs as a boolean.
4675 (aarch64_remove_point): Likewise.
4676
f5771b1d
PA
46772015-03-05 Pedro Alves <palves@redhat.com>
4678
4679 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4680 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4681 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4682 * nto-low.c (nto_target_ops): Likewise.
4683 * spu-low.c (spu_target_ops): Likewise.
4684 * win32-low.c (win32_target_ops): Likewise.
4685
3e572f71
PA
46862015-03-04 Pedro Alves <palves@redhat.com>
4687
72f4393d 4688 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4689 Decide whether a breakpoint triggered based on the SIGTRAP's
4690 siginfo.si_code.
72f4393d
L
4691 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4692 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4693 (linux_low_filter_event): Check for breakpoints before checking
4694 watchpoints.
4695 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4696 siginfo.si_code.
72f4393d
L
4697 (linux_stopped_by_sw_breakpoint)
4698 (linux_supports_stopped_by_sw_breakpoint)
4699 (linux_stopped_by_hw_breakpoint)
4700 (linux_supports_stopped_by_hw_breakpoint): New functions.
4701 (linux_target_ops): Install new target methods.
3e572f71 4702
1ec68e26
PA
47032015-03-04 Pedro Alves <palves@redhat.com>
4704
4705 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4706 * server.c (swbreak_feature, hwbreak_feature): New globals.
4707 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4708 (captured_main): Clear swbreak_feature and hwbreak_feature.
4709 * server.h (swbreak_feature, hwbreak_feature): Declare.
4710 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4711 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4712 supports_stopped_by_hw_breakpoint>: New fields.
4713 (target_supports_stopped_by_sw_breakpoint)
4714 (target_stopped_by_sw_breakpoint)
4715 (target_supports_stopped_by_hw_breakpoint)
4716 (target_stopped_by_hw_breakpoint): Declare.
4717
15c66dd6
PA
47182015-03-04 Pedro Alves <palves@redhat.com>
4719
4720 enum lwp_stop_reason -> enum target_stop_reason
4721 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4722 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4723 (linux_wait_1, stuck_in_jump_pad_callback)
4724 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4725 (linux_stopped_by_watchpoint):
4726 * linux-low.h (enum lwp_stop_reason): Delete.
4727 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4728 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4729
98fc70d6
YQ
47302015-03-04 Yao Qi <yao.qi@linaro.org>
4731
4732 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4733
dd2ac174
GB
47342015-03-03 Gary Benson <gbenson@redhat.com>
4735
4736 * hostio.c (handle_vFile): Fix prefix lengths.
4737
d68e53f4
MM
47382015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4739
4740 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4741 ptr_bits.
4742
bf2d68ab
AA
47432015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4744
4745 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4746 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4747 (clean): Add "rm -f" for above C files.
4748 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4749 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4750 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4751 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4752 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4753 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4754 (init_registers_s390x_vx_linux64)
4755 (init_registers_s390x_tevx_linux64)
4756 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4757 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4758 declarations.
4759 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4760 (s390_store_vxrs_high): New functions.
4761 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4762 NT_S390_VXRS_HIGH.
4763 (s390_arch_setup): Add logic for selecting one of the new target
4764 descriptions. Activate the new vector regsets if applicable.
4765 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4766 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4767 and init_registers_s390x_tevx_linux64.
4768
c966a859
PA
47692015-03-01 Pedro Alves <palves@redhat.com>
4770
4771 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4772 parameter.
4773
4180215b
PA
47742015-02-27 Pedro Alves <palves@redhat.com>
4775
4776 * linux-x86-low.c (u_debugreg_offset): New function.
4777 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4778
749bab01
PA
47792015-02-27 Pedro Alves <palves@redhat.com>
4780
4781 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4782 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4783 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4784 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4785 (ps_lsetfpregs, ps_getpid)
4786 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4787 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4788 (ps_lsetxregs, ps_plog): Declare.
4789
3c14e5a3
PA
47902015-02-27 Pedro Alves <palves@redhat.com>
4791
4792 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4793 IP_AGENT_EXPORT_FUNC.
4794 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4795 IP_AGENT_EXPORT_FUNC.
4796 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4797 (IP_AGENT_EXPORT): Delete.
4798 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4799 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4800 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4801 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4802 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4803 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4804 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4805 (traceframe_read_count, traceframe_write_count)
4806 (traceframes_created, trace_state_variables, get_raw_reg)
4807 (get_trace_state_variable_value, set_trace_state_variable_value)
4808 (ust_loaded, helper_thread_id, cmd_buf): Use
4809 IPA_SYM_EXPORTED_NAME.
4810 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4811 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4812 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4813 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4814 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4815 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4816 EXTERN_C_PUSH/EXTERN_C_POP.
4817 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4818 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4819 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4820 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4821 (traceframe_write_count, traceframe_read_count)
4822 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4823 (about_to_request_buffer_space, get_trace_state_variable_value)
4824 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4825 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4826 EXTERN_C_PUSH/EXTERN_C_POP.
4827 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4828 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4829 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4830 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4831 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4832 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4833 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4834 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4835 Define.
4836 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4837 (IP_AGENT_EXPORT_VAR_DECL): Define.
4838 (tracing): Declare.
4839 (gdb_agent_get_raw_reg): Declare.
4840
fe978cb0
PA
48412015-02-27 Tom Tromey <tromey@redhat.com>
4842 Pedro Alves <palves@redhat.com>
4843
4844 Rename symbols whose names are reserved C++ keywords throughout.
4845
3bc3d82a
PA
48462015-02-27 Pedro Alves <palves@redhat.com>
4847
4848 * Makefile.in (COMPILER): New, get it from autoconf.
4849 (CXX): Get from autoconf instead.
4850 (COMPILE.pre): Use COMPILER.
4851 (CC-LD): Rename to ...
4852 (CC_LD): ... this. Use COMPILER.
4853 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4854 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4855 * acinclude.m4: Include build-with-cxx.m4.
4856 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4857 Disable -Werror by default if building in C++ mode.
4858 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4859 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4860 the C++ compiler. Save/restore CXXFLAGS too.
4861 * configure: Regenerate.
4862
07697489
PA
48632015-02-27 Pedro Alves <palves@redhat.com>
4864
4865 * acinclude.m4: Include libiberty.m4.
4866 * configure.ac: Call libiberty_INIT.
4867 * config.in, configure: Regenerate.
4868
9beb7c4e
PA
48692015-02-26 Pedro Alves <palves@redhat.com>
4870
4871 * linux-low.c (linux_wait_1): When incrementing the PC past a
4872 program breakpoint always use the_low_target.breakpoint_len as
4873 increment, rather than the maximum between that and
4874 the_low_target.decr_pc_after_break.
4875
8090aef2
PA
48762015-02-23 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4879 thread was doing a step-over; always adjust the PC if
4880 we stepped over a permanent breakpoint.
4881 (linux_wait_1): If we stepped over breakpoint that was on top of a
4882 permanent breakpoint, manually advance the PC past it.
4883
bc9540e8
PA
48842015-02-23 Pedro Alves <palves@redhat.com>
4885
4886 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4887 modes.
4888 (x86_fill_gregset, x86_store_gregset): Use it when handling
4889 $orig_eax.
4890
2db9a427
PA
48912015-02-20 Pedro Alves <palves@redhat.com>
4892
4893 * thread-db.c: Include "nat/linux-procfs.h".
4894 (thread_db_init): Skip listing new threads if the kernel supports
4895 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4896
afa8d396
PA
48972015-02-20 Pedro Alves <palves@redhat.com>
4898
4899 * linux-low.c (status_pending_p_callback): Use ptid_match.
4900
c9587f88
AT
49012015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4902
4903 PR breakpoints/16812
4904 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4905 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4906 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4907
b05ec7a5
AT
49082015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4909
4910 PR breakpoints/15956
4911 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4912
d33501a5
MM
49132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4914
4915 * linux-low.c (linux_low_btrace_conf): Print size.
4916 * server.c (handle_btrace_conf_general_set): New.
4917 (hanle_general_set): Call handle_btrace_conf_general_set.
4918 (handle_query): Report Qbtrace-conf:bts:size as supported.
4919
f4abbc16
MM
49202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4921
4922 * linux-low.c (linux_low_enable_btrace): Update parameters.
4923 (linux_low_btrace_conf): New.
4924 (linux_target_ops)<to_btrace_conf>: Initialize.
4925 * server.c (current_btrace_conf): New.
4926 (handle_btrace_enable): Rename to ...
4927 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4928 to target_enable_btrace. Update comment. Update users.
4929 (handle_qxfer_btrace_conf): New.
4930 (qxfer_packets): Add btrace-conf entry.
4931 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4932 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4933 (target_ops)<read_btrace_conf>: New.
4934 (target_enable_btrace): Update parameters.
4935 (target_read_btrace_conf): New.
4936
043c3577
MM
49372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4938
4939 * server.c (handle_btrace_general_set): Remove call to
4940 target_supports_btrace.
4941 (supported_btrace_packets): New.
4942 (handle_query): Call supported_btrace_packets.
4943 * target.h: include btrace-common.h.
4944 (btrace_target_info): Removed.
4945 (supports_btrace, target_supports_btrace): Update parameters.
4946
734b0e4b
MM
49472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4948
4949 * Makefile.in (SFILES): Add common/btrace-common.c.
4950 (OBS): Add common/btrace-common.o.
4951 (btrace-common.o): Add build rules.
4952 * linux-low: Include btrace-common.h.
4953 (linux_low_read_btrace): Use struct btrace_data. Call
4954 btrace_data_init and btrace_data_fini.
4955
d6c146e9
PA
49562015-02-06 Pedro Alves <palves@redhat.com>
4957
4958 * thread-db.c (find_new_threads_callback): Add debug output.
4959
20ba1ce6
PA
49602015-02-04 Pedro Alves <palves@redhat.com>
4961
4962 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4963 (resume_stopped_resumed_lwps): New function.
4964 (linux_wait_for_event_filtered): Use it.
4965
8cc73a39
SDJ
49662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4967
4968 * Makefile.in (SFILES): Add linux-personality.c.
4969 (linux-personality.o): New rule.
4970 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4971 list of objects to be built.
4972 * linux-low.c: Include nat/linux-personality.h.
4973 (linux_create_inferior): Remove code to disable address space
4974 randomization (moved to ../nat/linux-personality.c). Create
4975 cleanup to disable address space randomization.
4976
fb23d554
SDJ
49772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4978
4979 * Makefile.in (posix-strerror.o): New rule.
4980 (mingw-strerror.o): Likewise.
4981 * configure: Regenerated.
4982 * configure.ac: Source file ../common/common.host. Initialize new
4983 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4984
cdf43629
YQ
49852015-01-14 Yao Qi <yao@codesourcery.com>
4986
4987 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4988 (ppc-linux.o): New rule.
4989 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4990 * configure.ac: AC_CHECK_FUNCS(getauxval).
4991 * config.in: Re-generated.
4992 * configure: Re-generated.
4993 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4994 ppc64_64bit_inferior_p
4995
514c5338
YQ
49962015-01-14 Yao Qi <yao@codesourcery.com>
4997
4998 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4999 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5000 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5001 (PT_ORIG_R3, PT_TRAP): Likewise.
5002 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5003 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5004 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5005
3368c1e5
JB
50062015-01-10 Joel Brobecker <brobecker@adacore.com>
5007
5008 * i387-fp.c (i387_cache_to_xsave): In look over
5009 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5010 zmmh_low_space field by use of zmmh_high_space.
5011
582511be
PA
50122015-01-09 Pedro Alves <palves@redhat.com>
5013
5014 * linux-low.c (step_over_bkpt): Move higher up in the file.
5015 (handle_extended_wait): Don't store the stop_pc here.
5016 (get_stop_pc): Adjust comments and rename to ...
5017 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5018 stopped for a software breakpoint or hardware breakpoint.
5019 (thread_still_has_status_pending_p): New function.
5020 (status_pending_p_callback): Use
5021 thread_still_has_status_pending_p. If the event is no longer
5022 interesting, resume the LWP.
5023 (handle_tracepoints): Add assert.
5024 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5025 (wstatus_maybe_breakpoint): New function.
5026 (cancel_breakpoint): Delete function.
5027 (check_stopped_by_watchpoint): New function, factored out from
5028 linux_low_filter_event.
5029 (lp_status_maybe_breakpoint): Delete function.
5030 (linux_low_filter_event): Remove filter_ptid argument.
5031 Leave thread group exits pending here. Store the LWP's stop PC.
5032 Always leave events pending.
5033 (linux_wait_for_event_filtered): Pull all events out of the
5034 kernel, and leave them all pending.
5035 (count_events_callback, select_event_lwp_callback): Consider all
5036 events.
5037 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5038 (select_event_lwp): Only give preference to the stepping LWP in
5039 all-stop mode. Adjust comments.
5040 (ignore_event): New function.
5041 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5042 references to cancel_breakpoints. Adjust to renames. Also give
5043 equal priority to all LWPs that have had events in non-stop mode.
5044 If reporting a software breakpoint event, unadjust the LWP's PC.
5045 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5046 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5047 Adjust.
5048 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5049 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5050 (linux_stopped_by_watchpoint): Adjust.
5051 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5052 * linux-low.h (enum lwp_stop_reason): New.
5053 (struct lwp_info) <stop_pc>: Adjust comment.
5054 <stopped_by_watchpoint>: Delete field.
5055 <stop_reason>: New field.
5056 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5057 * mem-break.c (software_breakpoint_inserted_here)
5058 (hardware_breakpoint_inserted_here): New function.
5059 * mem-break.h (software_breakpoint_inserted_here)
5060 (hardware_breakpoint_inserted_here): Declare.
5061 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5062 (cancel_breakpoints): Delete.
5063 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5064 (upload_fast_traceframes): Remove references to
5065 cancel_breakpoints.
5066
a33e3959
PA
50672015-01-09 Pedro Alves <palves@redhat.com>
5068
5069 * thread-db.c (find_new_threads_callback): Ignore thread if the
5070 kernel thread ID is -1.
5071
8784d563
PA
50722015-01-09 Pedro Alves <palves@redhat.com>
5073
5074 * linux-low.c (linux_attach_fail_reason_string): Move to
5075 nat/linux-ptrace.c, and rename.
5076 (linux_attach_lwp): Update comment.
5077 (attach_proc_task_lwp_callback): New function.
5078 (linux_attach): Adjust to rename and use
5079 linux_proc_attach_tgid_threads.
5080 (linux_attach_fail_reason_string): Delete declaration.
5081
76f2b779
JB
50822015-01-01 Joel Brobecker <brobecker@adacore.com>
5083
5084 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5085 * server.c (gdbserver_version): Likewise.
5086
fafcc06a
SDJ
50872014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5088
5089 * remote-utils.c: Include ctype.h.
5090 (input_interrupt): Explicitly handle the case when the char
5091 received is the NUL byte. Improve the printing of non-ASCII
5092 characters.
5093
beed38b8
JB
50942014-12-16 Joel Brobecker <brobecker@adacore.com>
5095
5096 * linux-low.c (linux_low_filter_event): Update call to
5097 linux_enable_event_reporting following the addition of
5098 a new parameter to that function.
5099
bf330350
CU
51002014-12-16 Catalin Udma <catalin.udma@freescale.com>
5101
5102 PR server/17457
5103 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5104 (AARCH64_FPCR_REGNO): Likewise.
5105 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5106 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5107 (aarch64_store_fpregset): Likewise.
5108
5227d625
JB
51092014-12-15 Joel Brobecker <brobecker@adacore.com>
5110
5111 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5112 Remove FIXME comment about assumption about N.
5113
f93b65a0
JB
51142014-12-13 Joel Brobecker <brobecker@adacore.com>
5115
5116 * configure.ac: If large-file support is disabled in GDBserver,
5117 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5118 * configure: Regenerate.
5119
e5a9158d
AA
51202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5121
5122 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5123 warning upon ENODATA from ptrace.
5124 * linux-s390-low.c (s390_store_tdb): New.
5125 (s390_regsets): Add regset for NT_S390_TDB.
5126
feea5f36
AA
51272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5128
5129 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5130 without a fill_function.
5131 * linux-s390-low.c (s390_fill_last_break): Remove.
5132 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5133 (s390_arch_setup): Use regset's size instead of fill_function for
5134 loop end condition.
5135
098dbe61
AA
51362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5137
5138 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5139 the regset's store function when ptrace returned an error.
5140 * regcache.c (get_thread_regcache): Invalidate register cache
5141 before fetching inferior's registers.
5142
28eef672
AA
51432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5144
5145 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5146 while-loop as for-loop.
5147 (regsets_store_inferior_registers): Likewise.
5148
bdca27a2
YQ
51492014-11-28 Yao Qi <yao@codesourcery.com>
5150
5151 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5152 * config.in, configure: Re-generate.
5153 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5154 is defined.
5155
9c232dda
YQ
51562014-11-21 Yao Qi <yao@codesourcery.com>
5157
5158 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5159 (AC_CHECK_HEADERS): Remove malloc.h.
5160 * configure: Re-generated.
5161 * config.in: Re-generated.
5162 * server.h: Don't include alloca.h and malloc.h.
5163 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5164 Don't include malloc.h.
5165
43968415
JB
51662014-11-17 Joel Brobecker <brobecker@adacore.com>
5167
5168 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5169 corresponding ERRNO check in same block.
5170
40e91bc7
PA
51712014-11-12 Pedro Alves <palves@redhat.com>
5172
5173 * server.c (cont_thread): Update comment.
5174 (start_inferior, attach_inferior): No longer clear cont_thread.
5175 (handle_v_cont): No longer set cont_thread.
5176 (captured_main): Clear cont_thread each time a GDB connects.
5177
c2c118cf
PA
51782014-11-12 Pedro Alves <palves@redhat.com>
5179
5180 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5181 thread, and don't resume all threads if the Hc thread has exited.
5182
78708b7c
PA
51832014-11-12 Pedro Alves <palves@redhat.com>
5184
5185 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5186 the process group instead of to a specific LWP.
5187
a2abc7de
PA
51882014-10-15 Pedro Alves <palves@redhat.com>
5189
5190 PR server/17487
5191 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5192 parameter.
5193 (arm_set_thread_context): Delete.
5194 (the_low_target): Adjust.
5195 * win32-i386-low.c (debug_registers_changed)
5196 (debug_registers_used): Delete.
5197 (update_debug_registers_callback): New function.
5198 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5199 needing to update their debug registers.
5200 (win32_get_current_dr): New function.
5201 (x86_dr_low_get_addr, x86_dr_low_get_control)
5202 (x86_dr_low_get_status): Fetch the debug register from the thread
5203 record's context.
5204 (i386_initial_stuff): Adjust.
5205 (i386_get_thread_context): Remove current_event parameter. Don't
5206 clear debug_registers_changed nor copy DR values to
5207 debug_reg_state.
5208 (i386_set_thread_context): Delete.
5209 (i386_prepare_to_resume): New function.
5210 (i386_thread_added): Mark the thread as needing to update irs
5211 debug registers.
5212 (the_low_target): Remove i386_set_thread_context and install
5213 i386_prepare_to_resume.
5214 * win32-low.c (win32_get_thread_context): Adjust.
5215 (win32_set_thread_context): Use SetThreadContext
5216 directly.
5217 (win32_prepare_to_resume): New function.
5218 (win32_require_context): New function, factored out from ...
5219 (thread_rec): ... this.
5220 (continue_one_thread): Call win32_prepare_to_resume on each thread
5221 we're about to continue.
5222 (win32_resume): Call win32_prepare_to_resume on the event thread.
5223 * win32-low.h (struct win32_thread_info)
5224 <debug_registers_changed>: New field.
5225 (struct win32_target_ops): Change prototype of set_thread_context,
5226 delete set_thread_context and add prepare_to_resume.
5227 (win32_require_context): New declaration.
5228
a442d071
GB
52292014-10-08 Gary Benson <gbenson@redhat.com>
5230
5231 * server.h: Do not include common-exceptions.h.
5232
6f1947e8
GB
52332014-10-08 Gary Benson <gbenson@redhat.com>
5234
5235 * server.h: Do not include cleanups.h.
5236
63b434a4
JH
52372014-09-30 James Hogan <james.hogan@imgtec.com>
5238
5239 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5240 mips64-dsp-linux.c.
5241
c4d9ceb6
YQ
52422014-09-23 Yao Qi <yao@codesourcery.com>
5243
5244 * linux-low.c (lp_status_maybe_breakpoint): New function.
5245 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5246 (count_events_callback): Likewise.
5247 (select_event_lwp_callback): Likewise.
5248 (cancel_breakpoints_callback): Likewise.
5249
89a5711c
DB
52502014-09-19 Don Breazeal <donb@codesourcery.com>
5251
5252 * linux-low.c (handle_extended_wait): Call
5253 linux_ptrace_get_extended_event.
5254 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5255 linux_is_extended_waitstatus.
5256
bffc0964
JB
52572014-09-16 Joel Brobecker <brobecker@adacore.com>
5258
5259 * Makefile.in (CPPFLAGS): Define.
5260 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5261 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5262
0bfdf32f
GB
52632014-09-16 Gary Benson <gbenson@redhat.com>
5264
5265 * inferiors.h (current_inferior): Renamed as...
5266 (current_thread): New variable. All uses updated.
5267 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5268 (maybe_move_out_of_jump_pad): Likewise.
5269 (cancel_breakpoint): Likewise.
5270 (linux_low_filter_event): Likewise.
5271 (wait_for_sigstop): Likewise.
5272 (linux_resume_one_lwp): Likewise.
5273 (need_step_over_p): Likewise.
5274 (start_step_over): Likewise.
5275 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5276 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5277 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5278 and save_inferior as saved_thread.
5279 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5280 saved_thread.
5281 (regcache_invalidate_thread): Likewise.
5282 * remote-utils.c (prepare_resume_reply): Likewise.
5283 * thread-db.c (thread_db_get_tls_address): Likewise.
5284 (disable_thread_event_reporting): Likewise.
5285 (remove_thread_event_breakpoints): Likewise.
5286 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5287 as saved_thread.
5288 * target.h (set_desired_inferior): Renamed as...
5289 (set_desired_thread): New declaration. All uses updated.
5290 * server.c (myresume): Updated comment to reference thread instead
5291 of inferior.
5292 (handle_serial_event): Likewise.
5293 (handle_target_event): Likewise.
5294
361c8ade
GB
52952014-09-12 Tom Tromey <tromey@redhat.com>
5296 Gary Benson <gbenson@redhat.com>
5297
5298 * regcache.h: Include common-regcache.h.
5299 (regcache_read_pc): Don't declare.
5300 * regcache.c (get_thread_regcache_for_ptid): New function.
5301
bd9269f7
GB
53022014-09-11 Tom Tromey <tromey@redhat.com>
5303 Gary Benson <gbenson@redhat.com>
5304
5305 * symbol.c: New file.
5306 * Makefile.in (SFILES): Add symbol.c.
5307 (OBS): Add symbol.o.
5308
f8c1d06b
GB
53092014-09-11 Gary Benson <gbenson@redhat.com>
5310
5311 * target.c (target_stop_ptid, target_continue_ptid): New
5312 functions.
5313
721ec300
GB
53142014-09-11 Tom Tromey <tromey@redhat.com>
5315 Gary Benson <gbenson@redhat.com>
5316
5317 * target.h: Include target/target.h.
5318 * target.c (target_read_memory, target_read_uint32)
5319 (target_write_memory): New functions.
5320
c5e92cca
GB
53212014-09-11 Gary Benson <gbenson@redhat.com>
5322
5323 * server.h (debug_hw_points): Don't declare.
5324 * server.c (debug_hw_points): Don't define. Replace all uses
5325 with show_debug_regs.
5326 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5327 all uses with show_debug_regs.
5328
2e4bb98a
EBM
53292014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5330
5331 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5332 endianness into account.
5333 (ppc_supply_ptrace_register): Likewise.
5334
ac740bc7
JH
53352014-09-03 James Hogan <james.hogan@imgtec.com>
5336
5337 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5338 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5339
97ea6506
GB
53402014-09-03 Gary Benson <gbenson@redhat.com>
5341
5342 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5343 ALL_DEBUG_ADDRESS_REGISTERS.
5344
df7e5265
GB
53452014-09-02 Gary Benson <gbenson@redhat.com>
5346
5347 * i386-low.h: Renamed as...
5348 * x86-low.h: New file. All type, function and variable name
5349 prefixes changed from "i386_" to "x86_". All references updated.
5350 * i386-low.c: Renamed as...
5351 * x86-low.c: New file. All type, function and variable name
5352 prefixes changed from "i386_" to "x86_". All references updated.
5353
ed859da7
GB
53542014-09-02 Gary Benson <gbenson@redhat.com>
5355
5356 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5357 (x86_linux_new_thread): Likewise.
5358
860789c7
GB
53592014-08-29 Gary Benson <gbenson@redhat.com>
5360
5361 * server.h (setjmp.h): Do not include.
5362 (toplevel): Do not declare.
5363 (common-exceptions.h): Include.
5364 (cleanups.h): Likewise.
5365 * server.c (toplevel): Do not define.
5366 (exit_code): New static global.
5367 (detach_or_kill_for_exit_cleanup): New function.
5368 (main): New function. Original main renamed to...
5369 (captured_main): New function.
5370 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5371
ff55e1b5
GB
53722014-08-29 Gary Benson <gbenson@redhat.com>
5373
5374 * Makefile.in (SFILES): Add common/common-exceptions.c.
5375 (OBS): Add common-exceptions.o.
5376 (common-exceptions.o): New rule.
5377 * utils.c (prepare_to_throw_exception): New function.
5378
e9bcb658
GB
53792014-08-29 Gary Benson <gbenson@redhat.com>
5380
5381 * config.in: Regenerate.
5382 * configure: Likewise.
5383
e3180625
GB
53842014-08-29 Gary Benson <gbenson@redhat.com>
5385
5386 * Makefile.in (SFILES): Add common/cleanups.c.
5387 (OBS): cleanups.o.
5388 (cleanups.o): New rule.
5389
e3d6ba5d
GB
53902014-08-29 Gary Benson <gbenson@redhat.com>
5391
5392 * utils.c (internal_vwarning): New function.
5393
7096e886
GB
53942014-08-28 Gary Benson <gbenson@redhat.com>
5395
5396 * utils.h (fatal): Remove declaration.
5397 * utils.c (fatal): Remove function.
5398
14ce3192
GB
53992014-08-28 Gary Benson <gbenson@redhat.com>
5400
5401 * tracepoint.c (gdb_agent_init): Replace fatal with
5402 perror_with_name.
5403 (initialize_tracepoint): Likewise.
5404
50278d59
GB
54052014-08-28 Gary Benson <gbenson@redhat.com>
5406
5407 * remote-utils.c (remote_prepare): Replace fatal with error.
5408
aa96c426
GB
54092014-08-28 Gary Benson <gbenson@redhat.com>
5410
5411 * linux-low.c (linux_async): Replace fatal with warning.
5412 Tidy up and return.
5413 (linux_start_non_stop): Return -1 if linux_async failed.
5414
f7160e97
GB
54152014-08-28 Gary Benson <gbenson@redhat.com>
5416
5417 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5418 gdb_assert.
5419 (i386_dr_low_get_addr): Remove vague comment.
5420 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5421 gdb_assert.
5422
38e08fca
GB
54232014-08-28 Gary Benson <gbenson@redhat.com>
5424
5425 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5426 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5427 internal_error.
5428 (linux_resume_one_lwp): Likewise.
5429 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5430 gdb_assert.
5431 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5432 with internal_error.
5433 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5434 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5435 (find_register_by_name): Replace fatal with internal_error.
5436 (find_regno): Likewise.
5437 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5438 * thread-db.c (thread_db_create_event): Likewise.
5439 (thread_db_load_search): Likewise.
5440 (try_thread_db_load_1): Likewise.
5441 * tracepoint.c (get_jump_space_head): Replace fatal with
5442 internal_error.
5443 (claim_trampoline_space): Likewise.
5444 (have_fast_tracepoint_trampoline_buffer): Likewise.
5445 (cmd_qtstart): Likewise.
5446 (stop_tracing): Likewise.
5447 (fast_tracepoint_collecting): Likewise.
5448 (target_malloc): Likewise.
5449 (download_tracepoint): Likewise.
5450 (download_trace_state_variables): Replace check with gdb_assert.
5451 (upload_fast_traceframes): Replace fatal with internal_error.
5452
34abf635
GB
54532014-08-19 Tom Tromey <tromey@redhat.com>
5454 Gary Benson <gbenson@redhat.com>
5455
5456 * Makefile.in (SFILES): Add common/common-debug.c.
5457 (OBS): Add common-debug.o.
5458 (common-debug.o): New rule.
5459 * debug.h (debug_printf): Don't declare.
5460 * debug.c (debug_printf): Renamed and rewritten as...
5461 (debug_vprintf): New function.
5462
f6e94d78
GB
54632014-08-19 Gary Benson <gbenson@redhat.com>
5464
5465 * utils.h: Do not include print-utils.h.
5466
9239eeab
GB
54672014-08-19 Tom Tromey <tromey@redhat.com>
5468 Gary Benson <gbenson@redhat.com>
5469
5470 * server.h: Add static assertion.
5471 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5472
ef87c8bb
GB
54732014-08-19 Tom Tromey <tromey@redhat.com>
5474 Gary Benson <gbenson@redhat.com>
5475
5476 * Makefile.in (SFILES): Add common/errors.c.
5477 (OBS): Add errors.o.
5478 (IPA_OBS): Add errors-ipa.o.
5479 (errors.o): New rule.
5480 (errors-ipa.o): Likewise.
5481 * utils.h (perror_with_name, error, warning): Don't declare.
5482 * utils.c (warning): Renamed and rewritten as...
5483 (vwarning): New function.
5484 (error): Renamed and rewritten as...
5485 (verror): New function.
5486 (internal_error): Renamed and rewritten as...
5487 (internal_verror): New function.
5488
bb974a24
GB
54892014-08-07 Gary Benson <gbenson@redhat.com>
5490
5491 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5492 * configure: Regenerate.
5493 * config.in: Likewise.
5494 * server.h: Do not include errno.h.
5495 * event-loop.c: Likewise.
5496 * hostio-errno.c: Likewise.
5497 * linux-low.c: Likewise.
5498 * remote-utils.c: Likewise.
5499 * spu-low.c: Likewise.
5500 * utils.c: Likewise.
5501 * gdbreplay.c: Unconditionally include errno.h.
5502
6d3d12eb
GB
55032014-08-07 Gary Benson <gbenson@redhat.com>
5504
5505 * server.h: Do not include string.h.
5506 * event-loop.c: Likewise.
5507 * linux-low.c: Likewise.
5508 * regcache.c: Likewise.
5509 * remote-utils.c: Likewise.
5510 * spu-low.c: Likewise.
5511 * utils.c: Likewise.
5512
dccbb609
GB
55132014-08-07 Gary Benson <gbenson@redhat.com>
5514
5515 * server.h: Do not include gdb_assert.h.
5516
e76df0d0
GB
55172014-08-07 Gary Benson <gbenson@redhat.com>
5518
5519 * server.h: Do not include common-utils.h.
5520
4cb9c816
GB
55212014-08-07 Gary Benson <gbenson@redhat.com>
5522
5523 * server.h: Do not include ptid.h.
5524 * notif.h: Likewise.
5525
3995eeee
GB
55262014-08-07 Gary Benson <gbenson@redhat.com>
5527
5528 * server.h: Do not include gdb_locale.h.
5529
cb9f1a9b
GB
55302014-08-07 Gary Benson <gbenson@redhat.com>
5531
5532 * server.h: Do not include gdb/signals.h.
5533 * win32-low.c: Likewise.
5534
a5fceff8
GB
55352014-08-07 Gary Benson <gbenson@redhat.com>
5536
5537 * server.h: Do not include pathmax.h.
5538
b9391142
GB
55392014-08-07 Gary Benson <gbenson@redhat.com>
5540
5541 * server.h: Do not include libiberty.h.
5542 * linux-bfin-low.c: Likewise.
5543
0e443c87
GB
55442014-08-07 Gary Benson <gbenson@redhat.com>
5545
5546 * server.h: Do not include ansidecl.h.
5547
8ebb3f56
GB
55482014-08-07 Gary Benson <gbenson@redhat.com>
5549
5550 * linux-x86-low.c: Do not include stddef.h.
5551 * lynx-ppc-low.c: Likewise.
5552 * tracepoint.c: Likewise.
5553
8980bdf6
GB
55542014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include stdarg.h.
5557 * nto-low.c: Likewise.
5558
d7096f71
GB
55592014-08-07 Gary Benson <gbenson@redhat.com>
5560
5561 * server.h: Do not include stdlib.h.
5562 * inferiors.c: Likewise.
5563 * linux-low.c: Likewise.
5564 * regcache.c: Likewise.
5565 * spu-low.c: Likewise.
5566 * tracepoint.c: Likewise.
5567 * utils.c: Likewise.
5568
d02f550d
GB
55692014-08-07 Gary Benson <gbenson@redhat.com>
5570
5571 * server.h: Do not include stdio.h.
5572 * linux-low.c: Likewise.
5573 * remote-utils.c: Likewise.
5574 * spu-low.c: Likewise.
5575 * utils.c: Likewise.
5576 * wincecompat.c: Likewise.
5577
87f6c4e3
GB
55782014-08-06 Gary Benson <gbenson@redhat.com>
5579
5580 * regcache.c (init_register_cache): Move conditionals inside if.
5581
7089dca4
GB
55822014-08-06 Gary Benson <gbenson@redhat.com>
5583
5584 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5585
462f517e
GB
55862014-07-31 Gary Benson <gbenson@redhat.com>
5587
5588 * ax.h: Do not include server.h.
5589 * gdbthread.h: Likewise.
5590 * lynx-low.h: Likewise.
5591 * notif.h: Likewise.
5592
976411d6
GB
55932014-07-30 Gary Benson <gbenson@redhat.com>
5594
5595 * server.h: Include common-defs.h.
5596 Do not include config.h or build-gnulib-gdbserver/config.h.
5597
d41f6d8e
GB
55982014-07-30 Gary Benson <gbenson@redhat.com>
5599
5600 * hostio-errno.c: Move server.h to top of includes list.
5601 * inferiors.c: Likewise.
5602 * linux-x86-low.c: Likewise.
5603 * notif.c: Include server.h.
5604
314c6a35
TT
56052014-07-24 Tom Tromey <tromey@redhat.com>
5606 Gary Benson <gbenson@redhat.com>
5607
5608 * server.h (CORE_ADDR): Now unsigned.
5609
69ff6be5
PA
56102014-07-16 Pedro Alves <palves@redhat.com>
5611
5612 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5613
ce9e3fe7
PA
56142014-07-15 Pedro Alves <palves@redhat.com>
5615
5616 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5617 copy.
5618
e76126e8
PA
56192014-07-11 Pedro Alves <palves@redhat.com>
5620
5621 * linux-low.c (kill_wait_lwp): New function, based on
5622 kill_one_lwp_callback, but use my_waitpid directly.
5623 (kill_one_lwp_callback, linux_kill): Use it.
5624
8e9db26e
PA
56252014-06-23 Pedro Alves <palves@redhat.com>
5626
5627 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5628 before setting DR0..DR3.
5629
698b3e08
GB
56302014-06-20 Gary Benson <gbenson@redhat.com>
5631
5632 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5633 * configure: Regenerated.
5634 * config.in: Likewise.
5635
125f8a3d
GB
56362014-06-20 Gary Benson <gbenson@redhat.com>
5637
5638 * Makefile.in (SFILES): Update locations for files moved
5639 from common to nat.
5640 (object file files): Reordered.
5641
42995dbd
GB
56422014-06-20 Gary Benson <gbenson@redhat.com>
5643
5644 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5645 (i386_dr_low_set_addr): Likewise.
5646 (i386_dr_low_get_addr): Likewise.
5647 (i386_dr_low_can_set_control): Likewise.
5648 (i386_dr_low_set_control): Likewise.
5649 (i386_dr_low_get_control): Likewise.
5650 (i386_dr_low_get_status): Likewise.
5651 (i386_get_debug_register_length): Likewise.
5652 * linux-x86-low.c (i386_dr_low_set_addr):
5653 Changed signature. Made static.
5654 (i386_dr_low_get_addr): Likewise.
5655 (i386_dr_low_set_control): Likewise.
5656 (i386_dr_low_get_control): Likewise.
5657 (i386_dr_low_get_status): Likewise.
5658 (i386_dr_low): New global variable.
5659 * win32-i386-low.c (i386_dr_low_set_addr):
5660 Changed signature. Made static.
5661 (i386_dr_low_get_addr): Likewise.
5662 (i386_dr_low_set_control): Likewise.
5663 (i386_dr_low_get_control): Likewise.
5664 (i386_dr_low_get_status): Likewise.
5665 (i386_dr_low): New global variable.
5666
e1d2394b
MS
56672014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5668
5669 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5670 * Makefile.in (AR, AR_FLAGS): Define.
5671 * configure: Regenerate.
5672
3a8ee006
GB
56732014-06-19 Gary Benson <gbenson@redhat.com>
5674
5675 * Makefile.in (i386-dregs.o): New rule.
5676 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5677 * i386-low.c (target.h): Remove include.
5678 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5679 (DR_CONTROL_SHIFT): Likewise.
5680 (DR_CONTROL_SIZE): Likewise.
5681 (DR_RW_EXECUTE): Likewise.
5682 (DR_RW_WRITE): Likewise.
5683 (DR_RW_READ): Likewise.
5684 (DR_RW_IORW): Likewise.
5685 (DR_LEN_1): Likewise.
5686 (DR_LEN_2): Likewise.
5687 (DR_LEN_4): Likewise.
5688 (DR_LEN_8): Likewise.
5689 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5690 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5691 (DR_ENABLE_SIZE): Likewise.
5692 (DR_LOCAL_SLOWDOWN): Likewise.
5693 (DR_GLOBAL_SLOWDOWN): Likewise.
5694 (DR_CONTROL_RESERVED): Likewise.
5695 (I386_DR_CONTROL_MASK): Likewise.
5696 (I386_DR_VACANT): Likewise.
5697 (I386_DR_LOCAL_ENABLE): Likewise.
5698 (I386_DR_GLOBAL_ENABLE): Likewise.
5699 (I386_DR_DISABLE): Likewise.
5700 (I386_DR_SET_RW_LEN): Likewise.
5701 (I386_DR_GET_RW_LEN): Likewise.
5702 (I386_DR_WATCH_HIT): Likewise.
5703 (i386_wp_op_t): Likewise.
5704 (i386_show_dr): Likewise.
5705 (i386_length_and_rw_bits): Likewise.
5706 (i386_insert_aligned_watchpoint): Likewise.
5707 (i386_remove_aligned_watchpoint): Likewise.
5708 (i386_handle_nonaligned_watchpoint): Likewise.
5709 i386_update_inferior_debug_regs(): Likewise.
5710 (i386_dr_insert_watchpoint): Likewise.
5711 (i386_dr_remove_watchpoint): Likewise.
5712 (i386_dr_region_ok_for_watchpoint): Likewise.
5713 (i386_dr_stopped_data_address): Likewise.
5714 (i386_dr_stopped_by_watchpoint): Likewise.
5715
8f26655c
GB
57162014-06-19 Gary Benson <gbenson@redhat.com>
5717
5718 * i386-low.c (i386_dr_show): Renamed to
5719 i386_show_dr and made static. All uses updated.
5720 (i386_dr_length_and_rw_bits): Renamed to
5721 i386_length_and_rw_bits and made static.
5722 All uses updated.
5723 (i386_dr_insert_aligned_watchpoint): Renamed to
5724 i386_insert_aligned_watchpoint and made static.
5725 All uses updated.
5726 (i386_dr_remove_aligned_watchpoint): Renamed to
5727 i386_remove_aligned_watchpoint and made static.
5728 All uses updated.
5729 (i386_dr_update_inferior_debug_regs): Renamed to
5730 i386_update_inferior_debug_regs and made static.
5731 All uses updated.
5732
b9228891
GB
57332014-06-18 Gary Benson <gbenson@redhat.com>
5734
5171def3
GB
5735 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5736 (i386_dr_low_can_set_control): Likewise.
5737 (i386_get_debug_register_length): Likewise.
5738 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5739 (i386_dr_low_can_set_control): Likewise.
5740 (i386_get_debug_register_length): Likewise.
5741
57422014-06-17 Gary Benson <gbenson@redhat.com>
5743
b9228891
GB
5744 * i386-low.h (i386-dregs.h): New include.
5745 (DR_FIRSTADDR): Now in i386-dregs.h.
5746 (DR_LASTADDR): Likewise.
5747 (DR_NADDR): Likewise.
5748 (DR_STATUS): Likewise.
5749 (DR_CONTROL): Likewise.
5750 (i386_debug_reg_state): Likewise.
5751 (i386_dr_insert_watchpoint): Likewise.
5752 (i386_dr_remove_watchpoint): Likewise.
5753 (i386_dr_region_ok_for_watchpoint): Likewise.
5754 (i386_dr_stopped_data_address): Likewise.
5755 (i386_dr_stopped_by_watchpoint): Likewise.
5756 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5757
4be83cc2
GB
57582014-06-18 Gary Benson <gbenson@redhat.com>
5759
5760 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5761 i386_dr_insert_watchpoint.
5762 (i386_low_remove_watchpoint): Renamed to
5763 i386_dr_remove_watchpoint.
5764 (i386_low_region_ok_for_watchpoint): Renamed to
5765 i386_dr_region_ok_for_watchpoint.
5766 (i386_low_stopped_data_address): Renamed to
5767 i386_dr_stopped_data_address.
5768 (i386_low_stopped_by_watchpoint): Renamed to
5769 i386_dr_stopped_by_watchpoint.
5770 * i386-low.c (i386_show_dr): Renamed to
5771 i386_dr_show and made nonstatic. All uses updated.
5772 (i386_length_and_rw_bits): Renamed to
5773 i386_dr_length_and_rw_bits and made nonstatic.
5774 All uses updated.
5775 (i386_insert_aligned_watchpoint): Renamed to
5776 i386_dr_insert_aligned_watchpoint and made nonstatic.
5777 All uses updated.
5778 (i386_remove_aligned_watchpoint): Renamed to
5779 i386_dr_remove_aligned_watchpoint and made nonstatic.
5780 All uses updated.
5781 (i386_update_inferior_debug_regs): Renamed to
5782 i386_dr_update_inferior_debug_regs and made nonstatic.
5783 All uses updated.
5784 (i386_low_insert_watchpoint): Renamed to
5785 i386_dr_insert_watchpoint. All uses updated.
5786 (i386_low_remove_watchpoint): Renamed to
5787 i386_dr_remove_watchpoint. All uses updated.
5788 (i386_low_region_ok_for_watchpoint): Renamed to
5789 i386_dr_region_ok_for_watchpoint. All uses updated.
5790 (i386_low_stopped_data_address): Renamed to
5791 i386_dr_stopped_data_address. All uses updated.
5792 (i386_low_stopped_by_watchpoint): Renamed to
5793 i386_dr_stopped_by_watchpoint. All uses updated.
5794
131aa0d4
GB
57952014-06-18 Gary Benson <gbenson@redhat.com>
5796
5797 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5798 (i386_dr_low_can_set_control): Likewise.
5799 (i386_insert_aligned_watchpoint): New check.
5800
d9305f7f
GB
58012014-06-18 Gary Benson <gbenson@redhat.com>
5802
5803 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5804 Renamed to state.
5805
e927c9fc
GB
58062014-06-18 Gary Benson <gbenson@redhat.com>
5807
5808 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5809 instead of fatal and error.
5810 (i386_handle_nonaligned_watchpoint): Likewise.
5811
1b6d4134
GB
58122014-06-18 Gary Benson <gbenson@redhat.com>
5813
5814 * i386-low.c (i386_get_debug_register_length): New macro.
5815 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5816 (i386_show_dr): Use debug_printf instead of fprintf. Use
5817 phex to format values.
5818
6e62758f
GB
58192014-06-18 Gary Benson <gbenson@redhat.com>
5820
5821 * i386-low.h: Comment changes.
5822 * i386-low.c: Likewise.
5823
fc6e2f03
GB
58242014-06-18 Gary Benson <gbenson@redhat.com>
5825
5826 * i386-low.c: Whitespace changes.
5827
f9d1eeed
TT
58282014-06-12 Tom Tromey <tromey@redhat.com>
5829
5830 * utils.c (freeargv): Remove.
5831
0b04e523
TT
58322014-06-12 Tom Tromey <tromey@redhat.com>
5833
5834 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5835 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5836 (parse_debug_format_options): Likewise.
5837 (gdbserver_usage): Likewise.
5838 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5839 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5840 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5841 against libiberty.
5842 ($(LIBGNU)): Depend on libiberty.
5843 (all-lib): Recurse into all subdirs.
5844 (install-only): Invoke "install" target in subdirs.
5845 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5846 targets.
5847 * configure: Rebuild.
5848 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5849 for vasprintf, vsnprintf, or gettimeofday.
5850 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5851 srv_tgtobj.
5852
270c9937
JB
58532014-06-05 Joel Brobecker <brobecker@adacore.com>
5854
5855 * development.sh: Delete.
5856 * Makefile.in (config.status): Adjust dependency on development.sh.
5857 * configure.ac: Adjust development.sh source call.
5858 * configure: Regenerate.
5859
0a261ed8
PA
58602014-06-02 Pedro Alves <palves@redhat.com>
5861
5862 * ax.c (gdb_free_agent_expr): New function.
5863 * ax.h (gdb_free_agent_expr): New declaration.
5864 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5865 list.
5866 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5867 static.
5868 (clear_breakpoint_conditions_and_commands): New function.
5869 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5870 (clear_breakpoint_conditions_and_commands): New declaration.
5871
e9dae05e
RR
58722014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5873
5874 * linux-aarch64-low.c (asm/ptrace.h): Include.
5875
5876f503
JK
58762014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5877
5878 Fix TLS access for -static -pthread.
5879 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5880 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5881 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5882
802e8e6d
PA
58832014-05-20 Pedro Alves <palves@redhat.com>
5884
5885 * linux-aarch64-low.c (aarch64_insert_point)
5886 (aarch64_remove_point): No longer check whether the type is
5887 supported here. Adjust to new interface.
5888 (the_low_target): Install aarch64_supports_z_point_type as
5889 supports_z_point_type method.
5890 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5891 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5892 instead of a Z packet char. Adjust.
5893 (arm_supports_z_point_type): New function.
5894 (arm_insert_point, arm_remove_point): Adjust to new interface.
5895 (the_low_target): Install arm_supports_z_point_type.
5896 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5897 (cris_insert_point, cris_remove_point): Adjust to new interface.
5898 Don't check whether the type is supported here.
5899 (the_low_target): Install cris_supports_z_point_type.
5900 * linux-low.c (linux_supports_z_point_type): New function.
5901 (linux_insert_point, linux_remove_point): Adjust to new interface.
5902 * linux-low.h (struct linux_target_ops) <insert_point,
5903 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5904 raw_breakpoint pointer parameter.
5905 <supports_z_point_type>: New method.
5906 * linux-mips-low.c (mips_supports_z_point_type): New function.
5907 (mips_insert_point, mips_remove_point): Adjust to new interface.
5908 Use mips_supports_z_point_type.
5909 (the_low_target): Install mips_supports_z_point_type.
5910 * linux-ppc-low.c (the_low_target): Install NULL as
5911 supports_z_point_type method.
5912 * linux-s390-low.c (the_low_target): Install NULL as
5913 supports_z_point_type method.
5914 * linux-sparc-low.c (the_low_target): Install NULL as
5915 supports_z_point_type method.
5916 * linux-x86-low.c (x86_supports_z_point_type): New function.
5917 (x86_insert_point): Adjust to new insert_point interface. Use
5918 insert_memory_breakpoint. Adjust to new
5919 i386_low_insert_watchpoint interface.
5920 (x86_remove_point): Adjust to remove_point interface. Use
5921 remove_memory_breakpoint. Adjust to new
5922 i386_low_remove_watchpoint interface.
5923 (the_low_target): Install x86_supports_z_point_type.
5924 * lynx-low.c (lynx_target_ops): Install NULL as
5925 supports_z_point_type callback.
5926 * nto-low.c (nto_supports_z_point_type): New.
5927 (nto_insert_point, nto_remove_point): Adjust to new interface.
5928 (nto_target_ops): Install nto_supports_z_point_type.
5929 * mem-break.c: Adjust intro comment.
5930 (struct raw_breakpoint) <raw_type, size>: New fields.
5931 <inserted>: Update comment.
5932 <shlib_disabled>: Delete field.
5933 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5934 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5935 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5936 (raw_bkpt_type_to_target_hw_bp_type): New function.
5937 (find_enabled_raw_code_breakpoint_at): New function.
5938 (find_raw_breakpoint_at): New type and size parameters. Use them.
5939 (insert_memory_breakpoint): New function, based off
5940 set_raw_breakpoint_at.
5941 (remove_memory_breakpoint): New function.
5942 (set_raw_breakpoint_at): Reimplement.
5943 (set_breakpoint): New, based on set_breakpoint_at.
5944 (set_breakpoint_at): Reimplement.
5945 (delete_raw_breakpoint): Go through the_target->remove_point
5946 instead of assuming memory breakpoints.
5947 (find_gdb_breakpoint_at): Delete.
5948 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5949 (find_gdb_breakpoint): New function.
5950 (set_gdb_breakpoint_at): Delete.
5951 (z_type_supported): New function.
5952 (set_gdb_breakpoint_1): New function, loosely based off
5953 set_gdb_breakpoint_at.
5954 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5955 (delete_gdb_breakpoint_at): Delete.
5956 (delete_gdb_breakpoint_1): New function, loosely based off
5957 delete_gdb_breakpoint_at.
5958 (delete_gdb_breakpoint): New function.
5959 (clear_gdb_breakpoint_conditions): Rename to ...
5960 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5961 breakpoint.
5962 (add_condition_to_breakpoint): Make static.
5963 (add_breakpoint_condition): Take a struct breakpoint pointer
5964 instead of an address. Adjust.
5965 (gdb_condition_true_at_breakpoint): Rename to ...
5966 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5967 z_type parameter.
5968 (gdb_condition_true_at_breakpoint): Reimplement.
5969 (add_breakpoint_commands): Take a struct breakpoint pointer
5970 instead of an address. Adjust.
5971 (gdb_no_commands_at_breakpoint): Rename to ...
5972 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5973 parameter. Return true if no breakpoint was found. Change debug
5974 output.
5975 (gdb_no_commands_at_breakpoint): Reimplement.
5976 (run_breakpoint_commands): Rename to ...
5977 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5978 and change return type to boolean.
5979 (run_breakpoint_commands): New function.
5980 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5981 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5982 breakpoint. Go through the_target->remove_point instead of
5983 assuming memory breakpoint.
5984 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5985 software and hardware breakpoints.
5986 (reinsert_raw_breakpoint): Go through the_target->insert_point
5987 instead of assuming memory breakpoint.
5988 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5989 software and hardware breakpoints.
5990 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5991 Check both software and hardware breakpoints.
5992 (validate_inserted_breakpoint): Assert the breakpoint is a
5993 software breakpoint. Set the inserted flag to -1 instead of
5994 setting shlib_disabled.
5995 (delete_disabled_breakpoints): Adjust.
5996 (validate_breakpoints): Only validate software breakpoints.
5997 Adjust to inserted flag change.
5998 (check_mem_read, check_mem_write): Skip breakpoint types other
5999 than software breakpoints. Adjust to inserted flag change.
6000 * mem-break.h (enum raw_bkpt_type): New enum.
6001 (raw_breakpoint, struct process_info): Forward declare.
6002 (Z_packet_to_target_hw_bp_type): Delete declaration.
6003 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6004 (set_gdb_breakpoint, delete_gdb_breakpoint)
6005 (clear_breakpoint_conditions): New declarations.
6006 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6007 (breakpoint_inserted_here): Update comment.
6008 (add_breakpoint_condition, add_breakpoint_commands): Replace
6009 address parameter with a breakpoint pointer parameter.
6010 (gdb_breakpoint_here): Update comment.
6011 (delete_gdb_breakpoint_at): Delete.
6012 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6013 * server.c (process_point_options): Take a struct breakpoint
6014 pointer instead of an address. Adjust.
6015 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6016 delete_gdb_breakpoint.
6017 * spu-low.c (spu_target_ops): Install NULL as
6018 supports_z_point_type method.
6019 * target.h: Include mem-break.h.
6020 (struct target_ops) <prepare_to_access_memory>: Update comment.
6021 <supports_z_point_type>: New field.
6022 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6023 instead of a char. Also take a raw breakpoint pointer.
6024 * win32-arm-low.c (the_low_target): Install NULL as
6025 supports_z_point_type.
6026 * win32-i386-low.c (i386_supports_z_point_type): New function.
6027 (i386_insert_point, i386_remove_point): Adjust to new interface.
6028 (the_low_target): Install i386_supports_z_point_type.
6029 * win32-low.c (win32_supports_z_point_type): New function.
6030 (win32_insert_point, win32_remove_point): Adjust to new interface.
6031 (win32_target_ops): Install win32_supports_z_point_type.
6032 * win32-low.h (struct win32_target_ops):
6033 <supports_z_point_type>: New method.
6034 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6035 instead of a char. Also take a raw breakpoint pointer.
6036
932539e3
PA
60372014-05-20 Pedro Alves <palves@redhat.com>
6038
6039 * mem-break.h: Include break-common.h.
6040 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6041 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6042 (Z_packet_to_target_hw_bp_type): New declaration.
6043 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6044 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6045 (Z_PACKET_ACCESS_WP): Delete macros.
6046 (Z_packet_to_hw_type): Delete function.
6047 * i386-low.h: Don't include break-common.h here.
6048 (Z_packet_to_hw_type): Delete declaration.
6049 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6050 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6051 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6052 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6053 * linux-aarch64-low.c: Don't include break-common.h here.
6054 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6055 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6056 (Z_packet_to_target_hw_bp_type): Delete function.
6057 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6058 function.
6059 (mips_insert_point, mips_remove_point): Use
6060 Z_packet_to_target_hw_bp_type.
6061
4ff0d3d8
PA
60622014-05-20 Pedro Alves <palves@redhat.com>
6063
6064 * linux-aarch64-low.c: Include break-common.h.
6065 (enum target_point_type): Delete.
6066 (Z_packet_to_point_type): Rename to ...
6067 (Z_packet_to_target_hw_bp_type): ... this, and return a
6068 target_hw_bp_type instead.
6069 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6070 instead of an enum target_point_type.
6071 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6072 breakpoint type.
6073 (aarch64_dr_state_insert_one_point)
6074 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6075 (aarch64_handle_aligned_watchpoint)
6076 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6077 Take an enum target_hw_bp_type instead of an enum
6078 target_point_type.
6079 (aarch64_supports_z_point_type): New function.
6080 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6081 use Z_packet_to_target_hw_bp_type.
6082
786dc519
JB
60832014-05-20 Joel Brobecker <brobecker@adacore.com>
6084
6085 * configure.ac: Only use -Werror by default when DEVELOPMENT
6086 is true.
6087 * configure: Regenerate.
6088
9e0aa64f
JK
60892014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6090
6091 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6092 * linux-x86-low.c (X86_64_USER_REGS): New.
6093 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6094
2b577b92
YQ
60952014-04-28 Yao Qi <yao@codesourcery.com>
6096
6097 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6098 name.
6099
94611da2
PA
61002014-04-25 Pedro Alves <palves@redhat.com>
6101
6102 PR server/16255
6103 * linux-low.c (linux_attach_fail_reason_string): New function.
6104 (linux_attach_lwp): Delete.
6105 (linux_attach_lwp_1): Rename to ...
6106 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6107 argument. Remove "initial" parameter. Return int instead of
6108 void. Don't error or warn here.
6109 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6110 failure to attach to the tgid. Call warning when failing to
6111 attach to an lwp.
6112 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6113 argument. Remove "initial" parameter. Return int instead of
6114 void. Don't error or warn here.
6115 (linux_attach_fail_reason_string): New declaration.
6116 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6117 interface change. Use linux_attach_fail_reason_string.
6118
01f9f808
MS
61192014-04-24 Michael Sturm <michael.sturm@mintel.com>
6120 Walfred Tedeschi <walfred.tedeschi@intel.com>
6121
6122 * Makefile.in: Added rules to handle new files
6123 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6124 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6125 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6126 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6127 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6128 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6129 x32-avx512-linux.o.
6130 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6131 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6132 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6133 i386/x32-avx512.xml.
6134 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6135 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6136 i386/x32-avx512-linux.xml.
6137 * i387-fp.c (num_avx512_k_registers): New constant for number
6138 of K registers.
6139 (num_avx512_zmmh_low_registers): New constant for number of
6140 lower ZMM registers (0-15).
6141 (num_avx512_zmmh_high_registers): New constant for number of
6142 higher ZMM registers (16-31).
6143 (num_avx512_ymmh_registers): New contant for number of higher
6144 YMM registers (ymm16-31 added by avx521 on x86_64).
6145 (num_avx512_xmm_registers): New constant for number of higher
6146 XMM registers (xmm16-31 added by AVX512 on x86_64).
6147 (struct i387_xsave): Add space for AVX512 registers.
6148 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6149 Add code to handle AVX512 registers.
6150 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6151 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6152 prototypei from generated file.
6153 (tdesc_amd64_avx512_linux): Likewise.
6154 (init_registers_x32_avx512_linux): Likewise.
6155 (tdesc_x32_avx512_linux): Likewise.
6156 (init_registers_i386_avx512_linux): Likewise.
6157 (tdesc_i386_avx512_linux): Likewise.
6158 (x86_64_regmap): Add AVX512 registers.
6159 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6160 mask.
6161 (initialize_low_arch): Add code to initialize AVX512 registers.
6162
51aa91f9
PA
61632014-04-23 Pedro Alves <palves@redhat.com>
6164
6165 * mem-break.c (find_gdb_breakpoint_at): Make static.
6166 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6167
a4165e94
PA
61682014-04-23 Pedro Alves <palves@redhat.com>
6169
6170 * i386-low.c: Don't include break-common.h here.
6171 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6172 prototype to take target_hw_bp_type as argument instead of a Z
6173 packet char.
6174 * i386-low.h: Include break-common.h here.
6175 (Z_packet_to_hw_type): Declare.
6176 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6177 prototypes.
6178 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6179 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6180 (x86_remove_point): Convert the packet number to a
6181 target_hw_bp_type before calling i386_low_remove_watchpoint.
6182 * win32-i386-low.c (i386_insert_point): Convert the packet number
6183 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6184 (i386_remove_point): Convert the packet number to a
6185 target_hw_bp_type before calling i386_low_remove_watchpoint.
6186
b8acf843
PA
61872014-04-23 Pedro Alves <palves@redhat.com>
6188
6189 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6190
d708bcd1
PA
61912014-04-10 Pedro Alves <palves@redhat.com>
6192
6193 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6194 Check if the condition or command is NULL before checking if the
6195 breakpoint is known. On success, return true.
6196 * mem-break.h (add_breakpoint_condition): Document return.
6197 (add_breakpoint_commands): Add describing comment.
6198 * server.c (skip_to_semicolon): New function.
6199 (process_point_options): Use it.
6200
2eec7d5b
PA
62012014-04-09 Pedro Alves <palves@redhat.com>
6202
6203 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6204 to lwpid_of.
6205
fa96cb38
PA
62062014-02-27 Pedro Alves <palves@redhat.com>
6207
6208 PR 12702
6209 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6210 macros.
6211 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6212 output.
6213 (last_thread_of_process_p): Take a PID argument instead of a
6214 thread pointer.
6215 (linux_wait_for_lwp): Delete.
6216 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6217 functions.
6218 (linux_low_filter_event): New function, party factored out from
6219 linux_wait_for_event.
6220 (linux_wait_for_event): Rename to ...
6221 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6222 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6223 sigsuspend. Check for zombie leaders.
6224 (linux_wait_for_event): Reimplement as wrapper around
6225 linux_wait_for_event_filtered.
6226 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6227 a normal or signal exit is seen, it's the whole process exiting.
6228 (wait_for_sigstop): No longer a for_each_inferior callback.
6229 Rewrite on top of linux_wait_for_event_filtered.
6230 (stop_all_lwps): Call wait_for_sigstop directly.
6231 * server.c (resume, handle_target_event): Handle
6232 TARGET_WAITKIND_NO_RESUMED.
6233
d763de10
JB
62342014-02-26 Joel Brobecker <brobecker@adacore.com>
6235
6236 * win32-low.c (psapi_get_dll_name,
6237 * win32_CreateToolhelp32Snapshot): Delete.
6238 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6239 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6240 Delete.
6241 (handle_load_dll): Add function description.
6242 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6243
850a0f76
JB
62442014-02-26 Joel Brobecker <brobecker@adacore.com>
6245
6246 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6247 Add comment.
6248 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6249 base address when calling win32_add_one_solib.
6250 (handle_load_dll): Delete local variable load_addr.
6251 Remove 0x1000 offset applied to DLL base address when calling
6252 win32_add_one_solib.
6253 (handle_unload_dll): Add comment.
6254
f25b3fc3
JB
62552014-02-26 Joel Brobecker <brobecker@adacore.com>
6256
6257 * win32-low.c (win32_add_all_dlls): Renames
6258 win32_ensure_ntdll_loaded. Rewrite function documentation.
6259 Adjust implementation to always load all DLLs.
6260 Add 0x1000 offset to DLL base address when calling
6261 win32_add_one_solib.
6262 (child_initialization_done): New static global.
6263 (do_initial_child_stuff): Set child_initialization_done to
6264 zero during child initialization, and 1 after. Replace call
6265 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6266 Add comment.
6267 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6268 (handle_unload_dll): Add function documentation.
6269 (get_child_debug_event): Ignore load and unload DLL events
6270 during child initialization.
6271
d86d4aaf
DE
62722014-02-20 Doug Evans <dje@google.com>
6273
3bc32da3 6274 Remove global all_lwps.
d86d4aaf
DE
6275 * inferiors.h (ptid_of): Move here from linux-low.h.
6276 (pid_of, lwpid_of): Ditto.
6277 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6278 parameter is a struct thread_info * now.
6279 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6280 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6281 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6282 directly.
6283 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6284 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6285 * linux-arm-low.c (update_registers_callback): Update, "entry"
6286 parameter is a struct thread_info * now.
6287 Fetch lwpid from current_inferior directly.
6288 (arm_insert_point): Pass &all_threads to find_inferior instead of
6289 &all_lwps.
6290 (arm_remove_point): Ditto.
6291 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6292 (arm_prepare_to_resume): Fetch pid from thread.
6293 (arm_read_description): Fetch lwpid from current_inferior directly.
6294 * linux-low.c (all_lwps): Delete.
6295 (delete_lwp): Delete call to remove_inferior.
6296 (handle_extended_wait): Fetch lwpid from thread.
6297 (add_lwp): Don't set lwp->entry.id. Remove call to
6298 add_inferior_to_list.
6299 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6300 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6301 (kill_one_lwp_callback): Ditto.
6302 (linux_kill): Don't dereference NULL pointer.
6303 Fetch ptid,lwpid from thread.
6304 (get_detach_signal): Fetch ptid from thread.
6305 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6306 Simplify call to regcache_invalidate_thread.
6307 (delete_lwp_callback): Update, "entry" parameter is a
6308 struct thread_info * now. Fetch pid from thread.
6309 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6310 (status_pending_p_callback): Update, "entry" parameter is a
6311 struct thread_info * now. Fetch ptid from thread.
6312 (find_lwp_pid): Update, "entry" parameter is a
6313 struct thread_info * now.
6314 (linux_wait_for_lwp): Fetch pid from thread.
6315 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6316 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6317 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6318 (dequeue_one_deferred_signal): Ditto.
6319 (cancel_breakpoint): Fetch ptid from current_inferior.
6320 (linux_wait_for_event): Pass &all_threads to find_inferior,
6321 not &all_lwps. Fetch ptid, lwpid from thread.
6322 (count_events_callback): Update, "entry" parameter is a
6323 struct thread_info * now.
6324 (select_singlestep_lwp_callback): Ditto.
6325 (select_event_lwp_callback): Ditto.
6326 (cancel_breakpoints_callback): Ditto.
6327 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6328 not &all_lwps.
6329 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6330 (unsuspend_one_lwp): Update, "entry" parameter is a
6331 struct thread_info * now.
6332 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6333 not &all_lwps.
6334 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6335 Fetch lwpid from thread, not lwp.
6336 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6337 Pass &all_threads to find_inferior, not &all_lwps.
6338 (send_sigstop): Fetch lwpid from thread, not lwp.
6339 (send_sigstop_callback): Update, "entry" parameter is a
6340 struct thread_info * now.
6341 (suspend_and_send_sigstop_callback): Ditto.
6342 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6343 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6344 struct thread_info * now.
6345 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6346 from thread, lwp.
6347 (lwp_running): Update, "entry" parameter is a
6348 struct thread_info * now.
6349 (stop_all_lwps): Fetch ptid from thread.
6350 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6351 (linux_resume_one_lwp): Fetch lwpid from thread.
6352 (linux_set_resume_request): Update, "entry" parameter is a
6353 struct thread_info * now. Fetch pid, lwpid from thread.
6354 (resume_status_pending_p): Update, "entry" parameter is a
6355 struct thread_info * now.
6356 (need_step_over_p): Ditto. Fetch lwpid from thread.
6357 (start_step_over): Fetch lwpid from thread.
6358 (linux_resume_one_thread): Update, "entry" parameter is a
6359 struct thread_info * now. Fetch lwpid from thread.
6360 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6361 (proceed_one_lwp): Update, "entry" parameter is a
6362 struct thread_info * now. Fetch lwpid from thread.
6363 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6364 struct thread_info * now.
6365 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6366 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6367 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6368 directly.
6369 (regsets_store_inferior_registers): Ditto.
6370 (fetch_register, store_register): Ditto.
6371 (linux_read_memory, linux_write_memory): Ditto.
6372 (linux_request_interrupt): Ditto.
6373 (linux_read_auxv): Ditto.
6374 (linux_xfer_siginfo): Ditto.
6375 (linux_qxfer_spu): Ditto.
6376 (linux_qxfer_libraries_svr4): Ditto.
6377 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6378 moved to inferiors.h.
6379 (get_lwp): Delete.
6380 (get_thread_lwp): Update.
6381 (struct lwp_info): Delete member "entry". Simplify comment for
6382 member "thread".
6383 (all_lwps): Delete.
6384 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6385 current_inferior directly.
6386 (update_watch_registers_callback): Update, "entry" parameter is a
6387 struct thread_info * now. Fetch pid from thread.
6388 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6389 (mips_insert_point): Fetch lwpid from current_inferior.
6390 Pass &all_threads to find_inferior, not &all_lwps.
6391 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6392 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6393 directly.
6394 (mips_stopped_data_address): Ditto.
6395 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6396 directly.
6397 * linux-tile-low.c (tile_arch_setup): Ditto.
6398 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6399 (update_debug_registers_callback): Update, "entry" parameter is a
6400 struct thread_info * now. Fetch pid from thread.
6401 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6402 Pass &all_threads to find_inferior, not &all_lwps.
6403 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6404 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6405 Pass &all_threads to find_inferior, not &all_lwps.
6406 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6407 (i386_dr_low_get_status): Ditto.
6408 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6409 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6410 (x86_linux_read_description): Ditto.
6411 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6412
3b8361aa
DE
64132014-02-20 Doug Evans <dje@google.com>
6414
6415 * inferiors.c (get_first_inferior): Fix buglet.
6416
f7667f0d
DE
64172014-02-19 Doug Evans <dje@google.com>
6418
6419 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6420 * inferiors.c (add_thread): Change result type to struct thread_info *.
6421 All callers updated.
6422 (add_lwp): Call add_thread here instead of in callers.
6423 All callers updated.
6424 * linux-low.h (get_lwp_thread): Rewrite.
6425 (struct lwp_info): New member "thread".
6426
b3312d80
DE
64272014-02-19 Doug Evans <dje@google.com>
6428
6429 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6430 All callers updated.
6431
ecc6f45c
DE
64322014-02-19 Doug Evans <dje@google.com>
6433
6434 * inferiors.c (add_thread): Fix whitespace.
6435
649ebbca
DE
64362014-02-19 Doug Evans <dje@google.com>
6437
6438 * dll.c (clear_dlls): Replace accessing list implemention details
6439 with API function.
6440 * gdbthread.h (get_first_thread): Declare.
6441 * inferiors.c (for_each_inferior_with_data): New function.
6442 (get_first_thread): New function.
6443 (find_thread_ptid): Simplify.
6444 (get_first_inferior): New function.
6445 (clear_list): Delete.
6446 (one_inferior_p): New function.
6447 (clear_inferior_list): New function.
6448 (clear_inferiors): Update.
6449 * inferiors.h (for_each_inferior_with_data): Declare.
6450 (clear_inferior_list): Declare.
6451 (one_inferior_p): Declare.
6452 (get_first_inferior): Declare.
6453 * linux-low.c (linux_wait_for_event): Replace accessing list
6454 implemention details with API function.
6455 * server.c (target_running): Ditto.
6456 (accumulate_file_name_length): New function.
6457 (emit_dll_description): New function.
6458 (handle_qxfer_libraries): Replace accessing list implemention
6459 details with API function.
6460 (handle_qxfer_threads_worker): New function.
6461 (handle_qxfer_threads_proper): Replace accessing list implemention
6462 details with API function.
6463 (handle_query): Ditto.
6464 (visit_actioned_threads_callback_ftype): New typedef.
6465 (visit_actioned_threads_data): New struct.
6466 (visit_actioned_threads): Rewrite to be find_inferior callback.
6467 (resume): Call find_inferior.
6468 (handle_status): Replace accessing list implemention
6469 details with API function.
6470 (process_serial_event): Replace accessing list implemention details
6471 with API function.
6472 * target.c (set_desired_inferior): Replace accessing list implemention
6473 details with API function.
6474 * tracepoint.c (same_process_p): New function.
6475 (gdb_agent_about_to_close): Replace accessing list implemention
6476 details with API function.
6477 * win32-low.c (child_delete_thread): Replace accessing list
6478 implemention details with API function.
6479 (match_dll_by_basename): New function.
6480 (dll_is_loaded_by_basename): New function.
6481 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6482 details call to dll_is_loaded_by_basename.
6483
80894984
DE
64842014-02-19 Doug Evans <dje@google.com>
6485
6486 * dll.h (struct dll_info): Add comment.
6487 * gdbthread.h (struct thread_info): Add comment.
6488 (current_ptid): Simplify.
6489 * inferiors.c (add_process): Update.
6490 (remove_process): Update.
6491 * inferiors.h (struct process_info): Rename member "head" to "entry".
6492 * linux-low.c (delete_lwp): Update.
6493 (add_lwp): Update.
6494 (last_thread_of_process_p): Update.
6495 (kill_one_lwp_callback, linux_kill): Update.
6496 (status_pending_p_callback): Update.
6497 (wait_for_sigstop): Update. Simplify read of ptid.
6498 (start_step_over): Update.
6499 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6500 (get_lwp_thread): Update.
6501 (struct lwp_info): Rename member "head" to "entry".
6502 * regcache.h (inferior_list_entry): Delete.
6503 * server.c (kill_inferior_callback): Update.
6504 (detach_or_kill_inferior_callback): Update.
6505 (print_started_pid): Update.
6506 (print_attached_pid): Update.
6507 (process_serial_event): Simplify read of ptid.
6508 * thread-db.c (thread_db_create_event): Update.
6509 (thread_db_get_tls_address): Update.
6510 * win32-low.c (current_inferior_ptid): Simplify.
6511
46917d26
TT
65122014-02-19 Tom Tromey <tromey@redhat.com>
6513
6514 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6515 argument.
6516 (target_supports_btrace): Update.
6517
0759a81e
YQ
65182014-02-14 Yao Qi <yao@codesourcery.com>
6519
6520 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6521 (rsp-low-ipa.o): New target.
6522
a7191e8b
TT
65232014-02-12 Tom Tromey <tromey@redhat.com>
6524
6525 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6526 convert_ascii_to_int.
6527 * regcache.c (registers_to_string): Likewise.
6528 * remote-utils.c (decode_M_packet): Likewise.
6529 * server.c (process_serial_event): Likewise.
6530
ff0e980e
TT
65312014-02-12 Tom Tromey <tromey@redhat.com>
6532
6533 * server.c (handle_query, handle_v_run): Use hex2bin, not
6534 unhexify.
6535 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6536
e9371aff
TT
65372014-02-12 Tom Tromey <tromey@redhat.com>
6538
6539 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6540 convert_int_to_ascii.
6541 * regcache.c (registers_to_string, collect_register_as_string):
6542 Likewise.
6543 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6544 Likewise.
6545 * server.c (process_serial_event): Likewise.
6546 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6547 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6548
971dc0b8
TT
65492014-02-12 Tom Tromey <tromey@redhat.com>
6550
6551 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6552 bin2hex, not hexify.
6553 * tracepoint.c (cmd_qtstatus): Likewise.
6554
0a822afb
TT
65552014-02-12 Tom Tromey <tromey@redhat.com>
6556
6557 * remote-utils.c (monitor_output): Pass explicit length to
6558 hexify.
6559
9c3d6531
TT
65602014-02-12 Tom Tromey <tromey@redhat.com>
6561
6562 * tracepoint.c: Include rsp-low.h.
6563 * server.c: Include rsp-low.h.
6564 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6565 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6566 declare.
6567 * remote-utils.c: Include rsp-low.h.
6568 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6569 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6570 (convert_int_to_ascii, convert_ascii_to_int): Move to
6571 common/rsp-low.c.
6572 * regcache.c: Include rsp-low.h.
6573 * ax.c: Include rsp-low.h.
6574 * Makefile.in (SFILES): Add common/rsp-low.c.
6575 (OBS): Add rsp-low.o.
6576 (rsp-low.o): New target.
6577
01fd3ea5
TT
65782014-02-12 Tom Tromey <tromey@redhat.com>
6579
6580 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6581 Include print-utils.h.
6582 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6583 (plongest, thirty_two, phex_nz): Remove.
6584 * Makefile.in (SFILES): Add common/print-utils.c.
6585 (OBS): Add print-utils.o.
6586 (print-utils-ipa.o): New target.
6587 (print-utils.o): New target.
6588 (IPA_OBJS): Add print-utils-ipa.o.
6589
e99dc820
TT
65902014-02-06 Tom Tromey <tromey@redhat.com>
6591
6592 * Makefile.in (SFILES): Fix indentation.
6593
ee1e2d4f
DE
65942014-02-05 Doug Evans <dje@google.com>
6595
6596 * linux-low.c (linux_wait_for_event): Improve comment.
6597 (linux_wait_1): Keep current_inferior in sync with event_child.
6598
f5a02773
DE
65992014-01-22 Doug Evans <dje@google.com>
6600
6601 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6602
87ce2a04
DE
66032014-01-22 Doug Evans <dje@google.com>
6604
6605 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6606 * configure: Regenerate.
6607 * config.in: Regenerate.
6608 * Makefile.in (SFILES): Add debug.c.
6609 (OBS): Add debug.o.
6610 * debug.c: New file.
6611 * debug.h: New file.
6612 * linux-aarch64-low.c (*): Update all debugging printfs to use
6613 debug_printf instead of fprintf.
6614 * linux-arm-low.c (*): Ditto.
6615 * linux-cris-low.c (*): Ditto.
6616 * linux-crisv32-low.c (*): Ditto.
6617 * linux-m32r-low.c (*): Ditto.
6618 * linux-sparc-low.c (*): Ditto.
6619 * linux-x86.c (*): Ditto.
6620 * linux-low.c (*): Ditto.
6621 (linux_wait_1): Add calls to debug_enter, debug_exit.
6622 (linux_wait): Remove redundant debugging printf.
6623 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6624 (linux_resume, unstop_all_lwps): Ditto.
6625 * mem-break.c (*): Update all debugging printfs to use
6626 debug_printf instead of fprintf.
6627 * remote-utils.c (*): Ditto.
6628 * thread-db.c (*): Ditto.
6629 * server.c #include <ctype.h>, "gdb_vecs.h".
6630 (debug_threads): Moved to debug.c.
6631 (*): Update all debugging printfs to use debug_printf instead of
6632 fprintf.
6633 (start_inferior): Replace call to fflush with call to debug_flush.
6634 (monitor_show_help): Mention set debug-format.
6635 (parse_debug_format_options): New function.
6636 (handle_monitor_command): Handle "monitor set debug-format".
6637 (gdbserver_usage): Mention --debug-format.
6638 (main): Parse --debug-format.
6639 * server.h (debug_threads): Declaration moved to debug.h.
6640 #include "debug.h".
6641 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6642 trace_debug_1 that uses debug_printf.
6643 (tracepoint_look_up_symbols): Update all debugging printfs to use
6644 debug_printf instead of fprintf.
6645
e671835b
BS
66462014-01-20 Baruch Siach <baruch@tkos.co.il>
6647
6648 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6649 sys/ptrace.h.
6650
b5737fa9
PA
66512014-01-17 Pedro Alves <palves@redhat.com>
6652
ea38d2a9 6653 PR build/16445
c7faa97a
PA
6654 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6655 defined after including gdb_proc_service.h.
b5737fa9 6656
40ed484e
DE
66572014-01-16 Doug Evans <dje@google.com>
6658
6659 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6660 (match_dll): Use it.
6661
969c39fb
MM
66622014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6663
6664 * target.h (target_ops) <read_btrace>: Change parameters and
6665 return type to allow error reporting.
6666 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6667 trace reading errors on.
6668 * linux-low.c (linux_low_read_btrace): Pass trace reading
6669 errors on.
6670 (linux_low_disable_btrace): New.
6671
ab7f45ba
DE
66722014-01-15 Doug Evans <dje@google.com>
6673
6674 * inferiors.c (thread_id_to_gdb_id): Delete.
6675 * inferiors.h (thread_id_to_gdb_id): Delete.
6676
66af0f44
EZ
66772014-01-13 Eli Zaretskii <eliz@gnu.org>
6678
6679 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6680 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6681 versions.
6682
9939e131
PA
66832014-01-08 Pedro Alves <palves@redhat.com>
6684
6685 * server.c (handle_status): Don't discard previous queued stop
6686 replies or thread's pending status here.
6687 (main) <disconnection>: Do it here instead.
6688
b7ea362b
PA
66892014-01-08 Pedro Alves <palves@redhat.com>
6690
6691 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6692 * server.c (visit_actioned_threads, handle_pending_status): New
6693 function.
6694 (handle_v_cont): Factor out parts to ...
6695 (resume): ... this new function. If in all-stop, and a thread
6696 being resumed has a pending status, report it without actually
6697 resuming.
6698 (myresume): Adjust to use the new 'resume' function.
6699 (clear_pending_status_callback, set_pending_status_callback)
6700 (find_status_pending_thread_callback): New functions.
6701 (handle_status): Handle the case of multiple threads having
6702 interesting statuses to report. Report threads' real last signal
6703 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6704 with an interesting thread to report the status for, instead of
6705 always reporting the status of the first thread.
6706
28498c42
JB
67072014-01-01 Joel Brobecker <brobecker@adacore.com>
6708
6709 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6710 * gdbreplay.c (gdbreplay_version): Likewise.
6711
f45c82da
YZ
67122013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6713
6714 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6715 iov.iov_len with the real length in use.
6716
379a5e2d
JB
67172013-12-13 Joel Brobecker <brobecker@adacore.com>
6718
6719 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6720 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6721 for all targets that use win32-low.c.
6722 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6723 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6724
4210d83e
PA
67252013-12-13 Pedro Alves <palves@redhat.com>
6726
6727 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6728 if equal to TARGET_WAITKIND_LOADED.
6729 * win32-low.c (cached_status): New static global.
6730 (win32_wait): Add declaration.
6731 (do_initial_child_stuff): Flush all initial pending debug events
6732 up to the initial breakpoint.
6733 (win32_wait): If CACHED_STATUS was set, return that instead
6734 of doing a real wait. Remove the code resuming the execution
6735 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6736 during the initial phase. Also remove the code changing
6737 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6738 TARGET_WAITKIND_STOPPED.
6739
e7f0d979
YQ
67402013-12-11 Yao Qi <yao@codesourcery.com>
6741
6742 * notif.c (handle_notif_ack): Return 0 if no notification
6743 matches.
6744
ebcf782c
DE
67452013-11-20 Doug Evans <dje@google.com>
6746
6747 * linux-low.c (linux_set_resume_request): Fix comment.
6748
20ad9378
DE
67492013-11-20 Doug Evans <dje@google.com>
6750
6751 * linux-low.c (resume_status_pending_p): Tweak comment.
6752
a196ebeb
WT
67532013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6754
6755 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6756 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6757 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6758 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6759 (srv_amd64_regobj): Add amd64-mpx.o.
6760 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6761 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6762 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6763 * i387-fp.c (num_pl_bnd_register) Added constant.
6764 (num_pl_bnd_cfg_registers) Added constant.
6765 (struct i387_xsave) Added reserved area and MPX fields.
6766 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6767 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6768 function.
6769 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6770 (init_registers_amd64_mpx_linux): Declare new function.
6771 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6772 (x86_64_regmap): Add MPX registers.
6773 (x86_linux_read_description): Add MPX case.
6774 (initialize_low_arch): Initialize MPX targets.
6775
0080a2f6
TT
67762013-11-18 Tom Tromey <tromey@redhat.com>
6777
6778 * configure: Rebuild.
6779 * configure.ac: Don't check for stdlib.h.
6780 * gdbreplay.c: Unconditionally include stdlib.h.
6781
2978b111
TT
67822013-11-18 Tom Tromey <tromey@redhat.com>
6783
6784 * config.in: Rebuild.
6785 * configure: Rebuild.
6786 * configure.ac: Don't use AC_HEADER_DIRENT.
6787
a3d08894
TT
67882013-11-18 Tom Tromey <tromey@redhat.com>
6789
6790 * server.h: Don't check HAVE_STRING_H.
6791 * gdbreplay.c: Don't check HAVE_STRING_H.
6792 * configure: Rebuild.
6793
0a5dd17d
TT
67942013-11-18 Tom Tromey <tromey@redhat.com>
6795
6796 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6797 LIBGNU.
6798
1bd2f0ba
TT
67992013-11-08 Tom Tromey <tromey@redhat.com>
6800
6801 * configure, config.in: Rebuild.
6802 * configure.ac: Remove unused configury.
6803
3266f10b
TT
68042013-11-08 Tom Tromey <tromey@redhat.com>
6805
6806 * acinclude.m4: Include common.m4, codeset.m4.
6807 * configure, config.in: Rebuild.
6808 * configure.ac: Use GDB_AC_COMMON.
6809
6682d959
AA
68102013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6811
6812 * linux-s390-low.c (HWCAP_S390_TE): New define.
6813 (s390_arch_setup): Consider the TE field in the HWCAP for
6814 determining 'have_regset_tdb'.
6815
fd0a4d76
SDJ
68162013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6817
6818 PR gdb/16014
6819 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6820 call to sizeof.
6821
1a3d890b
PA
68222013-10-02 Pedro Alves <palves@redhat.com>
6823
6824 * server.c (process_serial_event): Don't output "GDBserver
6825 exiting" if GDB is connected through stdio.
6826 * target.c (mywait): Likewise, be silent if GDB is connected
6827 through stdio.
6828
97ad4581
JB
68292013-10-01 Joel Brobecker <brobecker@adacore.com>
6830
6831 * lynx-low.c (lynx_add_threads_after_attach): New function.
6832 (lynx_attach): Remove call to add_thread. Add call to
6833 lynx_add_threads_after_attach instead.
6834
5b4e221c
MF
68352013-09-28 Mike Frysinger <vapier@gentoo.org>
6836
6837 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6838 * config.in, configure: Regenerated.
6839
ee47b2f8
YQ
68402013-09-18 Yao Qi <yao@codesourcery.com>
6841
6842 PR server/15959
6843 * server.c (start_inferior): Clear 'resume_info'.
6844
d6707650 68452013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6846
d6707650
JW
6847 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6848 for each register.
6849
9243dd0e 68502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6851
9243dd0e
JW
6852 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6853 linux-tile-low.o to srv_tgtobj.
6854
c623a6ef
WN
68552013-09-16 Will Newton <will.newton@linaro.org>
6856
6857 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6858 out regs.
6859
fb71d39e
PA
68602013-09-06 Pedro Alves <palves@redhat.com>
6861
6862 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6863 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6864 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6865 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6866 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6867 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6868
8e7e9910
PA
68692013-09-06 Pedro Alves <palves@redhat.com>
6870
6871 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6872 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6873
7c3a12ca
PA
68742013-09-06 Pedro Alves <palves@redhat.com>
6875
6876 * linux-amd64-ipa.c: Include tracepoint.h.
6877 * linux-i386-ipa.c: Include tracepoint.h.
6878
8eb3d7b6
RW
68792013-09-06 Ricard Wanderlof <ricardw@axis.com>
6880
6881 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6882 (ps_get_thread_area): New function.
6883
eddddb9d
RW
68842013-09-06 Ricard Wanderlof <ricardw@axis.com>
6885
6886 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6887 (initialize_low_arch): Call init_registers_crisv32 rather than
6888 init_register_crisv32.
6889
533b0600
PA
68902013-09-05 Pedro Alves <palves@redhat.com>
6891
6892 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6893 to ...
6894 * hostio.h: ... this new file.
6895 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6896 win32-low.c: Include hostio.h.
6897
0ce3d3b5
PA
68982013-09-05 Pedro Alves <palves@redhat.com>
6899
6900 * server.h (gdb_client_data, handler_func, callback_handler_func)
6901 (delete_file_handler, add_file_handler, append_callback_event)
6902 (delete_callback_event, start_event_loop, initialize_event_loop):
6903 Move to event-loop.h and include it.
6904 * event-loop.h: New file.
6905
799cdc37
PA
69062013-09-05 Pedro Alves <palves@redhat.com>
6907
6908 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6909 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6910 (loaded_dll, unloaded_dll): Move to ...
6911 * dll.h: ... this new file.
6912 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6913
6a6bbd9d
PA
69142013-09-05 Pedro Alves <palves@redhat.com>
6915
6916 * server.h (current_process, get_thread_process, all_processes)
6917 (add_inferior_to_list, for_each_inferior, current_inferior)
6918 (remove_inferior, add_process, remove_process, find_process_pid)
6919 (have_started_inferiors_p, have_attached_inferiors_p)
6920 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6921 (clear_inferiors, find_inferior, find_inferior_id)
6922 (inferior_target_data, set_inferior_target_data)
6923 (inferior_regcache_data, set_inferior_regcache_data): Move to
6924 inferiors.h, and include it.
6925 * inferiors.h: New file.
6926
f699aaba
PA
69272013-09-05 Pedro Alves <palves@redhat.com>
6928
6929 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6930 Move ...
72f4393d 6931 * ax.h: ... here.
f699aaba 6932
c144c7a0
PA
69332013-09-05 Pedro Alves <palves@redhat.com>
6934
6935 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6936 tracepoint.h.
6937 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6938 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6939 (handle_tracepoint_general_set, handle_tracepoint_query)
6940 (tracepoint_finished_step, tracepoint_was_hit)
6941 (release_while_stepping_state_list, current_traceframe)
6942 (in_readonly_region, traceframe_read_mem)
6943 (fetch_traceframe_registers, traceframe_read_sdata)
6944 (traceframe_read_info, struct fast_tpoint_collect_status)
6945 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6946 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6947 (supply_fast_tracepoint_registers)
6948 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6949 (ipa_tdesc, claim_trampoline_space)
6950 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6951 (agent_mem_read, agent_get_trace_state_variable_value)
6952 (agent_set_trace_state_variable_value, agent_tsv_read)
6953 (agent_mem_read_string, get_raw_reg_func_addr)
6954 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6955 * tracepoint.h: ... this new file.
6956
ff42e6ab
PA
69572013-09-05 Pedro Alves <palves@redhat.com>
6958
6959 * server.h (perror_with_name, error, fatal, warning, paddress)
6960 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6961 include it.
6962 * utils.h: New file.
6963
541af0f4
PA
69642013-09-05 Pedro Alves <palves@redhat.com>
6965
6966 * server.h (remote_debug, noack_mode, transport_is_reliable)
6967 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6968 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6969 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6970 (write_enn, initialize_async_io, enable_async_io)
6971 (disable_async_io, check_remote_input_interrupt_request)
6972 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6973 (dead_thread_notify, prepare_resume_reply)
6974 (decode_address_to_semicolon, decode_address, decode_m_packet)
6975 (decode_M_packet, decode_X_packet, decode_xfer_write)
6976 (decode_search_memory_packet, unhexify, hexify)
6977 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6978 (look_up_one_symbol, relocate_instruction)
6979 (monitor_output): Move to remote-utils.h, and include it.
6980 * remote-utils.h: New file.
6981
eebdf26b
PA
69822013-09-05 Pedro Alves <palves@redhat.com>
6983
6984 * server.h (_): Delete.
6985
3aafd2ff
PA
69862013-09-02 Pedro Alves <palves@redhat.com>
6987
6988 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6989 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6990 allocated.
6991 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6992
cee83bcb
PM
69932013-09-02 Pierre Muller <muller@sourceware.org>
6994
6995 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6996 or WriteProcessMemory complete successfully and handle
6997 ERROR_PARTIAL_COPY error.
6998
9a13b2fa
PA
69992013-09-02 Pedro Alves <palves@redhat.com>
7000
7001 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7002 error instead of EIO.
7003
602e3198
JK
70042013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7005
7006 PR server/15604
7007 * linux-low.c: Include filestuff.h.
7008 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7009 * lynx-low.c: Include filestuff.h.
7010 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7011 * server.c: Include filestuff.h.
7012 (main): Call notice_open_fds.
7013 * spu-low.c: Include filestuff.h.
7014 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7015
96d7229d
LM
70162013-08-22 Luis Machado <lgustavo@codesourcery.com>
7017
7018 * Makefile.in: Explain why ../target and ../nat are not
7019 listed as include file search paths.
7020 (linux-waitpid.o): New object file rule.
7021 * configure.srv (srv_native_linux_obj): New variable.
7022 Replace all occurrences of linux native object files with
7023 $srv_native_linux_obj.
7024 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7025 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7026 (linux_enable_event_reporting): Remove declaration.
7027 (my_waitpid): Moved to common/linux-waitpid.c.
7028 (linux_wait_for_event): Pass ptid when calling
7029 linux_enable_event_reporting.
7030 (linux_supports_tracefork_flag): Remove.
7031 (linux_enable_event_reporting): Likewise.
7032 (linux_tracefork_grandchild): Remove.
7033 (STACK_SIZE): Moved to common/linux-ptrace.c.
7034 (linux_tracefork_child): Remove.
7035 (linux_test_for_tracefork): Remove.
7036 (linux_look_up_symbols): Call linux_supports_traceclone.
7037 (initialize_low): Remove call to linux_test_for_tracefork.
7038 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7039 common/linux-ptrace.h.
7040 (PTRACE_TYPE_ARG4): Likewise.
7041 Include linux-ptrace.h.
7042
32940073
PA
70432013-08-21 Pedro Alves <palves@redhat.com>
7044
7045 * config.in: Renegerate.
7046
33b60d58 70472013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7048
33b60d58
LM
7049 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7050 (SFILES): Remove $(srcdir)/common/target-common.c and
7051 add $(srcdir)/target/waitstatus.c.
7052 (OBS): Remove target-common.o and add waitstatus.o.
7053 (server_h): Remove $(srcdir)/../common/target-common.h and
7054 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7055 and $(srcdir)/../target/waitstatus.h.
7056 (target-common.o): Remove.
7057 (waitstatus.o): New target object file.
7058 * target.h: Do not include target-common.h and
7059 include target/resume.h, target/wait.h and
7060 target/waitstatus.h.
7061
b8e1b30e
LM
70622013-08-13 Luis Machado <lgustavo@codesourcery.com>
7063
7064 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7065 to PTRACE_TYPE_ARG3.
7066 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7067 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7068 PTRACE_TYPE_ARG4.
7069 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7070 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7071
7a60ad40
YQ
70722013-07-27 Jie Zhang <jie@codesourcery.com>
7073 Daniel Jacobowitz <dan@codesourcery.com>
7074 Yao Qi <yao@codesourcery.com>
7075
7076 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7077 (mips-linux-watch.o): New rule.
7078 (mips_linux_watch_h): New variable.
7079 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7080 srv_tgtobj.
7081 * linux-mips-low.c: Include mips-linux-watch.h.
7082 (struct arch_process_info, struct arch_lwp_info): New.
7083 (update_watch_registers_callback): New function.
7084 (mips_linux_new_process, mips_linux_new_thread) New functions.
7085 (mips_linux_prepare_to_resume, mips_insert_point): New
7086 functions.
7087 (mips_remove_point, mips_stopped_by_watchpoint): New
7088 functions.
7089 (rsp_bp_type_to_target_hw_bp_type): New function.
7090 (mips_stopped_data_address): New function.
7091 (the_low_target): Add watchpoint support functions.
7092
de6f69ad
YQ
70932013-07-27 Yao Qi <yao@codesourcery.com>
7094
7095 * i386-low.c: Include break-common.h.
7096 (enum target_hw_bp_type): Remove.
7097
3360c0bf
LM
70982013-07-24 Luis Machado <lgustavo@codesourcery.com>
7099
7100 * Makefile.in (SFILES): /common/target-common.c.
7101 (OBS): Add target-common.o.
7102 (server_h): Add $(srcdir)/../common/target-common.h.
7103 (target-common.o): New target.
7104 * server.c (queue_stop_reply_callback): Free
7105 status string after use.
7106 * target.c (target_waitstatus_to_string): Remove.
7107 * target.h: Include target-common.h.
7108 (resume_kind): Likewise.
7109 (target_waitkind): Likewise.
7110 (target_waitstatus): Likewise.
7111 (TARGET_WNOHANG): Likewise.
7112
bd885420
YQ
71132013-07-04 Yao Qi <yao@codesourcery.com>
7114
7115 * Makefile.in (host_alias): Use @host_noncanonical@.
7116 (target_alias): Use @target_noncanonical@.
7117 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7118 ACX_NONCANONICAL_HOST.
7119 * configure: Regenerated.
7120
7121 Revert:
7122 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7123
7124 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7125 * configure: Rebuild.
7126 * Makefile.in (version_host, version_target): Get from configure.
7127 (version.c): Use $(version_host) and $(version_target).
7128
17ef446e
PA
71292013-07-03 Pedro Alves <palves@redhat.com>
7130
7131 * Makefile.in (config.status): Depend on development.sh.
7132 * acinclude.m4: Include libmcheck.m4.
7133 * configure: Regenerate.
7134
7a9a7487
MG
71352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7136
7137 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7138 attribute inside the parentheses.
7139 (winapi_DebugSetProcessKillOnExit): Ditto.
7140 (winapi_DebugBreakProcess): Ditto.
7141 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7142
49b64de6
MG
71432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7144
7145 * notif.h (notif_event): Add a dummy member to avoid compiler
7146 errors.
7147
d5749ee7
PA
71482013-07-01 Pedro Alves <palves@redhat.com>
7149
7150 * hostio.c (HOSTIO_PATH_MAX): Define.
7151 (require_filename, handle_open, handle_unlink, handle_readlink):
7152 Use it.
7153
d8d2a3ee
PA
71542013-07-01 Pedro Alves <palves@redhat.com>
7155
7156 * server.h: Include "pathmax.h".
7157 * linux-low.c: Don't include sys/param.h.
7158 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7159 MAXPATHLEN.
7160 * win32-low.c: Don't include sys/param.h.
7161 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7162
bc7dea8d
PA
71632013-07-01 Pedro Alves <palves@redhat.com>
7164
7165 * event-loop.c: Don't check HAVE_UNISTD_H before including
7166 <unistd.h>.
7167 * gdbreplay.c: Likewise.
7168 * remote-utils.c: Likewise.
7169 * server.c: Likewise.
7170 * configure.ac: Don't check for unistd.h.
7171 * configure: Regenerate.
7172
d6c2da54
TT
71732013-06-28 Tom Tromey <tromey@redhat.com>
7174
7175 * Makefile.in (version.c): Use version.in, not
7176 common/version.in.
7177
257b6bec
MG
71782013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7179
7180 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7181 * configure: Rebuild.
7182 * Makefile.in (version_host, version_target): Get from configure.
7183 (version.c): Use $(version_host) and $(version_target).
7184
86ebe149
DK
71852013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7186
7187 Fix trace-status to output user name without trailing colon.
7188 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7189
f30aa5af
DK
71902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7191
7192 Fix trace-status to output proper start-time and stop-time.
7193 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7194 output start time and stop time in hex as gdb expects.
7195
28a93511
YQ
71962013-06-26 Pedro Alves <pedro@codesourcery.com>
7197
7198 * tracepoint.c (build_traceframe_info_xml): Output trace state
7199 variables present in the trace buffer.
7200
01208463
TT
72012013-06-24 Tom Tromey <tromey@redhat.com>
7202
7203 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7204 create-version.sh.
7205 (version.o): Remove.
7206 * gdbreplay.c: Include version.h.
7207 (version, host_name): Don't declare.
7208 * server.h: Include version.h.
7209 (version, host_name): Don't declare.
7210
760256f9
PA
72112013-06-12 Pedro Alves <palves@redhat.com>
7212
7213 * linux-x86-low.c (linux_is_elf64): Delete global.
7214 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7215 with local linux_pid_exe_is_elf_64_file use.
7216
030031ee
PA
72172013-06-11 Pedro Alves <palves@redhat.com>
7218
7219 * linux-low.c (regset_disabled, disable_regset): New functions.
7220 (regsets_fetch_inferior_registers)
7221 (regsets_store_inferior_registers): Use them.
7222 (initialize_regsets_info); Don't allocate the disabled_regsets
7223 array here.
7224 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7225 comment.
7226
5da6eb0a
PA
72272013-06-11 Pedro Alves <palves@redhat.com>
7228
7229 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7230 xmalloc.
7231
7e5aaa09
PA
72322013-06-11 Pedro Alves <palves@redhat.com>
7233
7234 * linux-x86-low.c (initialize_low_arch): Call
7235 init_registers_x32_avx_linux.
7236
d878444c
JK
72372013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7238
7239 Fix compatibility with Android Bionic.
7240 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7241 it is not empty.
7242
3aee8918
PA
72432013-06-07 Pedro Alves <palves@redhat.com>
7244
5f2b57b5 7245 PR server/14823
3aee8918
PA
7246 * Makefile.in (OBS): Add tdesc.o.
7247 (IPA_OBJS): Add tdesc-ipa.o.
7248 (tdesc-ipa.o): New rule.
7249 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7250 interface.
7251 * linux-low.c (new_inferior): Delete.
7252 (disabled_regsets, num_regsets): Delete.
7253 (linux_add_process): Adjust to set the new per-process
7254 new_inferior flag.
7255 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7256 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7257 was a stop. When calling arch_setup, switch the current inferior
7258 to the thread that got an event.
7259 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7260 (regsets_fetch_inferior_registers)
7261 (regsets_store_inferior_registers): New regsets_info parameter.
7262 Adjust to use it.
7263 (linux_register_in_regsets): New regs_info parameter. Adjust to
7264 use it.
7265 (register_addr, fetch_register, store_register): New usrregs_info
7266 parameter. Adjust to use it.
7267 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7268 parameter regs_info. Adjust to use it.
7269 (linux_fetch_registers): Get the current inferior's regs_info, and
7270 adjust to use it.
7271 (linux_store_registers): Ditto.
7272 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7273 (initialize_low): Don't initialize the target_regsets here. Call
7274 initialize_low_arch.
7275 * linux-low.h (target_regsets): Delete declaration.
7276 (struct regsets_info): New.
7277 (struct usrregs_info): New.
7278 (struct regs_info): New.
7279 (struct process_info_private) <new_inferior>: New field.
7280 (struct linux_target_ops): Delete the num_regs, regmap, and
7281 regset_bitmap fields. New field regs_info.
7282 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7283 * i387-fp.c (num_xmm_registers): Delete.
7284 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7285 calls to new interface.
7286 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7287 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7288 Infer the number of xmm registers from the regcache's target
7289 description.
7290 * i387-fp.h (num_xmm_registers): Delete.
7291 * inferiors.c (add_thread): Don't install the thread's regcache
7292 here.
7293 * proc-service.c (gregset_info): Fetch the current inferior's
7294 regs_info. Adjust to use it.
7295 * regcache.c: Include tdesc.h.
7296 (register_bytes, reg_defs, num_registers)
7297 (gdbserver_expedite_regs): Delete.
7298 (get_thread_regcache): If the thread doesn't have a regcache yet,
7299 create one, instead of aborting gdbserver.
7300 (regcache_invalidate_one): Rename to ...
7301 (regcache_invalidate_thread): ... this.
7302 (regcache_invalidate_one): New.
7303 (regcache_invalidate): Only invalidate registers of the current
7304 process.
7305 (init_register_cache): Add target_desc parameter, and use it.
7306 (new_register_cache): Ditto. Assert the target description has a
7307 non zero registers_size.
7308 (regcache_cpy): Add assertions. Adjust.
7309 (realloc_register_cache, set_register_cache): Delete.
7310 (registers_to_string, registers_from_string): Adjust.
7311 (find_register_by_name, find_regno, find_register_by_number)
7312 (register_cache_size): Add target_desc parameter, and use it.
7313 (free_register_cache_thread, free_register_cache_thread_one)
7314 (regcache_release, register_cache_size): New.
7315 (register_size): Add target_desc parameter, and use it.
7316 (register_data, supply_register, supply_register_zeroed)
7317 (supply_regblock, supply_register_by_name, collect_register)
7318 (collect_register_as_string, collect_register_by_name): Adjust.
7319 * regcache.h (struct target_desc): Forward declare.
7320 (struct regcache) <tdesc>: New field.
7321 (init_register_cache, new_register_cache): Add target_desc
7322 parameter.
7323 (regcache_invalidate_thread): Declare.
7324 (regcache_invalidate_one): Delete declaration.
7325 (regcache_release): Declare.
7326 (find_register_by_number, register_cache_size, register_size)
7327 (find_regno): Add target_desc parameter.
7328 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7329 declarations.
7330 * remote-utils.c: Include tdesc.h.
7331 (outreg, prepare_resume_reply): Adjust.
7332 * server.c: Include tdesc.h.
7333 (gdbserver_xmltarget): Delete declaration.
7334 (get_features_xml, process_serial_event): Adjust.
7335 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7336 declare.
7337 (struct process_info) <tdesc>: New field.
7338 (ipa_tdesc): Declare.
7339 * tdesc.c: New file.
7340 * tdesc.h: New file.
7341 * tracepoint.c: Include tdesc.h.
7342 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7343 (get_context_regcache): Adjust to pass ipa_tdesc down.
7344 (do_action_at_tracepoint): Adjust to get the register cache size
7345 from the context regcache's description.
7346 (traceframe_walk_blocks): Adjust to get the register cache size
7347 from the current trace frame's description.
7348 (traceframe_get_pc): Adjust to get current trace frame's
7349 description and pass it down.
7350 (gdb_collect): Adjust to get the register cache size from the
7351 IPA's description.
7352 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7353 (gdbserver_xmltarget): Delete.
7354 (initialize_low_tracepoint): Set the ipa's target description.
7355 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7356 (initialize_low_tracepoint): Set the ipa's target description.
7357 * linux-x86-low.c: Include tdesc.h.
7358 [__x86_64__] (is_64bit_tdesc): New.
7359 (ps_get_thread_area, x86_get_thread_area): Use it.
7360 (i386_cannot_store_register): Rename to ...
7361 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7362 (i386_cannot_fetch_register): Rename to ...
7363 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7364 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7365 to new interface.
7366 (target_regsets): Rename to ...
7367 (x86_regsets): ... this.
7368 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7369 interface.
7370 (x86_siginfo_fixup): Use is_64bit_tdesc.
7371 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7372 (tdesc_x32_avx_linux, tdesc_x32_linux)
7373 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7374 Declare.
7375 (x86_linux_update_xmltarget): Delete.
7376 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7377 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7378 (AMD64_LINUX_USER64_CS): New.
7379 (x86_linux_read_description): New, based on
7380 x86_linux_update_xmltarget.
7381 (same_process_callback): New.
7382 (x86_arch_setup_process_callback): New.
7383 (x86_linux_update_xmltarget): New.
7384 (x86_regsets_info): New.
7385 (amd64_linux_regs_info): New.
7386 (i386_linux_usrregs_info): New.
7387 (i386_linux_regs_info): New.
7388 (x86_linux_regs_info): New.
7389 (x86_arch_setup): Reimplement.
7390 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7391 (x86_emit_ops): Ditto.
7392 (the_low_target): Adjust. Install x86_linux_regs_info,
7393 x86_cannot_fetch_register, and x86_cannot_store_register.
7394 (initialize_low_arch): New.
7395 * linux-ia64-low.c (tdesc_ia64): Declare.
7396 (ia64_fetch_register): Adjust.
7397 (ia64_usrregs_info, regs_info): New globals.
7398 (ia64_regs_info): New function.
7399 (the_low_target): Adjust.
7400 (initialize_low_arch): New function.
7401 * linux-sparc-low.c (tdesc_sparc64): Declare.
7402 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7403 Adjust.
7404 (sparc_arch_setup): New function.
7405 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7406 (the_low_target): Adjust.
7407 (initialize_low_arch): New function.
7408 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7409 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7410 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7411 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7412 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7413 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7414 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7415 (tdesc_powerpc_isa205_vsx64l): Declare.
7416 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7417 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7418 (ppc_set_pc, ppc_get_hwcap): Adjust.
7419 (ppc_usrregs_info): Forward declare.
7420 (!__powerpc64__) ppc_regmap_adjusted: New global.
7421 (ppc_arch_setup): Adjust to the current process'es target
7422 description.
7423 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7424 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7425 (ppc_store_evrregset): Adjust.
7426 (target_regsets): Rename to ...
7427 (ppc_regsets): ... this, and make static.
7428 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7429 (ppc_regs_info): New function.
7430 (the_low_target): Adjust.
7431 (initialize_low_arch): New function.
7432 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7433 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7434 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7435 (tdesc_s390x_linux64v2): Declare.
7436 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7437 (s390_fill_gregset, s390_store_last_break): Adjust.
7438 (target_regsets): Rename to ...
7439 (s390_regsets): ... this, and make static.
7440 (s390_get_pc, s390_set_pc): Adjust.
7441 (s390_get_hwcap): New target_desc parameter, and use it.
7442 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7443 (s390_arch_setup): Adjust to set the current process'es target
7444 description. Don't adjust the regmap.
7445 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7446 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7447 (regs_info_3264): New globals.
7448 (s390_regs_info): New function.
7449 (the_low_target): Adjust.
7450 (initialize_low_arch): New function.
7451 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7452 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7453 [__mips64] (init_registers_mips_linux)
7454 (init_registers_mips_dsp_linux): Delete defines.
7455 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7456 (have_dsp): New global.
7457 (mips_read_description): New, based on mips_arch_setup.
7458 (mips_arch_setup): Reimplement.
7459 (get_usrregs_info): New function.
7460 (mips_cannot_fetch_register, mips_cannot_store_register)
7461 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7462 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7463 (target_regsets): Rename to ...
7464 (mips_regsets): ... this, and make static.
7465 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7466 (dsp_regs_info, regs_info): New globals.
7467 (mips_regs_info): New function.
7468 (the_low_target): Adjust.
7469 (initialize_low_arch): New function.
7470 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7471 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7472 Declare.
7473 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7474 (arm_read_description): New, with bits factored from
7475 arm_arch_setup.
7476 (arm_arch_setup): Reimplement.
7477 (target_regsets): Rename to ...
7478 (arm_regsets): ... this, and make static.
7479 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7480 (arm_regs_info): New function.
7481 (the_low_target): Adjust.
7482 (initialize_low_arch): New function.
7483 * linux-m68k-low.c (tdesc_m68k): Declare.
7484 (target_regsets): Rename to ...
7485 (m68k_regsets): ... this, and make static.
7486 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7487 (m68k_regs_info): New function.
7488 (m68k_arch_setup): New function.
7489 (the_low_target): Adjust.
7490 (initialize_low_arch): New function.
7491 * linux-sh-low.c (tdesc_sharch): Declare.
7492 (target_regsets): Rename to ...
7493 (sh_regsets): ... this, and make static.
7494 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7495 (sh_regs_info, sh_arch_setup): New functions.
7496 (the_low_target): Adjust.
7497 (initialize_low_arch): New function.
7498 * linux-bfin-low.c (tdesc_bfin): Declare.
7499 (bfin_arch_setup): New function.
7500 (bfin_usrregs_info, regs_info): New globals.
7501 (bfin_regs_info): New function.
7502 (the_low_target): Adjust.
7503 (initialize_low_arch): New function.
7504 * linux-cris-low.c (tdesc_cris): Declare.
7505 (cris_arch_setup): New function.
7506 (cris_usrregs_info, regs_info): New globals.
7507 (cris_regs_info): New function.
7508 (the_low_target): Adjust.
7509 (initialize_low_arch): New function.
7510 * linux-cris-low.c (tdesc_crisv32): Declare.
7511 (cris_arch_setup): New function.
7512 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7513 (cris_regs_info): New function.
7514 (the_low_target): Adjust.
7515 (initialize_low_arch): New function.
7516 * linux-m32r-low.c (tdesc_m32r): Declare.
7517 (m32r_arch_setup): New function.
7518 (m32r_usrregs_info, regs_info): New globals.
7519 (m32r_regs_info): Adjust.
7520 (initialize_low_arch): New function.
7521 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7522 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7523 (tic6x_usrregs_info): Forward declare.
7524 (tic6x_read_description): New function, based on ...
7525 (tic6x_arch_setup): ... this. Reimplement.
7526 (target_regsets): Rename to ...
7527 (tic6x_regsets): ... this, and make static.
7528 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7529 (tic6x_regs_info): New function.
7530 (the_low_target): Adjust.
7531 (initialize_low_arch): New function.
7532 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7533 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7534 (target_regsets): Rename to ...
7535 (xtensa_regsets): ... this, and make static.
7536 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7537 globals.
7538 (xtensa_arch_setup, xtensa_regs_info): New functions.
7539 (the_low_target): Adjust.
7540 (initialize_low_arch): New function.
7541 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7542 (nios2_arch_setup): Set the current process'es tdesc.
7543 (target_regsets): Rename to ...
7544 (nios2_regsets): ... this.
7545 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7546 (nios2_regs_info): New function.
7547 (the_low_target): Adjust.
7548 (initialize_low_arch): New function.
a261b8f5
PA
7549 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7550 (aarch64_arch_setup): Set the current process'es tdesc.
7551 (target_regsets): Rename to ...
7552 (aarch64_regsets): ... this.
7553 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7554 (aarch64_regs_info): New function.
7555 (the_low_target): Adjust.
7556 (initialize_low_arch): New function.
3aee8918
PA
7557 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7558 globals.
7559 (target_regsets): Rename to ...
7560 (tile_regsets): ... this.
7561 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7562 (tile_regs_info): New function.
7563 (tile_arch_setup): Set the current process'es tdesc.
7564 (the_low_target): Adjust.
7565 (initialize_low_arch): New function.
7566 * spu-low.c (tdesc_spu): Declare.
7567 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7568 * win32-arm-low.c (tdesc_arm): Declare.
7569 (arm_arch_setup): New function.
7570 (the_low_target): Install arm_arch_setup instead of
7571 init_registers_arm.
7572 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7573 (init_windows_x86): Rename to ...
7574 (i386_arch_setup): ... this. Set `win32_tdesc'.
7575 (the_low_target): Adjust.
7576 * win32-low.c (win32_tdesc): New global.
7577 (child_add_thread): Don't create the thread cache here.
7578 (do_initial_child_stuff): Set the new process'es tdesc.
7579 * win32-low.h (struct target_desc): Forward declare.
7580 (win32_tdesc): Declare.
7581 * lynx-i386-low.c (tdesc_i386): Declare global.
7582 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7583 * lynx-low.c (lynx_tdesc): New global.
7584 (lynx_add_process): Set the new process'es tdesc.
7585 * lynx-low.h (struct target_desc): Forward declare.
7586 (lynx_tdesc): Declare global.
7587 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7588 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7589 * nto-low.c (nto_tdesc): New global.
7590 (do_attach): Set the new process'es tdesc.
7591 * nto-low.h (struct target_desc): Forward declare.
7592 (nto_tdesc): Declare.
7593 * nto-x86-low.c (tdesc_i386): Declare.
7594 (nto_x86_arch_setup): Set `nto_tdesc'.
7595
b1fbec62
GB
75962013-06-04 Gary Benson <gbenson@redhat.com>
7597
7598 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7599 to qSupported response when appropriate.
7600 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7601 with nonzero-length annex.
7602 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7603 arguments supplied in annex.
7604
d1ec4ce7
DE
76052013-05-31 Doug Evans <dje@google.com>
7606
ac44adcb 7607 PR server/15594
d1ec4ce7
DE
7608 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7609 64 bits in 64-cross-32 environment.
7610
9b25f2d3
PA
76112013-05-28 Pedro Alves <palves@redhat.com>
7612
7613 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7614 (aarch64-without-fpu.c): Delete rule.
7615 * configure.srv (aarch64*-*-linux*): Remove references to
7616 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7617 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7618 declaration.
7619
6740dc9c
PA
76202013-05-24 Pedro Alves <palves@redhat.com>
7621
7622 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7623 instead of strchr/decode_address. Error if the range isn't split
7624 with a ','. Don't assume there's be a ':' in the action.
7625
c2d6af84
PA
76262013-05-23 Yao Qi <yao@codesourcery.com>
7627 Pedro Alves <palves@redhat.com>
7628
7629 * linux-low.c (lwp_in_step_range): New function.
7630 (linux_wait_1): If the thread was range stepping and stopped
7631 outside the stepping range, report the stop to GDB. Otherwise,
7632 continue stepping. Add range stepping debug output.
7633 (linux_set_resume_request): Copy the step range from the resume
7634 request to the lwp.
7635 (linux_supports_range_stepping): New.
7636 (linux_target_ops) <supports_range_stepping>: Set to
7637 linux_supports_range_stepping.
7638 * linux-low.h (struct linux_target_ops)
7639 <supports_range_stepping>: New field.
7640 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7641 * linux-x86-low.c (x86_supports_range_stepping): New.
7642 (the_low_target) <supports_range_stepping>: Set to
7643 x86_supports_range_stepping.
7644 * server.c (handle_v_cont): Handle 'r' action.
7645 (handle_v_requests): Append ";r" if the target supports range
7646 stepping.
7647 * target.h (struct thread_resume) <step_range_start,
7648 step_range_end>: New fields.
7649 (struct target_ops) <supports_range_stepping>:
7650 New field.
7651 (target_supports_range_stepping): New macro.
7652
58794e1a
JB
76532013-05-17 Joel Brobecker <brobecker@adacore.com>
7654
7655 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7656 confusion in comment.
7657
d631c5a7
JB
76582013-05-17 Joel Brobecker <brobecker@adacore.com>
7659
7660 * lynx-low.c (struct process_info_private): New type.
7661 (lynx_add_process): New function.
7662 (lynx_create_inferior, lynx_attach): Replace calls to
7663 add_process by calls to lynx_add_process.
7664 (lynx_resume): If PTID is null, then try using
7665 current_process()->private->last_wait_event_ptid.
7666 Add comments.
7667 (lynx_clear_inferiors): Delete. The contents of that function
7668 has been inlined in lynx_mourn;
7669 (lynx_wait_1): Save the ptid in the process's private data.
7670 (lynx_mourn): Free the process' private data. Replace call
7671 to lynx_clear_inferiors by call to clear_inferiors.
7672
96f7a20f
YQ
76732013-05-17 Yao Qi <yao@codesourcery.com>
7674
7675 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7676 the right place.
7677
db0dfaa0
LM
76782013-05-16 Luis Machado <lgustavo@codesourcery.com>
7679
7680 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7681 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7682 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7683 PT_TEXT_END_ADDR guards. Update comments.
7684 (linux_target_op) <read_offsets>: Conditionally define to
7685 linux_read_offsets if the target is UCLIBC and if it defines
7686 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7687
68f5f838
SL
76882013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7689 Andrew Jenner <andrew@codesourcery.com>
7690
7691 * Makefile.in (SFILES): Add linux-nios2-low.c.
7692 (clean): Add action to delete nios2-linux.c.
7693 (nios2-linux.c): New rule.
7694 * configure.srv: Add nios2*-*-linux*.
7695 * linux-nios2-low.c: New.
7696
1ebff1fd
HAQ
76972013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7698
7699 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7700
f6150862
HZ
77012013-04-25 Hui Zhu <hui@codesourcery.com>
7702
7703 PR gdb/15186
f6150862
HZ
7704 * ax.c (ax_printf): Add fflush.
7705
614c279d
TT
77062013-04-22 Tom Tromey <tromey@redhat.com>
7707
7708 * Makefile.in (SFILES): Add filestuff.c.
7709 (OBS): Add filestuff.o.
7710 (filestuff.o): New target.
7711 * config.in, configure: Rebuild.
7712 * configure.ac: Check for fdwalk, pipe2.
7713
7d4e5717
PA
77142013-04-17 Pedro Alves <palves@redhat.com>
7715
7716 * configure.ac (USE_THREAD_DB): Delete variable.
7717 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7718 Don't AC_SUBST USE_THREAD_DB.
7719 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7720 * config.in, configure: Regenerate.
7721
d5c93e41
PA
77222013-04-16 Pedro Alves <palves@redhat.com>
7723
7724 * linux-low.h (struct lwp_info) <thread_known>: Move under
7725 the USE_THREAD_DB #ifdef.
7726
04f5fe89
PA
77272013-04-16 Pedro Alves <palves@redhat.com>
7728
7729 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7730 (linux-low.o): Delete rule.
7731 * linux-low.h: Always include "gdb_thread_db.h" instead of
7732 conditionally including thread_db.h.
7733 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7734 HAVE_THREAD_DB_H.
7735
480b27bf
JK
77362013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7737
7738 * Makefile.in (install-only): Fix make install regression.
7739
43662968
JK
77402013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7741
7742 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7743 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7744 installation.
7745 * gdbserver.1: Remove.
7746
3e74e146
PA
77472013-03-22 Pedro Alves <palves@redhat.com>
7748
7749 * linux-low.c (handle_extended_wait): Don't call
7750 linux_enable_event_reporting.
7751
a8347a2a
TT
77522013-03-15 Tony Theodore <tonyt@logyst.com>
7753
7754 PR build/9098:
7755 * Makefile.in (SHELL): Use @SHELL@.
7756
eeb56fa7
SDJ
77572013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7758
7759 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7760 compiler warning.
7761
4fa7e2ff
JB
77622013-03-13 Joel Brobecker <brobecker@adacore.com>
7763
7764 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7765 Remove extraneous NULL element.
7766
8ddb1965
YQ
77672013-03-13 Yao Qi <yao@codesourcery.com>
7768
7769 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7770 'V' block in trace frame.
7771
9accd112
MM
77722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7773
7774 * target.h (struct target_ops): Add btrace ops.
7775 (target_supports_btrace): New macro.
7776 (target_enable_btrace): New macro.
7777 (target_disable_btrace): New macro.
7778 (target_read_btrace): New macro.
7779 * gdbthread.h (struct thread_info): Add btrace field.
7780 * server.c: Include btrace-common.h.
7781 (handle_btrace_general_set): New function.
7782 (handle_btrace_enable): New function.
7783 (handle_btrace_disable): New function.
7784 (handle_general_set): Call handle_btrace_general_set.
7785 (handle_qxfer_btrace): New function.
7786 (struct qxfer qxfer_packets[]): Add btrace entry.
7787 * inferiors.c (remove_thread): Disable btrace.
7788 * linux-low: Include linux-btrace.h.
7789 (linux_low_enable_btrace): New function.
7790 (linux_low_read_btrace): New function.
7791 (linux_target_ops): Add btrace ops.
7792 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7793 Add srv_linux_btrace=yes.
7794 (x86_64-*-linux*): Add linux-btrace.o.
7795 Add srv_linux_btrace=yes.
7796 * configure.ac: Define HAVE_LINUX_BTRACE.
7797 * config.in: Regenerated.
7798 * configure: Regenerated.
7799
5cc22e4c
MM
78002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7801
7802 * server.c (handle_qxfer): Preserve error message if -3 is
7803 returned.
7804 (qxfer): Document the -3 return value.
7805
7c97f91e
MM
78062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7807
7808 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7809 (linux_btrace_h): New variable.
7810 (linux-btrace.o): New rule.
7811
be9a119c 78122013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7813 Hafiz Abid Qadeer <abidh@codesourcery.com>
7814
7815 * tracepoint.c (trace_buffer_size): New global.
7816 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7817 (init_trace_buffer): Change to one-argument function. Allocate
7818 trace buffer memory.
7819 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7820 handle QTBuffer:size packet.
7821 (cmd_bigqtbuffer_size): New function.
7822 (initialize_tracepoint): Call init_trace_buffer with
7823 DEFAULT_TRACE_BUFFER_SIZE.
7824 * server.c (handle_query): Add QTBuffer:size in the
7825 supported packets.
7826
e64f7499
YQ
78272013-03-07 Yao Qi <yao@codesourcery.com>
7828
7829 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7830 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7831 of -1.
7832 (cmd_qtsp): Adjust condition. Do post increment.
7833 Set cur_action and cur_step_action back to 0.
7834
f0ae6fc3
PA
78352013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7836
7837 PR server/15236
7838 * linux-low.c (linux_write_memory): Return early success if LEN is
7839 zero.
7840
b5b0b0af
CV
78412013-03-05 Corinna Vinschen <vinschen@redhat.de>
7842
334ad4a8 7843 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7844
589bc927
TT
78452013-02-28 Tom Tromey <tromey@redhat.com>
7846
7847 * configure.ac: Invoke AC_SYS_LARGEFILE.
7848 * configure, config.in: Rebuild.
7849
dfe07582
CV
78502013-02-28 Corinna Vinschen <vinschen@redhat.com>
7851
7852 * win32-low.c: Throughout, fix format strings and casts of
7853 printf-like functions to avoid type related warnings on all
7854 platforms.
7855 (get_child_debug_event): Print dwDebugEventCode as hex since
7856 that's how it's usually documented.
7857
736cd585
YQ
78582013-02-28 Yao Qi <yao@codesourcery.com>
7859
7860 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7861 pulongest.
7862
e1f58301
JW
78632013-02-27 Jiong Wang <jiwang@tilera.com>
7864
7865 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7866 (reg-tilegx32.c): New rule.
7867 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7868 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7869 different register info initializer according to elf class.
7870 (init_registers_tilgx32): New function. The tilegx32 register info
7871 initializer.
7872 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7873 (tile_store_gregset): Likewise.
7874
d171ca78
YQ
78752013-02-27 Yao Qi <yao@codesourcery.com>
7876
7877 * server.c (process_point_options): Print debug message when
7878 debug_threads is true.
7879
282bbdf3
YQ
78802013-02-26 Yao Qi <yao@codesourcery.com>
7881
7882 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7883
aca22551
PA
78842013-02-19 Pedro Alves <palves@redhat.com>
7885 Kai Tietz <ktietz@redhat.com>
7886
7887 PR gdb/15161
7888
7889 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7890 instead of strtoul to extract address from packet.
7891 (process_serial_event) <'z'>: Likewise.
7892
4f3cee1c
YQ
78932013-02-18 Yao Qi <yao@codesourcery.com>
7894
7895 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7896
8e1d55a3
PA
78972013-02-14 Pedro Alves <palves@redhat.com>
7898
7899 Plug memory leak.
7900
7901 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7902 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7903
458820da
PA
79042013-02-14 Pedro Alves <palves@redhat.com>
7905
7906 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7907
baea0dae
PA
79082013-02-14 Pedro Alves <palves@redhat.com>
7909
7910 * tracepoint.c (save_string): Delete.
7911 (add_tracepoint_action): Use savestring instead of save_string.
7912
0b1afbb3
PA
79132013-02-12 Pedro Alves <palves@redhat.com>
7914
7915 * linux-xtensa-low.c: Ditto.
7916 * xtensa-xtregs.c: Ditto.
7917
8a4ac37e
PA
79182013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7919
7920 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7921 thread_db.
7922
148de6bb
MS
79232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7924
7925 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7926 aarch64_num_wp_regs and aarch64_num_bp_regs to
7927 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7928
55fac6e0
MS
79292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7930
7931 * linux-aarch64-low.c (ps_get_thread_area): Replace
7932 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7933
176eb98c
MS
79342013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7935 Marcus Shawcroft <marcus.shawcroft@arm.com>
7936 Nigel Stephens <nigel.stephens@arm.com>
7937 Yufeng Zhang <yufeng.zhang@arm.com>
7938
7939 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7940 (aarch64.c, aarch64-without-fpu.c): New targets.
7941 * configure.srv (aarch64*-*-linux*): New.
7942 * linux-aarch64-low.c: New file.
7943
56f7af9c
MS
79442013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7945
43aaf8b6 7946 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7947 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7948 (dequeue_one_deferred_signal, linux_resume_one_thread)
7949 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7950 (linux_tracefork_grandchild, linux_test_for_tracefork)
7951 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7952 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7953 where the argument is 0.
7954
60f662b0
YQ
79552013-01-25 Yao Qi <yao@codesourcery.com>
7956
7957 * event-loop.c: Include "queue.h".
7958 (gdb_event_p): New typedef.
7959 (struct gdb_event) <next_event>: Remove.
7960 (event_queue): Change to QUEUE(gdb_event_p).
7961 (async_queue_event): Remove.
7962 (gdb_event_xfree): New.
7963 (initialize_event_loop): New.
7964 (process_event): Use API from QUEUE.
7965 (wait_for_event): Likewise.
7966 * server.c (main): Call initialize_event_loop.
7967 * server.h (initialize_event_loop): Declare.
7968
5ae4861a
YQ
79692013-01-18 Yao Qi <yao@codesourcery.com>
7970
7971 * ax.h (struct eval_agent_expr_context): New.
7972 (gdb_eval_agent_expr): Update declaration.
7973 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7974 TFRAME. Add new argument CTX.
7975 * server.h (struct eval_agent_expr_context): Declare.
7976 (agent_mem_read, agent_tsv_read): Update declaration.
7977 (agent_mem_read_string): Likewise.
7978 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7979 (add_traceframe_block): Add new argument TPOINT.
7980 Increase TPOINT->traceframe_usage.
7981 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7982 eval_tracepoint_agent_expr.
7983 (condition_true_at_tracepoint): Likewise.
7984 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7985 (agent_mem_read_string, agent_tsv_read): Likewise.
7986
85e00e85
YQ
79872013-01-16 Yao Qi <yao@codesourcery.com>
7988
7989 * linux-low.c (linux_resume_one_lwp): Don't check
7990 'lwp->bp_reinsert != 0'.
7991
4039cf45
JB
79922013-01-07 Joel Brobecker <brobecker@adacore.com>
7993 Pedro Alves <palves@redhat.com>
7994
7995 * lynx-low.c (ptrace_request_to_str): Define a temporary
7996 macro and use it to simplify this function's implementation.
7997
9044dee2
JB
79982013-01-07 Joel Brobecker <brobecker@adacore.com>
7999
8000 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8001 sets errno.
8002
e6352c8f
JB
80032013-01-07 Joel Brobecker <brobecker@adacore.com>
8004
8005 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8006
50681a27
JB
80072013-01-07 Joel Brobecker <brobecker@adacore.com>
8008
8009 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8010
3f6e77ef
JB
80112013-01-07 Joel Brobecker <brobecker@adacore.com>
8012
8013 * lynx-low.c (lynx_resume): Use the resume_info parameter
8014 to determine the ptid for the lynx_ptrace call, unless
8015 it is equal to minus_one_ptid, in which case we use the
8016 ptid of the current_inferior.
8017 (lynx_wait_1): After having received a thread create/exit
8018 event, resume the inferior's execution using the signaling
8019 thread's ptid, rather than the old ptid.
8020
7fda33ae
JB
80212013-01-07 Joel Brobecker <brobecker@adacore.com>
8022
8023 * lynx-low.c (lynx_resume): Delete variable ret.
8024
b9786c74
JB
80252013-01-01 Joel Brobecker <brobecker@adacore.com>
8026
8027 * gdbreplay.c (gdbreplay_version): Update copyright year.
8028 * server.c (gdbserver_version): Likewise.
8029
8b93d60f
JB
80302012-12-17 Joel Brobecker <brobecker@adacore.com>
8031
8032 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8033 new thread.
8034
037335a7
JB
80352012-12-17 Joel Brobecker <brobecker@adacore.com>
8036
8037 * lynx-low.c (ptrace_request_to_str): Add handling for
8038 PTRACE_GETTRACESIG.
8039
52d4cbd8
JB
80402012-12-17 Joel Brobecker <brobecker@adacore.com>
8041
8042 * lynx-low.c (lynx_attach): Delete variable new_process.
8043
ab8f6ca9
JB
80442012-12-17 Joel Brobecker <brobecker@adacore.com>
8045
8046 * lynx-low.c (lynx_create_inferior): Delete variable
8047 new_process.
8048
78cbc024
JB
80492012-12-17 Joel Brobecker <brobecker@adacore.com>
8050
8051 * lynx-low.c (ptrace_request_to_str): Do not handle
8052 PTRACE_GETTHREADLIST if this macro does not exist.
8053
14a00470
YQ
80542012-12-15 Yao Qi <yao@codesourcery.com>
8055
8056 * Makefile.in (OBS): Add notif.o.
8057 * notif.c, notif.h: New.
8058 * server.c: Include "notif.h".
8059 (struct vstop_notif) <next>: Remove.
8060 <base>: New field.
8061 (queue_stop_reply): Update.
8062 (push_event, send_next_stop_reply): Remove.
8063 (discard_queued_stop_replies): Update.
8064 (notif_stop): New variable.
8065 (handle_v_stopped): Remove.
8066 (handle_v_requests): Don't call handle_v_stopped. Call
8067 handle_ack_notif instead.
8068 (queue_stop_reply_callback): Call notif_event_enque instead
8069 of queue_stop_reply.
8070 (handle_status): Don't call send_next_stop_reply, call
8071 notif_write_event instead.
8072 (kill_inferior_callback): Likewise.
8073 (detach_or_kill_inferior_callback): Likewise.
8074 (main): Call initialize_notif.
8075 (process_serial_event): Call QUEUE_is_empty.
8076 (handle_target_event): Call notif_push instead of push event.
8077 * server.h (push_event): Remove declaration.
8078
61c125b9
TT
80792012-12-10 Tom Tromey <tromey@redhat.com>
8080
8081 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8082 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8083 macros.
8084 (.c.o): Rewrite.
8085 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8086 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8087 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8088 (amd64-linux-ipa.o, ax.o): Rewrite.
8089 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8090 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8091 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8092 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8093 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8094 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8095 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8096 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8097 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8098 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8099 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8100 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8101 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8102 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8103 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8104 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8105 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8106 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8107 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8108 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8109 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8110 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8111 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8112 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8113 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8114 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8115 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8116 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8117 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8118 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8119 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8120 (reg-tilegx.o): Remove.
8121 (all_object_files): New macro.
8122 Include .deps files.
8123 * aclocal.m4, configure: Rebuild.
8124 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8125 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8126 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8127
e90e9ad9
TT
81282012-12-05 Tom Tromey <tromey@redhat.com>
8129
8130 PR gdb/14917:
8131 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8132
02d403bf 81332012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8134
8135 * configure.ac: Check for linux/perf_event.h.
8136 * config.in: Regenerated.
8137 * configure: Regenerated.
8138
0270a750
PA
81392012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8140
8141 * hostio.c (handle_readlink): Decrease buffer size
8142 parameter passed to readlink by one byte.
8143
8c29b58e
YQ
81442012-11-26 Yao Qi <yao@codesourcery.com>
8145
8146 * configure.ac (build_warnings): Append '-Wempty-body'.
8147 * configure: Regenerated.
8148 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8149 body.
8150
8bdce1ff
PM
81512012-11-15 Pierre Muller <muller@sourceware.org>
8152
8153 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8154 * config.in: Regenerate.
8155 * configure: Regenerate.
8156 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8157 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8158 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8159 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8160 header.
8161 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8162 instead of <sys/wait.h> header.
8163 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8164
02d403bf 81652012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8166
8167 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8168 (various make rules): Remove -DGDBSERVER
8169
fbd5db48
YQ
81702012-11-09 Yao Qi <yao@codesourcery.com>
8171
8172 * spu-low.c (current_ptid): Move it to ..
8173 * gdbthread.h: ... here. New.
8174 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8175 * server.c (myresume, process_serial_event): Likewise.
8176 * thread-db.c (thread_db_find_new_threads): Likewise.
8177 * tracepoint.c (run_inferior_command): Likewise.
8178
b3dc46ff
AB
81792012-10-01 Andrew Burgess <aburgess@broadcom.com>
8180
8181 * server.c (handle_search_memory_1): Include access length in
8182 warning message.
8183
07c04788
HPN
81842012-09-05 Michael Brandt <michael.brandt@axis.com>
8185
8186 * linux-crisv32-low.c: Fix compile errors.
8187
918d227b
YQ
81882012-09-04 Yao Qi <yao@codesourcery.com>
8189
8190 * tracepoint.c (cmd_qtsv): Adjust debug message.
8191 Don't check CUR_TPOINT.
8192
18c1b81a
YQ
81932012-08-28 Yao Qi <yao@codesourcery.com>
8194
8195 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8196 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8197 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8198 Remove declarations of xmalloc, xreallloc, xstrdup and
8199 freeargv.
8200 * Makefile.in (libiberty_h): New.
8201 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8202 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8203
dc82f37b
YQ
82042012-08-23 Yao Qi <yao@codesourcery.com>
8205
8206 * server.h: Remove declaration of 'xsnprintf'.
8207
406b1477
KS
82082012-08-22 Keith Seitz <keiths@redhat.com>
8209
8210 * server.h: Include build-gnulib-gbserver/config.h.
8211 * gdbreplay.c: Likewise.
8212
e6712ff1
DE
82132012-08-08 Doug Evans <dje@google.com>
8214
8215 * Makefile.in (SFILES): Add gdb_vecs.c.
8216 (OBS): Add gdb_vecs.o.
8217 (gdb_vecs_h, host_defs_h): New variables.
8218 (thread-db.o): Add $(gdb_vecs_h) dependency.
8219 (gdb_vecs.o): New rule.
8220 * thread-db.c: #include "gdb_vecs.h".
8221 (thread_db_load_search): Use a vector to iterate over path elements.
8222 Handle text appearing after "$pdir".
8223
8224 * configure.ac: Add check for strstr.
8225 * config.in: Regenerate.
8226 * configure: Regenerate.
8227
7c3270ae
UW
82282012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8229
8230 * hostio.c (handle_pread): If pread fails, fall back to attempting
8231 lseek/read.
8232 (handle_pwrite): Likewise for pwrite.
8233
b62e2b27
UW
82342012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8235
8236 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8237 between unsupported TYPE and unimplementable ADDR/LEN combination.
8238 (arm_insert_point): Act on new return value.
8239
78a99e91
PA
82402012-07-31 Pedro Alves <palves@redhat.com>
8241
8242 * server.c (process_point_options): Only skip tokens if we find
8243 one that is unrecognized. Don't treat 'X' specially while
8244 skipping unrecognized tokens.
8245
fcf303ab
UW
82462012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8247
8248 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8249 to 4-byte-align HW breakpoint addresses for Thumb.
8250
7255706c
YQ
82512012-07-27 Yao Qi <yao@codesourcery.com>
8252
8253 PR remote/14161.
8254
8255 * server.h: Declare gdb_agent_about_to_close.
8256 * target.c (kill_inferior): Include "agent.h".
8257 New. Send command 'kill'.
8258 * target.h (kill_inferior): Removed macro.
8259 * tracepoint.c (gdb_agent_about_to_close): New.
8260 (gdb_agent_helper_thread): Handle command 'close'.
8261 Wait endlessly until the inferior stops.
8262 Install gdb_agent_remove_socket to atexit hook.
8263 (agent_socket_name): New static variable.
8264 (gdb_agent_socket_init): Replace local variable 'name' with
8265 'agent_socket_name'.
8266 (gdb_agent_remove_socket): New.
8267
5a3f286f
YQ
82682012-07-27 Yao Qi <yao@codesourcery.com>
8269
8270 * server.c (process_point_options): Stop at 'X' when parsing.
8271
961bd387
ME
82722012-07-19 Michael Eager <eager@eagercon.com>
8273
a261b8f5 8274 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8275 to hw_execute.
8276 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8277 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8278 hardware breakpoint.
8279
aa7c7447
JK
82802012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8281
8282 * gdbserver/linux-low.c (initialize_low): Call
8283 linux_ptrace_init_warnings.
8284
7f216e7c
DE
82852012-07-02 Doug Evans <dje@google.com>
8286
8287 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8288 pointer to int.
8289
d3ce09f5
SS
82902012-07-02 Stan Shebs <stan@codesourcery.com>
8291
8292 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8293 (ax.o): Add it to build rule.
8294 (ax-ipa.o): Ditto.
8295 (OBS): Add format.o.
8296 (IPA_OBS): Add format.o.
8297 * server.c (handle_query): Claim support for breakpoint commands.
8298 (process_point_options): Add command case.
8299 (process_serial_event): Leave running if there are printfs in
8300 effect.
8301 * mem-break.h (any_persistent_commands): Declare.
8302 (add_breakpoint_commands): Declare.
8303 (gdb_no_commands_at_breakpoint): Declare.
8304 (run_breakpoint_commands): Declare.
8305 * mem-break.c (struct point_command_list): New struct.
8306 (struct breakpoint): New field command_list.
8307 (any_persistent_commands): New function.
8308 (add_commands_to_breakpoint): New function.
8309 (add_breakpoint_commands): New function.
8310 (gdb_no_commands_at_breakpoint): New function.
8311 (run_breakpoint_commands): New function.
8312 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8313 locally.
8314 * ax.c: Include format.h.
8315 (ax_printf): New function.
8316 (gdb_eval_agent_expr): Add printf opcode.
8317
2f8f6aed
YQ
83182012-06-13 Yao Qi <yao@codesourcery.com>
8319
8320 * server.c (start_inferior): Remove duplicated writes to fields
8321 'last_resume_kind' and 'last_status' of 'current_inferior'.
8322
0c9070b3
YQ
83232012-06-12 Yao Qi <yao@codesourcery.com>
8324 Pedro Alves <palves@redhat.com>
8325
8326 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8327 comment.
8328 * server.c (handle_v_cont): Extend comment.
8329
c52daf70
YQ
83302012-06-11 Yao Qi <yao@codesourcery.com>
8331
8332 * linux-low.c (linux_attach): Add 'static'.
8333
d38bbb0a
YQ
83342012-06-06 Yao Qi <yao@codesourcery.com>
8335
8336 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8337
89dc0afd
JK
83382012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8339
8340 Fix gcc -flto compilation warning.
8341 * server.c (main): Make variable multi_mode and attach volatile.
8342
75f62ce7
TJB
83432012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8344
8345 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8346 if the platform doesn't know about it.
8347
65f479b6
PA
83482012-05-30 Jeff Kenton <jkenton@tilera.com>
8349
8350 * Makefile.in (SFILES): Add linux-tile-low.c.
8351 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8352 * configure.srv: Handle tilegx-*-linux*.
8353 * linux-tile-low.c: New file.
8354
0c5bf5a9
JK
83552012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8356
8357 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8358
a493e3e2
PA
83592012-05-24 Pedro Alves <palves@redhat.com>
8360
8361 PR gdb/7205
8362
43aaf8b6 8363 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8364
2ea28649
PA
83652012-05-24 Pedro Alves <palves@redhat.com>
8366
8367 PR gdb/7205
8368
8369 Replace target_signal with gdb_signal throughout.
8370
8d409d16
MR
83712012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8372
8373 * linux-low.c (linux_store_registers): Avoid the copying sequence
8374 when no data has been retrieved by ptrace.
8375
23512c01
MGD
83762012-05-22 Will Deacon <will.deacon@arm.com>
8377
8378 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8379 Include asm/ptrace.h.
8380 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8381 already defined.
8382
4934b29e
MR
83832012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8384
8385 * linux-low.c (linux_store_registers): Don't re-retrieve data
8386 with ptrace that has already been obtained from /proc. Always
8387 copy any data retrieved with ptrace to the buffer supplied.
8388
bde24c0a
PA
83892012-05-11 Yao Qi <yao@codesourcery.com>
8390 Pedro Alves <palves@redhat.com>
8391
8392 * linux-low.c (enum stopping_threads_kind): New.
8393 (stopping_threads): Change type to `enum stopping_threads_kind'.
8394 (handle_extended_wait): If stopping and suspending threads, leave
8395 the new_lwp suspended too.
8396 (linux_wait_for_event): Adjust.
8397 (stop_all_lwps): Set `stopping_threads' to
8398 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8399 whether we're suspending threads or just stopping them. Assert no
8400 recursion happens.
8401
623b6bdf
YQ
84022012-04-29 Yao Qi <yao@codesourcery.com>
8403
8404 * server.h: Move some code to ...
8405 * gdbthread.h: ... here. New.
8406 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8407 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8408 (nto-low.o, win32-low.o): Likewise.
8409 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8410 * regcache.c, remote-utils.c, server.c: Likewise.
8411 * target.c, tracepoint.c, win32-low.c: Likewise.
8412
f15f9948
TJB
84132012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8414
8415 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8416 (PTRACE_ARG4_TYPE): Likewise.
8417 (PTRACE_XFER_TYPE): Likewise.
8418 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8419 ptrace to PTRACE_ARG3_TYPE.
8420 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8421 (PTRACE_ARG4_TYPE): Likewise.
8422 (PTRACE_XFER_TYPE): Likewise.
8423 (linux_detach_one_lwp): Cast fourth argument of
8424 ptrace to long then PTRACE_ARG4_TYPE.
8425 (regsets_fetch_inferior_registers): Cast third argument of
8426 ptrace to long then PTRACE_ARG3_TYPE.
8427 (regsets_store_inferior_registers): Likewise.
8428
38ea300a
PA
84292012-04-20 Pedro Alves <palves@redhat.com>
8430
8431 * configure: Regenerate.
8432
c971b7fa
PA
84332012-04-19 Pedro Alves <palves@redhat.com>
8434
43aaf8b6 8435 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8436 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8437 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8438 (all, install-only, uninstall, clean-info, all-lib, clean): No
8439 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8440 (maintainer-clean realclean distclean): Use subdir_do.
8441 (subdir_do): New.
8442 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8443 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8444 * acinclude.m4: Include acx_configure_dir.m4.
8445 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8446 calls. Call AC_PROG_RANLIB. Configure gnulib using
8447 ACX_CONFIGURE_DIR.
8448 (GNULIB): New.
8449 (GNULIB_STDINT_H): Adjust.
8450 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8451 * gdbreplay.c: Include build-gnulib/config.h.
8452 * server.h: Likewise.
8453 * aclocal.m4: Regenerate.
8454 * config.in: Regenerate.
8455 * configure: Regenerate.
c971b7fa 8456
809277f8
PA
84572012-04-19 Pedro Alves <palves@redhat.com>
8458
8459 * Makefile.in (LIBGNU, INCGNU): Adjust.
8460 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8461 (all, install-only, uninstall, clean-info, all-lib, clean)
8462 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8463 * configure.ac: Adjust AC_OUTPUT output.
8464 * aclocal.m4: Regenerate.
8465 * configure: Regenerate.
8466
fd9bb8b8
PA
84672012-04-19 Pedro Alves <palves@redhat.com>
8468
8469 * Makefile.in (generated_files): New.
8470 (server_h): Remove the explicit dependency on config.h, and depend
8471 on $generated_files.
8472
1c298c66
PA
84732012-04-19 Pedro Alves <palves@redhat.com>
8474
8475 * Makefile.in (INCGNU): Add -Ignulib.
8476
57c4b50b
PA
84772012-04-19 Pedro Alves <palves@redhat.com>
8478
8479 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8480 (INCGNU): ... this, and spell out -I here.
8481 (GNULIB_LIB): Rename to ...
8482 (LIBGNU): ... this.
8483 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8484
1030e047
PA
84852012-04-19 Pedro Alves <palves@redhat.com>
8486
8487 * config.in: Regenerate.
8488
447d4319
PA
84892012-04-19 Pedro Alves <palves@redhat.com>
8490
8491 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8492 * server.h (memmem): Remove declaration.
8493 * config.in: Regenerate.
8494 * configure: Regenerate.
8495
aad9eab9
YQ
84962012-04-19 Yao Qi <yao@codesourcery.com>
8497
8498 * Makefile.in (SFILES): Add common/vec.c.
8499 (OBS): Add vec.o.
8500 (vec.o): New rule.
8501
3e10640f
YQ
85022012-04-19 Yao Qi <yao@codesourcery.com>
8503
8504 * remote-utils.c (prepare_resume_reply): Replace with macro
8505 target_core_of_thread.
8506 * server.c (handle_qxfer_threads_proper): Likewise.
8507 * target.h (traget_core_of_thread): New macro.
8508
71622373
PA
85092012-04-18 Pedro Alves <palves@redhat.com>
8510
8511 * aclocal.m4: Regenerate.
8512 * configure: Regenerate.
8513
80d26939
YQ
85142012-04-16 Yao Qi <yao@codesourcery.com>
8515
8516 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8517 duplicated on address.
8518
42476b70
YQ
85192012-04-16 Yao Qi <yao@codesourcery.com>
8520
8521 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8522 (struct tracepoint_action_ops) <send>: New field.
8523 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8524 (agent_expr_send, x_tracepoint_action_send): New.
8525 (l_tracepoint_action_send): New.
8526 (cmd_qtdp): Download and install tracepoint
8527 according to `use_agent'.
8528 (run_inferior_command): Add one more parameter `len'.
8529 Update callers.
8530 (tracepoint_send_agent): New.
8531 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8532
7bc83639
YQ
85332012-04-16 Yao Qi <yao@codesourcery.com>
8534
8535 * tracepoint.c (download_tracepoints): Moved to ...
8536 (cmd_qtstart): ... here.
8537
5f18041e
YQ
85382012-04-14 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c: Include inttypes.h.
8541 (struct collect_memory_action): Use sized types.
8542 (struct tracepoint): Likewise.
8543 (cmd_qtdp, stop_tracing): Update print specifiers.
8544 (cmd_qtp, response_tracepoint): Likewise.
8545 (collect_data_at_tracepoint): Likewise.
8546 (collect_data_at_step): Likewise.
8547
55a8c076
YQ
85482012-04-14 Yao Qi <yao@codesourcery.com>
8549
8550 Import gnulib module inttypes.
8551 * aclocal.m4, config.in, configure: Regenerated.
8552
dc750257
YQ
85532012-04-14 Yao Qi <yao@codesourcery.com>
8554
8555 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8556 Makefile and config.status at last.
8557
0ab5faf9
YQ
85582012-04-13 Yao Qi <yao@codesourcery.com>
8559
8560 * tracepoint.c: Include stdint.h unconditionally.
8561
18f5fd81
TJB
85622012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8563
8564 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8565 on BFD_HAVE_SYS_PROCFS_TYPE.
8566 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8567 * configure: Regenerate.
8568 * config.in: Likewise.
8569
4d47af5c
L
85702012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8571
8572 * Makefile.in (clean): Also remove x32.c x32-linux.c
8573 x32-avx.c x32-avx-linux.c.
8574 (x32.o): New target.
8575 (x32.c): Likewise.
8576 (x32-linux.o): Likewise.
8577 (x32-linux.c): Likewise.
8578 (x32-avx.o): Likewise.
8579 (x32-avx.c): Likewise.
8580 (x32-avx-linux.o): Likewise.
8581 (x32-avx-linux.c): Likewise.
8582
8583 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8584 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8585 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8586 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8587 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8588 i386/x32-avx-linux.xml.
8589
8590 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8591 (init_registers_x32_avx_linux): Likwise.
8592 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8593 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8594
ecedbe58
PA
85952012-04-13 Pedro Alves <palves@redhat.com>
8596
8597 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8598 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8599 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8600 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8601 the sub-make.
8602
c92b5177
L
86032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8604
8605 * linux-x86-low.c (compat_x32_clock_t): New.
8606 (compat_x32_siginfo_t): Likewise.
8607 (compat_x32_siginfo_from_siginfo): Likewise.
8608 (siginfo_from_compat_x32_siginfo): Likewise.
8609 (linux_is_elf64): Likewise.
8610 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8611 and siginfo_from_compat_x32_siginfo for x32.
8612 (x86_arch_setup): Set linux_is_elf64.
8613
214d508e
L
86142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8615
8616 PR gdb/13969
8617 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8618 e_machine field.
8619 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8620 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8621 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8622 compatible with process.
8623
c9a1864a
YQ
86242012-04-12 Yao Qi <yao@codesourcery.com>
8625
8626 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8627 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8628 (install-only, install-info, clean): Handle sub dir gnulib.
8629 (all-lib, am--refresh): New targets.
8630 (memmem.o): Remove target.
8631 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8632 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8633 (AC_REPLACE_FUNCS): Remove memmem.
8634 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8635 (AC_OUTPUT): Generate Makefile in gnulib/.
8636 * aclocal.m4, config.in, configure: Regenerated.
8637
367ba2c2
MR
86382012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8639
8640 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8641
9d236627
PA
86422012-04-05 Pedro Alves <palves@redhat.com>
8643
8644 -Werror=strict-aliasing
8645
8646 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8647 pointer.
8648
111217b3
PA
86492012-04-04 Pedro Alves <palves@redhat.com>
8650
8651 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8652 (sparc_store_gregset_from_stack, sparc_store_gregset)
8653 (sparc_breakpoint_at): Fix formatting.
8654
8365dcf5
TJB
86552012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8656
8657 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8658 are available.
8659 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8660 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8661 * config.in: Regenerate.
8662 * configure: Likewise.
8663
689cc2ae
PA
86642012-03-29 Pedro Alves <palves@redhat.com>
8665
8666 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8667 Correct ptrace arguments.
8668
c14dfd32
PA
86692012-03-28 Pedro Alves <palves@redhat.com>
8670
8671 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8672 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8673 (IA64_FR1_REGNUM): New defines.
8674 (ia64_fetch_register): New.
8675 (the_low_target): Install it.
8676 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8677 field.
8678 * linux-low.c (linux_fetch_registers): Try the
8679 the_low_target.fetch_register hook first.
8680
8681 * linux-arm-low.c (the_low_target): Adjust.
8682 * linux-bfin-low.c (the_low_target): Adjust.
8683 * linux-cris-low.c (the_low_target): Adjust.
8684 * linux-crisv32-low.c (the_low_target): Adjust.
8685 * linux-m32r-low.c (the_low_target): Adjust.
8686 * linux-m68k-low.c (the_low_target): Adjust.
8687 * linux-mips-low.c (the_low_target): Adjust.
8688 * linux-ppc-low.c (the_low_target): Adjust.
8689 * linux-s390-low.c (the_low_target): Adjust.
8690 * linux-sh-low.c (the_low_target): Adjust.
8691 * linux-sparc-low.c (the_low_target): Adjust.
8692 * linux-tic6x-low.c (the_low_target): Adjust.
8693 * linux-x86-low.c (the_low_target): Adjust.
8694 * linux-xtensa-low.c (the_low_target): Adjust.
8695
63c88e13
PA
86962012-03-26 Pedro Alves <palves@redhat.com>
8697
8698 * server.c (handle_qxfer_libraries): Don't bail early if
8699 the_target->qxfer_libraries_svr4 is not NULL.
8700
fb723180
PA
87012012-03-26 Pedro Alves <palves@redhat.com>
8702
8703 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8704
0afae3cf
PA
87052012-03-23 Pedro Alves <palves@redhat.com>
8706
8707 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8708 "library-list-svr4" element's start tag when the the DSO list is
8709 empty.
8710
485f1ee4
PA
87112012-03-23 Pedro Alves <palves@redhat.com>
8712
8713 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8714 a variable whose type size is the same as the inferior's pointer
8715 size.
8716
a5362b9a
TS
87172012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8718
8719 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8720 struct siginfo.
8721 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8722 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8723 * linux-low.h: Include <signal.h>.
8724 (struct siginfo): Remove forward declaration.
8725 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8726 struct siginfo.
8727
d226c142
MF
87282012-03-21 Mike Frysinger <vapier@gentoo.org>
8729
8730 * .gitignore: Ignore more files.
8731
122f36ef
PA
87322012-03-19 Pedro Alves <palves@redhat.com>
8733 Jan Kratochvil <jan.kratochvil@redhat.com>
8734
8735 * server.c (cont_thread, general_thread): Add describing comments.
8736 (start_inferior): Clear `cont_thread'.
8737 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8738 of a process.
8739
fc3e5175
YQ
87402012-03-15 Yao Qi <yao@codesourcery.com>
8741
8742 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8743 handling to ...
8744 (cmd_qtdp): ... here.
8745
8d0d92cd
YQ
87462012-03-15 Yao Qi <yao@codesourcery.com>
8747
8748 * tracepoint.c (struct tracepoint_action_ops): New.
8749 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8750 (m_tracepoint_action_download): New.
8751 (r_tracepoint_action_download): New.
8752 (x_tracepoint_action_download): New.
8753 (l_tracepoint_action_download): New.
8754 (add_tracepoint_action): Install `action->ops' according type.
8755 (download_tracepoint_1): Move code `download' function pointer
8756 of various tracepoint_action_ops.
8757
87b0bb13
JK
87582012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8759
8760 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8761 linux_ptrace_attach_warnings.
8762
5f572dec
JK
87632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8764
8765 * Makefile.in (linux-ptrace.o): New.
8766 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8767 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8768 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8769 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8770 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8771 of these targets.
8772 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8773
f4647387
YQ
87742012-03-08 Yao Qi <yao@codesourcery.com>
8775 Pedro Alves <palves@redhat.com>
8776
8777 Fix PR server/13392.
8778 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8779 offset of JMP insn.
8780 * tracepoint.c (remove_tracepoint): New.
8781 (cmd_qtdp): Call remove_tracepoint when failed to install.
8782
9b224c5e
PA
87832012-03-07 Pedro Alves <palves@redhat.com>
8784
8785 * linux-low.c (get_detach_signal): New.
8786 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8787 Pass on pending signals to PTRACE_DETACH. Check the result of the
8788 ptrace call.
8789 * server.c (program_signals, program_signals_p): New.
8790 (handle_general_set): Handle QProgramSignals.
8791 * server.h (program_signals, program_signals_p): Declare.
8792
e237a7e2
JK
87932012-03-05 Pedro Alves <palves@redhat.com>
8794 Jan Kratochvil <jan.kratochvil@redhat.com>
8795
8796 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8797 New comment why.
8798
5808517f
YQ
87992012-03-03 Yao Qi <yao@codesourcery.com>
8800
8801 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8802 agent_look_up_symbols.
8803
58b4daa5
YQ
88042012-03-03 Yao Qi <yao@codesourcery.com>
8805
8806 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8807 (linux-x86-low.o): Likewise.
8808 * server.h: Remove in_process_agent_loaded.
8809 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8810 common/agent.c.
8811 Update callers.
8812
8ffcbaaf
YQ
88132012-03-03 Yao Qi <yao@codesourcery.com>
8814
8815 * tracepoint.c (gdb_agent_capability): New global.
8816 (in_process_agent_loaded_ust): Renamed to
8817 `in_process_agent_supports_ust'.
8818 Update callers.
8819 (in_process_agent_supports_ust): Call agent_capability_check.
8820 (clear_installed_tracepoints): Assert that agent supports
8821 agent.
8822
d1feda86
YQ
88232012-03-03 Yao Qi <yao@codesourcery.com>
8824
8825 * linux-low.c (linux_supports_agent): New.
8826 (linux_target_ops): Initialize field `supports_agent' with
8827 linux_supports_agent.
8828 * target.h (struct target_ops) <supports_agent>: New.
8829 (target_supports_agent): New macro.
8830 * server.c (handle_general_set): Handle packet 'QAgent'.
8831 (handle_query): Send `QAgent+'.
8832 * Makefile.in (server.o): Depends on agent.h.
8833
2fa291ac
YQ
88342012-03-03 Yao Qi <yao@codesourcery.com>
8835
8836 * Makefile.in (OBS): Add agent.o.
8837 Add new rule for agent.o.
8838 Track dependence of tracepoint.c on agent.h.
8839 * tracepoint.c (run_inferior_command_1):
8840 (run_inferior_command): Call agent_run_command.
8841 (gdb_ust_connect_sync_socket): Deleted. Move it to
8842 common/agent.c.
8843 (resume_thread, stop_thread): Likewise.
8844 (gdb_ust_socket_init): Renamed to ...
8845 (gdb_agent_socket_init): ... New.
8846 (gdb_ust_thread): Renamed to ...
8847 (gdb_agent_helper_thread): ... New.
8848 (gdb_ust_init): Move some code to ...
8849 (gdb_agent_init): ... here. New.
8850 [HAVE_UST]: Call gdb_ust_init.
8851 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8852 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8853 * config.in, configure: Regenerated.
8854
05044653
PA
88552012-03-02 Pedro Alves <palves@redhat.com>
8856
8857 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8858 * linux-low.c (struct simple_pid_list): New.
8859 (stopped_pids): New a struct simple_pid_list pointer.
8860 (add_to_pid_list, pull_pid_from_list): New.
8861 (handle_extended_wait): Don't assume the first signal new children
8862 report is SIGSTOP. Adjust call to pull_pid_from_list.
8863 (linux_wait_for_lwp): Adjust.
8864
8d00225b
YQ
88652012-03-02 Yao Qi <yao@codesourcery.com>
8866
8867 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8868 debug log.
8869
19560ba5
YQ
88702012-03-02 Yao Qi <yao@codesourcery.com>
8871
8872 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8873 `stop_pc' and `tpoint'. Update caller.
8874
1faeff08
MR
88752012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8876
8877 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8878 * linux-low.c (use_linux_regsets): New macro.
8879 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8880 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8881 (linux_register_in_regsets): New function.
8882 (usr_fetch_inferior_registers): Skip registers covered by
8883 regsets.
8884 (usr_store_inferior_registers): Likewise.
8885 (usr_fetch_inferior_registers): New macro.
8886 (usr_store_inferior_registers): Likewise.
8887 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8888 (linux_store_registers): Likewise.
8889 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8890 prototype.
8891 (init_registers_mips64_dsp_linux): Likewise.
8892 (init_registers_mips_linux): New macro.
8893 (init_registers_mips_dsp_linux): Likewise.
8894 (mips_dsp_num_regs): Likewise.
8895 (DSP_BASE, DSP_CONTROL): New fallback macros.
8896 (mips_base_regs): New macro.
8897 (mips_regmap): Use it. Fix the size.
8898 (mips_dsp_regmap): New variable.
8899 (mips_dsp_regset_bitmap): Likewise.
8900 (mips_arch_setup): New function.
8901 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8902 than mips_regmap.
8903 (mips_cannot_store_register): Likewise.
8904 (the_low_target): Update .arch_setup, .num_regs and .regmap
8905 initializers. Add .regset_bitmap initializer.
8906 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8907 initializer.
8908 * linux-bfin-low.c (the_low_target): Likewise.
8909 * linux-cris-low.c (the_low_target): Likewise.
8910 * linux-crisv32-low.c (the_low_target): Likewise.
8911 * linux-ia64-low.c (the_low_target): Likewise.
8912 * linux-m32r-low.c (the_low_target): Likewise.
8913 * linux-m68k-low.c (the_low_target): Likewise.
8914 * linux-ppc-low.c (the_low_target): Likewise.
8915 * linux-s390-low.c (the_low_target): Likewise.
8916 * linux-sh-low.c (the_low_target): Likewise.
8917 * linux-sparc-low.c (the_low_target): Likewise.
8918 * linux-tic6x-low.c (the_low_target): Likewise.
8919 * linux-x86-low.c (the_low_target): Likewise.
8920 * linux-xtensa-low.c (the_low_target): Likewise.
8921 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8922 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8923 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8924 srv_xmlfiles.
8925 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8926 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8927
c03e6ccc
YQ
89282012-02-29 Yao Qi <yao@codesourcery.com>
8929 Pedro Alves <palves@redhat.com>
8930
8931 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8932 `step_over_finished' is true.
8933
644cebc9
PA
89342012-02-27 Pedro Alves <palves@redhat.com>
8935
8936 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8937 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8938
c14d7ab2
PA
89392012-02-27 Pedro Alves <palves@redhat.com>
8940
8941 PR server/9684
8942 * linux-low.c (pid_is_stopped): New.
8943 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8944
412c89dd
LM
89452012-02-25 Luis Machado <lgustavo@codesourcery.com>
8946
8947 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8948 of conditions.
8949
b745defe
MR
89502012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8951
8952 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8953
9f3a5c85
LM
89542012-02-24 Luis Machado <lgustavo@codesourcery>
8955
8956 * server.c (handle_query): Advertise support for target-side
8957 breakpoint condition evaluation.
8958 (process_point_options): New function.
8959 (process_serial_event): When inserting a breakpoint, check for
8960 a target-side condition that should be evaluated.
8961
8962 * mem-break.c: Include regcache.h and ax.h.
8963 (point_cond_list_t): New data structure.
8964 (breakpoint) <cond_list>: New field.
8965 (find_gdb_breakpoint_at): Make non-static.
8966 (delete_gdb_breakpoint_at): Clear any target-side
8967 conditions.
8968 (clear_gdb_breakpoint_conditions): New function.
8969 (add_condition_to_breakpoint): Likewise.
8970 (add_breakpoint_condition): Likewise.
8971 (gdb_condition_true_at_breakpoint): Likewise.
8972 (gdb_breakpoint_here): Return result directly instead
8973 of going through a local variable.
8974
8975 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8976 (clear_gdb_breakpoint_conditions): Likewise.
8977 (add_breakpoint_condition): Likewise.
8978 (gdb_condition_true_at_breakpoint): Likewise.
8979
8980 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8981 (need_step_over_p): Take target-side breakpoint condition into
8982 consideration.
8983
5e1dc496
LM
89842012-02-24 Luis Machado <lgustavo@codesourcery>
8985
8986 * server.h: Include tracepoint.h.
8987 (agent_mem_read, agent_get_trace_state_variable_value,
8988 agent_set_trace_state_variable_value,
8989 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8990 get_set_tsv_func_addr): New prototypes.
8991
8992 * ax.h: New include file.
8993 * ax.c: New source file.
8994
8995 * tracepoint.c: Include ax.h.
8996 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8997 agent_expr, eval_result_type): Move to ax.h.
8998 (parse_agent_expr): Rename to ...
8999 (gdb_parse_agent_expr): ... this, make it non-static and move
9000 to ax.h.
9001 (unparse_agent_expr) Rename to ...
9002 (gdb_unparse_agent_expr): ... this, make it non-static and move
9003 to ax.h.
9004 (eval_agent_expr): Rename to ...
9005 (eval_tracepoint_agent_expr): ... this.
9006 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9007 forward declarations.
9008 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9009 (agent_get_trace_state_variable_value): New function.
9010 (agent_set_trace_state_variable_value): New function.
9011 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9012 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9013 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9014 (condition_true_at_tracepoint): Likewise.
9015 (parse_agent_expr): Rename to ...
9016 (gdb_parse_agent_expr): ... this and move to ax.c.
9017 (unparse_agent_expr): Rename to ...
9018 (gdb_unparse_agent_expr): ... this and move to ax.c.
9019 (gdb_agent_op_name): Move to ax.c.
9020 (eval_agent_expr): Rename to ...
9021 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9022 and move to ax.c.
9023 (eval_tracepoint_agent_expr): New function.
9024 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9025 non-static.
5e1dc496
LM
9026 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9027 ax.c.
9028 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9029 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9030 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9031 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9032 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9033 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9034 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9035 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9036 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9037 (compile_bytecodes): Remove forward declaration.
9038 (is_goto_target): Move to ax.c.
9039 (compile_bytecodes): Move to ax.c and call
9040 agent_get_trace_state_variable_value (...) and
9041 agent_set_trace_state_variable_value (...).
9042
9043 * Makefile.in: Update ax.c and IPA dependencies.
9044
277e4e52
PA
90452012-02-24 Pedro Alves <palves@redhat.com>
9046
9047 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9048 (cmd_bigqtbuffer_circular): ... this. Only handle
9049 'QTBuffer:circular:'.
9050 (handle_tracepoint_general_set): Adjust.
9051
bf4c19f7
YQ
90522012-02-16 Yao Qi <yao@codesourcery.com>
9053
9054 * inferiors.c: Move code to ...
9055 * dll.c: .... here. New.
9056 * server.h: Declare clear_dlls.
9057 * Makefile.in (SFILES): Add dll.c.
9058 (OBS): Add dll.o
9059 (dll.o): New rule.
9060
d73f2619
YQ
90612012-02-11 Yao Qi <yao@codesourcery.com>
9062
9063 * server.c: (handle_monitor_command): Add a new parameter
9064 `own_buf'.
9065 (handle_query): Update caller.
9066
f8255c2a
JB
90672012-02-09 Joel Brobecker <brobecker@adacore.com>
9068
9069 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9070 * configure, config.in: Regenerate.
9071 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9072 is not defined.
9073
da84f473
PA
90742012-02-02 Pedro Alves <palves@redhat.com>
9075
9076 Try SIGKILL first, then PTRACE_KILL.
9077 * linux-low.c (linux_kill_one_lwp): New.
9078 (linux_kill_one_lwp): Rename to ...
9079 (kill_one_lwp_callback): ... this. Use the new
9080 linux_kill_one_lwp.
9081
e886a173
PA
90822012-02-02 Pedro Alves <palves@redhat.com>
9083
9084 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9085 inferior.
9086
be07f1a2
PA
90872012-01-27 Pedro Alves <palves@redhat.com>
9088
9089 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9090 (elf_64_file_p): Make static.
9091 (linux_pid_exe_is_elf_64_file): New.
9092 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9093 Delete declarations.
9094 (linux_pid_exe_is_elf_64_file): Declare.
9095 * linux-x86-low.c (x86_arch_setup): Use
9096 linux_pid_exe_is_elf_64_file.
9097
d8301ad1
JK
90982012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9099
9100 * linux-low.c (linux_wait_for_event_1): Rename to ...
9101 (linux_wait_for_event): ... here and merge it with former
9102 linux_wait_for_event - new variable wait_ptid, use it.
9103 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9104
01b17894
PA
91052012-01-23 Pedro Alves <palves@redhat.com>
9106
9107 * server.c (main): Avoid yet another case of infinite loop while
9108 detaching/killing after a longjmp.
9109
e825046f
JK
91102012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9111
9112 Code cleanup.
9113 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9114
b9e7b9c3
UW
91152012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9116
9117 * hostio.c (handle_readlink): New function.
9118 (handle_vFile): Call it to handle "vFile:readlink" packets.
9119
901f9912
UW
91202012-01-20 Pedro Alves <palves@redhat.com>
9121 Ulrich Weigand <ulrich.weigand@linaro.org>
9122
9123 * server.c (handle_v_requests): Only support vAttach and vRun to
9124 start multiple processes when in extended protocol mode.
9125
fc1ab1a0
PA
91262012-01-17 Pedro Alves <palves@redhat.com>
9127
9128 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9129 memalign plus mprotect to allocate the scratch buffer.
9130
7d5d4e98
PA
91312012-01-13 Pedro Alves <palves@redhat.com>
9132
9133 * server.c (attach_inferior): Clear `cont_thread'.
9134
f128d5e9
PA
91352012-01-13 Pedro Alves <palves@redhat.com>
9136
9137 * server.c (main): Avoid infinite loop while detaching/killing
9138 after a longjmp.
9139
06db92f0
DE
91402012-01-09 Doug Evans <dje@google.com>
9141
9142 * server.c (start_inferior): Set last_ptid in --wrapper case.
9143
32d92999
YQ
91442012-01-06 Yao Qi <yao@codesourcery.com>
9145
9146 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9147 defined.
9148 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9149
5e0a92a9
YQ
91502012-01-04 Yao Qi <yao@codesourcery.com>
9151
9152 * tracepoint.c (cmd_qtdp): Print debug message
9153 for static tracepoint.
9154
ae639e8c
YQ
91552012-01-04 Yao Qi <yao@codesourcery.com>
9156
9157 * tracepoint.c (trace_vdebug): Differentiate debug message
9158 between gdbserver and IPA.
9159
f72429c5
YQ
91602012-01-03 Yao Qi <yao@codesourcery.com>
9161
9162 * tracepoint.c (tracepoint_was_hit): Don't collect for
9163 static tracepoint.
9164
12c3e59c
JB
91652012-01-02 Joel Brobecker <brobecker@adacore.com>
9166
9167 * terminal.h: Reformat copyright header.
9168
67827812
JB
91692012-01-02 Joel Brobecker <brobecker@adacore.com>
9170
9171 * server.c (gdbserver_version): Update copyright year.
9172 * gdbreplay.c (gdbreplay_version): Likewise.
9173
3e52c33d
JK
91742011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9175
9176 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9177
9178 Revert:
9179 2011-12-18 Hui Zhu <teawater@gmail.com>
9180 * linux-low.c (linux_create_inferior): Save return value to ret.
9181
66f1260e
HZ
91822011-12-18 Hui Zhu <teawater@gmail.com>
9183
9184 * linux-low.c (linux_create_inferior): Save return value to ret.
9185
e77616d7
DE
91862011-12-16 Doug Evans <dje@google.com>
9187
e7b06c57
DE
9188 * linux-low.c (linux_create_inferior): If stdio connection,
9189 redirect stdin from /dev/null, stdout to stderr.
9190 * remote-utils.c (remote_is_stdio): New static global.
9191 (remote_connection_is_stdio): New function.
9192 (remote_prepare): Handle stdio connection.
9193 (remote_open): Ditto.
9194 (remote_close): Don't close stdin for stdio connections.
9195 (read_prim,write_prim): New functions. Replace all calls to
9196 read/write to these.
9197 * server.c (main): Watch for "-" argument. Move call to
9198 remote_prepare before start_inferior.
9199 * server.h (STDIO_CONNECTION_NAME): New macro.
9200 (remote_connection_is_stdio): Declare.
9201
e77616d7
DE
9202 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9203 in debugging output.
9204
82067193
YQ
92052011-12-15 Yao Qi <yao@codesourcery.com>
9206
9207 * tracepoint.c: Include sys/syscall.h.
9208 (gdb_ust_thread): Remove preprocessor conditional.
9209
82bfbe7e
PA
92102011-12-14 Pedro Alves <pedro@codesourcery.com>
9211
9212 * linux-low.c (linux_detach_one_lwp): Call
9213 the_low_target.prepare_to_resume before detaching.
9214
712c6575
YQ
92152011-12-14 Yao Qi <yao@codesourcery.com>
9216
9217 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9218 of write.
9219
d54d1edf
YQ
92202011-12-14 Yao Qi <yao@codesourcery.com>
9221
9222 * i386-low.c (i386_low_stopped_data_address): Initialize local
9223 variable `control'.
9224
6210a125
PA
92252011-12-13 Pedro Alves <pedro@codesourcery.com>
9226
9227 PR remote/13492
9228
9229 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9230 DR_CONTROL unless necessary. Extend comments.
9231 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9232 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9233
2ece8244
YQ
92342011-12-13 Yao Qi <yao@codesourcery.com>
9235
9236 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9237 macros.
9238 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9239
784867a5
JK
92402011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9241
9242 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9243 Print new debug message for such case.
9244
6bf36717
JK
92452011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9246
9247 Fix overlapping memcpy.
9248 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9249 the read_inferior_memory transfer.
9250 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9251 write_inferior_memory transfer.
9252 (set_fast_tracepoint_jump): New variable buf. Use it for the
9253 read_inferior_memory and write_inferior_memory transfers.
9254 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9255 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9256 Use it for the write_inferior_memory transfer.
9257 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9258 buffers.
9259
50275556
MR
92602011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9261
9262 * linux-low.c (fetch_register, store_register): Make code
9263 consistent, fix formatting.
9264
7325beb4
MR
92652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9266
9267 * linux-low.c (usr_store_inferior_registers): Factor out code
9268 to handle individual registers into...
9269 (store_register): ... this new function.
9270
c642a434
UW
92712011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9272
9273 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9274 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9275 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9276 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9277 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9278 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9279 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9280 (srv_xmlfiles): Add new XML files.
9281
9282 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9283 and <sys/uio.h>.
9284 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9285 (init_registers_s390_linux32v1): Add prototype.
9286 (init_registers_s390_linux32v2): Likewise.
9287 (init_registers_s390_linux64v1): Likewise.
9288 (init_registers_s390_linux64v2): Likewise.
9289 (init_registers_s390x_linux64v1): Likewise.
9290 (init_registers_s390x_linux64v2): Likewise.
9291 (s390_num_regs): Increment to 52.
9292 (s390_regmap): Add orig_r2 register.
9293 (s390_num_regs_3264): Increment to 68.
9294 (s390_regmap_3264): Add orig_r2 register.
9295 (s390_collect_ptrace_register): Handle orig_r2 register.
9296 (s390_supply_ptrace_register): Likewise.
9297 (s390_fill_last_break): New function.
9298 (s390_store_last_break): Likewise.
9299 (s390_fill_system_call): New function.
9300 (s390_store_system_call): Likewise.
9301 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9302 register sets.
9303 (s390_check_regset): New function.
9304 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9305 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9306 Update target_regsets for available register sets.
9307
2268b414
JK
93082011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9309 Jan Kratochvil <jan.kratochvil@redhat.com>
9310
9311 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9312 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9313 New.
9314 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9315 * linux-low.h (struct process_info_private): New member r_debug.
9316 * server.c (handle_qxfer_libraries): Call
9317 the_target->qxfer_libraries_svr4.
9318 (handle_qxfer_libraries_svr4): New function.
9319 (qxfer_packets): New entry "libraries-svr4".
9320 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9321 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9322 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9323 PACKET_qXfer_libraries_svr4.
9324
d6db1fab
UW
93252011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9326
9327 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9328 PSW address/mask between 8-byte and 16-byte formats.
9329 (s390_supply_ptrace_register): Likewise.
9330 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9331 basic addressing mode bit.
9332
242f5f1c
SS
93332011-11-24 Stan Shebs <stan@codesourcery.com>
9334
9335 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9336
f196051f
SS
93372011-11-17 Stan Shebs <stan@codesourcery.com>
9338
9339 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9340 (tracing_start_time): New global.
9341 (tracing_stop_time): New global.
9342 (tracing_user_name): New global.
9343 (tracing_notes): New global.
9344 (tracing_stop_note): New global.
9345 (cmd_qtstart): Set traceframe_usage, start_time.
9346 (stop_tracing): Set stop_time.
9347 (cmd_qtstatus): Report additional status.
9348 (cmd_qtp): New function.
9349 (handle_tracepoint_query): Call it.
9350 (cmd_qtnotes): New function.
9351 (handle_tracepoint_general_set): Call it.
9352 (get_timestamp): Rename from tsv_get_timestamp.
9353
405f8e94
SS
93542011-11-14 Stan Shebs <stan@codesourcery.com>
9355 Kwok Cheung Yeung <kcy@codesourcery.com>
9356
9357 * linux-x86-low.c (small_jump_insn): New.
9358 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9359 trampoline and error message, build a trampoline and issue a small
9360 jump instruction to it.
9361 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9362 trampoline and error message.
9363 (x86_get_min_fast_tracepoint_insn_len): New.
9364 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9365 * linux-low.h (struct linux_target_ops): Add arguments to
9366 install_fast_tracepoint_jump_pad operation, add new operation.
9367 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9368 arguments.
9369 (linux_get_min_fast_tracepoint_insn_len): New function.
9370 (linux_target_op): Add new operation.
9371 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9372 (gdb_trampoline_buffer_end): Ditto.
9373 (gdb_trampoline_buffer_error): Ditto.
9374 (struct ipa_sym_addresses): Add fields for new IPA variables.
9375 (symbol_list): Add entries for new IPA variables.
9376 (struct tracepoint): Add fields to hold the address range of the
9377 trampoline used by the tracepoint.
9378 (trampoline_buffer_head): New static variable.
9379 (trampoline_buffer_tail): Ditto.
9380 (claim_trampoline_space): New function.
9381 (have_fast_tracepoint_trampoline_buffer): New function.
9382 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9383 structure.
9384 (install_fast_tracepoint): Ditto, also add error buffer argument.
9385 (cmd_qtminftpilen): New function.
9386 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9387 (fast_tracepoint_from_trampoline_address): New function.
9388 (fast_tracepoint_collecting): Handle trampoline as part of jump
9389 pad space.
9390 (set_trampoline_buffer_space): New function.
9391 (initialize_tracepoint): Initialize new IPA variables.
9392 * target.h (struct target_ops): Add arguments to
9393 install_fast_tracepoint_jump_pad operation, add new
9394 get_min_fast_tracepoint_insn_len operation.
9395 (target_get_min_fast_tracepoint_insn_len): New.
9396 (install_fast_tracepoint_jump_pad): Add arguments.
9397 * server.h (IPA_BUFSIZ): Define.
9398 * linux-i386-ipa.c: Include extra header files.
9399 (initialize_fast_tracepoint_trampoline_buffer): New function.
9400 (initialize_low_tracepoint): Call it.
9401 * server.h (set_trampoline_buffer_space): Declare.
9402 (claim_trampoline_space): Ditto.
9403 (have_fast_tracepoint_trampoline_buffer): Ditto.
9404
1e4d1764
YQ
94052011-11-14 Yao Qi <yao@codesourcery.com>
9406
9407 * server.c (handle_query): Handle InstallInTrace for qSupported.
9408 * tracepoint.c (add_tracepoint): Sort list.
9409 (install_tracepoint, download_tracepoint): New.
9410 (cmd_qtdp): Call them to install and download tracepoints.
9411 (sort_tracepoints): Removed.
9412 (cmd_qtstart): Update.
9413
5c73ff4e
YQ
94142011-11-14 Yao Qi <yao@codesourcery.com>
9415
9416 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9417 * mem-break.h: Declare.
9418 * tracepoint.c (cmd_qtstart): Move some code to ...
9419 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9420 New.
9421 (download_tracepoints): Move some code to ...
9422 (download_tracepoint_1): ... here. New.
9423
86a30030
YQ
94242011-11-08 Yao Qi <yao@codesourcery.com>
9425
9426 * remote-utils.c (relocate_instruction): A comment fix.
9427
8d26e50c
JB
94282011-11-07 Joel Brobecker <brobecker@adacore.com>
9429
9430 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9431 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9432 dr_status_mirror and dr_control_mirror from debug_reg_state.
9433 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9434 (i386_initial_stuff): Remove use of deleted globals.
9435 (i386_get_thread_context, i386_set_thread_context,
9436 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9437 from debug_reg_state.
9438
a59306a3
YQ
94392011-11-05 Yao Qi <yao@codesourcery.com>
9440
9441 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9442 address as TPOINT's.
9443
3065dfb6
SS
94442011-11-02 Stan Shebs <stan@codesourcery.com>
9445
9446 * tracepoint.c (agent_mem_read_string): New function.
9447 (eval_agent_expr): Call it for tracenz.
9448 * server.c (handle_query): Report support for tracenz.
9449
fd0d8c7c
YQ
94502011-11-02 Yao Qi <yao@codesourcery.com>
9451
9452 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9453
609086b1
YQ
94542011-11-02 Yao Qi <yao@codesourcery.com>
9455
9456 * target.h: Fix a typo in comment.
9457
b9fd1791
PA
94582011-10-31 Pedro Alves <pedro@codesourcery.com>
9459
9460 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9461 clobber the breakpoints' shadows with fast tracepoint jumps.
9462 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9463 * target.c (write_inferior_memory): Also pass MYADDR down to
9464 check_mem_write.
9465
03583c20
UW
94662011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9467
9468 * configure.ac: Check support for personality routine.
9469 * configure: Regenerate.
9470 * config.in: Likewise.
9471 * linux-low.c: Include <sys/personality.h>.
9472 Define ADDR_NO_RANDOMIZE if necessary.
9473 (linux_create_inferior): Disable address space randomization when
9474 forking inferior, if requested.
9475 (linux_supports_disable_randomization): New function.
9476 (linux_target_ops): Install it.
9477 * server.h (disable_randomization): Declare.
9478 * server.c (disable_randomization): New global variable.
9479 (handle_general_set): Handle QDisableRandomization.
9480 (handle_query): Likewise for qSupported.
9481 (main): Support --disable-randomization and --no-disable-randomization
9482 command line arguments.
9483 * target.h (struct target_ops): Add supports_disable_randomization.
9484 (target_supports_disable_randomization): New macro.
9485
723b724b
MF
94862011-09-29 Mike Frysinger <vapier@gentoo.org>
9487
9488 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9489 ifdef check.
9490 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9491 [!PT_GETDSBT] (target_loadmap): New definition.
9492 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9493 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9494 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9495 and PT_GETDSBT to LINUX_LOADMAP.
9496 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9497 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9498
55329a5c 94992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9500
9501 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9502 (arm_linux_hwbp_cap): New static variable.
9503 (arm_linux_get_hwbp_cap): Replace by ...
9504 (arm_linux_init_hwbp_cap): ... this new function.
9505 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9506 (arm_linux_get_hw_watchpoint_count): Likewise.
9507 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9508 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9509 (arm_prepare_to_resume): Use perror_with_name instead of error.
9510
55329a5c 95112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9512
9513 * linux-arm-low.c: Include <signal.h>.
9514 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9515 (struct arm_linux_hwbp_cap): New data type.
9516 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9517 (struct arm_linux_hw_breakpoint): New data type.
9518 (MAX_BPTS, MAX_WPTS): Define.
9519 (struct arch_process_info, struct arch_lwp_info): New data types.
9520 (arm_linux_get_hwbp_cap): New function.
9521 (arm_linux_get_hw_breakpoint_count): Likewise.
9522 (arm_linux_get_hw_watchpoint_count): Likewise.
9523 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9524 (arm_hwbp_control_initialize): Likewise.
9525 (arm_hwbp_control_is_enabled): Likewise.
9526 (arm_hwbp_control_is_initialized): Likewise.
9527 (arm_hwbp_control_disable): Likewise.
9528 (arm_linux_hw_breakpoint_equal): Likewise.
9529 (arm_linux_hw_point_initialize): Likewise.
9530 (struct update_registers_data): New data structure.
9531 (update_registers_callback: New function.
9532 (arm_insert_point): Likewise.
9533 (arm_remove_point): Likewise.
9534 (arm_stopped_by_watchpoint): Likewise.
9535 (arm_stopped_data_address): Likewise.
9536 (arm_new_process): Likewise.
9537 (arm_new_thread): Likewise.
9538 (arm_prepare_to_resume): Likewise.
9539 (the_low_target): Register arm_insert_point, arm_remove_point,
9540 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9541 arm_new_thread, and arm_prepare_to_resume.
9542
6b9801d4
SS
95432011-09-15 Stan Shebs <stan@codesourcery.com>
9544
9545 * server.h (struct emit_ops): Add compare-goto fields.
9546 * tracepoint.c (gdb_agent_op_sizes): New table.
9547 (emit_eq_goto): New function.
9548 (emit_ne_goto): New function.
9549 (emit_lt_goto): New function.
9550 (emit_le_goto): New function.
9551 (emit_gt_goto): New function.
9552 (emit_ge_goto): New function.
9553 (is_goto_target): New function.
9554 (compile_bytecodes): Recognize special cases of compare-goto
9555 combinations and call specialized emitters for them.
9556 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9557 (amd64_emit_ne_goto): New function.
9558 (amd64_emit_lt_goto): New function.
9559 (amd64_emit_le_goto): New function.
9560 (amd64_emit_gt_goto): New function.
9561 (amd64_emit_ge_goto): New function.
9562 (amd64_emit_ops): Add the new functions.
9563 (i386_emit_eq_goto): New function.
9564 (i386_emit_ne_goto): New function.
9565 (i386_emit_lt_goto): New function.
9566 (i386_emit_le_goto): New function.
9567 (i386_emit_gt_goto): New function.
9568 (i386_emit_ge_goto): New function.
9569 (i386_emit_ops): Add the new functions.
9570
bf15cbda
SS
95712011-09-08 Stan Shebs <stan@codesourcery.com>
9572
9573 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9574 (i386_emit_epilogue): Restore %ebx.
9575
943ca1dd
JZ
95762011-08-31 Jie Zhang <jzhang918@gmail.com>
9577
9578 * server.c (step_thread): Remove definition.
9579 (process_serial_event): Don't handle Hs.
9580 * server.h (step_thread): Remove declaration.
9581 * target.c (set_desired_inferior): Remove use of step_thread.
9582
e3deef73
LM
95832011-08-24 Luis Machado <lgustavo@codesourcery.com>
9584
9585 * linux-low.c: Include linux-procfs.h.
9586 (linux_attach_lwp_1): Update comments.
9587 (linux_attach): Scan for existing threads when attaching to a
9588 process that is the tgid.
9589 * Makefile.in: Update dependencies.
9590
13da1c97
LM
95912011-08-24 Luis Machado <lgustavo@codesourcery.com>
9592
9593 * configure.srv: Add linux-procfs.o dependencies.
9594
881127c9
YQ
95952011-08-14 Yao Qi <yao@codesourcery.com>
9596
9597 * target.h (struct target_ops): Fix indent.
9598 * win32-low.c (win32_target_ops): Fix comment.
9599
58dbd541
YQ
96002011-08-14 Andrew Jenner <andrew@codesourcery.com>
9601 Yao Qi <yao@codesourcery.com>
9602
9603 * Makefile.in (clean): Remove tic6x-*.c files.
9604 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9605 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9606 (tic6x-c64xp-linux.c): Likewise.
9607 * configure.srv: Add support for tic6x-*-uclinux.
9608 * linux-tic6x-low.c: New.
9609 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9610
78d85199
YQ
96112011-08-14 Andrew Stubbs <ams@codesourcery.com>
9612 Yao Qi <yao@codesourcery.com>
9613
9614 * target.h (struct target_ops): Add read_loadmap.
9615 * linux-low.c (struct target_loadseg): New type.
9616 (struct target_loadmap): New type.
9617 (linux_read_loadmap): New function.
9618 (linux_target_ops): Add linux_read_loadmap.
9619 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9620 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9621 to NULL.
78d85199 9622
a959a88d
EZ
96232011-08-05 Eli Zaretskii <eliz@gnu.org>
9624
9625 * win32-low.c: Include <stdint.h>.
9626
1ced966e
PA
96272011-07-22 Pedro Alves <pedro@codesourcery.com>
9628
9629 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9630 to the inferior here.
9631 (i386_remove_aligned_watchpoint): Ditto.
9632 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9633 fit part of the watchpoint in the debug registers.
9634 (i386_update_inferior_debug_regs): New.
9635 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9636 registers, and only update the inferior on success.
9637 (i386_low_remove_watchpoint): Ditto.
9638
d26e3629
KY
96392011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9640
9641 * linux-low.c (compare_ints, unique, list_threads, show_process,
9642 linux_core_of_thread): Delete.
9643 (linux_target_ops): Change linux_core_of_thread to
9644 linux_common_core_of_thread.
9645 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9646 * utils.c (malloc_failure): Change type of argument.
9647 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9648 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9649 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9650 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9651 (IPA_OBJS): Add common-utils-ipa.o.
9652 (ptid_h, linux_osdata_h): New macros.
9653 (server_h): Add common/common-utils.h, common/xml-utils.h,
9654 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9655 common/ptid.h.
9656 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9657 ptid.o, buffer.o): New rules.
9658 (linux-low.o): Add common/linux-osdata.h as a dependency.
9659 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9660 * configure.ac: Add AC_HEADER_DIRENT check.
9661 * config.in: Regenerate.
9662 * configure: Regenerate.
9663 * remote-utils.c (xml_escape_text): Delete.
9664 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9665 buffer_xml_printf): Move to common/buffer.c.
9666 * server.c (main): Remove call to initialize_inferiors.
9667 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9668 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9669 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9670 internal_error, gdb_assert, gdb_assert_fail): Delete.
9671 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9672 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9673 common/buffer.h.
9674 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9675 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9676 initialize_inferiors): Delete.
9677
2275a1a7
PA
96782011-07-20 Pedro Alves <pedro@codesourcery.com>
9679
9680 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9681 symbol error.
9682
0a5b1e09
PA
96832011-05-31 Pedro Alves <pedro@codesourcery.com>
9684
9685 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9686 assertion.
9687 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9688
6938fd34
YQ
96892011-05-26 Yao Qi <yao@codesourcery.com>
9690
9691 * Makefile.in (thread-db.o): Track dependence to
9692 common/gdb_thread_db.h.
9693 * thread-db.c: include gdb_thread_db.h from right place.
9694
b481f9e0
TT
96952011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9696
9697 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9698 __FILE__ and __LINE__ to internal_error.
9699
98a5dd13
DE
97002011-05-13 Doug Evans <dje@google.com>
9701
9702 * thread-db.c (try_thread_db_load_from_sdir): New function.
9703 (try_thread_db_load_from_dir): New function.
9704 (thread_db_load_search): Handle $sdir, ignore $pdir.
9705 Remove trying of system directories if search of
9706 libthread-db-search-path fails, that is now done via $sdir.
9707
d248b706
KY
97082011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9709
9710 * server.c (handle_query): Add EnableDisableTracepoints to the list
9711 of supported features.
43aaf8b6 9712 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9713 tracepoints.
43aaf8b6
PA
9714 (cmd_qtenable_disable): New.
9715 (cmd_qtstart): Install tracepoints even if disabled.
9716 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9717 receiving a QTEnable or QTDisable packet.
9718 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9719 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9720 tracepoints.
9721 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9722
84e578fb
DE
97232011-05-10 Doug Evans <dje@google.com>
9724
9725 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9726
71f55dd8
DE
97272011-05-04 Doug Evans <dje@google.com>
9728
9729 * linux-low.c (linux_join): Skip process lookup.
9730 * spu-low.c (spu_join): Ditto.
9731 * server.c (join_inferiors_callback): Delete.
9732 (process_serial_event): For 'D' packet (detach) call join_inferior
9733 directly.
9734
4d393d60
JM
97352011-05-04 Joseph Myers <joseph@codesourcery.com>
9736
9737 * README: Don't mention xscale*-*-linux*.
9738 * configure.srv (xscale*-*-linux*): Don't handle target.
9739
b00ad6ff
NF
97402011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9741
9742 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9743 casting pointers.
9744 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9745 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9746 (i386_emit_void_call_2): Likewise.
9747
af96c192
YQ
97482011-04-26 Yao Qi <yao@codesourcery.com>
9749
43aaf8b6
PA
9750 * linux-low.c: Move common macros to linux-ptrace.h.
9751 Include linux-ptrace.h.
af96c192
YQ
9752 * Makefile.in (linux_ptrace_h): New.
9753 (linux-low.o): Depends on linux-ptrace.h.
9754
03f2bd59
JK
97552011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9756
9757 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9758 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9759 (remote_prepare): New function with most of the TCP code from ...
9760 (remote_open): ... here. Detect PORT here unconditionally. Move also
9761 setting transport_is_reliable.
9762 * server.c (run_once): New variable.
9763 (gdbserver_usage): Document it.
9764 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9765 the first run if RUN_ONCE.
9766 * server.h (run_once, remote_prepare): New declarations.
9767
7a9dd1b2
TT
97682011-04-19 Tom Tromey <tromey@redhat.com>
9769
9770 * win32-low.c (handle_load_dll): Remove duplicate "the".
9771
81239425
PM
97722011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9773
9774 Remove support for old Cygwin 1.5 versions.
9775 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9776 function to avoid warning.
9777 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9778 warning.
9779
9e0627f1
PM
97802011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9781
9782 * gdbserver/server.h (Macro _): Define it if not available.
9783
588eebee
MS
97842011-03-14 Michael Snyder <msnyder@vmware.com>
9785
348af9f7 9786 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9787
43f70d4c
JB
97882011-03-10 Joel Brobecker <brobecker@adacore.com>
9789
9790 * Makefile.in (maintainer-clean realclean distclean): Remove
9791 "make ... subdir_do" command.
9792
348af9f7
MS
97932011-03-10 Michael Snyder <msnyder@vmware.com>
9794
9795 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9796
9797 * server.c (handle_v_run): Free alloced buffer on early return.
9798
e637a4f5
YQ
97992011-03-09 Yao Qi <yao@codesourcery.com>
9800
9801 Revert:
9802 2011-03-04 Yao Qi <yao@codesourcery.com>
9803
9804 * Makefile.in: Remove GNU make feature --directory.
9805
9806 2011-03-05 Yao Qi <yao@codesourcery.com>
9807
9808 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9809 (subdir_do): New make target. Copied from gdb/Makefile.
9810 (maintainer-clean, realclean, distclean, clean): Call corresponding
9811 make targets in common/Makefile.
9812
9813 2011-02-11 Yao Qi <yao@codesourcery.com>
9814
9815 * configure.ac: Call AC_PROG_RANLIB.
9816 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9817 * configure: Regenerate.
9818
e6edda56
JK
98192011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9820
9821 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9822
e5141119
JB
98232011-03-06 Yao Qi <yao@codesourcery.com>
9824
9825 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9826
64794aa4
JB
98272011-03-05 Yao Qi <yao@codesourcery.com>
9828
9829 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9830 (subdir_do): New make target. Copied from gdb/Makefile.
9831 (maintainer-clean, realclean, distclean, clean): Call corresponding
9832 make targets in common/Makefile.
9833
7a762829
YQ
98342011-03-04 Yao Qi <yao@codesourcery.com>
9835
9836 * Makefile.in: Remove GNU make feature --directory.
9837
348af9f7
MS
98382011-03-04 Michael Snyder <msnyder@vmware.com>
9839
9840 * server.c (queue_stop_reply): Call xmalloc not malloc.
9841
98422011-03-02 Michael Snyder <msnyder@vmware.com>
9843
9844 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9845
9f72fee2
MS
98462011-02-28 Michael Snyder <msnyder@vmware.com>
9847
588eebee
MS
9848 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9849 (cmd_qtframe): Ditto.
9850 (cmd_qtbuffer): Ditto.
9851 (cmd_bigqtbuffer): Ditto.
9852
9f72fee2
MS
9853 * utils.c (decimal2str): Initialize 'width' to nine, then
9854 don't mess with it.
9855
8040bd49
UW
98562011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9857
9858 * hostio.c (require_data): Free *data, not data.
9859
7e52cbd0
JK
98602011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 * hostio.c (require_data): Use free, not xfree.
9863
9130f83e
MS
98642011-02-27 Michael Snyder <msnyder@vmware.com>
9865
4b812f4e
MS
9866 * server.c (handle_query): Discard unused value.
9867
9130f83e
MS
9868 * hostio.c (require_data): Free malloc memory before returning
9869 error.
9870
69d37113
MS
98712011-02-26 Michael Snyder <msnyder@vmware.com>
9872
9873 * linux-low.c (list_threads): Call closedir for dirent.
9874
35f5825a
MS
98752011-02-27 Michael Snyder <msnyder@vmware.com>
9876
2a589cef
MS
9877 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9878 a case statement falls through.
9879
0adea5f7
MS
9880 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9881
35f5825a
MS
9882 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9883 in comparison.
9884
238f1c74
MS
98852011-02-26 Michael Snyder <msnyder@vmware.com>
9886
9887 * utils.c (decimal2str): Eliminate dead code and dead param.
9888 (pulongest): Drop dead param from call to decimal2str.
9889 (plongest): Ditto.
9890
633ff500
JB
98912011-02-24 Joel Brobecker <brobecker@adacore.com>
9892
9893 Revert the following patch (not approved yet):
9894 2011-02-21 Hui Zhu <teawater@gmail.com>
9895 * tracepoint.c (tp_printf): New function.
9896 (eval_agent_expr): Handle gdb_agent_op_printf.
9897
f9c6ff72
HZ
98982011-02-21 Hui Zhu <teawater@gmail.com>
9899
9900 * tracepoint.c (tp_printf): New function.
9901 (eval_agent_expr): Handle gdb_agent_op_printf.
9902
94d5e490
TT
99032011-02-18 Tom Tromey <tromey@redhat.com>
9904
9905 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9906 (tracepoint.o): Likewise.
9907 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9908 (gdb_agent_op_names): Likewise.
9909
c7f96d2b
TT
99102011-02-18 Tom Tromey <tromey@redhat.com>
9911
9912 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9913 gdb_agent_op_rot>: New constants.
9914 (gdb_agent_op_names): Add pick and roll.
9915 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9916 cases.
9917
0feedb2c
JK
99182011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9919
9920 * aclocal.m4: Regenerated with aclocal-1.11.1.
9921
b3b9301e
PA
99222011-02-14 Pedro Alves <pedro@codesourcery.com>
9923
9924 * server.c (handle_qxfer_traceframe_info): New.
9925 (qxfer_packets): Register "traceframe-info".
9926 (handle_query): Report support for qXfer:traceframe-info:read+.
9927 * tracepoint.c (match_blocktype): New.
9928 (traceframe_find_block_type): Rename to ...
9929 (traceframe_walk_blocks): ... this. Add callback filter argument,
9930 and use it.
9931 (traceframe_find_block_type): New, reimplemented on top of
9932 traceframe_walk_blocks.
9933 (build_traceframe_info_xml): New.
9934 (traceframe_read_info): New.
9935 * server.h (traceframe_read_info): Declare.
9936
4f3e6fb7
YQ
99372011-02-11 Yao Qi <yao@codesourcery.com>
9938
9939 * configure.ac: Call AC_PROG_RANLIB.
9940 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9941 * configure: Regenerate.
9942
764880b7
PA
99432011-02-07 Pedro Alves <pedro@codesourcery.com>
9944
9945 * server.c (gdb_read_memory): Change return semantics to allow
9946 partial transfers.
9947 (handle_search_memory_1): Adjust.
9948 (process_serial_event) <'m' packet>: Handle partial transfers.
9949 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9950
1c79eb8a
PA
99512011-01-28 Pedro Alves <pedro@codesourcery.com>
9952
9953 * regcache.c (init_register_cache): Initialize
9954 regcache->register_status.
9955 (free_register_cache): Release regcache->register_status.
9956 (regcache_cpy): Copy register_status.
9957 (registers_to_string): Print 'x's for unavailable registers.
9958 (supply_register): Mark the register's status valid or
9959 unavailable, depending on whether a buffer was passed in or not.
9960 (supply_register_zeroed): New.
9961 (supply_regblock): Mark the registers' status valid or
9962 unavailable, depending on whether a buffer was passed in or not.
9963 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9964 (struct regcache): New `register_status' field.
9965 (supply_register_zeroed): Declare.
9966 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9967 supply_register_zeroed, rather than passing a NULL buffer to
9968 supply_register.
9969 * tracepoint.c (fetch_traceframe_registers): Update comment.
9970
85724a0e
PA
99712011-01-28 Pedro Alves <pedro@codesourcery.com>
9972
9973 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9974 buffer explicit.
9975
d08aafef
PA
99762011-01-25 Pedro Alves <pedro@codesourcery.com>
9977
9978 * server.h (decode_xfer_write): Change prototype.
9979 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9980 and don't extract the annex here.
9981 * server.c (decode_xfer_read): Remove `annex' parameter,
9982 and don't extract the annex here.
9983 (decode_xfer): New.
9984 (struct qxfer): New.
9985 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9986 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9987 (handle_qxfer_statictrace): New functions, abstracted out from
9988 handle_query, and made to use the struct qxfer interface.
9989 (handle_threads_qxfer_proper): Rename to ...
9990 (handle_qxfer_threads_proper): ... this.
9991 (handle_threads_qxfer): Rename to ...
9992 (handle_qxfer_threads): ... this. Adjust.
9993 (qxfer_packets): New array.
9994 (handle_qxfer): New function.
9995 (handle_query): Use handle_qxfer.
9996
493e2a69
MS
99972011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9998
9999 * gdbreplay.c: Shorten lines of >= 80 columns.
10000 * linux-low.c: Ditto.
10001 * linux-ppc-low.c: Ditto.
10002 * linux-s390-low.c: Ditto.
10003 * linux-sparc-low.c: Ditto.
10004 * linux-x86-low.c: Ditto.
10005 * linux-xtensa-low.c: Ditto.
10006 * mem-break.c: Ditto.
10007 * nto-low.c: Ditto.
10008 * regcache.h: Ditto.
10009 * remote-utils.c: Ditto.
10010 * server.c: Ditto.
10011 * server.h: Ditto.
10012 * thread-db.c: Ditto.
10013 * tracepoint.c: Ditto.
10014 * utils.c: Ditto.
10015 * win32-low.h: Ditto.
10016
44944448
JB
100172011-01-05 Joel Brobecker <brobecker@adacore.com>
10018
10019 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10020 update.
10021
71ce852c
JB
100222011-01-01 Joel Brobecker <brobecker@adacore.com>
10023
10024 * server.c (gdbserver_version): Update copyright year in version
10025 output.
10026 * gdbreplay.c (gdbreplay_version): Ditto.
10027
eb826dc6
MF
100282010-12-29 Jie Zhang <jie.zhang@analog.com>
10029
10030 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10031 * linux-bfin-low.c: New file.
10032 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10033 PT_DATA_ADDR for BFIN targets.
10034 * Makefile.in (SFILES): Add linux-bfin-low.c.
10035 (clean): Remove reg-bfin.c.
10036 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10037 * README: Mention supported Blackfin targets.
10038
39ab222a
MF
100392010-12-23 Mike Frysinger <vapier@gentoo.org>
10040
10041 * .gitignore: New file.
10042
a1f2ce7d
MF
100432010-11-16 Mike Frysinger <vapier@gentoo.org>
10044
10045 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10046
f474844c
JZ
100472010-10-22 Jie Zhang <jie@codesourcery.com>
10048
10049 * Makefile.in: Add FLAGS_TO_PASS variable.
10050 (install): Remove dependency of install-only and recursively
10051 invoke make for install-only.
10052
f1048712
DE
100532010-10-04 Doug Evans <dje@google.com>
10054
10055 * Makefile.in (uninstall): Use $(DESTDIR).
10056
b53a1623
PA
100572010-09-24 Pedro Alves <pedro@codesourcery.com>
10058
e6ee044d
PA
10059 PR gdb/11842
10060
b53a1623
PA
10061 * linux-x86-low.c (compat_siginfo_from_siginfo)
10062 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10063 si_code is < 0. Check for si_code == SI_TIMER before checking for
10064 si_code < 0.
10065
fa1bd1e4
JB
100662010-09-13 Joel Brobecker <brobecker@adacore.com>
10067
10068 * lynx-i386-low.c: New file.
10069 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10070
47fac8f8
JB
100712010-09-13 Joel Brobecker <brobecker@adacore.com>
10072
10073 * lynx-low.c (ptrace_request_to_str): Remove handling for
10074 request values that have been removed in LynxOS 5.x.
10075
1adfc54d
JB
100762010-09-13 Joel Brobecker <brobecker@adacore.com>
10077
10078 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10079 <ptrace.h>
10080
c2a66c29
NS
100812010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10082
10083 * configure.ac: Add --enable-inprocess-agent option.
10084 * configure: Rebuilt.
10085
32fcada3
YQ
100862010-09-06 Yao Qi <yao@codesourcery.com>
10087
10088 * linux-low.c (linux_kill): Remove unused variable.
10089 (linux_stabilize_threads): Likewise.
10090 * server.c (start_inferior): Likewise.
10091 (queue_stop_reply_callback): Likewise.
10092 * tracepoint.c (do_action_at_tracepoint): Likewise.
10093
0cccb683
YQ
100942010-09-06 Yao Qi <yao@codesourcery.com>
10095
10096 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10097 on return.
10098
423ec54c
JK
100992010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10100
10101 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10102
12ac6819
PA
101032010-09-06 Pedro Alves <pedro@codesourcery.com>
10104
10105 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10106 "$(IPA_DEPFILES)".
10107
8ed54b31
JB
101082010-09-01 Joel Brobecker <brobecker@adacore.com>
10109
10110 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10111 gdbserver/lynx-ppc-low.c: New files.
10112 * Makefile.in (lynx_low_h): New variable.
10113 (lynx-low.o, lynx-ppc-low.o): New rules.
10114 * configure.ac: On LynxOS, link with -lnetinet.
10115 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10116 * configure: regenerate.
10117
bb0116a4
JB
101182010-09-01 Joel Brobecker <brobecker@adacore.com>
10119
10120 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10121 * configure.ac: Add check for vasprintf and vsnprintf.
10122 * configure, config.in: Regenerate.
10123 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10124
a778ab81 101252010-09-01 Joel Brobecker <brobecker@adacore.com>
10126
10127 * gdbreplay.c: Move include of alloca.h up, next to include of
10128 malloc.h.
10129 * server.h: Add include of malloc.h.
10130 * mem-break.c: Remove include of malloc.h.
10131 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10132
8b034a19 101332010-09-01 Joel Brobecker <brobecker@adacore.com>
10134
10135 * Makefile.in (memmem.o): Build with -Wno-error.
10136
101372010-09-01 Joel Brobecker <brobecker@adacore.com>
10138
10139 * utils.c (xsnprintf): Make non-static.
10140 * server.h: Add xsnprintf declaration.
10141 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10142 replace calls to snprintf by calls to xsnprintf throughout.
10143
101442010-09-01 Joel Brobecker <brobecker@adacore.com>
10145
10146 * configure.ac: Add configure check for alloca.
10147 * configure, config.in: Regenerate.
10148 * server.h: Include alloca.h if it exists.
10149 * gdbreplay.c: Include alloca.h if it exists.
10150
1a981360
PA
101512010-08-28 Pedro Alves <pedro@codesourcery.com>
10152
10153 * linux-low.c (__SIGRTMIN): Define if not already defined.
10154 (linux_create_inferior): Check for __ANDROID__ rather than
10155 __SIGRTMIN.
10156 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10157 are already deferred.
10158 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10159 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10160 stopped and already has a pending signal to report.
10161 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10162 a pending signal to report or is moving out of a jump pad.
10163 (linux_init_signals): Check for __ANDROID__ rather than
10164 __SIGRTMIN.
10165
b4d51a55
PA
101662010-08-28 Pedro Alves <pedro@codesourcery.com>
10167
10168 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10169 debug_threads check. Avoid a linear search when not doing debug
10170 output.
10171
ec48365d
PA
101722010-08-27 Pedro Alves <pedro@codesourcery.com>
10173
10174 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10175 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10176 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10177 (process_event): Change local fd's type to gdb_fildes_t.
10178 (create_file_handler): Adjust prototype.
10179 (delete_file_handler): Adjust prototype.
10180 (handle_file_event): Adjust prototype. Use pfildes.
10181 (create_file_event): Adjsut prototype.
10182 * remote-utils.c (remote_desc, listen_desc): Change type to
10183 gdb_fildes_t.
10184 * server.h: New gdb_fildes_t typedef.
10185 [USE_WIN32API]: Include winsock2.h.
10186 (delete_file_handler, add_file_handler): Adjust prototypes.
10187 (pfildes): Declare.
10188 * utils.c (pfildes): New.
10189
854d88f0
PA
101902010-08-27 Pedro Alves <pedro@codesourcery.com>
10191
10192 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10193 * configure: Regenerate.
10194
0146f85b
PA
101952010-08-27 Pedro Alves <pedro@codesourcery.com>
10196
10197 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10198 (linux_done_accessing_memory): ... this.
10199 (linux_target_ops): Adjust.
10200 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10201 * nto-low.c (nto_target_ops): Adjust comment.
10202 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10203 * spu-low.c (spu_target_ops): Adjust comment.
10204 * target.h (target_ops): Rename unprepare_to_access_memory field
10205 to done_accessing_memory.
10206 (unprepare_to_access_memory): Rename to ...
10207 (done_accessing_memory): ... this.
10208
90d74c30
PA
102092010-08-26 Pedro Alves <pedro@codesourcery.com>
10210
10211 * linux-low.c (linux_prepare_to_access_memory): New.
10212 (linux_unprepare_to_access_memory): New.
10213 (linux_target_ops): Install them.
10214 * server.c (read_memory): Rename to ...
10215 (gdb_read_memory): ... this. Use
10216 prepare_to_access_memory/prepare_to_access_memory.
10217 (write_memory): Rename to ...
10218 (gdb_write_memory): ... this. Use
10219 prepare_to_access_memory/prepare_to_access_memory.
10220 (handle_search_memory_1): Adjust.
10221 (process_serial_event): Adjust.
10222 * target.h (struct target_ops): New fields
10223 prepare_to_access_memory and unprepare_to_access_memory.
10224 (prepare_to_access_memory, unprepare_to_access_memory): New.
10225 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10226 prepare_to_access_memory/prepare_to_access_memory.
10227 * nto-low.c (nto_target_ops): Adjust.
10228 * spu-low.c (spu_target_ops): Adjust.
10229 * win32-low.c (win32_target_ops): Adjust.
10230
fd467969
PA
102312010-08-26 Pedro Alves <pedro@codesourcery.com>
10232
10233 * Makefile.in (WARN_CFLAGS): Get it from configure.
10234 (WERROR_CFLAGS): New.
10235 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10236 * configure.ac: Introduce --enable-werror, which adds -Werror to
10237 the compiler command line. Enabled by default. Disable with
10238 --disable-werror. Add -Wdeclaration-after-statement
10239 Wpointer-arith and -Wformat-nonliteral to warning flags.
10240 * configure: Regenerate.
10241
331e2f5f
PA
102422010-08-26 Pedro Alves <pedro@codesourcery.com>
10243
10244 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10245
e581f2b4
PA
102462010-08-26 Pedro Alves <pedro@codesourcery.com>
10247
10248 * gdbreplay.c (remote_error): New.
10249 (gdbchar): New.
10250 (expect): Use gdbchar. Check for error reading from GDB.
10251 Clarify sync error output.
10252 (play): Check for errors writing to GDB.
10253 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10254 * remote-utils.c (getpkt): Check for errors writing to the remote
10255 descriptor.
10256
3c11dd79
PA
102572010-08-25 Pedro Alves <pedro@codesourcery.com>
10258
10259 * linux-low.c (linux_wait_1): Move non-debugging code out of
10260 `debug_threads' control.
10261
d20a8ad9
PA
102622010-08-25 Pedro Alves <pedro@codesourcery.com>
10263
10264 * linux-low.c (linux_wait_1): Don't set last_status here.
10265 * server.c (push_event, queue_stop_reply_callback): Assert we're
10266 not pushing a TARGET_WAITKIND_IGNORE event.
10267 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10268 (myresume, handle_target_event): Set the thread's last_resume_kind
10269 and last_status from the target returned status.
10270
964e4306
PA
102712010-08-25 Pedro Alves <pedro@codesourcery.com>
10272
10273 PR threads/10729
10274
10275 * linux-x86-low.c (update_debug_registers_callback): New.
10276 (i386_dr_low_set_addr): Use it.
10277 (i386_dr_low_get_addr): New.
10278 (i386_dr_low_set_control): Use update_debug_registers_callback.
10279 (i386_dr_low_get_control): New.
10280 (i386_dr_low_get_status): Adjust.
10281 * linux-low.c (linux_stop_lwp): New.
10282 * linux-low.h (linux_stop_lwp): Declare.
10283
10284 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10285 argument instead of a i386_debug_reg_state.
10286 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10287 a i386_debug_reg_state.
10288 (i386_insert_aligned_watchpoint): Adjust.
10289 (i386_remove_aligned_watchpoint): Adjust.
10290 (i386_low_stopped_data_address): Read the debug registers from the
10291 inferior instead of from the mirrors.
10292 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10293 (i386_dr_low_get_addr): Declare.
10294 (i386_dr_low_get_control): Declare.
10295 (i386_dr_low_get_status): Change prototype.
10296
10297 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10298 (i386_dr_low_get_addr): New.
10299 (i386_dr_low_get_control): New.
10300 (i386_dr_low_get_status): Adjust prototype. Return
10301 dr_status_mirror.
10302 (i386_initial_stuff): Clear dr_status_mirror and
10303 dr_control_mirror.
10304 (i386_get_thread_context): Adjust.
10305 (i386_set_thread_context): Adjust.
10306 (i386_thread_added): Adjust.
10307
5f21a75b
PA
103082010-08-24 Pedro Alves <pedro@codesourcery.com>
10309
10310 * linux-low.h (linux_thread_area): Delete declaration.
10311
3e4c1235
TS
103122010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10313
10314 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10315 after its termination.
10316
1971b033
PA
103172010-08-09 Pedro Alves <pedro@codesourcery.com>
10318
10319 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10320 (gdb_wants_all_stopped): Delete.
10321 (linux_wait_1): Don't call them.
10322 * server.c (handle_v_cont): Tag all threads as want-stopped.
10323 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10324 stopped as "client-wants-stopped".
10325
310444ac
PA
103262010-07-31 Pedro Alves <pedro@codesourcery.com>
10327
10328 * Makefile.in (signals_h): New.
10329 (server_h): Depend on it.
10330 (server.o): Don't depend on $(signals_def).
10331 (signals.o): Depend on $(signals_def).
10332
a19cae16
JK
103332010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10334
10335 * Makefile.in (signals_def): New.
10336 (server_h): Append include/gdb/signals.h and signals_def.
10337 (server.o): Append signals_def.
10338
30d50328
JK
103392010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10340
10341 * server.c (handle_target_event): Use target_signal_to_host for
10342 resume_info.sig initialization.
10343 * target.h (struct thread_resume) <sig>: New comment.
10344
5c3216e2
OS
103452010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10346
c6f46ca0
OS
10347 * server.c (handle_query): strcpy() the returned string from paddress()
10348 instead of sprintf().
5c3216e2
OS
10349 * utils.c (paddress): Return phex_nz().
10350
6bd31874
JB
103512010-07-07 Joel Brobecker <brobecker@adacore.com>
10352
10353 * server.c (handle_v_cont): Call mourn_inferior if process
10354 just exited.
10355 (myresume): Likewise.
10356
0fb4aa4b
PA
103572010-07-01 Pedro Alves <pedro@codesourcery.com>
10358
10359 Static tracepoints, and integration with UST.
10360
10361 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10362 * mem-break.c (uninsert_all_breakpoints)
10363 (reinsert_all_breakpoints): New.
10364 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10365 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10366 (gdb_agent_ust_loaded, helper_thread_id)
10367 (gdb_agent_helper_thread_id): New macros.
10368 (struct ipa_sym_addresses): Add addr_ust_loaded,
10369 addr_helper_thread_id, addr_cmd_buf.
10370 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10371 (in_process_agent_loaded_ust): New.
10372 (write_e_ust_not_loaded): New.
10373 (maybe_write_ipa_ust_not_loaded): New.
10374 (struct collect_static_trace_data_action): New.
10375 (enum tracepoint_type) <static_tracepoint>: New.
10376 (struct tracepoint) <handle>: Mention static tracepoints.
10377 (struct static_tracepoint_ctx): New.
10378 (CMD_BUF_SIZE): New.
10379 (add_tracepoint_action): Handle static tracepoint actions.
10380 (unprobe_marker_at): New.
10381 (clear_installed_tracepoints): Handle static tracepoints.
10382 (cmd_qtdp): Handle static tracepoints.
10383 (probe_marker_at): New.
10384 (cmd_qtstart): Handle static tracepoints.
10385 (response_tracepoint): Handle static tracepoints.
10386 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10387 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10388 (get_context_regcache): Handle static tracepoints.
10389 (do_action_at_tracepoint): Handle static tracepoint actions.
10390 (traceframe_find_block_type): Handle static trace data blocks.
10391 (traceframe_read_sdata): New.
10392 (download_tracepoints): Download static tracepoint actions.
10393 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10394 (GDB_PROBE_NAME): New.
10395 (ust_ops): New.
10396 (GET_UST_SYM): New.
10397 (USTF): New.
10398 (dlsym_ust): New.
10399 (ust_marker_to_static_tracepoint): New.
10400 (gdb_probe): New.
10401 (collect_ust_data_at_tracepoint): New.
10402 (gdb_ust_probe): New.
10403 (UNIX_PATH_MAX, SOCK_DIR): New.
10404 (gdb_ust_connect_sync_socket): New.
10405 (resume_thread, stop_thread): New.
10406 (run_inferior_command): New.
10407 (init_named_socket): New.
10408 (gdb_ust_socket_init): New.
10409 (cstr_to_hexstr): New.
10410 (next_st): New.
10411 (first_marker, next_marker): New.
10412 (response_ust_marker): New.
10413 (cmd_qtfstm, cmd_qtsstm): New.
10414 (unprobe_marker_at, probe_marker_at): New.
10415 (cmd_qtstmat, gdb_ust_thread): New.
10416 (gdb_ust_init): New.
10417 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10418 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10419 (ST_REGENTRY): New.
10420 (x86_64_st_collect_regmap): New.
10421 (X86_64_NUM_ST_COLLECT_GREGS): New.
10422 (AMD64_RIP_REGNUM): New.
10423 (supply_static_tracepoint_registers): New.
10424 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10425 (ST_REGENTRY): New.
10426 (i386_st_collect_regmap): New.
10427 (i386_NUM_ST_COLLECT_GREGS): New.
10428 (supply_static_tracepoint_registers): New.
10429 * server.c (handle_query): Handle qXfer:statictrace:read.
10430 <qSupported>: Report support for StaticTracepoints, and
10431 qXfer:statictrace:read features.
10432 * server.h (traceframe_read_sdata)
10433 (supply_static_tracepoint_registers): Declare.
10434 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10435 (unpack_varlen_hex): Include in IPA build.
10436 * Makefile.in (ustlibs, ustinc): New.
10437 (IPA_OBJS): Add remote-utils-ipa.o.
10438 ($(IPA_LIB)): Link -ldl and -lpthread.
10439 (UST_CFLAGS): New.
10440 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10441 * config.in, configure: Regenerate.
10442
9e4344e5
PA
104432010-06-20 Ian Lance Taylor <iant@google.com>
10444 Pedro Alves <pedro@codesourcery.com>
10445
10446 * linux-x86-low.c (always_true): Delete.
10447 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10448 trying to fool the compiler with always_true.
10449
c6beb2cb
PA
104502010-06-20 Pedro Alves <pedro@codesourcery.com>
10451
10452 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10453 conditions in gdbserver.
10454
d2ed6730
UW
104552010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10456
10457 * spu-low.c (spu_read_memory): Wrap around local store limit.
10458 (spu_write_memory): Likewise.
10459
4e29fb54
PA
104602010-06-15 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10463 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10464 LONGEST uses.
10465 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10466 uses.
10467 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10468 uses with LONGEST uses.
10469
6a271cae
PA
104702010-06-14 Stan Shebs <stan@codesourcery.com>
10471 Pedro Alves <pedro@codesourcery.com>
10472
10473 Bytecode compiler.
10474
10475 * linux-x86-low.c: Include limits.h.
10476 (add_insns): New.
10477 (always_true): New.
10478 (EMIT_ASM): New.
10479 (EMIT_ASM32): New.
10480 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10481 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10482 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10483 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10484 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10485 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10486 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10487 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10488 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10489 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10490 (amd64_emit_void_call_2): New.
10491 (amd64_emit_ops): New.
10492 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10493 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10494 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10495 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10496 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10497 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10498 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10499 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10500 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10501 (i386_emit_stack_adjust, i386_emit_int_call_1)
10502 (i386_emit_void_call_2): New.
10503 (i386_emit_ops): New.
10504 (x86_emit_ops): New.
10505 (the_low_target): Install x86_emit_ops.
10506 * server.h (struct emit_ops): New.
10507 (get_raw_reg_func_addr): Declare.
10508 (current_insn_ptr, emit_error): Declare.
10509 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10510 (set_trace_state_variable_value): New defines.
10511 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10512 addr_get_trace_state_variable_value and
10513 addr_set_trace_state_variable_value.
10514 (symbol_list): New fields for get_raw_reg,
10515 get_trace_state_variable_value and set_trace_state_variable_value.
10516 (condfn): New typedef.
10517 (struct tracepoint): New field `compiled_cond'.
10518 (do_action_at_tracepoint): Clear compiled_cond.
10519 (get_trace_state_variable_value, set_trace_state_variable_value):
10520 Export in the IPA.
10521 (condition_true_at_tracepoint): If there's a compiled condition,
10522 run that.
10523 (current_insn_ptr, emit_error): New globals.
10524 (struct bytecode_address): New.
10525 (get_raw_reg_func_addr): New.
10526 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10527 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10528 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10529 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10530 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10531 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10532 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10533 (compile_tracepoint_condition, compile_bytecodes): New.
10534 * target.h (emit_ops): Forward declare.
10535 (struct target_ops): New field emit_ops.
10536 (target_emit_ops): New.
10537 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10538 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10539 * linux-low.c (linux_emit_ops): New.
10540 (linux_target_ops): Install it.
10541 * linux-low.h (struct linux_target_ops): New field emit_ops.
10542
92b72907
UW
105432010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10544
10545 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10546 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10547
fa593d66
PA
105482010-06-01 Pedro Alves <pedro@codesourcery.com>
10549 Stan Shebs <stan@codesourcery.com>
10550
10551 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10552 (all): Depend on $(extra_libraries).
10553 (install-only): Install the IPA.
10554 (IPA_OBJS, IPA_LIB): New.
10555 (clean): Remove the IPA lib.
10556 (IPAGENT_CFLAGS): New.
10557 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10558 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10559 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10560 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10561 * configure.ac: Check for atomic builtins support in the compiler.
10562 (IPA_DEPFILES, extra_libraries): Define.
10563 * configure.srv (ipa_obj): Add description.
10564 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10565 (i[34567]86-*-linux*): Set ipa_obj.
10566 (x86_64-*-linux*): Set ipa_obj.
10567 * linux-low.c (stabilizing_threads): New.
10568 (supports_fast_tracepoints): New.
10569 (linux_detach): Stabilize threads before detaching.
10570 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10571 the lwp is either not stabilizing, or is moving out of a jump pad.
10572 (linux_fast_tracepoint_collecting): New.
10573 (maybe_move_out_of_jump_pad): New.
10574 (enqueue_one_deferred_signal): New.
10575 (dequeue_one_deferred_signal): New.
10576 (linux_wait_for_event_1): If moving out of a jump pad, defer
10577 pending signals to later.
10578 (linux_stabilize_threads): New.
10579 (linux_wait_1): Check if threads need moving out of jump pads, and
10580 do it if so.
10581 (stuck_in_jump_pad_callback): New.
10582 (move_out_of_jump_pad_callback): New.
10583 (lwp_running): New.
10584 (linux_resume_one_lwp): Handle moving out of jump pads.
10585 (linux_set_resume_request): Dequeue deferred signals.
10586 (need_step_over_p): Also step over fast tracepoint jumps.
10587 (start_step_over): Also uninsert fast tracepoint jumps.
10588 (finish_step_over): Also reinsert fast tracepoint jumps.
10589 (linux_install_fast_tracepoint_jump): New.
10590 (linux_target_ops): Install linux_stabilize_threads and
10591 linux_install_fast_tracepoint_jump_pad.
10592 * linux-low.h (linux_target_ops) <get_thread_area,
10593 install_fast_tracepoint_jump_pad>: New fields.
10594 (struct lwp_info) <collecting_fast_tracepoint,
10595 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10596 (linux_get_thread_area): Declare.
10597 * linux-x86-low.c (jump_insn): New.
10598 (x86_get_thread_area): New.
10599 (append_insns): New.
10600 (push_opcode): New.
10601 (amd64_install_fast_tracepoint_jump_pad): New.
10602 (i386_install_fast_tracepoint_jump_pad): New.
10603 (x86_install_fast_tracepoint_jump_pad): New.
10604 (the_low_target): Install x86_get_thread_area and
10605 x86_install_fast_tracepoint_jump_pad.
10606 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10607 (struct fast_tracepoint_jump): New.
10608 (fast_tracepoint_jump_insn): New.
10609 (fast_tracepoint_jump_shadow): New.
10610 (find_fast_tracepoint_jump_at): New.
10611 (fast_tracepoint_jump_here): New.
10612 (delete_fast_tracepoint_jump): New.
10613 (set_fast_tracepoint_jump): New.
10614 (uninsert_fast_tracepoint_jumps_at): New.
10615 (reinsert_fast_tracepoint_jumps_at): New.
10616 (set_breakpoint_at): Use write_inferior_memory.
10617 (uninsert_raw_breakpoint): Use write_inferior_memory.
10618 (check_mem_read): Mask out fast tracepoint jumps.
10619 (check_mem_write): Mask out fast tracepoint jumps.
10620 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10621 (set_fast_tracepoint_jump): Declare.
10622 (delete_fast_tracepoint_jump)
10623 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10624 (reinsert_fast_tracepoint_jumps_at): Declare.
10625 * regcache.c: Don't compile many functions when building the
10626 in-process agent library.
10627 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10628 the register buffer in the heap.
10629 (free_register_cache): If the register buffer isn't owned by the
10630 regcache, don't free it.
10631 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10632 pre-existing register caches.
10633 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10634 type.
10635 (convert_ascii_to_int): : Constify `from' parameter type.
10636 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10637 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10638 the needed buffer in-place.
10639 (relocate_instruction): New.
10640 * server.c (handle_query) <qSymbols>: If the target supports
10641 tracepoints, give it a chance of looking up symbols. Report
10642 support for fast tracepoints.
10643 (handle_status): Stabilize threads.
10644 (process_serial_event): Adjust.
10645 * server.h (struct fast_tracepoint_jump): Forward declare.
10646 (struct process_info) <fast_tracepoint_jumps>: New field.
10647 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10648 (decode_X_packet, decode_M_packet): Adjust.
10649 (relocate_instruction): Declare.
10650 (in_process_agent_loaded): Declare.
10651 (tracepoint_look_up_symbols): Declare.
10652 (struct fast_tpoint_collect_status): Declare.
10653 (fast_tracepoint_collecting): Declare.
10654 (force_unlock_trace_buffer): Declare.
10655 (handle_tracepoint_bkpts): Declare.
10656 (initialize_low_tracepoint)
10657 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10658 * target.h (struct target_ops) <stabilize_threads,
10659 install_fast_tracepoint_jump_pad>: New fields.
10660 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10661 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10662 [HAVE_STDINT_H]: Include stdint.h.
10663 (trace_debug_1): Rename to ...
10664 (trace_vdebug): ... this.
10665 (trace_debug): Rename to ...
10666 (trace_debug_1): ... this. Add `level' parameter.
10667 (trace_debug): New.
10668 (ATTR_USED, ATTR_NOINLINE): New.
10669 (IP_AGENT_EXPORT): New.
10670 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10671 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10672 (about_to_request_buffer_space, trace_buffer_is_full)
10673 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10674 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10675 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10676 (traceframe_write_count, traceframes_created)
10677 (trace_state_variables)
10678 New renaming defines.
10679 (struct ipa_sym_addresses): New.
10680 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10681 (symbol_list): New.
10682 (ipa_sym_addrs): New.
10683 (all_tracepoint_symbols_looked_up): New.
10684 (in_process_agent_loaded): New.
10685 (write_e_ipa_not_loaded): New.
10686 (maybe_write_ipa_not_loaded): New.
10687 (tracepoint_look_up_symbols): New.
10688 (debug_threads) [IN_PROCESS_AGENT]: New.
10689 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10690 (UNKNOWN_SIDE_EFFECTS): New.
10691 (stop_tracing): New.
10692 (flush_trace_buffer): New.
10693 (stop_tracing_bkpt): New.
10694 (flush_trace_buffer_bkpt): New.
10695 (read_inferior_integer): New.
10696 (read_inferior_uinteger): New.
10697 (read_inferior_data_pointer): New.
10698 (write_inferior_data_pointer): New.
10699 (write_inferior_integer): New.
10700 (write_inferior_uinteger): New.
10701 (struct collect_static_trace_data_action): Delete.
10702 (enum tracepoint_type): New.
10703 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10704 <actions_str, step_actions, step_actions_str>: Only include in
10705 GDBserver.
fa593d66
PA
10706 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10707 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10708 (tracepoints): Use IP_AGENT_EXPORT.
10709 (last_tracepoint): Don't include in the IPA.
10710 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10711 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10712 (alloced_trace_state_variables): New.
10713 (trace_state_variables): Use IP_AGENT_EXPORT.
10714 (traceframe_t): Delete unused variable.
10715 (circular_trace_buffer): Don't include in the IPA.
10716 (trace_buffer_start): Delete.
10717 (struct trace_buffer_control): New.
10718 (trace_buffer_free): Delete.
10719 (struct ipa_trace_buffer_control): New.
10720 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10721 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10722 New.
10723 (trace_buffer_ctrl): New.
10724 (TRACE_BUFFER_CTRL_CURR): New.
10725 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10726 Reimplement as macros.
10727 (trace_buffer_wrap): Delete.
10728 (traceframe_write_count, traceframe_read_count)
10729 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10730 (struct tracepoint_hit_ctx) <type>: New field.
10731 (struct fast_tracepoint_ctx): New.
10732 (memory_barrier): New.
10733 (cmpxchg): New.
10734 (record_tracepoint_error): Update atomically in the IPA.
10735 (clear_inferior_trace_buffer): New.
10736 (about_to_request_buffer_space): New.
10737 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10738 updating the same buffer.
10739 (add_tracepoint): Default the tracepoint's type to trap
10740 tracepoint, and orig_size to -1.
10741 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10742 internal variables.
10743 (create_trace_state_variable): New parameter `gdb'. Handle it.
10744 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10745 (cmd_qtdp): Handle fast tracepoints.
10746 (cmd_qtdv): Adjust.
10747 (max_jump_pad_size): New.
10748 (gdb_jump_pad_head): New.
10749 (get_jump_space_head): New.
10750 (claim_jump_space): New.
10751 (sort_tracepoints): New.
10752 (MAX_JUMP_SIZE): New.
10753 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10754 IPA.
10755 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10756 support. Upload fast traceframes, and delete internal IPA
10757 breakpoints.
10758 (stop_tracing_handler): New.
10759 (flush_trace_buffer_handler): New.
10760 (cmd_qtstop): Upload fast tracepoints.
10761 (response_tracepoint): Handle fast tracepoints.
10762 (tracepoint_finished_step): Upload fast traceframes. Set the
10763 tracepoint hit context's tracepoint type.
10764 (handle_tracepoint_bkpts): New.
10765 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10766 type. Add comment about fast tracepoints.
10767 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10768 non-existing action_str field.
10769 (get_context_regcache): Handle fast tracepoints.
10770 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10771 to the regcache.
10772 (fast_tracepoint_from_jump_pad_address): New.
10773 (fast_tracepoint_from_ipa_tpoint_address): New.
10774 (collecting_t): New.
10775 (force_unlock_trace_buffer): New.
10776 (fast_tracepoint_collecting): New.
10777 (collecting): New.
10778 (gdb_collect): New.
10779 (write_inferior_data_ptr): New.
10780 (target_tp_heap): New.
10781 (target_malloc): New.
10782 (download_agent_expr): New.
10783 (UALIGN): New.
10784 (download_tracepoints): New.
10785 (download_trace_state_variables): New.
10786 (upload_fast_traceframes): New.
10787 (IPA_FIRST_TRACEFRAME): New.
10788 (IPA_NEXT_TRACEFRAME_1): New.
10789 (IPA_NEXT_TRACEFRAME): New.
10790 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10791 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10792 (gdb_jump_pad_buffer_end): New.
10793 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10794 (initialize_tracepoint): Adjust.
10795 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10796 buffer. Initialize the low module.
10797 * utils.c (PREFIX, TOOLNAME): New.
10798 (malloc_failure): Use PREFIX.
10799 (error): In the IPA, an error causes an exit.
10800 (fatal, warning): Use PREFIX.
10801 (internal_error): Use TOOLNAME.
10802 (NUMCELLS): Increase to 10.
10803 * configure, config.in: Regenerate.
10804
d149dd1d
PA
108052010-06-01 Pedro Alves <pedro@codesourcery.com>
10806
10807 * server.c (handle_query) <qSupported>: Do two passes over the
10808 qSupported string to avoid nesting strtok.
10809
f6528abd
JK
108102010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10811
10812 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10813 (CDEPS): New.
10814 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10815 -Wl,--dynamic-list.
10816 * configure: Regenerate.
10817 * proc-service.list: New.
10818
ca2a87a0
JK
108192010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10820
10821 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10822 New comment.
10823
363a6e9f
OS
108242010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10825
10826 * gdbreplay.c (remote_open): Check error return from socket() call by
10827 its equality to -1 not by it being negative.
10828 * remote-utils.c (remote_open): Likewise.
10829
d23b6cb1
PA
108302010-05-23 Pedro Alves <pedro@codesourcery.com>
10831
10832 * config.h: Regenerate.
10833
28d3cf85
MK
108342010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10835
10836 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10837 doesn't provide PTRACE_GET_THREAD_AREA.
10838
fea36a59
MK
108392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10840
10841 * linux-m68k-low.c: Include <asm/ptrace.h>
10842 (ps_get_thread_area): Implement.
10843
24b066ba
DE
108442010-05-03 Doug Evans <dje@google.com>
10845
10846 * event-loop.c (struct callback_event): New struct.
10847 (callback_list): New global.
10848 (append_callback_event, delete_callback_event): New functions.
10849 (process_callback): New function.
10850 (start_event_loop): Call it.
10851 * remote-utils.c (NOT_SCHEDULED): Define.
10852 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10853 moved out of readchar.
10854 (readchar): Rewrite. Call reschedule before returning.
10855 (reset_readchar): New function.
10856 (remote_close): Call it.
10857 (process_remaining, reschedule): New functions.
10858 * server.h (callback_handler_func): New typedef.
10859 (append_callback_event, delete_callback_event): Declare.
10860
9836d6ea
PA
108612010-05-03 Pedro Alves <pedro@codesourcery.com>
10862
10863 * proc-service.c (ps_pglobal_lookup): Use
10864 thread_db_look_up_one_symbol.
10865 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10866 parameter. Use it instead of all_symbols_looked_up.
10867 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10868 field.
10869 (all_symbols_looked_up): Don't declare.
10870 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10871 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10872 field.
10873 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10874 Set all_symbols_looked_up here.
10875 (thread_db_look_up_one_symbol): New.
10876 (thread_db_get_tls_address): Adjust.
10877 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10878 thread_db object on the heap, and tentatively set it in the
10879 process structure.
10880 (thread_db_init): Don't set all_symbols_looked_up here.
10881 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10882
7984d532
PA
108832010-05-03 Pedro Alves <pedro@codesourcery.com>
10884
10885 * linux-low.c (linux_kill, linux_detach): Adjust.
10886 (status_pending_p_callback): Remove redundant statement. Check
10887 for !TARGET_WAITIKIND_IGNORE, instead of
10888 TARGET_WAITKIND_STOPPED.
10889 (handle_tracepoints): Make sure LWP is locked. Adjust.
10890 (linux_wait_for_event_1): Adjust.
10891 (linux_cancel_breakpoints): New.
10892 (unsuspend_one_lwp): New.
10893 (unsuspend_all_lwps): New.
10894 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10895 (send_sigstop_callback): Change return type to int, add new
10896 `except' parameter and handle it.
10897 (suspend_and_send_sigstop_callback): New.
10898 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10899 pass them down. If SUSPEND, also increment the lwp's suspend
10900 count.
10901 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10902 (need_step_over_p): Don't consider suspended LWPs.
10903 (start_step_over): Adjust.
10904 (proceed_one_lwp): Change return type to int, add new `except'
10905 parameter and handle it.
10906 (unsuspend_and_proceed_one_lwp): New.
10907 (proceed_all_lwps): Use find_inferior instead of
10908 for_each_inferior.
10909 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10910 also decrement the suspend count of LWPs. Pass `except' down,
10911 instead of hacking its suspend count.
10912 (linux_pause_all): Add `freeze' parameter. Adjust.
10913 (linux_unpause_all): New.
10914 (linux_target_ops): Install linux_unpause_all.
10915 * server.c (handle_status): Adjust.
10916 * target.h (struct target_ops): New fields `unpause_all' and
10917 `cancel_breakpoints'. Add new parameter to `pause_all'.
10918 (pause_all): Add new `freeze' parameter.
10919 (unpause_all): New.
10920 (cancel_breakpoints): New.
10921 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10922 cancel breakpoints.
10923 (cmd_qtstart): Pause threads.
10924 (stop_tracing): Pause threads, and cancel breakpoints.
10925 * win32-low.c (win32_target_ops): Adjust.
10926
e471f25b
PA
109272010-05-03 Pedro Alves <pedro@codesourcery.com>
10928
10929 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10930 the inferior right away from here...
10931 (linux_wait_1): ... to here, and adjust to check the thread's
10932 last_resume_kind instead of the lwp's step or stop_expected flags.
10933
1915ef4f
PA
109342010-05-02 Pedro Alves <pedro@codesourcery.com>
10935
10936 * README: Use consistent `GDB' and `GDBserver' spellings.
10937
f9e39928
PA
109382010-05-02 Pedro Alves <pedro@codesourcery.com>
10939
10940 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10941 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10942 (linux_detach_one_lwp): Assume the lwp is stopped.
10943 (any_thread_of): Delete.
10944 (linux_detach): Stop all lwps here. Don't blindly delete all
10945 breakpoints.
10946 (delete_lwp_callback): New.
10947 (linux_mourn): Delete all lwps of the process that is gone.
10948 (linux_wait_1): Don't delete the last lwp of the process here.
10949 * mem-break.h (mark_breakpoints_out): Declare.
10950 * mem-break.c (mark_breakpoints_out): New.
10951 (free_all_breakpoints): Use it.
10952 * server.c (handle_target_event): If the process is gone, mark
10953 breakpoints out.
10954 * thread-db.c (struct thread_db) <create_bp>: New field.
10955 (thread_db_enable_reporting): Fix prototype. Store a thread event
10956 breakpoint reference in the thread_db struct.
10957 (thread_db_load_search): Clear the thread_db object.
10958 (try_thread_db_load_1): Ditto.
10959 (switch_to_process): New.
10960 (disable_thread_event_reporting): Use it.
10961 (remove_thread_event_breakpoints): New.
10962 (thread_db_detach, thread_db_mourn): Use it.
10963
1e7fc18c
PA
109642010-05-01 Pedro Alves <pedro@codesourcery.com>
10965
10966 * linux-low.c (linux_enable_event_reporting): New.
10967 (linux_wait_for_event_1, handle_extended_wait): Use it.
10968
02fc4de7
PA
109692010-04-30 Pedro Alves <pedro@codesourcery.com>
10970
10971 * linux-low.c (linux_kill_one_lwp, linux_kill)
10972 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10973 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10974 SIGSTOP even if the LWP is stopped.
10975 (send_sigstop_callback): New.
10976 (stop_all_lwps): Use send_sigstop_callback instead.
10977 (linux_resume_one_thread): Adjust.
10978 (proceed_one_lwp): Still proceed an LWP that the client has
10979 requested to stop, if we haven't reported it as stopped yet. Make
10980 sure that LWPs the client want stopped, have a pending SIGSTOP.
10981
bc3b5632
DE
109822010-04-26 Doug Evans <dje@google.com>
10983
ae1ada35
DE
10984 * server.c (handle_general_set): Make static.
10985
bc3b5632
DE
10986 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10987 Print received char after testing for error/eof instead of before.
10988 (input_interrupt): Tweak comment.
10989
65730243
DE
109902010-04-23 Doug Evans <dje@google.com>
10991
10992 * server.c (start_inferior): Print inferior argv if --debug.
10993
a8ae7dc0
AR
109942010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10995
10996 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10997 * nto-x86-low.c: Include server.h
10998
1c07cc19
PM
109992010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11000
11001 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11002 be consistent with other sources of this directory.
11003 (init_registers_amd64): Correct name of source file of this function
11004 in the comment.
11005
e0a61e09
PM
110062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11007
11008 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11009 64-bit executables.
11010
54709339
PM
110112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11012
11013 * win32-i386-low.c: Add 64-bit support.
11014 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11015 (init_registers_amd64): Declare.
11016 (mappings): Add 64-bit version of array.
11017 (init_windows_x86): New function.
11018 (the_low_target): Change init_arch field to init_windows_x86.
11019
e8f0053d
PM
110202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11021
11022 * win32-low.c: Adapt to support also 64-bit architecture.
11023 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11024 (get_image_name): Use SIZE_T type for local variable `done'.
11025 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11026 (toolhelp_get_dll_name): Idem.
11027 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11028 Use uintptr_t typecast to avoid warning.
11029 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11030 (handle_exception): Use phex_nz to avoid warning.
11031 (win32_wait): Remove unused local variable `process'.
11032
c481e77e
PM
110332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11034
11035 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11036 `amd64-avx.o'.
11037
12ea4b69
PM
110382010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11039
11040 * configure.ac: Use `ws2_32' library for srv_mingw.
11041 * configure: Regenerate.
11042 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11043 * remote-utils.c: Likewise.
11044
f6d1620c
L
110452010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11046
11047 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11048 if __x86_64__ is defined.
11049
8e642873
PM
110502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11051
11052 * configure: Regenerate.
11053
711e434b
PM
110542010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11055
11056 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11057 * target.h (target_ops): New get_tib_address field.
11058 * win32-low.h (win32_thread_info): Add thread_local_base field.
11059 * win32-low.c (child_add_thread): Add tlb argument.
11060 Set thread_local_base field to TLB.
11061 (get_child_debug_event): Adapt to child_add_thread change.
11062 (win32_get_tib_address): New function.
11063 (win32_target_ops): Set get_tib_address field to
11064 win32_get_tib_address.
11065 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11066
505106cd
PA
110672010-04-12 Pedro Alves <pedro@codesourcery.com>
11068
505106cd
PA
11069 * linux-low.c (linux_mourn): Also remove the process.
11070 * server.c (handle_target_event): Don't remove the process here.
11071 * nto-low.c (nto_mourn): New.
11072 (nto_target_ops): Install it.
11073 * spu-low.c (spu_mourn): New.
11074 (spu_target_ops): Install it.
11075 * win32-low.c (win32_mourn): New.
11076 (win32_target_ops): Install it.
11077
e8470a06
PA
110782010-04-12 Pedro Alves <pedro@codesourcery.com>
11079
11080 * server.h (buffer_xml_printf): Remove redundant `;'.
11081
45ba0d02
PA
110822010-04-12 Pedro Alves <pedro@codesourcery.com>
11083
11084 * regcache.c (set_register_cache): Invalidate regcaches before
11085 changing the register cache layout.
11086 (regcache_invalidate_one): Allow a NULL regcache.
11087 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11088 regcaches before changing the register cache layout or the target
11089 regsets.
11090
59e04013
L
110912010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11092
11093 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11094 variable warning on Linux/x86-64.
11095
8336d594
PA
110962010-04-11 Pedro Alves <pedro@codesourcery.com>
11097
11098 GDBserver disconnected tracing support.
11099
11100 * linux-low.c (linux_remove_process): Delete.
11101 (add_lwp): Don't set last_resume_kind here.
11102 (linux_kill): Use `mourn'.
11103 (linux_detach): Use `thread_db_detach', and `mourn'.
11104 (linux_mourn): New.
11105 (linux_attach_lwp_1): Adjust comment.
11106 (linux_attach): last_resume_kind moved the thread_info; adjust.
11107 (status_pending_p_callback): Adjust.
11108 (linux_wait_for_event_1): Adjust.
11109 (count_events_callback, select_singlestep_lwp_callback)
11110 (select_event_lwp_callback, cancel_breakpoints_callback)
11111 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11112 (proceed_one_lwp): Adjust.
11113 (linux_async): Add debug output.
11114 (linux_thread_stopped): New.
11115 (linux_pause_all): New.
11116 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11117 linux_pause_all.
11118 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11119 (thread_db_free): Delete declaration.
11120 (thread_db_detach, thread_db_mourn): Declare.
11121 * thread-db.c (thread_db_init): Use thread_db_mourn.
11122 (thread_db_free): Delete, split in two.
11123 (disable_thread_event_reporting): New.
11124 (thread_db_detach): New.
11125 (thread_db_mourn): New.
11126
11127 * server.h (struct thread_info) <last_resume_kind>: New field.
11128 <attached>: Add comment.
11129 <gdb_detached>: New field.
11130 (handler_func): Change return type to int.
11131 (handle_serial_event, handle_target_event): Ditto.
11132 (gdb_connected): Declare.
11133 (tracing): Delete.
11134 (disconnected_tracing): Declare.
11135 (stop_tracing): Declare.
11136
11137 * server.c (handle_query) <qSupported>: Report support for
11138 disconnected tracing.
11139 (queue_stop_reply_callback): Account for running threads.
11140 (gdb_wants_thread_stopped): New.
11141 (gdb_wants_all_threads_stopped): New.
11142 (gdb_reattached_process): New.
11143 (handle_status): Clear the `gdb_detached' flag of all processes.
11144 In all-stop, stop all threads.
11145 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11146 (process_serial_event): If the remote connection breaks, or if an
11147 exit was forced with "monitor exit", force an event loop exit.
11148 Handle disconnected tracing on detach.
11149 (handle_serial_event): Adjust.
11150 (handle_target_event): If GDB isn't connected, forward events back
11151 to the inferior, unless the last process exited, in which case,
11152 exit gdbserver. Adjust interface.
11153
11154 * remote-utils.c (remote_open): Don't block in accept. Instead
11155 register an event loop source on the listen socket file
11156 descriptor. Refactor bits into ...
11157 (listen_desc): ... this new global.
11158 (gdb_connected): ... this new function.
11159 (enable_async_notification): ... this new function.
11160 (handle_accept_event): ... this new function.
11161 (remote_close): Clear remote_desc.
11162
11163 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11164
11165 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11166 New fields.
11167 (mourn_inferior): Define.
11168 (target_process_qsupported): Avoid the dangling else problem.
11169 (thread_stopped): Define.
11170 (pause_all): Define.
11171 (target_waitstatus_to_string): Declare.
11172 * target.c (target_waitstatus_to_string): New.
11173
11174 * tracepoint.c (tracing): Make extern.
11175 (disconnected_tracing): New.
11176 (stop_tracing): Make extern. Handle tracing stops due to GDB
11177 disconnecting.
11178 (cmd_qtdisconnected): New.
11179 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11180 (handle_tracepoint_general_set): Handle QTDisconnected.
11181
11182 * event-loop.c (event_handler_func): Change return type to int.
11183 (process_event): Bail out if the event handler wants the event
11184 loop to stop.
11185 (handle_file_event): Ditto.
11186 (start_event_loop): Bail out if the event handler wants the event
11187 loop to stop.
11188
11189 * nto-low.c (nto_target_ops): Adjust.
11190 * spu-low.c (spu_wait): Don't remove the process here.
11191 (spu_target_ops): Adjust.
11192 * win32-low.c (win32_wait): Don't remove the process here.
11193 (win32_target_ops): Adjust.
11194
5d267c4c
PA
111952010-04-11 Pedro Alves <pedro@codesourcery.com>
11196
11197 * regcache.c (realloc_register_cache): Invalidate inferior's
11198 regcache before recreating it.
11199
623ccd72
PA
112002010-04-09 Pedro Alves <pedro@codesourcery.com>
11201
11202 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11203
219f2f23
PA
112042010-04-09 Stan Shebs <stan@codesourcery.com>
11205 Pedro Alves <pedro@codesourcery.com>
11206
11207 * server.h (LONGEST): New.
11208 (struct thread_info) <while_stepping>: New field.
11209 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11210 Declare.
11211 (initialize_tracepoint, handle_tracepoint_general_set)
11212 (handle_tracepoint_query, tracepoint_finished_step)
11213 (tracepoint_was_hit, release_while_stepping_state_list):
11214 (current_traceframe): Declare.
11215 * server.c (handle_general_set): Handle tracepoint packets.
11216 (read_memory): New.
11217 (write_memory): New.
11218 (handle_search_memory_1): Use read_memory.
11219 (handle_query): Report support for conditional tracepoints, trace
11220 state variables, and tracepoint sources. Handle tracepoint
11221 queries.
11222 (main): Initialize the tracepoints module.
11223 (process_serial_event): Handle traceframe reads/writes.
11224
11225 * linux-low.c (handle_tracepoints): New.
11226 (linux_wait_1): Call it.
11227 (linux_resume_one_lwp): Handle while-stepping.
11228 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11229 (linux_target_ops): Install them.
11230 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11231 New field.
11232 * linux-x86-low.c (x86_supports_tracepoints): New.
11233 (the_low_target). Install it.
11234
11235 * mem-break.h (delete_breakpoint): Declare.
11236 * mem-break.c (delete_breakpoint): Make external.
11237
11238 * target.h (struct target_ops): Add `supports_tracepoints',
11239 `read_pc', and `write_pc' fields.
11240 (target_supports_tracepoints): Define.
11241 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11242 (phex_nz): New.
11243
11244 * regcache.h (struct regcache) <registers_owned>: New field.
11245 (init_register_cache, regcache_cpy): Declare.
11246 (regcache_read_pc, regcache_write_pc): Declare.
11247 (register_cache_size): Declare.
11248 (supply_regblock): Declare.
11249 * regcache.c (init_register_cache): New.
11250 (new_register_cache): Use it.
11251 (regcache_cpy): New.
11252 (register_cache_size): New.
11253 (supply_regblock): New.
11254 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11255
219f2f23
PA
11256 * tracepoint.c: New.
11257
11258 * Makefile.in (OBS): Add tracepoint.o.
11259 (tracepoint.o): New rule.
11260
3a13a53b
L
112612010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11262
11263 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11264 (i386-mmx.o): New.
11265 (i386-mmx.c): Likewise.
11266 (i386-mmx-linux.o): Likewise.
11267 (i386-mmx-linux.c): Likewise.
11268
11269 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11270 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11271 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11272 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11273
11274 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11275 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11276 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11277
1570b33e
L
112782010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11279
11280 * Makefile.in (clean): Updated.
11281 (i386-avx.o): New.
11282 (i386-avx.c): Likewise.
11283 (i386-avx-linux.o): Likewise.
11284 (i386-avx-linux.c): Likewise.
11285 (amd64-avx.o): Likewise.
11286 (amd64-avx.c): Likewise.
11287 (amd64-avx-linux.o): Likewise.
11288 (amd64-avx-linux.c): Likewise.
11289
11290 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11291 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11292 (srv_amd64_regobj): Add amd64-avx.o.
11293 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11294 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11295 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11296 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11297 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11298 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11299 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11300
11301 * i387-fp.c: Include "i386-xstate.h".
11302 (i387_xsave): New.
11303 (i387_cache_to_xsave): Likewise.
11304 (i387_xsave_to_cache): Likewise.
11305 (x86_xcr0): Likewise.
11306
11307 * i387-fp.h (i387_cache_to_xsave): Likewise.
11308 (i387_xsave_to_cache): Likewise.
11309 (x86_xcr0): Likewise.
11310
11311 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11312 * linux-crisv32-low.c (target_regsets): Likewise.
11313 * linux-m68k-low.c (target_regsets): Likewise.
11314 * linux-mips-low.c (target_regsets): Likewise.
11315 * linux-ppc-low.c (target_regsets): Likewise.
11316 * linux-s390-low.c (target_regsets): Likewise.
11317 * linux-sh-low.c (target_regsets): Likewise.
11318 * linux-sparc-low.c (target_regsets): Likewise.
11319 * linux-xtensa-low.c (target_regsets): Likewise.
11320
11321 * linux-low.c: Include <sys/uio.h>.
11322 (regsets_fetch_inferior_registers): Support nt_type.
11323 (regsets_store_inferior_registers): Likewise.
11324 (linux_process_qsupported): New.
11325 (linux_target_ops): Add linux_process_qsupported.
11326
11327 * linux-low.h (regset_info): Add nt_type.
11328 (linux_target_ops): Add process_qsupported.
11329
11330 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11331 and <sys/uio.h>.
11332 (init_registers_i386_avx_linux): New.
11333 (init_registers_amd64_avx_linux): Likewise.
11334 (xmltarget_i386_linux_no_xml): Likewise.
11335 (xmltarget_amd64_linux_no_xml): Likewise.
11336 (PTRACE_GETREGSET): Likewise.
11337 (PTRACE_SETREGSET): Likewise.
11338 (x86_fill_xstateregset): Likewise.
11339 (x86_store_xstateregset): Likewise.
11340 (use_xml): Likewise.
11341 (x86_linux_update_xmltarget): Likewise.
11342 (x86_linux_process_qsupported): Likewise.
11343 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11344 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11345 init_registers_i386_linux here. Call
11346 x86_linux_update_xmltarget.
11347 (the_low_target): Add x86_linux_process_qsupported.
11348
11349 * server.c (handle_query): Call target_process_qsupported.
11350
11351 * target.h (target_ops): Add process_qsupported.
11352 (target_process_qsupported): New.
11353
fc7238bb
PA
113542010-04-03 Pedro Alves <pedro@codesourcery.com>
11355
11356 * inferiors.c (add_thread): Set last_status kind to
11357 TARGET_WAITKIND_IGNORE.
11358 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11359 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11360 (linux_wait_1): Move `thread' local definition to block that uses
11361 it. Don't NULL initialize `event_child'.
11362 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11363 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11364 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11365
bdabb078
PA
113662010-04-01 Pedro Alves <pedro@codesourcery.com>
11367
11368 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11369 an extended waitstatus, or by a watchpoint.
11370 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11371 thread was stepping or has been stopped by a watchpoint.
11372
d3bbe7a0
PA
113732010-04-01 Pedro Alves <pedro@codesourcery.com>
11374
11375 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11376 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11377 of another, then delete the previous, and validate all
11378 breakpoints.
11379 (validate_inserted_breakpoint): New.
11380 (delete_disabled_breakpoints): New.
11381 (validate_breakpoints): New.
11382 (check_mem_read): Validate breakpoints before trusting their
11383 shadow. Delete disabled breakpoints.
11384 (check_mem_write): Validate breakpoints before trusting they
11385 should be inserted. Delete disabled breakpoints.
11386 * mem-break.h (validate_breakpoints):
11387 * server.c (handle_query): Validate breakpoints when we see a
11388 qSymbol query.
11389
8b07ae33
PA
113902010-04-01 Pedro Alves <pedro@codesourcery.com>
11391
11392 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11393 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11394 if we could tell there's a GDB breakpoint at stop_pc.
11395 (need_step_over_p): Don't do a step over if we find a GDB
11396 breakpoint at the resume PC.
11397
11398 * mem-break.c (struct raw_breakpoint): New.
11399 (enum bkpt_type): New type `gdb_breakpoint'.
11400 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11401 fields. New field `raw'.
11402 (find_raw_breakpoint_at): New.
11403 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11404 breakpoint instead.
11405 (set_breakpoint_at): Adjust.
11406 (delete_raw_breakpoint): New.
11407 (release_breakpoint): New.
11408 (delete_breakpoint): Rename to...
11409 (delete_breakpoint_1): ... this. Add proc parameter. Use
11410 release_breakpoint. Return ENOENT.
11411 (delete_breakpoint): Reimplement.
11412 (find_breakpoint_at): Delete.
11413 (find_gdb_breakpoint_at): New.
11414 (delete_breakpoint_at): Delete.
11415 (set_gdb_breakpoint_at): New.
11416 (delete_gdb_breakpoint_at): New.
11417 (gdb_breakpoint_here): New.
11418 (set_reinsert_breakpoint): Use release_breakpoint.
11419 (uninsert_breakpoint): Rename to ...
11420 (uninsert_raw_breakpoint): ... this.
11421 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11422 (reinsert_raw_breakpoint): Change parameter type to
11423 raw_breakpoint.
11424 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11425 instead.
11426 (check_breakpoints): Adjust. Use release_breakpoint.
11427 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11428 (breakpoint_inserted_here): Ditto.
11429 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11430 Don't trust the breakpoint's shadow if it is not inserted.
11431 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11432 (delete_all_breakpoints): Adjust.
11433 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11434 use delete_breakpoint_1.
11435
11436 * mem-break.h (breakpoints_supported): Delete declaration.
11437 (set_gdb_breakpoint_at): Declare.
11438 (gdb_breakpoint_here): Declare.
11439 (delete_breakpoint_at): Delete.
11440 (delete_gdb_breakpoint_at): Declare.
11441
11442 * server.h (struct raw_breakpoint): Forward declare.
11443 (struct process_info): New field `raw_breakpoints'.
11444
11445 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11446 breakpoints.
11447
6bf5e0ba
PA
114482010-03-24 Pedro Alves <pedro@codesourcery.com>
11449
11450 * linux-low.c (status_pending_p_callback): Fix comment.
11451 (linux_wait_for_event_1): Move most of the internal breakpoint
11452 handling from here...
11453 (linux_wait_1): ... to here.
11454 (count_events_callback): New.
11455 (select_singlestep_lwp_callback): New.
11456 (select_event_lwp_callback): New.
11457 (cancel_breakpoints_callback): New.
11458 (select_event_lwp): New.
11459 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11460 priority to all LWPs that have had events that should be reported
11461 to the client. Cancel breakpoints when about to reporting the
11462 event to the client, not while stopping lwps. No longer cancel
11463 finished single-steps here.
11464 (cancel_finished_single_step): Delete.
11465 (cancel_finished_single_steps): Delete.
11466
414a389f
PA
114672010-03-24 Pedro Alves <pedro@codesourcery.com>
11468
11469 * mem-break.c (enum bkpt_type): New.
11470 (struct breakpoint): New field `type'.
11471 (set_breakpoint_at): Change return type to struct breakpoint
11472 pointer. Set type to `other_breakpoint' by default.
11473 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11474 in the breakpoint list.
11475 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11476 (reinsert_breakpoint): Rename to ...
11477 (reinsert_raw_breakpoint): ... this.
11478 (reinsert_breakpoints_at): Adjust.
11479 * mem-break.h (struct breakpoint): Declare.
11480 (set_breakpoint_at): Change return type to struct breakpoint
11481 pointer.
11482
2280c721
PA
114832010-03-24 Pedro Alves <pedro@codesourcery.com>
11484
11485 * server.c (handle_query): Assign, not compare.
11486
d50171e4
PA
114872010-03-24 Pedro Alves <pedro@codesourcery.com>
11488
11489 Teach linux gdbserver to step-over-breakpoints.
11490
11491 * linux-low.c (can_hardware_single_step): New.
11492 (supports_breakpoints): New.
11493 (handle_extended_wait): If stopping threads, read the stop pc of
11494 the new cloned LWP.
11495 (get_pc): New.
11496 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11497 low target doesn't support retrieving the PC.
11498 (add_lwp): Set last_resume_kind to resume_continue.
11499 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11500 (linux_attach): Don't clear stop_expected. Set the lwp's
11501 last_resume_kind to resume_stop.
11502 (linux_detach_one_lwp): Don't check for removed breakpoints.
11503 (check_removed_breakpoint): Delete.
11504 (status_pending_p): Rename to ...
11505 (status_pending_p_callback): ... this. Don't check for removed
11506 breakpoints. Don't consider threads that are stopped from GDB's
11507 perspective.
11508 (linux_wait_for_lwp): Always read the stop_pc here.
11509 (cancel_breakpoint): New.
11510 (step_over_bkpt): New global.
11511 (linux_wait_for_event_1): Implement stepping over breakpoints.
11512 (gdb_wants_lwp_stopped): New.
11513 (gdb_wants_all_stopped): New.
11514 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11515 single-step traps here. Store the thread's last reported target
11516 wait status.
11517 (send_sigstop): Don't clear stop_expected. Always set it,
11518 instead.
11519 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11520 (cancel_finished_single_step): New.
11521 (cancel_finished_single_steps): New.
11522 (wait_for_sigstop): Don't cancel finished single-step traps here.
11523 (linux_resume_one_lwp): Don't check for removed breakpoints.
11524 Don't set `step' on non-hardware step archs.
11525 (linux_set_resume_request): Ignore resume_stop requests if already
11526 stopping or stopped. Set the lwp's last_resume_kind.
11527 (resume_status_pending_p): Don't check for removed breakpoints.
11528 (need_step_over_p): New.
11529 (start_step_over): New.
11530 (finish_step_over): New.
11531 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11532 requests. Clear the thread's last reported target waitstatus.
11533 Don't use the `suspended' flag. Don't consider pending breakpoints.
11534 (linux_resume): Start a step-over if necessary.
11535 (proceed_one_lwp): New.
11536 (proceed_all_lwps): New.
11537 (unstop_all_lwps): New.
11538 * linux-low.h (struct lwp_info): Rewrite comment for the
11539 `suspended' flag. Add the `stop_pc' field. Delete the
11540 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11541 Add `'last_resume_kind' and `need_step_over' fields.
11542 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11543 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11544 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11545 (set_raw_breakpoint_at): New.
11546 (set_breakpoint_at): Rewrite to use it.
11547 (reinsert_breakpoint_handler): Delete.
11548 (set_reinsert_breakpoint): New.
11549 (reinsert_breakpoint_by_bp): Delete.
11550 (delete_reinsert_breakpoints): New.
11551 (uninsert_breakpoint): Rewrite.
11552 (uninsert_breakpoints_at): New.
11553 (reinsert_breakpoint): Rewrite.
11554 (reinsert_breakpoints_at): New.
11555 (check_breakpoints): Rewrite.
11556 (breakpoint_here): New.
11557 (breakpoint_inserted_here): New.
11558 (check_mem_read): Adjust.
11559 * mem-break.h (breakpoints_supported, breakpoint_here)
11560 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11561 (reinsert_breakpoint_by_bp): Delete declaration.
11562 (delete_reinsert_breakpoints): Declare.
11563 (reinsert_breakpoint): Delete declaration.
11564 (reinsert_breakpoints_at): Declare.
11565 (uninsert_breakpoint): Delete declaration.
11566 (uninsert_breakpoints_at): Declare.
11567 (check_breakpoints): Adjust prototype.
11568 * server.h: Adjust include order.
11569 (struct thread_info): Declare here. Add a `last_status' field.
11570
30ba68cb
MS
115712010-03-23 Michael Snyder <msnyder@vmware.com>
11572
11573 * server.c (crc32): New function.
11574 (handle_query): Add handling for 'qCRC:' request.
11575
b9a881c2
PA
115762010-03-23 Pedro Alves <pedro@codesourcery.com>
11577
11578 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11579 lwp had been stopped by a watchpoint.
11580
e92d13d5
PA
115812010-03-16 Pedro Alves <pedro@codesourcery.com>
11582
11583 * server.h (internal_error): Declare.
11584 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11585 * utils.c (internal_error): New function.
11586
64daa791
AS
115872010-03-15 Andreas Schwab <schwab@redhat.com>
11588
11589 * configure.srv: Fix typo setting srv_regobj.
11590
f52cd8cd
PA
115912010-03-15 Pedro Alves <pedro@codesourcery.com>
11592
11593 * linux-low.c (fetch_register): Avoid passing a non string literal
11594 format to `error'.
11595 (usr_store_inferior_registers): Ditto.
11596
93ae6fdc
PA
115972010-03-14 Pedro Alves <pedro@codesourcery.com>
11598
11599 * linux-low.c (linux_write_memory): Bail out early if peeking
11600 memory failed.
11601
c3adc08c
PA
116022010-03-14 Pedro Alves <pedro@codesourcery.com>
11603
11604 * linux-low.h (struct lwp_info): New fields
11605 `stopped_by_watchpoint' and `stopped_data_address'.
11606 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11607 here, and cache them in the lwp object.
11608 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11609 directly.
11610 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11611 field.
11612 (linux_stopped_by_watchpoint): Rewrite.
11613 (linux_stopped_data_address): Rewrite.
11614
bce522a2
PA
116152010-03-06 Simo Melenius <simo.melenius@iki.fi>
11616
11617 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11618 switching the current inferior, not before.
11619
90884b2b
L
116202010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11621
11622 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11623 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11624 i386-linux.c and amd64-linux.c.
11625 (reg-i386.o): Removed.
11626 (reg-i386.c): Likewise.
11627 (reg-i386-linux.o): Likewise.
11628 (reg-i386-linux.c): Likewise.
11629 (reg-x86-64.o): Likewise.
11630 (reg-x86-64.c): Likewise.
11631 (reg-x86-64-linux.o): Likewise.
11632 (reg-x86-64-linux.c): Likewise.
11633 (i386.o): New.
11634 (i386.c): Likewise.
11635 (i386-linux.o): Likewise.
11636 (i386-linux.c): Likewise.
11637 (amd64.o): Likewise.
11638 (amd64.c): Likewise.
11639 (amd64-linux.o): Likewise.
11640 (amd64-linux.c): Likewise.
11641
11642 * configure.srv (srv_i386_regobj): New.
11643 (srv_i386_linux_regobj): Likewise.
11644 (srv_amd64_regobj): Likewise.
11645 (srv_amd64_linux_regobj): Likewise.
11646 (srv_i386_32bit_xmlfiles): Likewise.
11647 (srv_i386_64bit_xmlfiles): Likewise.
11648 (srv_i386_xmlfiles): Likewise.
11649 (srv_amd64_xmlfiles): Likewise.
11650 (srv_i386_linux_xmlfiles): Likewise.
11651 (srv_amd64_linux_xmlfiles): Likewise.
11652 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11653 srv_xmlfiles to $srv_i386_xmlfiles.
11654 (i[34567]86-*-mingw32ce*): Likewise.
11655 (i[34567]86-*-mingw*): Likewise.
11656 (i[34567]86-*-nto*): Likewise.
11657 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11658 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11659 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11660 (x86_64-*-linux*): Likewise.
11661
11662 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11663 (init_registers_amd64_linux): New.
11664 (x86_arch_setup): Replace init_registers_x86_64_linux with
11665 init_registers_amd64_linux.
11666
193f13e6
MK
116672010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11668
11669 * configure.ac: Check for libdl. If it is not available link against
11670 static libthread_db.
11671 * configure: Regenerate.
11672
85d721b8
PA
116732010-02-22 Pedro Alves <pedro@codesourcery.com>
11674
11675 PR9605
11676
11677 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11678 handing a read watchpoint.
11679 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11680
6076632b
DE
116812010-02-12 Doug Evans <dje@google.com>
11682
11683 * linux-low.c (linux_supports_tracefork_flag): Document.
11684 (linux_look_up_symbols): Add comment.
11685
3327ccf7
L
116862010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11687
11688 * regcache.c (supply_register): Clear regcache if buf is NULL.
11689
0718675c 116902010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11691 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11692
11693 * inferiors.c (find_inferior): Add function documentation.
11694 (unloaded_dll): Handle the case where the unloaded dll has not
11695 been previously registered in the dll list.
11696
177321bd
DJ
116972010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11698
11699 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11700 (thumb2_breakpoint): New.
11701 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11702
2b009048
DJ
117032010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11704
11705 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11706 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11707 breakpoints.
11708
3be029c7
PA
117092010-01-21 Pedro Alves <pedro@codesourcery.com>
11710
11711 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11712
18f5de3b
JK
117132010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11714
11715 * linux-s390-low.c (s390_collect_ptrace_register)
11716 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11717
3743bb4f
DE
117182010-01-21 Doug Evans <dje@google.com>
11719
14ce3065
DE
11720 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11721 (PTRACE_ARG4_TYPE): New macro.
11722 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11723 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11724 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11725 (usr_store_inferior_registers): Ditto.
11726 (linux_read_memory, linux_write_memory): Ditto.
11727 (linux_test_for_tracefork): Ditto.
11728
3743bb4f
DE
11729 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11730 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11731
8b315be5
PA
117322010-01-21 Pedro Alves <pedro@codesourcery.com>
11733
11734 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11735 target.
11736
85492558
PA
117372010-01-21 Pedro Alves <pedro@codesourcery.com>
11738
11739 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11740 prototype to take a regcache. Adjust.
11741
442ea881
PA
117422010-01-20 Pedro Alves <pedro@codesourcery.com>
11743
11744 * regcache.h (struct thread_info): Forward declare.
11745 (struct regcache): New.
11746 (new_register_cache): Adjust prototype.
11747 (get_thread_regcache): Declare.
11748 (free_register_cache): Adjust prototype.
11749 (registers_to_string, registers_from_string): Ditto.
11750 (supply_register, supply_register_by_name, collect_register)
11751 (collect_register_as_string, collect_register_by_name): Ditto.
11752 * regcache.c (struct inferior_regcache_data): Delete.
11753 (get_regcache): Rename to ...
11754 (get_thread_regcache): ... this. Adjust. Switch inferior before
11755 fetching registers.
11756 (regcache_invalidate_one): Adjust.
11757 (regcache_invalidate): Fix prototype.
11758 (new_register_cache): Return the new register cache.
11759 (free_register_cache): Change prototype.
11760 (realloc_register_cache): Adjust.
11761 (registers_to_string): Change prototype to take a regcache. Adjust.
11762 (registers_from_string): Ditto.
11763 (register_data): Ditto.
11764 (supply_register): Ditto.
11765 (supply_register_by_name): Ditto.
11766 (collect_register): Ditto.
11767 (collect_register_as_string): Ditto.
11768 (collect_register_by_name): Ditto.
11769 * server.c (process_serial_event): Adjust.
11770 * linux-low.h (regset_fill_func, regset_store_func): Change
11771 prototype.
11772 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11773 Change prototype.
11774 * linux-low.c (get_stop_pc): Adjust.
11775 (check_removed_breakpoint): Adjust.
11776 (linux_wait_for_event): Adjust.
11777 (linux_resume_one_lwp): Adjust.
11778 (fetch_register): Add regcache parameter. Adjust.
11779 (usr_store_inferior_registers): Ditto.
11780 (regsets_fetch_inferior_registers): Ditto.
11781 (regsets_store_inferior_registers): Ditto.
11782 (linux_fetch_registers, linux_store_registers): Ditto.
11783 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11784 regcache. Adjust.
43aaf8b6
PA
11785 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11786 Ditto.
442ea881
PA
11787 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11788 prototype to take a regcache.
11789 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11790 * remote-utils.c (convert_ascii_to_int, outreg)
11791 (prepare_resume_reply): Change prototype to take a regcache.
11792 Adjust.
11793 * target.h (struct target_ops) <fetch_registers, store_registers>:
11794 Change prototype to take a regcache.
11795 (fetch_inferior_registers, store_inferior_registers): Change
11796 prototype to take a regcache. Adjust.
11797 * proc-service.c (ps_lgetregs): Adjust.
11798 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11799 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11800 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11801 take a regcache. Adjust.
11802 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11803 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11804 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11805 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11806 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11807 (cris_cannot_fetch_register):
11808 (cris_breakpoint_at): Change prototype to take a regcache.
11809 Adjust.
11810 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11811 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11812 to take a regcache. Adjust.
11813 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11814 Adjust.
11815 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11816 take a regcache. Adjust.
11817 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11818 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11819 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11820 * linux-mips-low.c (mips_get_pc):
11821 (mips_set_pc): Change prototype to take a regcache. Adjust.
11822 (mips_reinsert_addr): Adjust.
11823 (mips_collect_register): Change prototype to take a regcache.
11824 Adjust.
11825 (mips_supply_register):
11826 (mips_collect_register_32bit, mips_supply_register_32bit)
11827 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11828 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11829 * linux-ppc-low.c (ppc_supply_ptrace_register)
11830 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11831 (parse_spufs_run): Adjust.
11832 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11833 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11834 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11835 take a regcache. Adjust.
11836 * linux-s390-low.c (s390_collect_ptrace_register)
11837 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11838 (s390_set_pc): Change prototype to take a regcache. Adjust.
11839 (s390_arch_setup): Adjust.
11840 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11841 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11842 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11843 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11844 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11845 regcache. Adjust.
11846 (sparc_breakpoint_at): Adjust.
11847 * linux-xtensa-low.c (xtensa_fill_gregset):
11848 (xtensa_store_gregset):
11849 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11850 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11851 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11852 prototype to take a regcache. Adjust.
11853 * win32-arm-low.c (arm_fetch_inferior_register)
11854 (arm_store_inferior_register): Change prototype to take a
11855 regcache. Adjust.
11856 * win32-i386-low.c (i386_fetch_inferior_register)
11857 (i386_store_inferior_register): Change prototype to take a
11858 regcache. Adjust.
11859 * win32-low.c (child_fetch_inferior_registers)
11860 (child_store_inferior_registers): Change prototype to take a
11861 regcache. Adjust.
11862 (win32_wait): Adjust.
11863 (win32_fetch_inferior_registers): Change prototype to take a
11864 regcache. Adjust.
11865 (win32_store_inferior_registers): Adjust.
11866 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11867 store_inferior_register>: Change prototype to take a regcache.
11868
60c3d7b0
DE
118692010-01-20 Doug Evans <dje@google.com>
11870
11871 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11872 #ifdef.
11873 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11874 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11875
dc146f7c
VP
118762010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11877
11878 * linux-low.c (linux_core_of_thread): New.
11879 (compare_ints, show_process, list_threads): New.
11880 (linux_qxfer_osdata): Report threads and cores.
11881 (linux_target_op): Register linux_core_of_thread.
11882 * remote-utils.c (prepare_resume_reply): Report the core.
11883 (buffer_xml_printf): Support %d specifier.
11884 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11885 New.
11886 (handle_query): Handle qXfer:threads. Announce availability
11887 thereof.
11888 * target.h (struct target_ops): New field core_of_thread.
11889
7803799a
UW
118902010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11891
11892 * Makefile.in (clean): Remove new generated files.
11893 (reg-s390.o, reg-s390.c): Remove rules.
11894 (reg-s390x.o, reg-s390x.c): Likewise.
11895 (s390-linux32.o, s390-linux32.c): Add rules.
11896 (s390-linux64.o, s390-linux64.c): Likewise.
11897 (s390x-linux64.o, s390x-linux64.c): Likewise.
11898 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11899 * linux-s390-low.c: Include <elf.h>.
11900 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11901 (init_registers_s390): Remove prototype.
11902 (init_registers_s390x): Likewise.
11903 (init_registers_s390_linux32): Add prototype.
11904 (init_registers_s390_linux64): Likewise.
11905 (init_registers_s390x_linux64): Likewise.
11906 (s390_num_regs_3264): New define.
11907 (s390_regmap_3264): New global variable.
11908 (s390_cannot_fetch_register): Remove obsolete check.
11909 (s390_cannot_store_register): Likewise.
11910 (s390_collect_ptrace_register): Handle upper/lower register halves.
11911 (s390_supply_ptrace_register): Likewise.
11912 (s390_fill_gregset): Update to register number changes.
11913 (s390_get_hwcap): New routine.
11914 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11915 Install appropriate regmap and register set.
11916
6e7ffa39
JB
119172010-01-01 Joel Brobecker <brobecker@adacore.com>
11918
11919 * server.c (gdbserver_version): Update copyright year to 2010.
11920 * gdbreplay.c (gdbreplay_version): Likewise.
11921
957f3f49
DE
119222009-12-28 Doug Evans <dje@google.com>
11923
11924 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11925 elf/external.h. Include <elf.h> instead but only if necessary.
11926
ca5c370d
PA
119272009-12-28 Pedro Alves <pedro@codesourcery.com>
11928
11929 * linux-low.c (linux_remove_process): Remove `detaching'
11930 parameter. Don't release/detach from thread_db here.
11931 (linux_kill): Release/detach from thread_db here, ...
11932 (linux_detach): ... and here, before actually detaching.
11933 (linux_wait_1): ... and here, when a process exits.
11934 * thread-db.c (any_thread_of): New.
11935 (thread_db_free): Switch the current inferior to a thread of the
11936 passed in process.
11937
4ee62156
DE
119382009-12-21 Doug Evans <dje@google.com>
11939
d90e6a88
DE
11940 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11941
c5f62d5f
DE
11942 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11943 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11944 warning ifndef __NR_tkill. Move setting of errno there too.
11945 Delete unnecessary resetting of errno after syscall.
11946 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11947
10e86dd7
DE
11948 * configure.ac: Check for dladdr.
11949 * config.in: Regenerate.
11950 * configure: Regenerate.
11951 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11952 (try_thread_db_load): Update.
11953
4ee62156
DE
11954 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11955
00f515da
DE
119562009-12-18 Doug Evans <dje@google.com>
11957
e9464885
DE
11958 * event-loop.c: Include unistd.h if it exists.
11959
07d4f67e
DE
11960 * linux-low.c (my_waitpid): Move definition away from being in
11961 between linux_tracefork_child/linux_test_for_tracefork.
11962
00f515da
DE
11963 * gdb_proc_service.h (psaddr_t): Fix type.
11964 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11965 signature to match glibc.
11966
1de1badb
DE
119672009-12-16 Doug Evans <dje@google.com>
11968
11969 * linux-low.c (linux_read_memory): Fix argument to read.
11970
aeeb81d1
PA
119712009-11-26 Pedro Alves <pedro@codesourcery.com>
11972
11973 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11974 events, don't leave current_inferior pointing at null.
11975
10357975
PA
119762009-11-26 Pedro Alves <pedro@codesourcery.com>
11977
11978 * win32-low.c (LOG): Delete.
11979 (OUTMSG): Output to stderr.
11980 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11981 on compile time LOG macro.
11982 (win32_wait): Fix debug output.
11983
cf6e3471
PA
119842009-11-26 Pedro Alves <pedro@codesourcery.com>
11985
11986 * win32-low.c (win32_add_one_solib): If the dll name is
11987 "ntdll.dll", prepend the system directory to the dll path.
11988
0c85e18e
MK
119892009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11990
11991 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11992
9ac544ce 119932009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11994 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11995
11996 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11997 * configure.ac: Check for __mcoldfire__ and set
11998 gdb_cv_m68k_is_coldfire.
11999 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12000 reg-cf.o and reg-m68k.o.
12001 * configure: Regenerated.
12002
fd7dd3e6
PA
120032009-11-16 Pedro Alves <pedro@codesourcery.com>
12004
12005 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12006 Pass it to thread_db_free.
12007 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12008 proper `detaching' argument to linux_remove_process.
12009 * linux-low.h (thread_db_free): Add `detaching' parameter.
12010 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12011 to thread_db_free.
12012 (thread_db_free): Add `detaching' parameter. Only
12013 call td_ta_clear_event if detaching from process.
12014
75aa492e
MK
120152009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12016
12017 * thread-db.c (thread_db_free): Fix typo.
12018
21e1bee4
PP
120192009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12020
12021 PR gdb/10838
12022 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12023
8838b45e
NS
120242009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12025
12026 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12027 with an i686 compiler.
12028 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12029 needed.
12030 * configure: Rebuilt.
12031
8a35fb51
SL
120322009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12033
12034 PR gdb/10783
12035
12036 * server.c (handle_search_memory_1): Correct read_addr initialization
12037 in loop for searching subsequent chunks.
12038
96f15937
PP
120392009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12040
12041 * configure.ac: New --with-libthread-db option.
12042 * thread-db.c: Allow direct dependence on libthread_db.
12043 (thread_db_free): Adjust.
12044 * config.in: Regenerate.
12045 * configure: Likewise.
889bf7c5 12046
5f7d1694
PP
120472009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12048
12049 PR gdb/10757
12050 * thread-db.c (attach_thread): New function.
12051 (maybe_attach_thread): Return success/failure.
12052 (find_new_threads_callback): Adjust.
889bf7c5
PA
12053 (thread_db_find_new_threads): Loop until no new threads.
12054
88e3b899
PA
120552009-10-13 Pedro Alves <pedro@codesourcery.com>
12056
12057 * proc-service.c (ps_lgetregs): Formatting.
12058
cdbfd419
PP
120592009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12060
12061 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12062 * configure.ac: Adjust.
12063 * linux-low.h (struct process_info_private): Move members to struct
12064 thread_db.
12065 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12066 * linux-low.c (linux_remove_process): Adjust.
12067 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12068 * server.c (handle_query): Move code ...
12069 (handle_monitor_command): ... here. New function.
12070 * target.h (struct target_ops): New member.
12071 * thread-db.c (struct thread_db): New.
12072 (libthread_db_search_path): New variable.
12073 (thread_db_create_event, thread_db_enable_reporting)
12074 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12075 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12076 (try_thread_db_load_1, dladdr_to_soname): New functions.
12077 (try_thread_db_load, thread_db_load_search): New functions.
12078 (thread_db_init): Search for libthread_db.
12079 (thread_db_free): New function.
12080 (thread_db_handle_monitor_command): Likewise.
12081 * config.in: Regenerate.
12082 * configure: Regenerate.
889bf7c5 12083
4168d2d6
UW
120842009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12085
12086 * spu-low.c (spu_kill): Wait for inferior to terminate.
12087 Call clear_inferiors.
12088 (spu_detach): Call clear_inferiors.
12089
81ecdfbb
RW
120902009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12091
12092 * aclocal.m4: Regenerate.
12093 * config.in: Likewise.
12094 * configure: Likewise.
12095
0b9ff2c0
UW
120962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12097
12098 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12099 (parse_spufs_run): New function.
12100 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12101 (ppc_breakpoint_at): Handle SPU breakpoints.
12102
efcbbd14
UW
121032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12104
12105 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12106 (SPUFS_MAGIC): Define.
12107 (spu_enumerate_spu_ids): New function.
12108 (linux_qxfer_spu): New function.
12109 (linux_target_ops): Install linux_qxfer_spu.
12110
f4d9bade
UW
121112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12112
12113 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12114 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12115 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12116 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12117 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12118 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12119 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12120 (init_registers_powerpc_cell32l): Add prototype.
12121 (init_registers_powerpc_cell64l): Likewise.
12122 (ppc_arch_setup): Detect Cell/B.E. architecture.
12123
96e946ca
RW
121242009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12125
12126 * Makefile.in (datarootdir): New variable.
12127
58d6951d
DJ
121282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12129
12130 * linux-low.c (linux_write_memory): Update debugging output.
12131 * Makefile.in (clean): Add new descriptions.
12132 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12133 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12134 * configure.srv: Add new files for arm*-*-linux*.
12135 * linux-arm-low.c: Add new declarations.
12136 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12137 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12138 (HWCAP_VFPv3D16): New.
12139 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12140 instead of __IWMMXT__.
12141 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12142 (arm_arch_setup): New.
12143 (target_regsets): Remove #ifdef. Add VFP regset.
12144 (the_low_target): Use arm_arch_setup.
12145
12b42a12
DJ
121462009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12147
12148 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12149 the main thread again.
12150
ac8c974e
AR
121512009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12152
12153 Adding Neutrino gdbserver.
12154 * configure: Regenerated.
12155 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12156 * configure.srv (i[34567]86-*-nto*): New target.
12157 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12158 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12159 (nto_comctrl) [__QNX__]: New function.
12160 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12161
4424e0c3 121622009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12163
12164 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12165 srv_tgtobj.
12166
912cf4ba
PA
121672009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12168 Pedro Alves <pedro@codesourcery.com>
12169
12170 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12171 don't support CONTEXT_EXTENDED_REGISTERS.
12172 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12173 (the_low_target): Install them.
12174 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12175 failing with ERROR_PIPE_NOT_CONNECTED.
12176
aa5ca48f
DE
121772009-06-30 Doug Evans <dje@google.com>
12178 Pierre Muller <muller@ics.u-strasbg.fr>
12179
12180 Add h/w watchpoint support to x86-linux, win32-i386.
12181 * Makefile.in (SFILES): Add i386-low.c
12182 (i386_low_h): Define.
12183 (i386-low.o): Add dependencies.
12184 (linux-x86-low.o): Add i386-low.h dependency.
12185 (win32-i386-low.o): Ditto.
12186 * i386-low.c: New file.
12187 * i386-low.h: New file.
12188 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12189 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12190 * linux-low.c (linux_add_process): Initialize arch_private.
12191 (linux_remove_process): Free arch_private.
12192 (add_lwp): Initialize arch_private.
12193 (delete_lwp): Free arch_private.
12194 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12195 provided.
12196 * linux-low.h (process_info_private): New member arch_private.
12197 (lwp_info): New member arch_private.
12198 (linux_target_ops): New members new_process, new_thread,
12199 prepare_to_resume.
12200 (ptid_of): New macro.
12201 * linux-x86-low.c: Include stddef.h, i386-low.h.
12202 (arch_process_info): New struct.
12203 (arch_lwp_info): New struct.
12204 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12205 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12206 (i386_dr_low_get_status): New function.
12207 (x86_insert_point, x86_remove_point): New functions.
12208 (x86_stopped_by_watchpoint): New function.
12209 (x86_stopped_data_address): New function.
12210 (x86_linux_new_process, x86_linux_new_thread): New functions.
12211 (x86_linux_prepare_to_resume): New function.
12212 (the_low_target): Add entries for insert_point, remove_point,
12213 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12214 prepare_to_resume.
12215 * server.c (debug_hw_points): New global.
12216 (monitor_show_help): Document set debug-hw-points.
12217 (handle_query): Process "set debug-hw-points".
12218 * server.h (debug_hw_points): Declare.
12219 (paddress): Declare.
12220 * utils.c (NUMCELLS, CELLSIZE): New macros.
12221 (get_sell, xsnprintf, paddress): New functions.
12222 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12223 remove_point, stopped_by_watchpoint, stopped_data_address.
12224 * win32-i386-low.c: Include i386-low.h.
12225 (debug_reg_state): Replaces dr.
12226 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12227 (i386_dr_low_get_status): New function.
12228 (i386_insert_point, i386_remove_point): New functions.
12229 (i386_stopped_by_watchpoint): New function.
12230 (i386_stopped_data_address): New function.
12231 (i386_initial_stuff): Update.
12232 (get_thread_context,set_thread_context,i386_thread_added): Update.
12233 (the_low_target): Add entries for insert_point,
12234 remove_point, stopped_by_watchpoint, stopped_data_address.
12235 * win32-low.c (win32_insert_watchpoint): New function.
12236 (win32_remove_watchpoint): New function.
12237 (win32_stopped_by_watchpoint): New function.
12238 (win32_stopped_data_address): New function.
12239 (win32_target_ops): Add entries for insert_watchpoint,
12240 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12241 * win32-low.h (win32_target_ops): New members insert_point,
12242 remove_point, stopped_by_watchpoint, stopped_data_address.
12243
d993e290
PA
122442009-06-25 Pedro Alves <pedro@codesourcery.com>
12245
12246 * server.c (process_serial_event): Re-return unsupported, not
12247 error, if the type isn't recognized. Re-allow supporting only
12248 insert or remove packets. Also call require_running for
12249 breakpoints. Add missing break statement to default case. Tidy.
12250 * target.h (struct target_ops): Rename insert_watchpoint to
12251 insert_point, and remove_watchpoint to remove_point.
12252
12253 * linux-low.h (struct linux_target_ops): Likewise.
12254 * linux-low.c (linux_insert_watchpoint): Rename to ...
12255 (linux_insert_point): ... this. Adjust.
12256 (linux_remove_watchpoint): Rename to ...
12257 (linux_remove_point): ... this. Adjust.
12258 (linux_target_ops): Adjust.
12259 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12260 (cris_insert_point): ... this.
12261 (cris_remove_watchpoint): Rename to ...
12262 (cris_remove_point): ... this.
12263 (the_low_target): Adjust.
12264
0f54c268
PM
122652009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12266
12267 * server.c (handle_v_kill): Pass signal_pid to
12268 kill_inferior if multi_process is zero.
12269
c6314022
AR
122702009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12271
12272 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12273 * target.h (target_ops): Comment for *_watchpoint to make it clear
12274 the functions can get types '0' and '1'.
12275
4463ce24
AR
122762009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12277
12278 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12279 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12280 * regcache.c (get_regcache): Likewise.
12281 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12282 * win32-low.c (child_fetch_inferior_registers): Remove check for
12283 regno 0.
12284
cf8fd78b
PA
122852009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12286 Pedro Alves <pedro@codesourcery.com>
12287
12288 * target.h (struct target_ops) <supports_multi_process>: New
12289 callback.
12290 (target_supports_multi_process): New.
12291 * server.c (handle_query): Even if GDB reports support, only
12292 enable multi-process if the target also supports it. Report
12293 multi-process support only if the target backend supports it.
12294 * linux-low.c (linux_supports_multi_process): New function.
12295 (linux_target_ops): Install it as target_supports_multi_process
12296 callback.
12297
47c0c975
DE
122982009-05-24 Doug Evans <dje@google.com>
12299
e09875d4
DE
12300 Global renaming of find_thread_pid to find_thread_ptid.
12301 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12302 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12303 All callers updated.
12304
e27d73f6
DE
12305 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12306 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12307 directly.
12308
47c0c975
DE
12309 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12310 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12311 (linux_resume_one_lwp): Ditto.
12312
2acc282a
DE
123132009-05-23 Doug Evans <dje@google.com>
12314
12315 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12316 from struct inferior_list_entry * to struct lwp_info *.
12317 All callers updated.
12318
9f1036c1
DE
123192009-05-13 Doug Evans <dje@google.com>
12320
12321 * linux-x86-low.c: Don't include assert.h.
12322 (x86_siginfo_fixup): Use fatal, not assert.
12323 (x86_arch_setup): Fix comment.
12324
d0722149
DE
123252009-05-12 Doug Evans <dje@google.com>
12326
12327 Biarch support for i386/amd64 gdbserver.
12328 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12329 Add linux-x86-low.c.
12330 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12331 (linux-x86-low.o): Add.
12332 * linux-x86-64-low.c: Delete.
12333 * linux-i386-low.c: Delete.
12334 * linux-x86-low.c: New file.
12335 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12336 linux-x86-low.o.
12337 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12338 linux-x86-low.o.
12339 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12340 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12341 (linux_child_pid_to_exec_file): New function.
12342 (elf_64_header_p, elf_64_file_p): New functions.
12343 (siginfo_fixup): New function.
12344 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12345 give target a chance to convert layout.
12346 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12347 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12348
fdeb2a12
DE
123492009-05-07 Doug Evans <dje@google.com>
12350
12351 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12352 (regsets_store_inferior_registers): Ditto.
12353
a6dbe5df
PA
123542009-05-06 Pedro Alves <pedro@codesourcery.com>
12355
12356 PR server/10048
12357
12358 * linux-low.c (must_set_ptrace_flags): Delete.
12359 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12360 of the global.
12361 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12362 `lwp->must_set_ptrace_flags' instead.
ba42693b 12363 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12364 (linux_wait_1): ... not here.
12365
5091eb23
DE
123662009-04-30 Doug Evans <dje@google.com>
12367
9f767825
DE
12368 * inferiors.c (started_inferior_callback): New function.
12369 (attached_inferior_callback): New function.
12370 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12371 * server.c (print_started_pid, print_attached_pid): New functions.
12372 (detach_or_kill_for_exit): New function.
12373 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12374 * server.h (have_started_inferiors_p): Declare.
12375 (have_attached_inferiors_p): Declare.
12376
5091eb23
DE
12377 * inferiors.c (remove_process): Fix memory leak, free process.
12378 * linux-low.c (linux_remove_process): New function.
12379 (linux_kill): Call it instead of remove_process.
12380 (linux_detach, linux_wait_1): Ditto.
12381
155c8968
PA
123822009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12383
12384 * configure.srv: Add x86 Windows CE target.
12385
7fe519cb
UW
123862009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12387
12388 * inferiors.c (get_thread_process): Make global.
12389 * server.h (get_thread_process): Add prototype.
12390 * thread-db.c (find_one_thread): Use get_thread_process
12391 instead of current_process.
12392 (thread_db_get_tls_address): Do not crash if called when
12393 thread layer is not yet initialized.
12394
5472f405
UW
123952009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12396
12397 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12398 * spu-low.c (current_tid): Rename to ...
12399 (current_ptid): ... this.
12400 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12401 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12402 ptid_get_lwp (current_ptid) instead of current_tid.
12403 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12404 instead of current_tid. Use find_process_pid to verify pid
12405 argument is valid. Pass proper argument to remove_process.
12406 (spu_thread_alive): Compare current_ptid instead of current_tid.
12407 (spu_resume): Likewise.
12408
55ac2b99
PA
124092009-04-02 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12412 variable.
12413
95954743
PA
124142009-04-01 Pedro Alves <pedro@codesourcery.com>
12415
12416 Implement the multiprocess extensions, and add linux multiprocess
12417 support.
12418
12419 * server.h (ULONGEST): Declare.
12420 (struct ptid, ptid_t): New.
12421 (minus_one_ptid, null_ptid): Declare.
12422 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12423 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12424 (struct inferior_list_entry): Change `id' type from unsigned from
12425 to ptid_t.
12426 (struct sym_cache, struct breakpoint, struct
12427 process_info_private): Forward declare.
12428 (struct process_info): Declare.
12429 (current_process): Declare.
12430 (all_processes): Declare.
12431 (initialize_inferiors): Declare.
12432 (add_thread): Adjust to use ptid_t.
12433 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12434 (add_process, remove_process, find_thread_pid): Declare.
12435 (find_inferior_id): Adjust to use ptid_t.
12436 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12437 (multi_process): Declare.
12438 (push_event): Adjust to use ptid_t.
12439 (read_ptid, write_ptid): Declare.
12440 (prepare_resume_reply): Adjust to use ptid_t.
12441 (clear_symbol_cache): Declare.
12442 * inferiors.c (all_processes): New.
12443 (null_ptid, minus_one_ptid): New.
12444 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12445 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12446 (add_thread): Change unsigned long to ptid. Remove gdb_id
12447 parameter. Adjust.
12448 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12449 (gdb_id_to_thread): Rename to ...
12450 (find_thread_pid): ... this. Change unsigned long to ptid.
12451 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12452 (loaded_dll, pull_pid_from_list): Adjust.
12453 (add_process, remove_process, find_process_pid)
12454 (get_thread_process, current_process, initialize_inferiors): New.
12455 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12456 (struct target_waitstatus) <related_pid>: Ditto.
12457 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12458 return type to int.
12459 (struct target_ops) <join>: Add `pid' argument.
12460 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12461 (struct target_ops) <wait>: Add `ptid' field. Change return type
12462 to ptid.
12463 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12464 (mywait): Add `ptid' argument. Change return type to ptid_t.
12465 (target_pid_to_str): Declare.
12466 * target.c (set_desired_inferior): Adjust to use ptids.
12467 (mywait): Add new `ptid' argument. Adjust.
12468 (target_pid_to_str): New.
12469 * mem-break.h (free_all_breakpoints): Declare.
12470 * mem-break.c (breakpoints): Delelete.
12471 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12472 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12473 to use per-process breakpoint list.
12474 (free_all_breakpoints): New.
12475 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12476 (symbol_cache, all_symbols_looked_up): Delete.
12477 (hexchars): New.
12478 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12479 read_ptid): New.
12480 (prepare_resume_reply): Change ptid argument's type from unsigned
12481 long to ptid_t. Adjust. Implement W;process and X;process.
12482 (free_sym_cache, clear_symbol_cache): New.
12483 (look_up_one_symbol): Adjust to per-process symbol cache. *
12484 * server.c (cont_thread, general_thread, step_thread): Change type
12485 to ptid_t.
12486 (attached): Delete.
12487 (multi_process): New.
12488 (last_ptid): Change type to ptid_t.
12489 (struct vstop_notif) <ptid>: Change type to ptid_t.
12490 (queue_stop_reply, push_event): Change `ptid' argument's type to
12491 ptid_t.
12492 (discard_queued_stop_replies): Add `pid' argument.
12493 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12494 changes. Don't reference the `attached' global.
12495 (attach_inferior): Adjust to mywait interface changes.
12496 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12497 features. Handle and report "multiprocess+". Handle
12498 "qAttached:PID".
12499 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12500 changes.
12501 (handle_v_kill): New.
12502 (handle_v_stopped): Adjust to use target_pid_to_str.
12503 (handle_v_requests): Allow multiple attaches and runs when
12504 multiprocess extensions are in effect. Handle "vKill".
12505 (myresume): Adjust to use ptids.
12506 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12507 (handle_status): Adjust to discard_queued_stop_replies interface
12508 change.
12509 (first_thread_of, kill_inferior_callback)
12510 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12511 (main): Call initialize_inferiors. Adjust to use ptids, killing
12512 and detaching from all inferiors. Handle multiprocess packet
12513 variants.
12514 * linux-low.h: Include gdb_proc_service.h.
12515 (struct process_info_private): New.
12516 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12517 <lwpid_of>: Use ptid_get_lwp.
12518 (get_lwp_thread): Adjust.
12519 (struct lwp_info): Add `dead' member.
12520 (find_lwp_pid): Declare.
12521 * linux-low.c (thread_db_active): Delete.
12522 (new_inferior): Adjust comment.
12523 (inferior_pid): Delete.
12524 (linux_add_process): New.
12525 (handle_extended_wait): Adjust.
12526 (add_lwp): Change unsigned long to ptid.
12527 (linux_create_inferior): Add process to processes table. Adjust
12528 to use ptids. Don't set new_inferior here.
12529 (linux_attach_lwp): Rename to ...
12530 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12531 it. Adjust to use ptids.
12532 (linux_attach_lwp): New.
12533 (linux_attach): Add process to processes table. Don't set
12534 new_inferior here.
12535 (struct counter): New.
12536 (second_thread_of_pid_p, last_thread_of_process_p): New.
12537 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12538 multiple processes.
12539 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12540 processes. Remove process from process table.
12541 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12542 to multiple processes.
12543 (any_thread_of): New.
12544 (linux_detach): Add `pid' argument, and handle it. Remove process
12545 from processes table.
12546 (linux_join): Add `pid' argument. Handle it.
12547 (linux_thread_alive): Change unsighed long argument to ptid_t.
12548 Consider dead lwps as not being alive.
12549 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12550 threads we're not interested in.
12551 (same_lwp, find_lwp_pid): New.
12552 (linux_wait_for_lwp): Change `pid' argument's type from int to
12553 ptid_t. Adjust.
12554 (linux_wait_for_event): Rename to ...
12555 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12556 from int to ptid_t. Adjust.
12557 (linux_wait_for_event): New.
12558 (linux_wait_1): Add `ptid' argument. Change return type to
12559 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12560 that exit from the process table.
12561 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12562 Adjust.
12563 (mark_lwp_dead): New.
12564 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12565 stopping all threads, mark its main lwp as dead.
12566 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12567 ptids.
12568 (fetch_register, usr_store_inferior_registers)
12569 (regsets_fetch_inferior_registers)
12570 (regsets_store_inferior_registers, linux_read_memory)
12571 (linux_write_memory): Inline `inferior_pid'.
12572 (linux_look_up_symbols): Adjust to use per-process
12573 `thread_db_active'.
12574 (linux_request_interrupt): Adjust to use ptids.
12575 (linux_read_auxv): Inline `inferior_pid'.
12576 (initialize_low): Don't reference thread_db_active.
12577 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12578 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12579 (ps_getpid): Return the pid of the current inferior.
12580 * thread-db.c (proc_handle, thread_agent): Delete.
12581 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12582 per-process data.
12583 (find_one_thread): Change argument type to ptid_t. Adjust to
12584 per-process data.
12585 (maybe_attach_thread): Adjust to per-process data and ptids.
12586 (thread_db_find_new_threads): Ditto.
12587 (thread_db_init): Ditto.
12588 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12589 processes table. Adjust to use ptids.
12590 (spu_kill, spu_detach): Adjust interface. Remove process from
12591 processes table.
12592 (spu_join, spu_thread_alive): Adjust interface.
12593 (spu_wait): Adjust interface. Remove process from processes
12594 table. Adjust to use ptids.
12595 * win32-low.c (current_inferior_tid): Delete.
12596 (current_inferior_ptid): New.
12597 (debug_event_ptid): New.
12598 (thread_rec): Take a ptid. Adjust.
12599 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12600 (child_delete_thread): Ditto.
12601 (do_initial_child_stuff): Add `attached' argument. Add process to
12602 processes table.
12603 (child_fetch_inferior_registers, child_store_inferior_registers):
12604 Adjust.
12605 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12606 (win32_attach): Pass 1 to do_initial_child_stuff.
12607 (win32_kill): Adjust interface. Remove process from processes
12608 table.
12609 (win32_detach): Ditto.
12610 (win32_join): Adjust interface.
12611 (win32_thread_alive): Take a ptid.
12612 (win32_resume): Adjust to use ptids.
12613 (get_child_debug_event): Ditto.
12614 (win32_wait): Adjust interface. Remove exiting process from
12615 processes table.
12616
bd99dc85
PA
126172009-04-01 Pedro Alves <pedro@codesourcery.com>
12618
12619 Non-stop mode support.
12620
12621 * server.h (non_stop): Declare.
12622 (gdb_client_data, handler_func): Declare.
12623 (delete_file_handler, add_file_handler, start_event_loop):
12624 Declare.
12625 (handle_serial_event, handle_target_event, push_event)
12626 (putpkt_notif): Declare.
12627 * target.h (enum resume_kind): New.
12628 (struct thread_resume): Replace `step' field by `kind' field.
12629 (TARGET_WNOHANG): Define.
12630 (struct target_ops) <wait>: Add `options' argument.
12631 <supports_non_stop, async, start_non_stop>: New fields.
12632 (target_supports_non_stop, target_async): New.
12633 (start_non_stop): Declare.
12634 (mywait): Add `options' argument.
12635 * target.c (mywait): Add `options' argument. Print child exit
12636 notifications here.
12637 (start_non_stop): New.
12638 * server.c (non_stop, own_buf, mem_buf): New globals.
12639 (struct vstop_notif): New.
12640 (notif_queue): New global.
12641 (queue_stop_reply, push_event, discard_queued_stop_replies)
12642 (send_next_stop_reply): New.
12643 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12644 interface changes.
12645 (attach_inferior): In non-stop mode, don't wait for the target
12646 here.
12647 (handle_general_set): Handle QNonStop.
12648 (handle_query): When handling qC, return the current general
12649 thread, instead of the first thread of the list.
12650 (handle_query): If the backend supports non-stop mode, include
12651 QNonStop+ in the qSupported query response.
12652 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12653 and non-stop mode.
12654 (handle_v_attach, handle_v_run): Handle non-stop mode.
12655 (handle_v_stopped): New.
12656 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12657 (myresume): Adjust to use resume_kind. Handle non-stop.
12658 (queue_stop_reply_callback): New.
12659 (handle_status): Handle non-stop mode.
12660 (main): Clear non_stop flag on reconnection. Use the event-loop.
12661 Refactor serial protocol handling from here ...
12662 (process_serial_event): ... to this new function. When GDB
12663 selects any thread, select one here. In non-stop mode, wait until
12664 GDB acks all pending events before exiting.
12665 (handle_serial_event, handle_target_event): New.
12666 * remote-utils.c (remote_open): Install remote_desc in the event
12667 loop.
12668 (remote_close): Remove remote_desc from the event loop.
12669 (putpkt_binary): Rename to...
12670 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12671 (putpkt_binary): New as wrapper around putpkt_binary_1.
12672 (putpkt_notif): New.
12673 (prepare_resume_reply): In non-stop mode, don't change the
12674 general_thread.
12675 * event-loop.c: New.
12676 * Makefile.in (OBJ): Add event-loop.o.
12677 (event-loop.o): New rule.
12678
12679 * linux-low.h (pid_of): Moved here.
12680 (lwpid_of): New.
12681 (get_lwp_thread): Use lwpid_of.
12682 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12683 * linux-low.c (pid_of): Delete.
12684 (inferior_pid): Use lwpid_of.
12685 (linux_event_pipe): New.
12686 (target_is_async_p): New.
12687 (delete_lwp): New.
12688 (handle_extended_wait): Use lwpid_of.
12689 (add_lwp): Don't set lwpid field.
12690 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12691 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12692 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12693 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12694 first. Adjust to linux_wait_for_event interface changes. Use
12695 lwpid_of.
12696 (linux_detach): Don't delete the main lwp here.
12697 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12698 (status_pending_p): Don't consider explicitly suspended lwps.
12699 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12700 pointer. Add OPTIONS argument. Change return type to int. Use
12701 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12702 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12703 pointer. Add status pointer argument. Return a pid instead of a
12704 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12705 changes. In non-stop mode, don't switch to a random thread.
12706 (linux_wait): Rename to...
12707 (linux_wait_1): ... this. Add target_options argument, and handle
12708 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12709 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12710 clean exit and signal exit code. Don't stop all threads in
12711 non-stop mode. In all-stop mode, only stop all threads when
12712 reporting a stop to GDB. Handle explicit thread stop requests.
12713 (async_file_flush, async_file_mark): New.
12714 (linux_wait): New.
12715 (send_sigstop): Use lwpid_of.
12716 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12717 interface changes. In non-stop mode, don't switch to a random
12718 thread.
12719 (linux_resume_one_lwp): Use lwpid_of.
12720 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12721 (linux_resume_one_thread): ... this. Handle resume_stop. In
12722 non-stop mode, don't look for pending flag in all threads.
12723 (resume_status_pending_p): Don't consider explicitly suspended
12724 threads.
12725 (my_waitpid): Reimplement. Emulate __WALL.
12726 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12727 Use lwpid_of.
12728 (sigchld_handler, linux_supports_non_stop, linux_async)
12729 (linux_start_non_stop): New.
12730 (linux_target_ops): Register linux_supports_non_stop, linux_async
12731 and linux_start_non_stop.
12732 (initialize_low): Install SIGCHLD handler.
12733 * thread-db.c (thread_db_create_event, find_one_thread)
12734 (thread_db_get_tls_address): Use lwpid_of.
12735 * win32-low.c (win32_detach): Adjust to use resume_kind.
12736 (win32_wait): Add `options' argument.
12737 * spu-low.c (spu_resume): Adjust to use resume_kind.
12738 (spu_wait): Add `options' argument.
12739
5b1c542e
PA
127402009-04-01 Pedro Alves <pedro@codesourcery.com>
12741
12742 Decouple target code from remote protocol.
12743
12744 * target.h (enum target_waitkind): New.
12745 (struct target_waitstatus): New.
12746 (struct target_ops) <wait>: Return an unsigned long. Take a
12747 target_waitstatus pointer instead of a char pointer.
12748 (mywait): Likewise.
12749 * target.c (mywait): Change prototype to return an unsigned long.
12750 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12751 * server.h (thread_from_wait, old_thread_from_wait): Delete
12752 declarations.
12753 (prepare_resume_reply): Change prototype to take a
12754 target_waitstatus.
12755 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12756 (last_status, last_ptid): New.
12757 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12758 pid instead of a signal.
12759 (attach_inferior): Remove "status" and "signal" parameters.
12760 Adjust.
12761 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12762 not as an address.
12763 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12764 (handle_v_requests, myresume): Remove "status" and "signal"
12765 parameters. Adjust.
12766 (handle_status): New.
12767 (main): Delete local `status'. Adjust.
12768 * remote-utils.c: Include target.h.
12769 (prepare_resume_reply): Change prototype to take a
12770 target_waitstatus. Adjust.
12771
12772 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12773 interface.
12774 * spu-low.c (spu_wait): Adjust.
12775 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12776 Delete.
12777 (win32_wait): Adjust.
12778
2bd7c093
PA
127792009-04-01 Pedro Alves <pedro@codesourcery.com>
12780
12781 * target.h (struct thread_resume): Delete leave_stopped member.
12782 (struct target_ops): Add a `n' argument to the `resume' callback.
12783 * server.c (start_inferior): Adjust.
12784 (handle_v_cont, myresume): Adjust.
12785 * linux-low.c (check_removed_breakpoint): Adjust to resume
12786 interface change, and to removed leave_stopped field.
12787 (resume_ptr): Delete.
12788 (struct thread_resume_array): New.
12789 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12790 resume interface change.
12791 (linux_continue_one_thread, linux_queue_one_thread)
12792 (resume_status_pending_p): Check if the resume field is NULL
12793 instead of checking the leave_stopped member.
12794 (linux_resume): Adjust to the target resume interface change.
12795 * spu-low.c (spu_resume): Adjust to the target resume interface
12796 change.
12797 * win32-low.c (win32_detach, win32_resume): Ditto.
12798
c35fafde
PA
127992009-04-01 Pedro Alves <pedro@codesourcery.com>
12800
12801 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12802 flag.
12803 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12804 pending.
12805 (linux_continue_one_thread): Only preserve the stepping flag if
12806 there's a pending breakpoint.
12807
0a59d50b
PA
128082009-03-31 Pedro Alves <pedro@codesourcery.com>
12809
12810 * server.c (main): After the inferior having exited, call
12811 remote_close before exiting gdbserver.
12812
f04c6d38
TJB
128132009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12814
12815 Fix size of FPSCR in Power 7 processors.
12816 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12817 (PPC_FEATURE_HAS_DFP): New #define.
12818 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12819 size of the FPSCR.
12820
78e5cee6
PA
128212009-03-23 Pedro Alves <pedro@codesourcery.com>
12822
12823 * server.c (handle_query) Whitespace and formatting.
12824
1b3f6016
PA
128252009-03-22 Pedro Alves <pedro@codesourcery.com>
12826
12827 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12828 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12829 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12830 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12831 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12832 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12833 Makefile.in, configure.ac: Fix whitespace throughout.
12834 * configure: Regenerate.
12835
a07b2135
PA
128362009-03-22 Pedro Alves <pedro@codesourcery.com>
12837
12838 * inferiors.c (find_inferior): Make it safe for the callback
12839 function to delete the currently iterated inferior.
12840
67cc2626
PA
128412009-03-22 Pedro Alves <pedro@codesourcery.com>
12842
12843 * Makefile.in (linuw_low_h): Move higher.
12844 (thread-db.o): Depend on $(linux_low_h).
12845
54a0b537
PA
128462009-03-17 Pedro Alves <pedro@codesourcery.com>
12847
12848 Rename "process" to "lwp" throughout.
12849
12850 * linux-low.c (all_processes): Rename to...
12851 (all_lwps): ... this.
12852 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12853 (add_process): Rename to ...
12854 (add_lwp): ... this. Adjust.
12855 (linux_create_inferior): Adjust.
12856 (linux_attach_lwp): Adjust.
12857 (linux_attach): Adjust.
12858 (linux_kill_one_process): Rename to ...
12859 (linux_kill_one_lwp): ... this. Adjust.
12860 (linux_kill): Adjust.
12861 (linux_detach_one_process): Rename to ...
12862 (linux_detach_one_lwp): ... this. Adjust.
12863 (linux_detach): Adjust.
12864 (check_removed_breakpoint): Adjust.
12865 (status_pending_p): Adjust.
12866 (linux_wait_for_process): Rename to ...
12867 (linux_wait_for_lwp): ... this. Adjust.
12868 (linux_wait_for_event): Adjust.
12869 (send_sigstop): Adjust.
12870 (wait_for_sigstop): Adjust.
12871 (stop_all_processes): Rename to ...
12872 (stop_all_lwps): ... this.
12873 (linux_resume_one_process): Rename to ...
12874 (linux_resume_one_lwp): ... this. Adjust.
12875 (linux_set_resume_request, linux_continue_one_thread)
12876 (linux_queue_one_thread, resume_status_pending_p)
12877 (usr_store_inferior_registers, regsets_store_inferior_registers)
12878 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12879 Adjust.
12880 * linux-low.h (get_process): Rename to ...
12881 (get_lwp): ... this. Adjust.
12882 (get_thread_process): Rename to ...
12883 (get_thread_lwp): ... this. Adjust.
12884 (get_process_thread): Rename to ...
12885 (get_lwp_thread): ... this. Adjust.
12886 (struct process_info): Rename to ...
12887 (struct lwp_info): ... this.
12888 (all_processes): Rename to ...
12889 (all_lwps): ... this.
12890 * proc-service.c (ps_lgetregs): Adjust.
12891 * thread-db.c (thread_db_create_event, find_one_thread)
12892 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12893
0b16c5cf
PA
128942009-03-14 Pedro Alves <pedro@codesourcery.com>
12895
12896 * server.c (handle_query): Handle "qAttached".
12897
32de4b9d
NS
128982009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12899
12900 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12901 GPLv3, update license URL.
12902
2aecd87f
DE
129032009-03-01 Doug Evans <dje@google.com>
12904
93efd302 12905 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12906 (server_h): Add gdb_signals.h.
12907 (signals.o): Update.
12908 * server.h (target_signal_from_host,target_signal_to_host_p)
12909 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12910
86b1f9c5
PM
129112009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12912
12913 * remote-utils.c (getpkt): Also generate remote-debug
12914 information if noack_mode is set.
12915
4aa995e1
PA
129162009-02-06 Pedro Alves <pedro@codesourcery.com>
12917
12918 * server.c (handle_query): Report qXfer:siginfo:read and
12919 qXfer:siginfo:write as supported and handle them.
12920 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12921 * linux-low.c (linux_xfer_siginfo): New.
12922 (linux_target_ops): Set it.
12923
62709adf
PA
129242009-01-26 Pedro Alves <pedro@codesourcery.com>
12925
12926 * server.c (gdbserver_usage): Mention --remote-debug.
12927 (main): Accept '--remote-debug' switch.
12928
aef93bd7
DE
129292009-01-18 Doug Evans <dje@google.com>
12930
12931 * regcache.c (new_register_cache): No need to check result of xcalloc.
12932 * server.c (handle_search_memory): Back out calls to xmalloc,
12933 result is checked and error is returned to user upon failure.
12934 (handle_query): Ditto. Add more checks for result of malloc.
12935 (handle_v_cont): Check result of malloc, report error back to
12936 user upon failure.
12937 (handle_v_run): Ditto. Call freeargv.
12938 * server.h (freeargv): Declare.
12939 * utils.c (freeargv): New fn.
12940
54363045
DE
129412009-01-15 Doug Evans <dje@google.com>
12942
f626972c
DE
12943 * gdbreplay.c (perror_with_name): Make arg const char *.
12944 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12945 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12946 * utils.c (perror_with_name): Make arg const char *.
54363045 12947
18aae699
PA
129482009-01-14 Pedro Alves <pedro@codesourcery.com>
12949
12950 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12951 when handling a EXIT_PROCESS_DEBUG_EVENT.
12952
ff703abe
JB
129532009-01-06 Joel Brobecker <brobecker@adacore.com>
12954
12955 * gdbreplay.c (gdbreplay_version): Update copyright year.
12956 * server.c (gdbserver_version): Likewise.
12957
f21cc1a2 129582009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12959
12960 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12961 (handle_extended_wait): Improve comment.
0e21c1ec 12962
bca929d3
DE
129632008-12-13 Doug Evans <dje@google.com>
12964
12965 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12966 * server.h (ATTR_MALLOC): New macro.
12967 (xmalloc,xcalloc,xstrdup): Declare.
12968 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12969 * inferiors.c: Ditto.
12970 * linux-low.c: Ditto.
12971 * mem-break.c: Ditto.
12972 * regcache.c: Ditto.
12973 * remote-utils.c: Ditto.
12974 * server.c: Ditto.
12975 * target.c: Ditto.
12976 * win32-low.c: Ditto.
12977
97438e3f
DE
129782008-12-12 Doug Evans <dje@google.com>
12979
896c7fbb
DE
12980 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12981 in debugging printf.
12982
97438e3f
DE
12983 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12984
e3b886f8
DE
129852008-12-09 Doug Evans <dje@google.com>
12986
12987 * linux-low.h (struct process_info): Delete member tid, unused.
12988 * thread-db.c (find_one_thread): Update.
12989 (maybe_attach_thread): Update.
12990
07e059b5
VP
129912008-12-02 Pedro Alves <pedro@codesourcery.com>
12992
889bf7c5
PA
12993 * target.h (struct target_ops): Add qxfer_osdata member.
12994 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12995 and dirent.h.
12996 (linux_qxfer_osdata): New functions.
12997 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12998 callback.
12999 * server.c (handle_query): Handle "qXfer:osdata:read:".
13000 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13001 (buffer_xml_printf): New functions.
13002 * server.h (struct buffer): New.
13003 (buffer_grow_str, buffer_grow_str0): New macros.
13004 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13005 (buffer_xml_printf): Declare.
07e059b5 13006
4cab47ab
DE
130072008-11-24 Doug Evans <dje@google.com>
13008
13009 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13010
f142445f
DJ
130112008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13012
13013 * server.c (handle_v_run): Always use the supplied argument list.
13014
d0107bb6 130152008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13016
d0107bb6
BW
13017 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13018 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13019
2c4ad781
TJB
130202008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13021
13022 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13023 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13024 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13025 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13026 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13027 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13028 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13029 XML target descriptions.
13030 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13031 when inferior is running on an ISA 2.05 or later processor. Add
13032 special case to return offset for full 64-bit slot of FPSCR when
13033 in 32-bits.
13034
dfb64f85
DJ
130352008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13036
13037 * Makefile.in (SFILES, clean): Added sparc64 files.
13038 (reg-sparc64.o, reg-sparc64.c): New.
13039 * configure.srv (sparc*-*-linux*): New configuration.
13040 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13041 syscall arguments for SPARC.
13042 (regsets_store_inferior_registers): Likewise.
13043 * linux-sparc-low.c: New file.
13044
66b6e1dd
DE
130452008-10-21 Doug Evans <dje@google.com>
13046
13047 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13048 (READLINE_DIR,READLINE_DEP): Delete.
13049 (INTERNAL_CFLAGS): Update.
13050 (LINTFLAGS): Update.
13051
9b710a42
PA
130522008-10-10 Pedro Alves <pedro@codesourcery.com>
13053
13054 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13055 whole argv from the last run, not just argv[0].
13056
5822d809
PA
130572008-09-08 Pedro Alves <pedro@codesourcery.com>
13058
13059 * regcache.c (new_register_cache): Return NULL if the register
13060 cache size isn't known yet.
13061 (free_register_cache): Avoid dereferencing a NULL regcache.
13062
74aac56f
DJ
130632008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13064
13065 * configure.srv: Merge MIPS and MIPS64.
13066
400b20f5
MR
130672008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13068
13069 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13070
677c5bb1
LM
130712008-08-18 Luis Machado <luisgpm@br.ibm.com>
13072
13073 * Makefile.in: Add required vsx dependencies.
13074
13075 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13076 Declare init_registers_powerpc_vsx32l.
13077 Declare init_registers_powerpc_vsx64l.
13078 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13079 (ppc_arch_setup): Check for VSX in hwcap.
13080 (ppc_fill_vsxregset): New function.
13081 (ppc_store_vsxregset): New function.
13082 Add new VSX entry in regset_info target_regsets.
13083
13084 * configure.srv: Add new VSX dependencies.
13085
a6f3e723
SL
130862008-08-12 Pedro Alves <pedro@codesourcery.com>
13087
13088 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13089 (remote_open): Set or clear transport_is_reliable.
13090 (putpkt_binary): Don't expect acks in noack mode.
13091 (getpkt): Don't send ack/nac in noack mode.
13092 * server.c (handle_general_set): Handle QStartNoAckMode.
13093 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13094 qSupported.
13095 (main): Reset noack_mode on every connection.
13096 * server.h (noack_mode): Declare.
13097
a417dc56
RW
130982008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13099
13100 * Makefile.in (GDBREPLAY_OBS): New variable.
13101 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13102
3221518c
UW
131032008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13104 Daniel Jacobowitz <dan@codesourcery.com>
13105
13106 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13107 (usr_store_inferior_registers): Likewise.
13108 (regsets_store_inferior_registers): Likewise.
13109
ec56be1b
PA
131102008-07-31 Rolf Jansen <rj@surtec.com>
13111 Pedro Alves <pedro@codesourcery.com>
13112
13113 * configure.ac: Check for memmem declaration.
13114 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13115 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13116 (disable_packet_qfThreadInfo): Unconditionally compile.
13117 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13118 * configure, config.in: Regenerate.
13119
2fe5e3ff
DE
131202008-07-28 Doug Kwan <dougkwan@google.com>
13121
13122 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13123 (linux_write_memory): Remove declaration of errno.
13124
836acd6d
UW
131252008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13126
13127 * linux-low.c (handle_extended_wait): Do not use "status"
13128 variable uninitialized.
13129
aeba519e
PA
131302008-07-07 Pedro Alves <pedro@codesourcery.com>
13131
13132 * server.c (handle_v_attach): Inhibit reporting dll changes.
13133
db42f210
PA
131342008-06-27 Pedro Alves <pedro@codesourcery.com>
13135
13136 * remote-utils.c (prepare_resume_reply): If requested, don't
13137 output "thread:TID" in the T stop reply.
13138
13139 * server.c (disable_packet_vCont, disable_packet_Tthread)
13140 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13141 (handle_query): If requested, disable support for qC, qfThreadInfo
13142 and qsThreadInfo.
13143 (handle_v_requests): If requested, disable support for vCont.
13144 (gdbserver_show_disableable): New.
13145 (main): Handle --disable-packet and --disable-packet=LIST.
13146
13147 * server.h (disable_packet_vCont, disable_packet_Tthread)
13148 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13149
8e4c5421
CD
131502008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13151
13152 * server.c (gdbserver_usage): Mention --version.
13153
6e23a804
DJ
131542008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13155
13156 * Makefile.in (gdbreplay.o): New rule.
13157
90aa6a40
JM
131582008-06-06 Joseph Myers <joseph@codesourcery.com>
13159
13160 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13161 message, not gdbserver.
13162
c16158bc 131632008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13164 Nathan Sidwell <nathan@codesourcery.com>
13165 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13166
13167 * acinclude.m4: Include ../../config/acx.m4.
13168 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13169 * configure, config.in: Regenerate.
13170 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13171 * server.c (gdbserver_version): Print PKGVERSION.
13172 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13173 (main): Adjust gdbserver_usage calls.
13174 * gdbreplay.c (version, host_name): Add declarations.
13175 (gdbreplay_version, gdbreplay_usage): New.
13176 (main): Accept --version and --help options.
13177
aeb75bf5
DJ
131782008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13179
13180 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13181 (arm_breakpoint_at): Handle Thumb.
13182 (the_low_target): Add comment.
13183
76b233dd
UW
131842008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13185
13186 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13187
08388c79
DE
131882008-05-09 Doug Evans <dje@google.com>
13189
a3c83fae
DE
13190 * server.h (decode_search_memory_packet): Declare.
13191 * remote-utils.c (decode_search_memory_packet): New fn.
13192 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13193 (handle_search_memory): New fn.
13194 (handle_query): Process qSearch:memory packets.
13195
bb9c3d36
UW
131962008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13197
13198 * regcache.c (registers_length): Remove.
13199 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13200 full register packet.
13201 * regcache.h (registers_length): Remove prototype.
13202 * server.h (PBUFSIZ): Define to 16384.
13203
7284e1be
UW
132042008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13205
13206 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13207 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13208 powerpc-64l.o, and powerpc-altivec64l.o.
13209 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13210 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13211 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13212 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13213 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13214 to srv_xmlfiles.
13215
13216 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13217 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13218 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13219 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13220 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13221 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13222 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13223 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13224 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13225 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13226 (clean): Update.
13227
13228 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13229 (init_registers_powerpc_32l): ... this new prototype.
13230 (init_registers_powerpc_32): Remove, replace by ...
13231 (init_registers_powerpc_altivec32l): ... this new prototype.
13232 (init_registers_powerpc_e500): Remove, replace by ...
13233 (init_registers_powerpc_e500l): ... this new prototype.
13234 (init_registers_ppc64): Remove, replace by ...
13235 (init_registers_powerpc_64l): ... this new prototype.
13236 (init_registers_powerpc_64): Remove, replace by ...
13237 (init_registers_powerpc_altivec64l): ... this new prototype.
13238 (ppc_num_regs): Set to 73.
13239 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13240 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13241 (ppc_cannot_store_register): Handle orig_r3 and trap.
13242 (ppc_arch_setup): Update init_registers_... calls.
13243 (ppc_fill_gregset): Handle orig_r3 and trap.
13244
13245 * inferiors.c (clear_inferiors): Reset current_inferior.
13246
fdc59709
PB
132472008-04-23 Paolo Bonzini <bonzini@gnu.org>
13248
889bf7c5
PA
13249 * acinclude.m4: Add override.m4.
13250 * configure: Regenerate.
fdc59709 13251
c9b2f845
UW
132522008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13253
13254 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13255 initial call to init_register_ppc64.
13256
550512b8
UW
132572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13258
43aaf8b6
PA
13259 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13260 single powerpc*-*-linux* case.
550512b8
UW
13261 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13262
b6430ec3
UW
132632008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13264
13265 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13266 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13267 from reg_xmlfiles.
13268 * linux-ppc-low.c: Include <elf.h>.
13269 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13270 (ppc_hwcap): New global variable.
13271 (ppc_regmap): Remove __SPE__ #ifdef sections.
13272 (ppc_regmap_e500): New global variable.
13273 (ppc_cannot_store_register): Update __SPE__ special case.
13274 (ppc_get_hwcap): New function.
13275 (ppc_arch_setup): Use it to determine whether inferior supports
13276 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13277 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13278 Do not access registers if target does not support AltiVec.
13279 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13280 Do not access registers if target does not support SPE.
13281 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13282
52fa2412
UW
132832008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * linux-low.c (disabled_regsets, num_regsets): New.
13286 (use_regsets_p): Delete.
13287 (linux_wait_for_process): Clear disabled_regsets.
13288 (regsets_fetch_inferior_registers): Check and set it.
13289 (regsets_store_inferior_registers): Likewise.
13290 (linux_fetch_registers, linux_store_registers): Do not use
13291 use_regsets_p.
13292 (initialize_low): Allocate disabled_regsets.
13293
e28b3332
DJ
132942008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13295
13296 * Makefile.in (LIBOBJS): New.
13297 (OBS): Use LIBOBJS.
13298 (memmem.o): New rule.
13299 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13300 * configure: Regenerated.
13301
4536995d
UW
133022008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13303
13304 * server.c (handle_query): Never return "unsupported" for
13305 qXfer:features:read queries.
13306
221c031f
UW
133072008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13308
13309 * server.c (get_features_xml): Fix inverted condition.
13310 (handle_query): Always support qXfer:feature:read.
13311
ccd213ac
DJ
133122008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * server.c (wrapper_argv): New.
13315 (start_inferior): Handle wrapper_argv. If set, expect an extra
13316 trap.
13317 (gdbserver_usage): Document --wrapper.
13318 (main): Parse --wrapper.
13319
6fe305f7
UW
133202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13321
13322 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13323 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13324 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13325 (ppc_set_pc): Likewise.
13326 (ppc_arch_setup): New function.
13327 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13328 of collect_register.
889bf7c5 13329 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13330
5b0a002e
UW
133312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13332
13333 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13334 instead of linux-ppc64-low.o.
13335 * linux-ppc64-low.c: Remove file.
13336 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13337 (linux-ppc64-low.o): Remove rule.
13338
13339 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13340 (init_registers_powerpc_64): Likewise.
13341 (ppc_regmap): Conditionally define depending on __powerpc64__.
13342 (ppc_cannot_store_register): Do not special-case "fpscr" when
13343 compiled on __powerpc64__.
13344 (ppc_collect_ptrace_register): New function.
13345 (ppc_supply_ptrace_register): New function.
13346 (ppc_breakpoint): Change type to "unsigned int".
13347 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13348 (the_low_target): Conditionally provide initializers for the
889bf7c5 13349 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13350 collect_ptrace_register and supply_ptrace_register members.
13351
9b4b61c8
UW
133522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13353
13354 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13355 * server.c (gdbserver_xmltarget): Define.
13356 (get_features_xml): Use it to replace "target.xml" and arch_string.
13357
13358 * configure.srv: Remove srv_xmltarget. Add XML files that were
13359 mentioned there to srv_xmlfiles instead. Remove conditional tests
13360 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13361 srv_xmlfiles and srv_regobj to include all possible choices.
13362 * configure.ac (srv_xmltarget): Remove.
13363 (srv_xmlfiles): Do not add "target.xml".
13364 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13365 checks for supplementary target information.
13366 * configure: Regenerate.
13367 * Makefile.in (XML_TARGET): Remove.
13368 (target.xml): Remove rule.
13369 (clean): Do not clean up target.xml.
13370 (.PRECIOUS): Do not mention target.xml.
13371
13372 * target.h (struct target_ops): Remove arch_string member.
13373 * linux-low.c (linux_arch_string): Remove.
13374 (linux_target_ops): Remove arch_string initializer.
13375 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13376 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13377 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13378 * spu-low.c (spu_arch_string): Remove.
13379 (spu_target_ops): Remove arch_string initializer.
13380 * win32-low.c (win32_arch_string): Remove.
13381 (win32_target_ops): Remove arch_string initializer.
13382 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13383 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13384 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13385
ee1a7ae4
UW
133862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13387
13388 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13389 by collect_ptrace_register and supply_ptrace_register hooks.
13390 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13391 instead of checking for the_low_target.left_pad_xfer.
13392 (usr_store_inferior_registers): Use collect_ptrace_register callback
13393 instead of checking for the_low_target.left_pad_xfer.
13394
13395 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13396 (s390_supply_ptrace_register): Likewise.
13397 (s390_fill_gregset): Call s390_collect_ptrace_register.
13398 (the_low_target): Update.
13399
13400 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13401 (ppc_supply_ptrace_register): Likewise.
13402 (the_low_target): Update.
13403
13404 * linux-i386-low.c (the_low_target): Update.
13405 * linux-x86-64-low.c (the_low_target): Update.
13406
d61ddec4
UW
134072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13408
13409 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13410 reg-s390.o and reg-s390x.o.
13411
13412 * linux-low.c (new_inferior): New global variable.
13413 (linux_create_inferior, linux_attach): Set it.
13414 (linux_wait_for_process): Call the_low_target.arch_setup after the
13415 target has stopped for the first time.
13416 (initialize_low): Do not call the_low_target.arch_setup.
13417
13418 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13419 (s390_set_pc): Likewise.
13420 (s390_arch_setup): New function.
13421 (the_low_target): Use s390_arch_setup as arch_setup routine.
13422
13423 * regcache.c (realloc_register_cache): New function.
13424 (set_register_cache): Call it for each existing regcache.
13425
d05b4ac3
UW
134262008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13427
13428 * server.h (init_registers): Remove prototype.
13429
13430 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13431 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13432 instead of init_registers ().
13433 * linux-arm-low.c (init_registers_arm): Add prototype.
13434 (init_registers_arm_with_iwmmxt): Likewise.
13435 (the_low_target): Add initializer for arch_setup field.
13436 * linux-cris-low.c (init_registers_cris): Add prototype.
13437 (the_low_target): Add initializer for arch_setup field.
13438 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13439 (the_low_target): Add initializer for arch_setup field.
13440 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13441 (the_low_target): Add initializer for arch_setup field.
13442 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13443 (the_low_target): Add initializer for arch_setup field.
13444 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13445 (the_low_target): Add initializer for arch_setup field.
13446 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13447 (the_low_target): Add initializer for arch_setup field.
13448 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13449 (init_registers_mips64_linux): Likewise.
13450 (the_low_target): Add initializer for arch_setup field.
13451 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13452 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13453 (the_low_target): Add initializer for arch_setup field.
13454 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13455 (init_registers_powerpc_64): Likewise.
13456 (the_low_target): Add initializer for arch_setup field.
13457 * linux-s390-low.c (init_registers_s390): Add prototype.
13458 (init_registers_s390x): Likewise.
13459 (the_low_target): Add initializer for arch_setup field.
13460 * linux-sh-low.c (init_registers_sh): Add prototype.
13461 (the_low_target): Add initializer for arch_setup field.
13462 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13465 (the_low_target): Add initializer for arch_setup field.
13466
13467 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13468 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13469 instead of init_registers ().
13470 * win32-arm-low.c (init_registers_arm): Add prototype.
13471 (the_low_target): Add initializer for arch_setup field.
13472 * win32-i386-low.c (init_registers_i386): Add prototype.
13473 (the_low_target): Add initializer for arch_setup field.
13474
13475 * spu-low.c (init_registers_spu): Add prototype.
13476 (initialize_low): Call initialie_registers_spu () instead of
13477 initialize_registers ().
13478
fd96d250
PA
134792008-02-19 Pedro Alves <pedro@codesourcery.com>
13480
13481 * server.c (handle_v_requests): When handling the vRun and vAttach
13482 packets, if already debugging a process, don't kill it. Return an
13483 error instead.
13484
d41b6bb4
DJ
134852008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * server.c (handle_query): Correct length check.
13488
5ac588cf
PA
134892008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13490
13491 * win32-low.c (do_initial_child_stuff): Add process handle
13492 parameter. Set current_process_handle and current_process_id from the
13493 parameters. Clear globals.
13494 (win32_create_inferior): Don't set current_process_handle and
13495 current_process_id here. Instead pass them on the call to
13496 do_initial_child_stuff.
13497 (win32_attach): Likewise.
13498 (win32_clear_inferiors): New.
13499 (win32_kill): Don't close the current process handle or the
13500 current thread handle here. Instead call win32_clear_inferiors.
13501 (win32_detach): Don't open a new handle to the process. Call
13502 win32_clear_inferiors.
13503 (win32_join): Don't rely on current_process_handle; open a new
13504 handle using the process id.
13505 (win32_wait): Call win32_clear_inferiors when the inferior process
13506 has exited.
13507
ecd7ecbc
DJ
135082008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13509
13510 * server.c (monitor_show_help): Add "exit".
13511
1525d545
MG
135122008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13513
ecd7ecbc 13514 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13515 (clean): Add reg-xtensa.c.
13516 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13517 * configure.srv (xtensa*-*-linux*) New target.
13518 * linux-xtensa-low.c: New.
13519 * xtensa-xtregs.c: New.
1525d545 13520
59a016f0
PA
135212008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13522
13523 * hostio.c: Don't include errno.h.
13524 (errno_to_fileio_errno): Move to hostio-errno.
13525 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13526 error number outputting to the target->hostio_last_error callback.
13527 (hostio_packet_error): Use FILEIO_EINVAL directly.
13528 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13529 calls to hostio_error.
13530 * hostio-errno.c: New.
13531 * server.h (hostio_last_error_from_errno): Declare.
13532 * target.h (target_ops): Add hostio_last_error member.
13533 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13534 as hostio_last_error handler.
889bf7c5 13535 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13536 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13537 (wince_hostio_last_error): New functions.
13538 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13539 as hostio_last_error handler.
13540 (win32_target_ops) [!_WIN32_WCE]: Register
13541 hostio_last_error_from_errno as hostio_last_error handler.
13542 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13543 (hostio-errno.o): New rule.
13544 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13545 * configure.srv (srv_hostio_err_objs): New variable. Default to
13546 hostio-errno.o.
13547 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13548 * configure: Regenerate.
13549
2d717e4f
DJ
135502008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13553 (linux_kill, linux_detach): Clean up the process list.
13554 * remote-utils.c (remote_open): Improve port number parsing.
13555 (putpkt_binary, input_interrupt): Only send interrupts if the target
13556 is running.
13557 * server.c (extended_protocol): Make static.
13558 (attached): Define earlier.
13559 (exit_requested, response_needed, program_argv): New variables.
13560 (target_running): New.
13561 (start_inferior): Clear attached here.
13562 (attach_inferior): Set attached here.
13563 (require_running): Define.
13564 (handle_query): Use require_running and target_running. Implement
13565 "monitor exit".
13566 (handle_v_attach, handle_v_run): New.
13567 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13568 (gdbserver_usage): Update.
13569 (main): Redo argument parsing. Handle --debug and --multi. Handle
13570 --attach along with other options or after the port. Save
13571 program_argv. Support no initial program. Resynchronize
13572 communication with GDB after an error. Handle "monitor exit".
13573 Use require_running and target_running. Always allow the extended
13574 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13575 restart in extended mode.
13576 * README: Refer to the GDB manual. Update --attach usage.
13577
7407e2de
AS
135782007-12-20 Andreas Schwab <schwab@suse.de>
13579
13580 * linux-low.c (STACK_SIZE): Define.
13581 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13582 (linux_test_for_tracefork): Likewise.
13583
b65d95c5
DJ
135842007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c (linux_wait_for_event): Update messages. Do not
13587 reinsert auto-delete breakpoints.
13588 * mem-break.c (struct breakpoint): Change return type of handler to
13589 int.
13590 (set_breakpoint_at): Update handler type.
13591 (reinsert_breakpoint_handler): Return 1 instead of calling
13592 delete_breakpoint.
13593 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13594 setting a new one.
13595 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13596 * mem-break.h (set_breakpoint_at): Update handler type.
13597 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13598 * win32-low.c (auto_delete_breakpoint): New.
13599 (get_child_debug_event): Use it.
13600
4e799345
DJ
136012007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13602
13603 * configure.ac: Check for pread and pwrite.
13604 * hostio.c (handle_pread): Fall back to lseek and read.
13605 (handle_pwrite): Fall back to lseek and write.
13606 * config.in, configure: Regenerated.
13607
27524b67
DJ
136082007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * server.c (myresume): Add own_buf argument.
13611 (main): Update calls.
13612
a20d5e98
DJ
136132007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13614
13615 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13616 * remote-utils.c (remote_open): Do not call disable_async_io.
13617 (block_async_io): Delete.
13618 (unblock_async_io): Make static.
13619 (initialize_async_io): New.
13620 * server.c (handle_v_cont): Handle async I/O here.
13621 (myresume): Likewise. Move other common resume tasks here...
13622 (main): ... from here. Call initialize_async_io. Disable async
13623 I/O before the main loop.
13624 * server.h (initialize_async_io): Declare.
13625 (block_async_io, unblock_async_io): Delete prototypes.
13626 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13627
b79d787e
DJ
136282007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13629
13630 * remote-utils.c (readchar): Allow binary data in received messages.
13631
d97903b2
PA
136322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13633
13634 * win32-low.c (attaching): New global.
13635 (win32_create_inferior): Clear the `attaching' global.
13636 (win32_attach): Set the `attaching' global.
13637 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13638 attaching. Only set a breakpoint at the entry point if not
13639 attaching.
13640
311de423
PA
136412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13642
13643 * server.c (main): Don't report dll events on the initial
13644 connection on attaches.
13645
6c2d16d2
PA
136462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13647
13648 * server.c (main): Relax numerical bases supported for the pid of
13649 the --attach command line argument.
13650
5ca906e6
PA
136512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13652
13653 * win32-low.c (win32_attach): Call OpenProcess before
13654 DebugActiveProcess, not after. Add last error output to error
13655 call.
13656
9c6c8194
PA
136572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13658
13659 * win32-low.c (win32_get_thread_context)
13660 (win32_set_thread_context): New functions.
13661 (thread_rec): Use win32_get_thread_context.
13662 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13663 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13664 field.
13665
4d5d1aaa
PA
136662007-12-03 Leo Zayas
13667 Pedro Alves <pedro_alves@portugalmail.pt>
13668
13669 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13670 global variables.
13671 (child_add_thread): Minor cleanup.
13672 (child_continue): Resume artificially suspended threads before
13673 calling ContinueDebugEvent.
13674 (suspend_one_thread): New.
13675 (fake_breakpoint_event): New.
13676 (get_child_debug_event): Change return type to int. Check here if
13677 gdb sent an interrupt request. If a soft interrupt was requested,
13678 fake a breakpoint event. Return 0 if there is no event to handle,
13679 and 1 otherwise.
13680 (win32_wait): Don't check here if gdb sent an interrupt request.
13681 Ensure there is a valid event to handle.
13682 (win32_request_interrupt): Add soft interruption method as last
13683 resort.
13684
c436e841
PA
136852007-12-03 Leo Zayas
13686 Pedro Alves <pedro_alves@portugalmail.pt>
13687
13688 * win32-low.h (win32_thread_info): Add descriptions to the
13689 structure members. Replace `suspend_count' counter by a
13690 `suspended' flag.
13691 * win32-low.c (thread_rec): Update condition of when to get the
13692 context from the inferior. Rely on ContextFlags being set if it
13693 has already been retrieved. Only suspend the inferior thread if
13694 we haven't already. Warn if that fails.
13695 (continue_one_thread): s/suspend_count/suspended/. Only call
13696 ResumeThread once. Warn if that fails.
13697
e7b5fa67
PA
136982007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13699
13700 * win32-low.c (win32_wait): Don't read from the inferior when it
13701 has already exited.
13702
a385171d
PA
137032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13704
13705 * Makefile.in (win32_low_h): New variable.
13706 (win32-low.o): Add dependency on $(win32_low_h).
13707 (win32-arm-low.o, win32-i386-low.o): New rules.
13708
f80c84b3
DJ
137092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * hostio.c: Correct copyright year.
13712
a6b151f1
DJ
137132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * Makefile.in (OBS): Add hostio.o.
13716 (hostio.o): New rule.
13717 * server.h (handle_vFile): Declare.
13718 * hostio.c: New file.
13719 * server.c (handle_v_requests): Take packet_len and new_packet_len
13720 for binary packets. Call handle_vFile.
13721 (main): Update call to handle_v_requests.
13722
f9387fc3
DJ
137232007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * linux-low.c: Include <sched.h>.
13726
51c2684e
DJ
137272007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13728
13729 * linux-low.c (linux_tracefork_grandchild): New.
13730 (linux_tracefork_child): Use clone.
13731 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13732
75f83163
JB
137332007-10-31 Joel Brobecker <brobecker@adacore.com>
13734
13735 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13736
da5898ce
DJ
137372007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13740
24a09b5f
DJ
137412007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13742
13743 * inferiors.c (change_inferior_id): Delete.
13744 (add_pid_to_list, pull_pid_from_list): New.
13745 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13746 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13747 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13748 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13749 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13750 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13751 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13752 (using_threads): Always set to 1.
13753 (handle_extended_wait): New.
13754 (add_process): Do not set TID.
13755 (linux_create_inferior): Set must_set_ptrace_flags.
13756 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13757 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13758 (linux_thread_alive): Rename TID argument to LWPID.
13759 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13760 (linux_wait_for_event): Do not use TID or check using_threads. Update
13761 call to dead_thread_notify. Call handle_extended_wait.
13762 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13763 (send_sigstop): Delete sigstop_sent.
13764 (wait_for_sigstop): Avoid TID.
13765 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13766 (linux_test_for_tracefork): New.
13767 (linux_lookup_signals): Use thread_db_active and
13768 linux_supports_tracefork_flag.
13769 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13770 * linux-low.h (get_process_thread): Avoid TID.
13771 (struct process_ifo): Move thread_known and tid to the end. Remove
13772 sigstop_sent.
13773 (linux_attach_lwp, thread_db_init): Update prototypes.
13774 * server.h (change_inferior_id): Delete prototype.
13775 (add_pid_to_list, pull_pid_from_list): New prototypes.
13776 * thread-db.c (thread_db_use_events): New.
13777 (find_first_thread): Rename to...
13778 (find_one_thread): ...this. Update callers and messages. Do not
13779 call fatal. Check thread_db_use_events. Do not call
13780 change_inferior_id or new_thread_notify.
13781 (maybe_attach_thread): Update. Do not call new_thread_notify.
13782 (thread_db_init): Set thread_db_use_events. Check use_events.
13783 * utils.c (fatal, warning): Correct message prefix.
13784
30ed0a8f
DJ
137852007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13786
13787 * Makefile.in (clean): Remove new files.
13788 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13789 (powerpc-64.o, powerpc-64.c): New rules.
13790 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13791 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13792 with SPE.
13793 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13794 SPE targets.
13795 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13796 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13797 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13798 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13799 (target_regsets): Add AltiVec and SPE register sets.
13800 * configure.ac: Check for AltiVec and SPE.
13801 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13802 (ppc_fill_vrregset, ppc_store_vrregset): New.
13803 (target_regsets): Add AltiVec register set.
13804 * configure: Regenerated.
13805
fd462a61
DJ
138062007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13807
13808 * linux-low.c (O_LARGEFILE): Define.
13809 (linux_read_memory): Use /proc/PID/mem.
13810 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13811 * configure, config.in: Regenerated.
13812
69f223ed
DJ
138132007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13814
13815 * linux-low.c (linux_wait_for_event): Do not pass signals while
13816 single-stepping.
13817
aec18585
PA
138182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13819
13820 * win32-low.c (create_process): New.
13821 (win32_create_inferior): Use create_process instead of
13822 CreateProcess. If create_process failed retry appending an ".exe"
13823 suffix. Store the GetLastError result immediatelly after
13824 create_process calls and use it on the call to error.
13825
34d86ddd
PA
138262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13827
13828 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13829
5a0e3bd0
JB
138302007-08-23 Joel Brobecker <brobecker@adacore.com>
13831
13832 * configure.ac: Switch license to GPLv3.
13833
f88c79e6
MS
138342007-08-01 Michael Snyder <msnyder@access-company.com>
13835
13836 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13837
6b3d9b83
PA
138382007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13839
13840 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13841 typedef.
13842 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13843 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13844 CloseToolhelp32Snapshot.
13845 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13846 CloseToolhelp32Snapshot.
13847
c588c53c
MS
138482007-07-27 Michael Snyder <michael.snyder@access-company.com>
13849
13850 * server.c (main): Check for inferior exit before main loop.
13851
aa0403d9
PA
138522007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13853
13854 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13855 instead of on tmp_desc.
13856
255e7678
DJ
138572007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13858 Daniel Jacobowitz <dan@codesourcery.com>
13859
13860 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13861 (add_thread): Minor cleanups.
13862 (clear_inferiors): Move lower in the file. Clear the DLL
13863 list.
13864 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13865 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13866 (xml_escape_text): New.
13867 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13868 for qSupported.
13869 (handle_v_cont): Report errors.
13870 (gdbserver_version): Update.
13871 (main): Correct size of own_buf. Do not report initial DLL events.
13872 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13873 (unloaded_dll, xml_escape_text): New.
13874 * win32-low.c (enum target_waitkind): Update comments.
13875 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13876 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13877 (win32_EnumProcessModules, win32_GetModuleInformation)
13878 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13879 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13880 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13881 (win32_Module32First, win32_Module32Next, load_toolhelp)
13882 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13883 (get_child_debug_event): Handle DLL events.
13884 (win32_wait): Likewise.
13885
0d37add9
DJ
138862007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13887
13888 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13889 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13890
45e2715e
PA
138912007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13892
13893 * win32-low.c (handle_output_debug_string): Ignore event if not
13894 waiting.
13895
c5674cf1
PA
138962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13897
13898 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13899
2bbe3cc1
DJ
139002007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13901
13902 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13903
ae13219e
DJ
139042007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * inferiors.c (change_inferior_id): Add comment.
13907 * linux-low.c (check_removed_breakpoint): Add an early
13908 prototype. Improve debug output.
13909 (linux_attach): Doc update.
13910 (linux_detach_one_process, linux_detach): Clean up before releasing
13911 each process.
13912 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13913 * linux-low.h (struct process_info): Doc improvement.
13914 * mem-break.c (delete_all_breakpoints): New.
13915 * mem-break.h (delete_all_breakpoints): New prototype.
13916 * thread-db.c (find_first_thread): New.
13917 (thread_db_create_event): Call it instead of
13918 thread_db_find_new_threads. Clean up unused variables.
13919 (maybe_attach_thread): Remove first thread handling.
13920 (thread_db_find_new_threads): Use find_first_thread.
13921 (thread_db_get_tls_address): Likewise.
13922
4105de34
DJ
139232007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13924
13925 * thread-db.c (thread_db_find_new_threads): Add prototype.
13926 (thread_db_create_event): Check for the main thread before adding
13927 a new thread.
13928 (maybe_attach_thread): Only enable event reporting if TID == 0.
13929 (thread_db_get_tls_address): Check for new threads.
13930
2b876972
DJ
139312007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13932
13933 * linux-low.c (linux_create_inferior): Try execv before execvp.
13934 * spu-low.c (spu_create_inferior): Likewise.
13935
7a245884
DJ
139362007-06-13 Mike Frysinger <vapier@gentoo.org>
13937
13938 * linux-low.c (linux_create_inferior): Change execv to execvp.
13939 * spu-low.c (spu_create_inferior): Likewies.
13940
117ce543
DJ
139412007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13942
13943 * Makefile.in (clean): Clean new files instead of deleted ones.
13944 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13945 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13946 rules.
13947 * configure.srv: Specify XML files and new regformats for MIPS and
13948 MIPS64 GNU/Linux.
13949 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13950 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13951 an entry for the restart register.
13952 (mips_cannot_fetch_register, mips_cannot_store_register)
13953 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13954 register names to match the XML descriptions.
13955 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13956 restart register instead of $0.
13957
0e7f50da
UW
139582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13959 Markus Deuling <deuling@de.ibm.com>
13960
13961 * remote-utils.c (decode_xfer_write): New function.
13962 * server.h (decode_xfer_write): Add prototype.
13963 * server.c (handle_query): Add PACKET_LEN argument. Support
13964 qXfer:spu:read and qXfer:spu:write packets.
13965 (main): Pass packet_len to handle_query.
13966 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13967 * target.h (target_ops): Add qxfer_spu.
13968
374c1d38
UW
139692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13970
13971 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13972 accessing non-seekable spufs files.
13973
bb63802a
UW
139742007-05-16 Markus Deuling <deuling@de.ibm.com>
13975
889bf7c5 13976 * server.c (handle_query): Add reply for qC packet.
bb63802a 13977
7390519e
PA
139782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13979 Leo Zayas <lerele@champenstudios@com>
13980
13981 * server.h (check_remote_input_interrupt_request): New function.
13982 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13983 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13984 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13985 (check_remote_input_interrupt_request): New function.
13986 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13987 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13988 winapi_GenerateConsoleCtrlEvent): New typedefs.
13989 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13990 to 250 ms.
13991 (win32_wait): Check for remote interrupt request
13992 with check_remote_input_interrupt_request.
13993 (win32_request_interrupt): New function.
13994 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13995
34b34921
PA
139962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13997
13998 * win32-low.c (debug_registers_changed,
13999 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14000 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14001 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14002 (thread_rec): Get context using the low target.
14003 (child_add_thread): Call thread_added on the low target,
14004 which does the same thing.
14005 (regptr): Delete.
14006 (do_initial_child_stuff): Remove debug registers references.
14007 Set context using the low target. Resume threads after
14008 setting the contexts.
14009 (child_continue): Remove dead variable. Remove debug
14010 registers references.
14011 (child_fetch_inferior_registers): Go through the low target.
14012 (do_child_store_inferior_registers): Remove.
14013 (child_store_inferior_registers): Go through the low target.
14014 (win32_resume): Remove debug registers references.
14015 Set context using the low target.
14016 (handle_exception): Change return type to void. Don't record
14017 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14018 first chance exception.
889bf7c5 14019 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14020 goto loop. Always return after waiting for debug event.
14021 (win32_wait): Convert to switch statement. Handle spurious
14022 events.
14023
14024 * win32-i386-low.c (debug_registers_changed,
14025 debug_registers_used): New.
14026 (initial_stuff): Rename to ...
14027 (i386_initial_stuff): ... this. Clear debug registers
14028 state variables.
14029 (store_debug_registers): Delete.
14030 (i386_get_thread_context): New.
14031 (load_debug_registers): Delete.
14032 (i386_set_thread_context): New.
14033 (i386_thread_added): New.
14034 (single_step): Rename to ...
14035 (i386_single_step): ... this.
14036 (do_fetch_inferior_registers): Rename to ...
14037 (i386_fetch_inferior_register): ... this.
14038 (i386_store_inferior_register): New.
14039 (the_low_target): Adapt to new interface.
14040
14041 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14042 (arm_get_thread_context): New.
14043 (arm_set_thread_context): New.
14044 (regptr): New.
14045 (do_fetch_inferior_registers): Rename to ...
14046 (arm_fetch_inferior_register): ... this.
14047 (arm_store_inferior_register): New.
14048 (arm_wince_breakpoint): Reimplement as unsigned long.
14049 (arm_wince_breakpoint_len): Define.
14050 (the_low_target): Adapt to new interface.
14051
14052 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14053 load_debug_registers. Add get_thread_context, set_thread_context,
14054 thread_added and store_inferior_register. Rename
14055 fetch_inferior_registers to fetch_inferior_register.
14056 (regptr): Remove declaration.
14057
dd6953e1
PA
140582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14059
14060 * linux-low.c (linux_detach): Change return type to int. Return 0.
14061 * spu-low.c (spu_detach): Likewise.
14062
444d6139
PA
140632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14064
14065 * target.h (target_ops): Change return type of detach to int.
14066 Add join.
14067 (join_inferior): New.
14068 * server.c (main): Don't skip detach support on mingw32.
14069 If the inferior doesn't support detaching return error.
14070 Call join_inferior instead of using waitpid.
14071 * linux-low.c (linux_join): New.
14072 (linux_target_op): Add linux_join.
14073 * spu-low.c (spu_join): New.
14074 (spu_target_ops): Add spu_join.
14075 * win32-low.c (win32_detach): Adapt to new interface.
14076 Reopen current_process_handle before detaching. Issue a child
14077 resume before detaching.
14078 (win32_join): New.
14079 (win32_target_op): Add win32_join.
14080
1d5315fe
PA
140812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14082
14083 * win32-low.c (win32-attach): Fix return value.
14084 * target.h (target_ops): Describe ATTACH return values.
14085
bf914831
PA
140862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14087
14088 * win32-low.c (GETPROCADDRESS): Define.
14089 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14090 (winapi_DebugSetProcessKillOnExit): Likewise.
14091 (win32_create_inferior): Force usage of ansi CreateProcessA.
14092 (win32_attach): Use GETPROCADDRESS.
14093 (win32_detach): Likewise.
14094
f72f3e60
PA
140952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14096
14097 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14098
ed50f18f
PA
140992007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14100
14101 * win32-low.c: Commit leftover changes from 2007-03-29.
14102
0c2ead7e
DJ
141032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14104
14105 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14106 fields short instead of int. Add explicit padding.
14107 (i387_cache_to_fsave): Remove unnecessary casts.
14108 (i387_fsave_to_cache): Doc fix.
14109 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14110
73725ff3
DJ
141112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14112
14113 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14114 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14115
d99f33d8
PA
141162007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14117
14118 * configure.srv (arm*-*-mingw32ce*): Move near the other
14119 arm targets.
14120
68070c10
PA
141212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14122
2482afc6 14123 * configure.ac: Add errno checking.
68070c10
PA
14124 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14125 sys/file.h and malloc.h.
14126 (AC_CHECK_DECLS): Add perror.
14127 (srv_mingwce): Handle.
2482afc6 14128 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14129 win32-i386-low.o to srv_tgtobj.
14130 (i[34567]86-*-mingw*): Likewise.
14131 (arm*-*-mingw32ce*): Add case.
14132 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14133 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14134 [__MINGW32CE__] (strerror): New function.
14135 [__MINGW32CE__] (errno): Define to GetLastError.
14136 [__MINGW32CE__] (COUNTOF): New macro.
14137 (remote_open): Remove extra close call.
14138 * mem-break.c (delete_breakpoint_at): New function.
14139 * mem-break.h (delete_breakpoint_at): Declare.
14140 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14141 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14142 [USE_WIN32API] (read, write): Add char* casts.
14143 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14144 * server.h: Include wincecompat.h on Windows CE.
14145 [HAVE_ERRNO_H]: Check.
14146 (perror): Declare if not declared.
14147 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14148 (perror_with_name): Remove errno declaration.
14149 * wincecompat.h: New.
14150 * wincecompat.c: New.
14151 * win32-low.h: New.
14152 * win32-arm-low.c: New.
14153 * win32-i386-low.c: New.
14154 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14155 (OUTMSG2): Make it safe.
14156 (_T): New macro.
14157 (COUNTOF): New macro.
14158 (NUM_REGS): Get it from the low target.
14159 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14160 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14161 (thread_rec): Let low target handle debug registers.
14162 (child_add_thread): Likewise.
14163 (child_init_thread_list): Likewise.
14164 (continue_one_thread): Likewise.
14165 (regptr): New.
14166 (do_child_fetch_inferior_registers): Move to ...
14167 * win32-i386-low.c: ... here, and rename to ...
14168 (do_fetch_inferior_registers): ... this.
889bf7c5 14169 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14170 Go through the low target.
14171 (do_child_store_inferior_registers): Use regptr.
14172 (strwinerror): New function.
14173 (win32_create_inferior): Handle Windows CE.
14174 Use strwinerror instead of strerror on Windows error
14175 codes. Add program to the error output.
14176 Don't close the main thread handle on Windows CE.
14177 (win32_attach): Use coredll.dll on Windows CE.
14178 (win32_kill): Close current process and current
14179 thread handles.
14180 (win32_detach): Use coredll.dll on Windows CE.
14181 (win32_resume): Let low target handle debug registers, and
14182 step request.
14183 (handle_exception): Add/Remove initial breakpoint. Avoid
14184 non-existant WSTOPSIG on Windows CE.
14185 (win32_read_inferior_memory): Cast to remove warning.
14186 (win32_arch_string): Go through the low target.
14187 (initialize_low): Call set_breakpoint_data with the low
14188 target's breakpoint.
14189 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14190 FOP_REGNUM, mappings): Move to ...
14191 * win32-i386-low.c: ... here.
14192 * win32-low.c (win32_thread_info): Move to ...
14193 * win32-low.h: ... here.
14194 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14195 win32-arm-low.c and wincecompat.c.
14196 (all:): Add $EXEEXT.
14197 (install-only:): Likewise.
14198 (gdbserver:): Likewise.
14199 (gdbreplay:): Likewise.
14200 * config.in: Regenerate.
14201 * configure: Regenerate.
14202
41093d81
PA
142032007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14204
14205 * win32-low.c: Rename typedef thread_info to
14206 win32_thread_info throughout.
14207
544afa54
PA
142082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14209
14210 * win32-i386-low.c: Rename to ...
14211 * win32-low.c: ... this.
14212 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14213 * Makefile.in: Likewise.
14214
bce7165d
PA
142152007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14216
14217 * remote-utils.c (monitor_output): Constify msg parameter.
14218 * server.h (monitor_output): Likewise.
14219 * win32-i386-low.c (handle_output_debug_string): New.
14220 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14221 handle_output_debug_string.
14222 (get_child_debug_event): Likewise.
14223
506c7aa0
DJ
142242007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14225
14226 * server.c (main): Correct strtoul check.
14227
42c81e2a
DJ
142282007-03-27 Jon Ringle <jon@ringle.org>
14229
14230 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14231
9453113a
DJ
142322007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14233
14234 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14235
64a69107
DJ
142362007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14237
14238 * terminal.h: Check HAVE_SGTTY_H.
14239
142402007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14241
14242 * remote-utils.c (remote_open): Print out the assigned port number.
14243
c74d0ad8
DJ
142442007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14245
14246 * remote-utils.c (monitor_output): New function.
14247 * server.c (debug_threads): Define here.
14248 (monitor_show_help): New function.
14249 (handle_query): Handle qRcmd.
14250 (main): Do not handle 'd' packet.
14251 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14252 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14253 of debug_threads.
14254
de7c3b4a
PA
142552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14256
14257 * Makefile.in (EXEEXT): New.
14258 (clean): Use $(EXEEXT).
14259
ef57601b
PA
142602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14261
14262 * target.h (target_ops): Rename send_signal to request_interrupt,
14263 and remove enum target_signal parameter.
14264 * linux-low.c (linux_request_interrupt): Rename from
14265 linux_send_signal, and always send SIGINT.
14266 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14267 and always send SIGINT.
14268 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14269 of send_signal.
14270 (input_interrupt): Likewise.
14271
820f2bda
PA
142722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14273
14274 * server.c (get_features_xml): Check if target implemented
14275 arch_string.
14276 * win32-i386-low.c (win32_arch_string): New.
14277 (win32_target_ops): Add win32_arch_string as arch_string member.
14278
ab39bf24
UW
142792007-02-22 Markus Deuling <deuling@de.ibm.com>
14280
14281 * spu-low.c (spu_arch_string): New.
14282 (spu_target_ops): Add spu_arch_string.
14283
61ff6e04
DJ
142842007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14287 * configure.ac: Do not check for terminal.h.
14288 * configure, config.in: Regenerated.
14289
fb1e4ffc
DJ
142902007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14291
14292 * Makefile.in (OBS): Add $(XML_BUILTIN).
14293 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14294 (clean): Update.
14295 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14296 (arm-with-iwmmxt.c): New.
14297 * config.in, configure: Regenerate.
14298 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14299 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14300 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14301 (arm*-*-linux*): Add iWMMXt and regset support.
14302 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14303 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14304 (arm_store_wmmxregset, target_regsets): New.
14305 * server.c (get_features_xml): Take annex argument. Check builtin
14306 XML documents.
14307 (handle_query): Handle multiple annexes.
14308
0f48aa01
DJ
143092007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * remote-utils.c [USE_WIN32API] (read, write): Define.
14312 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14313 write.
14314
23181151
DJ
143152007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * linux-i386-low.c (the_low_target): Set arch_string.
14318 * linux-x86-64-low.c (the_low_target): Likewise.
14319 * linux-low.c (linux_arch_string): New.
14320 (linux_target_ops): Add it.
14321 * linux-low.h (struct linux_target_ops): Add arch_string.
14322 * server.c (write_qxfer_response): Use const void * for DATA.
14323 (get_features_xml): New.
14324 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14325 * target.h (struct target_ops): Add arch_string method.
14326
9d606399
DJ
143272007-01-03 Denis Pilat <denis.pilat@st.com>
14328 Daniel Jacobowitz <dan@codesourcery.com>
14329
14330 * linux-low.c (linux_kill): Handle being called with no threads.
14331 * win32-i386-low.c (win32_kill): Likewise.
14332 (get_child_debug_event): Clear current_process_handle.
14333
143342006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14335 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * remote-utils.c (remote_open): Check the type of specified
14338 serial port devices before opening them.
14339 * server.c (main): Kill the inferior if an error occurs during
14340 the first remote_open.
14341
a5e13d24
DJ
143422006-12-05 Markus Deuling <deuling@de.ibm.com>
14343
14344 * README: Update supported targets.
14345
186947f7
DJ
143462006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14347
14348 * Makefile.in (clean): Remove reg-mips64.c.
14349 (reg-mips64.c, reg-mips64.o): New rules.
14350 * configure.srv: Handle mips64. Include regset support for mips.
14351 * linux-mips-low.c (union mips_register): New.
14352 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14353 (mips_breakpoint, mips_breakpoint_at): Use int.
14354 (mips_collect_register, mips_supply_register)
14355 (mips_collect_register_32bit, mips_supply_register_32bit)
14356 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14357 (mips_store_fpregset, target_regsets): New.
14358 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14359
a13e2c95
UW
143602006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14361
14362 * configure.srv: Add target "spu*-*-*".
14363 * Makefile.in (clean): Remove reg-spu.c.
14364 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14365 * spu-low.c: New file.
14366
cb7283db
DJ
143672006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * configure.ac: Correct td_thr_tls_get_addr test.
14370 * configure: Regenerated.
14371
89be2091
DJ
143722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * linux-low.c (linux_wait_for_event): Reformat. Use the
14375 pass_signals array.
14376 * remote-utils.c (decode_address_to_semicolon): New.
14377 * server.c (pass_signals, handle_general_set): New.
14378 (handle_query): Mention QPassSignals for qSupported.
14379 (main): Call handle_general_set.
14380 * server.h (pass_signals, decode_address_to_semicolon): New.
14381
000ef4f0
DJ
143822006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14383
14384 * server.c (handle_query): Correct error handling for read_auxv.
14385
b7149293
UW
143862005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14387
14388 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14389 and srv_linux_thread_db to yes.
14390 * linux-s390-low.c (s390_fill_gregset): New function.
14391 (target_regsets): Define data structure.
14392
dae5f5cf
DJ
143932006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14394
14395 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14396 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14397 * config.in, configure: Regenerated.
14398 * inferiors.c (gdb_id_to_thread): New function.
14399 (gdb_id_to_thread_id): Use it.
14400 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14401 * linux-low.h (struct process_info): Add th member.
14402 (thread_db_get_tls_address): New prototype.
14403 * remote-utils.c (decode_address): Make non-static.
14404 * server.c (handle_query): Handle qGetTLSAddr.
14405 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14406 * target.h (struct target_ops): Add get_tls_address.
14407 * thread-db.c (maybe_attach_thread): Save the thread handle.
14408 (thread_db_get_tls_address): New.
14409
32ca6d61
DJ
144102006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14411
14412 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14413 (linux_resume_one_process): Take a siginfo_t *. Update all
14414 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14415 (struct pending_signals): Add a siginfo_t.
14416 (linux_wait_for_process): Always set last_status.
14417 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14418 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14419 * linux-low.h (struct process_info): Add last_status.
14420
5ffff7c1
DJ
144212006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * remote-utils.c (try_rle): New function.
14424 (putpkt_binary): Use it.
14425
8695c747
DJ
144262006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14429 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14430 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14431 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14432 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14433 point registers.
14434
290fadea
RS
144352006-08-08 Richard Sandiford <richard@codesourcery.com>
14436
14437 * server.c (terminal_fd): New variable.
14438 (old_foreground_pgrp): Likewise.
14439 (restore_old_foreground_pgrp): New function.
14440 (start_inferior): Record the terminal file descriptor in terminal_fd
14441 and its original foreground group in old_foreground_pgrp. Register
14442 restore_old_foreground_pgrp with atexit().
14443
9f2e1e63
DJ
144442006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14445
14446 * server.c (handle_query): Correct qPart to qXfer.
14447
b80864fb
DJ
144482006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * configure.ac: Check for more headers which are missing on
14451 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14452 * configure.srv: Add Cygwin and mingw32.
14453 * remote-utils.c: Don't include headers unconditionally which
14454 are missing on mingw32. Include <winsock.h> for mingw32.
14455 (remote_open): Adjust for mingw32 support. Flush
14456 standard error after writing to it.
14457 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14458 (unblock_async_io, enable_async_io, disable_async_io)
14459 (readchar, getpkt): Update for Winsock support.
14460 (prepare_resume_reply): Expect a protocol signal number.
14461 * server.c: Disable <sys/wait.h> on mingw32.
14462 (start_inferior): Adjust for mingw32 support. Flush
14463 standard error after writing to it.
14464 (attach_inferior): Likewise. Use protocol signal
14465 numbers.
14466 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14467 and names.
14468 * win32-i386-low.c: New file.
14469 * Makefile.in (XM_CLIBS): Set.
14470 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14471 (win32-i386-low.o): New dependency rule.
14472 * linux-low.c (linux_wait): Use target signal numbers.
14473 * target.h (struct target_ops): Doc fix.
14474 * server.h (target_signal_to_name): New prototype.
14475 * gdbreplay.c: Don't include headers unconditionally which
14476 are missing on mingw32. Include <winsock.h> for mingw32.
14477 (remote_close, remote_open): Adjust for Winsock support.
14478 * configure, config.in: Regenerated.
14479
0876f84a
DJ
144802006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * server.c (decode_xfer_read, write_qxfer_response): New.
14483 (handle_query): Take a packet length argument. Handle
14484 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14485 the qSupported response.
14486 (main): Update call to handle_query.
14487
01f9e8fa
DJ
144882006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14489
14490 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14491 (putpkt_binary): Renamed from putpkt and adjusted for binary
14492 data.
14493 (putpkt): New wrapper for putpkt_binary.
14494 (readchar): Don't mask off the high bit.
14495 (decode_X_packet): New function.
14496 * server.c (main): Call putpkt_binary if a handler sets the packet
14497 length. Save the length of the incoming packet. Handle 'X'.
14498 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14499
be2a5f71
DJ
145002006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14501
14502 * server.c (handle_query): Handle qSupported.
14503
ea025f5f
DJ
145042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * remote-utils.c (all_symbols_looked_up): New variable.
14507 (look_up_one_symbol): Check it.
14508 * server.h (look_up_one_symbol): New declaration.
14509 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14510
9308fc88
DJ
145112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14514 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14515 (PTRACE_GET_THREAD_AREA): Define.
14516 (ps_get_thread_area): New function.
14517
52fb6437
NS
145182006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14519
14520 * configure.srv (m68k*-*-uclinux*): New target.
14521 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14522 (linux_resume_one_process): Remove extraneous cast.
14523 (linux_read_offsets): New.
14524 (linux_target_op): Add linux_read_offsets on mmuless systems.
14525 * server.c (handle_query): Add qOffsets logic.
14526 * target.h (struct target_ops): Add read_offsets.
14527
21b0f40c
DJ
145282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14531 (PTRACE_GET_THREAD_AREA): Define.
14532 (ps_get_thread_area): New function.
14533 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14534 (linux-x86-64-low.o): Update.
14535
0050a760
DJ
145362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14537
14538 * configure.ac: Remove checks for prfpregset_t.
14539 * gdb_proc_service.h: New file.
14540 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14541 new "gdb_proc_service.h".
14542 * proc-service.c: Likewise.
14543 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14544 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14545 * Makefile.in (gdb_proc_service_h): Updated.
14546 * configure, config.in: Regenerated.
14547
b92a518e
DJ
145482006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * remote-utils.c (prepare_resume_reply): Move declaration
14551 of gdb_id_from_wait to the top of the block.
14552
545587ee
DJ
145532006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * linux-low.c (regsets_store_inferior_registers): Read the regset
14556 from the target before filling it.
14557
9db87ebd
DJ
145582006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * server.c (attach_inferior): Return SIGTRAP for a successful
14561 attach.
14562
dd24457d
DJ
145632006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14564
14565 * Makefile.in (OBS): Add version.o.
14566 (STAGESTUFF): Delete.
14567 (version.o): Add dependencies.
14568 (version.c): Replace rule.
14569 (clean): Remove version.c.
14570 * server.c (gdbserver_version): New.
14571 (gdbserver_usage): Use printf.
14572 (main): Handle --version and --help.
14573 * server.h (version, host_name): Add declarations.
14574
6f0f660e
EZ
145752005-12-23 Eli Zaretskii <eliz@gnu.org>
14576
889bf7c5
PA
14577 * linux-arm-low.c:
14578 * linux-arm-low.c:
14579 * inferiors.c:
14580 * i387-fp.h:
14581 * i387-fp.c:
14582 * gdbreplay.c:
14583 * regcache.c:
14584 * proc-service.c:
14585 * mem-break.h:
14586 * mem-break.c:
14587 * linux-x86-64-low.c:
14588 * linux-sh-low.c:
14589 * linux-s390-low.c:
14590 * linux-ppc64-low.c:
14591 * linux-ppc-low.c:
14592 * linux-mips-low.c:
14593 * linux-m68k-low.c:
14594 * linux-m32r-low.c:
14595 * linux-low.h:
14596 * linux-low.c:
14597 * linux-ia64-low.c:
14598 * linux-i386-low.c:
14599 * linux-crisv32-low.c:
14600 * thread-db.c:
14601 * terminal.h:
14602 * target.h:
14603 * target.c:
14604 * server.h:
14605 * server.c:
14606 * remote-utils.c:
14607 * regcache.h:
14608 * utils.c:
14609 * Makefile.in:
14610 * configure.ac:
6f0f660e
EZ
14611 * gdbserver.1: Add (C) after Copyright. Update the FSF
14612 address.
14613
9d1fb177
DJ
146142005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14615
14616 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14617 (arm_breakpoint_at): Recognize both breakpoints.
14618 (the_low_target): Use the correct breakpoint instruction.
14619
011a70c2
DJ
146202005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14623 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14624 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14625 (the_low_target): Update.
14626
7fb85e41
AS
146272005-10-25 Andreas Schwab <schwab@suse.de>
14628
14629 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14630
14631 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14632 (ia64_num_regs): Reduce to 462.
14633
3db0444b
DJ
146342005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * acinclude.m4: Correct quoting.
14637 * aclocal.m4: Regenerated.
14638
14639 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14640 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14641 (thread_db_init): Call thread_db_err_str.
14642 * configure.ac: Check for TD_VERSION.
14643 * config.in, configure: Regenerated.
14644
bee0189a
DJ
146452005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14646
14647 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14648
e9d25b98
DJ
146492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14650
14651 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14652 is not available. Define HAVE_PTRACE_GETREGS if it is.
14653 * config.in, configure: Regenerated.
14654 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14655 * linux-i386-low.c, linux-m68k-low.c: Update to use
14656 HAVE_PTRACE_GETREGS.
14657 * linux-low.c (regsets_fetch_inferior_registers)
14658 (regsets_store_inferior_registers): Only return 0 if we processed
14659 GENERAL_REGS.
14660 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14661 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14662
a06660f7
DJ
146632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * inferiors.c (struct thread_info): Add gdb_id.
14666 (add_thread): Add gdb_id argument.
14667 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14668 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14669 calls to add_thread.
14670 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14671 * server.c (handle_query): Use thread_to_gdb_id.
14672 (handle_v_cont, main): Use gdb_id_to_thread_id.
14673 * server.h (add_thread): Update prototype.
14674 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14675 prototypes.
14676
5a1f5858
DJ
146772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14680 left-padded registers.
14681 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14682 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14683
e122f1f5
SE
146842005-07-01 Steve Ellcey <sje@cup.hp.com>
14685
14686 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14687 * configure: Regenerate.
14688 * config.in: Regenerate.
14689 * server.h (NEED_DECLARATION_STRERROR):
14690 Replace with !HAVE_DECL_STRERROR.
14691
d592fa2f
DJ
146922005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * linux-low.c (linux_wait, linux_send_signal): Don't test
14695 an unsigned long variable for > 0 if it could be MAX_ULONG.
14696 * server.c (myresume): Likewise.
14697 * target.c (set_desired_inferior): Likewise.
14698
ccbd4912
MK
146992005-06-13 Mark Kettenis <kettenis@gnu.org>
14700
14701 * configure.ac: Simplify and improve check for socklen_t.
14702 * configure, config.in: Regenerate.
14703
f450004a
DJ
147042005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * acconfig.h: Remove.
14707 * configure.ac: Add a test for socklen_t. Use three-argument
14708 AC_DEFINE throughout.
14709 * config.in: Regenerated using autoheader 2.59.
14710 * configure: Regenerated.
14711
14712 * gdbreplay.c (socklen_t): Provide a default.
14713 (remote_open): Use socklen_t.
14714 * remote-utils.c (socklen_t): Provide a default.
14715 (remote_open): Use socklen_t.
14716 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14717 unsigned char.
14718
14719 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14720 char for buffers.
14721 * linux-low.c (linux_read_memory, linux_write_memory)
14722 (linux_read_auxv): Likewise.
14723 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14724 (check_mem_write): Likewise.
14725 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14726 Likewise.
14727 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14728 (registers_from_string, register_data): Likewise.
14729 * server.c (handle_query, main): Likewise.
14730 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14731 (decode_M_packet): Likewise.
14732 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14733 * target.h (struct target_ops): Update read_memory, write_memory,
14734 and read_auxv.
14735 (read_inferior_memory, write_inferior_memory): Update.
14736 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14737 to unsigned char *.
14738 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14739 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14740 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14741 linux-s390-low.c, linux-sh-low.c: Update for changes in
14742 read_inferior_memory and the_low_target->breakpoint.
14743
eee84df1
DJ
147442005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14745
14746 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14747 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14748 * configure.srv: Add powerpc64-*-linux*.
14749 * linux-ppc64-low.c: New file.
14750
45b134e5
OF
147512005-05-23 Orjan Friberg <orjanf@axis.com>
14752
14753 * linux-cris-low.c: New file with support for CRIS.
14754 * linux-crisv32-low.c: Ditto for CRISv32.
14755 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14756 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14757 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14758 reg-crisv32.o, and reg-crisv32.c to make rules.
14759 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14760 recognized targets.
14761
48d93c75
UW
147622005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14763
14764 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14765 of sizeof (PTRACE_XFER_TYPE).
14766 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14767
e013ee27
OF
147682005-05-12 Orjan Friberg <orjanf@axis.com>
14769
889bf7c5 14770 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14771 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14772 pointers for hardware watchpoint support.
14773 * linux-low.h (struct linux_target_ops): Ditto.
14774 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14775 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14776 to linux_target_ops.
14777 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14778 reply packet.
14779 * server.c (main): Recognize 'Z' and 'z' packets.
14780
b0ded00b
UW
147812005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14782
14783 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14784 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14785 (the_low_target): Add new members.
14786
8643e2ad
DJ
147872005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * proc-service.c (ps_lgetregs): Search all_processes instead of
14790 all_threads.
14791
fc620387
DJ
147922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * server.c (start_inferior): Change return type to int.
14795 (attach_inferior): Change sigptr to int *.
14796 (handle_v_cont, handle_v_requests): Change signal to int *.
14797 (main): Change signal to int.
14798
147992005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14800
14801 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14802 * configure.srv: Add m32r*-*-linux*.
14803 * linux-m32r-low.c: New file.
14804
e0e76420
DJ
148052005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14806
14807 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14808
a1928bad
DJ
148092005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14810
14811 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14812 Take unsigned long arguments for PIDs.
14813 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14814 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14815 (wait_for_sigstop, linux_resume_one_process)
14816 (regsets_fetch_inferior_registers, linux_send_signal)
14817 (linux_read_auxv): Likewise. Update the types of variables holding
14818 PIDs. Update format string specifiers.
14819 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14820 * remote-utils.c (prepare_resume_reply): Likewise.
14821 * server.c (cont_thread, general_thread, step_thread)
14822 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14823 unsigned long.
14824 (handle_query): Update format specifiers.
14825 (handle_v_cont, main): Use strtoul for thread IDs.
14826 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14827 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14828 (general_thread, step_thread, thread_from_wait)
14829 (old_thread_from_wait): Update.
14830 * target.h (struct thread_resume): Use unsigned long for THREAD.
14831 (struct target_ops): Use unsigned long for arguments to attach and
14832 thread_alive.
14833
dcdb98d2
DJ
148342005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * acinclude.m4: Include bfd/bfd.m4 directly.
14837 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14838 <agriffis@toolchain.org>.
14839 * aclocal.m4, configure: Regenerated.
14840
bec39cab
AC
148412005-01-07 Andrew Cagney <cagney@gnu.org>
14842
14843 * configure.ac: Rename configure.in, require autoconf 2.59.
14844 * configure: Re-generate.
14845
434c4c77
DJ
148462004-12-08 Daniel Jacobowitz <dan@debian.org>
14847
14848 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14849 LIBS when finished.
14850 * aclocal.m4: Regenerated.
14851 * configure: Regenerated.
14852
db1d3e1b
AS
148532004-11-21 Andreas Schwab <schwab@suse.de>
14854
14855 * linux-m68k-low.c (m68k_num_gregs): Define.
14856 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14857 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14858 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14859 (m68k_breakpoint_at): New. Add to the_low_target.
14860
14861 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14862 srv_linux_thread_db to yes.
14863
43360365
JB
148642004-10-20 Joel Brobecker <brobecker@gnat.com>
14865
14866 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14867 (ARCH_SET_FS): Likewise.
14868 (ARCH_GET_FS): Likewise.
14869 (ARCH_GET_GS): Likewise.
14870
fd500816
DJ
148712004-10-16 Daniel Jacobowitz <dan@debian.org>
14872
14873 * linux-i386-low.c (ps_get_thread_area): New.
14874 * linux-x86-64-low.c (ps_get_thread_area): New.
14875 * linux-low.c: Include <sys/syscall.h>.
14876 (linux_kill_one_process): Don't kill the first thread here.
14877 (linux_kill): Kill the first thread here.
14878 (kill_lwp): New function.
14879 (send_sigstop, linux_send_signal): Use it.
14880 * proc-service.c: Clean up #ifdefs.
14881 (fpregset_info): Delete.
14882 (ps_lgetregs): Update and enable implementation.
14883 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14884 implementations.
14885 * remote-utils.c (struct sym_cache, symbol_cache): New.
14886 (input_interrupt): Print a clearer message.
14887 (async_io_enabled): New variable.
14888 (enable_async_io, disable_async_io): Use it. Update comments.
14889 (look_up_one_symbol): Use the symbol cache.
14890 * thread-db.c (thread_db_look_up_symbols): New function.
14891 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14892
f6de3c42
DJ
148932004-10-16 Daniel Jacobowitz <dan@debian.org>
14894
14895 * configure.in: Test for -rdynamic.
14896 * configure: Regenerated.
14897 * Makefile (INTERNAL_LDFLAGS): New.
14898 (gdbserver, gdbreplay): Use it.
14899
2c0fc042
AC
149002004-09-02 Andrew Cagney <cagney@gnu.org>
14901
14902 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14903
075b3282
DJ
149042004-03-23 Daniel Jacobowitz <drow@mvista.com>
14905
14906 * linux-low.c (linux_wait): Clear all_processes list also.
14907
fa6a77dc
DJ
149082004-03-12 Daniel Jacobowitz <drow@mvista.com>
14909
14910 * linux-low.c: Include <errno.h>. Remove extern declaration of
14911 errno.
14912
6d782a97
DJ
149132004-03-12 Daniel Jacobowitz <drow@mvista.com>
14914
14915 * gdbreplay.c, server.h, utils.c: Update copyright years.
14916
3a7fb99b
DJ
149172004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14918
14919 * server.c (main): Print child status or termination signal from
14920 variable 'signal', not 'sig'.
14921
c3e735a6
DJ
149222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14923
14924 * linux-low.c (linux_read_memory): Change return type to
14925 int. Check for and return error from ptrace().
14926 * target.c (read_inferior_memory): Change return type to int. Pass
14927 back return status from the_target->read_memory().
14928 * target.h (struct target_ops): Adapt *read_memory() prototype.
14929 Update comment.
14930 (read_inferior_memory): Adapt prototype.
14931 * server.c (main): Return an error packet if
14932 read_inferior_memory() returns an error.
14933
a59d1c82
DJ
149342004-03-04 Daniel Jacobowitz <drow@mvista.com>
14935
14936 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14937 Unify with other clean targets.
14938
dc3f8883
DJ
149392004-02-29 Daniel Jacobowitz <drow@mvista.com>
14940
14941 * server.c (handle_v_cont): Call set_desired_inferior.
14942
89a208da
DJ
149432004-02-29 Daniel Jacobowitz <drow@mvista.com>
14944
14945 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14946
62ea82f5
DJ
149472004-02-29 Daniel Jacobowitz <drow@mvista.com>
14948
14949 * linux-low.c (linux_wait): Unblock async I/O.
14950 (linux_resume): Block and enable async I/O.
14951 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14952 * server.h (block_async_io, unblock_async_io): Add prototypes.
14953
6910d122
DJ
149542004-02-29 Daniel Jacobowitz <drow@mvista.com>
14955
14956 * remote-utils.c (remote_open): Print a status notice after
14957 opening a TCP port.
14958 * server.c (attach_inferior): Print a status notice after
14959 attaching.
14960
149612004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14962
14963 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14964
c89dc5d4
DJ
149652004-02-26 Daniel Jacobowitz <drow@mvista.com>
14966
14967 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14968 error packet.
14969 * server.c, target.h: Update copyright years.
14970
4b8dad4a
RM
149712004-02-25 Roland McGrath <roland@redhat.com>
14972
14973 * target.h (struct target_ops): New member `read_auxv'.
14974 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14975 * linux-low.c (linux_read_auxv): New function.
14976 (linux_target_ops): Initialize `read_auxv' member to that.
14977
d7446758
JB
149782004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14979
14980 Committed by Jim Blandy <jimb@redhat.com>.
14981
14982 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14983 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14984 instead of GPR_SIZE to distiguish s390 and s390x targets.
14985
5544ad89
DJ
149862004-01-31 Daniel Jacobowitz <drow@mvista.com>
14987
14988 * linux-low.c: Update copyright year.
14989 (check_removed_breakpoint): Clear pending_is_breakpoint.
14990 (linux_set_resume_request, linux_queue_one_thread)
14991 (resume_status_pending_p): New functions.
14992 (linux_continue_one_thread): Use process->resume.
14993 (linux_resume): Only resume threads if there are no pending events.
14994 * linux-low.h (struct process_info): Add resume request
14995 pointer.
14996
2a68b70e
DJ
149972004-01-30 Daniel Jacobowitz <drow@mvista.com>
14998
14999 * regcache.c (new_register_cache): Clear the allocated register
15000 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15001
64386c31
DJ
150022003-10-13 Daniel Jacobowitz <drow@mvista.com>
15003
15004 * linux-low.c (linux_resume): Take a struct thread_resume *
15005 argument.
15006 (linux_wait): Update call.
15007 (resume_ptr): New static variable.
15008 (linux_continue_one_thread): Renamed from
15009 linux_continue_one_process. Use resume_ptr.
15010 (linux_resume): Use linux_continue_one_thread.
15011 * server.c (handle_v_cont, handle_v_requests): New functions.
15012 (myresume): New function.
15013 (main): Handle 'v' case.
15014 * target.h (struct thread_resume): New type.
15015 (struct target_ops): Change argument of "resume" to struct
15016 thread_resume *.
15017 (myresume): Delete macro.
15018
c938e9b0
L
150192003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15020
15021 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15022 (uninstall): Support DESTDIR.
15023
7f313d07
BC
15024Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15025
15026 * configure.srv: Add xscale*linux copy of arm*linux entry.
15027
3b2fc2ea
DJ
150282003-07-24 Daniel Jacobowitz <drow@mvista.com>
15029
15030 * linux-arm-low.c (arm_reinsert_addr): New function.
15031 (the_low_target): Add arm_reinsert_addr.
15032
1c0a559e
MK
150332003-07-08 Mark Kettenis <kettenis@gnu.org>
15034
15035 * mem-break.c: Remove whitespace at end of file.
15036
43d5792c
DJ
150372003-06-28 Daniel Jacobowitz <drow@mvista.com>
15038
15039 * configure.in: Check whether we need to prototype strerror.
15040 * server.h: Optionally prototype strerror.
15041 * gdbreplay.c (perror_with_name): Use strerror.
15042 * linux-low.c (linux_attach_lwp): Use strerror.
15043 * utils.c (perror_with_name): Use strerror.
15044 * config.in, configure: Regenerated.
15045
c8a86edf
DJ
150462003-06-28 Daniel Jacobowitz <drow@mvista.com>
15047
15048 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15049 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15050
73d37363
DJ
150512003-06-20 Daniel Jacobowitz <drow@mvista.com>
15052
15053 * Makefile.in (SFILES): Update.
15054 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15055 low-sun3.c: Remove files.
15056
6ad8ae5c
DJ
150572003-06-17 Daniel Jacobowitz <drow@mvista.com>
15058
15059 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15060 (linux_detach_one_process, linux_detach): New functions.
15061 (linux_target_ops): Add linux_detach.
15062 * server.c (main): Handle 'D' packet.
15063 * target.h (struct target_ops): Add "detach" member.
15064 (detach_inferior): Define.
15065
1581182a
MK
150662003-06-13 Mark Kettenis <kettenis@gnu.org>
15067
15068 From Kelley Cook <kelleycook@wideopenwest.com>:
15069 * configure.srv: Accept i[34567]86 variants.
15070
e5379b03
DJ
150712003-06-05 Daniel Jacobowitz <drow@mvista.com>
15072
15073 * linux-low.c (linux_wait_for_event): Correct comment typos.
15074 (linux_resume_one_process): Call check_removed_breakpoint.
15075 (linux_send_signal): New function.
15076 (linux_target_ops): Add linux_send_signal.
15077 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15078 of kill.
15079 * target.h (struct target_ops): Add send_signal.
15080
2ff29de4
JB
150812003-05-29 Jim Blandy <jimb@redhat.com>
15082
15083 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15084 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15085 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15086 away part of the register's value.
15087
254787d4
DJ
150882003-03-26 Daniel Jacobowitz <drow@mvista.com>
15089
15090 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15091 (linux_wait_for_event, linux_init_signals): Likewise.
15092
94e10508
DJ
150932003-03-17 Daniel Jacobowitz <drow@mvista.com>
15094
15095 * configure.in: Check for stdlib.h.
15096 * configure: Regenerated.
15097 * config.in: Regenerated.
15098
4c0711e0
DJ
150992003-01-04 Andreas Schwab <schwab@suse.de>
15100
15101 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15102
ef66e766
AC
151032003-01-02 Andrew Cagney <ac131313@redhat.com>
15104
15105 * Makefile.in: Remove obsolete code.
15106
a1358604
DJ
151072002-11-20 Daniel Jacobowitz <drow@mvista.com>
15108
15109 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15110 defined(PT_FPR0_HI).
15111
23ce3b1c
DJ
151122002-11-17 Stuart Hughes <seh@zee2.com>
15113
15114 * linux-arm-low.c (arm_num_regs): Increase.
15115 (arm_regmap): Include status register.
15116
151172002-11-17 Daniel Jacobowitz <drow@mvista.com>
15118
15119 * linux-low.c (register_addr): Remove incorrect -1 check.
15120
a9fa9f7d
DJ
151212002-08-29 Daniel Jacobowitz <drow@mvista.com>
15122
15123 * linux-low.c (linux_create_inferior): Call setpgid. Return
15124 the new PID.
15125 (unstopped_p, linux_signal_pid): Remove.
15126 (linux_target_ops): Remove linux_signal_pid.
15127 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15128 global instead of target method.
15129 * target.h (struct target_ops): Remove signal_pid. Update comment
15130 for create_inferior.
15131 * server.c (signal_pid): New variable.
15132 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15133 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15134 (attach_inferior): Set signal_pid.
15135
17574093
DJ
151362002-08-23 Daniel Jacobowitz <drow@mvista.com>
15137
15138 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15139
151402002-08-20 Jim Blandy <jimb@redhat.com>
15141
15142 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15143 default for this.
15144
151452002-08-01 Andrew Cagney <cagney@redhat.com>
15146
15147 * Makefile.in: Make chill references obsolete.
15148
151492002-07-24 Kevin Buettner <kevinb@redhat.com>
15150
15151 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15152 * configure: Regenerate.
15153 * config.in: Regenerate.
15154
151552002-07-09 David O'Brien <obrien@FreeBSD.org>
15156
15157 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15158 (perror_with_name, remote_close, remote_open, expect, play): Static.
15159
151602002-07-04 Michal Ludvig <mludvig@suse.cz>
15161
4b8dad4a 15162 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15163 byte offsets instead of an array of indexes.
15164 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15165
151662002-06-13 Daniel Jacobowitz <drow@mvista.com>
15167
15168 * regcache.c: Add comment.
15169
151702002-06-11 Daniel Jacobowitz <drow@mvista.com>
15171
15172 * thread-db.c: New file.
15173 * proc-service.c: New file.
15174 * acinclude.m4: New file.
15175 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15176 proc-service.o, and thread-db.o.
15177 (linux-low.o): Add USE_THREAD_DB.
15178 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15179 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15180 * aclocal.m4: Regenerated.
15181 * config.in: Regenerated.
15182 * configure: Regenerated.
15183 * configure.in: Check for proc_service.h, sys/procfs.h,
15184 thread_db.h, and linux/elf.h headrs.
15185 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15186 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15187 Check for -lthread_db and thread support.
15188 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15189 PowerPC, and SuperH.
15190 * i387-fp.c: Constify arguments.
15191 * i387-fp.h: Likewise.
15192 * inferiors.c: (struct thread_info): Renamed from
15193 `struct inferior_info'. Remove PID member. Use generic inferior
15194 list header. All uses updated.
15195 (inferiors, signal_pid): Removed.
15196 (all_threads): New variable.
15197 (get_thread): Define.
15198 (add_inferior_to_list): New function.
15199 (for_each_inferior): New function.
15200 (change_inferior_id): New function.
15201 (add_inferior): Removed.
15202 (remove_inferior): New function.
15203 (add_thread): New function.
15204 (free_one_thread): New function.
15205 (remove_thread): New function.
15206 (clear_inferiors): Use for_each_inferior and free_one_thread.
15207 (find_inferior): New function.
15208 (find_inferior_id): New function.
15209 (inferior_target_data): Update argument type.
15210 (set_inferior_target_data): Likewise.
15211 (inferior_regcache_data): Likewise.
15212 (set_inferior_regcache_data): Likewise.
15213 * linux-low.c (linux_bp_reinsert): Remove.
15214 (all_processes, stopping_threads, using_thrads)
15215 (struct pending_signals, debug_threads, pid_of): New.
15216 (inferior_pid): Replace with macro.
15217 (struct inferior_linux_data): Remove.
15218 (get_stop_pc, add_process): New functions.
15219 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15220 Use add_process and add_thread.
15221 (linux_attach_lwp): New function, based on old linux_attach. Use
15222 add_process and add_thread. Set stop_expected for new threads.
15223 (linux_attach): New function.
15224 (linux_kill_one_process): New function.
15225 (linux_kill): Kill all LWPs.
15226 (linux_thread_alive): Use find_inferior_id.
15227 (check_removed_breakpoints, status_pending_p): New functions.
15228 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15229 Update. Use WNOHANG. Wait for cloned processes also. Update process
15230 struct for the found process.
15231 (linux_wait_for_event): New function.
15232 (linux_wait): Use it. Support LWPs.
15233 (send_sigstop, wait_for_sigstop, stop_all_processes)
15234 (linux_resume_one_process, linux_continue_one_process): New functions.
15235 (linux_resume): Support LWPs.
15236 (REGISTER_RAW_SIZE): Remove.
15237 (fetch_register): Use register_size instead. Call supply_register.
15238 (usr_store_inferior_registers): Likewise. Call collect_register.
15239 Fix recursive case.
15240 (regsets_fetch_inferior_registers): Improve error message.
15241 (regsets_store_inferior_registers): Add debugging.
15242 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15243 (unstopped_p, linux_signal_pid): New functions.
15244 (linux_target_ops): Add linux_signal_pid.
15245 (linux_init_signals): New function.
15246 (initialize_low): Call it. Initialize using_threads.
15247 * regcache.c (inferior_regcache_data): Add valid
15248 flag.
15249 (get_regcache): Fetch registers lazily. Add fetch argument
15250 and update all callers.
15251 (regcache_invalidate_one, regcache_invalidate): New
15252 functions.
15253 (new_register_cache): Renamed from create_register_cache.
15254 Return the new regcache.
15255 (free_register_cache): Change argument to a void *.
15256 (registers_to_string, registers_from_string): Call get_regcache
15257 with fetch flag set.
15258 (register_data): Make static. Pass fetch flag to get_regcache.
15259 (supply_register): Call get_regcache with fetch flag clear.
15260 (collect_register): Call get_regcache with fetch flag set.
15261 (collect_register_as_string): New function.
15262 * regcache.h: Update.
15263 * remote-utils.c (putpkt): Flush after debug output and use
15264 stderr.
15265 Handle input interrupts while waiting for an ACK.
15266 (input_interrupt): Use signal_pid method.
15267 (getpkt): Flush after debug output and use stderr.
15268 (outreg): Use collect_register_as_string.
15269 (new_thread_notify, dead_thread_notify): New functions.
15270 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15271 and general_thread.
15272 (look_up_one_symbol): Flush after debug output.
15273 * server.c (step_thread, server_waiting): New variables.
15274 (start_inferior): Don't use signal_pid. Update call to mywait.
15275 (attach_inferior): Update call to mywait.
15276 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15277 (main): Don't fetch/store registers explicitly. Use
15278 set_desired_inferior. Support proposed ``Hs'' packet. Update
15279 calls to mywait.
15280 * server.h: Update.
15281 (struct inferior_list, struct_inferior_list_entry): New.
15282 * target.c (set_desired_inferior): New.
15283 (write_inferior_memory): Constify.
15284 (mywait): New function.
15285 * target.h: Update.
15286 (struct target_ops): New signal_pid method.
15287 (mywait): Removed macro, added prototype.
15288
15289 * linux-low.h (regset_func): Removed.
15290 (regset_fill_func, regset_store_func): New.
15291 (enum regset_type): New.
15292 (struct regset_info): Add type field. Use new operation types.
15293 (struct linux_target_ops): stop_pc renamed to get_pc.
15294 Add decr_pc_after_break and breakpoint_at.
15295 (get_process, get_thread_proess, get_process_thread)
15296 (strut process_info, all_processes, linux_attach_lwp)
15297 (thread_db_init): New.
15298
15299 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15300 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15301 (the_low_target): Add new members.
15302 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15303 (i386_store_fpxregset): Constify.
15304 (target_regsets): Add new kind identifier.
15305 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15306 (i386_set_pc): Add debugging.
15307 (i386_breakpoint_at): New function.
15308 (the_low_target): Add new members.
15309 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15310 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15311 (mips_breakpoint_at): New.
15312 (the_low_target): Add new members.
15313 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15314 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15315 (the_low_target): Add new members.
15316 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15317 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15318 (the_low_target): Add new members.
15319 * linux-x86-64-low.c (target_regsets): Add new kind
15320 identifier.
15321
153222002-05-15 Daniel Jacobowitz <drow@mvista.com>
15323
15324 From Martin Pool <mbp@samba.org>:
15325 * server.c (gdbserver_usage): New function.
15326 (main): Call it.
15327
153282002-05-14 Daniel Jacobowitz <drow@mvista.com>
15329
15330 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15331 stop_at -> stop_pc.
15332
153332002-05-04 Andrew Cagney <ac131313@redhat.com>
15334
15335 * Makefile.in: Remove obsolete code.
15336
153372002-04-24 Michal Ludvig <mludvig@suse.cz>
15338
15339 * linux-low.c (regsets_fetch_inferior_registers),
15340 (regsets_store_inferior_registers): Removed cast to int from
15341 ptrace() calls.
15342 * regcache.h: Added declaration of struct inferior_info.
15343
153442002-04-20 Daniel Jacobowitz <drow@mvista.com>
15345
15346 * inferiors.c (struct inferior_info): Add regcache_data.
15347 (add_inferior): Call create_register_cache.
15348 (clear_inferiors): Call free_register_cache.
15349 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15350 * regcache.c (struct inferior_regcache_data): New.
15351 (registers): Remove.
15352 (get_regcache): New function.
15353 (create_register_cache, free_register_cache): New functions.
15354 (set_register_cache): Don't initialize the register cache here.
15355 (registers_to_string, registers_from_string, register_data): Call
15356 get_regcache.
15357 * regcache.h: Add prototypes.
15358 * server.h: Likewise.
15359
153602002-04-20 Daniel Jacobowitz <drow@mvista.com>
15361
15362 * mem-break.c: New file.
15363 * mem-break.h: New file.
15364 * Makefile.in: Add mem-break.o rule; update server.h
15365 dependencies.
15366 * inferiors.c (struct inferior_info): Add target_data
15367 member.
15368 (clear_inferiors): Free target_data member if set.
15369 (inferior_target_data, set_inferior_target_data): New functions.
15370 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15371 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15372 * linux-low.c (linux_bp_reinsert): New variable.
15373 (struct inferior_linux_data): New.
15374 (linux_create_inferior): Use set_inferior_target_data.
15375 (linux_attach): Likewise. Call add_inferior.
15376 (linux_wait_for_one_inferior): New function.
15377 (linux_wait): Call it.
15378 (linux_write_memory): Add const.
15379 (initialize_low): Call set_breakpoint_data.
15380 * linux-low.h (struct linux_target_ops): Add breakpoint
15381 handling members.
15382 * server.c (attach_inferior): Remove extra add_inferior
15383 call.
15384 * server.h: Include mem-break.h. Update inferior.c
15385 prototypes.
15386 * target.c (read_inferior_memory)
15387 (write_inferior_memory): New functions.
15388 * target.h (read_inferior_memory)
15389 (write_inferior_memory): Change macros to prototypes.
15390 (struct target_ops): Update comments. Add const to write_memory
15391 definition.
15392
153932002-04-11 Daniel Jacobowitz <drow@mvista.com>
15394
15395 * linux-low.c (usr_store_inferior_registers): Support
15396 registers which are allowed to fail to store.
15397 * linux-low.h (linux_target_ops): Likewise.
15398 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15399 (ppc_cannot_store_register): FPSCR may not be storable.
15400
154012002-04-09 Daniel Jacobowitz <drow@mvista.com>
15402
15403 * server.h: Include <string.h> if HAVE_STRING_H.
15404 * ChangeLog: Correct paths in last ChangeLog entry.
15405
154062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * linux-low.h: Remove obsolete prototypes.
15409 (struct linux_target_ops): New.
15410 (extern the_low_target): New.
15411 * linux-low.c (num_regs, regmap): Remove declarations.
15412 (register_addr): Use the_low_target explicitly.
15413 (fetch_register): Likewise.
15414 (usr_fetch_inferior_registers): Likewise.
15415 (usr_store_inferior_registers): Likewise.
15416 * linux-arm-low.c (num_regs): Remove.
15417 (arm_num_regs): Define.
15418 (arm_regmap): Renamed from regmap, made static.
15419 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15420 made static.
15421 (arm_cannot_store_register): Renamed from cannot_store_register,
15422 made static.
15423 (the_low_target): New.
15424 * linux-i386-low.c (num_regs): Remove.
15425 (i386_num_regs): Define.
15426 (i386_regmap): Renamed from regmap, made static.
15427 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15428 made static.
15429 (i386_cannot_store_register): Renamed from cannot_store_register,
15430 made static.
15431 (the_low_target): New.
15432 * linux-ia64-low.c (num_regs): Remove.
15433 (ia64_num_regs): Define.
15434 (ia64_regmap): Renamed from regmap, made static.
15435 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15436 made static.
15437 (ia64_cannot_store_register): Renamed from cannot_store_register,
15438 made static.
15439 (the_low_target): New.
15440 * linux-m68k-low.c (num_regs): Remove.
15441 (m68k_num_regs): Define.
15442 (m68k_regmap): Renamed from regmap, made static.
15443 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15444 made static.
15445 (m68k_cannot_store_register): Renamed from cannot_store_register,
15446 made static.
15447 (the_low_target): New.
15448 * linux-mips-low.c (num_regs): Remove.
15449 (mips_num_regs): Define.
15450 (mips_regmap): Renamed from regmap, made static.
15451 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15452 made static.
15453 (mips_cannot_store_register): Renamed from cannot_store_register,
15454 made static.
15455 (the_low_target): New.
15456 * linux-ppc-low.c (num_regs): Remove.
15457 (ppc_num_regs): Define.
15458 (ppc_regmap): Renamed from regmap, made static.
15459 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15460 made static.
15461 (ppc_cannot_store_register): Renamed from cannot_store_register,
15462 made static.
15463 (the_low_target): New.
15464 * linux-s390-low.c (num_regs): Remove.
15465 (s390_num_regs): Define.
15466 (s390_regmap): Renamed from regmap, made static.
15467 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15468 made static.
15469 (s390_cannot_store_register): Renamed from cannot_store_register,
15470 made static.
15471 (the_low_target): New.
15472 * linux-sh-low.c (num_regs): Remove.
15473 (sh_num_regs): Define.
15474 (sh_regmap): Renamed from regmap, made static.
15475 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15476 made static.
15477 (sh_cannot_store_register): Renamed from cannot_store_register,
15478 made static.
15479 (the_low_target): New.
15480 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15481 (the_low_target): New.
15482
154832002-04-09 Daniel Jacobowitz <drow@mvista.com>
15484
15485 * Makefile.in: Add stamp-h target.
15486 * configure.in: Create stamp-h.
15487 * configure: Regenerated.
15488
154892002-04-09 Daniel Jacobowitz <drow@mvista.com>
15490
15491 * inferiors.c: New file.
15492 * target.c: New file.
15493 * target.h: New file.
15494 * Makefile.in: Add target.o and inferiors.o. Update
15495 dependencies.
15496 * linux-low.c (inferior_pid): New static variable,
15497 moved from server.c.
15498 (linux_create_inferior): Renamed from create_inferior.
15499 Call add_inferior. Return 0 on success instead of a PID.
15500 (linux_attach): Renamed from myattach.
15501 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15502 (linux_thread_alive): Renamed from mythread_alive.
15503 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15504 child dies.
15505 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15506 (regsets_store_inferior_registers): Correct error message.
15507 Add missing ``return 0''.
15508 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15509 (linux_store_registers): Renamed from store_inferior_registers.
15510 (linux_read_memory): Renamed from read_inferior_memory.
15511 (linux_write_memory): Renamed from write_inferior_memory.
15512 (linux_target_ops): New structure.
15513 (initialize_low): Call set_target_ops ().
15514 * remote-utils.c (unhexify): New function.
15515 (hexify): New function.
15516 (input_interrupt): Send signals to ``signal_pid''.
15517 * server.c (inferior_pid): Remove.
15518 (start_inferior): Update create_inferior call.
15519 (attach_inferior): Call add_inferior.
15520 (handle_query): New function.
15521 (main): Call handle_query for `q' packets.
15522 * server.h: Include "target.h". Remove obsolete prototypes.
15523 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15524
155252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15526
15527 * Makefile.in: Add WARN_CFLAGS. Update configury
15528 dependencies.
15529 * configure.in: Check for <string.h>
15530 * configure: Regenerate.
15531 * config.in: Regenerate.
15532 * gdbreplay.c: Include needed system headers.
15533 (remote_open): Remove strchr prototype.
15534 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15535 * regcache.c (supply_register): Change buf argument to const void *.
15536 (supply_register_by_name): Likewise.
15537 (collect_register): Change buf argument to void *.
15538 (collect_register_by_name): Likewise.
15539 * regcache.h: Add missing prototypes.
15540 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15541 * server.c (handle_query): New function.
15542 (attached): New static variable, moved out of main.
15543 (main): Quiet longjmp clobber warnings.
15544 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15545 * utils.c (error): Remove NORETURN.
15546 (fatal): Likewise.