]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Share code updating gdb_target_obs
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
bc3b087d
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * inferiors.c (set_inferior_cwd): New function.
4 * server.c (handle_general_set): Handle QSetWorkingDir packet.
5 (handle_query): Inform that QSetWorkingDir is supported.
6 * win32-low.c (create_process): Pass the inferior's cwd to
7 CreateProcess.
8
d092c5a2
SDJ
92017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
10
11 * inferiors.c (current_inferior_cwd): New global variable.
12 (get_inferior_cwd): New function.
13 * inferiors.h (struct process_info) <cwd>: New field.
14
7da0a886
SDJ
152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
16
17 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
18 (OBS): Add gdb_tilde_expand.o.
19
289a6840
SM
202017-10-02 Simon Marchi <simon.marchi@ericsson.com>
21
22 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
23 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
24
256642e8
PA
252017-09-29 Pedro Alves <palves@redhat.com>
26
27 * ax.c (gdb_parse_agent_expr): Constify.
28 * ax.h (gdb_parse_agent_expr): Constify.
29 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
30 Constify.
31 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
32 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
33 * remote-utils.h (read_ptid): Constify.
34 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
35 (process_point_options, process_serial_event): Constify.
36 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
37 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
38 (cmd_qtbuffer): Constify.
39
5b9ca4d4
PA
402017-09-29 Pedro Alves <palves@redhat.com>
41
42 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
43 fails.
44
94c207e0
PA
452017-09-29 Pedro Alves <palves@redhat.com>
46
47 * linux-low.c (handle_extended_wait): Pass parent thread instead
48 of process to thread_db_notice_clone.
49 * linux-low.h (thread_db_notice_clone): Replace parent process
50 parameter with parent thread parameter.
51 * thread-db.c (find_one_thread): Add comment.
52 (thread_db_notice_clone): Replace parent process parameter with
53 parent thread parameter. Temporarily switch to the parent thread.
54
75352e28
SDJ
552017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
56
57 * gdbthread.h: Include "common-gdbthread.h".
58 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
59 "if" when validating the ptid.
60 * remote-utils.c: Include "gdbthread.h".
61 (prepare_resume_reply): Use "switch_to_thread".
62 * target.c (done_accessing_memory): Likewise.
63
ad339634
AA
642017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
65
66 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
67 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
68 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
69 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
70 s390x-gs-linux64-ipa.o to ipa_obj.
71 * linux-s390-low.c (HWCAP_S390_GS): New define.
72 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
73 New functions.
74 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
75 (s390_arch_setup): Check for guarded-storage support and choose
76 appropriate tdesc.
77 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
78 init_registers_s390x_gs_linux64.
79 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
80 enum value.
81 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
82 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
83
cc4d742f
SM
842017-09-22 Simon Marchi <simon.marchi@ericsson.com>
85
86 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
87
f6327dcb
KB
882017-09-21 Kevin Buettner <kevinb@redhat.com>
89
90 * linux-low.h (struct lwp_info): Add new field, thread_handle.
91 (thread_db_thread_handle): Declare.
92 * linux-low.c (linux_target_ops): Initialize thread_handle.
93 * server.c (handle_qxfer_threads_worker): Add support for
94 "handle" attribute.
95 * target.h (struct target_ops): Add new function pointer,
96 thread_handle.
97 (target_thread_handle): Define.
98 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
99 field in lwp.
100 (thread_db_thread_handle): New function.
101
86299109
KB
1022017-09-21 Kevin Buettner <kevinb@redhat.com>
103
104 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
105 * linux-low.h (thread_db_notice_clone): Declare.
106 * thread-db.c (thread_db_notice_clone): New function.
107
f557a88a
PA
1082017-09-21 Pedro Alves <palves@redhat.com>
109
110 * server.c (gdb_read_memory, handle_status, process_serial_event)
111 (handle_serial_event, handle_target_event): Adjust to
112 set_desired_thread prototype change.
113 * target.c (set_desired_thread): Remove 'use_general' parameter
114 and adjust.
115 * target.h (set_desired_thread): Remove 'use_general' parameter.
116
223ffa71
TT
1172017-09-20 Tom Tromey <tom@tromey.com>
118
119 * target.c (target_terminal::terminal_state): Define.
120 (target_terminal::init): Rename from target_terminal_init.
121 (target_terminal::inferior): Rename from
122 target_terminal_inferior.
123 (target_terminal::ours): Rename from target_terminal_ours.
124 (target_terminal::ours_for_output, target_terminal::info): New.
125
04fd3ba9
SM
1262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
127
128 * server.c (accumulate_file_name_length): Remove.
129 (emit_dll_description): Adjust to std::string change.
130 (handle_qxfer_libraries): Use std::string to hold document.
131
5e187554
SM
1322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
133
134 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
135 return type of xml_escape_text.
136 * server.c (emit_dll_description): Likewise.
137
1526853e
SM
1382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
139
140 * server.c (captured_main): Accept argument for --selftest.
141 Update run_tests call.
142 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
143 when registering selftests.
144
c4dfafab
SDJ
1452017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
146
147 * regcache.c (get_thread_regcache): Update code to use "std::vector"
148 instead of "VEC" for "target_desc.reg_defs".
149 (regcache_cpy): Likewise.
150 (registers_to_string): Likewise.
151 (registers_from_string): Likewise.
152 (find_regno): Likewise.
153 (supply_regblock): Likewise.
154 (regcache_raw_read_unsigned): Likewise.
155 * tdesc.c (init_target_desc): Likewise.
156 (tdesc_create_reg): Likewise.
157 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
158 (struct target_desc) <reg_defs>: Convert to "std::vector".
159 (target_desc): Do not initialize "reg_defs".
160 (~target_desc): Update code to use "std::vector" instead of "VEC"
161 for "target_desc.reg_defs".
162 (operator==): Likewise.
163
124aceb4
SM
1642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
165
166 * inferiors.h (thread_to_gdb_id): Remove.
167 * inferiors.c (thread_to_gdb_id): Remove.
168 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
169 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
170 lynx_store_registers, lynx_read_memory, lynx_write_memory):
171 Likewise.
172 * nto-low.c (nto_fetch_registers, nto_store_registers,
173 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
174
96cde54f
SM
1752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
176
177 * inferiors.h (gdb_id_to_thread_id): Remove.
178 * inferiors.c (gdb_id_to_thread_id): Remove.
179 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
180 removal. Move pid declaration closer to where it's used.
181
e8ca139e
SM
1822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
183
184 * server.c (handle_detach): New function.
185 (process_serial_event): Move code out, call handle_detach.
186
f8a4e119
SM
1872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
188
189 * server.c (require_running): Rename to ...
190 (require_running_or_return): ... this ...
191 (require_running_or_break): ... and this.
192 (handle_query, process_serial_event): Adjust.
193
0eb0a407
SM
1942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
195
196 * linux-low.c (linux_set_resume_request): Remove unused
197 variables.
198
785922a5
SM
1992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
200
201 * server.c (first_thread_of): Remove.
202 (process_serial_event): Replace usage of first_thread_of with
203 find_any_thread_of_pid.
204 * tracepoint.c (same_process_p): Remove.
205 (gdb_agent_about_to_close): Replace usage of same_process_p with
206 find_any_thread_of_pid.
207 * linux-x86-low.c (same_process_callback): Remove.
208 (x86_arch_setup_process_callback): Replace usage of
209 same_process_callback with find_any_thread_of_pid.
210 * thread-db.c (any_thread_of): Remove.
211 (switch_to_process): Replace usage of any_thread_of with
212 find_any_thread_of_pid.
213 * inferiors.c (thread_pid_matches_callback): Remove.
214 (find_thread_process): Adjust to use find_any_thread_of_pid.
215
a059f00c
SDJ
2162017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
217
218 * regcache.c (get_thread_regcache): Guard calls to "memset"
219 with "!VEC_empty".
220
cc397f3a
SDJ
2212017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
222
223 * linux-low.c (handle_extended_wait): Use
224 "allocate_target_description" instead of "XNEW".
225 * linux-x86-low.c (initialize_low_arch): Likewise.
226
22916b07
YQ
2272017-09-05 Yao Qi <yao.qi@linaro.org>
228
229 * configure.srv (srv_i386_regobj): Remove.
230 (srv_amd64_regobj): Remove.
231 (srv_regobj): Set it to "" for x86 non-linux targets.
232 * linux-x86-tdesc.c (i386_linux_read_description):
233 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
234 (init_registers_i386): Remove the declaration.
235 (tdesc_i386): Remove the declaration.
236 (lynx_i386_arch_setup): Call i386_create_target_description.
237 * nto-x86-low.c: Likewise.
238 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
239 [!__x86_64__]: include arch/i386.h.
240 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
241
38602d55
YQ
2422017-09-05 Yao Qi <yao.qi@linaro.org>
243
244 * configure.srv (srv_amd64_linux_xmlfiles): Remove
245 i386/amd64-XXX-linux from it.
246
44b886ff
YQ
2472017-09-05 Yao Qi <yao.qi@linaro.org>
248
249 * configure.srv: Empty srv_amd64_linux_regobj if $development is
250 false.
251 (ipa_amd64_linux_regobj): Remove.
252 (ipa_x32_linux_regobj): Remove.
253
b4570e4b
YQ
2542017-09-05 Yao Qi <yao.qi@linaro.org>
255
256 * Makefile.in (arch-amd64.o): New rule.
257 * configure.srv: Append arch-amd64.o.
258 * linux-amd64-ipa.c: Include common/x86-xstate.h.
259 (get_ipa_tdesc): Call amd64_linux_read_description.
260 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
261 and init_registers_amd64_XXX.
262 * linux-x86-low.c (x86_linux_read_description): Call
263 amd64_linux_read_description.
264 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
265 (initialize_low_arch): Don't call init_registers_x32_XXX and
266 init_registers_amd64_XXX.
267 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
268 and tdesc_amd64_XXX.
269 [__x86_64__] (amd64_tdesc_test): New function.
270 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
271 and init_registers_amd64_XXX.
272 * linux-x86-tdesc.c: Include arch/amd64.h.
273 (xcr0_to_tdesc_idx): New function.
274 (i386_linux_read_description): New function.
275 (amd64_get_ipa_tdesc_idx): New function.
276 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
277 (amd64_get_ipa_tdesc): Declare.
278
d1f28ea2
YQ
2792017-09-05 Yao Qi <yao.qi@linaro.org>
280
281 * configure.srv (srv_i386_linux_xmlfiles): Remove
282 i386/i386-XXX-linux.xml from it.
283
25a93583
YQ
2842017-09-05 Yao Qi <yao.qi@linaro.org>
285
286 * configure.srv: Set srv_i386_linux_regobj empty if $development
287 is false.
288 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
289 initialize_low_tdesc.
290 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
291 with #if initialize_low_tdesc.
292 * linux-x86-tdesc-selftest.c: New file.
293 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
294
5f035c07
YQ
2952017-09-05 Yao Qi <yao.qi@linaro.org>
296
297 * Makefile.in (arch-i386.o): New rule.
298 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
299 (x86_64-*-linux*): Likewise.
300 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
301 include arch/i386.h.
302 (i386_linux_read_description): Remove code and call
303 i386_create_target_description.
304 * tdesc.c (allocate_target_description): New function.
305 * tdesc.h (set_tdesc_architecture): Remove declaration.
306 (set_tdesc_osabi): Likewise.
307
0abe8a89
YQ
3082017-09-05 Yao Qi <yao.qi@linaro.org>
309
310 * linux-x86-tdesc.c: Don't include <inttypes.h>.
311 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
312 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
313 .xmltarget.
314 * server.c (get_features_xml): Call tdesc_get_features_xml.
315 * tdesc.c (set_tdesc_architecture): New function.
316 (set_tdesc_osabi): New function.
317 (tdesc_get_features_xml): New function.
318 (tdesc_create_feature): Add an argument.
319 * tdesc.h (struct target_desc) <features>: New field.
320 <arch, osabi>: New field.
321 (~target_desc): xfree features, arch, and osabi.
322 (target_desc::oerator==): Don't compare .xmltarget.
323 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
324 (set_tdesc_osabi): Likewise.
325 (tdesc_get_features_xml): Likewise.
326
0a188386
YQ
3272017-09-05 Yao Qi <yao.qi@linaro.org>
328
329 * linux-x86-tdesc.c: Include selftest.h.
330 (i386_tdesc_test): New function.
331 (initialize_low_tdesc): Call selftests::register_test.
332 * tdesc.h: Include regdef.h.
333 (target_desc): Override operator == and !=.
334
f49ff000
YQ
3352017-09-05 Yao Qi <yao.qi@linaro.org>
336
337 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
338 (ipa_obj): Likewise.
339 * linux-i386-ipa.c: Include common/x86-xstate.h
340 (get_ipa_tdesc): Call i386_linux_read_description.
341 (initialize_low_tracepoint): Don't call init_registers_XXX
342 functions, call initialize_low_tdesc instead.
343 * linux-x86-low.c (x86_linux_read_description): Call
344 i386_linux_read_description.
345 (initialize_low_arch): Don't call init_registers_i386_XXX
346 functions, call initialize_low_tdesc.
347 * linux-x86-tdesc.c: New file.
348 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
349 (i386_get_ipa_tdesc_idx): Declare.
350 (i386_get_ipa_tdesc): Declare.
351 (initialize_low_tdesc): Declare.
352
2b68ef2f
YQ
3532017-09-05 Yao Qi <yao.qi@linaro.org>
354
355 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
356 instead of 0.
357
f7000548
YQ
3582017-09-05 Yao Qi <yao.qi@linaro.org>
359
360 * Makefile.in (IPA_OBJS): Add vec-ipa.o
361 * regcache.c (get_thread_regcache): Use VEC_length.
362 (init_register_cache): Likewise.
363 (regcache_cpy): Likewise.
364 (registers_to_string): Iterate reg_defs via VEC_iterate.
365 (find_regno): Likewise.
366 (find_register_by_number): Use VEC_index.
367 (register_size): Call find_register_by_number.
368 (register_data): Call find_register_by_number.
369 (supply_regblock): Use VEC_length.
370 (regcache_raw_read_unsigned): Likewise.
371 * tdesc.c (init_target_desc): Iterate reg_defs via
372 VEC_iterate.
373 (default_description): Update initializer.
374 (copy_target_description): Don't update field num_registers.
375 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
376 <num_registers>: Remove.
377
50a421ac
SM
3782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
379
380 * Makefile.in (.SECONDARY): Define target.
381
23fdd69e
SM
3822017-09-03 Simon Marchi <simon.marchi@ericsson.com>
383
384 * linux-low.c (linux_wait_1): Adjust.
385 * server.c (queue_stop_reply_callback): Adjust.
386
0a2dde4a
SDJ
3872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
388
389 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
390 QEnvironmentUnset and QEnvironmentReset packets.
391 (handle_query): Inform remote that QEnvironmentHexEncoded,
392 QEnvironmentUnset and QEnvironmentReset are supported.
393
6afd337d
SM
3942017-08-25 Simon Marchi <simon.marchi@ericsson.com>
395
396 * inferiors.h (inferior_target_data): Rename to ...
397 (thread_target_data): ... this.
398 (inferior_regcache_data): Rename to ...
399 (thread_regcache_data): ... this.
400 (set_inferior_regcache_data): Rename to ...
401 (set_thread_regcache_data): ... this.
402 * inferiors.c (inferior_target_data): Rename to ...
403 (thread_target_data): ... this.
404 (inferior_regcache_data): Rename to ...
405 (thread_regcache_data): ... this.
406 (set_inferior_regcache_data): Rename to ...
407 (set_thread_regcache_data): ... this.
408 (free_one_thread): Update.
409 * linux-low.h (get_thread_lwp): Update.
410 * regcache.c (get_thread_regcache): Update.
411 (regcache_invalidate_thread): Update.
412 (free_register_cache_thread): Update.
413 * win32-i386-low.c (update_debug_registers_callback): Update.
414 (win32_get_current_dr): Update.
415 * win32-low.c (thread_rec): Update.
416 (delete_thread_info): Update.
417 (continue_one_thread): Update.
418 (suspend_one_thread): Update.
419
a160cc46
SM
4202017-08-24 Simon Marchi <simon.marchi@ericsson.com>
421
422 * inferiors.c (set_inferior_target_data): Remove.
423 * inferiors.h (set_inferior_target_data): Remove.
424
6d580b63
YQ
4252017-08-18 Yao Qi <yao.qi@linaro.org>
426
427 * Makefile.in (OBS): Add selftest.o.
428 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
429 * configure, config.in: Re-generated.
430 * server.c: Include common/sefltest.h.
431 (captured_main): Handle option --selftest.
432
f5a29eb0
YQ
4332017-08-09 Yao Qi <yao.qi@linaro.org>
434
435 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
436 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
437 i386-avx-mpx.o and i386-mmx.o.
438 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
439 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
440 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
441 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
442 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
443 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
444 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
445 i386/amd64-avx-mpx.xml.
446
57757c2f
YQ
4472017-08-09 Yao Qi <yao.qi@linaro.org>
448
449 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
450 and x32-avx-avx512.o.
451 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
452 i386/x32-avx-avx512.xml.
453
229d26fc
SM
4542017-07-26 Simon Marchi <simon.marchi@ericsson.com>
455
456 * tracepoint.h (enum class fast_tpoint_collect_result): New
457 enumeration.
458 (fast_tracepoint_collecting): Change return type to
459 fast_tpoint_collect_result.
460 * tracepoint.c (fast_tracepoint_collecting): Likewise.
461 * linux-low.h: Include tracepoint.h.
462 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
463 fast_tpoint_collect_result.
464 * linux-low.c (handle_tracepoints): Adjust.
465 (linux_fast_tracepoint_collecting): Change return type to
466 fast_tpoint_collect_result.
467 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
468 linux_wait_1, stuck_in_jump_pad_callback,
469 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
470 proceed_one_lwp): Adjust to type change.
471
2e1e43e1
YQ
4722017-07-10 Yao Qi <yao.qi@linaro.org>
473
474 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
475
adc764e7
YQ
4762017-06-29 Yao Qi <yao.qi@linaro.org>
477
478 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
479 Remove.
480 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
481
a206891a
SM
4822017-06-20 Simon Marchi <simon.marchi@ericsson.com>
483
484 * Makefile.in (IPA_OBJS): Sort and format one item per line.
485
9a6c7d9c
SDJ
4862017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
487
488 * linux-low.c (linux_create_inferior): Adjust code to access the
489 environment information via 'gdb_environ' class.
490 * lynx-low.c (lynx_create_inferior): Likewise.
491 * server.c (our_environ): Make it an instance of 'gdb_environ'.
492 (get_environ): Return a pointer to 'our_environ'.
493 (captured_main): Initialize 'our_environ'.
494 * server.h (get_environ): Adjust prototype.
495 * spu-low.c (spu_create_inferior): Adjust code to access the
496 environment information via 'gdb_environ' class.
497
ae3e2ccf
SM
4982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
499
500 * linux-low.c (linux_read_memory, linux_write_memory): Remove
501 usage of "register" keyword.
502
3e019bdc
SM
5032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
504
505 * configure: Re-generate.
506
8465943a
SM
5072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
508
509 * configure: Re-generate.
510
cf0dd6f0
SM
5112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
512
513 * Makefile.in (COMPILE.pre): Add "-x c++".
514
9845682b
SDJ
5152017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 * fork-child.c: Conditionally include <signal.h>.
518
aefd8b33
SDJ
5192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
520
521 * server.c (handle_general_set): Handle new packet
522 "QStartupWithShell".
523 (handle_query): Add "QStartupWithShell" to the list of supported
524 packets.
525 (gdbserver_usage): Add help text explaining the
526 new "--startup-with-shell" and "--no-startup-with-shell" CLI
527 options.
528 (captured_main): Recognize and act upon the presence of the new
529 CLI options.
530
2090129c
SDJ
5312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
532 Pedro Alves <palves@redhat.com>
533
534 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
535 * configure: Regenerate.
536 * configure.srv (srv_linux_obj): Add "fork-child.o" and
537 "fork-inferior.o".
538 (i[34567]86-*-lynxos*): Likewise.
539 (spu*-*-*): Likewise.
540 * fork-child.c: New file.
541 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
542 and "environ.h".
543 (linux_ptrace_fun): New function.
544 (linux_create_inferior): Adjust function prototype to reflect
545 change on "target.h". Adjust function code to use
546 "fork_inferior".
547 (linux_request_interrupt): Delete "signal_pid".
548 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
549 (lynx_ptrace_fun): New function.
550 (lynx_create_inferior): Adjust function prototype to reflect
551 change on "target.h". Adjust function code to use
552 "fork_inferior".
553 * nto-low.c (nto_create_inferior): Adjust function prototype and
554 code to reflect change on "target.h". Update comments.
555 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
556 "common-terminal.h" and "environ.h".
557 (terminal_fd): Moved to fork-child.c.
558 (old_foreground_pgrp): Likewise.
559 (restore_old_foreground_pgrp): Likewise.
560 (last_status): Make it global.
561 (last_ptid): Likewise.
562 (our_environ): New variable.
563 (startup_with_shell): Likewise.
564 (program_name): Likewise.
565 (program_argv): Rename to...
566 (program_args): ...this.
567 (wrapper_argv): New variable.
568 (start_inferior): Delete function.
569 (get_exec_wrapper): New function.
570 (get_exec_file): Likewise.
571 (get_environ): Likewise.
572 (prefork_hook): Likewise.
573 (post_fork_inferior): Likewise.
574 (postfork_hook): Likewise.
575 (postfork_child_hook): Likewise.
576 (handle_v_run): Update code to deal with arguments coming from the
577 remote host. Update calls from "start_inferior" to
578 "create_inferior".
579 (captured_main): Likewise. Initialize environment variable. Call
580 "have_job_control".
581 * server.h (post_fork_inferior): New prototype.
582 (get_environ): Likewise.
583 (last_status): Declare.
584 (last_ptid): Likewise.
585 (signal_pid): Likewise.
586 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
587 (spu_ptrace_fun): New function.
588 (spu_create_inferior): Adjust function prototype to reflect change
589 on "target.h". Adjust function code to use "fork_inferior".
590 * target.c (target_terminal_init): New function.
591 (target_terminal_inferior): Likewise.
592 (target_terminal_ours): Likewise.
593 * target.h: Include <vector>.
594 (struct target_ops) <create_inferior>: Update prototype.
595 (create_inferior): Update macro.
596 * utils.c (gdb_flush_out_err): New function.
597 * win32-low.c (win32_create_inferior): Adjust function prototype
598 and code to reflect change on "target.h".
599
043a4934
SDJ
6002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
601
602 * inferiors.c (switch_to_thread): New function.
603
15652511
SDJ
6042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
605
606 * Makefile.in (SFILE): Add "common/job-control.c".
607 (OBS): Add "job-control.o".
608
21ea5acd
SDJ
6092017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
610
611 * Makefile: Remove "@host_makefile_frag@".
612
e13cb306
PA
6132017-05-05 Pedro Alves <palves@redhat.com>
614
615 * configure: Regenerate.
616
c94fee56
SDJ
6172017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * configure: Regenerate.
620
a0ff9e1a
SM
6212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
622
623 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
624 software_single_step change of return type to
625 std::vector<CORE_ADDR>.
626 * linux-low.c (install_software_single_step_breakpoints):
627 Likewise.
628 * linux-low.h (install_software_single_step_breakpoints):
629 Likewise.
630
be628ab8
SDJ
6312017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
632
633 * remote-utils.c: Include "gdb_termios.h" instead of
634 "terminal.h".
635 * terminal.h: Delete file.
636
7c5ded6a
SDJ
6372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
638
639 * server.c: Include <vector>.
640 <program_argv, wrapper_argv>: Convert to std::vector.
641 (start_inferior): Rewrite function to use C++.
642 (handle_v_run): Likewise. Update code that calculates the argv
643 based on the vRun packet; use C++.
644 (captured_main): Likewise.
645
436252de
SM
6462017-04-06 Simon Marchi <simon.marchi@ericsson.com>
647
648 * server.c (handle_v_cont): Initialize thread_resume::thread
649 with null_ptid.
650
9bf2a700
PA
6512017-04-05 Pedro Alves <palves@redhat.com>
652
653 * configure: Regenerate.
654
a121b7c1
PA
6552017-04-05 Pedro Alves <palves@redhat.com>
656
657 * gdbreplay.c (sync_error): Constify.
658 * linux-x86-low.c (push_opcode): Constify.
659
21c8a587
PA
6602017-04-05 Pedro Alves <palves@redhat.com>
661
662 * win32-low.c (get_child_debug_event)
663 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
664 Report TARGET_WAITKIND_SPURIOUS instead.
665
fb32b4f7
PA
6662017-04-05 Pedro Alves <palves@redhat.com>
667
668 * remote-utils.c (remote_prepare, remote_open): Constify.
669 * remote-utils.h (remote_prepare, remote_open): Constify.
670 * server.c (captured_main): Constify 'port' handling.
671
65dd1e59
SM
6722017-04-04 Simon Marchi <simon.marchi@ericsson.com>
673
674 * Makefile.in (clean): Clear .deps.
675
8fa5b777
SM
6762017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * .gitignore: Remove generated files, replace with wildcard.
679 * (clean): Replace removal of generated files with wildcard.
680 (version.c): Replace with...
681 (version-generated.c): ...this.
682 (xml-builtin.c): Replace with...
683 (xml-builtin-generated.c): ...this.
684 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
685 (%.c: *regformats*): Replace with...
686 (%-generated.c: *regformats*): ...this.
687
a12e714b
MF
6882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
689
690 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
691 (xtensa_fill_gregset): Call collect_register_by_name for
692 threadptr register.
693 (xtensa_store_gregset): Call supply_register_by_name for
694 threadptr register.
695
1a09b50a
MF
6962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
697
698 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
699 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
700 (xtensa_store_gregset): Call supply_register for all registers in
701 a0_regnum..a0_regnum + C0_NREGS range.
702
1a01e7c6
SM
7032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
706 (ax-ipa.o: ax.c): Remove.
707 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
708 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
709 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
710 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
711 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
712
36bc18a8
SM
7132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
714
715 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
716 (print-utils-ipa.o: ../common/print-utils.c): Remove.
717 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
718 (errors-ipa.o: ../common/errors.c): Remove.
719 (format-ipa.o: ../common/format.c): Remove.
720 (common-utils-ipa.o: ../common/common-utils.c): Remove.
721
a8ebe3d5
SM
7222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
723
724 * Makefile.in (%-ipa.o: %.c): New rule.
725 (tracepoint-ipa.o: tracepoint.c): Remove.
726 (utils-ipa.o: utils.c): Remove.
727 (remote-utils-ipa.o: remote-utils.c): Remove.
728 (regcache-ipa.o: regcache.c): Remove.
729 (i386-linux-ipa.o: i386-linux.c): Remove.
730 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
731 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
732 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
733 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
734 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
735 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
736 (amd64-linux-ipa.o: amd64-linux.c): Remove.
737 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
738 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
739 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
740 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
741 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
742 (aarch64-ipa.o: aarch64.c): Remove.
743 (s390-linux32-ipa.o: s390-linux32.c): Remove.
744 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
745 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
746 (s390-linux64-ipa.o: s390-linux64.c): Remove.
747 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
748 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
749 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
750 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
751 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
752 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
753 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
754 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
755 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
756 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
757 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
758 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
759 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
760 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
761 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
762 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
763 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
764 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
765 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
766 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
767 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
768 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
769 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
770 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
771 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
772 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
773 (tdesc-ipa.o: tdesc.c): Remove.
774 (x32-linux-ipa.o: x32-linux.c): Remove.
775 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
776 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
777
50cfacb7
SM
7782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
779
780 * Makefile.in (%.o: ../arch/%.c): New rule.
781 (arm.o: ../arch/arm.c): Remove.
782 (arm-linux.o: ../arch/arm-linux.c): Remove.
783 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
784 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
785
c5a22423
SM
7862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
787
788 * Makefile.in (%.o: ../nat/%.c): New rule.
789 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
790 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
791 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
792 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
793 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
794 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
795 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
796 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
797 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
798 (linux-personality.o: ../nat/linux-personality.c): Remove.
799 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
800 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
801 (x86-linux.o: ../nat/x86-linux.c): Remove.
802 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
803 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
804
6bda016b
SM
8052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
806
807 * Makefile.in (%.o: ../common/%.c): New rule.
808 (signals.o: ../common/signals.c): Remove.
809 (print-utils.o: ../common/print-utils.c): Remove.
810 (rsp-low.o: ../common/rsp-low.c): Remove.
811 (common-utils.o: ../common/common-utils.c): Remove.
812 (posix-strerror.o: ../common/posix-strerror.c): Remove.
813 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
814 (vec.o: ../common/vec.c): Remove.
815 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
816 (xml-utils.o: ../common/xml-utils.c): Remove.
817 (ptid.o: ../common/ptid.c): Remove.
818 (buffer.o: ../common/buffer.c): Remove.
819 (format.o: ../common/format.c): Remove.
820 (filestuff.o: ../common/filestuff.c): Remove.
821 (agent.o: ../common/agent.c): Remove.
822 (errors.o: ../common/errors.c): Remove.
823 (environ.o: ../common/environ.c): Remove.
824 (common-debug.o: ../common/common-debug.c): Remove.
825 (cleanups.o: ../common/cleanups.c): Remove.
826 (common-exceptions.o: ../common/common-exceptions.c): Remove.
827 (fileio.o: ../common/fileio.c): Remove.
828 (common-regcache.o: ../common/common-regcache.c): Remove.
829 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
830 (new-op.o: ../common/new-op.c): Remove.
831 (btrace-common.o: ../common/btrace-common.c): Remove.
832
21122961
SM
8332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
834
835 * Makefile.in (%.o: ../target/%.c): New rule.
836 (waitstatus.o: ../target/waitstatus.c): Remove.
837
c362e621
SM
8382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
839
840 * Makefile.in
841 (%.c: ../regformats/%.dat,
842 (%.c: ../regformats/arm/%.dat,
843 (%.c: ../regformats/i386/%.dat,
844 (%.c: ../regformats/rs6000/%.dat): New rules.
845 (aarch64.c): Remove.
846 (reg-arm.c): Remove.
847 (arm-with-iwmmxt.c): Remove.
848 (arm-with-vfpv2.c): Remove.
849 (arm-with-vfpv3.c): Remove.
850 (arm-with-neon.c): Remove.
851 (reg-bfin.c): Remove.
852 (reg-cris.c): Remove.
853 (reg-crisv32.c): Remove.
854 (i386.c): Remove.
855 (i386-linux.c): Remove.
856 (i386-avx.c): Remove.
857 (i386-avx-linux.c): Remove.
858 (i386-avx-avx512.c): Remove.
859 (i386-avx-avx512-linux.c): Remove.
860 (i386-mpx.c): Remove.
861 (i386-mpx-linux.c): Remove.
862 (i386-avx-mpx-avx512-pku.c): Remove.
863 (i386-avx-mpx-avx512-pku-linux.c): Remove.
864 (i386-avx-mpx.c): Remove.
865 (i386-avx-mpx-linux.c): Remove.
866 (i386-mmx.c): Remove.
867 (i386-mmx-linux.c): Remove.
868 (reg-ia64.c): Remove.
869 (reg-m32r.c): Remove.
870 (reg-m68k.c): Remove.
871 (reg-cf.c): Remove.
872 (mips-linux.c): Remove.
873 (mips-dsp-linux.c): Remove.
874 (mips64-linux.c): Remove.
875 (mips64-dsp-linux.c): Remove.
876 (nios2-linux.c): Remove.
877 (powerpc-32.c): Remove.
878 (powerpc-32l.c): Remove.
879 (powerpc-altivec32l.c): Remove.
880 (powerpc-cell32l.c): Remove.
881 (powerpc-vsx32l.c): Remove.
882 (powerpc-isa205-32l.c): Remove.
883 (powerpc-isa205-altivec32l.c): Remove.
884 (powerpc-isa205-vsx32l.c): Remove.
885 (powerpc-e500l.c): Remove.
886 (powerpc-64l.c): Remove.
887 (powerpc-altivec64l.c): Remove.
888 (powerpc-cell64l.c): Remove.
889 (powerpc-vsx64l.c): Remove.
890 (powerpc-isa205-64l.c): Remove.
891 (powerpc-isa205-altivec64l.c): Remove.
892 (powerpc-isa205-vsx64l.c): Remove.
893 (s390-linux32.c): Remove.
894 (s390-linux32v1.c): Remove.
895 (s390-linux32v2.c): Remove.
896 (s390-linux64.c): Remove.
897 (s390-linux64v1.c): Remove.
898 (s390-linux64v2.c): Remove.
899 (s390-te-linux64.c): Remove.
900 (s390-vx-linux64.c): Remove.
901 (s390-tevx-linux64.c): Remove.
902 (s390x-linux64.c): Remove.
903 (s390x-linux64v1.c): Remove.
904 (s390x-linux64v2.c): Remove.
905 (s390x-te-linux64.c): Remove.
906 (s390x-vx-linux64.c): Remove.
907 (s390x-tevx-linux64.c): Remove.
908 (tic6x-c64xp-linux.c): Remove.
909 (tic6x-c64x-linux.c): Remove.
910 (tic6x-c62x-linux.c): Remove.
911 (reg-sh.c): Remove.
912 (reg-sparc64.c): Remove.
913 (reg-spu.c): Remove.
914 (amd64.c): Remove.
915 (amd64-linux.c): Remove.
916 (amd64-avx.c): Remove.
917 (amd64-avx-linux.c): Remove.
918 (amd64-avx-avx512.c): Remove.
919 (amd64-avx-avx512-linux.c): Remove.
920 (amd64-mpx.c): Remove.
921 (amd64-mpx-linux.c): Remove.
922 (amd64-avx-mpx-avx512-pku.c): Remove.
923 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
924 (amd64-avx-mpx.c): Remove.
925 (amd64-avx-mpx-linux.c): Remove.
926 (x32.c): Remove.
927 (x32-linux.c): Remove.
928 (x32-avx.c): Remove.
929 (x32-avx-linux.c): Remove.
930 (x32-avx-avx512.c): Remove.
931 (x32-avx-avx512-linux.c): Remove.
932 (reg-xtensa.c): Remove.
933 (reg-tilegx.c): Remove.
934 (reg-tilegx32.c): Remove.
935
1672e0d9
SDJ
9362017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
937
938 * Makefile.in (SFILES): Add "common/environ.c".
939 (OBJS): Add "common/environ.h".
940
239b6d10
WT
9412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
942
943 * configure.ac: Check if the fs_base and gs_base members of
944 `struct user_regs_struct' exist.
945 * config.in: Regenerated.
946 * configure: Likewise.
947
694b382c
AT
9482017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
949
950 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
951 target_read_memory.
952 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
953 (get_next_pcs_syscall_next_pc): Likewise.
954
7dc53023
LM
9552016-12-23 Luis Machado <lgustavo@codesourcery.com>
956
957 * win32-i386-low.c: Fix incorrect reference to a couple source files.
958 * nto-x86-low.c: Likewise.
959
ad02e4fe
SM
9602016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
961
962 * Makefile.in: Include disable-implicit-rules.mk.
963
dcb07cfa
PA
9642016-11-23 Pedro Alves <palves@redhat.com>
965
966 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
967 (debug_vprintf): Use std::chrono::steady_clock instead of
968 gettimeofday. Use '.' instead of ':'.
969 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
970 (get_timestamp): Use std::chrono::steady_clock instead of
971 gettimeofday.
972
8629c02c
SM
9732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
974
975 * Makefile.in: Fix whitespace formatting.
976
b593ecca
SM
9772016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
978
979 * Makefile.in (SFILES, OBS): Flatten list and order
980 alphabetically.
981
9986ba08
PA
9822016-11-23 Pedro Alves <palves@redhat.com>
983
984 * event-loop.c (handle_file_event): Use warning.
985 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
986 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
987 Use warning.
988
4eefa7bc
PA
9892016-11-23 Pedro Alves <palves@redhat.com>
990
991 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
992 output.
993 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
994 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
995 debug_printf and debug_flush for debug output.
996 * server.c (handle_general_set): Likewise.
997 * thread-db.c (try_thread_db_load): Use debug_printf for debug
998 output.
999
5443506e
SM
10002016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1001
1002 * Makefile.in (.c.o): Replace rule with ...
1003 (%.o: %.c): ... this one.
1004
3b165252
SM
10052016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1006
1007 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1008 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1009 make.
1010 * configure.ac: Remove checks for the make program.
1011 * configure: Re-generate.
1012
0bcda685
PA
10132016-10-28 Pedro Alves <palves@redhat.com>
1014
1015 * Makefile.in (CXX_DIALECT): Get from configure.
1016 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1017 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1018 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1019 * config.in: Regenerate.
1020 * configure: Regenerate.
1021
c3805894
YQ
10222016-10-27 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-low.c (linux_supports_range_stepping): Return true if
1025 can_software_single_step return true.
1026
89342618
YQ
10272016-10-27 Yao Qi <yao.qi@linaro.org>
1028
1029 * inferiors.c (find_inferior_in_random): New function.
1030 * inferiors.h (find_inferior_in_random): Declare.
1031 * linux-low.c (linux_wait_for_event_filtered): Call
1032 find_inferior_in_random instead of find_inferior.
1033
e3652c84
YQ
10342016-10-27 Yao Qi <yao.qi@linaro.org>
1035
1036 * linux-low.c (linux_wait_1): If single-step breakpoints are
1037 inserted, remove them.
1038
5a04c4cf
PA
10392016-10-26 Pedro Alves <palves@redhat.com>
1040
1041 * linux-low.c (handle_extended_wait): Link parent/child fork
1042 threads.
1043 (linux_wait_1): Unlink them.
1044 (linux_set_resume_request): Ignore resume requests for
1045 already-resumed and unhandled fork child threads.
1046 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1047 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1048 New functions.
1049 (handle_v_requests) <vCont>: Don't call require_running.
1050 * server.h (in_queued_stop_replies): New declaration.
1051
cb93dc7f
YQ
10522016-10-24 Yao Qi <yao.qi@linaro.org>
1053
1054 PR server/20733
1055 * linux-aarch64-low.c (append_insns): Cast the return value to
1056 'uint32_t *'.
1057
a1078bea
YQ
10582016-10-10 Yao Qi <yao.qi@linaro.org>
1059
1060 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1061
1fb77080
SDJ
10622016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1063
1064 * target.c (target_supports_multi_process): New function, moved
1065 from...
1066 * target.h (target_supports_multi_process): ... here. Remove
1067 macro.
1068
39b5a3b9
TT
10692016-10-05 Tom Tromey <tom@tromey.com>
1070
1071 PR remote/20655:
1072 * tracepoint.c (handle_tracepoint_bkpts): Check
1073 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1074
c1d0b70a
YQ
10752016-10-05 Yao Qi <yao.qi@linaro.org>
1076
1077 * configure.srv: Update the path of arm-*.xml files.
1078
0a69eedb
YQ
10792016-10-05 Terry Guo <terry.guo@arm.com>
1080 Yao Qi <yao.qi@linaro.org>
1081
1082 * Makefile.in: Adjust the path of rules.
1083 * configure.srv: Update the path of xml files.
1084 * regformats/arm-with-iwmmxt.dat: Regenerated.
1085 * regformats/arm-with-neon.dat: Likewise.
1086 * regformats/arm-with-vfpv2.dat: Likewise.
1087 * regformats/arm-with-vfpv3.dat Likewise.
1088
17e16485
YQ
10892016-09-30 Yao Qi <yao.qi@linaro.org>
1090
1091 PR gdbserver/20627
1092 * target.c (target_stop_and_wait): Don't call
1093 target_continue_no_signal, use resume_stop instead.
1094
edeeb602
YQ
10952016-09-26 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-low.c (linux_wait_1): Call debug_exit.
1098
503b1c39
PA
10992016-09-23 Pedro Alves <palves@redhat.com>
1100
1101 * Makefile.in (SFILES): Add common/new-op.c.
1102 (OBS): Add common/new-op.o.
1103 (new-op.o): New rule.
1104
74172ecf
SM
11052016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1106
1107 * .gitinore: Ignore more files.
1108
fc6cda2e
YQ
11092016-09-21 Yao Qi <yao.qi@linaro.org>
1110
1111 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1112 23.
1113
bc1e6c81
SDJ
11142016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1115
1116 * server.c (start_inferior): Call target_mourn_inferior instead of
1117 mourn_inferior; pass ptid_t argument to it.
1118 (resume): Likewise.
1119 (handle_target_event): Likewise.
1120 * target.c (target_mourn_inferior): New function.
1121 * target.h (mourn_inferior): Delete macro.
1122
0e00e962
AA
11232016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1124
1125 * linux-low.c (lwp_is_stepping): New function.
1126
1d8cb77d
CL
11272016-09-06 Carl Love <cel@us.ibm.com>
1128
1129 * server.c (start_inferior): Fixed comment, requested comment change
1130 didn't get updated correctly. Removed reference to ptrace () call as
1131 it is only true on Linux systems.
1132
7313bced
CL
11332016-09-06 Carl Love <cel@us.ibm.com>
1134
1135 * server.c (start_inferior): Do not call
1136 function target_post_create_inferior () if the
1137 inferior process has already exited.
1138
cf6de44d
PA
11392016-09-05 Pedro Alves <palves@redhat.com>
1140
1141 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1142 (COMPILE.pre, CC_LD): Use CXX directly.
1143 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1144 * acinclude.m4: Don't include build-with-cxx.m4.
1145 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1146 * configure: Regenerate.
1147
c1da6748
AT
11482016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1149
1150 PR gdb/19495
1151 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1152 call writing data to own_buf.
1153
f2b9e3df
SDJ
11542016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1155
1156 * target.c (mywait): Call target_wait instead of
1157 the_target->wait.
1158 (target_wait): New function.
1159
049a8570
SDJ
11602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1161
1162 * server.c (start_inferior): New variable 'ptid'. Replace calls
1163 to the_target->resume by target_continue{,_no_signal}, depending
1164 on the case.
1165 * target.c (target_stop_and_wait): Call target_continue_no_signal
1166 instead of the_target->resume.
1167 (target_continue): New function.
1168
3aa5cfa0
AT
11692016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1170
1171 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1172
754653a7
AZ
11732016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1174
1175 PR server/20491
1176 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1177 ps_prochandle.
1178 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1179 * linux-arm-low.c (ps_get_thread_area): Likewise.
1180 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1181 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1182 * linux-mips-low.c (ps_get_thread_area): Likewise.
1183 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1184 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1185 * linux-x86-low.c (ps_get_thread_area): Likewise.
1186 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1187
ed036b40
PA
11882016-08-19 Pedro Alves <palves@redhat.com>
1189
1190 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1191
c8ef42ee
PA
11922016-08-19 Pedro Alves <palves@redhat.com>
1193
1194 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1195 comment. Use memcpy instead of casting through unsigned long.
1196
9c235a72
PA
11972016-08-19 Pedro Alves <palves@redhat.com>
1198
1199 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1200 allocating around 0x80000000.
1201
201506da
PA
12022016-08-19 Pedro Alves <palves@redhat.com>
1203
1204 PR gdb/20415
1205 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1206 (x32-avx512-linux-ipa.o): New rules.
1207 * configure.ac (x86_64-*-linux*): New x32 check.
1208 * configure.srv (ipa_x32_linux_regobj): New.
1209 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1210 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1211 descriptions.
1212 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1213 descriptions.
1214 * configure: Regenerate.
1215
f348d89a
PA
12162016-08-09 Pedro Alves <palves@redhat.com>
1217
1218 PR gdb/18653
1219 * Makefile.in (OBS): Add signals-state-save-restore.o.
1220 (signals-state-save-restore.o): New rule.
1221 * config.in: Regenerate.
1222 * configure: Regenerate.
1223 * linux-low.c: Include "signals-state-save-restore.h".
1224 (linux_create_inferior): Call
1225 restore_original_signals_state.
1226 * server.c: Include "dispositions-save-restore.h".
1227 (captured_main): Call save_original_signals_state.
1228
1baf5149
PA
12292016-08-05 Pedro Alves <palves@redhat.com>
1230
1231 * configure: Regenerate.
1232
fcd4a73d
YQ
12332016-08-04 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-low.c (regsets_fetch_inferior_registers): Check
1236 errno is ESRCH or not.
1237
979659d0
YQ
12382016-08-02 Yao Qi <yao.qi@linaro.org>
1239
1240 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1241 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1242 (thread_db_load_search): Update.
1243 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1244 td_ta_set_event and td_ta_event_getmsg.
1245
6598661d
PA
12462016-07-26 Pedro Alves <palves@redhat.com>
1247
1248 PR server/20414
1249 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1250 of unsigned long for 64-bit registers and use uint32_t instead of
1251 unsigned int for 32-bit registers.
1252
9cf12d57
PA
12532016-07-26 Pedro Alves <palves@redhat.com>
1254
1255 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1256 to 'ptrace'.
1257
305450ed
TT
12582016-07-21 Tom Tromey <tom@tromey.com>
1259
1260 * configure: Rebuild.
1261
2583da7c
YQ
12622016-07-21 Yao Qi <yao.qi@linaro.org>
1263
1264 * mem-break.c (find_gdb_breakpoint): Cast bp to
1265 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1266
21536b36
YQ
12672016-07-21 Yao Qi <yao.qi@linaro.org>
1268
1269 * server.c (handle_v_requests): Support s and S actions
1270 if target_supports_software_single_step return true.
1271
8901d193
YQ
12722016-07-21 Yao Qi <yao.qi@linaro.org>
1273
1274 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1275 is resume_step, call maybe_hw_step.
1276 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1277 and unstop them.
1278 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1279 breakpoints or not.
1280 (proceed_one_lwp): If resume request is resume_step, install
1281 reinsert breakpoints and call maybe_hw_step.
1282
0e9a339e
YQ
12832016-07-21 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-low.c (proceed_one_lwp): Declare.
1286 (linux_resume_one_thread): Remove local variable 'step'.
1287 Lift code enqueue signal. Call proceed_one_lwp instead of
1288 linux_resume_one_lwp.
1289
4281b351
YQ
12902016-07-21 Yao Qi <yao.qi@linaro.org>
1291
1292 * linux-low.c (linux_resume_one_thread): Call
1293 enqueue_pending_signal.
1294
984a2c04
YQ
12952016-07-21 Yao Qi <yao.qi@linaro.org>
1296
1297 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1298 * inferiors.c (do_restore_current_thread_cleanup): New function.
1299 (make_cleanup_restore_current_thread): Likewise.
1300 * linux-low.c (install_software_single_step_breakpoints): Call
1301 make_cleanup_restore_current_thread. Switch current_thread to
1302 thread.
1303
bec903c9
YQ
13042016-07-21 Yao Qi <yao.qi@linaro.org>
1305
1306 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1307 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1308 (clone_one_breakpoint): Likewise.
1309 (delete_reinsert_breakpoints): Change parameter to thread.
1310 Callers updated.
1311 (has_reinsert_breakpoints): Likewise.
1312 (uninsert_reinsert_breakpoints): Likewise.
1313 (reinsert_reinsert_breakpoints): Likewise.
1314 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1315 (delete_reinsert_breakpoints): Likewise.
1316 (reinsert_reinsert_breakpoints): Likewise.
1317 (uninsert_reinsert_breakpoints): Likewise.
1318 (has_reinsert_breakpoints): Likewise.
1319
63c40ec7
YQ
13202016-07-21 Yao Qi <yao.qi@linaro.org>
1321
1322 * inferiors.c (get_thread_process): Make parameter const.
1323 * inferiors.h (get_thread_process): Update declaration.
1324 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1325 Add new parameters child_thread and parent_thread. Callers
1326 updated.
1327 * mem-break.h (clone_all_breakpoints): Update declaration.
1328
9aa76cd0
YQ
13292016-07-21 Yao Qi <yao.qi@linaro.org>
1330
1331 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1332 <command_list, handler>: Remove.
1333 (struct gdb_breakpoint): New.
1334 (struct other_breakpoint): New.
1335 (struct reinsert_breakpoint): New.
1336 (is_gdb_breakpoint): New function.
1337 (any_persistent_commands): Update command_list if
1338 is_gdb_breakpoint returns true.
1339 (set_breakpoint): Create breakpoints according to their types.
1340 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1341 (set_gdb_breakpoint_1): Likewise.
1342 (set_gdb_breakpoint): Likewise.
1343 (clear_breakpoint_conditions): Change parameter type to
1344 'struct gdb_breakpoint *'.
1345 (clear_breakpoint_commands): Likewise.
1346 (clear_breakpoint_conditions_and_commands): Likewise.
1347 (add_condition_to_breakpoint): Likewise.
1348 (add_breakpoint_condition): Likewise.
1349 (add_commands_to_breakpoint): Likewise.
1350 (check_breakpoints): Check other_breakpoint.
1351 (clone_one_breakpoint): Clone breakpopint according to its type.
1352 * mem-break.h (struct gdb_breakpoint): Declare.
1353 (set_gdb_breakpoint): Update declaration.
1354 (clear_breakpoint_conditions_and_commands): Likewise.
1355 (add_breakpoint_condition): Likewise.
1356 (add_breakpoint_commands): Likewise.
1357 * server.c (process_point_options): Change parameter type to
1358 'struct gdb_breakpoint *'.
1359
811f8301
YQ
13602016-07-21 Yao Qi <yao.qi@linaro.org>
1361
1362 * mem-break.c (set_breakpoint_at): Rename it to ...
1363 (set_breakpoint_type_at): ... it.
1364 (set_breakpoint_at): Call set_breakpoint_type_at.
1365 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1366 * mem-break.h (set_breakpoint_at): Update comments.
1367
b1c51e36
CLT
13682016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1369
1370 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1371 to buf parameter.
1372 (nios2_store_gregset): Likewise.
1373
ced2dffb
PA
13742016-07-01 Pedro Alves <palves@redhat.com>
1375 Antoine Tremblay <antoine.tremblay@ericsson.com>
1376
1377 * linux-low.c: Change interface to take the target lwp_info
1378 pointer directly and return void. Handle detaching from a zombie
1379 thread.
1380 (linux_detach_lwp_callback): New function.
1381 (linux_detach): Detach from the leader thread after detaching from
1382 the clone threads.
1383
2ac09a5b
YQ
13842016-06-28 Yao Qi <yao.qi@linaro.org>
1385
1386 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1387 for variable new_offset.
1388 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1389 (aarch64_ftrace_insn_reloc_cb): Likewise.
1390 (aarch64_ftrace_insn_reloc_tb): Likewise.
1391 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1392 PRIx64 instead of PRIx32.
1393
79e7fd4f
YQ
13942016-06-28 Yao Qi <yao.qi@linaro.org>
1395
1396 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1397 (the_low_target): Install arm_get_syscall_trapinfo.
1398
061fc021
YQ
13992016-06-28 Yao Qi <yao.qi@linaro.org>
1400
1401 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1402 function.
1403 (the_low_target): Install aarch64_get_syscall_trapinfo.
1404
4cc32bec
YQ
14052016-06-28 Yao Qi <yao.qi@linaro.org>
1406
1407 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1408 Callers updated.
1409 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1410 Remove parameter sysno.
1411 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1412 sysret.
1413
782c1122
AA
14142016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1415
1416 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1417 (s390_emit_ne_goto): Likewise.
1418 (s390_emit_lt_goto): Likewise.
1419 (s390_emit_le_goto): Likewise.
1420 (s390_emit_gt_goto): Likewise.
1421 (s390_emit_ge_goto): Likewise.
1422 (s390x_emit_eq_goto): Likewise.
1423 (s390x_emit_ne_goto): Likewise.
1424 (s390x_emit_lt_goto): Likewise.
1425 (s390x_emit_le_goto): Likewise.
1426 (s390x_emit_gt_goto): Likewise.
1427 (s390x_emit_ge_goto): Likewise.
1428 (s390_emit_ops_impl): Mark variable static.
1429 (s390x_emit_ops): Likewise.
1430
2e7b624b
YQ
14312016-06-17 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-low.c (handle_extended_wait): Call
1434 uninsert_reinsert_breakpoints for the parent process. Remove
1435 reinsert breakpoints from the child process. Reinsert them to
1436 the parent process when vfork is done.
1437 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1438 (reinsert_reinsert_breakpoints): New function.
1439 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1440 (reinsert_reinsert_breakpoints): Declare.
1441
8a81c5d7
YQ
14422016-06-17 Yao Qi <yao.qi@linaro.org>
1443
1444 * linux-low.c (handle_extended_wait): If the parent is doing
1445 step-over, remove the reinsert breakpoints from the forked child.
1446
f50bf8e5
YQ
14472016-06-17 Yao Qi <yao.qi@linaro.org>
1448
1449 * linux-low.c (unsuspend_all_lwps): Declare.
1450 (linux_low_filter_event): If thread exited, call finish_step_over.
1451 If step-over is finished, unsuspend other threads.
1452
8376a3cb
YQ
14532016-06-17 Yao Qi <yao.qi@linaro.org>
1454
1455 * linux-low.c (linux_resume_one_lwp_throw): Assert
1456 has_reinsert_breakpoints returns false.
1457 * mem-break.c (delete_disabled_breakpoints): Assert
1458 bp type isn't reinsert_breakpoint.
1459
f79b145d
YQ
14602016-06-17 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-low.c (maybe_hw_step): New function.
1463 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1464 (finish_step_over): Switch current_thread to lwp temporarily,
1465 and assert has_reinsert_breakpoints returns true.
1466 (proceed_one_lwp): Call maybe_hw_step.
1467 * mem-break.c (has_reinsert_breakpoints): New function.
1468 * mem-break.h (has_reinsert_breakpoints): Declare.
1469
0ae534d2
JT
14702016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1471
1472 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1473
fcdad592
YQ
14742016-05-17 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1477 instead of find_inferior.
1478
9e784964
YQ
14792016-05-05 Yao Qi <yao.qi@linaro.org>
1480
1481 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1482 Initialize res to zero.
1483
cf2ebb6e
YQ
14842016-05-05 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1487 to uint32_t.
1488
c1aebf87
UW
14892016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1490
1491 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1492 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1493 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1494
35fd2deb 14952016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1496 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1497
1498 * tracepoint.c (write_inferior_int8): New function.
1499 (cmd_qtenable_disable): Write enable flag using
1500 write_inferior_int8.
1501
484b3c32
YQ
15022016-04-25 Yao Qi <yao.qi@linaro.org>
1503
1504 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1505 (need_step_over_p): Return zero if the LWP has pending signals
1506 can be delivered on software single step target.
1507
85ba7d86
YQ
15082016-04-25 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1511 return instead of error.
1512
3539aa13
YQ
15132016-04-22 Yao Qi <yao.qi@linaro.org>
1514
1515 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1516 to 23.
1517
5b061e98
YQ
15182016-04-22 Yao Qi <yao.qi@linaro.org>
1519
1520 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1521 signal when stepping over breakpoint with software single
1522 step.
1523
3451269c
PA
15242016-04-21 Pedro Alves <palves@redhat.com>
1525
1526 * linux-s390-low.c (s390_collect_ptrace_register)
1527 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1528 add casts.
1529 (s390_check_regset): Use void * instead of gdb_byte *.
1530
a2358508
PA
15312016-04-20 Pedro Alves <palves@redhat.com>
1532
1533 * configure: Renegerate.
1534
6885166d
YQ
15352016-04-20 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1538 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1539 number 16.
1540 (arm_store_gregset): Likewise.
1541
2b863f51
WT
15422016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1543
1544 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1545 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1546 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1547 (amd64-avx-mpx-linux.c): New rules.
1548 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1549 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1550 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1551 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1552 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1553 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1554 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1555 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1557 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1558 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1559 * linux-x86-low.c (x86_linux_read_description): Add case for
1560 X86_XSTATE_AVX_MPX_MASK.
1561 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1562 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1563 init_registers_i386_avx_mpx_linux.
1564 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1565 (initialize_low_tracepoint): Call
1566 init_registers_i386_avx_mpx_linux.
1567 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1568 (initialize_low_tracepoint): Call
1569 init_registers_amd64_avx_mpx_linux.
1570 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1571 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1572 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1573 declarations.
1574
9b30624b
PA
15752016-04-18 Pedro Alves <palves@redhat.com>
1576
1577 * configure: Regenerate.
1578
45e3745e
AT
15792016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1580
1581 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1582 (aarch64_emit_sub): Likewise.
1583
2afc13ff
PA
15842016-04-12 Pedro Alves <palves@redhat.com>
1585
1586 * utils.c (prepare_to_throw_exception): Delete.
1587
6e774b13
SM
15882016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1591
4dca19f8
MK
15922016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1593
1594 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1595
d0a9981f
MK
15962016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1597
1598 * linux-aarch64-ipa.c: Add <elf.h> include.
1599 * linux-ppc-ipa.c: Add <elf.h> include.
1600 * linux-s390-ipa.c: Add <elf.h> include.
1601
252db07e
MK
16022016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1603
1604 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1605 (get_raw_reg_ptr): Likewise.
1606 (get_trace_state_variable_value_ptr): Likewise.
1607 (set_trace_state_variable_value_ptr): Likewise.
1608 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1609 char *.
1610
14e2b6d9
MK
16112016-03-31 Wei-cheng Wang <cole945@gmail.com>
1612 Marcin Kościelnicki <koriakin@0x04.net>
1613
1614 PR/17221
1615 * linux-ppc-low.c (emit_insns): New function.
1616 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1617 (ppc_emit_prologue): New function.
1618 (ppc_emit_epilogue): New function.
1619 (ppc_emit_add): New function.
1620 (ppc_emit_sub): New function.
1621 (ppc_emit_mul): New function.
1622 (ppc_emit_lsh): New function.
1623 (ppc_emit_rsh_signed): New function.
1624 (ppc_emit_rsh_unsigned): New function.
1625 (ppc_emit_ext): New function.
1626 (ppc_emit_zero_ext): New function.
1627 (ppc_emit_log_not): New function.
1628 (ppc_emit_bit_and): New function.
1629 (ppc_emit_bit_or): New function.
1630 (ppc_emit_bit_xor): New function.
1631 (ppc_emit_bit_not): New function.
1632 (ppc_emit_equal): New function.
1633 (ppc_emit_less_signed): New function.
1634 (ppc_emit_less_unsigned): New function.
1635 (ppc_emit_ref): New function.
1636 (ppc_emit_const): New function.
1637 (ppc_emit_reg): New function.
1638 (ppc_emit_pop): New function.
1639 (ppc_emit_stack_flush): New function.
1640 (ppc_emit_swap): New function.
1641 (ppc_emit_stack_adjust): New function.
1642 (ppc_emit_call): New function.
1643 (ppc_emit_int_call_1): New function.
1644 (ppc_emit_void_call_2): New function.
1645 (ppc_emit_if_goto): New function.
1646 (ppc_emit_goto): New function.
1647 (ppc_emit_eq_goto): New function.
1648 (ppc_emit_ne_goto): New function.
1649 (ppc_emit_lt_goto): New function.
1650 (ppc_emit_le_goto): New function.
1651 (ppc_emit_gt_goto): New function.
1652 (ppc_emit_ge_goto): New function.
1653 (ppc_write_goto_address): New function.
1654 (ppc_emit_ops_impl): New static variable.
1655 (ppc64v1_emit_prologue): New function.
1656 (ppc64v2_emit_prologue): New function.
1657 (ppc64_emit_epilogue): New function.
1658 (ppc64_emit_add): New function.
1659 (ppc64_emit_sub): New function.
1660 (ppc64_emit_mul): New function.
1661 (ppc64_emit_lsh): New function.
1662 (ppc64_emit_rsh_signed): New function.
1663 (ppc64_emit_rsh_unsigned): New function.
1664 (ppc64_emit_ext): New function.
1665 (ppc64_emit_zero_ext): New function.
1666 (ppc64_emit_log_not): New function.
1667 (ppc64_emit_bit_and): New function.
1668 (ppc64_emit_bit_or): New function.
1669 (ppc64_emit_bit_xor): New function.
1670 (ppc64_emit_bit_not): New function.
1671 (ppc64_emit_equal): New function.
1672 (ppc64_emit_less_signed): New function.
1673 (ppc64_emit_less_unsigned): New function.
1674 (ppc64_emit_ref): New function.
1675 (ppc64_emit_const): New function.
1676 (ppc64v1_emit_reg): New function.
1677 (ppc64v2_emit_reg): New function.
1678 (ppc64_emit_pop): New function.
1679 (ppc64_emit_stack_flush): New function.
1680 (ppc64_emit_swap): New function.
1681 (ppc64v1_emit_call): New function.
1682 (ppc64v2_emit_call): New function.
1683 (ppc64v1_emit_int_call_1): New function.
1684 (ppc64v2_emit_int_call_1): New function.
1685 (ppc64v1_emit_void_call_2): New function.
1686 (ppc64v2_emit_void_call_2): New function.
1687 (ppc64_emit_if_goto): New function.
1688 (ppc64_emit_eq_goto): New function.
1689 (ppc64_emit_ne_goto): New function.
1690 (ppc64_emit_lt_goto): New function.
1691 (ppc64_emit_le_goto): New function.
1692 (ppc64_emit_gt_goto): New function.
1693 (ppc64_emit_ge_goto): New function.
1694 (ppc64v1_emit_ops_impl): New static variable.
1695 (ppc64v2_emit_ops_impl): New static variable.
1696 (ppc_emit_ops): New function.
1697 (linux_low_target): Wire in ppc_emit_ops.
1698
a2174ba4
MK
16992016-03-31 Wei-cheng Wang <cole945@gmail.com>
1700 Marcin Kościelnicki <koriakin@0x04.net>
1701
1702 PR/17221
1703 * Makefile.in: Add powerpc-*-ipa.o
1704 * configure.srv: Add ipa_obj for powerpc*-linux.
1705 * linux-ppc-ipa.c: New file.
1706 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1707 includes.
1708 (PPC_FIELD): New macro.
1709 (PPC_SEXT): New macro.
1710 (PPC_OP6): New macro.
1711 (PPC_BO): New macro.
1712 (PPC_LI): New macro.
1713 (PPC_BD): New macro.
1714 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1715 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1716 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1717 (ppc_get_thread_area): New function.
1718 (is_elfv2_inferior): New function.
1719 (gen_ds_form): New function.
1720 (GEN_STD): New macro.
1721 (GEN_STDU): New macro.
1722 (GEN_LD): New macro.
1723 (GEN_LDU): New macro.
1724 (gen_d_form): New function.
1725 (GEN_ADDI): New macro.
1726 (GEN_ADDIS): New macro.
1727 (GEN_LI): New macro.
1728 (GEN_LIS): New macro.
1729 (GEN_ORI): New macro.
1730 (GEN_ORIS): New macro.
1731 (GEN_LWZ): New macro.
1732 (GEN_STW): New macro.
1733 (GEN_STWU): New macro.
1734 (gen_xfx_form): New function.
1735 (GEN_MFSPR): New macro.
1736 (GEN_MTSPR): New macro.
1737 (GEN_MFCR): New macro.
1738 (GEN_MTCR): New macro.
1739 (GEN_SYNC): New macro.
1740 (GEN_LWSYNC): New macro.
1741 (gen_x_form): New function.
1742 (GEN_OR): New macro.
1743 (GEN_MR): New macro.
1744 (GEN_LWARX): New macro.
1745 (GEN_STWCX): New macro.
1746 (GEN_CMPW): New macro.
1747 (gen_md_form): New function.
1748 (GEN_RLDICL): New macro.
1749 (GEN_RLDICR): New macro.
1750 (gen_i_form): New function.
1751 (GEN_B): New macro.
1752 (GEN_BL): New macro.
1753 (gen_b_form): New function.
1754 (GEN_BNE): New macro.
1755 (GEN_LOAD): New macro.
1756 (GEN_STORE): New macro.
1757 (gen_limm): New function.
1758 (gen_atomic_xchg): New function.
1759 (gen_call): New function.
1760 (ppc_relocate_instruction): New function.
1761 (ppc_install_fast_tracepoint_jump_pad): New function.
1762 (ppc_get_min_fast_tracepoint_insn_len): New function.
1763 (ppc_get_ipa_tdesc_idx): New function.
1764 (the_low_target): Wire in the new functions.
1765 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1766 tdescs.
1767 * linux-ppc-tdesc.h: New file.
1768
a13c4696
MK
17692016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1770
1771 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1772 (alloc_jump_pad_buffer): New function.
1773 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1774 (alloc_jump_pad_buffer): New function.
1775 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1776 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1777 (alloc_jump_pad_buffer): New function.
1778 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1779 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1780 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1781 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1782
1cda1512
MK
17832016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1784
1785 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1786 * linux-amd64-ipa.c: Likewise.
1787 * linux-i386-ipa.c: Likewise.
1788 * linux-s390-ipa.c: Likewise.
1789 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1790 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1791 set_trace_state_variable_value_ptr.
1792 (struct ipa_sym_addresses): Likewise.
1793 (symbol_list): Likewise.
1794 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1795 accessing gdb_collect directly.
1796 (gdb_collect_ptr_type): New typedef.
1797 (get_raw_reg_ptr_type): New typedef.
1798 (get_trace_state_variable_value_ptr_type): New typedef.
1799 (set_trace_state_variable_value_ptr_type): New typedef.
1800 (gdb_collect_ptr): New global.
1801 (get_raw_reg_ptr): New global.
1802 (get_trace_state_variable_value_ptr): New global.
1803 (set_trace_state_variable_value_ptr): New global.
1804 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1805 accessing get_raw_reg directly.
1806 (get_get_tsv_func_addr): Likewise for
1807 get_trace_state_variable_value_ptr.
1808 (get_set_tsv_func_addr): Likewise for
1809 set_trace_state_variable_value_ptr.
1810 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1811
72fb5488
SM
18122016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1815
28170b88
MK
18162016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1817
1818 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1819 packets.
1820 (relocate_instruction): Remove own_buf.
1821 * server.c (own_buf): Make global.
1822 (handle_v_requests): Make global.
1823 * server.h (own_buf): New declaration.
1824 (handle_v_requests): New prototype.
1825
f39e8743
MK
18262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1827
1828 PR 18377
1829 * linux-s390-low.c (add_insns): New function.
1830 (s390_emit_prologue): New function.
1831 (s390_emit_epilogue): New function.
1832 (s390_emit_add): New function.
1833 (s390_emit_sub): New function.
1834 (s390_emit_mul): New function.
1835 (s390_emit_lsh): New function.
1836 (s390_emit_rsh_signed): New function.
1837 (s390_emit_rsh_unsigned): New function.
1838 (s390_emit_ext): New function.
1839 (s390_emit_log_not): New function.
1840 (s390_emit_bit_and): New function.
1841 (s390_emit_bit_or): New function.
1842 (s390_emit_bit_xor): New function.
1843 (s390_emit_bit_not): New function.
1844 (s390_emit_equal): New function.
1845 (s390_emit_less_signed): New function.
1846 (s390_emit_less_unsigned): New function.
1847 (s390_emit_ref): New function.
1848 (s390_emit_if_goto): New function.
1849 (s390_emit_goto): New function.
1850 (s390_write_goto_address): New function.
1851 (s390_emit_litpool): New function.
1852 (s390_emit_const): New function.
1853 (s390_emit_call): New function.
1854 (s390_emit_reg): New function.
1855 (s390_emit_pop): New function.
1856 (s390_emit_stack_flush): New function.
1857 (s390_emit_zero_ext): New function.
1858 (s390_emit_swap): New function.
1859 (s390_emit_stack_adjust): New function.
1860 (s390_emit_set_r2): New function.
1861 (s390_emit_int_call_1): New function.
1862 (s390_emit_void_call_2): New function.
1863 (s390_emit_eq_goto): New function.
1864 (s390_emit_ne_goto): New function.
1865 (s390_emit_lt_goto): New function.
1866 (s390_emit_le_goto): New function.
1867 (s390_emit_gt_goto): New function.
1868 (s390_emit_ge_goto): New function.
1869 (s390x_emit_prologue): New function.
1870 (s390x_emit_epilogue): New function.
1871 (s390x_emit_add): New function.
1872 (s390x_emit_sub): New function.
1873 (s390x_emit_mul): New function.
1874 (s390x_emit_lsh): New function.
1875 (s390x_emit_rsh_signed): New function.
1876 (s390x_emit_rsh_unsigned): New function.
1877 (s390x_emit_ext): New function.
1878 (s390x_emit_log_not): New function.
1879 (s390x_emit_bit_and): New function.
1880 (s390x_emit_bit_or): New function.
1881 (s390x_emit_bit_xor): New function.
1882 (s390x_emit_bit_not): New function.
1883 (s390x_emit_equal): New function.
1884 (s390x_emit_less_signed): New function.
1885 (s390x_emit_less_unsigned): New function.
1886 (s390x_emit_ref): New function.
1887 (s390x_emit_if_goto): New function.
1888 (s390x_emit_const): New function.
1889 (s390x_emit_call): New function.
1890 (s390x_emit_reg): New function.
1891 (s390x_emit_pop): New function.
1892 (s390x_emit_stack_flush): New function.
1893 (s390x_emit_zero_ext): New function.
1894 (s390x_emit_swap): New function.
1895 (s390x_emit_stack_adjust): New function.
1896 (s390x_emit_int_call_1): New function.
1897 (s390x_emit_void_call_2): New function.
1898 (s390x_emit_eq_goto): New function.
1899 (s390x_emit_ne_goto): New function.
1900 (s390x_emit_lt_goto): New function.
1901 (s390x_emit_le_goto): New function.
1902 (s390x_emit_gt_goto): New function.
1903 (s390x_emit_ge_goto): New function.
1904 (s390_emit_ops): New function.
1905 (struct linux_target_ops): Fill in emit_ops hook.
1906
abd9baf9
MK
19072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1908
1909 PR 18377
1910 * Makefile.in: Add s390 IPA files.
1911 * configure.srv: Build IPA for s390.
1912 * linux-s390-ipa.c: New file.
1913 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1914 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1915 (tdesc_s390_linux32): Likewise.
1916 (init_registers_s390_linux32v1): Likewise.
1917 (tdesc_s390_linux32v1): Likewise.
1918 (init_registers_s390_linux32v2): Likewise.
1919 (tdesc_s390_linux32v2): Likewise.
1920 (init_registers_s390_linux64): Likewise.
1921 (tdesc_s390_linux64): Likewise.
1922 (init_registers_s390_linux64v1): Likewise.
1923 (tdesc_s390_linux64v1): Likewise.
1924 (init_registers_s390_linux64v2): Likewise.
1925 (tdesc_s390_linux64v2): Likewise.
1926 (init_registers_s390_te_linux64): Likewise.
1927 (tdesc_s390_te_linux64): Likewise.
1928 (init_registers_s390_vx_linux64): Likewise.
1929 (tdesc_s390_vx_linux64): Likewise.
1930 (init_registers_s390_tevx_linux64): Likewise.
1931 (tdesc_s390_tevx_linux64): Likewise.
1932 (init_registers_s390x_linux64): Likewise.
1933 (tdesc_s390x_linux64): Likewise.
1934 (init_registers_s390x_linux64v1): Likewise.
1935 (tdesc_s390x_linux64v1): Likewise.
1936 (init_registers_s390x_linux64v2): Likewise.
1937 (tdesc_s390x_linux64v2): Likewise.
1938 (init_registers_s390x_te_linux64): Likewise.
1939 (tdesc_s390x_te_linux64): Likewise.
1940 (init_registers_s390x_vx_linux64): Likewise.
1941 (tdesc_s390x_vx_linux64): Likewise.
1942 (init_registers_s390x_tevx_linux64): Likewise.
1943 (tdesc_s390x_tevx_linux64): Likewise.
1944 (have_hwcap_s390_vx): New static variable.
1945 (s390_arch_setup): Fill have_hwcap_s390_vx.
1946 (s390_get_thread_area): New function.
1947 (s390_ft_entry_gpr_esa): New const.
1948 (s390_ft_entry_gpr_zarch): New const.
1949 (s390_ft_entry_misc): New const.
1950 (s390_ft_entry_fr): New const.
1951 (s390_ft_entry_vr): New const.
1952 (s390_ft_main_31): New const.
1953 (s390_ft_main_64): New const.
1954 (s390_ft_exit_fr): New const.
1955 (s390_ft_exit_vr): New const.
1956 (s390_ft_exit_misc): New const.
1957 (s390_ft_exit_gpr_esa): New const.
1958 (s390_ft_exit_gpr_zarch): New const.
1959 (append_insns): New function.
1960 (s390_relocate_instruction): New function.
1961 (s390_install_fast_tracepoint_jump_pad): New function.
1962 (s390_get_min_fast_tracepoint_insn_len): New function.
1963 (s390_get_ipa_tdesc_idx): New function.
1964 (struct linux_target_ops): Wire in the above functions.
1965 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1966 * linux-s390-tdesc.h: New file.
1967
a4105d04
MK
19682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1969
1970 * linux-s390-low.c (s390_supports_tracepoints): New function.
1971 (struct linux_target_ops): Fill supports_tracepoints hook.
1972
35ac8b3e
YQ
19732016-03-18 Yao Qi <yao.qi@linaro.org>
1974
1975 * linux-low.c (lwp_signal_can_be_delivered): New function.
1976 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1977
94610ec4
YQ
19782016-03-18 Yao Qi <yao.qi@linaro.org>
1979
1980 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1981 0 if signal is enqueued. Remove 'signal' from one debugging
1982 message. Move one debugging message to some lines below.
1983 Remove code setting 'signal' to 0.
1984
80aea927
YQ
19852016-03-18 Yao Qi <yao.qi@linaro.org>
1986
1987 * linux-low.c (linux_low_filter_event): Remove redundant
1988 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1989
b04fd3be
MK
19902016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1991
1992 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1993 (struct linux_target_ops): Wire in the above.
1994
c40c8d4b
YQ
19952016-03-03 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-low.c: Update comments to start_step_over.
1998
0f8288ae
YQ
19992016-03-03 Yao Qi <yao.qi@linaro.org>
2000
2001 PR server/19736
2002 * linux-low.c (handle_extended_wait): Set child suspended
2003 if event_lwp->bp_reinsert isn't zero.
2004
fdbd04a8
YQ
20052016-03-02 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2008 enqueue_pending_signal.
2009
6896a8fa
MK
20102016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2011
2012 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2013 is actually loaded.
2014
ab503087
MK
20152016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2016
2017 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2018 (s390_regmap_3264) [!__s390x__]: New global.
2019 (s390_collect_ptrace_register): Skip map entries containing -1.
2020 (s390_supply_ptrace_register): Ditto.
2021 (s390_fill_gprs_high): New function.
2022 (s390_store_gprs_high): New function.
2023 (s390_regsets): Add NT_S390_HIGH_GPRS.
2024 (s390_get_hwcap): Enable on 31-bit.
2025 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2026 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2027 Detect NT_S390_HIGH_GPRS.
2028 (s390_usrregs_info_3264): Enable on 31-bit.
2029 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2030 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2031
ae91f625
MK
20322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2033
2034 PR gdb/13808
2035 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2036 * configure.srv: Ditto.
2037 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2038 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2039 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2040 (init_registers_amd64_linux): Remove prototype.
2041 (tdesc_amd64_linux): Remove declaration.
2042 (get_ipa_tdesc): New function.
2043 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2044 initialize remaining tdescs.
2045 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2046 (init_registers_i386_linux): Remove prototype.
2047 (tdesc_i386_linux): Remove declaration.
2048 (get_ipa_tdesc): New function.
2049 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2050 initialize remaining tdescs.
2051 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2052 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2053 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2054 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2055 (x86_get_ipa_tdesc_idx): New function.
2056 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2057 * linux-x86-tdesc.h: New file.
2058 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2059 (target_get_ipa_tdesc_idx): New macro.
2060 * tracepoint.c (ipa_tdesc_idx): New macro.
2061 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2062 (symbol_list): Add ipa_tdesc_idx.
2063 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2064 (ipa_tdesc): Remove.
2065 (ipa_tdesc_idx): New variable.
2066 (get_context_regcache): Use get_ipa_tdesc.
2067 (gdb_collect): Ditto.
2068 (gdb_probe): Ditto.
2069 * tracepoint.h (get_ipa_tdesc): New prototype.
2070 (ipa_tdesc): Remove.
2071
e7ad2f14
PA
20722016-02-24 Pedro Alves <palves@redhat.com>
2073
2074 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2075 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2076 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2077 Factor out common code between the USE_SIGTRAP_SIGINFO and
2078 !USE_SIGTRAP_SIGINFO blocks.
2079 (linux_low_filter_event): Call save_stop_reason instead of
2080 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2081 Update comments.
2082 (linux_wait_1): Update comments.
2083
657f9cde
WW
20842016-02-24 Wei-cheng Wang <cole945@gmail.com>
2085
2086 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2087 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2088 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2089 ppc_insert_point, ppc_remove_point.
2090
b00b61e1
MK
20912016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2092
2093 * linux-s390-low.c (s390_supports_z_point_type): New function.
2094 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2095
553cb527
YQ
20962016-02-16 Yao Qi <yao.qi@linaro.org>
2097
2098 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2099 PC. Get pc from regcache_read_pc.
2100
a5652c21
YQ
21012016-02-12 Yao Qi <yao.qi@linaro.org>
2102
2103 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2104 or linux_get_pc_32bit.
2105 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2106
ed443b61
YQ
21072016-02-12 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2110 arm_linux_get_next_pcs_fixup.
2111
020ecd38
MK
21122016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2113
2114 * tracepoint.c (x_tracepoint_action_download): Change
2115 write_inferior_data_ptr to write_inferior_data_pointer.
2116 (cmd_qtstart): Likewise.
2117 (write_inferior_data_ptr): Remove.
2118 (download_agent_expr): Change write_inferior_data_ptr to
2119 write_inferior_data_pointer.
2120 (download_tracepoint_1): Likewise.
2121 (download_tracepoint): Likewise.
2122 (download_trace_state_variables): Likewise.
2123
7cae9051
WW
21242016-02-11 Wei-cheng Wang <cole945@gmail.com>
2125 Marcin Kościelnicki <koriakin@0x04.net>
2126
2127 * tracepoint.c (struct tracepoint_action_ops): Remove.
2128 (struct tracepoint_action): Remove ops.
2129 (m_tracepoint_action_download, r_tracepoint_action_download)
2130 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2131 size and offset accordingly.
2132 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2133 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2134 (tracepoint_action_send, tracepoint_action_download): New functions.
2135 Helpers for trace action handlers.
2136 (add_tracepoint_action): Remove setup actions ops.
2137 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2138
9f6a71b4
YQ
21392016-02-10 Yao Qi <yao.qi@linaro.org>
2140
2141 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2142
1e94266c
SM
21432016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2144
2145 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2146 to AC_OUTPUT.
2147 * configure: Regenerate.
2148
8adce034
SM
21492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2150
2151 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2152 void * to gdb_byte *.
2153 * linux-low.c (siginfo_fixup): Likewise.
2154 (linux_xfer_siginfo): Likewise.
2155 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2156 Likewise.
2157 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2158
93813b37
WT
21592016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2160
2161 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2162 to srv_tgtobj.
2163 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2164 to srv_tgtobj.
2165 * linux-x86-low.c [__x86_64__]: Include
2166 "nat/amd64-linux-siginfo.h".
2167 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2168 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2169 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2170 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2171 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2172 (cpt_si_fd, si_timerid, si_overrun): Move from
2173 nat/amd64-linux-siginfo.c.
2174 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2175
8424cc97
SM
21762016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2177
2178 * server.c (skip_to_semicolon): Remove.
2179 (process_point_options): Use strchrnul instead of
2180 skip_to_semicolon.
2181
4d18591b
YQ
21822016-01-26 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2185 * linux-low.c (install_software_single_step_breakpoints): Don't
2186 call regcache_read_pc.
2187 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2188 argument pc.
2189
d8020970
YQ
21902016-01-26 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-low.c (install_software_single_step_breakpoints): Call
2193 regcache_read_pc instead of get_pc.
2194
8b207339
YQ
21952016-01-26 Yao Qi <yao.qi@linaro.org>
2196
2197 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2198 (unblock_async_io): Rename to ...
2199 (block_unblock_async_io): ... it. New function.
2200 (enable_async_io): Don't install SIGIO handler. Unblock it
2201 instead.
2202 (disable_async_io): Don't ignore SIGIO. Block it instead.
2203 (initialize_async_io): Install SIGIO handler. Don't call
2204 unblock_async_io.
2205
18879fef
YQ
22062016-01-26 Yao Qi <yao.qi@linaro.org>
2207
2208 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2209 first character is '\003', call *the_target->request_interrupt.
2210
a0f8e08a
YQ
22112016-01-25 Yao Qi <yao.qi@linaro.org>
2212
2213 * remote-utils.c (new_thread_notify): Remove.
2214 (dead_thread_notify): Likewise.
2215 * remote-utils.h (new_thread_notify): Remove declaration.
2216 (dead_thread_notify): Likewise.
2217
cc5fd9ab
MK
22182016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2219
2220 * gdb.trace/pending.exp: Fix expected message on continue.
2221
99e8eb11
MK
22222016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2223
2224 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2225 it works properly on big-endian machines where sizeof (CORE_ADDR)
2226 != sizeof (void *).
2227
a994041d
PA
22282016-01-21 Pedro Alves <palves@redhat.com>
2229
2230 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2231 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2232 * configure: Regenerate.
2233
f7a6a40d
YQ
22342016-01-21 Yao Qi <yao.qi@linaro.org>
2235
2236 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2237 is_thumb and set it according to CPSR saved on the stack.
2238 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2239 arm_sigreturn_next_pc.
2240
6f69e520
YQ
22412016-01-18 Yao Qi <yao.qi@linaro.org>
2242
2243 * linux-low.c (linux_set_pc_64bit): New function.
2244 (linux_get_pc_64bit): New function.
2245 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2246 Declare.
2247 * linux-sparc-low.c (debug_threads): Remove declaration.
2248 (sparc_get_pc): Remove.
2249 (the_low_target): Use linux_get_pc_64bit instead of
2250 sparc_get_pc.
2251 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2252 (the_low_target): Use linux_get_pc_64bit and
2253 linux_set_pc_64bit.
2254
276d4552
YQ
22552016-01-18 Yao Qi <yao.qi@linaro.org>
2256
2257 * linux-arm-low.c (debug_threads): Remove declaration.
2258 (arm_get_pc, arm_set_pc): Remove.
2259 (the_low_target): Use linux_get_pc_32bit and
2260 linux_set_pc_32bit.
2261 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2262 (the_low_target): Use linux_get_pc_32bit and
2263 linux_set_pc_32bit.
2264 * linux-cris-low.c (debug_threads): Remove declaration.
2265 (cris_get_pc, cris_set_pc,): Remove.
2266 (the_low_target): Use linux_get_pc_32bit and
2267 linux_set_pc_32bit.
2268 * linux-crisv32-low.c (debug_threads): Remove declaration.
2269 (cris_get_pc, cris_set_pc): Remove.
2270 (the_low_target): Use linux_get_pc_32bit and
2271 linux_set_pc_32bit.
2272 * linux-low.c: Include inttypes.h.
2273 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2274 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2275 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2276 (the_low_target): Use linux_get_pc_32bit and
2277 linux_set_pc_32bit.
2278 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2279 (the_low_target): Use linux_get_pc_32bit and
2280 linux_set_pc_32bit.
2281 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2282 (the_low_target): Use linux_get_pc_32bit and
2283 linux_set_pc_32bit.
2284 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2285 (the_low_target): Use linux_get_pc_32bit and
2286 linux_set_pc_32bit.
2287 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2288 (the_low_target): Use linux_get_pc_32bit and
2289 linux_set_pc_32bit.
2290
eb0edac8
GB
22912016-01-18 Gary Benson <gbenson@redhat.com>
2292
2293 * configure.ac (AC_FUNC_FORK): New check.
2294 * config.in: Regenerate.
2295 * configure: Likewise.
2296
1b451dda
YQ
22972016-01-14 Yao Qi <yao.qi@linaro.org>
2298
2299 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2300 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2301 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2302 arm_get_next_pcs_ctor.
2303
82075af2
JS
23042016-01-12 Josh Stone <jistone@redhat.com>
2305 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2306
2307 * inferiors.h: Include "gdb_vecs.h".
2308 (struct process_info): Add syscalls_to_catch.
2309 * inferiors.c (remove_process): Free syscalls_to_catch.
2310 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2311 syscall_return stops.
2312 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2313 * server.c (handle_general_set): Handle QCatchSyscalls.
2314 (handle_query): Report support for QCatchSyscalls.
2315 * target.h (struct target_ops): Add supports_catch_syscall.
2316 (target_supports_catch_syscall): New macro.
2317 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2318 (struct lwp_info): Add syscall_state.
2319 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2320 Maintain syscall_state and syscalls_to_catch across exec.
2321 (get_syscall_trapinfo): New function, proxy to the_low_target.
2322 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2323 (linux_low_filter_event): Toggle syscall_state entry/return for
2324 syscall traps, and set it ignored for all others.
2325 (gdb_catching_syscalls_p): New function.
2326 (gdb_catch_this_syscall_p): New function.
2327 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2328 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2329 (linux_supports_catch_syscall): New function.
2330 (linux_target_ops): Install it.
2331 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2332 (the_low_target): Install it.
2333
8f13a3ce
MF
23342016-01-12 Mike Frysinger <vapier@gentoo.org>
2335
2336 * acinclude.m4: Include new ../warning.m4 file.
2337 * configure: Regenerated.
2338 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2339
5b3da067
MF
23402016-01-12 Mike Frysinger <vapier@gentoo.org>
2341
2342 * ax.c (is_goto_target): Mark static.
2343 * linux-low.c (register_addr): Likewise.
2344 (linux_fetch_registers, linux_store_registers): Likewise.
2345 * mem-break.c (any_persistent_commands): Fix old prototype.
2346 (add_commands_to_breakpoint): Mark static.
2347 * regcache.c (find_register_by_name): Delete unused func.
2348 * remote-utils.c (hex_or_minus_one): Mark static.
2349 * server.c (monitor_show_help): Mark static.
2350 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2351 handle_v_requests): Likewise.
2352
bc504a31
PA
23532016-01-12 Pedro Alves <palves@redhat.com>
2354
2355 Remove use of the registered trademark symbol throughout.
2356
5a0dd67a
YQ
23572016-01-08 Yao Qi <yao.qi@linaro.org>
2358
2359 * remote-utils.c (getpkt): If c is '\003', call target hook
2360 request_interrupt.
2361
b2ca446f
YQ
23622016-01-06 Yao Qi <yao.qi@linaro.org>
2363
2364 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2365 linux-aarch32-low.c.
2366 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2367 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2368 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2369 (thumb2_breakpoint): Declare.
2370 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2371 linux-aarch32-low.h.
2372 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2373 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2374 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2375
edd88788
JB
23762016-01-01 Joel Brobecker <brobecker@adacore.com>
2377
2378 * gdbreplay.c (gdbreplay_version): Change copyright year in
2379 version message.
2380 * server.c (gdbserver_version): Likewise.
2381
65da7f14
PP
23822015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2383
2384 * server.c (crc32_table): Delete.
2385 (crc32): Use libiberty's xcrc32 function.
2386
4abd5ed2
JB
23872015-12-22 Joel Brobecker <brobecker@adacore.com>
2388
2389 * lynx-low.c (lynx_delete_thread_callback): New function.
2390 (lynx_mourn): Properly delete our process and all of its
2391 threads. Remove call to clear_inferiors.
2392
0e50fe5c
JB
23932015-12-22 Joel Brobecker <brobecker@adacore.com>
2394
2395 * target.c (thread_search_callback): Add check that
2396 the thread_stopped target callback is not NULL before
2397 calling it.
2398
35adc03f
YQ
23992015-12-21 Yao Qi <yao.qi@linaro.org>
2400
2401 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2402 arm breakpoint.
2403
bd2b2909
AT
24042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2405
2406 * server.c (handle_query): Call target_supports_software_single_step.
2407
7fe5e27e
AT
24082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409
2410 * linux-low.c (single_step): New function.
2411 (linux_resume_one_lwp_throw): Call single_step.
2412 (start_step_over): Likewise.
2413
d9311bfa
AT
24142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2415
2416 * Makefile.in (SFILES): Append arch/arm-linux.c,
2417 arch/arm-get-next-pcs.c.
2418 (arm-linux.o): New rule.
2419 (arm-get-next-pcs.o): New rule.
2420 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2421 arm-linux.o.
2422 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2423 to linux-aarch32-low.c.
2424 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2425 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2426 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2427 (thumb2_breakpoint_len): Likewise.
2428 (arm_is_thumb_mode): Make non-static.
2429 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2430 from linux-aarch32-low.c.
2431 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2432 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2433 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2434 (thumb2_breakpoint_len): Likewise.
2435 (arm_is_thumb_mode): New declaration.
2436 * linux-arm-low.c: Include arch/arm-linux.h
2437 aarch/arm-get-next-pcs.h, sys/syscall.h.
2438 (get_next_pcs_ops): New struct.
2439 (get_next_pcs_addr_bits_remove): New function.
2440 (get_next_pcs_is_thumb): New function.
2441 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2442 (arm_sigreturn_next_pc): Likewise.
2443 (get_next_pcs_syscall_next_pc): Likewise.
2444 (arm_gdbserver_get_next_pcs): Likewise.
2445 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2446 Initialize.
2447 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2448 * server.h: Include gdb_vecs.h.
2449
68ce2059
AT
24502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2451
2452 * Makefile.in (SFILES): Append common/common-regcache.c.
2453 (OBS): Append common-regcache.o.
2454 (common-regcache.o): New rule.
2455 * regcache.c (init_register_cache): Initialize cache to
2456 REG_UNAVAILABLE.
2457 (regcache_raw_read_unsigned): New function.
2458 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2459 register_status enum.
2460
fa5308bd
AT
24612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2462
2463 * linux-aarch64-low.c (the_low_targets): Rename
2464 breakpoint_reinsert_addr to get_next_pcs.
2465 * linux-arm-low.c (the_low_targets): Likewise.
2466 * linux-bfin-low.c (the_low_targets): Likewise.
2467 * linux-cris-low.c (the_low_targets): Likewise.
2468 * linux-crisv32-low.c (the_low_targets): Likewise.
2469 * linux-low.c (can_software_single_step): Likewise.
2470 (install_software_single_step_breakpoints): New function.
2471 (start_step_over): Use install_software_single_step_breakpoints.
2472 * linux-low.h: New CORE_ADDR vector.
2473 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2474 get_next_pcs.
2475 * linux-mips-low.c (the_low_targets): Likewise.
2476 * linux-nios2-low.c (the_low_targets): Likewise.
2477 * linux-sparc-low.c (the_low_targets): Likewise.
2478
4a6ed09b
PA
24792015-12-17 Pedro Alves <palves@redhat.com>
2480
2481 * linux-low.c (linux_kill_one_lwp): Remove references to
2482 LinuxThreads.
2483 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2484 to 'kill'.
2485 (linux_init_signals): Delete.
2486 (initialize_low): Adjust.
2487 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2488
7544db95
PA
24892015-12-16 Pedro Alves <palves@redhat.com>
2490
2491 * configure.ac (compiler warning flags): When testing a
2492 -Wno-foo option, check whether -Wfoo works instead.
2493 * configure: Regenerate.
2494
8020350c
DB
24952015-12-11 Don Breazeal <donb@codesourcery.com>
2496
2497 * server.c (process_serial_event): Don't exit from gdbserver
2498 in remote mode if there are still active inferiors.
2499
db91f502
YQ
25002015-12-11 Yao Qi <yao.qi@linaro.org>
2501
2502 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2503 arm_breakpoint_at if the process is 32-bit.
2504
b37a6290
YQ
25052015-12-11 Yao Qi <yao.qi@linaro.org>
2506
2507 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2508 arm breakpoint.
2509
17b1509a
YQ
25102015-12-07 Yao Qi <yao.qi@linaro.org>
2511
2512 * configure.srv: Append arm.o to srv_tgtobj for
2513 aarch64*-*-linux* target.
2514 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2515 from linux-arm-low.c.
2516 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2517 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2518 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2519 (thumb2_breakpoint_len): Likewise.
2520 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2521 (arm_breakpoint_kinds): Likewise.
2522 (arm_breakpoint_kind_from_pc): Likewise.
2523 (arm_sw_breakpoint_from_kind): Likewise.
2524 (arm_breakpoint_kind_from_current_state): Likewise.
2525 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2526 (arm_sw_breakpoint_from_kind): Declare.
2527 (arm_breakpoint_kind_from_current_state): Declare.
2528 (arm_breakpoint_at): Declare.
2529 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2530 arm_sw_breakpoint_from_kind if process is 32-bit.
2531 (aarch64_breakpoint_kind_from_pc): New function.
2532 (aarch64_breakpoint_kind_from_current_state): New function.
2533 (the_low_target): Initialize fields breakpoint_kind_from_pc
2534 and breakpoint_kind_from_current_state.
2535 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2536 linux-aarch32-low.c.
2537 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2538 (arm_breakpoint, arm_breakpoint_len): Likewise.
2539 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2540 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2541 (arm_is_thumb_mode): Likewise.
2542 (arm_breakpoint_at): Likewise.
2543 (arm_breakpoint_kind_from_pc): Likewise.
2544 (arm_sw_breakpoint_from_kind): Likewise.
2545 (arm_breakpoint_kind_from_current_state): Likewise.
2546
2547 Revert:
2548 2015-08-04 Yao Qi <yao.qi@linaro.org>
2549
2550 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2551 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2552 * server.c (extended_protocol): Remove "static".
2553 * server.h (extended_protocol): Declare it.
2554
ece66d65
JS
25552015-12-04 Josh Stone <jistone@redhat.com>
2556
2557 * target.h (struct target_ops) <arch_setup>: Rename to ...
2558 (struct target_ops) <post_create_inferior>: ... this.
2559 (target_arch_setup): Rename to ...
2560 (target_post_create_inferior): ... this, calling post_create_inferior.
2561 * server.c (start_inferior): Update target_arch_setup calls to
2562 target_post_create_inferior.
2563 * linux-low.c (linux_low_ptrace_options): Forward declare.
2564 (linux_arch_setup): Update its comment for general use.
2565 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2566 (struct linux_target_ops): Use linux_post_create_inferior.
2567 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2568 to post_create_inferior.
2569 * nto-low.c (struct nto_target_ops): Likewise.
2570 * spu-low.c (struct spu_target_ops): Likewise.
2571 * win32-low.c (struct win32_target_ops): Likewise.
2572
e58c48b4
AT
25732015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2574
2575 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2576
fbec8956
AT
25772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2578
2579 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2580 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2581 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2583 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2584 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2585 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2586 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2587 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2588 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2589 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2590 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2591
9b4c5f87
AT
25922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2593
2594 * linux-low.c (linux_look_up_symbols): Don't call
2595 linux_supports_traceclone.
2596 * linux-low.h (thread_db_init): Remove use_events argument.
2597 * thread-db.c (thread_db_use_event): Remove global variable.
2598 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2599 (struct thread_db) <td_create_bp>: Remove field.
2600 (thread_db_create_event): Remove function.
2601 (thread_db_enable_reporting): Likewise.
2602 (find_one_thread): Don't check for thread_db_use_events.
2603 (attach_thread): Likewise.
2604 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2605 (try_thread_db_load_1): Don't check for thread_db_use_events.
2606 (thread_db_init): Remove use_events argument and thread events
2607 handling.
2608 (remove_thread_event_breakpoints): Remove function.
2609 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2610
7d00775e
AT
26112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2612
2613 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2614 New function.
2615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2616 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2617 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2618 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2619 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2620 Initialize.
2621 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2622 New function.
2623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2624 * linux-low.c (can_hardware_single_step): Use
2625 supports_hardware_single_step.
2626 (can_software_single_step): New function.
2627 (start_step_over): Call can_software_single_step.
2628 (linux_supports_hardware_single_step): New function.
2629 (struct target_ops) <supports_software_single_step>: Initialize.
2630 * linux-low.h (struct linux_target_ops)
2631 <supports_hardware_single_step>: Initialize.
2632 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2634 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2635 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2636 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2638 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2639 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2640 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2641 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2642 Initialize.
2643 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2644 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2645 Initialize.
2646 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2647 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2648 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2649 New function.
2650 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2651 * target.h (struct target_ops): <supports_software_single_step>:
2652 New field.
2653 (target_supports_software_single_step): New macro.
2654
2d97cd35
AT
26552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2656
2657 * linux-low.c (linux_wait_1): Fix pc advance condition.
2658 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2659 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2660
769ef81f
AT
26612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2662
2663 * linux-arm-low.c (arm_is_thumb_mode): New function.
2664 (arm_breakpoint_at): Use arm_is_thumb_mode.
2665 (arm_breakpoint_kind_from_current_state): New function.
2666 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2667 Initialize.
2668 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2669 (linux_breakpoint_kind_from_current_state): New function.
2670 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2671 * linux-low.h (struct linux_target_ops)
2672 <breakpoint_kind_from_current_state>: New field.
2673 * target.h (struct target_ops): Likewise.
2674 (target_breakpoint_kind_from_current_state): New macro.
2675
1bebeeca
PA
26762015-11-30 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (linux_resume): Wake up the event loop before
2679 returning.
2680
a67a9fae
PA
26812015-11-30 Pedro Alves <palves@redhat.com>
2682
2683 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2684 check.
2685 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2686 to -1.
2687 * target.c (struct thread_search): New structure.
2688 (thread_search_callback): New function.
2689 (prev_general_thread): New global.
2690 (prepare_to_access_memory, done_accessing_memory): New functions.
2691 * target.h (prepare_to_access_memory, done_accessing_memory):
2692 Replace macros with function declarations.
2693
f2faf941
PA
26942015-11-30 Pedro Alves <palves@redhat.com>
2695
2696 PR 14618
2697 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2698 report TARGET_WAITKIND_NO_RESUMED.
2699 * remote-utils.c (prepare_resume_reply): Handle
2700 TARGET_WAITKIND_NO_RESUMED.
2701 * server.c (report_no_resumed): New global.
2702 (handle_query) <qSupported>: Handle "no-resumed+". Report
2703 "no-resumed+" support.
2704 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2705 return error if the client doesn't support no-resumed events.
2706 (push_stop_notification): New function.
2707 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2708 events if the client supports them.
2709
a681f9c9
PA
27102015-11-30 Pedro Alves <palves@redhat.com>
2711
2712 * linux-low.c (thread_still_has_status_pending_p): Don't check
2713 vCont;t here.
2714 (lwp_resumed): New function.
2715 (status_pending_p_callback): Return early if the LWP is not
2716 supposed to be resumed.
2717
65706a29
PA
27182015-11-30 Pedro Alves <palves@redhat.com>
2719
2720 * linux-low.c (handle_extended_wait): Assert that the LWP's
2721 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2722 thread create events, leave the new child's status pending.
2723 (linux_low_filter_event): If GDB wants to hear about thread exit
2724 events, leave the LWP marked dead and don't delete it.
2725 (linux_wait_for_event_filtered): Don't check for thread exit.
2726 (filter_exit_event): New function.
2727 (linux_wait_1): Use it, when returning an exit event.
2728 (linux_resume_one_lwp_throw): Assert that the LWP's
2729 waitstatus is TARGET_WAITKIND_IGNORE.
2730 * remote-utils.c (prepare_resume_reply): Handle
2731 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2732 * server.c (report_thread_events): New global.
2733 (handle_general_set): Handle QThreadEvents.
2734 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2735 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2736 TARGET_WAITKIND_THREAD_EXITED.
2737 * server.h (report_thread_events): Declare.
2738
56cf4bed
PA
27392015-11-30 Pedro Alves <palves@redhat.com>
2740
2741 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2742 the thread's last_resume_kind was resume_stop.
2743
500c1d85
PA
27442015-11-30 Pedro Alves <palves@redhat.com>
2745
2746 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2747 before returning.
2748
de979965
PA
27492015-11-30 Pedro Alves <palves@redhat.com>
2750
2751 * server.c (handle_v_requests): Handle vCtrlC.
2752
34c65914
PA
27532015-11-30 Pedro Alves <palves@redhat.com>
2754
2755 * gdbthread.h (find_any_thread_of_pid): Declare.
2756 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2757 functions.
2758 * server.c (handle_query): If current_thread is NULL, look for
2759 another thread of the selected process.
2760
79efa585 27612015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2762 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2763
2764 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2765 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2766 name in reply.
2767 * target.h (struct target_ops) <thread_name>: New field.
2768 (target_thread_name): New macro.
2769
80d82c19
JB
27702015-11-23 Joel Brobecker <brobecker@adacore.com>
2771
2772 * regcache.h (regcache_invalidate_pid): Add declaration.
2773 * regcache.c (regcache_invalidate_pid): New function, extracted
2774 from regcache_invalidate.
2775 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2776 Add trivial documentation comment.
2777 * lynx-low.c: Use regcache_invalidate_pid instead of
2778 regcache_invalidate.
2779
64da5dd5
JB
27802015-11-23 Joel Brobecker <brobecker@adacore.com>
2781
2782 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2783 and Elf64_auxv_t if the target is Android.
2784
37ce4055
DE
27852015-11-22 Doug Evans <xdje42@gmail.com>
2786
2787 * target.h: #include <sys/types.h>.
2788
06e03fff
PA
27892015-11-19 Pedro Alves <palves@redhat.com>
2790
2791 * linux-low.c (linux_process_qsupported): Change prototype.
2792 Adjust.
2793 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2794 Change prototype.
2795 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2796 and adjust to loop over all features.
2797 * server.c (handle_query) <qSupported>: Adjust to call
2798 target_process_qsupported once, passing it a vector of unprocessed
2799 features.
2800 * target.h (struct target_ops) <process_qsupported>: Change
2801 prototype.
2802 (target_process_qsupported): Adjust.
2803
9a084706
PA
28042015-11-19 Pedro Alves <palves@redhat.com>
2805
2806 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2807 mode.
2808 * configure: Regenerate.
2809
dad44a1f
PA
28102015-11-19 Pedro Alves <palves@redhat.com>
2811
2812 * configure: Regenerate.
2813
231c0592
YQ
28142015-11-19 Yao Qi <yao.qi@linaro.org>
2815
2816 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2817 type to uint32_t.
2818
6c1c9a8b
YQ
28192015-11-19 Yao Qi <yao.qi@linaro.org>
2820
2821 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2822 (struct aarch64_operand): Move enum out.
2823
9caa3311
YQ
28242015-11-19 Yao Qi <yao.qi@linaro.org>
2825
2826 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2827 struct user_fpsimd_state *.
2828 (aarch64_store_fpregset): Likewise.
2829
6a69a054
YQ
28302015-11-19 Yao Qi <yao.qi@linaro.org>
2831
2832 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2833 struct user_pt_regs *.
2834 (aarch64_store_gregset): Likewise.
2835
1798301e
PA
28362015-11-18 Pedro Alves <palves@redhat.com>
2837
2838 * Makefile.in (all_object_files): Add $IPA_OBJS.
2839
ce7715e2
PA
28402015-11-17 Pedro Alves <palves@redhat.com>
2841
2842 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2843 GDB_SIGNAL_0 and gdb_signal_to_string.
2844
c0879059
PA
28452015-11-17 Pedro Alves <palves@redhat.com>
2846
2847 * win32-low.c (handle_output_debug_string): Remove parameter.
2848 (win32_kill): Remove our_status local and adjust call to
2849 handle_output_debug_string.
2850 (get_child_debug_event): Adjust call to
2851 handle_output_debug_string.
2852
1996e237
SM
28532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2854
2855 * linux-mips-low.c (mips_fill_gregset): Add cast.
2856 (mips_store_gregset): Likewise.
2857 (mips_fill_fpregset): Likewise.
2858 (mips_store_fpregset): Likewise.
2859
cbec665b
SM
28602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2861
2862 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2863 priv.
2864
eb3e3c67
SM
28652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2866
2867 * linux-mips-low.c (mips_linux_new_thread): Change type of
2868 watch_type to enum target_hw_bp_type.
2869
171de4b8
SM
28702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2871
2872 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2873 Change return type to arm_hwbp_type.
2874
04248ead
SM
28752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2876
2877 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2878 (arm_store_gregset): Likewise.
2879 * linux-arm-low.c (arm_get_hwcap): Likewise.
2880 (arm_read_description): Likewise.
2881
04b3479c
SM
28822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2885
2bc84e8a
SM
28862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2887
2888 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2889 (ppc_fill_vsxregset): Likewise.
2890 (ppc_store_vsxregset): Likewise.
2891 (ppc_fill_vrregset): Likewise.
2892 (ppc_store_vrregset): Likewise.
2893 (ppc_fill_evrregset): Likewise.
2894 (ppc_store_evrregset): Likewise.
2895
e6c5bb05
SM
28962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * linux-ppc-low.c (ppc_usrregs_info): Remove
2899 forward-declaration.
2900 (ppc_arch_setup): Move lower in file.
2901
7ea45d72
SM
29022015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2905 (ps_pdwrite): Likewise.
2906
69291610
HW
29072015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2908
2909 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2910 to after assert checks.
2911
b42945fd
SM
29122015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2913
2914 * proc-service.c (ps_pdread): Add/adjust casts.
2915 (ps_pdwrite): Add/adjust casts.
2916
d6f85c84
SM
29172015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2918
2919 * server.c (handle_search_memory_1): Cast return value of
2920 memmem.
2921
f98cd059
SM
29222015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * server.c (write_qxfer_response): Change type of data to
2925 gdb_byte *.
2926
d2412fa5
PA
29272015-10-29 Pedro Alves <palves@redhat.com>
2928
2929 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2930
c17414a2
PA
29312015-10-29 Pedro Alves <palves@redhat.com>
2932
2933 * tracepoint.c (clear_installed_tracepoints): Add casts.
2934
e053fbc4
PA
29352015-10-29 Pedro Alves <palves@redhat.com>
2936
2937 * server.c (handle_v_cont, process_serial_event): Add enum
2938 gdb_signal casts to signal parsing code.
2939
add67df8
PA
29402015-10-29 Pedro Alves <palves@redhat.com>
2941
2942 * linux-low.h (NULL_REGSET): Define.
2943 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2944 * linux-arm-low.c (arm_regsets): Likewise.
2945 * linux-crisv32-low.c (cris_regsets): Likewise.
2946 * linux-m68k-low.c (m68k_regsets): Likewise.
2947 * linux-mips-low.c (mips_regsets): Likewise.
2948 * linux-nios2-low.c (nios2_regsets): Likewise.
2949 * linux-ppc-low.c (ppc_regsets): Likewise.
2950 * linux-s390-low.c (s390_regsets): Likewise.
2951 * linux-sh-low.c (sh_regsets): Likewise.
2952 * linux-sparc-low.c (sparc_regsets): Likewise.
2953 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2954 * linux-tile-low.c (tile_regsets): Likewise.
2955 * linux-x86-low.c (x86_regsets): Likewise.
2956 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2957
50bc912a
PA
29582015-10-29 Pedro Alves <palves@redhat.com>
2959
2960 * linux-low.h (NULL_REGSET): Define.
2961 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2962 * linux-arm-low.c (arm_regsets): Likewise.
2963 * linux-crisv32-low.c (cris_regsets): Likewise.
2964 * linux-m68k-low.c (m68k_regsets): Likewise.
2965 * linux-mips-low.c (mips_regsets): Likewise.
2966 * linux-nios2-low.c (nios2_regsets): Likewise.
2967 * linux-ppc-low.c (ppc_regsets): Likewise.
2968 * linux-s390-low.c (s390_regsets): Likewise.
2969 * linux-sh-low.c (sh_regsets): Likewise.
2970 * linux-sparc-low.c (sparc_regsets): Likewise.
2971 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2972 * linux-tile-low.c (tile_regsets): Likewise.
2973 * linux-x86-low.c (x86_regsets): Likewise.
2974 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2975
682b2546
DE
29762015-10-26 Doug Evans <dje@google.com>
2977
2978 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2979
963843d4
DE
29802015-10-26 Doug Evans <dje@google.com>
2981
2982 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2983
d41401ac
DE
29842015-10-26 Doug Evans <dje@google.com>
2985
2986 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2987 for debug_printf.
2988 (attach_thread, find_new_threads_callback): Ditto.
2989
3db28855
AT
29902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2991
2992 * mem-break.h (set_breakpoint_data): Remove.
2993
fb78e89c
AT
29942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2995
2996 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2997 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2998 (initialize_low): Remove set_breakpoint_data call.
2999 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3000 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3001 (initialize_low): Remove set_breakpoint_data call.
3002 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3003 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3004 (initialize_low): Remove set_breakpoint_data call.
3005
2e6ee069
AT
30062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3007
3008 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3009 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3010 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3011 * target.h (target_breakpoint_kind_from_pc): New macro.
3012
1652a986
AT
30132015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3014
3015 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3016 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3017 the default breakpoint kind.
3018
abeead09
AT
30192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3020
3021 * linux-arm-low.c (arm_supports_z_point_type): Add software
3022 breakpoint support.
3023
b0b4b501
AT
30242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3025
3026 * linux-arm-low.c: Refactor breakpoint definitions.
3027 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3028 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3029
8689682c
AT
30302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3031
3032 * Makefile.in: Add arm.c/o.
3033 * configure.srv: Likewise.
3034 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3035 (arm_breakpoint_kind_from_pc): New function.
3036 (arm_sw_breakpoint_from_kind): Return proper kind.
3037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3038
27165294
AT
30392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3040
3041 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3042 removal.
3043 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3044 (struct raw_breakpoint) <size>: Remove.
3045 (struct raw_breakpoint) <kind>: Add.
3046 (bp_size): New function.
3047 (bp_opcode): Likewise.
3048 (find_raw_breakpoint_at): Adjust for kind.
3049 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3050 (remove_memory_breakpoint): Adjust for kind call bp_size.
3051 (set_raw_breakpoint_at): Adjust for kind.
3052 (set_breakpoint): Likewise.
3053 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3054 (delete_raw_breakpoint): Adjust for kind.
3055 (delete_breakpoint): Likewise.
3056 (find_gdb_breakpoint): Likewise.
3057 (set_gdb_breakpoint_1): Likewise.
3058 (set_gdb_breakpoint): Likewise.
3059 (delete_gdb_breakpoint_1): Likewise.
3060 (delete_gdb_breakpoint): Likewise.
3061 (uninsert_raw_breakpoint): Likewise.
3062 (reinsert_raw_breakpoint): Likewise.
3063 (set_breakpoint_data): Remove.
3064 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3065 (check_mem_read): Adjust for kind call bp_size.
3066 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3067 (clone_one_breakpoint): Adjust for kind.
3068 * mem-break.h (set_gdb_breakpoint): Likewise.
3069 (delete_gdb_breakpoint): Likewise.
3070 * server.c (process_serial_event): Likewise.
3071
dd373349
AT
30722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3073
3074 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3075 (struct linux_target_ops) <breakpoint>: Remove.
3076 (struct linux_target_ops) <breakpoint_len>: Remove.
3077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3079 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3080 (arm_sw_breakpoint_from_kind): New function.
3081 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3082 (struct linux_target_ops) <breakpoint>: Remove.
3083 (struct linux_target_ops) <breakpoint_len>: Remove.
3084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3086 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3087 (struct linux_target_ops) <breakpoint>: Remove.
3088 (struct linux_target_ops) <breakpoint_len>: Remove.
3089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3091 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3092 (struct linux_target_ops) <breakpoint>: Remove.
3093 (struct linux_target_ops) <breakpoint_len>: Remove.
3094 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3095 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3096 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3097 and sw_breakpoint_from_kind to increment the pc.
3098 (linux_breakpoint_kind_from_pc): New function.
3099 (linux_sw_breakpoint_from_kind): New function.
3100 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3101 (initialize_low): Call breakpoint_kind_from_pc and
3102 sw_breakpoint_from_kind to replace breakpoint_data/len.
3103 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3104 New field.
3105 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3106 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3107 (struct linux_target_ops) <breakpoint>: Remove.
3108 (struct linux_target_ops) <breakpoint_len>: Remove.
3109 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3110 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3111 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3112 (struct linux_target_ops) <breakpoint>: Remove.
3113 (struct linux_target_ops) <breakpoint_len>: Remove.
3114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3116 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3117 (struct linux_target_ops) <breakpoint>: Remove.
3118 (struct linux_target_ops) <breakpoint_len>: Remove.
3119 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3120 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3121 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3122 (struct linux_target_ops) <breakpoint>: Remove.
3123 (struct linux_target_ops) <breakpoint_len>: Remove.
3124 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3125 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3126 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3127 (struct linux_target_ops) <breakpoint>: Remove.
3128 (struct linux_target_ops) <breakpoint_len>: Remove.
3129 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3130 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3131 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3132 (struct linux_target_ops) <breakpoint>: Remove.
3133 (struct linux_target_ops) <breakpoint_len>: Remove.
3134 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3135 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3136 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3137 (struct linux_target_ops) <breakpoint>: Remove.
3138 (struct linux_target_ops) <breakpoint_len>: Remove.
3139 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3140 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3141 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3142 (struct linux_target_ops) <breakpoint>: Remove.
3143 (struct linux_target_ops) <breakpoint_len>: Remove.
3144 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3145 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3146 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3147 (struct linux_target_ops) <breakpoint>: Remove.
3148 (struct linux_target_ops) <breakpoint_len>: Remove.
3149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3151 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3152 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3153 (struct linux_target_ops) <breakpoint>: Remove.
3154 (struct linux_target_ops) <breakpoint_len>: Remove.
3155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3157 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3158 (struct linux_target_ops) <breakpoint>: Remove.
3159 (struct linux_target_ops) <breakpoint_len>: Remove.
3160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3162
4cd98a19
AT
31632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3164
3165 * linux-cris-low.c (cris_get_pc): Remove void arg.
3166
774ee6d2
AR
31672015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3168
3169 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3170 variable name.
3171
833dcd29
AR
31722015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3173
3174 * inferiors.c (thread_pid_matches_callback): New function.
3175 (find_thread_process): New function.
3176 (remove_thread): Reset current_thread.
3177 (remove_process): Assert threads have been removed first.
3178
8d689ee5
YQ
31792015-10-15 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3182 if it is 3.
3183 (aarch64_remove_point): Likewise.
3184 * regcache.c (regcache_register_size): New function.
3185
1c2e1515
YQ
31862015-10-12 Yao Qi <yao.qi@linaro.org>
3187
3188 * linux-aarch64-low.c: Update all callers as emit_load_store
3189 is renamed to aarch64_emit_load_store.
3190
e1c587c3
YQ
31912015-10-12 Yao Qi <yao.qi@linaro.org>
3192
3193 * linux-aarch64-low.c: Update all callers of function renaming
3194 from emit_insn to aarch64_emit_insn.
3195
b6542f81
YQ
31962015-10-12 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3199 arch/aarch64-insn.h.
3200 (struct aarch64_memory_operand): Likewise.
3201 (ENCODE): Likewise.
3202 (emit_insn): Move to arch/aarch64-insn.c.
3203 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3204 (emit_load_store): Move to arch/aarch64-insn.c.
3205 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3206 (can_encode_int32): Remove.
3207
246994ce
YQ
32082015-10-12 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3211 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3212 (aarch64_relocate_instruction): Likewise.
3213 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3214 (struct aarch64_insn_visitor): Likewise.
3215
0badd99f
YQ
32162015-10-12 Yao Qi <yao.qi@linaro.org>
3217
3218 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3219 (struct aarch64_insn_visitor): New.
3220 (struct aarch64_insn_relocation_data): New.
3221 (aarch64_ftrace_insn_reloc_b): New function.
3222 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3223 (aarch64_ftrace_insn_reloc_cb): Likewise.
3224 (aarch64_ftrace_insn_reloc_tb): Likewise.
3225 (aarch64_ftrace_insn_reloc_adr): Likewise.
3226 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3227 (aarch64_ftrace_insn_reloc_others): Likewise.
3228 (visitor): New.
3229 (aarch64_relocate_instruction): Use visitor.
3230
dfaffe9d
YQ
32312015-10-12 Yao Qi <yao.qi@linaro.org>
3232
3233 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3234 int. Add argument buf.
3235 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3236 aarch64_relocate_instruction.
3237
70b439f0
YQ
32382015-10-12 Yao Qi <yao.qi@linaro.org>
3239
3240 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3241 argument insn. Remove local variable insn. Don't call
3242 target_read_uint32.
3243 (aarch64_install_fast_tracepoint_jump_pad): Call
3244 target_read_uint32.
3245
7781c06f
YQ
32462015-09-30 Yao Qi <yao.qi@linaro.org>
3247
3248 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3249 (emit_load_store_pair): Likewise.
3250
9a3c8263
SM
32512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3252
3253 * dll.c (match_dll): Add cast(s).
3254 (unloaded_dll): Likewise.
3255 * linux-low.c (second_thread_of_pid_p): Likewise.
3256 (delete_lwp_callback): Likewise.
3257 (count_events_callback): Likewise.
3258 (select_event_lwp_callback): Likewise.
3259 (linux_set_resume_request): Likewise.
3260 * server.c (accumulate_file_name_length): Likewise.
3261 (emit_dll_description): Likewise.
3262 (handle_qxfer_threads_worker): Likewise.
3263 (visit_actioned_threads): Likewise.
3264 * thread-db.c (any_thread_of): Likewise.
3265 * tracepoint.c (same_process_p): Likewise.
3266 (match_blocktype): Likewise.
3267 (build_traceframe_info_xml): Likewise.
3268
224c3ddb
SM
32692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3270
3271 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3272 assignment.
3273 (gdb_unparse_agent_expr): Likewise.
3274 * hostio.c (require_data): Likewise.
3275 (handle_pread): Likewise.
3276 * linux-low.c (disable_regset): Likewise.
3277 (fetch_register): Likewise.
3278 (store_register): Likewise.
3279 (get_dynamic): Likewise.
3280 (linux_qxfer_libraries_svr4): Likewise.
3281 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3282 (set_fast_tracepoint_jump): Likewise.
3283 (uninsert_fast_tracepoint_jumps_at): Likewise.
3284 (reinsert_fast_tracepoint_jumps_at): Likewise.
3285 (validate_inserted_breakpoint): Likewise.
3286 (clone_agent_expr): Likewise.
3287 * regcache.c (init_register_cache): Likewise.
3288 * remote-utils.c (putpkt_binary_1): Likewise.
3289 (decode_M_packet): Likewise.
3290 (decode_X_packet): Likewise.
3291 (look_up_one_symbol): Likewise.
3292 (relocate_instruction): Likewise.
3293 (monitor_output): Likewise.
3294 * server.c (handle_search_memory): Likewise.
3295 (handle_qxfer_exec_file): Likewise.
3296 (handle_qxfer_libraries): Likewise.
3297 (handle_qxfer): Likewise.
3298 (handle_query): Likewise.
3299 (handle_v_cont): Likewise.
3300 (handle_v_run): Likewise.
3301 (captured_main): Likewise.
3302 * target.c (write_inferior_memory): Likewise.
3303 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3304 * tracepoint.c (init_trace_buffer): Likewise.
3305 (add_tracepoint_action): Likewise.
3306 (add_traceframe): Likewise.
3307 (add_traceframe_block): Likewise.
3308 (cmd_qtdpsrc): Likewise.
3309 (cmd_qtdv): Likewise.
3310 (cmd_qtstatus): Likewise.
3311 (response_source): Likewise.
3312 (response_tsv): Likewise.
3313 (cmd_qtnotes): Likewise.
3314 (gdb_collect): Likewise.
3315 (initialize_tracepoint): Likewise.
3316
afbe19f8
PL
33172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3318
3319 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3320 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3321 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3322 <NOP>: New.
3323 (enum aarch64_condition_codes): New enum.
3324 (w0): New static global.
3325 (fp): Likewise.
3326 (lr): Likewise.
3327 (struct aarch64_memory_operand) <type>: New
3328 MEMORY_OPERAND_POSTINDEX type.
3329 (postindex_memory_operand): New helper function.
3330 (emit_ret): New function.
3331 (emit_load_store_pair): New function, factored out of emit_stp
3332 with support for MEMORY_OPERAND_POSTINDEX.
3333 (emit_stp): Rewrite using emit_load_store_pair.
3334 (emit_ldp): New function.
3335 (emit_load_store): Likewise.
3336 (emit_ldr): Mention post-index instruction in comment.
3337 (emit_ldrh): New function.
3338 (emit_ldrb): New function.
3339 (emit_ldrsw): Mention post-index instruction in comment.
3340 (emit_str): Likewise.
3341 (emit_subs): New function.
3342 (emit_cmp): Likewise.
3343 (emit_and): Likewise.
3344 (emit_orr): Likewise.
3345 (emit_orn): Likewise.
3346 (emit_eor): Likewise.
3347 (emit_mvn): Likewise.
3348 (emit_lslv): Likewise.
3349 (emit_lsrv): Likewise.
3350 (emit_asrv): Likewise.
3351 (emit_mul): Likewise.
3352 (emit_sbfm): Likewise.
3353 (emit_sbfx): Likewise.
3354 (emit_ubfm): Likewise.
3355 (emit_ubfx): Likewise.
3356 (emit_csinc): Likewise.
3357 (emit_cset): Likewise.
3358 (emit_nop): Likewise.
3359 (emit_ops_insns): New helper function.
3360 (emit_pop): Likewise.
3361 (emit_push): Likewise.
3362 (aarch64_emit_prologue): New function.
3363 (aarch64_emit_epilogue): Likewise.
3364 (aarch64_emit_add): Likewise.
3365 (aarch64_emit_sub): Likewise.
3366 (aarch64_emit_mul): Likewise.
3367 (aarch64_emit_lsh): Likewise.
3368 (aarch64_emit_rsh_signed): Likewise.
3369 (aarch64_emit_rsh_unsigned): Likewise.
3370 (aarch64_emit_ext): Likewise.
3371 (aarch64_emit_log_not): Likewise.
3372 (aarch64_emit_bit_and): Likewise.
3373 (aarch64_emit_bit_or): Likewise.
3374 (aarch64_emit_bit_xor): Likewise.
3375 (aarch64_emit_bit_not): Likewise.
3376 (aarch64_emit_equal): Likewise.
3377 (aarch64_emit_less_signed): Likewise.
3378 (aarch64_emit_less_unsigned): Likewise.
3379 (aarch64_emit_ref): Likewise.
3380 (aarch64_emit_if_goto): Likewise.
3381 (aarch64_emit_goto): Likewise.
3382 (aarch64_write_goto_address): Likewise.
3383 (aarch64_emit_const): Likewise.
3384 (aarch64_emit_call): Likewise.
3385 (aarch64_emit_reg): Likewise.
3386 (aarch64_emit_pop): Likewise.
3387 (aarch64_emit_stack_flush): Likewise.
3388 (aarch64_emit_zero_ext): Likewise.
3389 (aarch64_emit_swap): Likewise.
3390 (aarch64_emit_stack_adjust): Likewise.
3391 (aarch64_emit_int_call_1): Likewise.
3392 (aarch64_emit_void_call_2): Likewise.
3393 (aarch64_emit_eq_goto): Likewise.
3394 (aarch64_emit_ne_goto): Likewise.
3395 (aarch64_emit_lt_goto): Likewise.
3396 (aarch64_emit_le_goto): Likewise.
3397 (aarch64_emit_gt_goto): Likewise.
3398 (aarch64_emit_ge_got): Likewise.
3399 (aarch64_emit_ops_impl): New static global variable.
3400 (aarch64_emit_ops): New target function, return
3401 &aarch64_emit_ops_impl.
3402 (struct linux_target_ops): Install it.
3403
bb903df0
PL
34042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3405
3406 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3407 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3408 aarch64-ipa.o.
3409 * linux-aarch64-ipa.c: New file.
3410 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3411 and endian.h.
3412 (aarch64_get_thread_area): New target method.
3413 (extract_signed_bitfield): New helper function.
3414 (aarch64_decode_ldr_literal): New function.
3415 (enum aarch64_opcodes): New enum.
3416 (struct aarch64_register): New struct.
3417 (struct aarch64_operand): New struct.
3418 (x0): New static global.
3419 (x1): Likewise.
3420 (x2): Likewise.
3421 (x3): Likewise.
3422 (x4): Likewise.
3423 (w2): Likewise.
3424 (ip0): Likewise.
3425 (sp): Likewise.
3426 (xzr): Likewise.
3427 (aarch64_register): New helper function.
3428 (register_operand): Likewise.
3429 (immediate_operand): Likewise.
3430 (struct aarch64_memory_operand): New struct.
3431 (offset_memory_operand): New helper function.
3432 (preindex_memory_operand): Likewise.
3433 (enum aarch64_system_control_registers): New enum.
3434 (ENCODE): New macro.
3435 (emit_insn): New helper function.
3436 (emit_b): New function.
3437 (emit_bcond): Likewise.
3438 (emit_cb): Likewise.
3439 (emit_tb): Likewise.
3440 (emit_blr): Likewise.
3441 (emit_stp): Likewise.
3442 (emit_ldp_q_offset): Likewise.
3443 (emit_stp_q_offset): Likewise.
3444 (emit_load_store): Likewise.
3445 (emit_ldr): Likewise.
3446 (emit_ldrsw): Likewise.
3447 (emit_str): Likewise.
3448 (emit_ldaxr): Likewise.
3449 (emit_stxr): Likewise.
3450 (emit_stlr): Likewise.
3451 (emit_data_processing_reg): Likewise.
3452 (emit_data_processing): Likewise.
3453 (emit_add): Likewise.
3454 (emit_sub): Likewise.
3455 (emit_mov): Likewise.
3456 (emit_movk): Likewise.
3457 (emit_mov_addr): Likewise.
3458 (emit_mrs): Likewise.
3459 (emit_msr): Likewise.
3460 (emit_sevl): Likewise.
3461 (emit_wfe): Likewise.
3462 (append_insns): Likewise.
3463 (can_encode_int32_in): New helper function.
3464 (aarch64_relocate_instruction): New function.
3465 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3466 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3467 (struct linux_target_ops): Install aarch64_get_thread_area,
3468 aarch64_install_fast_tracepoint_jump_pad and
3469 aarch64_get_min_fast_tracepoint_insn_len.
3470
787749ea
PL
34712015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3472
3473 * Makefile.in (aarch64-insn.o): New rule.
3474 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3475
9812b2e6
YQ
34762015-09-21 Yao Qi <yao.qi@linaro.org>
3477
3478 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3479
18fe412b
YQ
34802015-09-21 Yao Qi <yao.qi@linaro.org>
3481
3482 * tracepoint.c (max_jump_pad_size): Remove.
3483
a0cc84cd
YQ
34842015-09-18 Yao Qi <yao.qi@linaro.org>
3485
3486 * linux-aarch64-low.c: Don't include sys/uio.h.
3487 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3488
d78908cf
WW
34892015-09-16 Wei-cheng Wang <cole945@gmail.com>
3490
3491 * tracepoint.c (eval_result_type): Change prototype.
3492 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3493
d57e0d50
PA
34942015-09-15 Pedro Alves <palves@redhat.com>
3495
3496 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3497 Check whether to report exec events instead of checking whether
3498 multiprocess is enabled.
3499
5a676acc
PA
35002015-09-15 Pedro Alves <palves@redhat.com>
3501
3502 PR remote/18965
3503 * remote-utils.c (prepare_resume_reply): Merge
3504 TARGET_WAITKIND_VFORK_DONE switch case with the
3505 TARGET_WAITKIND_FORKED case.
3506
7c5d0fad
YQ
35072015-09-15 Yao Qi <yao.qi@linaro.org>
3508
3509 * server.c (handle_query): Check string comparison using
3510 "else if" instead of "if".
3511
750ce8d1
YQ
35122015-09-15 Yao Qi <yao.qi@linaro.org>
3513
3514 * server.c (vCont_supported): New global variable.
3515 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3516 matches. Append ";vContSupported+" to own_buf.
3517 (handle_v_requests): Append ";s;S" to own_buf if target supports
3518 hardware single step or vCont_supported is false.
3519 (capture_main): Set vCont_supported to zero.
3520
70b90b91
YQ
35212015-09-15 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3524 it to ...
3525 (linux_supports_hardware_single_step): ... New function.
3526 (linux_target_ops): Update.
3527 * lynx-low.c (lynx_target_ops): Set field
3528 supports_hardware_single_step to target_can_do_hardware_single_step.
3529 * nto-low.c (nto_target_ops): Likewise.
3530 * spu-low.c (spu_target_ops): Likewise.
3531 * win32-low.c (win32_target_ops): Likewise.
3532 * target.c (target_can_do_hardware_single_step): New function.
3533 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3534 Remove. <supports_hardware_single_step>: New field.
3535 (target_supports_conditional_breakpoints): Remove.
3536 (target_supports_hardware_single_step): New macro.
3537 (target_can_do_hardware_single_step): Declare.
3538 * server.c (handle_query): Use target_supports_hardware_single_step
3539 instead of target_supports_conditional_breakpoints.
3540
ade90bde
YQ
35412015-09-15 Yao Qi <yao.qi@linaro.org>
3542
3543 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3544 function.
3545 (struct linux_target_ops the_low_target): Install
3546 aarch64_linux_siginfo_fixup.
3547
94585166
DB
35482015-09-11 Don Breazeal <donb@codesourcery.com>
3549 Luis Machado <lgustavo@codesourcery.com>
3550
3551 * linux-low.c (linux_mourn): Static declaration.
3552 (linux_arch_setup): Move in front of
3553 handle_extended_wait.
3554 (linux_arch_setup_thread): New function.
3555 (handle_extended_wait): Handle exec events. Call
3556 linux_arch_setup_thread. Make event_lwp argument a
3557 pointer-to-a-pointer.
3558 (check_zombie_leaders): Do not check stopped threads.
3559 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3560 (linux_low_filter_event): Add lwp and thread for exec'ing
3561 non-leader thread if leader thread has been deleted.
3562 Refactor code into linux_arch_setup_thread and call it.
3563 Pass child lwp pointer by reference to handle_extended_wait.
3564 (linux_wait_for_event_filtered): Update comment.
3565 (linux_wait_1): Prevent clobbering exec event status.
3566 (linux_supports_exec_events): New function.
3567 (linux_target_ops) <supports_exec_events>: Initialize new member.
3568 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3569 new member.
3570 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3571 * server.c (report_exec_events): New global variable.
3572 (handle_query): Handle qSupported query for exec-events feature.
3573 (captured_main): Initialize report_exec_events.
3574 * server.h (report_exec_events): Declare new global variable.
3575 * target.h (struct target_ops) <supports_exec_events>: New
3576 member.
3577 (target_supports_exec_events): New macro.
3578 * win32-low.c (win32_target_ops) <supports_exec_events>:
3579 Initialize new member.
3580
0568462b
MM
35812015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3582
3583 * linux-low.c (linux_low_enable_btrace): Remove.
3584 (linux_target_ops): Replace linux_low_enable_btrace with
3585 linux_enable_btrace.
3586
39edd165
YQ
35872015-09-03 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-aarch64-low.c (aarch64_insert_point): Call
3590 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3591 returns true.
3592
1db33b5a
UW
35932015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3594
3595 * linux-low.c (check_stopped_by_breakpoint): Use
3596 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3597
ab290430
PA
35982015-08-27 Pedro Alves <palves@redhat.com>
3599
3600 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3601
8d749320
SM
36022015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3603
6711b7f8
SM
3604 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3605 the XNEW-family equivalent.
8d749320
SM
3606 (compile_bytecodes): Likewise.
3607 * dll.c (loaded_dll): Likewise.
3608 * event-loop.c (append_callback_event): Likewise.
3609 (create_file_handler): Likewise.
3610 (create_file_event): Likewise.
3611 * hostio.c (handle_open): Likewise.
3612 * inferiors.c (add_thread): Likewise.
3613 (add_process): Likewise.
3614 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3615 * linux-arm-low.c (arm_new_process): Likewise.
3616 (arm_new_thread): Likewise.
3617 * linux-low.c (add_to_pid_list): Likewise.
3618 (linux_add_process): Likewise.
3619 (handle_extended_wait): Likewise.
3620 (add_lwp): Likewise.
3621 (enqueue_one_deferred_signal): Likewise.
3622 (enqueue_pending_signal): Likewise.
3623 (linux_resume_one_lwp_throw): Likewise.
3624 (linux_resume_one_thread): Likewise.
3625 (linux_read_memory): Likewise.
3626 (linux_write_memory): Likewise.
3627 * linux-mips-low.c (mips_linux_new_process): Likewise.
3628 (mips_linux_new_thread): Likewise.
3629 (mips_add_watchpoint): Likewise.
3630 * linux-x86-low.c (initialize_low_arch): Likewise.
3631 * lynx-low.c (lynx_add_process): Likewise.
3632 * mem-break.c (set_raw_breakpoint_at): Likewise.
3633 (set_breakpoint): Likewise.
3634 (add_condition_to_breakpoint): Likewise.
3635 (add_commands_to_breakpoint): Likewise.
3636 (clone_agent_expr): Likewise.
3637 (clone_one_breakpoint): Likewise.
3638 * regcache.c (new_register_cache): Likewise.
3639 * remote-utils.c (look_up_one_symbol): Likewise.
3640 * server.c (queue_stop_reply): Likewise.
3641 (start_inferior): Likewise.
3642 (queue_stop_reply_callback): Likewise.
3643 (handle_target_event): Likewise.
3644 * spu-low.c (fetch_ppc_memory): Likewise.
3645 (store_ppc_memory): Likewise.
3646 * target.c (set_target_ops): Likewise.
3647 * thread-db.c (thread_db_load_search): Likewise.
3648 (try_thread_db_load_1): Likewise.
3649 * tracepoint.c (add_tracepoint): Likewise.
3650 (add_tracepoint_action): Likewise.
3651 (create_trace_state_variable): Likewise.
3652 (cmd_qtdpsrc): Likewise.
3653 (cmd_qtro): Likewise.
3654 (add_while_stepping_state): Likewise.
3655 * win32-low.c (child_add_thread): Likewise.
3656 (get_image_name): Likewise.
3657
ed8b7b42
YQ
36582015-08-25 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3661
db3cb7cb
YQ
36622015-08-25 Yao Qi <yao.qi@linaro.org>
3663
3664 * Makefile.in (aarch64-linux.o): New rule.
3665 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3666 srv_tgtobj.
3667 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3668 (aarch64_init_debug_reg_state): Make it extern.
3669 (aarch64_linux_prepare_to_resume): Remove.
3670
f6011a1c
YQ
36712015-08-25 Yao Qi <yao.qi@linaro.org>
3672
3673 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3674 lwp_arch_private_info and ptid_of_lwp.
3675
88e2cf7e
YQ
36762015-08-25 Yao Qi <yao.qi@linaro.org>
3677
3678 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3679 Find proc_info by find_process_pid. All callers updated.
3680
5e35436e
YQ
36812015-08-25 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3684 Remove.
3685 (debug_reg_change_callback): Remove.
3686 (aarch64_notify_debug_reg_change): Remove.
3687
4a8a7965
YQ
36882015-08-25 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3691 Call current_lwp_ptid.
3692
32a271ee
YQ
36932015-08-25 Yao Qi <yao.qi@linaro.org>
3694
3695 * linux-aarch64-low.c (debug_reg_change_callback): Use
3696 debug_printf.
3697
0d51c8d7
YQ
36982015-08-25 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3701
31a43dd5
YQ
37022015-08-25 Yao Qi <yao.qi@linaro.org>
3703
3704 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3705
8ee52567
YQ
37062015-08-25 Yao Qi <yao.qi@linaro.org>
3707
3708 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3709 the code.
3710
ff3f0f45
YQ
37112015-08-25 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3714 Remove.
3715 (debug_reg_change_callback): Remove argument entry and add argument
3716 lwp. Remove local variable thread. Don't print thread id in the
3717 debugging output. Don't check whether pid of thread equals to pid.
3718 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3719 iterate_over_lwps instead find_inferior.
3720
3d40fbb5
PA
37212015-08-24 Pedro Alves <palves@redhat.com>
3722
3723 * inferiors.c (get_first_process): New function.
3724 * inferiors.h (get_first_process): New declaration.
3725 * remote-utils.c (read_ptid): Default to the first process in the
3726 list, instead of to the current thread's process.
3727
438e1e42
PA
37282015-08-24 Pedro Alves <palves@redhat.com>
3729
3730 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3731 * event-loop.c: Likewise.
3732 * remote-utils.c: Likewise.
3733 * tracepoint.c: Likewise.
3734
a8c6d4fc
PA
37352015-08-24 Pedro Alves <palves@redhat.com>
3736
3737 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3738 ptid_get_lwp.
3739
99b0bb12
PA
37402015-08-21 Pedro Alves <palves@redhat.com>
3741
3742 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3743 instead of literal 1.
3744
f8904751
PA
37452015-08-21 Pedro Alves <palves@redhat.com>
3746
3747 * tdesc.c (default_description): Explicitly zero-initialize.
3748
465a859e
PA
37492015-08-21 Pedro Alves <palves@redhat.com>
3750
3751 PR gdb/18749
3752 * inferiors.c (remove_thread): Discard any pending stop reply for
3753 this thread.
3754 * server.c (remove_all_on_match_pid): Rename to ...
3755 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3756 instead of a pid.
3757 (discard_queued_stop_replies): Change parameter to a ptid. Now
3758 extern.
3759 (handle_v_kill, kill_inferior_callback, captured_main)
3760 (process_serial_event): Adjust.
3761 * server.h (discard_queued_stop_replies): Declare.
3762
f0db101d
PA
37632015-08-21 Pedro Alves <palves@redhat.com>
3764
3765 * linux-low.c (wait_for_sigstop): Always switch to no thread
3766 selected if the previously current thread dies.
3767 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3768 process instead of the current thread's.
3769 * remote-utils.c (input_interrupt): Don't check if there's no
3770 current thread.
3771 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3772 current thread to the general thread fails, error out.
3773 (handle_qxfer_auxv, handle_qxfer_libraries)
3774 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3775 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3776 (handle_query): Check if there's a thread selected instead of
3777 checking whether there's any thread in the thread list.
3778 (handle_qxfer_threads, handle_qxfer_btrace)
3779 (handle_qxfer_btrace_conf): Don't error out early if there's no
3780 thread in the thread list.
3781 (handle_v_cont, myresume): Don't set the current thread to the
3782 continue thread.
3783 (process_serial_event) <Hg handling>: Also set thread_id if the
3784 previous general thread is still alive.
3785 (process_serial_event) <g/G handling>: If setting the current
3786 thread to the general thread fails, error out.
3787 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3788 thread's lwp instead of the current thread's.
3789 * target.c (set_desired_thread): If the desired thread was not
3790 found, leave the current thread pointing to NULL. Return an int
3791 (boolean) indicating success.
3792 * target.h (set_desired_thread): Change return type to int.
3793
40045d91
MF
37942015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3795
3796 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3797 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3798 #includes.
3799 (ps_get_thread_area): New function.
3800
45face3b
GB
38012015-08-19 Gary Benson <gbenson@redhat.com>
3802
3803 * hostio.c (handle_pread): Do not attempt to read more data
3804 than hostio_reply_with_data can fit in a packet.
3805
16d5f642
JB
38062015-08-18 Joel Brobecker <brobecker@adacore.com>
3807
3808 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3809
a738da3a
MF
38102015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3811
3812 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3813
33ebda9d
PA
38142015-08-06 Pedro Alves <palves@redhat.com>
3815
3816 * tracepoint.c (expr_eval_result): Now an int.
3817
a44892be
PA
38182015-08-06 Pedro Alves <palves@redhat.com>
3819
3820 * gdbthread.h (struct regcache): Forward declare.
3821 (struct thread_info) <regcache_data>: Now a struct regcache
3822 pointer.
3823 * inferiors.c (inferior_regcache_data)
3824 (set_inferior_regcache_data): Now work with struct regcache
3825 pointers.
3826 * inferiors.h (struct regcache): Forward declare.
3827 (inferior_regcache_data, set_inferior_regcache_data): Now work
3828 with struct regcache pointers.
3829 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3830 (free_register_cache_thread): Remove struct regcache pointer
3831 casts.
3832
608a1e46
PA
38332015-08-06 Pedro Alves <palves@redhat.com>
3834
3835 * server.c (captured_main): On error, print the exception message
3836 to stderr, and if run_once is set, throw a quit.
3837
f0ce0d3a
PA
38382015-08-06 Pedro Alves <palves@redhat.com>
3839
3840 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3841 the current thread.
3842
bf47e248
PA
38432015-08-06 Pedro Alves <palves@redhat.com>
3844
3845 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3846 reading beyond the passed in buffer length.
3847
b6b9ffcc
PL
38482015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3849
3850 * tracepoint.c (symbol_list) <required>: Remove.
3851
863d01bd
PA
38522015-08-06 Pedro Alves <palves@redhat.com>
3853
3854 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3855 count if stopping and suspending threads.
3856 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3857 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3858 (linux_detach): Complete an ongoing step-over.
3859 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3860 throughout.
3861 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3862 (linux_wait_1): If passing a signal to the inferior after
3863 finishing a step-over, unsuspend and re-resume all lwps. If we
3864 see a single-step event but the thread should be continuing, don't
3865 pass the trap to gdb.
3866 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3867 internal_error instead of gdb_assert.
3868 (enqueue_pending_signal): New function.
3869 (check_ptrace_stopped_lwp_gone): Add debug output.
3870 (start_step_over): Use internal_error instead of gdb_assert.
3871 (complete_ongoing_step_over): New function.
3872 (linux_resume_one_thread): Don't resume a suspended thread.
3873 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3874 it stepping.
3875
00db26fa
PA
38762015-08-06 Pedro Alves <palves@redhat.com>
3877
3878 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3879 (linux_thread_alive): Use lwp_is_marked_dead.
3880 (extended_event_reported): Delete.
3881 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3882 instead of extended_event_reported.
3883 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3884 as well.
3885 (lwp_is_marked_dead): New function.
3886 (lwp_running): Use lwp_is_marked_dead.
3887 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3888 comment.
3889
ad071a30
PA
38902015-08-06 Pedro Alves <palves@redhat.com>
3891
3892 * linux-low.c (linux_wait_1): Move fork event output out of the
3893 !report_to_gdb check. Pass event_child->waitstatus to
3894 target_waitstatus_to_string instead of ourstatus.
3895
524b57e6
YQ
38962015-08-04 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3899 if current_thread is 32 bit.
3900
6085d6f6
YQ
39012015-08-04 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3904 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3905 * server.c (extended_protocol): Remove "static".
3906 * server.h (extended_protocol): Declare it.
3907
8a7e4587
YQ
39082015-08-04 Yao Qi <yao.qi@linaro.org>
3909
3910 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3911 both aarch64 and aarch32.
3912 (aarch64_set_pc): Likewise.
3913
3b53ae99
YQ
39142015-08-04 Yao Qi <yao.qi@linaro.org>
3915
3916 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3917 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3918 arm-with-neon.xml to srv_xmlfiles.
3919 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3920 (is_64bit_tdesc): New function.
3921 (aarch64_linux_read_description): New function.
3922 (aarch64_arch_setup): Call aarch64_linux_read_description.
3923 (regs_info): Rename to regs_info_aarch64.
3924 (aarch64_regs_info): Return right regs_info.
3925 (initialize_low_arch): Call initialize_low_arch_aarch32.
3926
bd9e6534
YQ
39272015-08-04 Yao Qi <yao.qi@linaro.org>
3928
3929 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3930 * linux-aarch32-low.c: New file.
3931 * linux-aarch32-low.h: New file.
3932 * linux-arm-low.c (arm_fill_gregset): Move it to
3933 linux-aarch32-low.c.
3934 (arm_store_gregset): Likewise.
3935 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3936 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3937 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3938 (regs_info): Rename to regs_info_arm.
3939 (arm_regs_info): Return regs_info_aarch32 if
3940 have_ptrace_getregset is 1 and target description is
3941 arm_with_neon or arm_with_vfpv3.
3942 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3943 Call initialize_low_arch_aarch32 instead.
3944
ded48a5e
YQ
39452015-08-04 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3948 * linux-low.c: ... here.
3949 * linux-low.h (have_ptrace_getregset): Declare it.
3950
96e9210f
PA
39512015-08-04 Pedro Alves <palves@redhat.com>
3952
3953 * thread-db.c (struct thread_db): Use new typedefs.
3954 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3955 CHK calls.
3956 (disable_thread_event_reporting): Cast result of dlsym to
3957 destination function pointer type.
3958 (thread_db_mourn): Use td_ta_delete_ftype.
3959
af60a1ef
SL
39602015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3961
3962 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3963 arch variant.
3964 (CDX_BREAKPOINT): Define for R2.
3965 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3966 (the_low_target): Add comments.
3967
e8b41681
YQ
39682015-07-30 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-arm-low.c (arm_hwcap): Remove it.
3971 (arm_read_description): New local variable arm_hwcap. Don't
3972 set arm_hwcap to zero.
3973
89abb039
YQ
39742015-07-30 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3977 Use regcache->tdesc instead.
3978 (arm_store_wmmxregset): Likewise.
3979 (arm_fill_vfpregset): Likewise.
3980 (arm_store_vfpregset): Likewise.
3981
deca266c
YQ
39822015-07-30 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-arm-low.c: Include arch/arm.h.
3985 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3986 (arm_store_gregset): Likewise.
3987
aa58a496
SM
39882015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3989
3990 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3991 ptrace's 4th parameter.
3992
50904b25
YQ
39932015-07-27 Yao Qi <yao.qi@linaro.org>
3994
3995 * configure.srv (case aarch64*-*-linux*): Don't set
3996 srv_linux_usrregs.
3997
5826e159
PA
39982015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3999
4000 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4001 sys/ptrace.h.
4002 * linux-arm-low.c: Likewise.
4003 * linux-cris-low.c: Likewise.
4004 * linux-crisv32-low.c: Likewise.
4005 * linux-low.c: Likewise.
4006 * linux-m68k-low.c: Likewise.
4007 * linux-mips-low.c: Likewise.
4008 * linux-nios2-low.c: Likewise.
4009 * linux-s390-low.c: Likewise.
4010 * linux-sparc-low.c: Likewise.
4011 * linux-tic6x-low.c: Likewise.
4012 * linux-tile-low.c: Likewise.
4013 * linux-x86-low.c: Likewise.
4014
54019719
PA
40152015-07-24 Pedro Alves <palves@redhat.com>
4016
4017 * config.in: Regenerate.
4018 * configure: Regenerate.
4019
eb7aa561
PA
40202015-07-24 Pedro Alves <palves@redhat.com>
4021
4022 * acinclude.m4: Include ../ptrace.m4.
4023 * configure.ac: Call GDB_AC_PTRACE.
4024 * config.in, configure: Regenerate.
4025
55d7b841
YQ
40262015-07-24 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-low.c (linux_create_inferior): Remove setting to
4029 proc->priv->new_inferior.
4030 (linux_attach): Likewise.
4031 (linux_low_filter_event): Likewise.
4032 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4033
c06cbd92
YQ
40342015-07-24 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-low.c (linux_arch_setup): New function.
4037 (linux_low_filter_event): If proc->tdesc is NULL and
4038 proc->attached is true, call the_low_target.arch_setup.
4039 Otherwise, keep status pending, and return.
4040 (linux_resume_one_lwp_throw): Don't call get_pc if
4041 thread->while_stepping isn't NULL. Don't call
4042 get_thread_regcache if proc->tdesc is NULL.
4043 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4044 (linux_target_ops): Install arch_setup.
4045 * server.c (start_inferior): Call the_target->arch_setup.
4046 * target.h (struct target_ops) <arch_setup>: New field.
4047 (target_arch_setup): New marco.
4048 * lynx-low.c (lynx_target_ops): Update.
4049 * nto-low.c (nto_target_ops): Update.
4050 * spu-low.c (spu_target_ops): Update.
4051 * win32-low.c (win32_target_ops): Update.
4052
5ae3ebba
YQ
40532015-07-24 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-low.c (linux_add_process): Don't set
4056 proc->priv->new_inferior.
4057 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4058 (linux_attach): Likewise.
4059
eb97750b
YQ
40602015-07-24 Yao Qi <yao.qi@linaro.org>
4061
4062 * server.c (start_inferior): Code refactor.
4063
51aee833
YQ
40642015-07-24 Yao Qi <yao.qi@linaro.org>
4065
4066 * server.c (process_serial_event): Set general_thread.
4067
af1b22f3
YQ
40682015-07-21 Yao Qi <yao.qi@linaro.org>
4069
4070 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4071 aarch64_linux_get_debug_reg_capacity.
4072
554717a3
YQ
40732015-07-17 Yao Qi <yao.qi@linaro.org>
4074
4075 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4076 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4077 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4078 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4079 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4080 (AARCH64_HWP_ALIGNMENT): Likewise.
4081 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4082 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4083 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4084 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4085 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4086 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4087 (struct aarch64_debug_reg_state): Likewise.
4088 (struct arch_lwp_info): Likewise.
4089 (aarch64_align_watchpoint): Likewise.
4090 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4091 (aarch64_watchpoint_length): Likewise.
4092 (aarch64_point_encode_ctrl_reg): Likewise
4093 (aarch64_point_is_aligned): Likewise.
4094 (aarch64_align_watchpoint): Likewise.
4095 (aarch64_linux_set_debug_regs):
4096 (aarch64_dr_state_insert_one_point): Likewise.
4097 (aarch64_dr_state_remove_one_point): Likewise.
4098 (aarch64_handle_breakpoint): Likewise.
4099 (aarch64_handle_aligned_watchpoint): Likewise.
4100 (aarch64_handle_unaligned_watchpoint): Likewise.
4101 (aarch64_handle_watchpoint): Likewise.
4102
c67ca4de
YQ
41032015-07-17 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4106 and don't aarch64_get_debug_reg_state. All callers update.
4107 (aarch64_handle_aligned_watchpoint): Likewise.
4108 (aarch64_handle_unaligned_watchpoint): Likewise.
4109 (aarch64_handle_watchpoint): Likewise.
4110 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4111 (aarch64_remove_point): Likewise.
4112
25abf979
YQ
41132015-07-17 Yao Qi <yao.qi@linaro.org>
4114
4115 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4116 debug_printf.
4117 (aarch64_handle_unaligned_watchpoint): Likewise.
4118
db1ff28b
JK
41192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4120
4121 Revert the previous 3 commits:
4122 Move gdb_regex* to common/
4123 Move linux_find_memory_regions_full & co.
4124 gdbserver build-id attribute generator
4125
700ca40f
JK
41262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4127 Jan Kratochvil <jan.kratochvil@redhat.com>
4128
4129 gdbserver build-id attribute generator.
4130 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4131 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4132 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4133 (find_phdr): New.
4134 (get_dynamic): Use find_pdhr to traverse program headers.
4135 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4136 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4137 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4138 (get_hex_build_id): New.
4139 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4140 to reply XML document.
4141
9904185c
JK
41422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4143 Jan Kratochvil <jan.kratochvil@redhat.com>
4144
4145 * target.c: Include target/target-utils.h and fcntl.h.
4146 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4147 (target_fileio_read_stralloc): New functions.
4148
6e5b4429
JK
41492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4150
4151 * Makefile.in (OBS): Add gdb_regex.o.
4152 (gdb_regex.o): New.
4153 * config.in: Rebuilt.
4154 * configure: Rebuilt.
4155
ddc98fbf
JK
41562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4157 Jan Kratochvil <jan.kratochvil@redhat.com>
4158
4159 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4160 * Makefile.in (OBS): Add target-utils.o.
4161 (linux-maps.o, target-utils.o): New.
4162 * configure.srv (srv_linux_obj): Add linux-maps.o.
4163
e57bb7a0
PL
41642015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4165
4166 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4167 function, return 1.
4168 (the_low_target): Install it.
4169
586b02a9
PA
41702015-07-14 Pedro Alves <palves@redhat.com>
4171
4172 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4173 Instead, ignore ECHILD, and throw an error for other errnos.
4174
58c1b36c
PA
41752015-07-10 Pedro Alves <palves@redhat.com>
4176
4177 * event-loop.c (struct callback_event) <data>: Change type to
4178 gdb_client_data instance instead of gdb_client_data pointer.
4179 (append_callback_event): Adjust.
4180
421530db
PL
41812015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4182
4183 * linux-aarch64-low.c: Add comments for each linux_target_ops
4184 method. Remove comments already covered in target_ops and
4185 linux_target_ops definitions.
4186 (the_low_target): Add comments for each unimplemented method.
4187
c2d65f38
YQ
41882015-07-09 Yao Qi <yao.qi@linaro.org>
4189
4190 * linux-aarch64-low.c (aarch64_regmap): Remove.
4191 (aarch64_usrregs_info): Remove.
4192 (regs_info): Set field usrregs to NULL.
4193
b20a6524
MM
41942015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4195
4196 * linux-low.c: Include "rsp-low.h"
4197 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4198 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4199 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4200 (handle_btrace_enable_pt): New.
4201 (handle_btrace_general_set): Support "pt".
4202 (handle_btrace_conf_general_set): Support "pt:size".
4203
96c97461
PL
42042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4205
4206 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4207 Z_PACKET_SW_BP.
4208
37d66942
PL
42092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4210
4211 * linux-aarch64-low.c: Remove comment about endianness.
4212 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4213 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4214 memcmp.
4215
dc06243f
GB
42162015-06-24 Gary Benson <gbenson@redhat.com>
4217
4218 * linux-i386-ipa.c (stdint.h): Do not include.
4219 * lynx-i386-low.c (stdint.h): Likewise.
4220 * lynx-ppc-low.c (stdint.h): Likewise.
4221 * mem-break.c (stdint.h): Likewise.
4222 * thread-db.c (stdint.h): Likewise.
4223 * tracepoint.c (stdint.h): Likewise.
4224 * win32-low.c (stdint.h): Likewise.
4225
124e13d9
SM
42262015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4227
4228 * server.c (write_qxfer_response): Update call to
4229 remote_escape_output.
4230
909c2cda
JK
42312015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4232 Jan Kratochvil <jan.kratochvil@redhat.com>
4233
4234 Merge multiple hex conversions.
4235 * gdbreplay.c (tohex): Rename to 'fromhex'.
4236 (logchar): Use fromhex.
4237
24c05f46
JK
42382015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4239
4240 * server.c (handle_qxfer_libraries): Set `version' attribute for
4241 <library-list>.
4242
14d2069a
GB
42432015-06-10 Gary Benson <gbenson@redhat.com>
4244
4245 * target.h (struct target_ops) <multifs_open>: New field.
4246 <multifs_unlink>: Likewise.
4247 <multifs_readlink>: Likewise.
4248 * linux-low.c (nat/linux-namespaces.h): New include.
4249 (linux_target_ops): Initialize the_target->multifs_open,
4250 the_target->multifs_unlink and the_target->multifs_readlink.
4251 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4252 * hostio.c (hostio_fs_pid): New static variable.
4253 (hostio_handle_new_gdb_connection): New function.
4254 (handle_setfs): Likewise.
4255 (handle_open): Use the_target->multifs_open as appropriate.
4256 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4257 (handle_readlink): Use the_target->multifs_readlink as
4258 appropriate.
4259 (handle_vFile): Handle vFile:setfs packets.
4260 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4261 after target_handle_new_gdb_connection.
4262
4b8b5e72
GB
42632015-06-10 Gary Benson <gbenson@redhat.com>
4264
4265 * configure.ac (AC_CHECK_FUNCS): Add setns.
4266 * config.in: Regenerate.
4267 * configure: Likewise.
4268 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4269 (linux-namespaces.o): New rule.
4270 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4271
3ac2e371
GB
42722015-06-09 Gary Benson <gbenson@redhat.com>
4273
4274 * hostio.c (handle_open): Process mode argument with
4275 fileio_to_host_mode.
4276
ca9b78ce
YQ
42772015-06-01 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4280 * linux-x86-low.c: Likewise.
4281
bfacd19d
DB
42822015-05-28 Don Breazeal <donb@codesourcery.com>
4283
4284 * linux-low.c (handle_extended_wait): Initialize
4285 thread_info.last_resume_kind for new fork children.
4286
452003ef
PA
42872015-05-15 Pedro Alves <palves@redhat.com>
4288
4289 * target.h (target_handle_new_gdb_connection): Rewrite using if
4290 wrapped in do/while.
4291
1041a03c
JB
42922015-05-14 Joel Brobecker <brobecker@adacore.com>
4293
4294 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4295 * configure, config.in: Regenerate.
4296 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4297 Declare typedef.
4298
c269dbdb
DB
42992015-05-12 Don Breazeal <donb@codesourcery.com>
4300
4301 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4302 PTRACE_EVENT_VFORK_DONE.
4303 (linux_low_ptrace_options, extended_event_reported): Add vfork
4304 events.
4305 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4306 and "vforkdone" for RSP 'T' Stop Reply Packet.
4307 * server.h (report_vfork_events): Declare
4308 global variable.
4309
3a8a0396
DB
43102015-05-12 Don Breazeal <donb@codesourcery.com>
4311
4312 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4313 (the_low_target) <new_fork>: Initialize new member.
4314 * linux-arm-low.c (arm_new_fork): New function.
4315 (the_low_target) <new_fork>: Initialize new member.
4316 * linux-low.c (handle_extended_wait): Call new target function
4317 new_fork.
4318 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4319 * linux-mips-low.c (mips_add_watchpoint): New function
4320 extracted from mips_insert_point.
4321 (the_low_target) <new_fork>: Initialize new member.
4322 (mips_linux_new_fork): New function.
4323 (mips_insert_point): Call mips_add_watchpoint.
4324 * linux-x86-low.c (x86_linux_new_fork): New function.
4325 (the_low_target) <new_fork>: Initialize new member.
4326
de0d863e
DB
43272015-05-12 Don Breazeal <donb@codesourcery.com>
4328
4329 * linux-low.c (handle_extended_wait): Implement return value,
4330 rename argument 'event_child' to 'event_lwp', handle
4331 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4332 (linux_low_ptrace_options): New function.
4333 (linux_low_filter_event): Call linux_low_ptrace_options,
4334 use different argument fo linux_enable_event_reporting,
4335 use return value from handle_extended_wait.
4336 (extended_event_reported): New function.
4337 (linux_wait_1): Call extended_event_reported and set
4338 status to report fork events.
4339 (linux_write_memory): Add pid to debug message.
4340 (reset_lwp_ptrace_options_callback): New function.
4341 (linux_handle_new_gdb_connection): New function.
4342 (linux_target_ops): Initialize new structure member.
4343 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4344 * lynx-low.c: Initialize new structure member.
4345 * remote-utils.c (prepare_resume_reply): Implement stop reason
4346 "fork" for "T" stop message.
4347 * server.c (handle_query): Call handle_new_gdb_connection.
4348 * server.h (report_fork_events): Declare global flag.
4349 * target.h (struct target_ops) <handle_new_gdb_connection>:
4350 New member.
4351 (target_handle_new_gdb_connection): New macro.
4352 * win32-low.c: Initialize new structure member.
4353
ddcbc397
DB
43542015-05-12 Don Breazeal <donb@codesourcery.com>
4355
4356 * mem-break.c (APPEND_TO_LIST): Define macro.
4357 (clone_agent_expr): New function.
4358 (clone_one_breakpoint): New function.
4359 (clone_all_breakpoints): New function.
4360 * mem-break.h: Declare new functions.
4361
89245bc0
DB
43622015-05-12 Don Breazeal <donb@codesourcery.com>
4363
4364 * linux-low.c (linux_supports_fork_events): New function.
4365 (linux_supports_vfork_events): New function.
4366 (linux_target_ops): Initialize new structure members.
4367 (initialize_low): Call linux_check_ptrace_features.
4368 * lynx-low.c (lynx_target_ops): Initialize new structure
4369 members.
4370 * server.c (report_fork_events, report_vfork_events):
4371 New global flags.
4372 (handle_query): Add new features to qSupported packet and
4373 response.
4374 (captured_main): Initialize new global variables.
4375 * target.h (struct target_ops) <supports_fork_events>:
4376 New member.
4377 <supports_vfork_events>: New member.
4378 (target_supports_fork_events): New macro.
4379 (target_supports_vfork_events): New macro.
4380 * win32-low.c (win32_target_ops): Initialize new structure
4381 members.
4382
835205d0
GB
43832015-05-12 Gary Benson <gbenson@redhat.com>
4384
4385 * server.c (handle_qxfer_exec_file): Use current process
4386 if annex is empty.
4387
21e94bd9
SL
43882015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4389
4390 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4391 Remove HAVE_PTRACE_GETREGS conditionals.
4392 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4393 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4394
45614f15
YQ
43952015-05-08 Yao Qi <yao.qi@linaro.org>
4396
4397 * linux-low.c (linux_supports_conditional_breakpoints): New
4398 function.
4399 (linux_target_ops): Install new target method.
4400 * lynx-low.c (lynx_target_ops): Install NULL hook for
4401 supports_conditional_breakpoints.
4402 * nto-low.c (nto_target_ops): Likewise.
4403 * spu-low.c (spu_target_ops): Likewise.
4404 * win32-low.c (win32_target_ops): Likewise.
4405 * server.c (handle_query): Check
4406 target_supports_conditional_breakpoints.
4407 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4408 New field.
4409 (target_supports_conditional_breakpoints): New macro.
4410
80ad801e
PA
44112015-05-06 Pedro Alves <palves@redhat.com>
4412
4413 PR server/18081
4414 * server.c (start_inferior): If the process exits, mourn it.
4415
819843c7
GB
44162015-04-21 Gary Benson <gbenson@redhat.com>
4417
4418 * hostio.c (fileio_open_flags_to_host): Factored out to
4419 fileio_to_host_openflags in common/fileio.c. Single use
4420 updated.
4421
a2d5a9d7
MF
44222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4423
4424 * linux-xtensa-low.c (xtensa_fill_gregset)
4425 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4426 XCHAL_HAVE_LOOP.
4427
deb44829
MF
44282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4429
4430 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4431 (regs_info): Replace usrregs pointer with NULL.
4432
e57f1de3
GB
44332015-04-17 Gary Benson <gbenson@redhat.com>
4434
4435 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4436 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4437 * server.c (handle_qxfer_exec_file): New function.
4438 (qxfer_packets): Add exec-file entry.
4439 (handle_query): Report qXfer:exec-file:read as supported packet.
4440
62828379
RN
44412015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4442
4443 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4444
b88bb450
GB
44452015-04-09 Gary Benson <gbenson@redhat.com>
4446
4447 * hostio-errno.c (errno_to_fileio_error): Remove function.
4448 Update caller to use remote_fileio_to_fio_error.
4449
c8f4bfdd
YQ
44502015-04-09 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-low.c (linux_insert_point): Call
4453 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4454 (linux_remove_point): Call remove_memory_breakpoint if type is
4455 raw_bkpt_type_sw.
4456 * linux-x86-low.c (x86_insert_point): Don't call
4457 insert_memory_breakpoint.
4458 (x86_remove_point): Don't call remove_memory_breakpoint.
4459
41f98f02
PA
44602015-04-01 Pedro Alves <palves@redhat.com>
4461 Cleber Rosa <crosa@redhat.com>
4462
4463 * server.c (gdbserver_usage): Reorganize and extend the usage
4464 message.
4465
2bf6fb9d
PA
44662015-03-24 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4469 output. Also dump TRAP_TRACE.
4470 (linux_low_filter_event): In debug output, distinguish a
4471 resume_stop SIGSTOP from a delayed SIGSTOP.
4472
369f6daa
GB
44732015-03-24 Gary Benson <gbenson@redhat.com>
4474
4475 * linux-x86-low.c (x86_linux_new_thread): Moved to
4476 nat/x86-linux.c.
4477 (x86_linux_prepare_to_resume): Likewise.
4478
8e5d4070
GB
44792015-03-24 Gary Benson <gbenson@redhat.com>
4480
4481 * Makefile.in (x86-linux-dregs.o): New rule.
4482 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4483 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4484 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4485 (x86_linux_dr_get): Likewise.
4486 (x86_linux_dr_set): Likewise.
4487 (update_debug_registers_callback): Likewise.
4488 (x86_linux_dr_set_addr): Likewise.
4489 (x86_linux_dr_get_addr): Likewise.
4490 (x86_linux_dr_set_control): Likewise.
4491 (x86_linux_dr_get_control): Likewise.
4492 (x86_linux_dr_get_status): Likewise.
4493 (x86_linux_update_debug_registers): Likewise.
4494
2b95d440
GB
44952015-03-24 Gary Benson <gbenson@redhat.com>
4496
4497 * linux-x86-low.c (x86_linux_update_debug_registers):
4498 New function, factored out from...
4499 (x86_linux_prepare_to_resume): ...this.
4500
14b0bc68
GB
45012015-03-24 Gary Benson <gbenson@redhat.com>
4502
4503 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4504 (x86_linux_dr_set): Likewise.
4505 (update_debug_registers_callback): Likewise.
4506 (x86_linux_dr_set_addr): Likewise.
4507 (x86_linux_dr_get_addr): Likewise.
4508 (x86_linux_dr_set_control): Likewise.
4509 (x86_linux_dr_get_control): Likewise.
4510 (x86_linux_dr_get_status): Likewise.
4511 (x86_linux_prepare_to_resume): Likewise.
4512
5dfe6ca8
GB
45132015-03-24 Gary Benson <gbenson@redhat.com>
4514
4515 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4516 Use perror_with_name. Pass string through gettext.
4517 (x86_linux_dr_set): Likewise.
4518
d33472ad
GB
45192015-03-24 Gary Benson <gbenson@redhat.com>
4520
4521 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4522 (x86_linux_dr_set_addr): ...this.
4523 (x86_dr_low_get_addr): Rename to...
4524 (x86_linux_dr_get_addr): ...this.
4525 (x86_dr_low_set_control): Rename to...
4526 (x86_linux_dr_set_control): ...this.
4527 (x86_dr_low_get_control): Rename to...
4528 (x86_linux_dr_get_control): ...this.
4529 (x86_dr_low_get_status): Rename to...
4530 (x86_linux_dr_get_status): ...this.
4531 (x86_dr_low): Update with new function names.
4532
4b134ca1
GB
45332015-03-24 Gary Benson <gbenson@redhat.com>
4534
4535 * Makefile.in (x86-linux.o): New rule.
4536 * configure.srv: Add x86-linux.o to relevant targets.
4537 * linux-low.c (lwp_set_arch_private_info): New function.
4538 (lwp_arch_private_info): Likewise.
4539 * linux-x86-low.c: Include nat/x86-linux.h.
4540 (arch_lwp_info): Removed structure.
4541 (update_debug_registers_callback):
4542 Use lwp_set_debug_registers_changed.
4543 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4544 and lwp_set_debug_registers_changed.
4545 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4546
34c703da
GB
45472015-03-24 Gary Benson <gbenson@redhat.com>
4548
4549 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4550 * linux-arm-low.c (arm_new_thread): Likewise.
4551 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4552 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4553 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4554 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4555
cff068da
GB
45562015-03-24 Gary Benson <gbenson@redhat.com>
4557
4558 * linux-low.c (ptid_of_lwp): New function.
4559 (lwp_is_stopped): Likewise.
4560 (lwp_stop_reason): Likewise.
4561 * linux-x86-low.c (update_debug_registers_callback):
4562 Use lwp_is_stopped.
4563 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4564 lwp_stop_reason.
4565
b2f7c7e8
GB
45662015-03-24 Gary Benson <gbenson@redhat.com>
4567
4568 * linux-low.h (linux_stop_lwp): Remove declaration.
4569
6d4ee8c6
GB
45702015-03-24 Gary Benson <gbenson@redhat.com>
4571
4572 * linux-low.h: Include nat/linux-nat.h.
4573 * linux-low.c (iterate_over_lwps_args): New structure.
4574 (iterate_over_lwps_filter): New function.
4575 (iterate_over_lwps): Likewise.
4576 * linux-x86-low.c (update_debug_registers_callback):
4577 Update signature to what iterate_over_lwps expects.
4578 Remove PID check that iterate_over_lwps now performs.
4579 (x86_dr_low_set_addr): Use iterate_over_lwps.
4580 (x86_dr_low_set_control): Likewise.
4581
70a0bb6b
GB
45822015-03-24 Gary Benson <gbenson@redhat.com>
4583
4584 * linux-x86-low.c (x86_debug_reg_state): New function.
4585 (x86_linux_prepare_to_resume): Use the above.
4586
7b669087
GB
45872015-03-24 Gary Benson <gbenson@redhat.com>
4588
4589 * linux-low.c (current_lwp_ptid): New function.
4590 * linux-x86-low.c: Include nat/linux-nat.h.
4591 (x86_dr_low_get_addr): Use current_lwp_ptid.
4592 (x86_dr_low_get_control): Likewise.
4593 (x86_dr_low_get_status): Likewise.
4594
eef49a3d
PA
45952015-03-20 Pedro Alves <palves@redhat.com>
4596
4597 * tracepoint.c (cmd_qtstatus): Make "str" const.
4598
b2333d22
PA
45992015-03-20 Pedro Alves <palves@redhat.com>
4600
4601 * server.c (handle_general_set): Make "req_str" const.
4602
23f238d3
PA
46032015-03-19 Pedro Alves <palves@redhat.com>
4604
4605 * linux-low.c (linux_resume_one_lwp): Rename to ...
4606 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4607 instead call perror_with_name.
4608 (check_ptrace_stopped_lwp_gone): New function.
4609 (linux_resume_one_lwp): Reimplement as wrapper around
4610 linux_resume_one_lwp_throw that swallows errors if the LWP is
4611 gone.
4612
91baf43f
PA
46132015-03-19 Pedro Alves <palves@redhat.com>
4614
4615 * linux-low.c (count_events_callback, select_event_lwp_callback):
4616 No longer check whether the thread has resume_stop as last resume
4617 kind.
4618
8bf3b159
PA
46192015-03-19 Pedro Alves <palves@redhat.com>
4620
4621 * linux-low.c (count_events_callback, select_event_lwp_callback):
4622 Use the lwp's status_pending_p field, not the thread's.
4623
b90fc188
PA
46242015-03-19 Pedro Alves <palves@redhat.com>
4625
4626 * linux-low.c (select_event_lwp_callback): Update comments to
4627 no longer mention SIGTRAP.
4628
464b0089
GB
46292015-03-18 Gary Benson <gbenson@redhat.com>
4630
4631 * server.c (handle_query): Do not report vFile:fstat as supported.
4632
aa9e327f
GB
46332015-03-11 Gary Benson <gbenson@redhat.com>
4634
4635 * hostio.c (sys/types.h): New include.
4636 (sys/stat.h): Likewise.
4637 (common-remote-fileio.h): Likewise.
4638 (handle_fstat): New function.
4639 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4640
791c0056
GB
46412015-03-11 Gary Benson <gbenson@redhat.com>
4642
4643 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4644 struct stat.st_blocks and struct stat.st_blksize.
4645 * configure: Regenerate.
4646 * config.in: Likewise.
4647 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4648 (OBS): Add common-remote-fileio.o.
4649 (common-remote-fileio.o): New rule.
4650
9a9df970
PA
46512015-03-09 Pedro Alves <palves@redhat.com>
4652
4653 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4654 'struct sockaddr' pointer in 'accept' call.
4655
9eb1356e
PA
46562015-03-09 Pedro Alves <palves@redhat.com>
4657
4658 Revert:
4659 2015-03-07 Pedro Alves <palves@redhat.com>
4660 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4661 or <winsock2.h> here. Instead include "gdb_socket.h".
4662 (remote_open): Use union gdb_sockaddr_u.
4663 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4664 or <winsock2.h> here. Instead include "gdb_socket.h".
4665 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4666 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4667 or <sys/un.h>.
4668 (init_named_socket, gdb_agent_helper_thread): Use union
4669 gdb_sockaddr_u.
4670
aac331e4
PA
46712015-03-07 Pedro Alves <palves@redhat.com>
4672
4673 * configure.ac (build_warnings): Move
4674 -Wdeclaration-after-statement to the C-specific set.
4675 * configure: Regenerate.
4676
366c75fc
PA
46772015-03-07 Pedro Alves <palves@redhat.com>
4678
4679 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4680 or <winsock2.h> here. Instead include "gdb_socket.h".
4681 (remote_open): Use union gdb_sockaddr_u.
4682 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4683 or <winsock2.h> here. Instead include "gdb_socket.h".
4684 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4685 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4686 or <sys/un.h>.
4687 (init_named_socket, gdb_agent_helper_thread): Use union
4688 gdb_sockaddr_u.
4689
492d29ea
PA
46902015-03-07 Pedro Alves <palves@redhat.com>
4691
4692 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4693 instead.
4694
60a191ed
YQ
46952015-03-06 Yao Qi <yao.qi@linaro.org>
4696
4697 * linux-aarch64-low.c (aarch64_insert_point): Use
4698 show_debug_regs as a boolean.
4699 (aarch64_remove_point): Likewise.
4700
f5771b1d
PA
47012015-03-05 Pedro Alves <palves@redhat.com>
4702
4703 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4704 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4705 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4706 * nto-low.c (nto_target_ops): Likewise.
4707 * spu-low.c (spu_target_ops): Likewise.
4708 * win32-low.c (win32_target_ops): Likewise.
4709
3e572f71
PA
47102015-03-04 Pedro Alves <palves@redhat.com>
4711
72f4393d 4712 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4713 Decide whether a breakpoint triggered based on the SIGTRAP's
4714 siginfo.si_code.
72f4393d
L
4715 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4716 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4717 (linux_low_filter_event): Check for breakpoints before checking
4718 watchpoints.
4719 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4720 siginfo.si_code.
72f4393d
L
4721 (linux_stopped_by_sw_breakpoint)
4722 (linux_supports_stopped_by_sw_breakpoint)
4723 (linux_stopped_by_hw_breakpoint)
4724 (linux_supports_stopped_by_hw_breakpoint): New functions.
4725 (linux_target_ops): Install new target methods.
3e572f71 4726
1ec68e26
PA
47272015-03-04 Pedro Alves <palves@redhat.com>
4728
4729 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4730 * server.c (swbreak_feature, hwbreak_feature): New globals.
4731 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4732 (captured_main): Clear swbreak_feature and hwbreak_feature.
4733 * server.h (swbreak_feature, hwbreak_feature): Declare.
4734 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4735 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4736 supports_stopped_by_hw_breakpoint>: New fields.
4737 (target_supports_stopped_by_sw_breakpoint)
4738 (target_stopped_by_sw_breakpoint)
4739 (target_supports_stopped_by_hw_breakpoint)
4740 (target_stopped_by_hw_breakpoint): Declare.
4741
15c66dd6
PA
47422015-03-04 Pedro Alves <palves@redhat.com>
4743
4744 enum lwp_stop_reason -> enum target_stop_reason
4745 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4746 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4747 (linux_wait_1, stuck_in_jump_pad_callback)
4748 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4749 (linux_stopped_by_watchpoint):
4750 * linux-low.h (enum lwp_stop_reason): Delete.
4751 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4752 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4753
98fc70d6
YQ
47542015-03-04 Yao Qi <yao.qi@linaro.org>
4755
4756 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4757
dd2ac174
GB
47582015-03-03 Gary Benson <gbenson@redhat.com>
4759
4760 * hostio.c (handle_vFile): Fix prefix lengths.
4761
d68e53f4
MM
47622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4763
4764 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4765 ptr_bits.
4766
bf2d68ab
AA
47672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4768
4769 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4770 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4771 (clean): Add "rm -f" for above C files.
4772 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4773 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4774 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4775 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4776 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4777 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4778 (init_registers_s390x_vx_linux64)
4779 (init_registers_s390x_tevx_linux64)
4780 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4781 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4782 declarations.
4783 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4784 (s390_store_vxrs_high): New functions.
4785 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4786 NT_S390_VXRS_HIGH.
4787 (s390_arch_setup): Add logic for selecting one of the new target
4788 descriptions. Activate the new vector regsets if applicable.
4789 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4790 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4791 and init_registers_s390x_tevx_linux64.
4792
c966a859
PA
47932015-03-01 Pedro Alves <palves@redhat.com>
4794
4795 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4796 parameter.
4797
4180215b
PA
47982015-02-27 Pedro Alves <palves@redhat.com>
4799
4800 * linux-x86-low.c (u_debugreg_offset): New function.
4801 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4802
749bab01
PA
48032015-02-27 Pedro Alves <palves@redhat.com>
4804
4805 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4806 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4807 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4808 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4809 (ps_lsetfpregs, ps_getpid)
4810 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4811 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4812 (ps_lsetxregs, ps_plog): Declare.
4813
3c14e5a3
PA
48142015-02-27 Pedro Alves <palves@redhat.com>
4815
4816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4817 IP_AGENT_EXPORT_FUNC.
4818 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4819 IP_AGENT_EXPORT_FUNC.
4820 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4821 (IP_AGENT_EXPORT): Delete.
4822 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4823 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4824 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4825 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4826 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4827 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4828 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4829 (traceframe_read_count, traceframe_write_count)
4830 (traceframes_created, trace_state_variables, get_raw_reg)
4831 (get_trace_state_variable_value, set_trace_state_variable_value)
4832 (ust_loaded, helper_thread_id, cmd_buf): Use
4833 IPA_SYM_EXPORTED_NAME.
4834 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4835 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4836 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4837 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4838 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4839 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4840 EXTERN_C_PUSH/EXTERN_C_POP.
4841 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4842 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4843 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4844 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4845 (traceframe_write_count, traceframe_read_count)
4846 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4847 (about_to_request_buffer_space, get_trace_state_variable_value)
4848 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4849 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4850 EXTERN_C_PUSH/EXTERN_C_POP.
4851 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4852 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4853 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4854 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4856 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4857 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4858 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4859 Define.
4860 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4861 (IP_AGENT_EXPORT_VAR_DECL): Define.
4862 (tracing): Declare.
4863 (gdb_agent_get_raw_reg): Declare.
4864
fe978cb0
PA
48652015-02-27 Tom Tromey <tromey@redhat.com>
4866 Pedro Alves <palves@redhat.com>
4867
4868 Rename symbols whose names are reserved C++ keywords throughout.
4869
3bc3d82a
PA
48702015-02-27 Pedro Alves <palves@redhat.com>
4871
4872 * Makefile.in (COMPILER): New, get it from autoconf.
4873 (CXX): Get from autoconf instead.
4874 (COMPILE.pre): Use COMPILER.
4875 (CC-LD): Rename to ...
4876 (CC_LD): ... this. Use COMPILER.
4877 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4878 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4879 * acinclude.m4: Include build-with-cxx.m4.
4880 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4881 Disable -Werror by default if building in C++ mode.
4882 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4883 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4884 the C++ compiler. Save/restore CXXFLAGS too.
4885 * configure: Regenerate.
4886
07697489
PA
48872015-02-27 Pedro Alves <palves@redhat.com>
4888
4889 * acinclude.m4: Include libiberty.m4.
4890 * configure.ac: Call libiberty_INIT.
4891 * config.in, configure: Regenerate.
4892
9beb7c4e
PA
48932015-02-26 Pedro Alves <palves@redhat.com>
4894
4895 * linux-low.c (linux_wait_1): When incrementing the PC past a
4896 program breakpoint always use the_low_target.breakpoint_len as
4897 increment, rather than the maximum between that and
4898 the_low_target.decr_pc_after_break.
4899
8090aef2
PA
49002015-02-23 Pedro Alves <palves@redhat.com>
4901
4902 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4903 thread was doing a step-over; always adjust the PC if
4904 we stepped over a permanent breakpoint.
4905 (linux_wait_1): If we stepped over breakpoint that was on top of a
4906 permanent breakpoint, manually advance the PC past it.
4907
bc9540e8
PA
49082015-02-23 Pedro Alves <palves@redhat.com>
4909
4910 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4911 modes.
4912 (x86_fill_gregset, x86_store_gregset): Use it when handling
4913 $orig_eax.
4914
2db9a427
PA
49152015-02-20 Pedro Alves <palves@redhat.com>
4916
4917 * thread-db.c: Include "nat/linux-procfs.h".
4918 (thread_db_init): Skip listing new threads if the kernel supports
4919 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4920
afa8d396
PA
49212015-02-20 Pedro Alves <palves@redhat.com>
4922
4923 * linux-low.c (status_pending_p_callback): Use ptid_match.
4924
c9587f88
AT
49252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4926
4927 PR breakpoints/16812
4928 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4929 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4930 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4931
b05ec7a5
AT
49322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4933
4934 PR breakpoints/15956
4935 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4936
d33501a5
MM
49372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4938
4939 * linux-low.c (linux_low_btrace_conf): Print size.
4940 * server.c (handle_btrace_conf_general_set): New.
4941 (hanle_general_set): Call handle_btrace_conf_general_set.
4942 (handle_query): Report Qbtrace-conf:bts:size as supported.
4943
f4abbc16
MM
49442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4945
4946 * linux-low.c (linux_low_enable_btrace): Update parameters.
4947 (linux_low_btrace_conf): New.
4948 (linux_target_ops)<to_btrace_conf>: Initialize.
4949 * server.c (current_btrace_conf): New.
4950 (handle_btrace_enable): Rename to ...
4951 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4952 to target_enable_btrace. Update comment. Update users.
4953 (handle_qxfer_btrace_conf): New.
4954 (qxfer_packets): Add btrace-conf entry.
4955 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4956 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4957 (target_ops)<read_btrace_conf>: New.
4958 (target_enable_btrace): Update parameters.
4959 (target_read_btrace_conf): New.
4960
043c3577
MM
49612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4962
4963 * server.c (handle_btrace_general_set): Remove call to
4964 target_supports_btrace.
4965 (supported_btrace_packets): New.
4966 (handle_query): Call supported_btrace_packets.
4967 * target.h: include btrace-common.h.
4968 (btrace_target_info): Removed.
4969 (supports_btrace, target_supports_btrace): Update parameters.
4970
734b0e4b
MM
49712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4972
4973 * Makefile.in (SFILES): Add common/btrace-common.c.
4974 (OBS): Add common/btrace-common.o.
4975 (btrace-common.o): Add build rules.
4976 * linux-low: Include btrace-common.h.
4977 (linux_low_read_btrace): Use struct btrace_data. Call
4978 btrace_data_init and btrace_data_fini.
4979
d6c146e9
PA
49802015-02-06 Pedro Alves <palves@redhat.com>
4981
4982 * thread-db.c (find_new_threads_callback): Add debug output.
4983
20ba1ce6
PA
49842015-02-04 Pedro Alves <palves@redhat.com>
4985
4986 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4987 (resume_stopped_resumed_lwps): New function.
4988 (linux_wait_for_event_filtered): Use it.
4989
8cc73a39
SDJ
49902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4991
4992 * Makefile.in (SFILES): Add linux-personality.c.
4993 (linux-personality.o): New rule.
4994 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4995 list of objects to be built.
4996 * linux-low.c: Include nat/linux-personality.h.
4997 (linux_create_inferior): Remove code to disable address space
4998 randomization (moved to ../nat/linux-personality.c). Create
4999 cleanup to disable address space randomization.
5000
fb23d554
SDJ
50012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5002
5003 * Makefile.in (posix-strerror.o): New rule.
5004 (mingw-strerror.o): Likewise.
5005 * configure: Regenerated.
5006 * configure.ac: Source file ../common/common.host. Initialize new
5007 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5008
cdf43629
YQ
50092015-01-14 Yao Qi <yao@codesourcery.com>
5010
5011 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5012 (ppc-linux.o): New rule.
5013 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5014 * configure.ac: AC_CHECK_FUNCS(getauxval).
5015 * config.in: Re-generated.
5016 * configure: Re-generated.
5017 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5018 ppc64_64bit_inferior_p
5019
514c5338
YQ
50202015-01-14 Yao Qi <yao@codesourcery.com>
5021
5022 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5023 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5024 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5025 (PT_ORIG_R3, PT_TRAP): Likewise.
5026 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5027 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5028 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5029
3368c1e5
JB
50302015-01-10 Joel Brobecker <brobecker@adacore.com>
5031
5032 * i387-fp.c (i387_cache_to_xsave): In look over
5033 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5034 zmmh_low_space field by use of zmmh_high_space.
5035
582511be
PA
50362015-01-09 Pedro Alves <palves@redhat.com>
5037
5038 * linux-low.c (step_over_bkpt): Move higher up in the file.
5039 (handle_extended_wait): Don't store the stop_pc here.
5040 (get_stop_pc): Adjust comments and rename to ...
5041 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5042 stopped for a software breakpoint or hardware breakpoint.
5043 (thread_still_has_status_pending_p): New function.
5044 (status_pending_p_callback): Use
5045 thread_still_has_status_pending_p. If the event is no longer
5046 interesting, resume the LWP.
5047 (handle_tracepoints): Add assert.
5048 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5049 (wstatus_maybe_breakpoint): New function.
5050 (cancel_breakpoint): Delete function.
5051 (check_stopped_by_watchpoint): New function, factored out from
5052 linux_low_filter_event.
5053 (lp_status_maybe_breakpoint): Delete function.
5054 (linux_low_filter_event): Remove filter_ptid argument.
5055 Leave thread group exits pending here. Store the LWP's stop PC.
5056 Always leave events pending.
5057 (linux_wait_for_event_filtered): Pull all events out of the
5058 kernel, and leave them all pending.
5059 (count_events_callback, select_event_lwp_callback): Consider all
5060 events.
5061 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5062 (select_event_lwp): Only give preference to the stepping LWP in
5063 all-stop mode. Adjust comments.
5064 (ignore_event): New function.
5065 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5066 references to cancel_breakpoints. Adjust to renames. Also give
5067 equal priority to all LWPs that have had events in non-stop mode.
5068 If reporting a software breakpoint event, unadjust the LWP's PC.
5069 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5070 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5071 Adjust.
5072 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5073 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5074 (linux_stopped_by_watchpoint): Adjust.
5075 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5076 * linux-low.h (enum lwp_stop_reason): New.
5077 (struct lwp_info) <stop_pc>: Adjust comment.
5078 <stopped_by_watchpoint>: Delete field.
5079 <stop_reason>: New field.
5080 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5081 * mem-break.c (software_breakpoint_inserted_here)
5082 (hardware_breakpoint_inserted_here): New function.
5083 * mem-break.h (software_breakpoint_inserted_here)
5084 (hardware_breakpoint_inserted_here): Declare.
5085 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5086 (cancel_breakpoints): Delete.
5087 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5088 (upload_fast_traceframes): Remove references to
5089 cancel_breakpoints.
5090
a33e3959
PA
50912015-01-09 Pedro Alves <palves@redhat.com>
5092
5093 * thread-db.c (find_new_threads_callback): Ignore thread if the
5094 kernel thread ID is -1.
5095
8784d563
PA
50962015-01-09 Pedro Alves <palves@redhat.com>
5097
5098 * linux-low.c (linux_attach_fail_reason_string): Move to
5099 nat/linux-ptrace.c, and rename.
5100 (linux_attach_lwp): Update comment.
5101 (attach_proc_task_lwp_callback): New function.
5102 (linux_attach): Adjust to rename and use
5103 linux_proc_attach_tgid_threads.
5104 (linux_attach_fail_reason_string): Delete declaration.
5105
76f2b779
JB
51062015-01-01 Joel Brobecker <brobecker@adacore.com>
5107
5108 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5109 * server.c (gdbserver_version): Likewise.
5110
fafcc06a
SDJ
51112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5112
5113 * remote-utils.c: Include ctype.h.
5114 (input_interrupt): Explicitly handle the case when the char
5115 received is the NUL byte. Improve the printing of non-ASCII
5116 characters.
5117
beed38b8
JB
51182014-12-16 Joel Brobecker <brobecker@adacore.com>
5119
5120 * linux-low.c (linux_low_filter_event): Update call to
5121 linux_enable_event_reporting following the addition of
5122 a new parameter to that function.
5123
bf330350
CU
51242014-12-16 Catalin Udma <catalin.udma@freescale.com>
5125
5126 PR server/17457
5127 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5128 (AARCH64_FPCR_REGNO): Likewise.
5129 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5130 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5131 (aarch64_store_fpregset): Likewise.
5132
5227d625
JB
51332014-12-15 Joel Brobecker <brobecker@adacore.com>
5134
5135 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5136 Remove FIXME comment about assumption about N.
5137
f93b65a0
JB
51382014-12-13 Joel Brobecker <brobecker@adacore.com>
5139
5140 * configure.ac: If large-file support is disabled in GDBserver,
5141 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5142 * configure: Regenerate.
5143
e5a9158d
AA
51442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5145
5146 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5147 warning upon ENODATA from ptrace.
5148 * linux-s390-low.c (s390_store_tdb): New.
5149 (s390_regsets): Add regset for NT_S390_TDB.
5150
feea5f36
AA
51512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5152
5153 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5154 without a fill_function.
5155 * linux-s390-low.c (s390_fill_last_break): Remove.
5156 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5157 (s390_arch_setup): Use regset's size instead of fill_function for
5158 loop end condition.
5159
098dbe61
AA
51602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5161
5162 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5163 the regset's store function when ptrace returned an error.
5164 * regcache.c (get_thread_regcache): Invalidate register cache
5165 before fetching inferior's registers.
5166
28eef672
AA
51672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5168
5169 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5170 while-loop as for-loop.
5171 (regsets_store_inferior_registers): Likewise.
5172
bdca27a2
YQ
51732014-11-28 Yao Qi <yao@codesourcery.com>
5174
5175 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5176 * config.in, configure: Re-generate.
5177 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5178 is defined.
5179
9c232dda
YQ
51802014-11-21 Yao Qi <yao@codesourcery.com>
5181
5182 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5183 (AC_CHECK_HEADERS): Remove malloc.h.
5184 * configure: Re-generated.
5185 * config.in: Re-generated.
5186 * server.h: Don't include alloca.h and malloc.h.
5187 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5188 Don't include malloc.h.
5189
43968415
JB
51902014-11-17 Joel Brobecker <brobecker@adacore.com>
5191
5192 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5193 corresponding ERRNO check in same block.
5194
40e91bc7
PA
51952014-11-12 Pedro Alves <palves@redhat.com>
5196
5197 * server.c (cont_thread): Update comment.
5198 (start_inferior, attach_inferior): No longer clear cont_thread.
5199 (handle_v_cont): No longer set cont_thread.
5200 (captured_main): Clear cont_thread each time a GDB connects.
5201
c2c118cf
PA
52022014-11-12 Pedro Alves <palves@redhat.com>
5203
5204 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5205 thread, and don't resume all threads if the Hc thread has exited.
5206
78708b7c
PA
52072014-11-12 Pedro Alves <palves@redhat.com>
5208
5209 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5210 the process group instead of to a specific LWP.
5211
a2abc7de
PA
52122014-10-15 Pedro Alves <palves@redhat.com>
5213
5214 PR server/17487
5215 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5216 parameter.
5217 (arm_set_thread_context): Delete.
5218 (the_low_target): Adjust.
5219 * win32-i386-low.c (debug_registers_changed)
5220 (debug_registers_used): Delete.
5221 (update_debug_registers_callback): New function.
5222 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5223 needing to update their debug registers.
5224 (win32_get_current_dr): New function.
5225 (x86_dr_low_get_addr, x86_dr_low_get_control)
5226 (x86_dr_low_get_status): Fetch the debug register from the thread
5227 record's context.
5228 (i386_initial_stuff): Adjust.
5229 (i386_get_thread_context): Remove current_event parameter. Don't
5230 clear debug_registers_changed nor copy DR values to
5231 debug_reg_state.
5232 (i386_set_thread_context): Delete.
5233 (i386_prepare_to_resume): New function.
5234 (i386_thread_added): Mark the thread as needing to update irs
5235 debug registers.
5236 (the_low_target): Remove i386_set_thread_context and install
5237 i386_prepare_to_resume.
5238 * win32-low.c (win32_get_thread_context): Adjust.
5239 (win32_set_thread_context): Use SetThreadContext
5240 directly.
5241 (win32_prepare_to_resume): New function.
5242 (win32_require_context): New function, factored out from ...
5243 (thread_rec): ... this.
5244 (continue_one_thread): Call win32_prepare_to_resume on each thread
5245 we're about to continue.
5246 (win32_resume): Call win32_prepare_to_resume on the event thread.
5247 * win32-low.h (struct win32_thread_info)
5248 <debug_registers_changed>: New field.
5249 (struct win32_target_ops): Change prototype of set_thread_context,
5250 delete set_thread_context and add prepare_to_resume.
5251 (win32_require_context): New declaration.
5252
a442d071
GB
52532014-10-08 Gary Benson <gbenson@redhat.com>
5254
5255 * server.h: Do not include common-exceptions.h.
5256
6f1947e8
GB
52572014-10-08 Gary Benson <gbenson@redhat.com>
5258
5259 * server.h: Do not include cleanups.h.
5260
63b434a4
JH
52612014-09-30 James Hogan <james.hogan@imgtec.com>
5262
5263 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5264 mips64-dsp-linux.c.
5265
c4d9ceb6
YQ
52662014-09-23 Yao Qi <yao@codesourcery.com>
5267
5268 * linux-low.c (lp_status_maybe_breakpoint): New function.
5269 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5270 (count_events_callback): Likewise.
5271 (select_event_lwp_callback): Likewise.
5272 (cancel_breakpoints_callback): Likewise.
5273
89a5711c
DB
52742014-09-19 Don Breazeal <donb@codesourcery.com>
5275
5276 * linux-low.c (handle_extended_wait): Call
5277 linux_ptrace_get_extended_event.
5278 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5279 linux_is_extended_waitstatus.
5280
bffc0964
JB
52812014-09-16 Joel Brobecker <brobecker@adacore.com>
5282
5283 * Makefile.in (CPPFLAGS): Define.
5284 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5285 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5286
0bfdf32f
GB
52872014-09-16 Gary Benson <gbenson@redhat.com>
5288
5289 * inferiors.h (current_inferior): Renamed as...
5290 (current_thread): New variable. All uses updated.
5291 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5292 (maybe_move_out_of_jump_pad): Likewise.
5293 (cancel_breakpoint): Likewise.
5294 (linux_low_filter_event): Likewise.
5295 (wait_for_sigstop): Likewise.
5296 (linux_resume_one_lwp): Likewise.
5297 (need_step_over_p): Likewise.
5298 (start_step_over): Likewise.
5299 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5300 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5301 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5302 and save_inferior as saved_thread.
5303 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5304 saved_thread.
5305 (regcache_invalidate_thread): Likewise.
5306 * remote-utils.c (prepare_resume_reply): Likewise.
5307 * thread-db.c (thread_db_get_tls_address): Likewise.
5308 (disable_thread_event_reporting): Likewise.
5309 (remove_thread_event_breakpoints): Likewise.
5310 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5311 as saved_thread.
5312 * target.h (set_desired_inferior): Renamed as...
5313 (set_desired_thread): New declaration. All uses updated.
5314 * server.c (myresume): Updated comment to reference thread instead
5315 of inferior.
5316 (handle_serial_event): Likewise.
5317 (handle_target_event): Likewise.
5318
361c8ade
GB
53192014-09-12 Tom Tromey <tromey@redhat.com>
5320 Gary Benson <gbenson@redhat.com>
5321
5322 * regcache.h: Include common-regcache.h.
5323 (regcache_read_pc): Don't declare.
5324 * regcache.c (get_thread_regcache_for_ptid): New function.
5325
bd9269f7
GB
53262014-09-11 Tom Tromey <tromey@redhat.com>
5327 Gary Benson <gbenson@redhat.com>
5328
5329 * symbol.c: New file.
5330 * Makefile.in (SFILES): Add symbol.c.
5331 (OBS): Add symbol.o.
5332
f8c1d06b
GB
53332014-09-11 Gary Benson <gbenson@redhat.com>
5334
5335 * target.c (target_stop_ptid, target_continue_ptid): New
5336 functions.
5337
721ec300
GB
53382014-09-11 Tom Tromey <tromey@redhat.com>
5339 Gary Benson <gbenson@redhat.com>
5340
5341 * target.h: Include target/target.h.
5342 * target.c (target_read_memory, target_read_uint32)
5343 (target_write_memory): New functions.
5344
c5e92cca
GB
53452014-09-11 Gary Benson <gbenson@redhat.com>
5346
5347 * server.h (debug_hw_points): Don't declare.
5348 * server.c (debug_hw_points): Don't define. Replace all uses
5349 with show_debug_regs.
5350 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5351 all uses with show_debug_regs.
5352
2e4bb98a
EBM
53532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5354
5355 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5356 endianness into account.
5357 (ppc_supply_ptrace_register): Likewise.
5358
ac740bc7
JH
53592014-09-03 James Hogan <james.hogan@imgtec.com>
5360
5361 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5362 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5363
97ea6506
GB
53642014-09-03 Gary Benson <gbenson@redhat.com>
5365
5366 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5367 ALL_DEBUG_ADDRESS_REGISTERS.
5368
df7e5265
GB
53692014-09-02 Gary Benson <gbenson@redhat.com>
5370
5371 * i386-low.h: Renamed as...
5372 * x86-low.h: New file. All type, function and variable name
5373 prefixes changed from "i386_" to "x86_". All references updated.
5374 * i386-low.c: Renamed as...
5375 * x86-low.c: New file. All type, function and variable name
5376 prefixes changed from "i386_" to "x86_". All references updated.
5377
ed859da7
GB
53782014-09-02 Gary Benson <gbenson@redhat.com>
5379
5380 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5381 (x86_linux_new_thread): Likewise.
5382
860789c7
GB
53832014-08-29 Gary Benson <gbenson@redhat.com>
5384
5385 * server.h (setjmp.h): Do not include.
5386 (toplevel): Do not declare.
5387 (common-exceptions.h): Include.
5388 (cleanups.h): Likewise.
5389 * server.c (toplevel): Do not define.
5390 (exit_code): New static global.
5391 (detach_or_kill_for_exit_cleanup): New function.
5392 (main): New function. Original main renamed to...
5393 (captured_main): New function.
5394 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5395
ff55e1b5
GB
53962014-08-29 Gary Benson <gbenson@redhat.com>
5397
5398 * Makefile.in (SFILES): Add common/common-exceptions.c.
5399 (OBS): Add common-exceptions.o.
5400 (common-exceptions.o): New rule.
5401 * utils.c (prepare_to_throw_exception): New function.
5402
e9bcb658
GB
54032014-08-29 Gary Benson <gbenson@redhat.com>
5404
5405 * config.in: Regenerate.
5406 * configure: Likewise.
5407
e3180625
GB
54082014-08-29 Gary Benson <gbenson@redhat.com>
5409
5410 * Makefile.in (SFILES): Add common/cleanups.c.
5411 (OBS): cleanups.o.
5412 (cleanups.o): New rule.
5413
e3d6ba5d
GB
54142014-08-29 Gary Benson <gbenson@redhat.com>
5415
5416 * utils.c (internal_vwarning): New function.
5417
7096e886
GB
54182014-08-28 Gary Benson <gbenson@redhat.com>
5419
5420 * utils.h (fatal): Remove declaration.
5421 * utils.c (fatal): Remove function.
5422
14ce3192
GB
54232014-08-28 Gary Benson <gbenson@redhat.com>
5424
5425 * tracepoint.c (gdb_agent_init): Replace fatal with
5426 perror_with_name.
5427 (initialize_tracepoint): Likewise.
5428
50278d59
GB
54292014-08-28 Gary Benson <gbenson@redhat.com>
5430
5431 * remote-utils.c (remote_prepare): Replace fatal with error.
5432
aa96c426
GB
54332014-08-28 Gary Benson <gbenson@redhat.com>
5434
5435 * linux-low.c (linux_async): Replace fatal with warning.
5436 Tidy up and return.
5437 (linux_start_non_stop): Return -1 if linux_async failed.
5438
f7160e97
GB
54392014-08-28 Gary Benson <gbenson@redhat.com>
5440
5441 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5442 gdb_assert.
5443 (i386_dr_low_get_addr): Remove vague comment.
5444 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5445 gdb_assert.
5446
38e08fca
GB
54472014-08-28 Gary Benson <gbenson@redhat.com>
5448
5449 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5450 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5451 internal_error.
5452 (linux_resume_one_lwp): Likewise.
5453 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5454 gdb_assert.
5455 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5456 with internal_error.
5457 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5458 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5459 (find_register_by_name): Replace fatal with internal_error.
5460 (find_regno): Likewise.
5461 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5462 * thread-db.c (thread_db_create_event): Likewise.
5463 (thread_db_load_search): Likewise.
5464 (try_thread_db_load_1): Likewise.
5465 * tracepoint.c (get_jump_space_head): Replace fatal with
5466 internal_error.
5467 (claim_trampoline_space): Likewise.
5468 (have_fast_tracepoint_trampoline_buffer): Likewise.
5469 (cmd_qtstart): Likewise.
5470 (stop_tracing): Likewise.
5471 (fast_tracepoint_collecting): Likewise.
5472 (target_malloc): Likewise.
5473 (download_tracepoint): Likewise.
5474 (download_trace_state_variables): Replace check with gdb_assert.
5475 (upload_fast_traceframes): Replace fatal with internal_error.
5476
34abf635
GB
54772014-08-19 Tom Tromey <tromey@redhat.com>
5478 Gary Benson <gbenson@redhat.com>
5479
5480 * Makefile.in (SFILES): Add common/common-debug.c.
5481 (OBS): Add common-debug.o.
5482 (common-debug.o): New rule.
5483 * debug.h (debug_printf): Don't declare.
5484 * debug.c (debug_printf): Renamed and rewritten as...
5485 (debug_vprintf): New function.
5486
f6e94d78
GB
54872014-08-19 Gary Benson <gbenson@redhat.com>
5488
5489 * utils.h: Do not include print-utils.h.
5490
9239eeab
GB
54912014-08-19 Tom Tromey <tromey@redhat.com>
5492 Gary Benson <gbenson@redhat.com>
5493
5494 * server.h: Add static assertion.
5495 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5496
ef87c8bb
GB
54972014-08-19 Tom Tromey <tromey@redhat.com>
5498 Gary Benson <gbenson@redhat.com>
5499
5500 * Makefile.in (SFILES): Add common/errors.c.
5501 (OBS): Add errors.o.
5502 (IPA_OBS): Add errors-ipa.o.
5503 (errors.o): New rule.
5504 (errors-ipa.o): Likewise.
5505 * utils.h (perror_with_name, error, warning): Don't declare.
5506 * utils.c (warning): Renamed and rewritten as...
5507 (vwarning): New function.
5508 (error): Renamed and rewritten as...
5509 (verror): New function.
5510 (internal_error): Renamed and rewritten as...
5511 (internal_verror): New function.
5512
bb974a24
GB
55132014-08-07 Gary Benson <gbenson@redhat.com>
5514
5515 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5516 * configure: Regenerate.
5517 * config.in: Likewise.
5518 * server.h: Do not include errno.h.
5519 * event-loop.c: Likewise.
5520 * hostio-errno.c: Likewise.
5521 * linux-low.c: Likewise.
5522 * remote-utils.c: Likewise.
5523 * spu-low.c: Likewise.
5524 * utils.c: Likewise.
5525 * gdbreplay.c: Unconditionally include errno.h.
5526
6d3d12eb
GB
55272014-08-07 Gary Benson <gbenson@redhat.com>
5528
5529 * server.h: Do not include string.h.
5530 * event-loop.c: Likewise.
5531 * linux-low.c: Likewise.
5532 * regcache.c: Likewise.
5533 * remote-utils.c: Likewise.
5534 * spu-low.c: Likewise.
5535 * utils.c: Likewise.
5536
dccbb609
GB
55372014-08-07 Gary Benson <gbenson@redhat.com>
5538
5539 * server.h: Do not include gdb_assert.h.
5540
e76df0d0
GB
55412014-08-07 Gary Benson <gbenson@redhat.com>
5542
5543 * server.h: Do not include common-utils.h.
5544
4cb9c816
GB
55452014-08-07 Gary Benson <gbenson@redhat.com>
5546
5547 * server.h: Do not include ptid.h.
5548 * notif.h: Likewise.
5549
3995eeee
GB
55502014-08-07 Gary Benson <gbenson@redhat.com>
5551
5552 * server.h: Do not include gdb_locale.h.
5553
cb9f1a9b
GB
55542014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include gdb/signals.h.
5557 * win32-low.c: Likewise.
5558
a5fceff8
GB
55592014-08-07 Gary Benson <gbenson@redhat.com>
5560
5561 * server.h: Do not include pathmax.h.
5562
b9391142
GB
55632014-08-07 Gary Benson <gbenson@redhat.com>
5564
5565 * server.h: Do not include libiberty.h.
5566 * linux-bfin-low.c: Likewise.
5567
0e443c87
GB
55682014-08-07 Gary Benson <gbenson@redhat.com>
5569
5570 * server.h: Do not include ansidecl.h.
5571
8ebb3f56
GB
55722014-08-07 Gary Benson <gbenson@redhat.com>
5573
5574 * linux-x86-low.c: Do not include stddef.h.
5575 * lynx-ppc-low.c: Likewise.
5576 * tracepoint.c: Likewise.
5577
8980bdf6
GB
55782014-08-07 Gary Benson <gbenson@redhat.com>
5579
5580 * server.h: Do not include stdarg.h.
5581 * nto-low.c: Likewise.
5582
d7096f71
GB
55832014-08-07 Gary Benson <gbenson@redhat.com>
5584
5585 * server.h: Do not include stdlib.h.
5586 * inferiors.c: Likewise.
5587 * linux-low.c: Likewise.
5588 * regcache.c: Likewise.
5589 * spu-low.c: Likewise.
5590 * tracepoint.c: Likewise.
5591 * utils.c: Likewise.
5592
d02f550d
GB
55932014-08-07 Gary Benson <gbenson@redhat.com>
5594
5595 * server.h: Do not include stdio.h.
5596 * linux-low.c: Likewise.
5597 * remote-utils.c: Likewise.
5598 * spu-low.c: Likewise.
5599 * utils.c: Likewise.
5600 * wincecompat.c: Likewise.
5601
87f6c4e3
GB
56022014-08-06 Gary Benson <gbenson@redhat.com>
5603
5604 * regcache.c (init_register_cache): Move conditionals inside if.
5605
7089dca4
GB
56062014-08-06 Gary Benson <gbenson@redhat.com>
5607
5608 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5609
462f517e
GB
56102014-07-31 Gary Benson <gbenson@redhat.com>
5611
5612 * ax.h: Do not include server.h.
5613 * gdbthread.h: Likewise.
5614 * lynx-low.h: Likewise.
5615 * notif.h: Likewise.
5616
976411d6
GB
56172014-07-30 Gary Benson <gbenson@redhat.com>
5618
5619 * server.h: Include common-defs.h.
5620 Do not include config.h or build-gnulib-gdbserver/config.h.
5621
d41f6d8e
GB
56222014-07-30 Gary Benson <gbenson@redhat.com>
5623
5624 * hostio-errno.c: Move server.h to top of includes list.
5625 * inferiors.c: Likewise.
5626 * linux-x86-low.c: Likewise.
5627 * notif.c: Include server.h.
5628
314c6a35
TT
56292014-07-24 Tom Tromey <tromey@redhat.com>
5630 Gary Benson <gbenson@redhat.com>
5631
5632 * server.h (CORE_ADDR): Now unsigned.
5633
69ff6be5
PA
56342014-07-16 Pedro Alves <palves@redhat.com>
5635
5636 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5637
ce9e3fe7
PA
56382014-07-15 Pedro Alves <palves@redhat.com>
5639
5640 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5641 copy.
5642
e76126e8
PA
56432014-07-11 Pedro Alves <palves@redhat.com>
5644
5645 * linux-low.c (kill_wait_lwp): New function, based on
5646 kill_one_lwp_callback, but use my_waitpid directly.
5647 (kill_one_lwp_callback, linux_kill): Use it.
5648
8e9db26e
PA
56492014-06-23 Pedro Alves <palves@redhat.com>
5650
5651 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5652 before setting DR0..DR3.
5653
698b3e08
GB
56542014-06-20 Gary Benson <gbenson@redhat.com>
5655
5656 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5657 * configure: Regenerated.
5658 * config.in: Likewise.
5659
125f8a3d
GB
56602014-06-20 Gary Benson <gbenson@redhat.com>
5661
5662 * Makefile.in (SFILES): Update locations for files moved
5663 from common to nat.
5664 (object file files): Reordered.
5665
42995dbd
GB
56662014-06-20 Gary Benson <gbenson@redhat.com>
5667
5668 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5669 (i386_dr_low_set_addr): Likewise.
5670 (i386_dr_low_get_addr): Likewise.
5671 (i386_dr_low_can_set_control): Likewise.
5672 (i386_dr_low_set_control): Likewise.
5673 (i386_dr_low_get_control): Likewise.
5674 (i386_dr_low_get_status): Likewise.
5675 (i386_get_debug_register_length): Likewise.
5676 * linux-x86-low.c (i386_dr_low_set_addr):
5677 Changed signature. Made static.
5678 (i386_dr_low_get_addr): Likewise.
5679 (i386_dr_low_set_control): Likewise.
5680 (i386_dr_low_get_control): Likewise.
5681 (i386_dr_low_get_status): Likewise.
5682 (i386_dr_low): New global variable.
5683 * win32-i386-low.c (i386_dr_low_set_addr):
5684 Changed signature. Made static.
5685 (i386_dr_low_get_addr): Likewise.
5686 (i386_dr_low_set_control): Likewise.
5687 (i386_dr_low_get_control): Likewise.
5688 (i386_dr_low_get_status): Likewise.
5689 (i386_dr_low): New global variable.
5690
e1d2394b
MS
56912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5692
5693 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5694 * Makefile.in (AR, AR_FLAGS): Define.
5695 * configure: Regenerate.
5696
3a8ee006
GB
56972014-06-19 Gary Benson <gbenson@redhat.com>
5698
5699 * Makefile.in (i386-dregs.o): New rule.
5700 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5701 * i386-low.c (target.h): Remove include.
5702 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5703 (DR_CONTROL_SHIFT): Likewise.
5704 (DR_CONTROL_SIZE): Likewise.
5705 (DR_RW_EXECUTE): Likewise.
5706 (DR_RW_WRITE): Likewise.
5707 (DR_RW_READ): Likewise.
5708 (DR_RW_IORW): Likewise.
5709 (DR_LEN_1): Likewise.
5710 (DR_LEN_2): Likewise.
5711 (DR_LEN_4): Likewise.
5712 (DR_LEN_8): Likewise.
5713 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5714 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5715 (DR_ENABLE_SIZE): Likewise.
5716 (DR_LOCAL_SLOWDOWN): Likewise.
5717 (DR_GLOBAL_SLOWDOWN): Likewise.
5718 (DR_CONTROL_RESERVED): Likewise.
5719 (I386_DR_CONTROL_MASK): Likewise.
5720 (I386_DR_VACANT): Likewise.
5721 (I386_DR_LOCAL_ENABLE): Likewise.
5722 (I386_DR_GLOBAL_ENABLE): Likewise.
5723 (I386_DR_DISABLE): Likewise.
5724 (I386_DR_SET_RW_LEN): Likewise.
5725 (I386_DR_GET_RW_LEN): Likewise.
5726 (I386_DR_WATCH_HIT): Likewise.
5727 (i386_wp_op_t): Likewise.
5728 (i386_show_dr): Likewise.
5729 (i386_length_and_rw_bits): Likewise.
5730 (i386_insert_aligned_watchpoint): Likewise.
5731 (i386_remove_aligned_watchpoint): Likewise.
5732 (i386_handle_nonaligned_watchpoint): Likewise.
5733 i386_update_inferior_debug_regs(): Likewise.
5734 (i386_dr_insert_watchpoint): Likewise.
5735 (i386_dr_remove_watchpoint): Likewise.
5736 (i386_dr_region_ok_for_watchpoint): Likewise.
5737 (i386_dr_stopped_data_address): Likewise.
5738 (i386_dr_stopped_by_watchpoint): Likewise.
5739
8f26655c
GB
57402014-06-19 Gary Benson <gbenson@redhat.com>
5741
5742 * i386-low.c (i386_dr_show): Renamed to
5743 i386_show_dr and made static. All uses updated.
5744 (i386_dr_length_and_rw_bits): Renamed to
5745 i386_length_and_rw_bits and made static.
5746 All uses updated.
5747 (i386_dr_insert_aligned_watchpoint): Renamed to
5748 i386_insert_aligned_watchpoint and made static.
5749 All uses updated.
5750 (i386_dr_remove_aligned_watchpoint): Renamed to
5751 i386_remove_aligned_watchpoint and made static.
5752 All uses updated.
5753 (i386_dr_update_inferior_debug_regs): Renamed to
5754 i386_update_inferior_debug_regs and made static.
5755 All uses updated.
5756
b9228891
GB
57572014-06-18 Gary Benson <gbenson@redhat.com>
5758
5171def3
GB
5759 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5760 (i386_dr_low_can_set_control): Likewise.
5761 (i386_get_debug_register_length): Likewise.
5762 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5763 (i386_dr_low_can_set_control): Likewise.
5764 (i386_get_debug_register_length): Likewise.
5765
57662014-06-17 Gary Benson <gbenson@redhat.com>
5767
b9228891
GB
5768 * i386-low.h (i386-dregs.h): New include.
5769 (DR_FIRSTADDR): Now in i386-dregs.h.
5770 (DR_LASTADDR): Likewise.
5771 (DR_NADDR): Likewise.
5772 (DR_STATUS): Likewise.
5773 (DR_CONTROL): Likewise.
5774 (i386_debug_reg_state): Likewise.
5775 (i386_dr_insert_watchpoint): Likewise.
5776 (i386_dr_remove_watchpoint): Likewise.
5777 (i386_dr_region_ok_for_watchpoint): Likewise.
5778 (i386_dr_stopped_data_address): Likewise.
5779 (i386_dr_stopped_by_watchpoint): Likewise.
5780 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5781
4be83cc2
GB
57822014-06-18 Gary Benson <gbenson@redhat.com>
5783
5784 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5785 i386_dr_insert_watchpoint.
5786 (i386_low_remove_watchpoint): Renamed to
5787 i386_dr_remove_watchpoint.
5788 (i386_low_region_ok_for_watchpoint): Renamed to
5789 i386_dr_region_ok_for_watchpoint.
5790 (i386_low_stopped_data_address): Renamed to
5791 i386_dr_stopped_data_address.
5792 (i386_low_stopped_by_watchpoint): Renamed to
5793 i386_dr_stopped_by_watchpoint.
5794 * i386-low.c (i386_show_dr): Renamed to
5795 i386_dr_show and made nonstatic. All uses updated.
5796 (i386_length_and_rw_bits): Renamed to
5797 i386_dr_length_and_rw_bits and made nonstatic.
5798 All uses updated.
5799 (i386_insert_aligned_watchpoint): Renamed to
5800 i386_dr_insert_aligned_watchpoint and made nonstatic.
5801 All uses updated.
5802 (i386_remove_aligned_watchpoint): Renamed to
5803 i386_dr_remove_aligned_watchpoint and made nonstatic.
5804 All uses updated.
5805 (i386_update_inferior_debug_regs): Renamed to
5806 i386_dr_update_inferior_debug_regs and made nonstatic.
5807 All uses updated.
5808 (i386_low_insert_watchpoint): Renamed to
5809 i386_dr_insert_watchpoint. All uses updated.
5810 (i386_low_remove_watchpoint): Renamed to
5811 i386_dr_remove_watchpoint. All uses updated.
5812 (i386_low_region_ok_for_watchpoint): Renamed to
5813 i386_dr_region_ok_for_watchpoint. All uses updated.
5814 (i386_low_stopped_data_address): Renamed to
5815 i386_dr_stopped_data_address. All uses updated.
5816 (i386_low_stopped_by_watchpoint): Renamed to
5817 i386_dr_stopped_by_watchpoint. All uses updated.
5818
131aa0d4
GB
58192014-06-18 Gary Benson <gbenson@redhat.com>
5820
5821 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5822 (i386_dr_low_can_set_control): Likewise.
5823 (i386_insert_aligned_watchpoint): New check.
5824
d9305f7f
GB
58252014-06-18 Gary Benson <gbenson@redhat.com>
5826
5827 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5828 Renamed to state.
5829
e927c9fc
GB
58302014-06-18 Gary Benson <gbenson@redhat.com>
5831
5832 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5833 instead of fatal and error.
5834 (i386_handle_nonaligned_watchpoint): Likewise.
5835
1b6d4134
GB
58362014-06-18 Gary Benson <gbenson@redhat.com>
5837
5838 * i386-low.c (i386_get_debug_register_length): New macro.
5839 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5840 (i386_show_dr): Use debug_printf instead of fprintf. Use
5841 phex to format values.
5842
6e62758f
GB
58432014-06-18 Gary Benson <gbenson@redhat.com>
5844
5845 * i386-low.h: Comment changes.
5846 * i386-low.c: Likewise.
5847
fc6e2f03
GB
58482014-06-18 Gary Benson <gbenson@redhat.com>
5849
5850 * i386-low.c: Whitespace changes.
5851
f9d1eeed
TT
58522014-06-12 Tom Tromey <tromey@redhat.com>
5853
5854 * utils.c (freeargv): Remove.
5855
0b04e523
TT
58562014-06-12 Tom Tromey <tromey@redhat.com>
5857
5858 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5859 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5860 (parse_debug_format_options): Likewise.
5861 (gdbserver_usage): Likewise.
5862 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5863 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5864 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5865 against libiberty.
5866 ($(LIBGNU)): Depend on libiberty.
5867 (all-lib): Recurse into all subdirs.
5868 (install-only): Invoke "install" target in subdirs.
5869 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5870 targets.
5871 * configure: Rebuild.
5872 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5873 for vasprintf, vsnprintf, or gettimeofday.
5874 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5875 srv_tgtobj.
5876
270c9937
JB
58772014-06-05 Joel Brobecker <brobecker@adacore.com>
5878
5879 * development.sh: Delete.
5880 * Makefile.in (config.status): Adjust dependency on development.sh.
5881 * configure.ac: Adjust development.sh source call.
5882 * configure: Regenerate.
5883
0a261ed8
PA
58842014-06-02 Pedro Alves <palves@redhat.com>
5885
5886 * ax.c (gdb_free_agent_expr): New function.
5887 * ax.h (gdb_free_agent_expr): New declaration.
5888 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5889 list.
5890 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5891 static.
5892 (clear_breakpoint_conditions_and_commands): New function.
5893 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5894 (clear_breakpoint_conditions_and_commands): New declaration.
5895
e9dae05e
RR
58962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5897
5898 * linux-aarch64-low.c (asm/ptrace.h): Include.
5899
5876f503
JK
59002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5901
5902 Fix TLS access for -static -pthread.
5903 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5904 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5905 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5906
802e8e6d
PA
59072014-05-20 Pedro Alves <palves@redhat.com>
5908
5909 * linux-aarch64-low.c (aarch64_insert_point)
5910 (aarch64_remove_point): No longer check whether the type is
5911 supported here. Adjust to new interface.
5912 (the_low_target): Install aarch64_supports_z_point_type as
5913 supports_z_point_type method.
5914 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5915 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5916 instead of a Z packet char. Adjust.
5917 (arm_supports_z_point_type): New function.
5918 (arm_insert_point, arm_remove_point): Adjust to new interface.
5919 (the_low_target): Install arm_supports_z_point_type.
5920 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5921 (cris_insert_point, cris_remove_point): Adjust to new interface.
5922 Don't check whether the type is supported here.
5923 (the_low_target): Install cris_supports_z_point_type.
5924 * linux-low.c (linux_supports_z_point_type): New function.
5925 (linux_insert_point, linux_remove_point): Adjust to new interface.
5926 * linux-low.h (struct linux_target_ops) <insert_point,
5927 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5928 raw_breakpoint pointer parameter.
5929 <supports_z_point_type>: New method.
5930 * linux-mips-low.c (mips_supports_z_point_type): New function.
5931 (mips_insert_point, mips_remove_point): Adjust to new interface.
5932 Use mips_supports_z_point_type.
5933 (the_low_target): Install mips_supports_z_point_type.
5934 * linux-ppc-low.c (the_low_target): Install NULL as
5935 supports_z_point_type method.
5936 * linux-s390-low.c (the_low_target): Install NULL as
5937 supports_z_point_type method.
5938 * linux-sparc-low.c (the_low_target): Install NULL as
5939 supports_z_point_type method.
5940 * linux-x86-low.c (x86_supports_z_point_type): New function.
5941 (x86_insert_point): Adjust to new insert_point interface. Use
5942 insert_memory_breakpoint. Adjust to new
5943 i386_low_insert_watchpoint interface.
5944 (x86_remove_point): Adjust to remove_point interface. Use
5945 remove_memory_breakpoint. Adjust to new
5946 i386_low_remove_watchpoint interface.
5947 (the_low_target): Install x86_supports_z_point_type.
5948 * lynx-low.c (lynx_target_ops): Install NULL as
5949 supports_z_point_type callback.
5950 * nto-low.c (nto_supports_z_point_type): New.
5951 (nto_insert_point, nto_remove_point): Adjust to new interface.
5952 (nto_target_ops): Install nto_supports_z_point_type.
5953 * mem-break.c: Adjust intro comment.
5954 (struct raw_breakpoint) <raw_type, size>: New fields.
5955 <inserted>: Update comment.
5956 <shlib_disabled>: Delete field.
5957 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5958 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5959 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5960 (raw_bkpt_type_to_target_hw_bp_type): New function.
5961 (find_enabled_raw_code_breakpoint_at): New function.
5962 (find_raw_breakpoint_at): New type and size parameters. Use them.
5963 (insert_memory_breakpoint): New function, based off
5964 set_raw_breakpoint_at.
5965 (remove_memory_breakpoint): New function.
5966 (set_raw_breakpoint_at): Reimplement.
5967 (set_breakpoint): New, based on set_breakpoint_at.
5968 (set_breakpoint_at): Reimplement.
5969 (delete_raw_breakpoint): Go through the_target->remove_point
5970 instead of assuming memory breakpoints.
5971 (find_gdb_breakpoint_at): Delete.
5972 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5973 (find_gdb_breakpoint): New function.
5974 (set_gdb_breakpoint_at): Delete.
5975 (z_type_supported): New function.
5976 (set_gdb_breakpoint_1): New function, loosely based off
5977 set_gdb_breakpoint_at.
5978 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5979 (delete_gdb_breakpoint_at): Delete.
5980 (delete_gdb_breakpoint_1): New function, loosely based off
5981 delete_gdb_breakpoint_at.
5982 (delete_gdb_breakpoint): New function.
5983 (clear_gdb_breakpoint_conditions): Rename to ...
5984 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5985 breakpoint.
5986 (add_condition_to_breakpoint): Make static.
5987 (add_breakpoint_condition): Take a struct breakpoint pointer
5988 instead of an address. Adjust.
5989 (gdb_condition_true_at_breakpoint): Rename to ...
5990 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5991 z_type parameter.
5992 (gdb_condition_true_at_breakpoint): Reimplement.
5993 (add_breakpoint_commands): Take a struct breakpoint pointer
5994 instead of an address. Adjust.
5995 (gdb_no_commands_at_breakpoint): Rename to ...
5996 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5997 parameter. Return true if no breakpoint was found. Change debug
5998 output.
5999 (gdb_no_commands_at_breakpoint): Reimplement.
6000 (run_breakpoint_commands): Rename to ...
6001 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6002 and change return type to boolean.
6003 (run_breakpoint_commands): New function.
6004 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6005 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6006 breakpoint. Go through the_target->remove_point instead of
6007 assuming memory breakpoint.
6008 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6009 software and hardware breakpoints.
6010 (reinsert_raw_breakpoint): Go through the_target->insert_point
6011 instead of assuming memory breakpoint.
6012 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6013 software and hardware breakpoints.
6014 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6015 Check both software and hardware breakpoints.
6016 (validate_inserted_breakpoint): Assert the breakpoint is a
6017 software breakpoint. Set the inserted flag to -1 instead of
6018 setting shlib_disabled.
6019 (delete_disabled_breakpoints): Adjust.
6020 (validate_breakpoints): Only validate software breakpoints.
6021 Adjust to inserted flag change.
6022 (check_mem_read, check_mem_write): Skip breakpoint types other
6023 than software breakpoints. Adjust to inserted flag change.
6024 * mem-break.h (enum raw_bkpt_type): New enum.
6025 (raw_breakpoint, struct process_info): Forward declare.
6026 (Z_packet_to_target_hw_bp_type): Delete declaration.
6027 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6028 (set_gdb_breakpoint, delete_gdb_breakpoint)
6029 (clear_breakpoint_conditions): New declarations.
6030 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6031 (breakpoint_inserted_here): Update comment.
6032 (add_breakpoint_condition, add_breakpoint_commands): Replace
6033 address parameter with a breakpoint pointer parameter.
6034 (gdb_breakpoint_here): Update comment.
6035 (delete_gdb_breakpoint_at): Delete.
6036 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6037 * server.c (process_point_options): Take a struct breakpoint
6038 pointer instead of an address. Adjust.
6039 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6040 delete_gdb_breakpoint.
6041 * spu-low.c (spu_target_ops): Install NULL as
6042 supports_z_point_type method.
6043 * target.h: Include mem-break.h.
6044 (struct target_ops) <prepare_to_access_memory>: Update comment.
6045 <supports_z_point_type>: New field.
6046 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6047 instead of a char. Also take a raw breakpoint pointer.
6048 * win32-arm-low.c (the_low_target): Install NULL as
6049 supports_z_point_type.
6050 * win32-i386-low.c (i386_supports_z_point_type): New function.
6051 (i386_insert_point, i386_remove_point): Adjust to new interface.
6052 (the_low_target): Install i386_supports_z_point_type.
6053 * win32-low.c (win32_supports_z_point_type): New function.
6054 (win32_insert_point, win32_remove_point): Adjust to new interface.
6055 (win32_target_ops): Install win32_supports_z_point_type.
6056 * win32-low.h (struct win32_target_ops):
6057 <supports_z_point_type>: New method.
6058 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6059 instead of a char. Also take a raw breakpoint pointer.
6060
932539e3
PA
60612014-05-20 Pedro Alves <palves@redhat.com>
6062
6063 * mem-break.h: Include break-common.h.
6064 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6065 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6066 (Z_packet_to_target_hw_bp_type): New declaration.
6067 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6068 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6069 (Z_PACKET_ACCESS_WP): Delete macros.
6070 (Z_packet_to_hw_type): Delete function.
6071 * i386-low.h: Don't include break-common.h here.
6072 (Z_packet_to_hw_type): Delete declaration.
6073 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6074 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6075 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6076 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6077 * linux-aarch64-low.c: Don't include break-common.h here.
6078 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6079 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6080 (Z_packet_to_target_hw_bp_type): Delete function.
6081 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6082 function.
6083 (mips_insert_point, mips_remove_point): Use
6084 Z_packet_to_target_hw_bp_type.
6085
4ff0d3d8
PA
60862014-05-20 Pedro Alves <palves@redhat.com>
6087
6088 * linux-aarch64-low.c: Include break-common.h.
6089 (enum target_point_type): Delete.
6090 (Z_packet_to_point_type): Rename to ...
6091 (Z_packet_to_target_hw_bp_type): ... this, and return a
6092 target_hw_bp_type instead.
6093 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6094 instead of an enum target_point_type.
6095 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6096 breakpoint type.
6097 (aarch64_dr_state_insert_one_point)
6098 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6099 (aarch64_handle_aligned_watchpoint)
6100 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6101 Take an enum target_hw_bp_type instead of an enum
6102 target_point_type.
6103 (aarch64_supports_z_point_type): New function.
6104 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6105 use Z_packet_to_target_hw_bp_type.
6106
786dc519
JB
61072014-05-20 Joel Brobecker <brobecker@adacore.com>
6108
6109 * configure.ac: Only use -Werror by default when DEVELOPMENT
6110 is true.
6111 * configure: Regenerate.
6112
9e0aa64f
JK
61132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6114
6115 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6116 * linux-x86-low.c (X86_64_USER_REGS): New.
6117 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6118
2b577b92
YQ
61192014-04-28 Yao Qi <yao@codesourcery.com>
6120
6121 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6122 name.
6123
94611da2
PA
61242014-04-25 Pedro Alves <palves@redhat.com>
6125
6126 PR server/16255
6127 * linux-low.c (linux_attach_fail_reason_string): New function.
6128 (linux_attach_lwp): Delete.
6129 (linux_attach_lwp_1): Rename to ...
6130 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6131 argument. Remove "initial" parameter. Return int instead of
6132 void. Don't error or warn here.
6133 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6134 failure to attach to the tgid. Call warning when failing to
6135 attach to an lwp.
6136 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6137 argument. Remove "initial" parameter. Return int instead of
6138 void. Don't error or warn here.
6139 (linux_attach_fail_reason_string): New declaration.
6140 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6141 interface change. Use linux_attach_fail_reason_string.
6142
01f9f808
MS
61432014-04-24 Michael Sturm <michael.sturm@mintel.com>
6144 Walfred Tedeschi <walfred.tedeschi@intel.com>
6145
6146 * Makefile.in: Added rules to handle new files
6147 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6148 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6149 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6150 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6151 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6152 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6153 x32-avx512-linux.o.
6154 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6155 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6156 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6157 i386/x32-avx512.xml.
6158 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6159 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6160 i386/x32-avx512-linux.xml.
6161 * i387-fp.c (num_avx512_k_registers): New constant for number
6162 of K registers.
6163 (num_avx512_zmmh_low_registers): New constant for number of
6164 lower ZMM registers (0-15).
6165 (num_avx512_zmmh_high_registers): New constant for number of
6166 higher ZMM registers (16-31).
6167 (num_avx512_ymmh_registers): New contant for number of higher
6168 YMM registers (ymm16-31 added by avx521 on x86_64).
6169 (num_avx512_xmm_registers): New constant for number of higher
6170 XMM registers (xmm16-31 added by AVX512 on x86_64).
6171 (struct i387_xsave): Add space for AVX512 registers.
6172 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6173 Add code to handle AVX512 registers.
6174 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6175 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6176 prototypei from generated file.
6177 (tdesc_amd64_avx512_linux): Likewise.
6178 (init_registers_x32_avx512_linux): Likewise.
6179 (tdesc_x32_avx512_linux): Likewise.
6180 (init_registers_i386_avx512_linux): Likewise.
6181 (tdesc_i386_avx512_linux): Likewise.
6182 (x86_64_regmap): Add AVX512 registers.
6183 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6184 mask.
6185 (initialize_low_arch): Add code to initialize AVX512 registers.
6186
51aa91f9
PA
61872014-04-23 Pedro Alves <palves@redhat.com>
6188
6189 * mem-break.c (find_gdb_breakpoint_at): Make static.
6190 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6191
a4165e94
PA
61922014-04-23 Pedro Alves <palves@redhat.com>
6193
6194 * i386-low.c: Don't include break-common.h here.
6195 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6196 prototype to take target_hw_bp_type as argument instead of a Z
6197 packet char.
6198 * i386-low.h: Include break-common.h here.
6199 (Z_packet_to_hw_type): Declare.
6200 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6201 prototypes.
6202 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6203 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6204 (x86_remove_point): Convert the packet number to a
6205 target_hw_bp_type before calling i386_low_remove_watchpoint.
6206 * win32-i386-low.c (i386_insert_point): Convert the packet number
6207 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6208 (i386_remove_point): Convert the packet number to a
6209 target_hw_bp_type before calling i386_low_remove_watchpoint.
6210
b8acf843
PA
62112014-04-23 Pedro Alves <palves@redhat.com>
6212
6213 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6214
d708bcd1
PA
62152014-04-10 Pedro Alves <palves@redhat.com>
6216
6217 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6218 Check if the condition or command is NULL before checking if the
6219 breakpoint is known. On success, return true.
6220 * mem-break.h (add_breakpoint_condition): Document return.
6221 (add_breakpoint_commands): Add describing comment.
6222 * server.c (skip_to_semicolon): New function.
6223 (process_point_options): Use it.
6224
2eec7d5b
PA
62252014-04-09 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6228 to lwpid_of.
6229
fa96cb38
PA
62302014-02-27 Pedro Alves <palves@redhat.com>
6231
6232 PR 12702
6233 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6234 macros.
6235 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6236 output.
6237 (last_thread_of_process_p): Take a PID argument instead of a
6238 thread pointer.
6239 (linux_wait_for_lwp): Delete.
6240 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6241 functions.
6242 (linux_low_filter_event): New function, party factored out from
6243 linux_wait_for_event.
6244 (linux_wait_for_event): Rename to ...
6245 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6246 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6247 sigsuspend. Check for zombie leaders.
6248 (linux_wait_for_event): Reimplement as wrapper around
6249 linux_wait_for_event_filtered.
6250 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6251 a normal or signal exit is seen, it's the whole process exiting.
6252 (wait_for_sigstop): No longer a for_each_inferior callback.
6253 Rewrite on top of linux_wait_for_event_filtered.
6254 (stop_all_lwps): Call wait_for_sigstop directly.
6255 * server.c (resume, handle_target_event): Handle
6256 TARGET_WAITKIND_NO_RESUMED.
6257
d763de10
JB
62582014-02-26 Joel Brobecker <brobecker@adacore.com>
6259
6260 * win32-low.c (psapi_get_dll_name,
6261 * win32_CreateToolhelp32Snapshot): Delete.
6262 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6263 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6264 Delete.
6265 (handle_load_dll): Add function description.
6266 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6267
850a0f76
JB
62682014-02-26 Joel Brobecker <brobecker@adacore.com>
6269
6270 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6271 Add comment.
6272 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6273 base address when calling win32_add_one_solib.
6274 (handle_load_dll): Delete local variable load_addr.
6275 Remove 0x1000 offset applied to DLL base address when calling
6276 win32_add_one_solib.
6277 (handle_unload_dll): Add comment.
6278
f25b3fc3
JB
62792014-02-26 Joel Brobecker <brobecker@adacore.com>
6280
6281 * win32-low.c (win32_add_all_dlls): Renames
6282 win32_ensure_ntdll_loaded. Rewrite function documentation.
6283 Adjust implementation to always load all DLLs.
6284 Add 0x1000 offset to DLL base address when calling
6285 win32_add_one_solib.
6286 (child_initialization_done): New static global.
6287 (do_initial_child_stuff): Set child_initialization_done to
6288 zero during child initialization, and 1 after. Replace call
6289 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6290 Add comment.
6291 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6292 (handle_unload_dll): Add function documentation.
6293 (get_child_debug_event): Ignore load and unload DLL events
6294 during child initialization.
6295
d86d4aaf
DE
62962014-02-20 Doug Evans <dje@google.com>
6297
3bc32da3 6298 Remove global all_lwps.
d86d4aaf
DE
6299 * inferiors.h (ptid_of): Move here from linux-low.h.
6300 (pid_of, lwpid_of): Ditto.
6301 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6302 parameter is a struct thread_info * now.
6303 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6304 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6305 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6306 directly.
6307 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6308 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6309 * linux-arm-low.c (update_registers_callback): Update, "entry"
6310 parameter is a struct thread_info * now.
6311 Fetch lwpid from current_inferior directly.
6312 (arm_insert_point): Pass &all_threads to find_inferior instead of
6313 &all_lwps.
6314 (arm_remove_point): Ditto.
6315 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6316 (arm_prepare_to_resume): Fetch pid from thread.
6317 (arm_read_description): Fetch lwpid from current_inferior directly.
6318 * linux-low.c (all_lwps): Delete.
6319 (delete_lwp): Delete call to remove_inferior.
6320 (handle_extended_wait): Fetch lwpid from thread.
6321 (add_lwp): Don't set lwp->entry.id. Remove call to
6322 add_inferior_to_list.
6323 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6324 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6325 (kill_one_lwp_callback): Ditto.
6326 (linux_kill): Don't dereference NULL pointer.
6327 Fetch ptid,lwpid from thread.
6328 (get_detach_signal): Fetch ptid from thread.
6329 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6330 Simplify call to regcache_invalidate_thread.
6331 (delete_lwp_callback): Update, "entry" parameter is a
6332 struct thread_info * now. Fetch pid from thread.
6333 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6334 (status_pending_p_callback): Update, "entry" parameter is a
6335 struct thread_info * now. Fetch ptid from thread.
6336 (find_lwp_pid): Update, "entry" parameter is a
6337 struct thread_info * now.
6338 (linux_wait_for_lwp): Fetch pid from thread.
6339 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6340 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6341 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6342 (dequeue_one_deferred_signal): Ditto.
6343 (cancel_breakpoint): Fetch ptid from current_inferior.
6344 (linux_wait_for_event): Pass &all_threads to find_inferior,
6345 not &all_lwps. Fetch ptid, lwpid from thread.
6346 (count_events_callback): Update, "entry" parameter is a
6347 struct thread_info * now.
6348 (select_singlestep_lwp_callback): Ditto.
6349 (select_event_lwp_callback): Ditto.
6350 (cancel_breakpoints_callback): Ditto.
6351 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6352 not &all_lwps.
6353 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6354 (unsuspend_one_lwp): Update, "entry" parameter is a
6355 struct thread_info * now.
6356 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6357 not &all_lwps.
6358 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6359 Fetch lwpid from thread, not lwp.
6360 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6361 Pass &all_threads to find_inferior, not &all_lwps.
6362 (send_sigstop): Fetch lwpid from thread, not lwp.
6363 (send_sigstop_callback): Update, "entry" parameter is a
6364 struct thread_info * now.
6365 (suspend_and_send_sigstop_callback): Ditto.
6366 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6367 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6368 struct thread_info * now.
6369 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6370 from thread, lwp.
6371 (lwp_running): Update, "entry" parameter is a
6372 struct thread_info * now.
6373 (stop_all_lwps): Fetch ptid from thread.
6374 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6375 (linux_resume_one_lwp): Fetch lwpid from thread.
6376 (linux_set_resume_request): Update, "entry" parameter is a
6377 struct thread_info * now. Fetch pid, lwpid from thread.
6378 (resume_status_pending_p): Update, "entry" parameter is a
6379 struct thread_info * now.
6380 (need_step_over_p): Ditto. Fetch lwpid from thread.
6381 (start_step_over): Fetch lwpid from thread.
6382 (linux_resume_one_thread): Update, "entry" parameter is a
6383 struct thread_info * now. Fetch lwpid from thread.
6384 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6385 (proceed_one_lwp): Update, "entry" parameter is a
6386 struct thread_info * now. Fetch lwpid from thread.
6387 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6388 struct thread_info * now.
6389 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6390 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6391 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6392 directly.
6393 (regsets_store_inferior_registers): Ditto.
6394 (fetch_register, store_register): Ditto.
6395 (linux_read_memory, linux_write_memory): Ditto.
6396 (linux_request_interrupt): Ditto.
6397 (linux_read_auxv): Ditto.
6398 (linux_xfer_siginfo): Ditto.
6399 (linux_qxfer_spu): Ditto.
6400 (linux_qxfer_libraries_svr4): Ditto.
6401 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6402 moved to inferiors.h.
6403 (get_lwp): Delete.
6404 (get_thread_lwp): Update.
6405 (struct lwp_info): Delete member "entry". Simplify comment for
6406 member "thread".
6407 (all_lwps): Delete.
6408 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6409 current_inferior directly.
6410 (update_watch_registers_callback): Update, "entry" parameter is a
6411 struct thread_info * now. Fetch pid from thread.
6412 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6413 (mips_insert_point): Fetch lwpid from current_inferior.
6414 Pass &all_threads to find_inferior, not &all_lwps.
6415 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6416 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6417 directly.
6418 (mips_stopped_data_address): Ditto.
6419 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6420 directly.
6421 * linux-tile-low.c (tile_arch_setup): Ditto.
6422 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6423 (update_debug_registers_callback): Update, "entry" parameter is a
6424 struct thread_info * now. Fetch pid from thread.
6425 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6426 Pass &all_threads to find_inferior, not &all_lwps.
6427 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6428 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6429 Pass &all_threads to find_inferior, not &all_lwps.
6430 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6431 (i386_dr_low_get_status): Ditto.
6432 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6433 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6434 (x86_linux_read_description): Ditto.
6435 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6436
3b8361aa
DE
64372014-02-20 Doug Evans <dje@google.com>
6438
6439 * inferiors.c (get_first_inferior): Fix buglet.
6440
f7667f0d
DE
64412014-02-19 Doug Evans <dje@google.com>
6442
6443 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6444 * inferiors.c (add_thread): Change result type to struct thread_info *.
6445 All callers updated.
6446 (add_lwp): Call add_thread here instead of in callers.
6447 All callers updated.
6448 * linux-low.h (get_lwp_thread): Rewrite.
6449 (struct lwp_info): New member "thread".
6450
b3312d80
DE
64512014-02-19 Doug Evans <dje@google.com>
6452
6453 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6454 All callers updated.
6455
ecc6f45c
DE
64562014-02-19 Doug Evans <dje@google.com>
6457
6458 * inferiors.c (add_thread): Fix whitespace.
6459
649ebbca
DE
64602014-02-19 Doug Evans <dje@google.com>
6461
6462 * dll.c (clear_dlls): Replace accessing list implemention details
6463 with API function.
6464 * gdbthread.h (get_first_thread): Declare.
6465 * inferiors.c (for_each_inferior_with_data): New function.
6466 (get_first_thread): New function.
6467 (find_thread_ptid): Simplify.
6468 (get_first_inferior): New function.
6469 (clear_list): Delete.
6470 (one_inferior_p): New function.
6471 (clear_inferior_list): New function.
6472 (clear_inferiors): Update.
6473 * inferiors.h (for_each_inferior_with_data): Declare.
6474 (clear_inferior_list): Declare.
6475 (one_inferior_p): Declare.
6476 (get_first_inferior): Declare.
6477 * linux-low.c (linux_wait_for_event): Replace accessing list
6478 implemention details with API function.
6479 * server.c (target_running): Ditto.
6480 (accumulate_file_name_length): New function.
6481 (emit_dll_description): New function.
6482 (handle_qxfer_libraries): Replace accessing list implemention
6483 details with API function.
6484 (handle_qxfer_threads_worker): New function.
6485 (handle_qxfer_threads_proper): Replace accessing list implemention
6486 details with API function.
6487 (handle_query): Ditto.
6488 (visit_actioned_threads_callback_ftype): New typedef.
6489 (visit_actioned_threads_data): New struct.
6490 (visit_actioned_threads): Rewrite to be find_inferior callback.
6491 (resume): Call find_inferior.
6492 (handle_status): Replace accessing list implemention
6493 details with API function.
6494 (process_serial_event): Replace accessing list implemention details
6495 with API function.
6496 * target.c (set_desired_inferior): Replace accessing list implemention
6497 details with API function.
6498 * tracepoint.c (same_process_p): New function.
6499 (gdb_agent_about_to_close): Replace accessing list implemention
6500 details with API function.
6501 * win32-low.c (child_delete_thread): Replace accessing list
6502 implemention details with API function.
6503 (match_dll_by_basename): New function.
6504 (dll_is_loaded_by_basename): New function.
6505 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6506 details call to dll_is_loaded_by_basename.
6507
80894984
DE
65082014-02-19 Doug Evans <dje@google.com>
6509
6510 * dll.h (struct dll_info): Add comment.
6511 * gdbthread.h (struct thread_info): Add comment.
6512 (current_ptid): Simplify.
6513 * inferiors.c (add_process): Update.
6514 (remove_process): Update.
6515 * inferiors.h (struct process_info): Rename member "head" to "entry".
6516 * linux-low.c (delete_lwp): Update.
6517 (add_lwp): Update.
6518 (last_thread_of_process_p): Update.
6519 (kill_one_lwp_callback, linux_kill): Update.
6520 (status_pending_p_callback): Update.
6521 (wait_for_sigstop): Update. Simplify read of ptid.
6522 (start_step_over): Update.
6523 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6524 (get_lwp_thread): Update.
6525 (struct lwp_info): Rename member "head" to "entry".
6526 * regcache.h (inferior_list_entry): Delete.
6527 * server.c (kill_inferior_callback): Update.
6528 (detach_or_kill_inferior_callback): Update.
6529 (print_started_pid): Update.
6530 (print_attached_pid): Update.
6531 (process_serial_event): Simplify read of ptid.
6532 * thread-db.c (thread_db_create_event): Update.
6533 (thread_db_get_tls_address): Update.
6534 * win32-low.c (current_inferior_ptid): Simplify.
6535
46917d26
TT
65362014-02-19 Tom Tromey <tromey@redhat.com>
6537
6538 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6539 argument.
6540 (target_supports_btrace): Update.
6541
0759a81e
YQ
65422014-02-14 Yao Qi <yao@codesourcery.com>
6543
6544 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6545 (rsp-low-ipa.o): New target.
6546
a7191e8b
TT
65472014-02-12 Tom Tromey <tromey@redhat.com>
6548
6549 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6550 convert_ascii_to_int.
6551 * regcache.c (registers_to_string): Likewise.
6552 * remote-utils.c (decode_M_packet): Likewise.
6553 * server.c (process_serial_event): Likewise.
6554
ff0e980e
TT
65552014-02-12 Tom Tromey <tromey@redhat.com>
6556
6557 * server.c (handle_query, handle_v_run): Use hex2bin, not
6558 unhexify.
6559 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6560
e9371aff
TT
65612014-02-12 Tom Tromey <tromey@redhat.com>
6562
6563 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6564 convert_int_to_ascii.
6565 * regcache.c (registers_to_string, collect_register_as_string):
6566 Likewise.
6567 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6568 Likewise.
6569 * server.c (process_serial_event): Likewise.
6570 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6571 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6572
971dc0b8
TT
65732014-02-12 Tom Tromey <tromey@redhat.com>
6574
6575 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6576 bin2hex, not hexify.
6577 * tracepoint.c (cmd_qtstatus): Likewise.
6578
0a822afb
TT
65792014-02-12 Tom Tromey <tromey@redhat.com>
6580
6581 * remote-utils.c (monitor_output): Pass explicit length to
6582 hexify.
6583
9c3d6531
TT
65842014-02-12 Tom Tromey <tromey@redhat.com>
6585
6586 * tracepoint.c: Include rsp-low.h.
6587 * server.c: Include rsp-low.h.
6588 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6589 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6590 declare.
6591 * remote-utils.c: Include rsp-low.h.
6592 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6593 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6594 (convert_int_to_ascii, convert_ascii_to_int): Move to
6595 common/rsp-low.c.
6596 * regcache.c: Include rsp-low.h.
6597 * ax.c: Include rsp-low.h.
6598 * Makefile.in (SFILES): Add common/rsp-low.c.
6599 (OBS): Add rsp-low.o.
6600 (rsp-low.o): New target.
6601
01fd3ea5
TT
66022014-02-12 Tom Tromey <tromey@redhat.com>
6603
6604 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6605 Include print-utils.h.
6606 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6607 (plongest, thirty_two, phex_nz): Remove.
6608 * Makefile.in (SFILES): Add common/print-utils.c.
6609 (OBS): Add print-utils.o.
6610 (print-utils-ipa.o): New target.
6611 (print-utils.o): New target.
6612 (IPA_OBJS): Add print-utils-ipa.o.
6613
e99dc820
TT
66142014-02-06 Tom Tromey <tromey@redhat.com>
6615
6616 * Makefile.in (SFILES): Fix indentation.
6617
ee1e2d4f
DE
66182014-02-05 Doug Evans <dje@google.com>
6619
6620 * linux-low.c (linux_wait_for_event): Improve comment.
6621 (linux_wait_1): Keep current_inferior in sync with event_child.
6622
f5a02773
DE
66232014-01-22 Doug Evans <dje@google.com>
6624
6625 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6626
87ce2a04
DE
66272014-01-22 Doug Evans <dje@google.com>
6628
6629 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6630 * configure: Regenerate.
6631 * config.in: Regenerate.
6632 * Makefile.in (SFILES): Add debug.c.
6633 (OBS): Add debug.o.
6634 * debug.c: New file.
6635 * debug.h: New file.
6636 * linux-aarch64-low.c (*): Update all debugging printfs to use
6637 debug_printf instead of fprintf.
6638 * linux-arm-low.c (*): Ditto.
6639 * linux-cris-low.c (*): Ditto.
6640 * linux-crisv32-low.c (*): Ditto.
6641 * linux-m32r-low.c (*): Ditto.
6642 * linux-sparc-low.c (*): Ditto.
6643 * linux-x86.c (*): Ditto.
6644 * linux-low.c (*): Ditto.
6645 (linux_wait_1): Add calls to debug_enter, debug_exit.
6646 (linux_wait): Remove redundant debugging printf.
6647 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6648 (linux_resume, unstop_all_lwps): Ditto.
6649 * mem-break.c (*): Update all debugging printfs to use
6650 debug_printf instead of fprintf.
6651 * remote-utils.c (*): Ditto.
6652 * thread-db.c (*): Ditto.
6653 * server.c #include <ctype.h>, "gdb_vecs.h".
6654 (debug_threads): Moved to debug.c.
6655 (*): Update all debugging printfs to use debug_printf instead of
6656 fprintf.
6657 (start_inferior): Replace call to fflush with call to debug_flush.
6658 (monitor_show_help): Mention set debug-format.
6659 (parse_debug_format_options): New function.
6660 (handle_monitor_command): Handle "monitor set debug-format".
6661 (gdbserver_usage): Mention --debug-format.
6662 (main): Parse --debug-format.
6663 * server.h (debug_threads): Declaration moved to debug.h.
6664 #include "debug.h".
6665 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6666 trace_debug_1 that uses debug_printf.
6667 (tracepoint_look_up_symbols): Update all debugging printfs to use
6668 debug_printf instead of fprintf.
6669
e671835b
BS
66702014-01-20 Baruch Siach <baruch@tkos.co.il>
6671
6672 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6673 sys/ptrace.h.
6674
b5737fa9
PA
66752014-01-17 Pedro Alves <palves@redhat.com>
6676
ea38d2a9 6677 PR build/16445
c7faa97a
PA
6678 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6679 defined after including gdb_proc_service.h.
b5737fa9 6680
40ed484e
DE
66812014-01-16 Doug Evans <dje@google.com>
6682
6683 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6684 (match_dll): Use it.
6685
969c39fb
MM
66862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6687
6688 * target.h (target_ops) <read_btrace>: Change parameters and
6689 return type to allow error reporting.
6690 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6691 trace reading errors on.
6692 * linux-low.c (linux_low_read_btrace): Pass trace reading
6693 errors on.
6694 (linux_low_disable_btrace): New.
6695
ab7f45ba
DE
66962014-01-15 Doug Evans <dje@google.com>
6697
6698 * inferiors.c (thread_id_to_gdb_id): Delete.
6699 * inferiors.h (thread_id_to_gdb_id): Delete.
6700
66af0f44
EZ
67012014-01-13 Eli Zaretskii <eliz@gnu.org>
6702
6703 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6704 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6705 versions.
6706
9939e131
PA
67072014-01-08 Pedro Alves <palves@redhat.com>
6708
6709 * server.c (handle_status): Don't discard previous queued stop
6710 replies or thread's pending status here.
6711 (main) <disconnection>: Do it here instead.
6712
b7ea362b
PA
67132014-01-08 Pedro Alves <palves@redhat.com>
6714
6715 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6716 * server.c (visit_actioned_threads, handle_pending_status): New
6717 function.
6718 (handle_v_cont): Factor out parts to ...
6719 (resume): ... this new function. If in all-stop, and a thread
6720 being resumed has a pending status, report it without actually
6721 resuming.
6722 (myresume): Adjust to use the new 'resume' function.
6723 (clear_pending_status_callback, set_pending_status_callback)
6724 (find_status_pending_thread_callback): New functions.
6725 (handle_status): Handle the case of multiple threads having
6726 interesting statuses to report. Report threads' real last signal
6727 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6728 with an interesting thread to report the status for, instead of
6729 always reporting the status of the first thread.
6730
28498c42
JB
67312014-01-01 Joel Brobecker <brobecker@adacore.com>
6732
6733 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6734 * gdbreplay.c (gdbreplay_version): Likewise.
6735
f45c82da
YZ
67362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6737
6738 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6739 iov.iov_len with the real length in use.
6740
379a5e2d
JB
67412013-12-13 Joel Brobecker <brobecker@adacore.com>
6742
6743 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6744 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6745 for all targets that use win32-low.c.
6746 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6747 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6748
4210d83e
PA
67492013-12-13 Pedro Alves <palves@redhat.com>
6750
6751 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6752 if equal to TARGET_WAITKIND_LOADED.
6753 * win32-low.c (cached_status): New static global.
6754 (win32_wait): Add declaration.
6755 (do_initial_child_stuff): Flush all initial pending debug events
6756 up to the initial breakpoint.
6757 (win32_wait): If CACHED_STATUS was set, return that instead
6758 of doing a real wait. Remove the code resuming the execution
6759 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6760 during the initial phase. Also remove the code changing
6761 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6762 TARGET_WAITKIND_STOPPED.
6763
e7f0d979
YQ
67642013-12-11 Yao Qi <yao@codesourcery.com>
6765
6766 * notif.c (handle_notif_ack): Return 0 if no notification
6767 matches.
6768
ebcf782c
DE
67692013-11-20 Doug Evans <dje@google.com>
6770
6771 * linux-low.c (linux_set_resume_request): Fix comment.
6772
20ad9378
DE
67732013-11-20 Doug Evans <dje@google.com>
6774
6775 * linux-low.c (resume_status_pending_p): Tweak comment.
6776
a196ebeb
WT
67772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6778
6779 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6780 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6781 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6782 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6783 (srv_amd64_regobj): Add amd64-mpx.o.
6784 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6785 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6786 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6787 * i387-fp.c (num_pl_bnd_register) Added constant.
6788 (num_pl_bnd_cfg_registers) Added constant.
6789 (struct i387_xsave) Added reserved area and MPX fields.
6790 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6791 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6792 function.
6793 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6794 (init_registers_amd64_mpx_linux): Declare new function.
6795 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6796 (x86_64_regmap): Add MPX registers.
6797 (x86_linux_read_description): Add MPX case.
6798 (initialize_low_arch): Initialize MPX targets.
6799
0080a2f6
TT
68002013-11-18 Tom Tromey <tromey@redhat.com>
6801
6802 * configure: Rebuild.
6803 * configure.ac: Don't check for stdlib.h.
6804 * gdbreplay.c: Unconditionally include stdlib.h.
6805
2978b111
TT
68062013-11-18 Tom Tromey <tromey@redhat.com>
6807
6808 * config.in: Rebuild.
6809 * configure: Rebuild.
6810 * configure.ac: Don't use AC_HEADER_DIRENT.
6811
a3d08894
TT
68122013-11-18 Tom Tromey <tromey@redhat.com>
6813
6814 * server.h: Don't check HAVE_STRING_H.
6815 * gdbreplay.c: Don't check HAVE_STRING_H.
6816 * configure: Rebuild.
6817
0a5dd17d
TT
68182013-11-18 Tom Tromey <tromey@redhat.com>
6819
6820 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6821 LIBGNU.
6822
1bd2f0ba
TT
68232013-11-08 Tom Tromey <tromey@redhat.com>
6824
6825 * configure, config.in: Rebuild.
6826 * configure.ac: Remove unused configury.
6827
3266f10b
TT
68282013-11-08 Tom Tromey <tromey@redhat.com>
6829
6830 * acinclude.m4: Include common.m4, codeset.m4.
6831 * configure, config.in: Rebuild.
6832 * configure.ac: Use GDB_AC_COMMON.
6833
6682d959
AA
68342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6835
6836 * linux-s390-low.c (HWCAP_S390_TE): New define.
6837 (s390_arch_setup): Consider the TE field in the HWCAP for
6838 determining 'have_regset_tdb'.
6839
fd0a4d76
SDJ
68402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6841
6842 PR gdb/16014
6843 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6844 call to sizeof.
6845
1a3d890b
PA
68462013-10-02 Pedro Alves <palves@redhat.com>
6847
6848 * server.c (process_serial_event): Don't output "GDBserver
6849 exiting" if GDB is connected through stdio.
6850 * target.c (mywait): Likewise, be silent if GDB is connected
6851 through stdio.
6852
97ad4581
JB
68532013-10-01 Joel Brobecker <brobecker@adacore.com>
6854
6855 * lynx-low.c (lynx_add_threads_after_attach): New function.
6856 (lynx_attach): Remove call to add_thread. Add call to
6857 lynx_add_threads_after_attach instead.
6858
5b4e221c
MF
68592013-09-28 Mike Frysinger <vapier@gentoo.org>
6860
6861 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6862 * config.in, configure: Regenerated.
6863
ee47b2f8
YQ
68642013-09-18 Yao Qi <yao@codesourcery.com>
6865
6866 PR server/15959
6867 * server.c (start_inferior): Clear 'resume_info'.
6868
d6707650 68692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6870
d6707650
JW
6871 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6872 for each register.
6873
9243dd0e 68742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6875
9243dd0e
JW
6876 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6877 linux-tile-low.o to srv_tgtobj.
6878
c623a6ef
WN
68792013-09-16 Will Newton <will.newton@linaro.org>
6880
6881 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6882 out regs.
6883
fb71d39e
PA
68842013-09-06 Pedro Alves <palves@redhat.com>
6885
6886 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6887 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6888 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6889 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6890 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6891 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6892
8e7e9910
PA
68932013-09-06 Pedro Alves <palves@redhat.com>
6894
6895 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6896 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6897
7c3a12ca
PA
68982013-09-06 Pedro Alves <palves@redhat.com>
6899
6900 * linux-amd64-ipa.c: Include tracepoint.h.
6901 * linux-i386-ipa.c: Include tracepoint.h.
6902
8eb3d7b6
RW
69032013-09-06 Ricard Wanderlof <ricardw@axis.com>
6904
6905 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6906 (ps_get_thread_area): New function.
6907
eddddb9d
RW
69082013-09-06 Ricard Wanderlof <ricardw@axis.com>
6909
6910 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6911 (initialize_low_arch): Call init_registers_crisv32 rather than
6912 init_register_crisv32.
6913
533b0600
PA
69142013-09-05 Pedro Alves <palves@redhat.com>
6915
6916 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6917 to ...
6918 * hostio.h: ... this new file.
6919 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6920 win32-low.c: Include hostio.h.
6921
0ce3d3b5
PA
69222013-09-05 Pedro Alves <palves@redhat.com>
6923
6924 * server.h (gdb_client_data, handler_func, callback_handler_func)
6925 (delete_file_handler, add_file_handler, append_callback_event)
6926 (delete_callback_event, start_event_loop, initialize_event_loop):
6927 Move to event-loop.h and include it.
6928 * event-loop.h: New file.
6929
799cdc37
PA
69302013-09-05 Pedro Alves <palves@redhat.com>
6931
6932 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6933 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6934 (loaded_dll, unloaded_dll): Move to ...
6935 * dll.h: ... this new file.
6936 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6937
6a6bbd9d
PA
69382013-09-05 Pedro Alves <palves@redhat.com>
6939
6940 * server.h (current_process, get_thread_process, all_processes)
6941 (add_inferior_to_list, for_each_inferior, current_inferior)
6942 (remove_inferior, add_process, remove_process, find_process_pid)
6943 (have_started_inferiors_p, have_attached_inferiors_p)
6944 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6945 (clear_inferiors, find_inferior, find_inferior_id)
6946 (inferior_target_data, set_inferior_target_data)
6947 (inferior_regcache_data, set_inferior_regcache_data): Move to
6948 inferiors.h, and include it.
6949 * inferiors.h: New file.
6950
f699aaba
PA
69512013-09-05 Pedro Alves <palves@redhat.com>
6952
6953 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6954 Move ...
72f4393d 6955 * ax.h: ... here.
f699aaba 6956
c144c7a0
PA
69572013-09-05 Pedro Alves <palves@redhat.com>
6958
6959 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6960 tracepoint.h.
6961 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6962 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6963 (handle_tracepoint_general_set, handle_tracepoint_query)
6964 (tracepoint_finished_step, tracepoint_was_hit)
6965 (release_while_stepping_state_list, current_traceframe)
6966 (in_readonly_region, traceframe_read_mem)
6967 (fetch_traceframe_registers, traceframe_read_sdata)
6968 (traceframe_read_info, struct fast_tpoint_collect_status)
6969 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6970 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6971 (supply_fast_tracepoint_registers)
6972 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6973 (ipa_tdesc, claim_trampoline_space)
6974 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6975 (agent_mem_read, agent_get_trace_state_variable_value)
6976 (agent_set_trace_state_variable_value, agent_tsv_read)
6977 (agent_mem_read_string, get_raw_reg_func_addr)
6978 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6979 * tracepoint.h: ... this new file.
6980
ff42e6ab
PA
69812013-09-05 Pedro Alves <palves@redhat.com>
6982
6983 * server.h (perror_with_name, error, fatal, warning, paddress)
6984 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6985 include it.
6986 * utils.h: New file.
6987
541af0f4
PA
69882013-09-05 Pedro Alves <palves@redhat.com>
6989
6990 * server.h (remote_debug, noack_mode, transport_is_reliable)
6991 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6992 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6993 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6994 (write_enn, initialize_async_io, enable_async_io)
6995 (disable_async_io, check_remote_input_interrupt_request)
6996 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6997 (dead_thread_notify, prepare_resume_reply)
6998 (decode_address_to_semicolon, decode_address, decode_m_packet)
6999 (decode_M_packet, decode_X_packet, decode_xfer_write)
7000 (decode_search_memory_packet, unhexify, hexify)
7001 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7002 (look_up_one_symbol, relocate_instruction)
7003 (monitor_output): Move to remote-utils.h, and include it.
7004 * remote-utils.h: New file.
7005
eebdf26b
PA
70062013-09-05 Pedro Alves <palves@redhat.com>
7007
7008 * server.h (_): Delete.
7009
3aafd2ff
PA
70102013-09-02 Pedro Alves <palves@redhat.com>
7011
7012 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7013 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7014 allocated.
7015 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7016
cee83bcb
PM
70172013-09-02 Pierre Muller <muller@sourceware.org>
7018
7019 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7020 or WriteProcessMemory complete successfully and handle
7021 ERROR_PARTIAL_COPY error.
7022
9a13b2fa
PA
70232013-09-02 Pedro Alves <palves@redhat.com>
7024
7025 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7026 error instead of EIO.
7027
602e3198
JK
70282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7029
7030 PR server/15604
7031 * linux-low.c: Include filestuff.h.
7032 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7033 * lynx-low.c: Include filestuff.h.
7034 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7035 * server.c: Include filestuff.h.
7036 (main): Call notice_open_fds.
7037 * spu-low.c: Include filestuff.h.
7038 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7039
96d7229d
LM
70402013-08-22 Luis Machado <lgustavo@codesourcery.com>
7041
7042 * Makefile.in: Explain why ../target and ../nat are not
7043 listed as include file search paths.
7044 (linux-waitpid.o): New object file rule.
7045 * configure.srv (srv_native_linux_obj): New variable.
7046 Replace all occurrences of linux native object files with
7047 $srv_native_linux_obj.
7048 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7049 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7050 (linux_enable_event_reporting): Remove declaration.
7051 (my_waitpid): Moved to common/linux-waitpid.c.
7052 (linux_wait_for_event): Pass ptid when calling
7053 linux_enable_event_reporting.
7054 (linux_supports_tracefork_flag): Remove.
7055 (linux_enable_event_reporting): Likewise.
7056 (linux_tracefork_grandchild): Remove.
7057 (STACK_SIZE): Moved to common/linux-ptrace.c.
7058 (linux_tracefork_child): Remove.
7059 (linux_test_for_tracefork): Remove.
7060 (linux_look_up_symbols): Call linux_supports_traceclone.
7061 (initialize_low): Remove call to linux_test_for_tracefork.
7062 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7063 common/linux-ptrace.h.
7064 (PTRACE_TYPE_ARG4): Likewise.
7065 Include linux-ptrace.h.
7066
32940073
PA
70672013-08-21 Pedro Alves <palves@redhat.com>
7068
7069 * config.in: Renegerate.
7070
33b60d58 70712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7072
33b60d58
LM
7073 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7074 (SFILES): Remove $(srcdir)/common/target-common.c and
7075 add $(srcdir)/target/waitstatus.c.
7076 (OBS): Remove target-common.o and add waitstatus.o.
7077 (server_h): Remove $(srcdir)/../common/target-common.h and
7078 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7079 and $(srcdir)/../target/waitstatus.h.
7080 (target-common.o): Remove.
7081 (waitstatus.o): New target object file.
7082 * target.h: Do not include target-common.h and
7083 include target/resume.h, target/wait.h and
7084 target/waitstatus.h.
7085
b8e1b30e
LM
70862013-08-13 Luis Machado <lgustavo@codesourcery.com>
7087
7088 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7089 to PTRACE_TYPE_ARG3.
7090 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7091 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7092 PTRACE_TYPE_ARG4.
7093 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7094 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7095
7a60ad40
YQ
70962013-07-27 Jie Zhang <jie@codesourcery.com>
7097 Daniel Jacobowitz <dan@codesourcery.com>
7098 Yao Qi <yao@codesourcery.com>
7099
7100 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7101 (mips-linux-watch.o): New rule.
7102 (mips_linux_watch_h): New variable.
7103 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7104 srv_tgtobj.
7105 * linux-mips-low.c: Include mips-linux-watch.h.
7106 (struct arch_process_info, struct arch_lwp_info): New.
7107 (update_watch_registers_callback): New function.
7108 (mips_linux_new_process, mips_linux_new_thread) New functions.
7109 (mips_linux_prepare_to_resume, mips_insert_point): New
7110 functions.
7111 (mips_remove_point, mips_stopped_by_watchpoint): New
7112 functions.
7113 (rsp_bp_type_to_target_hw_bp_type): New function.
7114 (mips_stopped_data_address): New function.
7115 (the_low_target): Add watchpoint support functions.
7116
de6f69ad
YQ
71172013-07-27 Yao Qi <yao@codesourcery.com>
7118
7119 * i386-low.c: Include break-common.h.
7120 (enum target_hw_bp_type): Remove.
7121
3360c0bf
LM
71222013-07-24 Luis Machado <lgustavo@codesourcery.com>
7123
7124 * Makefile.in (SFILES): /common/target-common.c.
7125 (OBS): Add target-common.o.
7126 (server_h): Add $(srcdir)/../common/target-common.h.
7127 (target-common.o): New target.
7128 * server.c (queue_stop_reply_callback): Free
7129 status string after use.
7130 * target.c (target_waitstatus_to_string): Remove.
7131 * target.h: Include target-common.h.
7132 (resume_kind): Likewise.
7133 (target_waitkind): Likewise.
7134 (target_waitstatus): Likewise.
7135 (TARGET_WNOHANG): Likewise.
7136
bd885420
YQ
71372013-07-04 Yao Qi <yao@codesourcery.com>
7138
7139 * Makefile.in (host_alias): Use @host_noncanonical@.
7140 (target_alias): Use @target_noncanonical@.
7141 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7142 ACX_NONCANONICAL_HOST.
7143 * configure: Regenerated.
7144
7145 Revert:
7146 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7147
7148 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7149 * configure: Rebuild.
7150 * Makefile.in (version_host, version_target): Get from configure.
7151 (version.c): Use $(version_host) and $(version_target).
7152
17ef446e
PA
71532013-07-03 Pedro Alves <palves@redhat.com>
7154
7155 * Makefile.in (config.status): Depend on development.sh.
7156 * acinclude.m4: Include libmcheck.m4.
7157 * configure: Regenerate.
7158
7a9a7487
MG
71592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7160
7161 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7162 attribute inside the parentheses.
7163 (winapi_DebugSetProcessKillOnExit): Ditto.
7164 (winapi_DebugBreakProcess): Ditto.
7165 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7166
49b64de6
MG
71672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7168
7169 * notif.h (notif_event): Add a dummy member to avoid compiler
7170 errors.
7171
d5749ee7
PA
71722013-07-01 Pedro Alves <palves@redhat.com>
7173
7174 * hostio.c (HOSTIO_PATH_MAX): Define.
7175 (require_filename, handle_open, handle_unlink, handle_readlink):
7176 Use it.
7177
d8d2a3ee
PA
71782013-07-01 Pedro Alves <palves@redhat.com>
7179
7180 * server.h: Include "pathmax.h".
7181 * linux-low.c: Don't include sys/param.h.
7182 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7183 MAXPATHLEN.
7184 * win32-low.c: Don't include sys/param.h.
7185 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7186
bc7dea8d
PA
71872013-07-01 Pedro Alves <palves@redhat.com>
7188
7189 * event-loop.c: Don't check HAVE_UNISTD_H before including
7190 <unistd.h>.
7191 * gdbreplay.c: Likewise.
7192 * remote-utils.c: Likewise.
7193 * server.c: Likewise.
7194 * configure.ac: Don't check for unistd.h.
7195 * configure: Regenerate.
7196
d6c2da54
TT
71972013-06-28 Tom Tromey <tromey@redhat.com>
7198
7199 * Makefile.in (version.c): Use version.in, not
7200 common/version.in.
7201
257b6bec
MG
72022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7203
7204 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7205 * configure: Rebuild.
7206 * Makefile.in (version_host, version_target): Get from configure.
7207 (version.c): Use $(version_host) and $(version_target).
7208
86ebe149
DK
72092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7210
7211 Fix trace-status to output user name without trailing colon.
7212 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7213
f30aa5af
DK
72142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7215
7216 Fix trace-status to output proper start-time and stop-time.
7217 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7218 output start time and stop time in hex as gdb expects.
7219
28a93511
YQ
72202013-06-26 Pedro Alves <pedro@codesourcery.com>
7221
7222 * tracepoint.c (build_traceframe_info_xml): Output trace state
7223 variables present in the trace buffer.
7224
01208463
TT
72252013-06-24 Tom Tromey <tromey@redhat.com>
7226
7227 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7228 create-version.sh.
7229 (version.o): Remove.
7230 * gdbreplay.c: Include version.h.
7231 (version, host_name): Don't declare.
7232 * server.h: Include version.h.
7233 (version, host_name): Don't declare.
7234
760256f9
PA
72352013-06-12 Pedro Alves <palves@redhat.com>
7236
7237 * linux-x86-low.c (linux_is_elf64): Delete global.
7238 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7239 with local linux_pid_exe_is_elf_64_file use.
7240
030031ee
PA
72412013-06-11 Pedro Alves <palves@redhat.com>
7242
7243 * linux-low.c (regset_disabled, disable_regset): New functions.
7244 (regsets_fetch_inferior_registers)
7245 (regsets_store_inferior_registers): Use them.
7246 (initialize_regsets_info); Don't allocate the disabled_regsets
7247 array here.
7248 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7249 comment.
7250
5da6eb0a
PA
72512013-06-11 Pedro Alves <palves@redhat.com>
7252
7253 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7254 xmalloc.
7255
7e5aaa09
PA
72562013-06-11 Pedro Alves <palves@redhat.com>
7257
7258 * linux-x86-low.c (initialize_low_arch): Call
7259 init_registers_x32_avx_linux.
7260
d878444c
JK
72612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7262
7263 Fix compatibility with Android Bionic.
7264 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7265 it is not empty.
7266
3aee8918
PA
72672013-06-07 Pedro Alves <palves@redhat.com>
7268
5f2b57b5 7269 PR server/14823
3aee8918
PA
7270 * Makefile.in (OBS): Add tdesc.o.
7271 (IPA_OBJS): Add tdesc-ipa.o.
7272 (tdesc-ipa.o): New rule.
7273 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7274 interface.
7275 * linux-low.c (new_inferior): Delete.
7276 (disabled_regsets, num_regsets): Delete.
7277 (linux_add_process): Adjust to set the new per-process
7278 new_inferior flag.
7279 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7280 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7281 was a stop. When calling arch_setup, switch the current inferior
7282 to the thread that got an event.
7283 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7284 (regsets_fetch_inferior_registers)
7285 (regsets_store_inferior_registers): New regsets_info parameter.
7286 Adjust to use it.
7287 (linux_register_in_regsets): New regs_info parameter. Adjust to
7288 use it.
7289 (register_addr, fetch_register, store_register): New usrregs_info
7290 parameter. Adjust to use it.
7291 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7292 parameter regs_info. Adjust to use it.
7293 (linux_fetch_registers): Get the current inferior's regs_info, and
7294 adjust to use it.
7295 (linux_store_registers): Ditto.
7296 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7297 (initialize_low): Don't initialize the target_regsets here. Call
7298 initialize_low_arch.
7299 * linux-low.h (target_regsets): Delete declaration.
7300 (struct regsets_info): New.
7301 (struct usrregs_info): New.
7302 (struct regs_info): New.
7303 (struct process_info_private) <new_inferior>: New field.
7304 (struct linux_target_ops): Delete the num_regs, regmap, and
7305 regset_bitmap fields. New field regs_info.
7306 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7307 * i387-fp.c (num_xmm_registers): Delete.
7308 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7309 calls to new interface.
7310 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7311 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7312 Infer the number of xmm registers from the regcache's target
7313 description.
7314 * i387-fp.h (num_xmm_registers): Delete.
7315 * inferiors.c (add_thread): Don't install the thread's regcache
7316 here.
7317 * proc-service.c (gregset_info): Fetch the current inferior's
7318 regs_info. Adjust to use it.
7319 * regcache.c: Include tdesc.h.
7320 (register_bytes, reg_defs, num_registers)
7321 (gdbserver_expedite_regs): Delete.
7322 (get_thread_regcache): If the thread doesn't have a regcache yet,
7323 create one, instead of aborting gdbserver.
7324 (regcache_invalidate_one): Rename to ...
7325 (regcache_invalidate_thread): ... this.
7326 (regcache_invalidate_one): New.
7327 (regcache_invalidate): Only invalidate registers of the current
7328 process.
7329 (init_register_cache): Add target_desc parameter, and use it.
7330 (new_register_cache): Ditto. Assert the target description has a
7331 non zero registers_size.
7332 (regcache_cpy): Add assertions. Adjust.
7333 (realloc_register_cache, set_register_cache): Delete.
7334 (registers_to_string, registers_from_string): Adjust.
7335 (find_register_by_name, find_regno, find_register_by_number)
7336 (register_cache_size): Add target_desc parameter, and use it.
7337 (free_register_cache_thread, free_register_cache_thread_one)
7338 (regcache_release, register_cache_size): New.
7339 (register_size): Add target_desc parameter, and use it.
7340 (register_data, supply_register, supply_register_zeroed)
7341 (supply_regblock, supply_register_by_name, collect_register)
7342 (collect_register_as_string, collect_register_by_name): Adjust.
7343 * regcache.h (struct target_desc): Forward declare.
7344 (struct regcache) <tdesc>: New field.
7345 (init_register_cache, new_register_cache): Add target_desc
7346 parameter.
7347 (regcache_invalidate_thread): Declare.
7348 (regcache_invalidate_one): Delete declaration.
7349 (regcache_release): Declare.
7350 (find_register_by_number, register_cache_size, register_size)
7351 (find_regno): Add target_desc parameter.
7352 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7353 declarations.
7354 * remote-utils.c: Include tdesc.h.
7355 (outreg, prepare_resume_reply): Adjust.
7356 * server.c: Include tdesc.h.
7357 (gdbserver_xmltarget): Delete declaration.
7358 (get_features_xml, process_serial_event): Adjust.
7359 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7360 declare.
7361 (struct process_info) <tdesc>: New field.
7362 (ipa_tdesc): Declare.
7363 * tdesc.c: New file.
7364 * tdesc.h: New file.
7365 * tracepoint.c: Include tdesc.h.
7366 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7367 (get_context_regcache): Adjust to pass ipa_tdesc down.
7368 (do_action_at_tracepoint): Adjust to get the register cache size
7369 from the context regcache's description.
7370 (traceframe_walk_blocks): Adjust to get the register cache size
7371 from the current trace frame's description.
7372 (traceframe_get_pc): Adjust to get current trace frame's
7373 description and pass it down.
7374 (gdb_collect): Adjust to get the register cache size from the
7375 IPA's description.
7376 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7377 (gdbserver_xmltarget): Delete.
7378 (initialize_low_tracepoint): Set the ipa's target description.
7379 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7380 (initialize_low_tracepoint): Set the ipa's target description.
7381 * linux-x86-low.c: Include tdesc.h.
7382 [__x86_64__] (is_64bit_tdesc): New.
7383 (ps_get_thread_area, x86_get_thread_area): Use it.
7384 (i386_cannot_store_register): Rename to ...
7385 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7386 (i386_cannot_fetch_register): Rename to ...
7387 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7388 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7389 to new interface.
7390 (target_regsets): Rename to ...
7391 (x86_regsets): ... this.
7392 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7393 interface.
7394 (x86_siginfo_fixup): Use is_64bit_tdesc.
7395 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7396 (tdesc_x32_avx_linux, tdesc_x32_linux)
7397 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7398 Declare.
7399 (x86_linux_update_xmltarget): Delete.
7400 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7401 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7402 (AMD64_LINUX_USER64_CS): New.
7403 (x86_linux_read_description): New, based on
7404 x86_linux_update_xmltarget.
7405 (same_process_callback): New.
7406 (x86_arch_setup_process_callback): New.
7407 (x86_linux_update_xmltarget): New.
7408 (x86_regsets_info): New.
7409 (amd64_linux_regs_info): New.
7410 (i386_linux_usrregs_info): New.
7411 (i386_linux_regs_info): New.
7412 (x86_linux_regs_info): New.
7413 (x86_arch_setup): Reimplement.
7414 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7415 (x86_emit_ops): Ditto.
7416 (the_low_target): Adjust. Install x86_linux_regs_info,
7417 x86_cannot_fetch_register, and x86_cannot_store_register.
7418 (initialize_low_arch): New.
7419 * linux-ia64-low.c (tdesc_ia64): Declare.
7420 (ia64_fetch_register): Adjust.
7421 (ia64_usrregs_info, regs_info): New globals.
7422 (ia64_regs_info): New function.
7423 (the_low_target): Adjust.
7424 (initialize_low_arch): New function.
7425 * linux-sparc-low.c (tdesc_sparc64): Declare.
7426 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7427 Adjust.
7428 (sparc_arch_setup): New function.
7429 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7430 (the_low_target): Adjust.
7431 (initialize_low_arch): New function.
7432 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7433 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7434 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7435 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7436 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7437 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7438 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7439 (tdesc_powerpc_isa205_vsx64l): Declare.
7440 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7441 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7442 (ppc_set_pc, ppc_get_hwcap): Adjust.
7443 (ppc_usrregs_info): Forward declare.
7444 (!__powerpc64__) ppc_regmap_adjusted: New global.
7445 (ppc_arch_setup): Adjust to the current process'es target
7446 description.
7447 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7448 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7449 (ppc_store_evrregset): Adjust.
7450 (target_regsets): Rename to ...
7451 (ppc_regsets): ... this, and make static.
7452 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7453 (ppc_regs_info): New function.
7454 (the_low_target): Adjust.
7455 (initialize_low_arch): New function.
7456 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7457 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7458 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7459 (tdesc_s390x_linux64v2): Declare.
7460 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7461 (s390_fill_gregset, s390_store_last_break): Adjust.
7462 (target_regsets): Rename to ...
7463 (s390_regsets): ... this, and make static.
7464 (s390_get_pc, s390_set_pc): Adjust.
7465 (s390_get_hwcap): New target_desc parameter, and use it.
7466 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7467 (s390_arch_setup): Adjust to set the current process'es target
7468 description. Don't adjust the regmap.
7469 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7470 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7471 (regs_info_3264): New globals.
7472 (s390_regs_info): New function.
7473 (the_low_target): Adjust.
7474 (initialize_low_arch): New function.
7475 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7476 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7477 [__mips64] (init_registers_mips_linux)
7478 (init_registers_mips_dsp_linux): Delete defines.
7479 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7480 (have_dsp): New global.
7481 (mips_read_description): New, based on mips_arch_setup.
7482 (mips_arch_setup): Reimplement.
7483 (get_usrregs_info): New function.
7484 (mips_cannot_fetch_register, mips_cannot_store_register)
7485 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7486 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7487 (target_regsets): Rename to ...
7488 (mips_regsets): ... this, and make static.
7489 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7490 (dsp_regs_info, regs_info): New globals.
7491 (mips_regs_info): New function.
7492 (the_low_target): Adjust.
7493 (initialize_low_arch): New function.
7494 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7495 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7496 Declare.
7497 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7498 (arm_read_description): New, with bits factored from
7499 arm_arch_setup.
7500 (arm_arch_setup): Reimplement.
7501 (target_regsets): Rename to ...
7502 (arm_regsets): ... this, and make static.
7503 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7504 (arm_regs_info): New function.
7505 (the_low_target): Adjust.
7506 (initialize_low_arch): New function.
7507 * linux-m68k-low.c (tdesc_m68k): Declare.
7508 (target_regsets): Rename to ...
7509 (m68k_regsets): ... this, and make static.
7510 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7511 (m68k_regs_info): New function.
7512 (m68k_arch_setup): New function.
7513 (the_low_target): Adjust.
7514 (initialize_low_arch): New function.
7515 * linux-sh-low.c (tdesc_sharch): Declare.
7516 (target_regsets): Rename to ...
7517 (sh_regsets): ... this, and make static.
7518 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7519 (sh_regs_info, sh_arch_setup): New functions.
7520 (the_low_target): Adjust.
7521 (initialize_low_arch): New function.
7522 * linux-bfin-low.c (tdesc_bfin): Declare.
7523 (bfin_arch_setup): New function.
7524 (bfin_usrregs_info, regs_info): New globals.
7525 (bfin_regs_info): New function.
7526 (the_low_target): Adjust.
7527 (initialize_low_arch): New function.
7528 * linux-cris-low.c (tdesc_cris): Declare.
7529 (cris_arch_setup): New function.
7530 (cris_usrregs_info, regs_info): New globals.
7531 (cris_regs_info): New function.
7532 (the_low_target): Adjust.
7533 (initialize_low_arch): New function.
7534 * linux-cris-low.c (tdesc_crisv32): Declare.
7535 (cris_arch_setup): New function.
7536 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7537 (cris_regs_info): New function.
7538 (the_low_target): Adjust.
7539 (initialize_low_arch): New function.
7540 * linux-m32r-low.c (tdesc_m32r): Declare.
7541 (m32r_arch_setup): New function.
7542 (m32r_usrregs_info, regs_info): New globals.
7543 (m32r_regs_info): Adjust.
7544 (initialize_low_arch): New function.
7545 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7546 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7547 (tic6x_usrregs_info): Forward declare.
7548 (tic6x_read_description): New function, based on ...
7549 (tic6x_arch_setup): ... this. Reimplement.
7550 (target_regsets): Rename to ...
7551 (tic6x_regsets): ... this, and make static.
7552 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7553 (tic6x_regs_info): New function.
7554 (the_low_target): Adjust.
7555 (initialize_low_arch): New function.
7556 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7557 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7558 (target_regsets): Rename to ...
7559 (xtensa_regsets): ... this, and make static.
7560 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7561 globals.
7562 (xtensa_arch_setup, xtensa_regs_info): New functions.
7563 (the_low_target): Adjust.
7564 (initialize_low_arch): New function.
7565 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7566 (nios2_arch_setup): Set the current process'es tdesc.
7567 (target_regsets): Rename to ...
7568 (nios2_regsets): ... this.
7569 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7570 (nios2_regs_info): New function.
7571 (the_low_target): Adjust.
7572 (initialize_low_arch): New function.
a261b8f5
PA
7573 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7574 (aarch64_arch_setup): Set the current process'es tdesc.
7575 (target_regsets): Rename to ...
7576 (aarch64_regsets): ... this.
7577 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7578 (aarch64_regs_info): New function.
7579 (the_low_target): Adjust.
7580 (initialize_low_arch): New function.
3aee8918
PA
7581 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7582 globals.
7583 (target_regsets): Rename to ...
7584 (tile_regsets): ... this.
7585 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7586 (tile_regs_info): New function.
7587 (tile_arch_setup): Set the current process'es tdesc.
7588 (the_low_target): Adjust.
7589 (initialize_low_arch): New function.
7590 * spu-low.c (tdesc_spu): Declare.
7591 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7592 * win32-arm-low.c (tdesc_arm): Declare.
7593 (arm_arch_setup): New function.
7594 (the_low_target): Install arm_arch_setup instead of
7595 init_registers_arm.
7596 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7597 (init_windows_x86): Rename to ...
7598 (i386_arch_setup): ... this. Set `win32_tdesc'.
7599 (the_low_target): Adjust.
7600 * win32-low.c (win32_tdesc): New global.
7601 (child_add_thread): Don't create the thread cache here.
7602 (do_initial_child_stuff): Set the new process'es tdesc.
7603 * win32-low.h (struct target_desc): Forward declare.
7604 (win32_tdesc): Declare.
7605 * lynx-i386-low.c (tdesc_i386): Declare global.
7606 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7607 * lynx-low.c (lynx_tdesc): New global.
7608 (lynx_add_process): Set the new process'es tdesc.
7609 * lynx-low.h (struct target_desc): Forward declare.
7610 (lynx_tdesc): Declare global.
7611 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7612 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7613 * nto-low.c (nto_tdesc): New global.
7614 (do_attach): Set the new process'es tdesc.
7615 * nto-low.h (struct target_desc): Forward declare.
7616 (nto_tdesc): Declare.
7617 * nto-x86-low.c (tdesc_i386): Declare.
7618 (nto_x86_arch_setup): Set `nto_tdesc'.
7619
b1fbec62
GB
76202013-06-04 Gary Benson <gbenson@redhat.com>
7621
7622 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7623 to qSupported response when appropriate.
7624 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7625 with nonzero-length annex.
7626 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7627 arguments supplied in annex.
7628
d1ec4ce7
DE
76292013-05-31 Doug Evans <dje@google.com>
7630
ac44adcb 7631 PR server/15594
d1ec4ce7
DE
7632 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7633 64 bits in 64-cross-32 environment.
7634
9b25f2d3
PA
76352013-05-28 Pedro Alves <palves@redhat.com>
7636
7637 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7638 (aarch64-without-fpu.c): Delete rule.
7639 * configure.srv (aarch64*-*-linux*): Remove references to
7640 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7641 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7642 declaration.
7643
6740dc9c
PA
76442013-05-24 Pedro Alves <palves@redhat.com>
7645
7646 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7647 instead of strchr/decode_address. Error if the range isn't split
7648 with a ','. Don't assume there's be a ':' in the action.
7649
c2d6af84
PA
76502013-05-23 Yao Qi <yao@codesourcery.com>
7651 Pedro Alves <palves@redhat.com>
7652
7653 * linux-low.c (lwp_in_step_range): New function.
7654 (linux_wait_1): If the thread was range stepping and stopped
7655 outside the stepping range, report the stop to GDB. Otherwise,
7656 continue stepping. Add range stepping debug output.
7657 (linux_set_resume_request): Copy the step range from the resume
7658 request to the lwp.
7659 (linux_supports_range_stepping): New.
7660 (linux_target_ops) <supports_range_stepping>: Set to
7661 linux_supports_range_stepping.
7662 * linux-low.h (struct linux_target_ops)
7663 <supports_range_stepping>: New field.
7664 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7665 * linux-x86-low.c (x86_supports_range_stepping): New.
7666 (the_low_target) <supports_range_stepping>: Set to
7667 x86_supports_range_stepping.
7668 * server.c (handle_v_cont): Handle 'r' action.
7669 (handle_v_requests): Append ";r" if the target supports range
7670 stepping.
7671 * target.h (struct thread_resume) <step_range_start,
7672 step_range_end>: New fields.
7673 (struct target_ops) <supports_range_stepping>:
7674 New field.
7675 (target_supports_range_stepping): New macro.
7676
58794e1a
JB
76772013-05-17 Joel Brobecker <brobecker@adacore.com>
7678
7679 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7680 confusion in comment.
7681
d631c5a7
JB
76822013-05-17 Joel Brobecker <brobecker@adacore.com>
7683
7684 * lynx-low.c (struct process_info_private): New type.
7685 (lynx_add_process): New function.
7686 (lynx_create_inferior, lynx_attach): Replace calls to
7687 add_process by calls to lynx_add_process.
7688 (lynx_resume): If PTID is null, then try using
7689 current_process()->private->last_wait_event_ptid.
7690 Add comments.
7691 (lynx_clear_inferiors): Delete. The contents of that function
7692 has been inlined in lynx_mourn;
7693 (lynx_wait_1): Save the ptid in the process's private data.
7694 (lynx_mourn): Free the process' private data. Replace call
7695 to lynx_clear_inferiors by call to clear_inferiors.
7696
96f7a20f
YQ
76972013-05-17 Yao Qi <yao@codesourcery.com>
7698
7699 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7700 the right place.
7701
db0dfaa0
LM
77022013-05-16 Luis Machado <lgustavo@codesourcery.com>
7703
7704 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7705 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7706 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7707 PT_TEXT_END_ADDR guards. Update comments.
7708 (linux_target_op) <read_offsets>: Conditionally define to
7709 linux_read_offsets if the target is UCLIBC and if it defines
7710 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7711
68f5f838
SL
77122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7713 Andrew Jenner <andrew@codesourcery.com>
7714
7715 * Makefile.in (SFILES): Add linux-nios2-low.c.
7716 (clean): Add action to delete nios2-linux.c.
7717 (nios2-linux.c): New rule.
7718 * configure.srv: Add nios2*-*-linux*.
7719 * linux-nios2-low.c: New.
7720
1ebff1fd
HAQ
77212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7722
7723 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7724
f6150862
HZ
77252013-04-25 Hui Zhu <hui@codesourcery.com>
7726
7727 PR gdb/15186
f6150862
HZ
7728 * ax.c (ax_printf): Add fflush.
7729
614c279d
TT
77302013-04-22 Tom Tromey <tromey@redhat.com>
7731
7732 * Makefile.in (SFILES): Add filestuff.c.
7733 (OBS): Add filestuff.o.
7734 (filestuff.o): New target.
7735 * config.in, configure: Rebuild.
7736 * configure.ac: Check for fdwalk, pipe2.
7737
7d4e5717
PA
77382013-04-17 Pedro Alves <palves@redhat.com>
7739
7740 * configure.ac (USE_THREAD_DB): Delete variable.
7741 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7742 Don't AC_SUBST USE_THREAD_DB.
7743 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7744 * config.in, configure: Regenerate.
7745
d5c93e41
PA
77462013-04-16 Pedro Alves <palves@redhat.com>
7747
7748 * linux-low.h (struct lwp_info) <thread_known>: Move under
7749 the USE_THREAD_DB #ifdef.
7750
04f5fe89
PA
77512013-04-16 Pedro Alves <palves@redhat.com>
7752
7753 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7754 (linux-low.o): Delete rule.
7755 * linux-low.h: Always include "gdb_thread_db.h" instead of
7756 conditionally including thread_db.h.
7757 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7758 HAVE_THREAD_DB_H.
7759
480b27bf
JK
77602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7761
7762 * Makefile.in (install-only): Fix make install regression.
7763
43662968
JK
77642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7765
7766 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7767 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7768 installation.
7769 * gdbserver.1: Remove.
7770
3e74e146
PA
77712013-03-22 Pedro Alves <palves@redhat.com>
7772
7773 * linux-low.c (handle_extended_wait): Don't call
7774 linux_enable_event_reporting.
7775
a8347a2a
TT
77762013-03-15 Tony Theodore <tonyt@logyst.com>
7777
7778 PR build/9098:
7779 * Makefile.in (SHELL): Use @SHELL@.
7780
eeb56fa7
SDJ
77812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7782
7783 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7784 compiler warning.
7785
4fa7e2ff
JB
77862013-03-13 Joel Brobecker <brobecker@adacore.com>
7787
7788 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7789 Remove extraneous NULL element.
7790
8ddb1965
YQ
77912013-03-13 Yao Qi <yao@codesourcery.com>
7792
7793 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7794 'V' block in trace frame.
7795
9accd112
MM
77962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7797
7798 * target.h (struct target_ops): Add btrace ops.
7799 (target_supports_btrace): New macro.
7800 (target_enable_btrace): New macro.
7801 (target_disable_btrace): New macro.
7802 (target_read_btrace): New macro.
7803 * gdbthread.h (struct thread_info): Add btrace field.
7804 * server.c: Include btrace-common.h.
7805 (handle_btrace_general_set): New function.
7806 (handle_btrace_enable): New function.
7807 (handle_btrace_disable): New function.
7808 (handle_general_set): Call handle_btrace_general_set.
7809 (handle_qxfer_btrace): New function.
7810 (struct qxfer qxfer_packets[]): Add btrace entry.
7811 * inferiors.c (remove_thread): Disable btrace.
7812 * linux-low: Include linux-btrace.h.
7813 (linux_low_enable_btrace): New function.
7814 (linux_low_read_btrace): New function.
7815 (linux_target_ops): Add btrace ops.
7816 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7817 Add srv_linux_btrace=yes.
7818 (x86_64-*-linux*): Add linux-btrace.o.
7819 Add srv_linux_btrace=yes.
7820 * configure.ac: Define HAVE_LINUX_BTRACE.
7821 * config.in: Regenerated.
7822 * configure: Regenerated.
7823
5cc22e4c
MM
78242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7825
7826 * server.c (handle_qxfer): Preserve error message if -3 is
7827 returned.
7828 (qxfer): Document the -3 return value.
7829
7c97f91e
MM
78302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7831
7832 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7833 (linux_btrace_h): New variable.
7834 (linux-btrace.o): New rule.
7835
be9a119c 78362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7837 Hafiz Abid Qadeer <abidh@codesourcery.com>
7838
7839 * tracepoint.c (trace_buffer_size): New global.
7840 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7841 (init_trace_buffer): Change to one-argument function. Allocate
7842 trace buffer memory.
7843 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7844 handle QTBuffer:size packet.
7845 (cmd_bigqtbuffer_size): New function.
7846 (initialize_tracepoint): Call init_trace_buffer with
7847 DEFAULT_TRACE_BUFFER_SIZE.
7848 * server.c (handle_query): Add QTBuffer:size in the
7849 supported packets.
7850
e64f7499
YQ
78512013-03-07 Yao Qi <yao@codesourcery.com>
7852
7853 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7854 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7855 of -1.
7856 (cmd_qtsp): Adjust condition. Do post increment.
7857 Set cur_action and cur_step_action back to 0.
7858
f0ae6fc3
PA
78592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7860
7861 PR server/15236
7862 * linux-low.c (linux_write_memory): Return early success if LEN is
7863 zero.
7864
b5b0b0af
CV
78652013-03-05 Corinna Vinschen <vinschen@redhat.de>
7866
334ad4a8 7867 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7868
589bc927
TT
78692013-02-28 Tom Tromey <tromey@redhat.com>
7870
7871 * configure.ac: Invoke AC_SYS_LARGEFILE.
7872 * configure, config.in: Rebuild.
7873
dfe07582
CV
78742013-02-28 Corinna Vinschen <vinschen@redhat.com>
7875
7876 * win32-low.c: Throughout, fix format strings and casts of
7877 printf-like functions to avoid type related warnings on all
7878 platforms.
7879 (get_child_debug_event): Print dwDebugEventCode as hex since
7880 that's how it's usually documented.
7881
736cd585
YQ
78822013-02-28 Yao Qi <yao@codesourcery.com>
7883
7884 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7885 pulongest.
7886
e1f58301
JW
78872013-02-27 Jiong Wang <jiwang@tilera.com>
7888
7889 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7890 (reg-tilegx32.c): New rule.
7891 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7892 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7893 different register info initializer according to elf class.
7894 (init_registers_tilgx32): New function. The tilegx32 register info
7895 initializer.
7896 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7897 (tile_store_gregset): Likewise.
7898
d171ca78
YQ
78992013-02-27 Yao Qi <yao@codesourcery.com>
7900
7901 * server.c (process_point_options): Print debug message when
7902 debug_threads is true.
7903
282bbdf3
YQ
79042013-02-26 Yao Qi <yao@codesourcery.com>
7905
7906 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7907
aca22551
PA
79082013-02-19 Pedro Alves <palves@redhat.com>
7909 Kai Tietz <ktietz@redhat.com>
7910
7911 PR gdb/15161
7912
7913 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7914 instead of strtoul to extract address from packet.
7915 (process_serial_event) <'z'>: Likewise.
7916
4f3cee1c
YQ
79172013-02-18 Yao Qi <yao@codesourcery.com>
7918
7919 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7920
8e1d55a3
PA
79212013-02-14 Pedro Alves <palves@redhat.com>
7922
7923 Plug memory leak.
7924
7925 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7926 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7927
458820da
PA
79282013-02-14 Pedro Alves <palves@redhat.com>
7929
7930 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7931
baea0dae
PA
79322013-02-14 Pedro Alves <palves@redhat.com>
7933
7934 * tracepoint.c (save_string): Delete.
7935 (add_tracepoint_action): Use savestring instead of save_string.
7936
0b1afbb3
PA
79372013-02-12 Pedro Alves <palves@redhat.com>
7938
7939 * linux-xtensa-low.c: Ditto.
7940 * xtensa-xtregs.c: Ditto.
7941
8a4ac37e
PA
79422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7943
7944 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7945 thread_db.
7946
148de6bb
MS
79472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7948
7949 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7950 aarch64_num_wp_regs and aarch64_num_bp_regs to
7951 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7952
55fac6e0
MS
79532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7954
7955 * linux-aarch64-low.c (ps_get_thread_area): Replace
7956 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7957
176eb98c
MS
79582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7959 Marcus Shawcroft <marcus.shawcroft@arm.com>
7960 Nigel Stephens <nigel.stephens@arm.com>
7961 Yufeng Zhang <yufeng.zhang@arm.com>
7962
7963 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7964 (aarch64.c, aarch64-without-fpu.c): New targets.
7965 * configure.srv (aarch64*-*-linux*): New.
7966 * linux-aarch64-low.c: New file.
7967
56f7af9c
MS
79682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7969
43aaf8b6 7970 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7971 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7972 (dequeue_one_deferred_signal, linux_resume_one_thread)
7973 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7974 (linux_tracefork_grandchild, linux_test_for_tracefork)
7975 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7976 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7977 where the argument is 0.
7978
60f662b0
YQ
79792013-01-25 Yao Qi <yao@codesourcery.com>
7980
7981 * event-loop.c: Include "queue.h".
7982 (gdb_event_p): New typedef.
7983 (struct gdb_event) <next_event>: Remove.
7984 (event_queue): Change to QUEUE(gdb_event_p).
7985 (async_queue_event): Remove.
7986 (gdb_event_xfree): New.
7987 (initialize_event_loop): New.
7988 (process_event): Use API from QUEUE.
7989 (wait_for_event): Likewise.
7990 * server.c (main): Call initialize_event_loop.
7991 * server.h (initialize_event_loop): Declare.
7992
5ae4861a
YQ
79932013-01-18 Yao Qi <yao@codesourcery.com>
7994
7995 * ax.h (struct eval_agent_expr_context): New.
7996 (gdb_eval_agent_expr): Update declaration.
7997 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7998 TFRAME. Add new argument CTX.
7999 * server.h (struct eval_agent_expr_context): Declare.
8000 (agent_mem_read, agent_tsv_read): Update declaration.
8001 (agent_mem_read_string): Likewise.
8002 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8003 (add_traceframe_block): Add new argument TPOINT.
8004 Increase TPOINT->traceframe_usage.
8005 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8006 eval_tracepoint_agent_expr.
8007 (condition_true_at_tracepoint): Likewise.
8008 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8009 (agent_mem_read_string, agent_tsv_read): Likewise.
8010
85e00e85
YQ
80112013-01-16 Yao Qi <yao@codesourcery.com>
8012
8013 * linux-low.c (linux_resume_one_lwp): Don't check
8014 'lwp->bp_reinsert != 0'.
8015
4039cf45
JB
80162013-01-07 Joel Brobecker <brobecker@adacore.com>
8017 Pedro Alves <palves@redhat.com>
8018
8019 * lynx-low.c (ptrace_request_to_str): Define a temporary
8020 macro and use it to simplify this function's implementation.
8021
9044dee2
JB
80222013-01-07 Joel Brobecker <brobecker@adacore.com>
8023
8024 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8025 sets errno.
8026
e6352c8f
JB
80272013-01-07 Joel Brobecker <brobecker@adacore.com>
8028
8029 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8030
50681a27
JB
80312013-01-07 Joel Brobecker <brobecker@adacore.com>
8032
8033 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8034
3f6e77ef
JB
80352013-01-07 Joel Brobecker <brobecker@adacore.com>
8036
8037 * lynx-low.c (lynx_resume): Use the resume_info parameter
8038 to determine the ptid for the lynx_ptrace call, unless
8039 it is equal to minus_one_ptid, in which case we use the
8040 ptid of the current_inferior.
8041 (lynx_wait_1): After having received a thread create/exit
8042 event, resume the inferior's execution using the signaling
8043 thread's ptid, rather than the old ptid.
8044
7fda33ae
JB
80452013-01-07 Joel Brobecker <brobecker@adacore.com>
8046
8047 * lynx-low.c (lynx_resume): Delete variable ret.
8048
b9786c74
JB
80492013-01-01 Joel Brobecker <brobecker@adacore.com>
8050
8051 * gdbreplay.c (gdbreplay_version): Update copyright year.
8052 * server.c (gdbserver_version): Likewise.
8053
8b93d60f
JB
80542012-12-17 Joel Brobecker <brobecker@adacore.com>
8055
8056 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8057 new thread.
8058
037335a7
JB
80592012-12-17 Joel Brobecker <brobecker@adacore.com>
8060
8061 * lynx-low.c (ptrace_request_to_str): Add handling for
8062 PTRACE_GETTRACESIG.
8063
52d4cbd8
JB
80642012-12-17 Joel Brobecker <brobecker@adacore.com>
8065
8066 * lynx-low.c (lynx_attach): Delete variable new_process.
8067
ab8f6ca9
JB
80682012-12-17 Joel Brobecker <brobecker@adacore.com>
8069
8070 * lynx-low.c (lynx_create_inferior): Delete variable
8071 new_process.
8072
78cbc024
JB
80732012-12-17 Joel Brobecker <brobecker@adacore.com>
8074
8075 * lynx-low.c (ptrace_request_to_str): Do not handle
8076 PTRACE_GETTHREADLIST if this macro does not exist.
8077
14a00470
YQ
80782012-12-15 Yao Qi <yao@codesourcery.com>
8079
8080 * Makefile.in (OBS): Add notif.o.
8081 * notif.c, notif.h: New.
8082 * server.c: Include "notif.h".
8083 (struct vstop_notif) <next>: Remove.
8084 <base>: New field.
8085 (queue_stop_reply): Update.
8086 (push_event, send_next_stop_reply): Remove.
8087 (discard_queued_stop_replies): Update.
8088 (notif_stop): New variable.
8089 (handle_v_stopped): Remove.
8090 (handle_v_requests): Don't call handle_v_stopped. Call
8091 handle_ack_notif instead.
8092 (queue_stop_reply_callback): Call notif_event_enque instead
8093 of queue_stop_reply.
8094 (handle_status): Don't call send_next_stop_reply, call
8095 notif_write_event instead.
8096 (kill_inferior_callback): Likewise.
8097 (detach_or_kill_inferior_callback): Likewise.
8098 (main): Call initialize_notif.
8099 (process_serial_event): Call QUEUE_is_empty.
8100 (handle_target_event): Call notif_push instead of push event.
8101 * server.h (push_event): Remove declaration.
8102
61c125b9
TT
81032012-12-10 Tom Tromey <tromey@redhat.com>
8104
8105 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8106 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8107 macros.
8108 (.c.o): Rewrite.
8109 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8110 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8111 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8112 (amd64-linux-ipa.o, ax.o): Rewrite.
8113 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8114 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8115 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8116 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8117 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8118 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8119 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8120 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8121 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8122 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8123 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8124 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8125 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8126 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8127 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8128 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8129 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8130 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8131 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8132 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8133 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8134 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8135 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8136 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8137 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8138 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8139 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8140 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8141 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8142 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8143 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8144 (reg-tilegx.o): Remove.
8145 (all_object_files): New macro.
8146 Include .deps files.
8147 * aclocal.m4, configure: Rebuild.
8148 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8149 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8150 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8151
e90e9ad9
TT
81522012-12-05 Tom Tromey <tromey@redhat.com>
8153
8154 PR gdb/14917:
8155 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8156
02d403bf 81572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8158
8159 * configure.ac: Check for linux/perf_event.h.
8160 * config.in: Regenerated.
8161 * configure: Regenerated.
8162
0270a750
PA
81632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8164
8165 * hostio.c (handle_readlink): Decrease buffer size
8166 parameter passed to readlink by one byte.
8167
8c29b58e
YQ
81682012-11-26 Yao Qi <yao@codesourcery.com>
8169
8170 * configure.ac (build_warnings): Append '-Wempty-body'.
8171 * configure: Regenerated.
8172 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8173 body.
8174
8bdce1ff
PM
81752012-11-15 Pierre Muller <muller@sourceware.org>
8176
8177 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8178 * config.in: Regenerate.
8179 * configure: Regenerate.
8180 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8181 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8182 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8183 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8184 header.
8185 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8186 instead of <sys/wait.h> header.
8187 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8188
02d403bf 81892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8190
8191 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8192 (various make rules): Remove -DGDBSERVER
8193
fbd5db48
YQ
81942012-11-09 Yao Qi <yao@codesourcery.com>
8195
8196 * spu-low.c (current_ptid): Move it to ..
8197 * gdbthread.h: ... here. New.
8198 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8199 * server.c (myresume, process_serial_event): Likewise.
8200 * thread-db.c (thread_db_find_new_threads): Likewise.
8201 * tracepoint.c (run_inferior_command): Likewise.
8202
b3dc46ff
AB
82032012-10-01 Andrew Burgess <aburgess@broadcom.com>
8204
8205 * server.c (handle_search_memory_1): Include access length in
8206 warning message.
8207
07c04788
HPN
82082012-09-05 Michael Brandt <michael.brandt@axis.com>
8209
8210 * linux-crisv32-low.c: Fix compile errors.
8211
918d227b
YQ
82122012-09-04 Yao Qi <yao@codesourcery.com>
8213
8214 * tracepoint.c (cmd_qtsv): Adjust debug message.
8215 Don't check CUR_TPOINT.
8216
18c1b81a
YQ
82172012-08-28 Yao Qi <yao@codesourcery.com>
8218
8219 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8220 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8221 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8222 Remove declarations of xmalloc, xreallloc, xstrdup and
8223 freeargv.
8224 * Makefile.in (libiberty_h): New.
8225 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8226 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8227
dc82f37b
YQ
82282012-08-23 Yao Qi <yao@codesourcery.com>
8229
8230 * server.h: Remove declaration of 'xsnprintf'.
8231
406b1477
KS
82322012-08-22 Keith Seitz <keiths@redhat.com>
8233
8234 * server.h: Include build-gnulib-gbserver/config.h.
8235 * gdbreplay.c: Likewise.
8236
e6712ff1
DE
82372012-08-08 Doug Evans <dje@google.com>
8238
8239 * Makefile.in (SFILES): Add gdb_vecs.c.
8240 (OBS): Add gdb_vecs.o.
8241 (gdb_vecs_h, host_defs_h): New variables.
8242 (thread-db.o): Add $(gdb_vecs_h) dependency.
8243 (gdb_vecs.o): New rule.
8244 * thread-db.c: #include "gdb_vecs.h".
8245 (thread_db_load_search): Use a vector to iterate over path elements.
8246 Handle text appearing after "$pdir".
8247
8248 * configure.ac: Add check for strstr.
8249 * config.in: Regenerate.
8250 * configure: Regenerate.
8251
7c3270ae
UW
82522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8253
8254 * hostio.c (handle_pread): If pread fails, fall back to attempting
8255 lseek/read.
8256 (handle_pwrite): Likewise for pwrite.
8257
b62e2b27
UW
82582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8259
8260 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8261 between unsupported TYPE and unimplementable ADDR/LEN combination.
8262 (arm_insert_point): Act on new return value.
8263
78a99e91
PA
82642012-07-31 Pedro Alves <palves@redhat.com>
8265
8266 * server.c (process_point_options): Only skip tokens if we find
8267 one that is unrecognized. Don't treat 'X' specially while
8268 skipping unrecognized tokens.
8269
fcf303ab
UW
82702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8271
8272 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8273 to 4-byte-align HW breakpoint addresses for Thumb.
8274
7255706c
YQ
82752012-07-27 Yao Qi <yao@codesourcery.com>
8276
8277 PR remote/14161.
8278
8279 * server.h: Declare gdb_agent_about_to_close.
8280 * target.c (kill_inferior): Include "agent.h".
8281 New. Send command 'kill'.
8282 * target.h (kill_inferior): Removed macro.
8283 * tracepoint.c (gdb_agent_about_to_close): New.
8284 (gdb_agent_helper_thread): Handle command 'close'.
8285 Wait endlessly until the inferior stops.
8286 Install gdb_agent_remove_socket to atexit hook.
8287 (agent_socket_name): New static variable.
8288 (gdb_agent_socket_init): Replace local variable 'name' with
8289 'agent_socket_name'.
8290 (gdb_agent_remove_socket): New.
8291
5a3f286f
YQ
82922012-07-27 Yao Qi <yao@codesourcery.com>
8293
8294 * server.c (process_point_options): Stop at 'X' when parsing.
8295
961bd387
ME
82962012-07-19 Michael Eager <eager@eagercon.com>
8297
a261b8f5 8298 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8299 to hw_execute.
8300 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8301 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8302 hardware breakpoint.
8303
aa7c7447
JK
83042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8305
8306 * gdbserver/linux-low.c (initialize_low): Call
8307 linux_ptrace_init_warnings.
8308
7f216e7c
DE
83092012-07-02 Doug Evans <dje@google.com>
8310
8311 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8312 pointer to int.
8313
d3ce09f5
SS
83142012-07-02 Stan Shebs <stan@codesourcery.com>
8315
8316 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8317 (ax.o): Add it to build rule.
8318 (ax-ipa.o): Ditto.
8319 (OBS): Add format.o.
8320 (IPA_OBS): Add format.o.
8321 * server.c (handle_query): Claim support for breakpoint commands.
8322 (process_point_options): Add command case.
8323 (process_serial_event): Leave running if there are printfs in
8324 effect.
8325 * mem-break.h (any_persistent_commands): Declare.
8326 (add_breakpoint_commands): Declare.
8327 (gdb_no_commands_at_breakpoint): Declare.
8328 (run_breakpoint_commands): Declare.
8329 * mem-break.c (struct point_command_list): New struct.
8330 (struct breakpoint): New field command_list.
8331 (any_persistent_commands): New function.
8332 (add_commands_to_breakpoint): New function.
8333 (add_breakpoint_commands): New function.
8334 (gdb_no_commands_at_breakpoint): New function.
8335 (run_breakpoint_commands): New function.
8336 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8337 locally.
8338 * ax.c: Include format.h.
8339 (ax_printf): New function.
8340 (gdb_eval_agent_expr): Add printf opcode.
8341
2f8f6aed
YQ
83422012-06-13 Yao Qi <yao@codesourcery.com>
8343
8344 * server.c (start_inferior): Remove duplicated writes to fields
8345 'last_resume_kind' and 'last_status' of 'current_inferior'.
8346
0c9070b3
YQ
83472012-06-12 Yao Qi <yao@codesourcery.com>
8348 Pedro Alves <palves@redhat.com>
8349
8350 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8351 comment.
8352 * server.c (handle_v_cont): Extend comment.
8353
c52daf70
YQ
83542012-06-11 Yao Qi <yao@codesourcery.com>
8355
8356 * linux-low.c (linux_attach): Add 'static'.
8357
d38bbb0a
YQ
83582012-06-06 Yao Qi <yao@codesourcery.com>
8359
8360 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8361
89dc0afd
JK
83622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8363
8364 Fix gcc -flto compilation warning.
8365 * server.c (main): Make variable multi_mode and attach volatile.
8366
75f62ce7
TJB
83672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8368
8369 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8370 if the platform doesn't know about it.
8371
65f479b6
PA
83722012-05-30 Jeff Kenton <jkenton@tilera.com>
8373
8374 * Makefile.in (SFILES): Add linux-tile-low.c.
8375 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8376 * configure.srv: Handle tilegx-*-linux*.
8377 * linux-tile-low.c: New file.
8378
0c5bf5a9
JK
83792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8380
8381 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8382
a493e3e2
PA
83832012-05-24 Pedro Alves <palves@redhat.com>
8384
8385 PR gdb/7205
8386
43aaf8b6 8387 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8388
2ea28649
PA
83892012-05-24 Pedro Alves <palves@redhat.com>
8390
8391 PR gdb/7205
8392
8393 Replace target_signal with gdb_signal throughout.
8394
8d409d16
MR
83952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8396
8397 * linux-low.c (linux_store_registers): Avoid the copying sequence
8398 when no data has been retrieved by ptrace.
8399
23512c01
MGD
84002012-05-22 Will Deacon <will.deacon@arm.com>
8401
8402 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8403 Include asm/ptrace.h.
8404 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8405 already defined.
8406
4934b29e
MR
84072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8408
8409 * linux-low.c (linux_store_registers): Don't re-retrieve data
8410 with ptrace that has already been obtained from /proc. Always
8411 copy any data retrieved with ptrace to the buffer supplied.
8412
bde24c0a
PA
84132012-05-11 Yao Qi <yao@codesourcery.com>
8414 Pedro Alves <palves@redhat.com>
8415
8416 * linux-low.c (enum stopping_threads_kind): New.
8417 (stopping_threads): Change type to `enum stopping_threads_kind'.
8418 (handle_extended_wait): If stopping and suspending threads, leave
8419 the new_lwp suspended too.
8420 (linux_wait_for_event): Adjust.
8421 (stop_all_lwps): Set `stopping_threads' to
8422 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8423 whether we're suspending threads or just stopping them. Assert no
8424 recursion happens.
8425
623b6bdf
YQ
84262012-04-29 Yao Qi <yao@codesourcery.com>
8427
8428 * server.h: Move some code to ...
8429 * gdbthread.h: ... here. New.
8430 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8431 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8432 (nto-low.o, win32-low.o): Likewise.
8433 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8434 * regcache.c, remote-utils.c, server.c: Likewise.
8435 * target.c, tracepoint.c, win32-low.c: Likewise.
8436
f15f9948
TJB
84372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8438
8439 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8440 (PTRACE_ARG4_TYPE): Likewise.
8441 (PTRACE_XFER_TYPE): Likewise.
8442 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8443 ptrace to PTRACE_ARG3_TYPE.
8444 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8445 (PTRACE_ARG4_TYPE): Likewise.
8446 (PTRACE_XFER_TYPE): Likewise.
8447 (linux_detach_one_lwp): Cast fourth argument of
8448 ptrace to long then PTRACE_ARG4_TYPE.
8449 (regsets_fetch_inferior_registers): Cast third argument of
8450 ptrace to long then PTRACE_ARG3_TYPE.
8451 (regsets_store_inferior_registers): Likewise.
8452
38ea300a
PA
84532012-04-20 Pedro Alves <palves@redhat.com>
8454
8455 * configure: Regenerate.
8456
c971b7fa
PA
84572012-04-19 Pedro Alves <palves@redhat.com>
8458
43aaf8b6 8459 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8460 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8461 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8462 (all, install-only, uninstall, clean-info, all-lib, clean): No
8463 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8464 (maintainer-clean realclean distclean): Use subdir_do.
8465 (subdir_do): New.
8466 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8467 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8468 * acinclude.m4: Include acx_configure_dir.m4.
8469 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8470 calls. Call AC_PROG_RANLIB. Configure gnulib using
8471 ACX_CONFIGURE_DIR.
8472 (GNULIB): New.
8473 (GNULIB_STDINT_H): Adjust.
8474 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8475 * gdbreplay.c: Include build-gnulib/config.h.
8476 * server.h: Likewise.
8477 * aclocal.m4: Regenerate.
8478 * config.in: Regenerate.
8479 * configure: Regenerate.
c971b7fa 8480
809277f8
PA
84812012-04-19 Pedro Alves <palves@redhat.com>
8482
8483 * Makefile.in (LIBGNU, INCGNU): Adjust.
8484 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8485 (all, install-only, uninstall, clean-info, all-lib, clean)
8486 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8487 * configure.ac: Adjust AC_OUTPUT output.
8488 * aclocal.m4: Regenerate.
8489 * configure: Regenerate.
8490
fd9bb8b8
PA
84912012-04-19 Pedro Alves <palves@redhat.com>
8492
8493 * Makefile.in (generated_files): New.
8494 (server_h): Remove the explicit dependency on config.h, and depend
8495 on $generated_files.
8496
1c298c66
PA
84972012-04-19 Pedro Alves <palves@redhat.com>
8498
8499 * Makefile.in (INCGNU): Add -Ignulib.
8500
57c4b50b
PA
85012012-04-19 Pedro Alves <palves@redhat.com>
8502
8503 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8504 (INCGNU): ... this, and spell out -I here.
8505 (GNULIB_LIB): Rename to ...
8506 (LIBGNU): ... this.
8507 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8508
1030e047
PA
85092012-04-19 Pedro Alves <palves@redhat.com>
8510
8511 * config.in: Regenerate.
8512
447d4319
PA
85132012-04-19 Pedro Alves <palves@redhat.com>
8514
8515 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8516 * server.h (memmem): Remove declaration.
8517 * config.in: Regenerate.
8518 * configure: Regenerate.
8519
aad9eab9
YQ
85202012-04-19 Yao Qi <yao@codesourcery.com>
8521
8522 * Makefile.in (SFILES): Add common/vec.c.
8523 (OBS): Add vec.o.
8524 (vec.o): New rule.
8525
3e10640f
YQ
85262012-04-19 Yao Qi <yao@codesourcery.com>
8527
8528 * remote-utils.c (prepare_resume_reply): Replace with macro
8529 target_core_of_thread.
8530 * server.c (handle_qxfer_threads_proper): Likewise.
8531 * target.h (traget_core_of_thread): New macro.
8532
71622373
PA
85332012-04-18 Pedro Alves <palves@redhat.com>
8534
8535 * aclocal.m4: Regenerate.
8536 * configure: Regenerate.
8537
80d26939
YQ
85382012-04-16 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8541 duplicated on address.
8542
42476b70
YQ
85432012-04-16 Yao Qi <yao@codesourcery.com>
8544
8545 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8546 (struct tracepoint_action_ops) <send>: New field.
8547 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8548 (agent_expr_send, x_tracepoint_action_send): New.
8549 (l_tracepoint_action_send): New.
8550 (cmd_qtdp): Download and install tracepoint
8551 according to `use_agent'.
8552 (run_inferior_command): Add one more parameter `len'.
8553 Update callers.
8554 (tracepoint_send_agent): New.
8555 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8556
7bc83639
YQ
85572012-04-16 Yao Qi <yao@codesourcery.com>
8558
8559 * tracepoint.c (download_tracepoints): Moved to ...
8560 (cmd_qtstart): ... here.
8561
5f18041e
YQ
85622012-04-14 Yao Qi <yao@codesourcery.com>
8563
8564 * tracepoint.c: Include inttypes.h.
8565 (struct collect_memory_action): Use sized types.
8566 (struct tracepoint): Likewise.
8567 (cmd_qtdp, stop_tracing): Update print specifiers.
8568 (cmd_qtp, response_tracepoint): Likewise.
8569 (collect_data_at_tracepoint): Likewise.
8570 (collect_data_at_step): Likewise.
8571
55a8c076
YQ
85722012-04-14 Yao Qi <yao@codesourcery.com>
8573
8574 Import gnulib module inttypes.
8575 * aclocal.m4, config.in, configure: Regenerated.
8576
dc750257
YQ
85772012-04-14 Yao Qi <yao@codesourcery.com>
8578
8579 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8580 Makefile and config.status at last.
8581
0ab5faf9
YQ
85822012-04-13 Yao Qi <yao@codesourcery.com>
8583
8584 * tracepoint.c: Include stdint.h unconditionally.
8585
18f5fd81
TJB
85862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8587
8588 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8589 on BFD_HAVE_SYS_PROCFS_TYPE.
8590 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8591 * configure: Regenerate.
8592 * config.in: Likewise.
8593
4d47af5c
L
85942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8595
8596 * Makefile.in (clean): Also remove x32.c x32-linux.c
8597 x32-avx.c x32-avx-linux.c.
8598 (x32.o): New target.
8599 (x32.c): Likewise.
8600 (x32-linux.o): Likewise.
8601 (x32-linux.c): Likewise.
8602 (x32-avx.o): Likewise.
8603 (x32-avx.c): Likewise.
8604 (x32-avx-linux.o): Likewise.
8605 (x32-avx-linux.c): Likewise.
8606
8607 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8608 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8609 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8610 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8611 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8612 i386/x32-avx-linux.xml.
8613
8614 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8615 (init_registers_x32_avx_linux): Likwise.
8616 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8617 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8618
ecedbe58
PA
86192012-04-13 Pedro Alves <palves@redhat.com>
8620
8621 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8622 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8623 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8624 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8625 the sub-make.
8626
c92b5177
L
86272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8628
8629 * linux-x86-low.c (compat_x32_clock_t): New.
8630 (compat_x32_siginfo_t): Likewise.
8631 (compat_x32_siginfo_from_siginfo): Likewise.
8632 (siginfo_from_compat_x32_siginfo): Likewise.
8633 (linux_is_elf64): Likewise.
8634 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8635 and siginfo_from_compat_x32_siginfo for x32.
8636 (x86_arch_setup): Set linux_is_elf64.
8637
214d508e
L
86382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8639
8640 PR gdb/13969
8641 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8642 e_machine field.
8643 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8644 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8645 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8646 compatible with process.
8647
c9a1864a
YQ
86482012-04-12 Yao Qi <yao@codesourcery.com>
8649
8650 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8651 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8652 (install-only, install-info, clean): Handle sub dir gnulib.
8653 (all-lib, am--refresh): New targets.
8654 (memmem.o): Remove target.
8655 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8656 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8657 (AC_REPLACE_FUNCS): Remove memmem.
8658 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8659 (AC_OUTPUT): Generate Makefile in gnulib/.
8660 * aclocal.m4, config.in, configure: Regenerated.
8661
367ba2c2
MR
86622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8663
8664 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8665
9d236627
PA
86662012-04-05 Pedro Alves <palves@redhat.com>
8667
8668 -Werror=strict-aliasing
8669
8670 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8671 pointer.
8672
111217b3
PA
86732012-04-04 Pedro Alves <palves@redhat.com>
8674
8675 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8676 (sparc_store_gregset_from_stack, sparc_store_gregset)
8677 (sparc_breakpoint_at): Fix formatting.
8678
8365dcf5
TJB
86792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8680
8681 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8682 are available.
8683 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8684 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8685 * config.in: Regenerate.
8686 * configure: Likewise.
8687
689cc2ae
PA
86882012-03-29 Pedro Alves <palves@redhat.com>
8689
8690 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8691 Correct ptrace arguments.
8692
c14dfd32
PA
86932012-03-28 Pedro Alves <palves@redhat.com>
8694
8695 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8696 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8697 (IA64_FR1_REGNUM): New defines.
8698 (ia64_fetch_register): New.
8699 (the_low_target): Install it.
8700 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8701 field.
8702 * linux-low.c (linux_fetch_registers): Try the
8703 the_low_target.fetch_register hook first.
8704
8705 * linux-arm-low.c (the_low_target): Adjust.
8706 * linux-bfin-low.c (the_low_target): Adjust.
8707 * linux-cris-low.c (the_low_target): Adjust.
8708 * linux-crisv32-low.c (the_low_target): Adjust.
8709 * linux-m32r-low.c (the_low_target): Adjust.
8710 * linux-m68k-low.c (the_low_target): Adjust.
8711 * linux-mips-low.c (the_low_target): Adjust.
8712 * linux-ppc-low.c (the_low_target): Adjust.
8713 * linux-s390-low.c (the_low_target): Adjust.
8714 * linux-sh-low.c (the_low_target): Adjust.
8715 * linux-sparc-low.c (the_low_target): Adjust.
8716 * linux-tic6x-low.c (the_low_target): Adjust.
8717 * linux-x86-low.c (the_low_target): Adjust.
8718 * linux-xtensa-low.c (the_low_target): Adjust.
8719
63c88e13
PA
87202012-03-26 Pedro Alves <palves@redhat.com>
8721
8722 * server.c (handle_qxfer_libraries): Don't bail early if
8723 the_target->qxfer_libraries_svr4 is not NULL.
8724
fb723180
PA
87252012-03-26 Pedro Alves <palves@redhat.com>
8726
8727 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8728
0afae3cf
PA
87292012-03-23 Pedro Alves <palves@redhat.com>
8730
8731 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8732 "library-list-svr4" element's start tag when the the DSO list is
8733 empty.
8734
485f1ee4
PA
87352012-03-23 Pedro Alves <palves@redhat.com>
8736
8737 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8738 a variable whose type size is the same as the inferior's pointer
8739 size.
8740
a5362b9a
TS
87412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8742
8743 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8744 struct siginfo.
8745 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8746 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8747 * linux-low.h: Include <signal.h>.
8748 (struct siginfo): Remove forward declaration.
8749 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8750 struct siginfo.
8751
d226c142
MF
87522012-03-21 Mike Frysinger <vapier@gentoo.org>
8753
8754 * .gitignore: Ignore more files.
8755
122f36ef
PA
87562012-03-19 Pedro Alves <palves@redhat.com>
8757 Jan Kratochvil <jan.kratochvil@redhat.com>
8758
8759 * server.c (cont_thread, general_thread): Add describing comments.
8760 (start_inferior): Clear `cont_thread'.
8761 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8762 of a process.
8763
fc3e5175
YQ
87642012-03-15 Yao Qi <yao@codesourcery.com>
8765
8766 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8767 handling to ...
8768 (cmd_qtdp): ... here.
8769
8d0d92cd
YQ
87702012-03-15 Yao Qi <yao@codesourcery.com>
8771
8772 * tracepoint.c (struct tracepoint_action_ops): New.
8773 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8774 (m_tracepoint_action_download): New.
8775 (r_tracepoint_action_download): New.
8776 (x_tracepoint_action_download): New.
8777 (l_tracepoint_action_download): New.
8778 (add_tracepoint_action): Install `action->ops' according type.
8779 (download_tracepoint_1): Move code `download' function pointer
8780 of various tracepoint_action_ops.
8781
87b0bb13
JK
87822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8783
8784 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8785 linux_ptrace_attach_warnings.
8786
5f572dec
JK
87872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8788
8789 * Makefile.in (linux-ptrace.o): New.
8790 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8791 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8792 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8793 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8794 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8795 of these targets.
8796 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8797
f4647387
YQ
87982012-03-08 Yao Qi <yao@codesourcery.com>
8799 Pedro Alves <palves@redhat.com>
8800
8801 Fix PR server/13392.
8802 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8803 offset of JMP insn.
8804 * tracepoint.c (remove_tracepoint): New.
8805 (cmd_qtdp): Call remove_tracepoint when failed to install.
8806
9b224c5e
PA
88072012-03-07 Pedro Alves <palves@redhat.com>
8808
8809 * linux-low.c (get_detach_signal): New.
8810 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8811 Pass on pending signals to PTRACE_DETACH. Check the result of the
8812 ptrace call.
8813 * server.c (program_signals, program_signals_p): New.
8814 (handle_general_set): Handle QProgramSignals.
8815 * server.h (program_signals, program_signals_p): Declare.
8816
e237a7e2
JK
88172012-03-05 Pedro Alves <palves@redhat.com>
8818 Jan Kratochvil <jan.kratochvil@redhat.com>
8819
8820 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8821 New comment why.
8822
5808517f
YQ
88232012-03-03 Yao Qi <yao@codesourcery.com>
8824
8825 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8826 agent_look_up_symbols.
8827
58b4daa5
YQ
88282012-03-03 Yao Qi <yao@codesourcery.com>
8829
8830 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8831 (linux-x86-low.o): Likewise.
8832 * server.h: Remove in_process_agent_loaded.
8833 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8834 common/agent.c.
8835 Update callers.
8836
8ffcbaaf
YQ
88372012-03-03 Yao Qi <yao@codesourcery.com>
8838
8839 * tracepoint.c (gdb_agent_capability): New global.
8840 (in_process_agent_loaded_ust): Renamed to
8841 `in_process_agent_supports_ust'.
8842 Update callers.
8843 (in_process_agent_supports_ust): Call agent_capability_check.
8844 (clear_installed_tracepoints): Assert that agent supports
8845 agent.
8846
d1feda86
YQ
88472012-03-03 Yao Qi <yao@codesourcery.com>
8848
8849 * linux-low.c (linux_supports_agent): New.
8850 (linux_target_ops): Initialize field `supports_agent' with
8851 linux_supports_agent.
8852 * target.h (struct target_ops) <supports_agent>: New.
8853 (target_supports_agent): New macro.
8854 * server.c (handle_general_set): Handle packet 'QAgent'.
8855 (handle_query): Send `QAgent+'.
8856 * Makefile.in (server.o): Depends on agent.h.
8857
2fa291ac
YQ
88582012-03-03 Yao Qi <yao@codesourcery.com>
8859
8860 * Makefile.in (OBS): Add agent.o.
8861 Add new rule for agent.o.
8862 Track dependence of tracepoint.c on agent.h.
8863 * tracepoint.c (run_inferior_command_1):
8864 (run_inferior_command): Call agent_run_command.
8865 (gdb_ust_connect_sync_socket): Deleted. Move it to
8866 common/agent.c.
8867 (resume_thread, stop_thread): Likewise.
8868 (gdb_ust_socket_init): Renamed to ...
8869 (gdb_agent_socket_init): ... New.
8870 (gdb_ust_thread): Renamed to ...
8871 (gdb_agent_helper_thread): ... New.
8872 (gdb_ust_init): Move some code to ...
8873 (gdb_agent_init): ... here. New.
8874 [HAVE_UST]: Call gdb_ust_init.
8875 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8876 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8877 * config.in, configure: Regenerated.
8878
05044653
PA
88792012-03-02 Pedro Alves <palves@redhat.com>
8880
8881 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8882 * linux-low.c (struct simple_pid_list): New.
8883 (stopped_pids): New a struct simple_pid_list pointer.
8884 (add_to_pid_list, pull_pid_from_list): New.
8885 (handle_extended_wait): Don't assume the first signal new children
8886 report is SIGSTOP. Adjust call to pull_pid_from_list.
8887 (linux_wait_for_lwp): Adjust.
8888
8d00225b
YQ
88892012-03-02 Yao Qi <yao@codesourcery.com>
8890
8891 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8892 debug log.
8893
19560ba5
YQ
88942012-03-02 Yao Qi <yao@codesourcery.com>
8895
8896 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8897 `stop_pc' and `tpoint'. Update caller.
8898
1faeff08
MR
88992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8900
8901 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8902 * linux-low.c (use_linux_regsets): New macro.
8903 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8904 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8905 (linux_register_in_regsets): New function.
8906 (usr_fetch_inferior_registers): Skip registers covered by
8907 regsets.
8908 (usr_store_inferior_registers): Likewise.
8909 (usr_fetch_inferior_registers): New macro.
8910 (usr_store_inferior_registers): Likewise.
8911 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8912 (linux_store_registers): Likewise.
8913 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8914 prototype.
8915 (init_registers_mips64_dsp_linux): Likewise.
8916 (init_registers_mips_linux): New macro.
8917 (init_registers_mips_dsp_linux): Likewise.
8918 (mips_dsp_num_regs): Likewise.
8919 (DSP_BASE, DSP_CONTROL): New fallback macros.
8920 (mips_base_regs): New macro.
8921 (mips_regmap): Use it. Fix the size.
8922 (mips_dsp_regmap): New variable.
8923 (mips_dsp_regset_bitmap): Likewise.
8924 (mips_arch_setup): New function.
8925 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8926 than mips_regmap.
8927 (mips_cannot_store_register): Likewise.
8928 (the_low_target): Update .arch_setup, .num_regs and .regmap
8929 initializers. Add .regset_bitmap initializer.
8930 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8931 initializer.
8932 * linux-bfin-low.c (the_low_target): Likewise.
8933 * linux-cris-low.c (the_low_target): Likewise.
8934 * linux-crisv32-low.c (the_low_target): Likewise.
8935 * linux-ia64-low.c (the_low_target): Likewise.
8936 * linux-m32r-low.c (the_low_target): Likewise.
8937 * linux-m68k-low.c (the_low_target): Likewise.
8938 * linux-ppc-low.c (the_low_target): Likewise.
8939 * linux-s390-low.c (the_low_target): Likewise.
8940 * linux-sh-low.c (the_low_target): Likewise.
8941 * linux-sparc-low.c (the_low_target): Likewise.
8942 * linux-tic6x-low.c (the_low_target): Likewise.
8943 * linux-x86-low.c (the_low_target): Likewise.
8944 * linux-xtensa-low.c (the_low_target): Likewise.
8945 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8946 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8947 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8948 srv_xmlfiles.
8949 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8950 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8951
c03e6ccc
YQ
89522012-02-29 Yao Qi <yao@codesourcery.com>
8953 Pedro Alves <palves@redhat.com>
8954
8955 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8956 `step_over_finished' is true.
8957
644cebc9
PA
89582012-02-27 Pedro Alves <palves@redhat.com>
8959
8960 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8961 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8962
c14d7ab2
PA
89632012-02-27 Pedro Alves <palves@redhat.com>
8964
8965 PR server/9684
8966 * linux-low.c (pid_is_stopped): New.
8967 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8968
412c89dd
LM
89692012-02-25 Luis Machado <lgustavo@codesourcery.com>
8970
8971 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8972 of conditions.
8973
b745defe
MR
89742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8975
8976 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8977
9f3a5c85
LM
89782012-02-24 Luis Machado <lgustavo@codesourcery>
8979
8980 * server.c (handle_query): Advertise support for target-side
8981 breakpoint condition evaluation.
8982 (process_point_options): New function.
8983 (process_serial_event): When inserting a breakpoint, check for
8984 a target-side condition that should be evaluated.
8985
8986 * mem-break.c: Include regcache.h and ax.h.
8987 (point_cond_list_t): New data structure.
8988 (breakpoint) <cond_list>: New field.
8989 (find_gdb_breakpoint_at): Make non-static.
8990 (delete_gdb_breakpoint_at): Clear any target-side
8991 conditions.
8992 (clear_gdb_breakpoint_conditions): New function.
8993 (add_condition_to_breakpoint): Likewise.
8994 (add_breakpoint_condition): Likewise.
8995 (gdb_condition_true_at_breakpoint): Likewise.
8996 (gdb_breakpoint_here): Return result directly instead
8997 of going through a local variable.
8998
8999 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9000 (clear_gdb_breakpoint_conditions): Likewise.
9001 (add_breakpoint_condition): Likewise.
9002 (gdb_condition_true_at_breakpoint): Likewise.
9003
9004 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9005 (need_step_over_p): Take target-side breakpoint condition into
9006 consideration.
9007
5e1dc496
LM
90082012-02-24 Luis Machado <lgustavo@codesourcery>
9009
9010 * server.h: Include tracepoint.h.
9011 (agent_mem_read, agent_get_trace_state_variable_value,
9012 agent_set_trace_state_variable_value,
9013 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9014 get_set_tsv_func_addr): New prototypes.
9015
9016 * ax.h: New include file.
9017 * ax.c: New source file.
9018
9019 * tracepoint.c: Include ax.h.
9020 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9021 agent_expr, eval_result_type): Move to ax.h.
9022 (parse_agent_expr): Rename to ...
9023 (gdb_parse_agent_expr): ... this, make it non-static and move
9024 to ax.h.
9025 (unparse_agent_expr) Rename to ...
9026 (gdb_unparse_agent_expr): ... this, make it non-static and move
9027 to ax.h.
9028 (eval_agent_expr): Rename to ...
9029 (eval_tracepoint_agent_expr): ... this.
9030 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9031 forward declarations.
9032 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9033 (agent_get_trace_state_variable_value): New function.
9034 (agent_set_trace_state_variable_value): New function.
9035 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9036 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9037 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9038 (condition_true_at_tracepoint): Likewise.
9039 (parse_agent_expr): Rename to ...
9040 (gdb_parse_agent_expr): ... this and move to ax.c.
9041 (unparse_agent_expr): Rename to ...
9042 (gdb_unparse_agent_expr): ... this and move to ax.c.
9043 (gdb_agent_op_name): Move to ax.c.
9044 (eval_agent_expr): Rename to ...
9045 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9046 and move to ax.c.
9047 (eval_tracepoint_agent_expr): New function.
9048 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9049 non-static.
5e1dc496
LM
9050 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9051 ax.c.
9052 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9053 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9054 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9055 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9056 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9057 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9058 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9059 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9060 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9061 (compile_bytecodes): Remove forward declaration.
9062 (is_goto_target): Move to ax.c.
9063 (compile_bytecodes): Move to ax.c and call
9064 agent_get_trace_state_variable_value (...) and
9065 agent_set_trace_state_variable_value (...).
9066
9067 * Makefile.in: Update ax.c and IPA dependencies.
9068
277e4e52
PA
90692012-02-24 Pedro Alves <palves@redhat.com>
9070
9071 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9072 (cmd_bigqtbuffer_circular): ... this. Only handle
9073 'QTBuffer:circular:'.
9074 (handle_tracepoint_general_set): Adjust.
9075
bf4c19f7
YQ
90762012-02-16 Yao Qi <yao@codesourcery.com>
9077
9078 * inferiors.c: Move code to ...
9079 * dll.c: .... here. New.
9080 * server.h: Declare clear_dlls.
9081 * Makefile.in (SFILES): Add dll.c.
9082 (OBS): Add dll.o
9083 (dll.o): New rule.
9084
d73f2619
YQ
90852012-02-11 Yao Qi <yao@codesourcery.com>
9086
9087 * server.c: (handle_monitor_command): Add a new parameter
9088 `own_buf'.
9089 (handle_query): Update caller.
9090
f8255c2a
JB
90912012-02-09 Joel Brobecker <brobecker@adacore.com>
9092
9093 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9094 * configure, config.in: Regenerate.
9095 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9096 is not defined.
9097
da84f473
PA
90982012-02-02 Pedro Alves <palves@redhat.com>
9099
9100 Try SIGKILL first, then PTRACE_KILL.
9101 * linux-low.c (linux_kill_one_lwp): New.
9102 (linux_kill_one_lwp): Rename to ...
9103 (kill_one_lwp_callback): ... this. Use the new
9104 linux_kill_one_lwp.
9105
e886a173
PA
91062012-02-02 Pedro Alves <palves@redhat.com>
9107
9108 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9109 inferior.
9110
be07f1a2
PA
91112012-01-27 Pedro Alves <palves@redhat.com>
9112
9113 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9114 (elf_64_file_p): Make static.
9115 (linux_pid_exe_is_elf_64_file): New.
9116 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9117 Delete declarations.
9118 (linux_pid_exe_is_elf_64_file): Declare.
9119 * linux-x86-low.c (x86_arch_setup): Use
9120 linux_pid_exe_is_elf_64_file.
9121
d8301ad1
JK
91222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9123
9124 * linux-low.c (linux_wait_for_event_1): Rename to ...
9125 (linux_wait_for_event): ... here and merge it with former
9126 linux_wait_for_event - new variable wait_ptid, use it.
9127 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9128
01b17894
PA
91292012-01-23 Pedro Alves <palves@redhat.com>
9130
9131 * server.c (main): Avoid yet another case of infinite loop while
9132 detaching/killing after a longjmp.
9133
e825046f
JK
91342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9135
9136 Code cleanup.
9137 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9138
b9e7b9c3
UW
91392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9140
9141 * hostio.c (handle_readlink): New function.
9142 (handle_vFile): Call it to handle "vFile:readlink" packets.
9143
901f9912
UW
91442012-01-20 Pedro Alves <palves@redhat.com>
9145 Ulrich Weigand <ulrich.weigand@linaro.org>
9146
9147 * server.c (handle_v_requests): Only support vAttach and vRun to
9148 start multiple processes when in extended protocol mode.
9149
fc1ab1a0
PA
91502012-01-17 Pedro Alves <palves@redhat.com>
9151
9152 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9153 memalign plus mprotect to allocate the scratch buffer.
9154
7d5d4e98
PA
91552012-01-13 Pedro Alves <palves@redhat.com>
9156
9157 * server.c (attach_inferior): Clear `cont_thread'.
9158
f128d5e9
PA
91592012-01-13 Pedro Alves <palves@redhat.com>
9160
9161 * server.c (main): Avoid infinite loop while detaching/killing
9162 after a longjmp.
9163
06db92f0
DE
91642012-01-09 Doug Evans <dje@google.com>
9165
9166 * server.c (start_inferior): Set last_ptid in --wrapper case.
9167
32d92999
YQ
91682012-01-06 Yao Qi <yao@codesourcery.com>
9169
9170 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9171 defined.
9172 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9173
5e0a92a9
YQ
91742012-01-04 Yao Qi <yao@codesourcery.com>
9175
9176 * tracepoint.c (cmd_qtdp): Print debug message
9177 for static tracepoint.
9178
ae639e8c
YQ
91792012-01-04 Yao Qi <yao@codesourcery.com>
9180
9181 * tracepoint.c (trace_vdebug): Differentiate debug message
9182 between gdbserver and IPA.
9183
f72429c5
YQ
91842012-01-03 Yao Qi <yao@codesourcery.com>
9185
9186 * tracepoint.c (tracepoint_was_hit): Don't collect for
9187 static tracepoint.
9188
12c3e59c
JB
91892012-01-02 Joel Brobecker <brobecker@adacore.com>
9190
9191 * terminal.h: Reformat copyright header.
9192
67827812
JB
91932012-01-02 Joel Brobecker <brobecker@adacore.com>
9194
9195 * server.c (gdbserver_version): Update copyright year.
9196 * gdbreplay.c (gdbreplay_version): Likewise.
9197
3e52c33d
JK
91982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9199
9200 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9201
9202 Revert:
9203 2011-12-18 Hui Zhu <teawater@gmail.com>
9204 * linux-low.c (linux_create_inferior): Save return value to ret.
9205
66f1260e
HZ
92062011-12-18 Hui Zhu <teawater@gmail.com>
9207
9208 * linux-low.c (linux_create_inferior): Save return value to ret.
9209
e77616d7
DE
92102011-12-16 Doug Evans <dje@google.com>
9211
e7b06c57
DE
9212 * linux-low.c (linux_create_inferior): If stdio connection,
9213 redirect stdin from /dev/null, stdout to stderr.
9214 * remote-utils.c (remote_is_stdio): New static global.
9215 (remote_connection_is_stdio): New function.
9216 (remote_prepare): Handle stdio connection.
9217 (remote_open): Ditto.
9218 (remote_close): Don't close stdin for stdio connections.
9219 (read_prim,write_prim): New functions. Replace all calls to
9220 read/write to these.
9221 * server.c (main): Watch for "-" argument. Move call to
9222 remote_prepare before start_inferior.
9223 * server.h (STDIO_CONNECTION_NAME): New macro.
9224 (remote_connection_is_stdio): Declare.
9225
e77616d7
DE
9226 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9227 in debugging output.
9228
82067193
YQ
92292011-12-15 Yao Qi <yao@codesourcery.com>
9230
9231 * tracepoint.c: Include sys/syscall.h.
9232 (gdb_ust_thread): Remove preprocessor conditional.
9233
82bfbe7e
PA
92342011-12-14 Pedro Alves <pedro@codesourcery.com>
9235
9236 * linux-low.c (linux_detach_one_lwp): Call
9237 the_low_target.prepare_to_resume before detaching.
9238
712c6575
YQ
92392011-12-14 Yao Qi <yao@codesourcery.com>
9240
9241 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9242 of write.
9243
d54d1edf
YQ
92442011-12-14 Yao Qi <yao@codesourcery.com>
9245
9246 * i386-low.c (i386_low_stopped_data_address): Initialize local
9247 variable `control'.
9248
6210a125
PA
92492011-12-13 Pedro Alves <pedro@codesourcery.com>
9250
9251 PR remote/13492
9252
9253 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9254 DR_CONTROL unless necessary. Extend comments.
9255 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9256 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9257
2ece8244
YQ
92582011-12-13 Yao Qi <yao@codesourcery.com>
9259
9260 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9261 macros.
9262 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9263
784867a5
JK
92642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9265
9266 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9267 Print new debug message for such case.
9268
6bf36717
JK
92692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9270
9271 Fix overlapping memcpy.
9272 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9273 the read_inferior_memory transfer.
9274 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9275 write_inferior_memory transfer.
9276 (set_fast_tracepoint_jump): New variable buf. Use it for the
9277 read_inferior_memory and write_inferior_memory transfers.
9278 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9279 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9280 Use it for the write_inferior_memory transfer.
9281 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9282 buffers.
9283
50275556
MR
92842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9285
9286 * linux-low.c (fetch_register, store_register): Make code
9287 consistent, fix formatting.
9288
7325beb4
MR
92892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9290
9291 * linux-low.c (usr_store_inferior_registers): Factor out code
9292 to handle individual registers into...
9293 (store_register): ... this new function.
9294
c642a434
UW
92952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9296
9297 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9298 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9299 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9300 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9301 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9302 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9303 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9304 (srv_xmlfiles): Add new XML files.
9305
9306 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9307 and <sys/uio.h>.
9308 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9309 (init_registers_s390_linux32v1): Add prototype.
9310 (init_registers_s390_linux32v2): Likewise.
9311 (init_registers_s390_linux64v1): Likewise.
9312 (init_registers_s390_linux64v2): Likewise.
9313 (init_registers_s390x_linux64v1): Likewise.
9314 (init_registers_s390x_linux64v2): Likewise.
9315 (s390_num_regs): Increment to 52.
9316 (s390_regmap): Add orig_r2 register.
9317 (s390_num_regs_3264): Increment to 68.
9318 (s390_regmap_3264): Add orig_r2 register.
9319 (s390_collect_ptrace_register): Handle orig_r2 register.
9320 (s390_supply_ptrace_register): Likewise.
9321 (s390_fill_last_break): New function.
9322 (s390_store_last_break): Likewise.
9323 (s390_fill_system_call): New function.
9324 (s390_store_system_call): Likewise.
9325 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9326 register sets.
9327 (s390_check_regset): New function.
9328 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9329 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9330 Update target_regsets for available register sets.
9331
2268b414
JK
93322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9333 Jan Kratochvil <jan.kratochvil@redhat.com>
9334
9335 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9336 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9337 New.
9338 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9339 * linux-low.h (struct process_info_private): New member r_debug.
9340 * server.c (handle_qxfer_libraries): Call
9341 the_target->qxfer_libraries_svr4.
9342 (handle_qxfer_libraries_svr4): New function.
9343 (qxfer_packets): New entry "libraries-svr4".
9344 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9345 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9346 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9347 PACKET_qXfer_libraries_svr4.
9348
d6db1fab
UW
93492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9350
9351 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9352 PSW address/mask between 8-byte and 16-byte formats.
9353 (s390_supply_ptrace_register): Likewise.
9354 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9355 basic addressing mode bit.
9356
242f5f1c
SS
93572011-11-24 Stan Shebs <stan@codesourcery.com>
9358
9359 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9360
f196051f
SS
93612011-11-17 Stan Shebs <stan@codesourcery.com>
9362
9363 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9364 (tracing_start_time): New global.
9365 (tracing_stop_time): New global.
9366 (tracing_user_name): New global.
9367 (tracing_notes): New global.
9368 (tracing_stop_note): New global.
9369 (cmd_qtstart): Set traceframe_usage, start_time.
9370 (stop_tracing): Set stop_time.
9371 (cmd_qtstatus): Report additional status.
9372 (cmd_qtp): New function.
9373 (handle_tracepoint_query): Call it.
9374 (cmd_qtnotes): New function.
9375 (handle_tracepoint_general_set): Call it.
9376 (get_timestamp): Rename from tsv_get_timestamp.
9377
405f8e94
SS
93782011-11-14 Stan Shebs <stan@codesourcery.com>
9379 Kwok Cheung Yeung <kcy@codesourcery.com>
9380
9381 * linux-x86-low.c (small_jump_insn): New.
9382 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9383 trampoline and error message, build a trampoline and issue a small
9384 jump instruction to it.
9385 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9386 trampoline and error message.
9387 (x86_get_min_fast_tracepoint_insn_len): New.
9388 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9389 * linux-low.h (struct linux_target_ops): Add arguments to
9390 install_fast_tracepoint_jump_pad operation, add new operation.
9391 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9392 arguments.
9393 (linux_get_min_fast_tracepoint_insn_len): New function.
9394 (linux_target_op): Add new operation.
9395 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9396 (gdb_trampoline_buffer_end): Ditto.
9397 (gdb_trampoline_buffer_error): Ditto.
9398 (struct ipa_sym_addresses): Add fields for new IPA variables.
9399 (symbol_list): Add entries for new IPA variables.
9400 (struct tracepoint): Add fields to hold the address range of the
9401 trampoline used by the tracepoint.
9402 (trampoline_buffer_head): New static variable.
9403 (trampoline_buffer_tail): Ditto.
9404 (claim_trampoline_space): New function.
9405 (have_fast_tracepoint_trampoline_buffer): New function.
9406 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9407 structure.
9408 (install_fast_tracepoint): Ditto, also add error buffer argument.
9409 (cmd_qtminftpilen): New function.
9410 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9411 (fast_tracepoint_from_trampoline_address): New function.
9412 (fast_tracepoint_collecting): Handle trampoline as part of jump
9413 pad space.
9414 (set_trampoline_buffer_space): New function.
9415 (initialize_tracepoint): Initialize new IPA variables.
9416 * target.h (struct target_ops): Add arguments to
9417 install_fast_tracepoint_jump_pad operation, add new
9418 get_min_fast_tracepoint_insn_len operation.
9419 (target_get_min_fast_tracepoint_insn_len): New.
9420 (install_fast_tracepoint_jump_pad): Add arguments.
9421 * server.h (IPA_BUFSIZ): Define.
9422 * linux-i386-ipa.c: Include extra header files.
9423 (initialize_fast_tracepoint_trampoline_buffer): New function.
9424 (initialize_low_tracepoint): Call it.
9425 * server.h (set_trampoline_buffer_space): Declare.
9426 (claim_trampoline_space): Ditto.
9427 (have_fast_tracepoint_trampoline_buffer): Ditto.
9428
1e4d1764
YQ
94292011-11-14 Yao Qi <yao@codesourcery.com>
9430
9431 * server.c (handle_query): Handle InstallInTrace for qSupported.
9432 * tracepoint.c (add_tracepoint): Sort list.
9433 (install_tracepoint, download_tracepoint): New.
9434 (cmd_qtdp): Call them to install and download tracepoints.
9435 (sort_tracepoints): Removed.
9436 (cmd_qtstart): Update.
9437
5c73ff4e
YQ
94382011-11-14 Yao Qi <yao@codesourcery.com>
9439
9440 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9441 * mem-break.h: Declare.
9442 * tracepoint.c (cmd_qtstart): Move some code to ...
9443 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9444 New.
9445 (download_tracepoints): Move some code to ...
9446 (download_tracepoint_1): ... here. New.
9447
86a30030
YQ
94482011-11-08 Yao Qi <yao@codesourcery.com>
9449
9450 * remote-utils.c (relocate_instruction): A comment fix.
9451
8d26e50c
JB
94522011-11-07 Joel Brobecker <brobecker@adacore.com>
9453
9454 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9455 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9456 dr_status_mirror and dr_control_mirror from debug_reg_state.
9457 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9458 (i386_initial_stuff): Remove use of deleted globals.
9459 (i386_get_thread_context, i386_set_thread_context,
9460 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9461 from debug_reg_state.
9462
a59306a3
YQ
94632011-11-05 Yao Qi <yao@codesourcery.com>
9464
9465 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9466 address as TPOINT's.
9467
3065dfb6
SS
94682011-11-02 Stan Shebs <stan@codesourcery.com>
9469
9470 * tracepoint.c (agent_mem_read_string): New function.
9471 (eval_agent_expr): Call it for tracenz.
9472 * server.c (handle_query): Report support for tracenz.
9473
fd0d8c7c
YQ
94742011-11-02 Yao Qi <yao@codesourcery.com>
9475
9476 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9477
609086b1
YQ
94782011-11-02 Yao Qi <yao@codesourcery.com>
9479
9480 * target.h: Fix a typo in comment.
9481
b9fd1791
PA
94822011-10-31 Pedro Alves <pedro@codesourcery.com>
9483
9484 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9485 clobber the breakpoints' shadows with fast tracepoint jumps.
9486 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9487 * target.c (write_inferior_memory): Also pass MYADDR down to
9488 check_mem_write.
9489
03583c20
UW
94902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9491
9492 * configure.ac: Check support for personality routine.
9493 * configure: Regenerate.
9494 * config.in: Likewise.
9495 * linux-low.c: Include <sys/personality.h>.
9496 Define ADDR_NO_RANDOMIZE if necessary.
9497 (linux_create_inferior): Disable address space randomization when
9498 forking inferior, if requested.
9499 (linux_supports_disable_randomization): New function.
9500 (linux_target_ops): Install it.
9501 * server.h (disable_randomization): Declare.
9502 * server.c (disable_randomization): New global variable.
9503 (handle_general_set): Handle QDisableRandomization.
9504 (handle_query): Likewise for qSupported.
9505 (main): Support --disable-randomization and --no-disable-randomization
9506 command line arguments.
9507 * target.h (struct target_ops): Add supports_disable_randomization.
9508 (target_supports_disable_randomization): New macro.
9509
723b724b
MF
95102011-09-29 Mike Frysinger <vapier@gentoo.org>
9511
9512 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9513 ifdef check.
9514 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9515 [!PT_GETDSBT] (target_loadmap): New definition.
9516 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9517 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9518 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9519 and PT_GETDSBT to LINUX_LOADMAP.
9520 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9521 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9522
55329a5c 95232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9524
9525 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9526 (arm_linux_hwbp_cap): New static variable.
9527 (arm_linux_get_hwbp_cap): Replace by ...
9528 (arm_linux_init_hwbp_cap): ... this new function.
9529 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9530 (arm_linux_get_hw_watchpoint_count): Likewise.
9531 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9532 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9533 (arm_prepare_to_resume): Use perror_with_name instead of error.
9534
55329a5c 95352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9536
9537 * linux-arm-low.c: Include <signal.h>.
9538 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9539 (struct arm_linux_hwbp_cap): New data type.
9540 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9541 (struct arm_linux_hw_breakpoint): New data type.
9542 (MAX_BPTS, MAX_WPTS): Define.
9543 (struct arch_process_info, struct arch_lwp_info): New data types.
9544 (arm_linux_get_hwbp_cap): New function.
9545 (arm_linux_get_hw_breakpoint_count): Likewise.
9546 (arm_linux_get_hw_watchpoint_count): Likewise.
9547 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9548 (arm_hwbp_control_initialize): Likewise.
9549 (arm_hwbp_control_is_enabled): Likewise.
9550 (arm_hwbp_control_is_initialized): Likewise.
9551 (arm_hwbp_control_disable): Likewise.
9552 (arm_linux_hw_breakpoint_equal): Likewise.
9553 (arm_linux_hw_point_initialize): Likewise.
9554 (struct update_registers_data): New data structure.
9555 (update_registers_callback: New function.
9556 (arm_insert_point): Likewise.
9557 (arm_remove_point): Likewise.
9558 (arm_stopped_by_watchpoint): Likewise.
9559 (arm_stopped_data_address): Likewise.
9560 (arm_new_process): Likewise.
9561 (arm_new_thread): Likewise.
9562 (arm_prepare_to_resume): Likewise.
9563 (the_low_target): Register arm_insert_point, arm_remove_point,
9564 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9565 arm_new_thread, and arm_prepare_to_resume.
9566
6b9801d4
SS
95672011-09-15 Stan Shebs <stan@codesourcery.com>
9568
9569 * server.h (struct emit_ops): Add compare-goto fields.
9570 * tracepoint.c (gdb_agent_op_sizes): New table.
9571 (emit_eq_goto): New function.
9572 (emit_ne_goto): New function.
9573 (emit_lt_goto): New function.
9574 (emit_le_goto): New function.
9575 (emit_gt_goto): New function.
9576 (emit_ge_goto): New function.
9577 (is_goto_target): New function.
9578 (compile_bytecodes): Recognize special cases of compare-goto
9579 combinations and call specialized emitters for them.
9580 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9581 (amd64_emit_ne_goto): New function.
9582 (amd64_emit_lt_goto): New function.
9583 (amd64_emit_le_goto): New function.
9584 (amd64_emit_gt_goto): New function.
9585 (amd64_emit_ge_goto): New function.
9586 (amd64_emit_ops): Add the new functions.
9587 (i386_emit_eq_goto): New function.
9588 (i386_emit_ne_goto): New function.
9589 (i386_emit_lt_goto): New function.
9590 (i386_emit_le_goto): New function.
9591 (i386_emit_gt_goto): New function.
9592 (i386_emit_ge_goto): New function.
9593 (i386_emit_ops): Add the new functions.
9594
bf15cbda
SS
95952011-09-08 Stan Shebs <stan@codesourcery.com>
9596
9597 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9598 (i386_emit_epilogue): Restore %ebx.
9599
943ca1dd
JZ
96002011-08-31 Jie Zhang <jzhang918@gmail.com>
9601
9602 * server.c (step_thread): Remove definition.
9603 (process_serial_event): Don't handle Hs.
9604 * server.h (step_thread): Remove declaration.
9605 * target.c (set_desired_inferior): Remove use of step_thread.
9606
e3deef73
LM
96072011-08-24 Luis Machado <lgustavo@codesourcery.com>
9608
9609 * linux-low.c: Include linux-procfs.h.
9610 (linux_attach_lwp_1): Update comments.
9611 (linux_attach): Scan for existing threads when attaching to a
9612 process that is the tgid.
9613 * Makefile.in: Update dependencies.
9614
13da1c97
LM
96152011-08-24 Luis Machado <lgustavo@codesourcery.com>
9616
9617 * configure.srv: Add linux-procfs.o dependencies.
9618
881127c9
YQ
96192011-08-14 Yao Qi <yao@codesourcery.com>
9620
9621 * target.h (struct target_ops): Fix indent.
9622 * win32-low.c (win32_target_ops): Fix comment.
9623
58dbd541
YQ
96242011-08-14 Andrew Jenner <andrew@codesourcery.com>
9625 Yao Qi <yao@codesourcery.com>
9626
9627 * Makefile.in (clean): Remove tic6x-*.c files.
9628 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9629 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9630 (tic6x-c64xp-linux.c): Likewise.
9631 * configure.srv: Add support for tic6x-*-uclinux.
9632 * linux-tic6x-low.c: New.
9633 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9634
78d85199
YQ
96352011-08-14 Andrew Stubbs <ams@codesourcery.com>
9636 Yao Qi <yao@codesourcery.com>
9637
9638 * target.h (struct target_ops): Add read_loadmap.
9639 * linux-low.c (struct target_loadseg): New type.
9640 (struct target_loadmap): New type.
9641 (linux_read_loadmap): New function.
9642 (linux_target_ops): Add linux_read_loadmap.
9643 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9644 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9645 to NULL.
78d85199 9646
a959a88d
EZ
96472011-08-05 Eli Zaretskii <eliz@gnu.org>
9648
9649 * win32-low.c: Include <stdint.h>.
9650
1ced966e
PA
96512011-07-22 Pedro Alves <pedro@codesourcery.com>
9652
9653 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9654 to the inferior here.
9655 (i386_remove_aligned_watchpoint): Ditto.
9656 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9657 fit part of the watchpoint in the debug registers.
9658 (i386_update_inferior_debug_regs): New.
9659 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9660 registers, and only update the inferior on success.
9661 (i386_low_remove_watchpoint): Ditto.
9662
d26e3629
KY
96632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9664
9665 * linux-low.c (compare_ints, unique, list_threads, show_process,
9666 linux_core_of_thread): Delete.
9667 (linux_target_ops): Change linux_core_of_thread to
9668 linux_common_core_of_thread.
9669 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9670 * utils.c (malloc_failure): Change type of argument.
9671 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9672 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9673 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9674 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9675 (IPA_OBJS): Add common-utils-ipa.o.
9676 (ptid_h, linux_osdata_h): New macros.
9677 (server_h): Add common/common-utils.h, common/xml-utils.h,
9678 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9679 common/ptid.h.
9680 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9681 ptid.o, buffer.o): New rules.
9682 (linux-low.o): Add common/linux-osdata.h as a dependency.
9683 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9684 * configure.ac: Add AC_HEADER_DIRENT check.
9685 * config.in: Regenerate.
9686 * configure: Regenerate.
9687 * remote-utils.c (xml_escape_text): Delete.
9688 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9689 buffer_xml_printf): Move to common/buffer.c.
9690 * server.c (main): Remove call to initialize_inferiors.
9691 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9692 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9693 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9694 internal_error, gdb_assert, gdb_assert_fail): Delete.
9695 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9696 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9697 common/buffer.h.
9698 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9699 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9700 initialize_inferiors): Delete.
9701
2275a1a7
PA
97022011-07-20 Pedro Alves <pedro@codesourcery.com>
9703
9704 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9705 symbol error.
9706
0a5b1e09
PA
97072011-05-31 Pedro Alves <pedro@codesourcery.com>
9708
9709 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9710 assertion.
9711 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9712
6938fd34
YQ
97132011-05-26 Yao Qi <yao@codesourcery.com>
9714
9715 * Makefile.in (thread-db.o): Track dependence to
9716 common/gdb_thread_db.h.
9717 * thread-db.c: include gdb_thread_db.h from right place.
9718
b481f9e0
TT
97192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9720
9721 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9722 __FILE__ and __LINE__ to internal_error.
9723
98a5dd13
DE
97242011-05-13 Doug Evans <dje@google.com>
9725
9726 * thread-db.c (try_thread_db_load_from_sdir): New function.
9727 (try_thread_db_load_from_dir): New function.
9728 (thread_db_load_search): Handle $sdir, ignore $pdir.
9729 Remove trying of system directories if search of
9730 libthread-db-search-path fails, that is now done via $sdir.
9731
d248b706
KY
97322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9733
9734 * server.c (handle_query): Add EnableDisableTracepoints to the list
9735 of supported features.
43aaf8b6 9736 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9737 tracepoints.
43aaf8b6
PA
9738 (cmd_qtenable_disable): New.
9739 (cmd_qtstart): Install tracepoints even if disabled.
9740 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9741 receiving a QTEnable or QTDisable packet.
9742 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9743 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9744 tracepoints.
9745 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9746
84e578fb
DE
97472011-05-10 Doug Evans <dje@google.com>
9748
9749 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9750
71f55dd8
DE
97512011-05-04 Doug Evans <dje@google.com>
9752
9753 * linux-low.c (linux_join): Skip process lookup.
9754 * spu-low.c (spu_join): Ditto.
9755 * server.c (join_inferiors_callback): Delete.
9756 (process_serial_event): For 'D' packet (detach) call join_inferior
9757 directly.
9758
4d393d60
JM
97592011-05-04 Joseph Myers <joseph@codesourcery.com>
9760
9761 * README: Don't mention xscale*-*-linux*.
9762 * configure.srv (xscale*-*-linux*): Don't handle target.
9763
b00ad6ff
NF
97642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9765
9766 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9767 casting pointers.
9768 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9769 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9770 (i386_emit_void_call_2): Likewise.
9771
af96c192
YQ
97722011-04-26 Yao Qi <yao@codesourcery.com>
9773
43aaf8b6
PA
9774 * linux-low.c: Move common macros to linux-ptrace.h.
9775 Include linux-ptrace.h.
af96c192
YQ
9776 * Makefile.in (linux_ptrace_h): New.
9777 (linux-low.o): Depends on linux-ptrace.h.
9778
03f2bd59
JK
97792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9780
9781 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9782 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9783 (remote_prepare): New function with most of the TCP code from ...
9784 (remote_open): ... here. Detect PORT here unconditionally. Move also
9785 setting transport_is_reliable.
9786 * server.c (run_once): New variable.
9787 (gdbserver_usage): Document it.
9788 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9789 the first run if RUN_ONCE.
9790 * server.h (run_once, remote_prepare): New declarations.
9791
7a9dd1b2
TT
97922011-04-19 Tom Tromey <tromey@redhat.com>
9793
9794 * win32-low.c (handle_load_dll): Remove duplicate "the".
9795
81239425
PM
97962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9797
9798 Remove support for old Cygwin 1.5 versions.
9799 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9800 function to avoid warning.
9801 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9802 warning.
9803
9e0627f1
PM
98042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9805
9806 * gdbserver/server.h (Macro _): Define it if not available.
9807
588eebee
MS
98082011-03-14 Michael Snyder <msnyder@vmware.com>
9809
348af9f7 9810 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9811
43f70d4c
JB
98122011-03-10 Joel Brobecker <brobecker@adacore.com>
9813
9814 * Makefile.in (maintainer-clean realclean distclean): Remove
9815 "make ... subdir_do" command.
9816
348af9f7
MS
98172011-03-10 Michael Snyder <msnyder@vmware.com>
9818
9819 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9820
9821 * server.c (handle_v_run): Free alloced buffer on early return.
9822
e637a4f5
YQ
98232011-03-09 Yao Qi <yao@codesourcery.com>
9824
9825 Revert:
9826 2011-03-04 Yao Qi <yao@codesourcery.com>
9827
9828 * Makefile.in: Remove GNU make feature --directory.
9829
9830 2011-03-05 Yao Qi <yao@codesourcery.com>
9831
9832 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9833 (subdir_do): New make target. Copied from gdb/Makefile.
9834 (maintainer-clean, realclean, distclean, clean): Call corresponding
9835 make targets in common/Makefile.
9836
9837 2011-02-11 Yao Qi <yao@codesourcery.com>
9838
9839 * configure.ac: Call AC_PROG_RANLIB.
9840 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9841 * configure: Regenerate.
9842
e6edda56
JK
98432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9844
9845 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9846
e5141119
JB
98472011-03-06 Yao Qi <yao@codesourcery.com>
9848
9849 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9850
64794aa4
JB
98512011-03-05 Yao Qi <yao@codesourcery.com>
9852
9853 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9854 (subdir_do): New make target. Copied from gdb/Makefile.
9855 (maintainer-clean, realclean, distclean, clean): Call corresponding
9856 make targets in common/Makefile.
9857
7a762829
YQ
98582011-03-04 Yao Qi <yao@codesourcery.com>
9859
9860 * Makefile.in: Remove GNU make feature --directory.
9861
348af9f7
MS
98622011-03-04 Michael Snyder <msnyder@vmware.com>
9863
9864 * server.c (queue_stop_reply): Call xmalloc not malloc.
9865
98662011-03-02 Michael Snyder <msnyder@vmware.com>
9867
9868 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9869
9f72fee2
MS
98702011-02-28 Michael Snyder <msnyder@vmware.com>
9871
588eebee
MS
9872 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9873 (cmd_qtframe): Ditto.
9874 (cmd_qtbuffer): Ditto.
9875 (cmd_bigqtbuffer): Ditto.
9876
9f72fee2
MS
9877 * utils.c (decimal2str): Initialize 'width' to nine, then
9878 don't mess with it.
9879
8040bd49
UW
98802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9881
9882 * hostio.c (require_data): Free *data, not data.
9883
7e52cbd0
JK
98842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9885
9886 * hostio.c (require_data): Use free, not xfree.
9887
9130f83e
MS
98882011-02-27 Michael Snyder <msnyder@vmware.com>
9889
4b812f4e
MS
9890 * server.c (handle_query): Discard unused value.
9891
9130f83e
MS
9892 * hostio.c (require_data): Free malloc memory before returning
9893 error.
9894
69d37113
MS
98952011-02-26 Michael Snyder <msnyder@vmware.com>
9896
9897 * linux-low.c (list_threads): Call closedir for dirent.
9898
35f5825a
MS
98992011-02-27 Michael Snyder <msnyder@vmware.com>
9900
2a589cef
MS
9901 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9902 a case statement falls through.
9903
0adea5f7
MS
9904 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9905
35f5825a
MS
9906 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9907 in comparison.
9908
238f1c74
MS
99092011-02-26 Michael Snyder <msnyder@vmware.com>
9910
9911 * utils.c (decimal2str): Eliminate dead code and dead param.
9912 (pulongest): Drop dead param from call to decimal2str.
9913 (plongest): Ditto.
9914
633ff500
JB
99152011-02-24 Joel Brobecker <brobecker@adacore.com>
9916
9917 Revert the following patch (not approved yet):
9918 2011-02-21 Hui Zhu <teawater@gmail.com>
9919 * tracepoint.c (tp_printf): New function.
9920 (eval_agent_expr): Handle gdb_agent_op_printf.
9921
f9c6ff72
HZ
99222011-02-21 Hui Zhu <teawater@gmail.com>
9923
9924 * tracepoint.c (tp_printf): New function.
9925 (eval_agent_expr): Handle gdb_agent_op_printf.
9926
94d5e490
TT
99272011-02-18 Tom Tromey <tromey@redhat.com>
9928
9929 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9930 (tracepoint.o): Likewise.
9931 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9932 (gdb_agent_op_names): Likewise.
9933
c7f96d2b
TT
99342011-02-18 Tom Tromey <tromey@redhat.com>
9935
9936 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9937 gdb_agent_op_rot>: New constants.
9938 (gdb_agent_op_names): Add pick and roll.
9939 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9940 cases.
9941
0feedb2c
JK
99422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9943
9944 * aclocal.m4: Regenerated with aclocal-1.11.1.
9945
b3b9301e
PA
99462011-02-14 Pedro Alves <pedro@codesourcery.com>
9947
9948 * server.c (handle_qxfer_traceframe_info): New.
9949 (qxfer_packets): Register "traceframe-info".
9950 (handle_query): Report support for qXfer:traceframe-info:read+.
9951 * tracepoint.c (match_blocktype): New.
9952 (traceframe_find_block_type): Rename to ...
9953 (traceframe_walk_blocks): ... this. Add callback filter argument,
9954 and use it.
9955 (traceframe_find_block_type): New, reimplemented on top of
9956 traceframe_walk_blocks.
9957 (build_traceframe_info_xml): New.
9958 (traceframe_read_info): New.
9959 * server.h (traceframe_read_info): Declare.
9960
4f3e6fb7
YQ
99612011-02-11 Yao Qi <yao@codesourcery.com>
9962
9963 * configure.ac: Call AC_PROG_RANLIB.
9964 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9965 * configure: Regenerate.
9966
764880b7
PA
99672011-02-07 Pedro Alves <pedro@codesourcery.com>
9968
9969 * server.c (gdb_read_memory): Change return semantics to allow
9970 partial transfers.
9971 (handle_search_memory_1): Adjust.
9972 (process_serial_event) <'m' packet>: Handle partial transfers.
9973 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9974
1c79eb8a
PA
99752011-01-28 Pedro Alves <pedro@codesourcery.com>
9976
9977 * regcache.c (init_register_cache): Initialize
9978 regcache->register_status.
9979 (free_register_cache): Release regcache->register_status.
9980 (regcache_cpy): Copy register_status.
9981 (registers_to_string): Print 'x's for unavailable registers.
9982 (supply_register): Mark the register's status valid or
9983 unavailable, depending on whether a buffer was passed in or not.
9984 (supply_register_zeroed): New.
9985 (supply_regblock): Mark the registers' status valid or
9986 unavailable, depending on whether a buffer was passed in or not.
9987 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9988 (struct regcache): New `register_status' field.
9989 (supply_register_zeroed): Declare.
9990 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9991 supply_register_zeroed, rather than passing a NULL buffer to
9992 supply_register.
9993 * tracepoint.c (fetch_traceframe_registers): Update comment.
9994
85724a0e
PA
99952011-01-28 Pedro Alves <pedro@codesourcery.com>
9996
9997 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9998 buffer explicit.
9999
d08aafef
PA
100002011-01-25 Pedro Alves <pedro@codesourcery.com>
10001
10002 * server.h (decode_xfer_write): Change prototype.
10003 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10004 and don't extract the annex here.
10005 * server.c (decode_xfer_read): Remove `annex' parameter,
10006 and don't extract the annex here.
10007 (decode_xfer): New.
10008 (struct qxfer): New.
10009 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10010 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10011 (handle_qxfer_statictrace): New functions, abstracted out from
10012 handle_query, and made to use the struct qxfer interface.
10013 (handle_threads_qxfer_proper): Rename to ...
10014 (handle_qxfer_threads_proper): ... this.
10015 (handle_threads_qxfer): Rename to ...
10016 (handle_qxfer_threads): ... this. Adjust.
10017 (qxfer_packets): New array.
10018 (handle_qxfer): New function.
10019 (handle_query): Use handle_qxfer.
10020
493e2a69
MS
100212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10022
10023 * gdbreplay.c: Shorten lines of >= 80 columns.
10024 * linux-low.c: Ditto.
10025 * linux-ppc-low.c: Ditto.
10026 * linux-s390-low.c: Ditto.
10027 * linux-sparc-low.c: Ditto.
10028 * linux-x86-low.c: Ditto.
10029 * linux-xtensa-low.c: Ditto.
10030 * mem-break.c: Ditto.
10031 * nto-low.c: Ditto.
10032 * regcache.h: Ditto.
10033 * remote-utils.c: Ditto.
10034 * server.c: Ditto.
10035 * server.h: Ditto.
10036 * thread-db.c: Ditto.
10037 * tracepoint.c: Ditto.
10038 * utils.c: Ditto.
10039 * win32-low.h: Ditto.
10040
44944448
JB
100412011-01-05 Joel Brobecker <brobecker@adacore.com>
10042
10043 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10044 update.
10045
71ce852c
JB
100462011-01-01 Joel Brobecker <brobecker@adacore.com>
10047
10048 * server.c (gdbserver_version): Update copyright year in version
10049 output.
10050 * gdbreplay.c (gdbreplay_version): Ditto.
10051
eb826dc6
MF
100522010-12-29 Jie Zhang <jie.zhang@analog.com>
10053
10054 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10055 * linux-bfin-low.c: New file.
10056 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10057 PT_DATA_ADDR for BFIN targets.
10058 * Makefile.in (SFILES): Add linux-bfin-low.c.
10059 (clean): Remove reg-bfin.c.
10060 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10061 * README: Mention supported Blackfin targets.
10062
39ab222a
MF
100632010-12-23 Mike Frysinger <vapier@gentoo.org>
10064
10065 * .gitignore: New file.
10066
a1f2ce7d
MF
100672010-11-16 Mike Frysinger <vapier@gentoo.org>
10068
10069 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10070
f474844c
JZ
100712010-10-22 Jie Zhang <jie@codesourcery.com>
10072
10073 * Makefile.in: Add FLAGS_TO_PASS variable.
10074 (install): Remove dependency of install-only and recursively
10075 invoke make for install-only.
10076
f1048712
DE
100772010-10-04 Doug Evans <dje@google.com>
10078
10079 * Makefile.in (uninstall): Use $(DESTDIR).
10080
b53a1623
PA
100812010-09-24 Pedro Alves <pedro@codesourcery.com>
10082
e6ee044d
PA
10083 PR gdb/11842
10084
b53a1623
PA
10085 * linux-x86-low.c (compat_siginfo_from_siginfo)
10086 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10087 si_code is < 0. Check for si_code == SI_TIMER before checking for
10088 si_code < 0.
10089
fa1bd1e4
JB
100902010-09-13 Joel Brobecker <brobecker@adacore.com>
10091
10092 * lynx-i386-low.c: New file.
10093 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10094
47fac8f8
JB
100952010-09-13 Joel Brobecker <brobecker@adacore.com>
10096
10097 * lynx-low.c (ptrace_request_to_str): Remove handling for
10098 request values that have been removed in LynxOS 5.x.
10099
1adfc54d
JB
101002010-09-13 Joel Brobecker <brobecker@adacore.com>
10101
10102 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10103 <ptrace.h>
10104
c2a66c29
NS
101052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10106
10107 * configure.ac: Add --enable-inprocess-agent option.
10108 * configure: Rebuilt.
10109
32fcada3
YQ
101102010-09-06 Yao Qi <yao@codesourcery.com>
10111
10112 * linux-low.c (linux_kill): Remove unused variable.
10113 (linux_stabilize_threads): Likewise.
10114 * server.c (start_inferior): Likewise.
10115 (queue_stop_reply_callback): Likewise.
10116 * tracepoint.c (do_action_at_tracepoint): Likewise.
10117
0cccb683
YQ
101182010-09-06 Yao Qi <yao@codesourcery.com>
10119
10120 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10121 on return.
10122
423ec54c
JK
101232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10124
10125 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10126
12ac6819
PA
101272010-09-06 Pedro Alves <pedro@codesourcery.com>
10128
10129 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10130 "$(IPA_DEPFILES)".
10131
8ed54b31
JB
101322010-09-01 Joel Brobecker <brobecker@adacore.com>
10133
10134 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10135 gdbserver/lynx-ppc-low.c: New files.
10136 * Makefile.in (lynx_low_h): New variable.
10137 (lynx-low.o, lynx-ppc-low.o): New rules.
10138 * configure.ac: On LynxOS, link with -lnetinet.
10139 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10140 * configure: regenerate.
10141
bb0116a4
JB
101422010-09-01 Joel Brobecker <brobecker@adacore.com>
10143
10144 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10145 * configure.ac: Add check for vasprintf and vsnprintf.
10146 * configure, config.in: Regenerate.
10147 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10148
a778ab81 101492010-09-01 Joel Brobecker <brobecker@adacore.com>
10150
10151 * gdbreplay.c: Move include of alloca.h up, next to include of
10152 malloc.h.
10153 * server.h: Add include of malloc.h.
10154 * mem-break.c: Remove include of malloc.h.
10155 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10156
8b034a19 101572010-09-01 Joel Brobecker <brobecker@adacore.com>
10158
10159 * Makefile.in (memmem.o): Build with -Wno-error.
10160
101612010-09-01 Joel Brobecker <brobecker@adacore.com>
10162
10163 * utils.c (xsnprintf): Make non-static.
10164 * server.h: Add xsnprintf declaration.
10165 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10166 replace calls to snprintf by calls to xsnprintf throughout.
10167
101682010-09-01 Joel Brobecker <brobecker@adacore.com>
10169
10170 * configure.ac: Add configure check for alloca.
10171 * configure, config.in: Regenerate.
10172 * server.h: Include alloca.h if it exists.
10173 * gdbreplay.c: Include alloca.h if it exists.
10174
1a981360
PA
101752010-08-28 Pedro Alves <pedro@codesourcery.com>
10176
10177 * linux-low.c (__SIGRTMIN): Define if not already defined.
10178 (linux_create_inferior): Check for __ANDROID__ rather than
10179 __SIGRTMIN.
10180 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10181 are already deferred.
10182 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10183 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10184 stopped and already has a pending signal to report.
10185 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10186 a pending signal to report or is moving out of a jump pad.
10187 (linux_init_signals): Check for __ANDROID__ rather than
10188 __SIGRTMIN.
10189
b4d51a55
PA
101902010-08-28 Pedro Alves <pedro@codesourcery.com>
10191
10192 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10193 debug_threads check. Avoid a linear search when not doing debug
10194 output.
10195
ec48365d
PA
101962010-08-27 Pedro Alves <pedro@codesourcery.com>
10197
10198 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10199 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10200 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10201 (process_event): Change local fd's type to gdb_fildes_t.
10202 (create_file_handler): Adjust prototype.
10203 (delete_file_handler): Adjust prototype.
10204 (handle_file_event): Adjust prototype. Use pfildes.
10205 (create_file_event): Adjsut prototype.
10206 * remote-utils.c (remote_desc, listen_desc): Change type to
10207 gdb_fildes_t.
10208 * server.h: New gdb_fildes_t typedef.
10209 [USE_WIN32API]: Include winsock2.h.
10210 (delete_file_handler, add_file_handler): Adjust prototypes.
10211 (pfildes): Declare.
10212 * utils.c (pfildes): New.
10213
854d88f0
PA
102142010-08-27 Pedro Alves <pedro@codesourcery.com>
10215
10216 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10217 * configure: Regenerate.
10218
0146f85b
PA
102192010-08-27 Pedro Alves <pedro@codesourcery.com>
10220
10221 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10222 (linux_done_accessing_memory): ... this.
10223 (linux_target_ops): Adjust.
10224 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10225 * nto-low.c (nto_target_ops): Adjust comment.
10226 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10227 * spu-low.c (spu_target_ops): Adjust comment.
10228 * target.h (target_ops): Rename unprepare_to_access_memory field
10229 to done_accessing_memory.
10230 (unprepare_to_access_memory): Rename to ...
10231 (done_accessing_memory): ... this.
10232
90d74c30
PA
102332010-08-26 Pedro Alves <pedro@codesourcery.com>
10234
10235 * linux-low.c (linux_prepare_to_access_memory): New.
10236 (linux_unprepare_to_access_memory): New.
10237 (linux_target_ops): Install them.
10238 * server.c (read_memory): Rename to ...
10239 (gdb_read_memory): ... this. Use
10240 prepare_to_access_memory/prepare_to_access_memory.
10241 (write_memory): Rename to ...
10242 (gdb_write_memory): ... this. Use
10243 prepare_to_access_memory/prepare_to_access_memory.
10244 (handle_search_memory_1): Adjust.
10245 (process_serial_event): Adjust.
10246 * target.h (struct target_ops): New fields
10247 prepare_to_access_memory and unprepare_to_access_memory.
10248 (prepare_to_access_memory, unprepare_to_access_memory): New.
10249 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10250 prepare_to_access_memory/prepare_to_access_memory.
10251 * nto-low.c (nto_target_ops): Adjust.
10252 * spu-low.c (spu_target_ops): Adjust.
10253 * win32-low.c (win32_target_ops): Adjust.
10254
fd467969
PA
102552010-08-26 Pedro Alves <pedro@codesourcery.com>
10256
10257 * Makefile.in (WARN_CFLAGS): Get it from configure.
10258 (WERROR_CFLAGS): New.
10259 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10260 * configure.ac: Introduce --enable-werror, which adds -Werror to
10261 the compiler command line. Enabled by default. Disable with
10262 --disable-werror. Add -Wdeclaration-after-statement
10263 Wpointer-arith and -Wformat-nonliteral to warning flags.
10264 * configure: Regenerate.
10265
331e2f5f
PA
102662010-08-26 Pedro Alves <pedro@codesourcery.com>
10267
10268 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10269
e581f2b4
PA
102702010-08-26 Pedro Alves <pedro@codesourcery.com>
10271
10272 * gdbreplay.c (remote_error): New.
10273 (gdbchar): New.
10274 (expect): Use gdbchar. Check for error reading from GDB.
10275 Clarify sync error output.
10276 (play): Check for errors writing to GDB.
10277 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10278 * remote-utils.c (getpkt): Check for errors writing to the remote
10279 descriptor.
10280
3c11dd79
PA
102812010-08-25 Pedro Alves <pedro@codesourcery.com>
10282
10283 * linux-low.c (linux_wait_1): Move non-debugging code out of
10284 `debug_threads' control.
10285
d20a8ad9
PA
102862010-08-25 Pedro Alves <pedro@codesourcery.com>
10287
10288 * linux-low.c (linux_wait_1): Don't set last_status here.
10289 * server.c (push_event, queue_stop_reply_callback): Assert we're
10290 not pushing a TARGET_WAITKIND_IGNORE event.
10291 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10292 (myresume, handle_target_event): Set the thread's last_resume_kind
10293 and last_status from the target returned status.
10294
964e4306
PA
102952010-08-25 Pedro Alves <pedro@codesourcery.com>
10296
10297 PR threads/10729
10298
10299 * linux-x86-low.c (update_debug_registers_callback): New.
10300 (i386_dr_low_set_addr): Use it.
10301 (i386_dr_low_get_addr): New.
10302 (i386_dr_low_set_control): Use update_debug_registers_callback.
10303 (i386_dr_low_get_control): New.
10304 (i386_dr_low_get_status): Adjust.
10305 * linux-low.c (linux_stop_lwp): New.
10306 * linux-low.h (linux_stop_lwp): Declare.
10307
10308 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10309 argument instead of a i386_debug_reg_state.
10310 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10311 a i386_debug_reg_state.
10312 (i386_insert_aligned_watchpoint): Adjust.
10313 (i386_remove_aligned_watchpoint): Adjust.
10314 (i386_low_stopped_data_address): Read the debug registers from the
10315 inferior instead of from the mirrors.
10316 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10317 (i386_dr_low_get_addr): Declare.
10318 (i386_dr_low_get_control): Declare.
10319 (i386_dr_low_get_status): Change prototype.
10320
10321 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10322 (i386_dr_low_get_addr): New.
10323 (i386_dr_low_get_control): New.
10324 (i386_dr_low_get_status): Adjust prototype. Return
10325 dr_status_mirror.
10326 (i386_initial_stuff): Clear dr_status_mirror and
10327 dr_control_mirror.
10328 (i386_get_thread_context): Adjust.
10329 (i386_set_thread_context): Adjust.
10330 (i386_thread_added): Adjust.
10331
5f21a75b
PA
103322010-08-24 Pedro Alves <pedro@codesourcery.com>
10333
10334 * linux-low.h (linux_thread_area): Delete declaration.
10335
3e4c1235
TS
103362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10337
10338 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10339 after its termination.
10340
1971b033
PA
103412010-08-09 Pedro Alves <pedro@codesourcery.com>
10342
10343 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10344 (gdb_wants_all_stopped): Delete.
10345 (linux_wait_1): Don't call them.
10346 * server.c (handle_v_cont): Tag all threads as want-stopped.
10347 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10348 stopped as "client-wants-stopped".
10349
310444ac
PA
103502010-07-31 Pedro Alves <pedro@codesourcery.com>
10351
10352 * Makefile.in (signals_h): New.
10353 (server_h): Depend on it.
10354 (server.o): Don't depend on $(signals_def).
10355 (signals.o): Depend on $(signals_def).
10356
a19cae16
JK
103572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10358
10359 * Makefile.in (signals_def): New.
10360 (server_h): Append include/gdb/signals.h and signals_def.
10361 (server.o): Append signals_def.
10362
30d50328
JK
103632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10364
10365 * server.c (handle_target_event): Use target_signal_to_host for
10366 resume_info.sig initialization.
10367 * target.h (struct thread_resume) <sig>: New comment.
10368
5c3216e2
OS
103692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10370
c6f46ca0
OS
10371 * server.c (handle_query): strcpy() the returned string from paddress()
10372 instead of sprintf().
5c3216e2
OS
10373 * utils.c (paddress): Return phex_nz().
10374
6bd31874
JB
103752010-07-07 Joel Brobecker <brobecker@adacore.com>
10376
10377 * server.c (handle_v_cont): Call mourn_inferior if process
10378 just exited.
10379 (myresume): Likewise.
10380
0fb4aa4b
PA
103812010-07-01 Pedro Alves <pedro@codesourcery.com>
10382
10383 Static tracepoints, and integration with UST.
10384
10385 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10386 * mem-break.c (uninsert_all_breakpoints)
10387 (reinsert_all_breakpoints): New.
10388 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10389 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10390 (gdb_agent_ust_loaded, helper_thread_id)
10391 (gdb_agent_helper_thread_id): New macros.
10392 (struct ipa_sym_addresses): Add addr_ust_loaded,
10393 addr_helper_thread_id, addr_cmd_buf.
10394 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10395 (in_process_agent_loaded_ust): New.
10396 (write_e_ust_not_loaded): New.
10397 (maybe_write_ipa_ust_not_loaded): New.
10398 (struct collect_static_trace_data_action): New.
10399 (enum tracepoint_type) <static_tracepoint>: New.
10400 (struct tracepoint) <handle>: Mention static tracepoints.
10401 (struct static_tracepoint_ctx): New.
10402 (CMD_BUF_SIZE): New.
10403 (add_tracepoint_action): Handle static tracepoint actions.
10404 (unprobe_marker_at): New.
10405 (clear_installed_tracepoints): Handle static tracepoints.
10406 (cmd_qtdp): Handle static tracepoints.
10407 (probe_marker_at): New.
10408 (cmd_qtstart): Handle static tracepoints.
10409 (response_tracepoint): Handle static tracepoints.
10410 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10411 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10412 (get_context_regcache): Handle static tracepoints.
10413 (do_action_at_tracepoint): Handle static tracepoint actions.
10414 (traceframe_find_block_type): Handle static trace data blocks.
10415 (traceframe_read_sdata): New.
10416 (download_tracepoints): Download static tracepoint actions.
10417 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10418 (GDB_PROBE_NAME): New.
10419 (ust_ops): New.
10420 (GET_UST_SYM): New.
10421 (USTF): New.
10422 (dlsym_ust): New.
10423 (ust_marker_to_static_tracepoint): New.
10424 (gdb_probe): New.
10425 (collect_ust_data_at_tracepoint): New.
10426 (gdb_ust_probe): New.
10427 (UNIX_PATH_MAX, SOCK_DIR): New.
10428 (gdb_ust_connect_sync_socket): New.
10429 (resume_thread, stop_thread): New.
10430 (run_inferior_command): New.
10431 (init_named_socket): New.
10432 (gdb_ust_socket_init): New.
10433 (cstr_to_hexstr): New.
10434 (next_st): New.
10435 (first_marker, next_marker): New.
10436 (response_ust_marker): New.
10437 (cmd_qtfstm, cmd_qtsstm): New.
10438 (unprobe_marker_at, probe_marker_at): New.
10439 (cmd_qtstmat, gdb_ust_thread): New.
10440 (gdb_ust_init): New.
10441 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10442 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10443 (ST_REGENTRY): New.
10444 (x86_64_st_collect_regmap): New.
10445 (X86_64_NUM_ST_COLLECT_GREGS): New.
10446 (AMD64_RIP_REGNUM): New.
10447 (supply_static_tracepoint_registers): New.
10448 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10449 (ST_REGENTRY): New.
10450 (i386_st_collect_regmap): New.
10451 (i386_NUM_ST_COLLECT_GREGS): New.
10452 (supply_static_tracepoint_registers): New.
10453 * server.c (handle_query): Handle qXfer:statictrace:read.
10454 <qSupported>: Report support for StaticTracepoints, and
10455 qXfer:statictrace:read features.
10456 * server.h (traceframe_read_sdata)
10457 (supply_static_tracepoint_registers): Declare.
10458 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10459 (unpack_varlen_hex): Include in IPA build.
10460 * Makefile.in (ustlibs, ustinc): New.
10461 (IPA_OBJS): Add remote-utils-ipa.o.
10462 ($(IPA_LIB)): Link -ldl and -lpthread.
10463 (UST_CFLAGS): New.
10464 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10465 * config.in, configure: Regenerate.
10466
9e4344e5
PA
104672010-06-20 Ian Lance Taylor <iant@google.com>
10468 Pedro Alves <pedro@codesourcery.com>
10469
10470 * linux-x86-low.c (always_true): Delete.
10471 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10472 trying to fool the compiler with always_true.
10473
c6beb2cb
PA
104742010-06-20 Pedro Alves <pedro@codesourcery.com>
10475
10476 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10477 conditions in gdbserver.
10478
d2ed6730
UW
104792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10480
10481 * spu-low.c (spu_read_memory): Wrap around local store limit.
10482 (spu_write_memory): Likewise.
10483
4e29fb54
PA
104842010-06-15 Pedro Alves <pedro@codesourcery.com>
10485
10486 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10487 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10488 LONGEST uses.
10489 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10490 uses.
10491 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10492 uses with LONGEST uses.
10493
6a271cae
PA
104942010-06-14 Stan Shebs <stan@codesourcery.com>
10495 Pedro Alves <pedro@codesourcery.com>
10496
10497 Bytecode compiler.
10498
10499 * linux-x86-low.c: Include limits.h.
10500 (add_insns): New.
10501 (always_true): New.
10502 (EMIT_ASM): New.
10503 (EMIT_ASM32): New.
10504 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10505 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10506 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10507 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10508 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10509 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10510 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10511 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10512 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10513 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10514 (amd64_emit_void_call_2): New.
10515 (amd64_emit_ops): New.
10516 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10517 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10518 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10519 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10520 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10521 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10522 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10523 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10524 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10525 (i386_emit_stack_adjust, i386_emit_int_call_1)
10526 (i386_emit_void_call_2): New.
10527 (i386_emit_ops): New.
10528 (x86_emit_ops): New.
10529 (the_low_target): Install x86_emit_ops.
10530 * server.h (struct emit_ops): New.
10531 (get_raw_reg_func_addr): Declare.
10532 (current_insn_ptr, emit_error): Declare.
10533 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10534 (set_trace_state_variable_value): New defines.
10535 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10536 addr_get_trace_state_variable_value and
10537 addr_set_trace_state_variable_value.
10538 (symbol_list): New fields for get_raw_reg,
10539 get_trace_state_variable_value and set_trace_state_variable_value.
10540 (condfn): New typedef.
10541 (struct tracepoint): New field `compiled_cond'.
10542 (do_action_at_tracepoint): Clear compiled_cond.
10543 (get_trace_state_variable_value, set_trace_state_variable_value):
10544 Export in the IPA.
10545 (condition_true_at_tracepoint): If there's a compiled condition,
10546 run that.
10547 (current_insn_ptr, emit_error): New globals.
10548 (struct bytecode_address): New.
10549 (get_raw_reg_func_addr): New.
10550 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10551 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10552 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10553 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10554 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10555 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10556 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10557 (compile_tracepoint_condition, compile_bytecodes): New.
10558 * target.h (emit_ops): Forward declare.
10559 (struct target_ops): New field emit_ops.
10560 (target_emit_ops): New.
10561 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10562 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10563 * linux-low.c (linux_emit_ops): New.
10564 (linux_target_ops): Install it.
10565 * linux-low.h (struct linux_target_ops): New field emit_ops.
10566
92b72907
UW
105672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10568
10569 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10570 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10571
fa593d66
PA
105722010-06-01 Pedro Alves <pedro@codesourcery.com>
10573 Stan Shebs <stan@codesourcery.com>
10574
10575 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10576 (all): Depend on $(extra_libraries).
10577 (install-only): Install the IPA.
10578 (IPA_OBJS, IPA_LIB): New.
10579 (clean): Remove the IPA lib.
10580 (IPAGENT_CFLAGS): New.
10581 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10582 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10583 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10584 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10585 * configure.ac: Check for atomic builtins support in the compiler.
10586 (IPA_DEPFILES, extra_libraries): Define.
10587 * configure.srv (ipa_obj): Add description.
10588 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10589 (i[34567]86-*-linux*): Set ipa_obj.
10590 (x86_64-*-linux*): Set ipa_obj.
10591 * linux-low.c (stabilizing_threads): New.
10592 (supports_fast_tracepoints): New.
10593 (linux_detach): Stabilize threads before detaching.
10594 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10595 the lwp is either not stabilizing, or is moving out of a jump pad.
10596 (linux_fast_tracepoint_collecting): New.
10597 (maybe_move_out_of_jump_pad): New.
10598 (enqueue_one_deferred_signal): New.
10599 (dequeue_one_deferred_signal): New.
10600 (linux_wait_for_event_1): If moving out of a jump pad, defer
10601 pending signals to later.
10602 (linux_stabilize_threads): New.
10603 (linux_wait_1): Check if threads need moving out of jump pads, and
10604 do it if so.
10605 (stuck_in_jump_pad_callback): New.
10606 (move_out_of_jump_pad_callback): New.
10607 (lwp_running): New.
10608 (linux_resume_one_lwp): Handle moving out of jump pads.
10609 (linux_set_resume_request): Dequeue deferred signals.
10610 (need_step_over_p): Also step over fast tracepoint jumps.
10611 (start_step_over): Also uninsert fast tracepoint jumps.
10612 (finish_step_over): Also reinsert fast tracepoint jumps.
10613 (linux_install_fast_tracepoint_jump): New.
10614 (linux_target_ops): Install linux_stabilize_threads and
10615 linux_install_fast_tracepoint_jump_pad.
10616 * linux-low.h (linux_target_ops) <get_thread_area,
10617 install_fast_tracepoint_jump_pad>: New fields.
10618 (struct lwp_info) <collecting_fast_tracepoint,
10619 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10620 (linux_get_thread_area): Declare.
10621 * linux-x86-low.c (jump_insn): New.
10622 (x86_get_thread_area): New.
10623 (append_insns): New.
10624 (push_opcode): New.
10625 (amd64_install_fast_tracepoint_jump_pad): New.
10626 (i386_install_fast_tracepoint_jump_pad): New.
10627 (x86_install_fast_tracepoint_jump_pad): New.
10628 (the_low_target): Install x86_get_thread_area and
10629 x86_install_fast_tracepoint_jump_pad.
10630 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10631 (struct fast_tracepoint_jump): New.
10632 (fast_tracepoint_jump_insn): New.
10633 (fast_tracepoint_jump_shadow): New.
10634 (find_fast_tracepoint_jump_at): New.
10635 (fast_tracepoint_jump_here): New.
10636 (delete_fast_tracepoint_jump): New.
10637 (set_fast_tracepoint_jump): New.
10638 (uninsert_fast_tracepoint_jumps_at): New.
10639 (reinsert_fast_tracepoint_jumps_at): New.
10640 (set_breakpoint_at): Use write_inferior_memory.
10641 (uninsert_raw_breakpoint): Use write_inferior_memory.
10642 (check_mem_read): Mask out fast tracepoint jumps.
10643 (check_mem_write): Mask out fast tracepoint jumps.
10644 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10645 (set_fast_tracepoint_jump): Declare.
10646 (delete_fast_tracepoint_jump)
10647 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10648 (reinsert_fast_tracepoint_jumps_at): Declare.
10649 * regcache.c: Don't compile many functions when building the
10650 in-process agent library.
10651 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10652 the register buffer in the heap.
10653 (free_register_cache): If the register buffer isn't owned by the
10654 regcache, don't free it.
10655 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10656 pre-existing register caches.
10657 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10658 type.
10659 (convert_ascii_to_int): : Constify `from' parameter type.
10660 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10661 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10662 the needed buffer in-place.
10663 (relocate_instruction): New.
10664 * server.c (handle_query) <qSymbols>: If the target supports
10665 tracepoints, give it a chance of looking up symbols. Report
10666 support for fast tracepoints.
10667 (handle_status): Stabilize threads.
10668 (process_serial_event): Adjust.
10669 * server.h (struct fast_tracepoint_jump): Forward declare.
10670 (struct process_info) <fast_tracepoint_jumps>: New field.
10671 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10672 (decode_X_packet, decode_M_packet): Adjust.
10673 (relocate_instruction): Declare.
10674 (in_process_agent_loaded): Declare.
10675 (tracepoint_look_up_symbols): Declare.
10676 (struct fast_tpoint_collect_status): Declare.
10677 (fast_tracepoint_collecting): Declare.
10678 (force_unlock_trace_buffer): Declare.
10679 (handle_tracepoint_bkpts): Declare.
10680 (initialize_low_tracepoint)
10681 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10682 * target.h (struct target_ops) <stabilize_threads,
10683 install_fast_tracepoint_jump_pad>: New fields.
10684 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10685 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10686 [HAVE_STDINT_H]: Include stdint.h.
10687 (trace_debug_1): Rename to ...
10688 (trace_vdebug): ... this.
10689 (trace_debug): Rename to ...
10690 (trace_debug_1): ... this. Add `level' parameter.
10691 (trace_debug): New.
10692 (ATTR_USED, ATTR_NOINLINE): New.
10693 (IP_AGENT_EXPORT): New.
10694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10695 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10696 (about_to_request_buffer_space, trace_buffer_is_full)
10697 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10698 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10699 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10700 (traceframe_write_count, traceframes_created)
10701 (trace_state_variables)
10702 New renaming defines.
10703 (struct ipa_sym_addresses): New.
10704 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10705 (symbol_list): New.
10706 (ipa_sym_addrs): New.
10707 (all_tracepoint_symbols_looked_up): New.
10708 (in_process_agent_loaded): New.
10709 (write_e_ipa_not_loaded): New.
10710 (maybe_write_ipa_not_loaded): New.
10711 (tracepoint_look_up_symbols): New.
10712 (debug_threads) [IN_PROCESS_AGENT]: New.
10713 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10714 (UNKNOWN_SIDE_EFFECTS): New.
10715 (stop_tracing): New.
10716 (flush_trace_buffer): New.
10717 (stop_tracing_bkpt): New.
10718 (flush_trace_buffer_bkpt): New.
10719 (read_inferior_integer): New.
10720 (read_inferior_uinteger): New.
10721 (read_inferior_data_pointer): New.
10722 (write_inferior_data_pointer): New.
10723 (write_inferior_integer): New.
10724 (write_inferior_uinteger): New.
10725 (struct collect_static_trace_data_action): Delete.
10726 (enum tracepoint_type): New.
10727 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10728 <actions_str, step_actions, step_actions_str>: Only include in
10729 GDBserver.
fa593d66
PA
10730 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10731 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10732 (tracepoints): Use IP_AGENT_EXPORT.
10733 (last_tracepoint): Don't include in the IPA.
10734 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10735 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10736 (alloced_trace_state_variables): New.
10737 (trace_state_variables): Use IP_AGENT_EXPORT.
10738 (traceframe_t): Delete unused variable.
10739 (circular_trace_buffer): Don't include in the IPA.
10740 (trace_buffer_start): Delete.
10741 (struct trace_buffer_control): New.
10742 (trace_buffer_free): Delete.
10743 (struct ipa_trace_buffer_control): New.
10744 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10745 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10746 New.
10747 (trace_buffer_ctrl): New.
10748 (TRACE_BUFFER_CTRL_CURR): New.
10749 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10750 Reimplement as macros.
10751 (trace_buffer_wrap): Delete.
10752 (traceframe_write_count, traceframe_read_count)
10753 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10754 (struct tracepoint_hit_ctx) <type>: New field.
10755 (struct fast_tracepoint_ctx): New.
10756 (memory_barrier): New.
10757 (cmpxchg): New.
10758 (record_tracepoint_error): Update atomically in the IPA.
10759 (clear_inferior_trace_buffer): New.
10760 (about_to_request_buffer_space): New.
10761 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10762 updating the same buffer.
10763 (add_tracepoint): Default the tracepoint's type to trap
10764 tracepoint, and orig_size to -1.
10765 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10766 internal variables.
10767 (create_trace_state_variable): New parameter `gdb'. Handle it.
10768 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10769 (cmd_qtdp): Handle fast tracepoints.
10770 (cmd_qtdv): Adjust.
10771 (max_jump_pad_size): New.
10772 (gdb_jump_pad_head): New.
10773 (get_jump_space_head): New.
10774 (claim_jump_space): New.
10775 (sort_tracepoints): New.
10776 (MAX_JUMP_SIZE): New.
10777 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10778 IPA.
10779 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10780 support. Upload fast traceframes, and delete internal IPA
10781 breakpoints.
10782 (stop_tracing_handler): New.
10783 (flush_trace_buffer_handler): New.
10784 (cmd_qtstop): Upload fast tracepoints.
10785 (response_tracepoint): Handle fast tracepoints.
10786 (tracepoint_finished_step): Upload fast traceframes. Set the
10787 tracepoint hit context's tracepoint type.
10788 (handle_tracepoint_bkpts): New.
10789 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10790 type. Add comment about fast tracepoints.
10791 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10792 non-existing action_str field.
10793 (get_context_regcache): Handle fast tracepoints.
10794 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10795 to the regcache.
10796 (fast_tracepoint_from_jump_pad_address): New.
10797 (fast_tracepoint_from_ipa_tpoint_address): New.
10798 (collecting_t): New.
10799 (force_unlock_trace_buffer): New.
10800 (fast_tracepoint_collecting): New.
10801 (collecting): New.
10802 (gdb_collect): New.
10803 (write_inferior_data_ptr): New.
10804 (target_tp_heap): New.
10805 (target_malloc): New.
10806 (download_agent_expr): New.
10807 (UALIGN): New.
10808 (download_tracepoints): New.
10809 (download_trace_state_variables): New.
10810 (upload_fast_traceframes): New.
10811 (IPA_FIRST_TRACEFRAME): New.
10812 (IPA_NEXT_TRACEFRAME_1): New.
10813 (IPA_NEXT_TRACEFRAME): New.
10814 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10815 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10816 (gdb_jump_pad_buffer_end): New.
10817 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10818 (initialize_tracepoint): Adjust.
10819 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10820 buffer. Initialize the low module.
10821 * utils.c (PREFIX, TOOLNAME): New.
10822 (malloc_failure): Use PREFIX.
10823 (error): In the IPA, an error causes an exit.
10824 (fatal, warning): Use PREFIX.
10825 (internal_error): Use TOOLNAME.
10826 (NUMCELLS): Increase to 10.
10827 * configure, config.in: Regenerate.
10828
d149dd1d
PA
108292010-06-01 Pedro Alves <pedro@codesourcery.com>
10830
10831 * server.c (handle_query) <qSupported>: Do two passes over the
10832 qSupported string to avoid nesting strtok.
10833
f6528abd
JK
108342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10835
10836 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10837 (CDEPS): New.
10838 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10839 -Wl,--dynamic-list.
10840 * configure: Regenerate.
10841 * proc-service.list: New.
10842
ca2a87a0
JK
108432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10844
10845 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10846 New comment.
10847
363a6e9f
OS
108482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10849
10850 * gdbreplay.c (remote_open): Check error return from socket() call by
10851 its equality to -1 not by it being negative.
10852 * remote-utils.c (remote_open): Likewise.
10853
d23b6cb1
PA
108542010-05-23 Pedro Alves <pedro@codesourcery.com>
10855
10856 * config.h: Regenerate.
10857
28d3cf85
MK
108582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10859
10860 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10861 doesn't provide PTRACE_GET_THREAD_AREA.
10862
fea36a59
MK
108632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10864
10865 * linux-m68k-low.c: Include <asm/ptrace.h>
10866 (ps_get_thread_area): Implement.
10867
24b066ba
DE
108682010-05-03 Doug Evans <dje@google.com>
10869
10870 * event-loop.c (struct callback_event): New struct.
10871 (callback_list): New global.
10872 (append_callback_event, delete_callback_event): New functions.
10873 (process_callback): New function.
10874 (start_event_loop): Call it.
10875 * remote-utils.c (NOT_SCHEDULED): Define.
10876 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10877 moved out of readchar.
10878 (readchar): Rewrite. Call reschedule before returning.
10879 (reset_readchar): New function.
10880 (remote_close): Call it.
10881 (process_remaining, reschedule): New functions.
10882 * server.h (callback_handler_func): New typedef.
10883 (append_callback_event, delete_callback_event): Declare.
10884
9836d6ea
PA
108852010-05-03 Pedro Alves <pedro@codesourcery.com>
10886
10887 * proc-service.c (ps_pglobal_lookup): Use
10888 thread_db_look_up_one_symbol.
10889 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10890 parameter. Use it instead of all_symbols_looked_up.
10891 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10892 field.
10893 (all_symbols_looked_up): Don't declare.
10894 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10895 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10896 field.
10897 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10898 Set all_symbols_looked_up here.
10899 (thread_db_look_up_one_symbol): New.
10900 (thread_db_get_tls_address): Adjust.
10901 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10902 thread_db object on the heap, and tentatively set it in the
10903 process structure.
10904 (thread_db_init): Don't set all_symbols_looked_up here.
10905 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10906
7984d532
PA
109072010-05-03 Pedro Alves <pedro@codesourcery.com>
10908
10909 * linux-low.c (linux_kill, linux_detach): Adjust.
10910 (status_pending_p_callback): Remove redundant statement. Check
10911 for !TARGET_WAITIKIND_IGNORE, instead of
10912 TARGET_WAITKIND_STOPPED.
10913 (handle_tracepoints): Make sure LWP is locked. Adjust.
10914 (linux_wait_for_event_1): Adjust.
10915 (linux_cancel_breakpoints): New.
10916 (unsuspend_one_lwp): New.
10917 (unsuspend_all_lwps): New.
10918 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10919 (send_sigstop_callback): Change return type to int, add new
10920 `except' parameter and handle it.
10921 (suspend_and_send_sigstop_callback): New.
10922 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10923 pass them down. If SUSPEND, also increment the lwp's suspend
10924 count.
10925 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10926 (need_step_over_p): Don't consider suspended LWPs.
10927 (start_step_over): Adjust.
10928 (proceed_one_lwp): Change return type to int, add new `except'
10929 parameter and handle it.
10930 (unsuspend_and_proceed_one_lwp): New.
10931 (proceed_all_lwps): Use find_inferior instead of
10932 for_each_inferior.
10933 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10934 also decrement the suspend count of LWPs. Pass `except' down,
10935 instead of hacking its suspend count.
10936 (linux_pause_all): Add `freeze' parameter. Adjust.
10937 (linux_unpause_all): New.
10938 (linux_target_ops): Install linux_unpause_all.
10939 * server.c (handle_status): Adjust.
10940 * target.h (struct target_ops): New fields `unpause_all' and
10941 `cancel_breakpoints'. Add new parameter to `pause_all'.
10942 (pause_all): Add new `freeze' parameter.
10943 (unpause_all): New.
10944 (cancel_breakpoints): New.
10945 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10946 cancel breakpoints.
10947 (cmd_qtstart): Pause threads.
10948 (stop_tracing): Pause threads, and cancel breakpoints.
10949 * win32-low.c (win32_target_ops): Adjust.
10950
e471f25b
PA
109512010-05-03 Pedro Alves <pedro@codesourcery.com>
10952
10953 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10954 the inferior right away from here...
10955 (linux_wait_1): ... to here, and adjust to check the thread's
10956 last_resume_kind instead of the lwp's step or stop_expected flags.
10957
1915ef4f
PA
109582010-05-02 Pedro Alves <pedro@codesourcery.com>
10959
10960 * README: Use consistent `GDB' and `GDBserver' spellings.
10961
f9e39928
PA
109622010-05-02 Pedro Alves <pedro@codesourcery.com>
10963
10964 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10965 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10966 (linux_detach_one_lwp): Assume the lwp is stopped.
10967 (any_thread_of): Delete.
10968 (linux_detach): Stop all lwps here. Don't blindly delete all
10969 breakpoints.
10970 (delete_lwp_callback): New.
10971 (linux_mourn): Delete all lwps of the process that is gone.
10972 (linux_wait_1): Don't delete the last lwp of the process here.
10973 * mem-break.h (mark_breakpoints_out): Declare.
10974 * mem-break.c (mark_breakpoints_out): New.
10975 (free_all_breakpoints): Use it.
10976 * server.c (handle_target_event): If the process is gone, mark
10977 breakpoints out.
10978 * thread-db.c (struct thread_db) <create_bp>: New field.
10979 (thread_db_enable_reporting): Fix prototype. Store a thread event
10980 breakpoint reference in the thread_db struct.
10981 (thread_db_load_search): Clear the thread_db object.
10982 (try_thread_db_load_1): Ditto.
10983 (switch_to_process): New.
10984 (disable_thread_event_reporting): Use it.
10985 (remove_thread_event_breakpoints): New.
10986 (thread_db_detach, thread_db_mourn): Use it.
10987
1e7fc18c
PA
109882010-05-01 Pedro Alves <pedro@codesourcery.com>
10989
10990 * linux-low.c (linux_enable_event_reporting): New.
10991 (linux_wait_for_event_1, handle_extended_wait): Use it.
10992
02fc4de7
PA
109932010-04-30 Pedro Alves <pedro@codesourcery.com>
10994
10995 * linux-low.c (linux_kill_one_lwp, linux_kill)
10996 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10997 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10998 SIGSTOP even if the LWP is stopped.
10999 (send_sigstop_callback): New.
11000 (stop_all_lwps): Use send_sigstop_callback instead.
11001 (linux_resume_one_thread): Adjust.
11002 (proceed_one_lwp): Still proceed an LWP that the client has
11003 requested to stop, if we haven't reported it as stopped yet. Make
11004 sure that LWPs the client want stopped, have a pending SIGSTOP.
11005
bc3b5632
DE
110062010-04-26 Doug Evans <dje@google.com>
11007
ae1ada35
DE
11008 * server.c (handle_general_set): Make static.
11009
bc3b5632
DE
11010 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11011 Print received char after testing for error/eof instead of before.
11012 (input_interrupt): Tweak comment.
11013
65730243
DE
110142010-04-23 Doug Evans <dje@google.com>
11015
11016 * server.c (start_inferior): Print inferior argv if --debug.
11017
a8ae7dc0
AR
110182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11019
11020 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11021 * nto-x86-low.c: Include server.h
11022
1c07cc19
PM
110232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11024
11025 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11026 be consistent with other sources of this directory.
11027 (init_registers_amd64): Correct name of source file of this function
11028 in the comment.
11029
e0a61e09
PM
110302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11031
11032 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11033 64-bit executables.
11034
54709339
PM
110352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11036
11037 * win32-i386-low.c: Add 64-bit support.
11038 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11039 (init_registers_amd64): Declare.
11040 (mappings): Add 64-bit version of array.
11041 (init_windows_x86): New function.
11042 (the_low_target): Change init_arch field to init_windows_x86.
11043
e8f0053d
PM
110442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11045
11046 * win32-low.c: Adapt to support also 64-bit architecture.
11047 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11048 (get_image_name): Use SIZE_T type for local variable `done'.
11049 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11050 (toolhelp_get_dll_name): Idem.
11051 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11052 Use uintptr_t typecast to avoid warning.
11053 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11054 (handle_exception): Use phex_nz to avoid warning.
11055 (win32_wait): Remove unused local variable `process'.
11056
c481e77e
PM
110572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11058
11059 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11060 `amd64-avx.o'.
11061
12ea4b69
PM
110622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11063
11064 * configure.ac: Use `ws2_32' library for srv_mingw.
11065 * configure: Regenerate.
11066 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11067 * remote-utils.c: Likewise.
11068
f6d1620c
L
110692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11070
11071 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11072 if __x86_64__ is defined.
11073
8e642873
PM
110742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11075
11076 * configure: Regenerate.
11077
711e434b
PM
110782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11079
11080 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11081 * target.h (target_ops): New get_tib_address field.
11082 * win32-low.h (win32_thread_info): Add thread_local_base field.
11083 * win32-low.c (child_add_thread): Add tlb argument.
11084 Set thread_local_base field to TLB.
11085 (get_child_debug_event): Adapt to child_add_thread change.
11086 (win32_get_tib_address): New function.
11087 (win32_target_ops): Set get_tib_address field to
11088 win32_get_tib_address.
11089 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11090
505106cd
PA
110912010-04-12 Pedro Alves <pedro@codesourcery.com>
11092
505106cd
PA
11093 * linux-low.c (linux_mourn): Also remove the process.
11094 * server.c (handle_target_event): Don't remove the process here.
11095 * nto-low.c (nto_mourn): New.
11096 (nto_target_ops): Install it.
11097 * spu-low.c (spu_mourn): New.
11098 (spu_target_ops): Install it.
11099 * win32-low.c (win32_mourn): New.
11100 (win32_target_ops): Install it.
11101
e8470a06
PA
111022010-04-12 Pedro Alves <pedro@codesourcery.com>
11103
11104 * server.h (buffer_xml_printf): Remove redundant `;'.
11105
45ba0d02
PA
111062010-04-12 Pedro Alves <pedro@codesourcery.com>
11107
11108 * regcache.c (set_register_cache): Invalidate regcaches before
11109 changing the register cache layout.
11110 (regcache_invalidate_one): Allow a NULL regcache.
11111 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11112 regcaches before changing the register cache layout or the target
11113 regsets.
11114
59e04013
L
111152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11116
11117 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11118 variable warning on Linux/x86-64.
11119
8336d594
PA
111202010-04-11 Pedro Alves <pedro@codesourcery.com>
11121
11122 GDBserver disconnected tracing support.
11123
11124 * linux-low.c (linux_remove_process): Delete.
11125 (add_lwp): Don't set last_resume_kind here.
11126 (linux_kill): Use `mourn'.
11127 (linux_detach): Use `thread_db_detach', and `mourn'.
11128 (linux_mourn): New.
11129 (linux_attach_lwp_1): Adjust comment.
11130 (linux_attach): last_resume_kind moved the thread_info; adjust.
11131 (status_pending_p_callback): Adjust.
11132 (linux_wait_for_event_1): Adjust.
11133 (count_events_callback, select_singlestep_lwp_callback)
11134 (select_event_lwp_callback, cancel_breakpoints_callback)
11135 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11136 (proceed_one_lwp): Adjust.
11137 (linux_async): Add debug output.
11138 (linux_thread_stopped): New.
11139 (linux_pause_all): New.
11140 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11141 linux_pause_all.
11142 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11143 (thread_db_free): Delete declaration.
11144 (thread_db_detach, thread_db_mourn): Declare.
11145 * thread-db.c (thread_db_init): Use thread_db_mourn.
11146 (thread_db_free): Delete, split in two.
11147 (disable_thread_event_reporting): New.
11148 (thread_db_detach): New.
11149 (thread_db_mourn): New.
11150
11151 * server.h (struct thread_info) <last_resume_kind>: New field.
11152 <attached>: Add comment.
11153 <gdb_detached>: New field.
11154 (handler_func): Change return type to int.
11155 (handle_serial_event, handle_target_event): Ditto.
11156 (gdb_connected): Declare.
11157 (tracing): Delete.
11158 (disconnected_tracing): Declare.
11159 (stop_tracing): Declare.
11160
11161 * server.c (handle_query) <qSupported>: Report support for
11162 disconnected tracing.
11163 (queue_stop_reply_callback): Account for running threads.
11164 (gdb_wants_thread_stopped): New.
11165 (gdb_wants_all_threads_stopped): New.
11166 (gdb_reattached_process): New.
11167 (handle_status): Clear the `gdb_detached' flag of all processes.
11168 In all-stop, stop all threads.
11169 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11170 (process_serial_event): If the remote connection breaks, or if an
11171 exit was forced with "monitor exit", force an event loop exit.
11172 Handle disconnected tracing on detach.
11173 (handle_serial_event): Adjust.
11174 (handle_target_event): If GDB isn't connected, forward events back
11175 to the inferior, unless the last process exited, in which case,
11176 exit gdbserver. Adjust interface.
11177
11178 * remote-utils.c (remote_open): Don't block in accept. Instead
11179 register an event loop source on the listen socket file
11180 descriptor. Refactor bits into ...
11181 (listen_desc): ... this new global.
11182 (gdb_connected): ... this new function.
11183 (enable_async_notification): ... this new function.
11184 (handle_accept_event): ... this new function.
11185 (remote_close): Clear remote_desc.
11186
11187 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11188
11189 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11190 New fields.
11191 (mourn_inferior): Define.
11192 (target_process_qsupported): Avoid the dangling else problem.
11193 (thread_stopped): Define.
11194 (pause_all): Define.
11195 (target_waitstatus_to_string): Declare.
11196 * target.c (target_waitstatus_to_string): New.
11197
11198 * tracepoint.c (tracing): Make extern.
11199 (disconnected_tracing): New.
11200 (stop_tracing): Make extern. Handle tracing stops due to GDB
11201 disconnecting.
11202 (cmd_qtdisconnected): New.
11203 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11204 (handle_tracepoint_general_set): Handle QTDisconnected.
11205
11206 * event-loop.c (event_handler_func): Change return type to int.
11207 (process_event): Bail out if the event handler wants the event
11208 loop to stop.
11209 (handle_file_event): Ditto.
11210 (start_event_loop): Bail out if the event handler wants the event
11211 loop to stop.
11212
11213 * nto-low.c (nto_target_ops): Adjust.
11214 * spu-low.c (spu_wait): Don't remove the process here.
11215 (spu_target_ops): Adjust.
11216 * win32-low.c (win32_wait): Don't remove the process here.
11217 (win32_target_ops): Adjust.
11218
5d267c4c
PA
112192010-04-11 Pedro Alves <pedro@codesourcery.com>
11220
11221 * regcache.c (realloc_register_cache): Invalidate inferior's
11222 regcache before recreating it.
11223
623ccd72
PA
112242010-04-09 Pedro Alves <pedro@codesourcery.com>
11225
11226 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11227
219f2f23
PA
112282010-04-09 Stan Shebs <stan@codesourcery.com>
11229 Pedro Alves <pedro@codesourcery.com>
11230
11231 * server.h (LONGEST): New.
11232 (struct thread_info) <while_stepping>: New field.
11233 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11234 Declare.
11235 (initialize_tracepoint, handle_tracepoint_general_set)
11236 (handle_tracepoint_query, tracepoint_finished_step)
11237 (tracepoint_was_hit, release_while_stepping_state_list):
11238 (current_traceframe): Declare.
11239 * server.c (handle_general_set): Handle tracepoint packets.
11240 (read_memory): New.
11241 (write_memory): New.
11242 (handle_search_memory_1): Use read_memory.
11243 (handle_query): Report support for conditional tracepoints, trace
11244 state variables, and tracepoint sources. Handle tracepoint
11245 queries.
11246 (main): Initialize the tracepoints module.
11247 (process_serial_event): Handle traceframe reads/writes.
11248
11249 * linux-low.c (handle_tracepoints): New.
11250 (linux_wait_1): Call it.
11251 (linux_resume_one_lwp): Handle while-stepping.
11252 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11253 (linux_target_ops): Install them.
11254 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11255 New field.
11256 * linux-x86-low.c (x86_supports_tracepoints): New.
11257 (the_low_target). Install it.
11258
11259 * mem-break.h (delete_breakpoint): Declare.
11260 * mem-break.c (delete_breakpoint): Make external.
11261
11262 * target.h (struct target_ops): Add `supports_tracepoints',
11263 `read_pc', and `write_pc' fields.
11264 (target_supports_tracepoints): Define.
11265 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11266 (phex_nz): New.
11267
11268 * regcache.h (struct regcache) <registers_owned>: New field.
11269 (init_register_cache, regcache_cpy): Declare.
11270 (regcache_read_pc, regcache_write_pc): Declare.
11271 (register_cache_size): Declare.
11272 (supply_regblock): Declare.
11273 * regcache.c (init_register_cache): New.
11274 (new_register_cache): Use it.
11275 (regcache_cpy): New.
11276 (register_cache_size): New.
11277 (supply_regblock): New.
11278 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11279
219f2f23
PA
11280 * tracepoint.c: New.
11281
11282 * Makefile.in (OBS): Add tracepoint.o.
11283 (tracepoint.o): New rule.
11284
3a13a53b
L
112852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11286
11287 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11288 (i386-mmx.o): New.
11289 (i386-mmx.c): Likewise.
11290 (i386-mmx-linux.o): Likewise.
11291 (i386-mmx-linux.c): Likewise.
11292
11293 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11294 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11295 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11296 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11297
11298 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11299 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11300 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11301
1570b33e
L
113022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11303
11304 * Makefile.in (clean): Updated.
11305 (i386-avx.o): New.
11306 (i386-avx.c): Likewise.
11307 (i386-avx-linux.o): Likewise.
11308 (i386-avx-linux.c): Likewise.
11309 (amd64-avx.o): Likewise.
11310 (amd64-avx.c): Likewise.
11311 (amd64-avx-linux.o): Likewise.
11312 (amd64-avx-linux.c): Likewise.
11313
11314 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11315 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11316 (srv_amd64_regobj): Add amd64-avx.o.
11317 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11318 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11319 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11320 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11321 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11322 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11323 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11324
11325 * i387-fp.c: Include "i386-xstate.h".
11326 (i387_xsave): New.
11327 (i387_cache_to_xsave): Likewise.
11328 (i387_xsave_to_cache): Likewise.
11329 (x86_xcr0): Likewise.
11330
11331 * i387-fp.h (i387_cache_to_xsave): Likewise.
11332 (i387_xsave_to_cache): Likewise.
11333 (x86_xcr0): Likewise.
11334
11335 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11336 * linux-crisv32-low.c (target_regsets): Likewise.
11337 * linux-m68k-low.c (target_regsets): Likewise.
11338 * linux-mips-low.c (target_regsets): Likewise.
11339 * linux-ppc-low.c (target_regsets): Likewise.
11340 * linux-s390-low.c (target_regsets): Likewise.
11341 * linux-sh-low.c (target_regsets): Likewise.
11342 * linux-sparc-low.c (target_regsets): Likewise.
11343 * linux-xtensa-low.c (target_regsets): Likewise.
11344
11345 * linux-low.c: Include <sys/uio.h>.
11346 (regsets_fetch_inferior_registers): Support nt_type.
11347 (regsets_store_inferior_registers): Likewise.
11348 (linux_process_qsupported): New.
11349 (linux_target_ops): Add linux_process_qsupported.
11350
11351 * linux-low.h (regset_info): Add nt_type.
11352 (linux_target_ops): Add process_qsupported.
11353
11354 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11355 and <sys/uio.h>.
11356 (init_registers_i386_avx_linux): New.
11357 (init_registers_amd64_avx_linux): Likewise.
11358 (xmltarget_i386_linux_no_xml): Likewise.
11359 (xmltarget_amd64_linux_no_xml): Likewise.
11360 (PTRACE_GETREGSET): Likewise.
11361 (PTRACE_SETREGSET): Likewise.
11362 (x86_fill_xstateregset): Likewise.
11363 (x86_store_xstateregset): Likewise.
11364 (use_xml): Likewise.
11365 (x86_linux_update_xmltarget): Likewise.
11366 (x86_linux_process_qsupported): Likewise.
11367 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11368 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11369 init_registers_i386_linux here. Call
11370 x86_linux_update_xmltarget.
11371 (the_low_target): Add x86_linux_process_qsupported.
11372
11373 * server.c (handle_query): Call target_process_qsupported.
11374
11375 * target.h (target_ops): Add process_qsupported.
11376 (target_process_qsupported): New.
11377
fc7238bb
PA
113782010-04-03 Pedro Alves <pedro@codesourcery.com>
11379
11380 * inferiors.c (add_thread): Set last_status kind to
11381 TARGET_WAITKIND_IGNORE.
11382 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11383 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11384 (linux_wait_1): Move `thread' local definition to block that uses
11385 it. Don't NULL initialize `event_child'.
11386 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11387 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11388 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11389
bdabb078
PA
113902010-04-01 Pedro Alves <pedro@codesourcery.com>
11391
11392 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11393 an extended waitstatus, or by a watchpoint.
11394 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11395 thread was stepping or has been stopped by a watchpoint.
11396
d3bbe7a0
PA
113972010-04-01 Pedro Alves <pedro@codesourcery.com>
11398
11399 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11400 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11401 of another, then delete the previous, and validate all
11402 breakpoints.
11403 (validate_inserted_breakpoint): New.
11404 (delete_disabled_breakpoints): New.
11405 (validate_breakpoints): New.
11406 (check_mem_read): Validate breakpoints before trusting their
11407 shadow. Delete disabled breakpoints.
11408 (check_mem_write): Validate breakpoints before trusting they
11409 should be inserted. Delete disabled breakpoints.
11410 * mem-break.h (validate_breakpoints):
11411 * server.c (handle_query): Validate breakpoints when we see a
11412 qSymbol query.
11413
8b07ae33
PA
114142010-04-01 Pedro Alves <pedro@codesourcery.com>
11415
11416 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11417 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11418 if we could tell there's a GDB breakpoint at stop_pc.
11419 (need_step_over_p): Don't do a step over if we find a GDB
11420 breakpoint at the resume PC.
11421
11422 * mem-break.c (struct raw_breakpoint): New.
11423 (enum bkpt_type): New type `gdb_breakpoint'.
11424 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11425 fields. New field `raw'.
11426 (find_raw_breakpoint_at): New.
11427 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11428 breakpoint instead.
11429 (set_breakpoint_at): Adjust.
11430 (delete_raw_breakpoint): New.
11431 (release_breakpoint): New.
11432 (delete_breakpoint): Rename to...
11433 (delete_breakpoint_1): ... this. Add proc parameter. Use
11434 release_breakpoint. Return ENOENT.
11435 (delete_breakpoint): Reimplement.
11436 (find_breakpoint_at): Delete.
11437 (find_gdb_breakpoint_at): New.
11438 (delete_breakpoint_at): Delete.
11439 (set_gdb_breakpoint_at): New.
11440 (delete_gdb_breakpoint_at): New.
11441 (gdb_breakpoint_here): New.
11442 (set_reinsert_breakpoint): Use release_breakpoint.
11443 (uninsert_breakpoint): Rename to ...
11444 (uninsert_raw_breakpoint): ... this.
11445 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11446 (reinsert_raw_breakpoint): Change parameter type to
11447 raw_breakpoint.
11448 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11449 instead.
11450 (check_breakpoints): Adjust. Use release_breakpoint.
11451 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11452 (breakpoint_inserted_here): Ditto.
11453 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11454 Don't trust the breakpoint's shadow if it is not inserted.
11455 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11456 (delete_all_breakpoints): Adjust.
11457 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11458 use delete_breakpoint_1.
11459
11460 * mem-break.h (breakpoints_supported): Delete declaration.
11461 (set_gdb_breakpoint_at): Declare.
11462 (gdb_breakpoint_here): Declare.
11463 (delete_breakpoint_at): Delete.
11464 (delete_gdb_breakpoint_at): Declare.
11465
11466 * server.h (struct raw_breakpoint): Forward declare.
11467 (struct process_info): New field `raw_breakpoints'.
11468
11469 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11470 breakpoints.
11471
6bf5e0ba
PA
114722010-03-24 Pedro Alves <pedro@codesourcery.com>
11473
11474 * linux-low.c (status_pending_p_callback): Fix comment.
11475 (linux_wait_for_event_1): Move most of the internal breakpoint
11476 handling from here...
11477 (linux_wait_1): ... to here.
11478 (count_events_callback): New.
11479 (select_singlestep_lwp_callback): New.
11480 (select_event_lwp_callback): New.
11481 (cancel_breakpoints_callback): New.
11482 (select_event_lwp): New.
11483 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11484 priority to all LWPs that have had events that should be reported
11485 to the client. Cancel breakpoints when about to reporting the
11486 event to the client, not while stopping lwps. No longer cancel
11487 finished single-steps here.
11488 (cancel_finished_single_step): Delete.
11489 (cancel_finished_single_steps): Delete.
11490
414a389f
PA
114912010-03-24 Pedro Alves <pedro@codesourcery.com>
11492
11493 * mem-break.c (enum bkpt_type): New.
11494 (struct breakpoint): New field `type'.
11495 (set_breakpoint_at): Change return type to struct breakpoint
11496 pointer. Set type to `other_breakpoint' by default.
11497 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11498 in the breakpoint list.
11499 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11500 (reinsert_breakpoint): Rename to ...
11501 (reinsert_raw_breakpoint): ... this.
11502 (reinsert_breakpoints_at): Adjust.
11503 * mem-break.h (struct breakpoint): Declare.
11504 (set_breakpoint_at): Change return type to struct breakpoint
11505 pointer.
11506
2280c721
PA
115072010-03-24 Pedro Alves <pedro@codesourcery.com>
11508
11509 * server.c (handle_query): Assign, not compare.
11510
d50171e4
PA
115112010-03-24 Pedro Alves <pedro@codesourcery.com>
11512
11513 Teach linux gdbserver to step-over-breakpoints.
11514
11515 * linux-low.c (can_hardware_single_step): New.
11516 (supports_breakpoints): New.
11517 (handle_extended_wait): If stopping threads, read the stop pc of
11518 the new cloned LWP.
11519 (get_pc): New.
11520 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11521 low target doesn't support retrieving the PC.
11522 (add_lwp): Set last_resume_kind to resume_continue.
11523 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11524 (linux_attach): Don't clear stop_expected. Set the lwp's
11525 last_resume_kind to resume_stop.
11526 (linux_detach_one_lwp): Don't check for removed breakpoints.
11527 (check_removed_breakpoint): Delete.
11528 (status_pending_p): Rename to ...
11529 (status_pending_p_callback): ... this. Don't check for removed
11530 breakpoints. Don't consider threads that are stopped from GDB's
11531 perspective.
11532 (linux_wait_for_lwp): Always read the stop_pc here.
11533 (cancel_breakpoint): New.
11534 (step_over_bkpt): New global.
11535 (linux_wait_for_event_1): Implement stepping over breakpoints.
11536 (gdb_wants_lwp_stopped): New.
11537 (gdb_wants_all_stopped): New.
11538 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11539 single-step traps here. Store the thread's last reported target
11540 wait status.
11541 (send_sigstop): Don't clear stop_expected. Always set it,
11542 instead.
11543 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11544 (cancel_finished_single_step): New.
11545 (cancel_finished_single_steps): New.
11546 (wait_for_sigstop): Don't cancel finished single-step traps here.
11547 (linux_resume_one_lwp): Don't check for removed breakpoints.
11548 Don't set `step' on non-hardware step archs.
11549 (linux_set_resume_request): Ignore resume_stop requests if already
11550 stopping or stopped. Set the lwp's last_resume_kind.
11551 (resume_status_pending_p): Don't check for removed breakpoints.
11552 (need_step_over_p): New.
11553 (start_step_over): New.
11554 (finish_step_over): New.
11555 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11556 requests. Clear the thread's last reported target waitstatus.
11557 Don't use the `suspended' flag. Don't consider pending breakpoints.
11558 (linux_resume): Start a step-over if necessary.
11559 (proceed_one_lwp): New.
11560 (proceed_all_lwps): New.
11561 (unstop_all_lwps): New.
11562 * linux-low.h (struct lwp_info): Rewrite comment for the
11563 `suspended' flag. Add the `stop_pc' field. Delete the
11564 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11565 Add `'last_resume_kind' and `need_step_over' fields.
11566 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11567 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11568 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11569 (set_raw_breakpoint_at): New.
11570 (set_breakpoint_at): Rewrite to use it.
11571 (reinsert_breakpoint_handler): Delete.
11572 (set_reinsert_breakpoint): New.
11573 (reinsert_breakpoint_by_bp): Delete.
11574 (delete_reinsert_breakpoints): New.
11575 (uninsert_breakpoint): Rewrite.
11576 (uninsert_breakpoints_at): New.
11577 (reinsert_breakpoint): Rewrite.
11578 (reinsert_breakpoints_at): New.
11579 (check_breakpoints): Rewrite.
11580 (breakpoint_here): New.
11581 (breakpoint_inserted_here): New.
11582 (check_mem_read): Adjust.
11583 * mem-break.h (breakpoints_supported, breakpoint_here)
11584 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11585 (reinsert_breakpoint_by_bp): Delete declaration.
11586 (delete_reinsert_breakpoints): Declare.
11587 (reinsert_breakpoint): Delete declaration.
11588 (reinsert_breakpoints_at): Declare.
11589 (uninsert_breakpoint): Delete declaration.
11590 (uninsert_breakpoints_at): Declare.
11591 (check_breakpoints): Adjust prototype.
11592 * server.h: Adjust include order.
11593 (struct thread_info): Declare here. Add a `last_status' field.
11594
30ba68cb
MS
115952010-03-23 Michael Snyder <msnyder@vmware.com>
11596
11597 * server.c (crc32): New function.
11598 (handle_query): Add handling for 'qCRC:' request.
11599
b9a881c2
PA
116002010-03-23 Pedro Alves <pedro@codesourcery.com>
11601
11602 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11603 lwp had been stopped by a watchpoint.
11604
e92d13d5
PA
116052010-03-16 Pedro Alves <pedro@codesourcery.com>
11606
11607 * server.h (internal_error): Declare.
11608 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11609 * utils.c (internal_error): New function.
11610
64daa791
AS
116112010-03-15 Andreas Schwab <schwab@redhat.com>
11612
11613 * configure.srv: Fix typo setting srv_regobj.
11614
f52cd8cd
PA
116152010-03-15 Pedro Alves <pedro@codesourcery.com>
11616
11617 * linux-low.c (fetch_register): Avoid passing a non string literal
11618 format to `error'.
11619 (usr_store_inferior_registers): Ditto.
11620
93ae6fdc
PA
116212010-03-14 Pedro Alves <pedro@codesourcery.com>
11622
11623 * linux-low.c (linux_write_memory): Bail out early if peeking
11624 memory failed.
11625
c3adc08c
PA
116262010-03-14 Pedro Alves <pedro@codesourcery.com>
11627
11628 * linux-low.h (struct lwp_info): New fields
11629 `stopped_by_watchpoint' and `stopped_data_address'.
11630 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11631 here, and cache them in the lwp object.
11632 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11633 directly.
11634 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11635 field.
11636 (linux_stopped_by_watchpoint): Rewrite.
11637 (linux_stopped_data_address): Rewrite.
11638
bce522a2
PA
116392010-03-06 Simo Melenius <simo.melenius@iki.fi>
11640
11641 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11642 switching the current inferior, not before.
11643
90884b2b
L
116442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11645
11646 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11647 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11648 i386-linux.c and amd64-linux.c.
11649 (reg-i386.o): Removed.
11650 (reg-i386.c): Likewise.
11651 (reg-i386-linux.o): Likewise.
11652 (reg-i386-linux.c): Likewise.
11653 (reg-x86-64.o): Likewise.
11654 (reg-x86-64.c): Likewise.
11655 (reg-x86-64-linux.o): Likewise.
11656 (reg-x86-64-linux.c): Likewise.
11657 (i386.o): New.
11658 (i386.c): Likewise.
11659 (i386-linux.o): Likewise.
11660 (i386-linux.c): Likewise.
11661 (amd64.o): Likewise.
11662 (amd64.c): Likewise.
11663 (amd64-linux.o): Likewise.
11664 (amd64-linux.c): Likewise.
11665
11666 * configure.srv (srv_i386_regobj): New.
11667 (srv_i386_linux_regobj): Likewise.
11668 (srv_amd64_regobj): Likewise.
11669 (srv_amd64_linux_regobj): Likewise.
11670 (srv_i386_32bit_xmlfiles): Likewise.
11671 (srv_i386_64bit_xmlfiles): Likewise.
11672 (srv_i386_xmlfiles): Likewise.
11673 (srv_amd64_xmlfiles): Likewise.
11674 (srv_i386_linux_xmlfiles): Likewise.
11675 (srv_amd64_linux_xmlfiles): Likewise.
11676 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11677 srv_xmlfiles to $srv_i386_xmlfiles.
11678 (i[34567]86-*-mingw32ce*): Likewise.
11679 (i[34567]86-*-mingw*): Likewise.
11680 (i[34567]86-*-nto*): Likewise.
11681 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11682 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11683 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11684 (x86_64-*-linux*): Likewise.
11685
11686 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11687 (init_registers_amd64_linux): New.
11688 (x86_arch_setup): Replace init_registers_x86_64_linux with
11689 init_registers_amd64_linux.
11690
193f13e6
MK
116912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11692
11693 * configure.ac: Check for libdl. If it is not available link against
11694 static libthread_db.
11695 * configure: Regenerate.
11696
85d721b8
PA
116972010-02-22 Pedro Alves <pedro@codesourcery.com>
11698
11699 PR9605
11700
11701 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11702 handing a read watchpoint.
11703 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11704
6076632b
DE
117052010-02-12 Doug Evans <dje@google.com>
11706
11707 * linux-low.c (linux_supports_tracefork_flag): Document.
11708 (linux_look_up_symbols): Add comment.
11709
3327ccf7
L
117102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11711
11712 * regcache.c (supply_register): Clear regcache if buf is NULL.
11713
0718675c 117142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11715 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11716
11717 * inferiors.c (find_inferior): Add function documentation.
11718 (unloaded_dll): Handle the case where the unloaded dll has not
11719 been previously registered in the dll list.
11720
177321bd
DJ
117212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11722
11723 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11724 (thumb2_breakpoint): New.
11725 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11726
2b009048
DJ
117272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11728
11729 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11730 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11731 breakpoints.
11732
3be029c7
PA
117332010-01-21 Pedro Alves <pedro@codesourcery.com>
11734
11735 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11736
18f5de3b
JK
117372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11738
11739 * linux-s390-low.c (s390_collect_ptrace_register)
11740 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11741
3743bb4f
DE
117422010-01-21 Doug Evans <dje@google.com>
11743
14ce3065
DE
11744 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11745 (PTRACE_ARG4_TYPE): New macro.
11746 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11747 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11748 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11749 (usr_store_inferior_registers): Ditto.
11750 (linux_read_memory, linux_write_memory): Ditto.
11751 (linux_test_for_tracefork): Ditto.
11752
3743bb4f
DE
11753 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11754 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11755
8b315be5
PA
117562010-01-21 Pedro Alves <pedro@codesourcery.com>
11757
11758 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11759 target.
11760
85492558
PA
117612010-01-21 Pedro Alves <pedro@codesourcery.com>
11762
11763 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11764 prototype to take a regcache. Adjust.
11765
442ea881
PA
117662010-01-20 Pedro Alves <pedro@codesourcery.com>
11767
11768 * regcache.h (struct thread_info): Forward declare.
11769 (struct regcache): New.
11770 (new_register_cache): Adjust prototype.
11771 (get_thread_regcache): Declare.
11772 (free_register_cache): Adjust prototype.
11773 (registers_to_string, registers_from_string): Ditto.
11774 (supply_register, supply_register_by_name, collect_register)
11775 (collect_register_as_string, collect_register_by_name): Ditto.
11776 * regcache.c (struct inferior_regcache_data): Delete.
11777 (get_regcache): Rename to ...
11778 (get_thread_regcache): ... this. Adjust. Switch inferior before
11779 fetching registers.
11780 (regcache_invalidate_one): Adjust.
11781 (regcache_invalidate): Fix prototype.
11782 (new_register_cache): Return the new register cache.
11783 (free_register_cache): Change prototype.
11784 (realloc_register_cache): Adjust.
11785 (registers_to_string): Change prototype to take a regcache. Adjust.
11786 (registers_from_string): Ditto.
11787 (register_data): Ditto.
11788 (supply_register): Ditto.
11789 (supply_register_by_name): Ditto.
11790 (collect_register): Ditto.
11791 (collect_register_as_string): Ditto.
11792 (collect_register_by_name): Ditto.
11793 * server.c (process_serial_event): Adjust.
11794 * linux-low.h (regset_fill_func, regset_store_func): Change
11795 prototype.
11796 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11797 Change prototype.
11798 * linux-low.c (get_stop_pc): Adjust.
11799 (check_removed_breakpoint): Adjust.
11800 (linux_wait_for_event): Adjust.
11801 (linux_resume_one_lwp): Adjust.
11802 (fetch_register): Add regcache parameter. Adjust.
11803 (usr_store_inferior_registers): Ditto.
11804 (regsets_fetch_inferior_registers): Ditto.
11805 (regsets_store_inferior_registers): Ditto.
11806 (linux_fetch_registers, linux_store_registers): Ditto.
11807 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11808 regcache. Adjust.
43aaf8b6
PA
11809 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11810 Ditto.
442ea881
PA
11811 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11812 prototype to take a regcache.
11813 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11814 * remote-utils.c (convert_ascii_to_int, outreg)
11815 (prepare_resume_reply): Change prototype to take a regcache.
11816 Adjust.
11817 * target.h (struct target_ops) <fetch_registers, store_registers>:
11818 Change prototype to take a regcache.
11819 (fetch_inferior_registers, store_inferior_registers): Change
11820 prototype to take a regcache. Adjust.
11821 * proc-service.c (ps_lgetregs): Adjust.
11822 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11823 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11824 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11825 take a regcache. Adjust.
11826 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11827 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11828 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11829 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11830 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11831 (cris_cannot_fetch_register):
11832 (cris_breakpoint_at): Change prototype to take a regcache.
11833 Adjust.
11834 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11835 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11836 to take a regcache. Adjust.
11837 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11838 Adjust.
11839 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11840 take a regcache. Adjust.
11841 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11842 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11843 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11844 * linux-mips-low.c (mips_get_pc):
11845 (mips_set_pc): Change prototype to take a regcache. Adjust.
11846 (mips_reinsert_addr): Adjust.
11847 (mips_collect_register): Change prototype to take a regcache.
11848 Adjust.
11849 (mips_supply_register):
11850 (mips_collect_register_32bit, mips_supply_register_32bit)
11851 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11852 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11853 * linux-ppc-low.c (ppc_supply_ptrace_register)
11854 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11855 (parse_spufs_run): Adjust.
11856 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11857 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11858 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11859 take a regcache. Adjust.
11860 * linux-s390-low.c (s390_collect_ptrace_register)
11861 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11862 (s390_set_pc): Change prototype to take a regcache. Adjust.
11863 (s390_arch_setup): Adjust.
11864 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11865 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11866 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11867 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11868 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11869 regcache. Adjust.
11870 (sparc_breakpoint_at): Adjust.
11871 * linux-xtensa-low.c (xtensa_fill_gregset):
11872 (xtensa_store_gregset):
11873 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11874 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11875 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11876 prototype to take a regcache. Adjust.
11877 * win32-arm-low.c (arm_fetch_inferior_register)
11878 (arm_store_inferior_register): Change prototype to take a
11879 regcache. Adjust.
11880 * win32-i386-low.c (i386_fetch_inferior_register)
11881 (i386_store_inferior_register): Change prototype to take a
11882 regcache. Adjust.
11883 * win32-low.c (child_fetch_inferior_registers)
11884 (child_store_inferior_registers): Change prototype to take a
11885 regcache. Adjust.
11886 (win32_wait): Adjust.
11887 (win32_fetch_inferior_registers): Change prototype to take a
11888 regcache. Adjust.
11889 (win32_store_inferior_registers): Adjust.
11890 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11891 store_inferior_register>: Change prototype to take a regcache.
11892
60c3d7b0
DE
118932010-01-20 Doug Evans <dje@google.com>
11894
11895 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11896 #ifdef.
11897 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11898 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11899
dc146f7c
VP
119002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11901
11902 * linux-low.c (linux_core_of_thread): New.
11903 (compare_ints, show_process, list_threads): New.
11904 (linux_qxfer_osdata): Report threads and cores.
11905 (linux_target_op): Register linux_core_of_thread.
11906 * remote-utils.c (prepare_resume_reply): Report the core.
11907 (buffer_xml_printf): Support %d specifier.
11908 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11909 New.
11910 (handle_query): Handle qXfer:threads. Announce availability
11911 thereof.
11912 * target.h (struct target_ops): New field core_of_thread.
11913
7803799a
UW
119142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11915
11916 * Makefile.in (clean): Remove new generated files.
11917 (reg-s390.o, reg-s390.c): Remove rules.
11918 (reg-s390x.o, reg-s390x.c): Likewise.
11919 (s390-linux32.o, s390-linux32.c): Add rules.
11920 (s390-linux64.o, s390-linux64.c): Likewise.
11921 (s390x-linux64.o, s390x-linux64.c): Likewise.
11922 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11923 * linux-s390-low.c: Include <elf.h>.
11924 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11925 (init_registers_s390): Remove prototype.
11926 (init_registers_s390x): Likewise.
11927 (init_registers_s390_linux32): Add prototype.
11928 (init_registers_s390_linux64): Likewise.
11929 (init_registers_s390x_linux64): Likewise.
11930 (s390_num_regs_3264): New define.
11931 (s390_regmap_3264): New global variable.
11932 (s390_cannot_fetch_register): Remove obsolete check.
11933 (s390_cannot_store_register): Likewise.
11934 (s390_collect_ptrace_register): Handle upper/lower register halves.
11935 (s390_supply_ptrace_register): Likewise.
11936 (s390_fill_gregset): Update to register number changes.
11937 (s390_get_hwcap): New routine.
11938 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11939 Install appropriate regmap and register set.
11940
6e7ffa39
JB
119412010-01-01 Joel Brobecker <brobecker@adacore.com>
11942
11943 * server.c (gdbserver_version): Update copyright year to 2010.
11944 * gdbreplay.c (gdbreplay_version): Likewise.
11945
957f3f49
DE
119462009-12-28 Doug Evans <dje@google.com>
11947
11948 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11949 elf/external.h. Include <elf.h> instead but only if necessary.
11950
ca5c370d
PA
119512009-12-28 Pedro Alves <pedro@codesourcery.com>
11952
11953 * linux-low.c (linux_remove_process): Remove `detaching'
11954 parameter. Don't release/detach from thread_db here.
11955 (linux_kill): Release/detach from thread_db here, ...
11956 (linux_detach): ... and here, before actually detaching.
11957 (linux_wait_1): ... and here, when a process exits.
11958 * thread-db.c (any_thread_of): New.
11959 (thread_db_free): Switch the current inferior to a thread of the
11960 passed in process.
11961
4ee62156
DE
119622009-12-21 Doug Evans <dje@google.com>
11963
d90e6a88
DE
11964 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11965
c5f62d5f
DE
11966 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11967 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11968 warning ifndef __NR_tkill. Move setting of errno there too.
11969 Delete unnecessary resetting of errno after syscall.
11970 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11971
10e86dd7
DE
11972 * configure.ac: Check for dladdr.
11973 * config.in: Regenerate.
11974 * configure: Regenerate.
11975 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11976 (try_thread_db_load): Update.
11977
4ee62156
DE
11978 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11979
00f515da
DE
119802009-12-18 Doug Evans <dje@google.com>
11981
e9464885
DE
11982 * event-loop.c: Include unistd.h if it exists.
11983
07d4f67e
DE
11984 * linux-low.c (my_waitpid): Move definition away from being in
11985 between linux_tracefork_child/linux_test_for_tracefork.
11986
00f515da
DE
11987 * gdb_proc_service.h (psaddr_t): Fix type.
11988 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11989 signature to match glibc.
11990
1de1badb
DE
119912009-12-16 Doug Evans <dje@google.com>
11992
11993 * linux-low.c (linux_read_memory): Fix argument to read.
11994
aeeb81d1
PA
119952009-11-26 Pedro Alves <pedro@codesourcery.com>
11996
11997 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11998 events, don't leave current_inferior pointing at null.
11999
10357975
PA
120002009-11-26 Pedro Alves <pedro@codesourcery.com>
12001
12002 * win32-low.c (LOG): Delete.
12003 (OUTMSG): Output to stderr.
12004 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12005 on compile time LOG macro.
12006 (win32_wait): Fix debug output.
12007
cf6e3471
PA
120082009-11-26 Pedro Alves <pedro@codesourcery.com>
12009
12010 * win32-low.c (win32_add_one_solib): If the dll name is
12011 "ntdll.dll", prepend the system directory to the dll path.
12012
0c85e18e
MK
120132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12014
12015 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12016
9ac544ce 120172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12018 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12019
12020 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12021 * configure.ac: Check for __mcoldfire__ and set
12022 gdb_cv_m68k_is_coldfire.
12023 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12024 reg-cf.o and reg-m68k.o.
12025 * configure: Regenerated.
12026
fd7dd3e6
PA
120272009-11-16 Pedro Alves <pedro@codesourcery.com>
12028
12029 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12030 Pass it to thread_db_free.
12031 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12032 proper `detaching' argument to linux_remove_process.
12033 * linux-low.h (thread_db_free): Add `detaching' parameter.
12034 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12035 to thread_db_free.
12036 (thread_db_free): Add `detaching' parameter. Only
12037 call td_ta_clear_event if detaching from process.
12038
75aa492e
MK
120392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12040
12041 * thread-db.c (thread_db_free): Fix typo.
12042
21e1bee4
PP
120432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12044
12045 PR gdb/10838
12046 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12047
8838b45e
NS
120482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12049
12050 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12051 with an i686 compiler.
12052 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12053 needed.
12054 * configure: Rebuilt.
12055
8a35fb51
SL
120562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12057
12058 PR gdb/10783
12059
12060 * server.c (handle_search_memory_1): Correct read_addr initialization
12061 in loop for searching subsequent chunks.
12062
96f15937
PP
120632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12064
12065 * configure.ac: New --with-libthread-db option.
12066 * thread-db.c: Allow direct dependence on libthread_db.
12067 (thread_db_free): Adjust.
12068 * config.in: Regenerate.
12069 * configure: Likewise.
889bf7c5 12070
5f7d1694
PP
120712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12072
12073 PR gdb/10757
12074 * thread-db.c (attach_thread): New function.
12075 (maybe_attach_thread): Return success/failure.
12076 (find_new_threads_callback): Adjust.
889bf7c5
PA
12077 (thread_db_find_new_threads): Loop until no new threads.
12078
88e3b899
PA
120792009-10-13 Pedro Alves <pedro@codesourcery.com>
12080
12081 * proc-service.c (ps_lgetregs): Formatting.
12082
cdbfd419
PP
120832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12084
12085 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12086 * configure.ac: Adjust.
12087 * linux-low.h (struct process_info_private): Move members to struct
12088 thread_db.
12089 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12090 * linux-low.c (linux_remove_process): Adjust.
12091 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12092 * server.c (handle_query): Move code ...
12093 (handle_monitor_command): ... here. New function.
12094 * target.h (struct target_ops): New member.
12095 * thread-db.c (struct thread_db): New.
12096 (libthread_db_search_path): New variable.
12097 (thread_db_create_event, thread_db_enable_reporting)
12098 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12099 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12100 (try_thread_db_load_1, dladdr_to_soname): New functions.
12101 (try_thread_db_load, thread_db_load_search): New functions.
12102 (thread_db_init): Search for libthread_db.
12103 (thread_db_free): New function.
12104 (thread_db_handle_monitor_command): Likewise.
12105 * config.in: Regenerate.
12106 * configure: Regenerate.
889bf7c5 12107
4168d2d6
UW
121082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12109
12110 * spu-low.c (spu_kill): Wait for inferior to terminate.
12111 Call clear_inferiors.
12112 (spu_detach): Call clear_inferiors.
12113
81ecdfbb
RW
121142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12115
12116 * aclocal.m4: Regenerate.
12117 * config.in: Likewise.
12118 * configure: Likewise.
12119
0b9ff2c0
UW
121202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12121
12122 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12123 (parse_spufs_run): New function.
12124 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12125 (ppc_breakpoint_at): Handle SPU breakpoints.
12126
efcbbd14
UW
121272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12128
12129 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12130 (SPUFS_MAGIC): Define.
12131 (spu_enumerate_spu_ids): New function.
12132 (linux_qxfer_spu): New function.
12133 (linux_target_ops): Install linux_qxfer_spu.
12134
f4d9bade
UW
121352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12136
12137 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12138 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12139 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12140 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12141 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12142 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12143 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12144 (init_registers_powerpc_cell32l): Add prototype.
12145 (init_registers_powerpc_cell64l): Likewise.
12146 (ppc_arch_setup): Detect Cell/B.E. architecture.
12147
96e946ca
RW
121482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12149
12150 * Makefile.in (datarootdir): New variable.
12151
58d6951d
DJ
121522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * linux-low.c (linux_write_memory): Update debugging output.
12155 * Makefile.in (clean): Add new descriptions.
12156 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12157 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12158 * configure.srv: Add new files for arm*-*-linux*.
12159 * linux-arm-low.c: Add new declarations.
12160 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12161 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12162 (HWCAP_VFPv3D16): New.
12163 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12164 instead of __IWMMXT__.
12165 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12166 (arm_arch_setup): New.
12167 (target_regsets): Remove #ifdef. Add VFP regset.
12168 (the_low_target): Use arm_arch_setup.
12169
12b42a12
DJ
121702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12173 the main thread again.
12174
ac8c974e
AR
121752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12176
12177 Adding Neutrino gdbserver.
12178 * configure: Regenerated.
12179 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12180 * configure.srv (i[34567]86-*-nto*): New target.
12181 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12182 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12183 (nto_comctrl) [__QNX__]: New function.
12184 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12185
4424e0c3 121862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12187
12188 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12189 srv_tgtobj.
12190
912cf4ba
PA
121912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12192 Pedro Alves <pedro@codesourcery.com>
12193
12194 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12195 don't support CONTEXT_EXTENDED_REGISTERS.
12196 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12197 (the_low_target): Install them.
12198 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12199 failing with ERROR_PIPE_NOT_CONNECTED.
12200
aa5ca48f
DE
122012009-06-30 Doug Evans <dje@google.com>
12202 Pierre Muller <muller@ics.u-strasbg.fr>
12203
12204 Add h/w watchpoint support to x86-linux, win32-i386.
12205 * Makefile.in (SFILES): Add i386-low.c
12206 (i386_low_h): Define.
12207 (i386-low.o): Add dependencies.
12208 (linux-x86-low.o): Add i386-low.h dependency.
12209 (win32-i386-low.o): Ditto.
12210 * i386-low.c: New file.
12211 * i386-low.h: New file.
12212 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12213 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12214 * linux-low.c (linux_add_process): Initialize arch_private.
12215 (linux_remove_process): Free arch_private.
12216 (add_lwp): Initialize arch_private.
12217 (delete_lwp): Free arch_private.
12218 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12219 provided.
12220 * linux-low.h (process_info_private): New member arch_private.
12221 (lwp_info): New member arch_private.
12222 (linux_target_ops): New members new_process, new_thread,
12223 prepare_to_resume.
12224 (ptid_of): New macro.
12225 * linux-x86-low.c: Include stddef.h, i386-low.h.
12226 (arch_process_info): New struct.
12227 (arch_lwp_info): New struct.
12228 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12229 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12230 (i386_dr_low_get_status): New function.
12231 (x86_insert_point, x86_remove_point): New functions.
12232 (x86_stopped_by_watchpoint): New function.
12233 (x86_stopped_data_address): New function.
12234 (x86_linux_new_process, x86_linux_new_thread): New functions.
12235 (x86_linux_prepare_to_resume): New function.
12236 (the_low_target): Add entries for insert_point, remove_point,
12237 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12238 prepare_to_resume.
12239 * server.c (debug_hw_points): New global.
12240 (monitor_show_help): Document set debug-hw-points.
12241 (handle_query): Process "set debug-hw-points".
12242 * server.h (debug_hw_points): Declare.
12243 (paddress): Declare.
12244 * utils.c (NUMCELLS, CELLSIZE): New macros.
12245 (get_sell, xsnprintf, paddress): New functions.
12246 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12247 remove_point, stopped_by_watchpoint, stopped_data_address.
12248 * win32-i386-low.c: Include i386-low.h.
12249 (debug_reg_state): Replaces dr.
12250 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12251 (i386_dr_low_get_status): New function.
12252 (i386_insert_point, i386_remove_point): New functions.
12253 (i386_stopped_by_watchpoint): New function.
12254 (i386_stopped_data_address): New function.
12255 (i386_initial_stuff): Update.
12256 (get_thread_context,set_thread_context,i386_thread_added): Update.
12257 (the_low_target): Add entries for insert_point,
12258 remove_point, stopped_by_watchpoint, stopped_data_address.
12259 * win32-low.c (win32_insert_watchpoint): New function.
12260 (win32_remove_watchpoint): New function.
12261 (win32_stopped_by_watchpoint): New function.
12262 (win32_stopped_data_address): New function.
12263 (win32_target_ops): Add entries for insert_watchpoint,
12264 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12265 * win32-low.h (win32_target_ops): New members insert_point,
12266 remove_point, stopped_by_watchpoint, stopped_data_address.
12267
d993e290
PA
122682009-06-25 Pedro Alves <pedro@codesourcery.com>
12269
12270 * server.c (process_serial_event): Re-return unsupported, not
12271 error, if the type isn't recognized. Re-allow supporting only
12272 insert or remove packets. Also call require_running for
12273 breakpoints. Add missing break statement to default case. Tidy.
12274 * target.h (struct target_ops): Rename insert_watchpoint to
12275 insert_point, and remove_watchpoint to remove_point.
12276
12277 * linux-low.h (struct linux_target_ops): Likewise.
12278 * linux-low.c (linux_insert_watchpoint): Rename to ...
12279 (linux_insert_point): ... this. Adjust.
12280 (linux_remove_watchpoint): Rename to ...
12281 (linux_remove_point): ... this. Adjust.
12282 (linux_target_ops): Adjust.
12283 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12284 (cris_insert_point): ... this.
12285 (cris_remove_watchpoint): Rename to ...
12286 (cris_remove_point): ... this.
12287 (the_low_target): Adjust.
12288
0f54c268
PM
122892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12290
12291 * server.c (handle_v_kill): Pass signal_pid to
12292 kill_inferior if multi_process is zero.
12293
c6314022
AR
122942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12295
12296 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12297 * target.h (target_ops): Comment for *_watchpoint to make it clear
12298 the functions can get types '0' and '1'.
12299
4463ce24
AR
123002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12301
12302 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12303 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12304 * regcache.c (get_regcache): Likewise.
12305 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12306 * win32-low.c (child_fetch_inferior_registers): Remove check for
12307 regno 0.
12308
cf8fd78b
PA
123092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12310 Pedro Alves <pedro@codesourcery.com>
12311
12312 * target.h (struct target_ops) <supports_multi_process>: New
12313 callback.
12314 (target_supports_multi_process): New.
12315 * server.c (handle_query): Even if GDB reports support, only
12316 enable multi-process if the target also supports it. Report
12317 multi-process support only if the target backend supports it.
12318 * linux-low.c (linux_supports_multi_process): New function.
12319 (linux_target_ops): Install it as target_supports_multi_process
12320 callback.
12321
47c0c975
DE
123222009-05-24 Doug Evans <dje@google.com>
12323
e09875d4
DE
12324 Global renaming of find_thread_pid to find_thread_ptid.
12325 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12326 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12327 All callers updated.
12328
e27d73f6
DE
12329 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12330 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12331 directly.
12332
47c0c975
DE
12333 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12334 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12335 (linux_resume_one_lwp): Ditto.
12336
2acc282a
DE
123372009-05-23 Doug Evans <dje@google.com>
12338
12339 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12340 from struct inferior_list_entry * to struct lwp_info *.
12341 All callers updated.
12342
9f1036c1
DE
123432009-05-13 Doug Evans <dje@google.com>
12344
12345 * linux-x86-low.c: Don't include assert.h.
12346 (x86_siginfo_fixup): Use fatal, not assert.
12347 (x86_arch_setup): Fix comment.
12348
d0722149
DE
123492009-05-12 Doug Evans <dje@google.com>
12350
12351 Biarch support for i386/amd64 gdbserver.
12352 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12353 Add linux-x86-low.c.
12354 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12355 (linux-x86-low.o): Add.
12356 * linux-x86-64-low.c: Delete.
12357 * linux-i386-low.c: Delete.
12358 * linux-x86-low.c: New file.
12359 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12360 linux-x86-low.o.
12361 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12362 linux-x86-low.o.
12363 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12364 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12365 (linux_child_pid_to_exec_file): New function.
12366 (elf_64_header_p, elf_64_file_p): New functions.
12367 (siginfo_fixup): New function.
12368 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12369 give target a chance to convert layout.
12370 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12371 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12372
fdeb2a12
DE
123732009-05-07 Doug Evans <dje@google.com>
12374
12375 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12376 (regsets_store_inferior_registers): Ditto.
12377
a6dbe5df
PA
123782009-05-06 Pedro Alves <pedro@codesourcery.com>
12379
12380 PR server/10048
12381
12382 * linux-low.c (must_set_ptrace_flags): Delete.
12383 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12384 of the global.
12385 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12386 `lwp->must_set_ptrace_flags' instead.
ba42693b 12387 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12388 (linux_wait_1): ... not here.
12389
5091eb23
DE
123902009-04-30 Doug Evans <dje@google.com>
12391
9f767825
DE
12392 * inferiors.c (started_inferior_callback): New function.
12393 (attached_inferior_callback): New function.
12394 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12395 * server.c (print_started_pid, print_attached_pid): New functions.
12396 (detach_or_kill_for_exit): New function.
12397 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12398 * server.h (have_started_inferiors_p): Declare.
12399 (have_attached_inferiors_p): Declare.
12400
5091eb23
DE
12401 * inferiors.c (remove_process): Fix memory leak, free process.
12402 * linux-low.c (linux_remove_process): New function.
12403 (linux_kill): Call it instead of remove_process.
12404 (linux_detach, linux_wait_1): Ditto.
12405
155c8968
PA
124062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12407
12408 * configure.srv: Add x86 Windows CE target.
12409
7fe519cb
UW
124102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12411
12412 * inferiors.c (get_thread_process): Make global.
12413 * server.h (get_thread_process): Add prototype.
12414 * thread-db.c (find_one_thread): Use get_thread_process
12415 instead of current_process.
12416 (thread_db_get_tls_address): Do not crash if called when
12417 thread layer is not yet initialized.
12418
5472f405
UW
124192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12420
12421 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12422 * spu-low.c (current_tid): Rename to ...
12423 (current_ptid): ... this.
12424 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12425 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12426 ptid_get_lwp (current_ptid) instead of current_tid.
12427 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12428 instead of current_tid. Use find_process_pid to verify pid
12429 argument is valid. Pass proper argument to remove_process.
12430 (spu_thread_alive): Compare current_ptid instead of current_tid.
12431 (spu_resume): Likewise.
12432
55ac2b99
PA
124332009-04-02 Pedro Alves <pedro@codesourcery.com>
12434
12435 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12436 variable.
12437
95954743
PA
124382009-04-01 Pedro Alves <pedro@codesourcery.com>
12439
12440 Implement the multiprocess extensions, and add linux multiprocess
12441 support.
12442
12443 * server.h (ULONGEST): Declare.
12444 (struct ptid, ptid_t): New.
12445 (minus_one_ptid, null_ptid): Declare.
12446 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12447 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12448 (struct inferior_list_entry): Change `id' type from unsigned from
12449 to ptid_t.
12450 (struct sym_cache, struct breakpoint, struct
12451 process_info_private): Forward declare.
12452 (struct process_info): Declare.
12453 (current_process): Declare.
12454 (all_processes): Declare.
12455 (initialize_inferiors): Declare.
12456 (add_thread): Adjust to use ptid_t.
12457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12458 (add_process, remove_process, find_thread_pid): Declare.
12459 (find_inferior_id): Adjust to use ptid_t.
12460 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12461 (multi_process): Declare.
12462 (push_event): Adjust to use ptid_t.
12463 (read_ptid, write_ptid): Declare.
12464 (prepare_resume_reply): Adjust to use ptid_t.
12465 (clear_symbol_cache): Declare.
12466 * inferiors.c (all_processes): New.
12467 (null_ptid, minus_one_ptid): New.
12468 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12469 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12470 (add_thread): Change unsigned long to ptid. Remove gdb_id
12471 parameter. Adjust.
12472 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12473 (gdb_id_to_thread): Rename to ...
12474 (find_thread_pid): ... this. Change unsigned long to ptid.
12475 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12476 (loaded_dll, pull_pid_from_list): Adjust.
12477 (add_process, remove_process, find_process_pid)
12478 (get_thread_process, current_process, initialize_inferiors): New.
12479 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12480 (struct target_waitstatus) <related_pid>: Ditto.
12481 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12482 return type to int.
12483 (struct target_ops) <join>: Add `pid' argument.
12484 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12485 (struct target_ops) <wait>: Add `ptid' field. Change return type
12486 to ptid.
12487 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12488 (mywait): Add `ptid' argument. Change return type to ptid_t.
12489 (target_pid_to_str): Declare.
12490 * target.c (set_desired_inferior): Adjust to use ptids.
12491 (mywait): Add new `ptid' argument. Adjust.
12492 (target_pid_to_str): New.
12493 * mem-break.h (free_all_breakpoints): Declare.
12494 * mem-break.c (breakpoints): Delelete.
12495 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12496 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12497 to use per-process breakpoint list.
12498 (free_all_breakpoints): New.
12499 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12500 (symbol_cache, all_symbols_looked_up): Delete.
12501 (hexchars): New.
12502 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12503 read_ptid): New.
12504 (prepare_resume_reply): Change ptid argument's type from unsigned
12505 long to ptid_t. Adjust. Implement W;process and X;process.
12506 (free_sym_cache, clear_symbol_cache): New.
12507 (look_up_one_symbol): Adjust to per-process symbol cache. *
12508 * server.c (cont_thread, general_thread, step_thread): Change type
12509 to ptid_t.
12510 (attached): Delete.
12511 (multi_process): New.
12512 (last_ptid): Change type to ptid_t.
12513 (struct vstop_notif) <ptid>: Change type to ptid_t.
12514 (queue_stop_reply, push_event): Change `ptid' argument's type to
12515 ptid_t.
12516 (discard_queued_stop_replies): Add `pid' argument.
12517 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12518 changes. Don't reference the `attached' global.
12519 (attach_inferior): Adjust to mywait interface changes.
12520 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12521 features. Handle and report "multiprocess+". Handle
12522 "qAttached:PID".
12523 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12524 changes.
12525 (handle_v_kill): New.
12526 (handle_v_stopped): Adjust to use target_pid_to_str.
12527 (handle_v_requests): Allow multiple attaches and runs when
12528 multiprocess extensions are in effect. Handle "vKill".
12529 (myresume): Adjust to use ptids.
12530 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12531 (handle_status): Adjust to discard_queued_stop_replies interface
12532 change.
12533 (first_thread_of, kill_inferior_callback)
12534 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12535 (main): Call initialize_inferiors. Adjust to use ptids, killing
12536 and detaching from all inferiors. Handle multiprocess packet
12537 variants.
12538 * linux-low.h: Include gdb_proc_service.h.
12539 (struct process_info_private): New.
12540 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12541 <lwpid_of>: Use ptid_get_lwp.
12542 (get_lwp_thread): Adjust.
12543 (struct lwp_info): Add `dead' member.
12544 (find_lwp_pid): Declare.
12545 * linux-low.c (thread_db_active): Delete.
12546 (new_inferior): Adjust comment.
12547 (inferior_pid): Delete.
12548 (linux_add_process): New.
12549 (handle_extended_wait): Adjust.
12550 (add_lwp): Change unsigned long to ptid.
12551 (linux_create_inferior): Add process to processes table. Adjust
12552 to use ptids. Don't set new_inferior here.
12553 (linux_attach_lwp): Rename to ...
12554 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12555 it. Adjust to use ptids.
12556 (linux_attach_lwp): New.
12557 (linux_attach): Add process to processes table. Don't set
12558 new_inferior here.
12559 (struct counter): New.
12560 (second_thread_of_pid_p, last_thread_of_process_p): New.
12561 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12562 multiple processes.
12563 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12564 processes. Remove process from process table.
12565 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12566 to multiple processes.
12567 (any_thread_of): New.
12568 (linux_detach): Add `pid' argument, and handle it. Remove process
12569 from processes table.
12570 (linux_join): Add `pid' argument. Handle it.
12571 (linux_thread_alive): Change unsighed long argument to ptid_t.
12572 Consider dead lwps as not being alive.
12573 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12574 threads we're not interested in.
12575 (same_lwp, find_lwp_pid): New.
12576 (linux_wait_for_lwp): Change `pid' argument's type from int to
12577 ptid_t. Adjust.
12578 (linux_wait_for_event): Rename to ...
12579 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12580 from int to ptid_t. Adjust.
12581 (linux_wait_for_event): New.
12582 (linux_wait_1): Add `ptid' argument. Change return type to
12583 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12584 that exit from the process table.
12585 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12586 Adjust.
12587 (mark_lwp_dead): New.
12588 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12589 stopping all threads, mark its main lwp as dead.
12590 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12591 ptids.
12592 (fetch_register, usr_store_inferior_registers)
12593 (regsets_fetch_inferior_registers)
12594 (regsets_store_inferior_registers, linux_read_memory)
12595 (linux_write_memory): Inline `inferior_pid'.
12596 (linux_look_up_symbols): Adjust to use per-process
12597 `thread_db_active'.
12598 (linux_request_interrupt): Adjust to use ptids.
12599 (linux_read_auxv): Inline `inferior_pid'.
12600 (initialize_low): Don't reference thread_db_active.
12601 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12602 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12603 (ps_getpid): Return the pid of the current inferior.
12604 * thread-db.c (proc_handle, thread_agent): Delete.
12605 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12606 per-process data.
12607 (find_one_thread): Change argument type to ptid_t. Adjust to
12608 per-process data.
12609 (maybe_attach_thread): Adjust to per-process data and ptids.
12610 (thread_db_find_new_threads): Ditto.
12611 (thread_db_init): Ditto.
12612 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12613 processes table. Adjust to use ptids.
12614 (spu_kill, spu_detach): Adjust interface. Remove process from
12615 processes table.
12616 (spu_join, spu_thread_alive): Adjust interface.
12617 (spu_wait): Adjust interface. Remove process from processes
12618 table. Adjust to use ptids.
12619 * win32-low.c (current_inferior_tid): Delete.
12620 (current_inferior_ptid): New.
12621 (debug_event_ptid): New.
12622 (thread_rec): Take a ptid. Adjust.
12623 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12624 (child_delete_thread): Ditto.
12625 (do_initial_child_stuff): Add `attached' argument. Add process to
12626 processes table.
12627 (child_fetch_inferior_registers, child_store_inferior_registers):
12628 Adjust.
12629 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12630 (win32_attach): Pass 1 to do_initial_child_stuff.
12631 (win32_kill): Adjust interface. Remove process from processes
12632 table.
12633 (win32_detach): Ditto.
12634 (win32_join): Adjust interface.
12635 (win32_thread_alive): Take a ptid.
12636 (win32_resume): Adjust to use ptids.
12637 (get_child_debug_event): Ditto.
12638 (win32_wait): Adjust interface. Remove exiting process from
12639 processes table.
12640
bd99dc85
PA
126412009-04-01 Pedro Alves <pedro@codesourcery.com>
12642
12643 Non-stop mode support.
12644
12645 * server.h (non_stop): Declare.
12646 (gdb_client_data, handler_func): Declare.
12647 (delete_file_handler, add_file_handler, start_event_loop):
12648 Declare.
12649 (handle_serial_event, handle_target_event, push_event)
12650 (putpkt_notif): Declare.
12651 * target.h (enum resume_kind): New.
12652 (struct thread_resume): Replace `step' field by `kind' field.
12653 (TARGET_WNOHANG): Define.
12654 (struct target_ops) <wait>: Add `options' argument.
12655 <supports_non_stop, async, start_non_stop>: New fields.
12656 (target_supports_non_stop, target_async): New.
12657 (start_non_stop): Declare.
12658 (mywait): Add `options' argument.
12659 * target.c (mywait): Add `options' argument. Print child exit
12660 notifications here.
12661 (start_non_stop): New.
12662 * server.c (non_stop, own_buf, mem_buf): New globals.
12663 (struct vstop_notif): New.
12664 (notif_queue): New global.
12665 (queue_stop_reply, push_event, discard_queued_stop_replies)
12666 (send_next_stop_reply): New.
12667 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12668 interface changes.
12669 (attach_inferior): In non-stop mode, don't wait for the target
12670 here.
12671 (handle_general_set): Handle QNonStop.
12672 (handle_query): When handling qC, return the current general
12673 thread, instead of the first thread of the list.
12674 (handle_query): If the backend supports non-stop mode, include
12675 QNonStop+ in the qSupported query response.
12676 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12677 and non-stop mode.
12678 (handle_v_attach, handle_v_run): Handle non-stop mode.
12679 (handle_v_stopped): New.
12680 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12681 (myresume): Adjust to use resume_kind. Handle non-stop.
12682 (queue_stop_reply_callback): New.
12683 (handle_status): Handle non-stop mode.
12684 (main): Clear non_stop flag on reconnection. Use the event-loop.
12685 Refactor serial protocol handling from here ...
12686 (process_serial_event): ... to this new function. When GDB
12687 selects any thread, select one here. In non-stop mode, wait until
12688 GDB acks all pending events before exiting.
12689 (handle_serial_event, handle_target_event): New.
12690 * remote-utils.c (remote_open): Install remote_desc in the event
12691 loop.
12692 (remote_close): Remove remote_desc from the event loop.
12693 (putpkt_binary): Rename to...
12694 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12695 (putpkt_binary): New as wrapper around putpkt_binary_1.
12696 (putpkt_notif): New.
12697 (prepare_resume_reply): In non-stop mode, don't change the
12698 general_thread.
12699 * event-loop.c: New.
12700 * Makefile.in (OBJ): Add event-loop.o.
12701 (event-loop.o): New rule.
12702
12703 * linux-low.h (pid_of): Moved here.
12704 (lwpid_of): New.
12705 (get_lwp_thread): Use lwpid_of.
12706 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12707 * linux-low.c (pid_of): Delete.
12708 (inferior_pid): Use lwpid_of.
12709 (linux_event_pipe): New.
12710 (target_is_async_p): New.
12711 (delete_lwp): New.
12712 (handle_extended_wait): Use lwpid_of.
12713 (add_lwp): Don't set lwpid field.
12714 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12715 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12716 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12717 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12718 first. Adjust to linux_wait_for_event interface changes. Use
12719 lwpid_of.
12720 (linux_detach): Don't delete the main lwp here.
12721 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12722 (status_pending_p): Don't consider explicitly suspended lwps.
12723 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12724 pointer. Add OPTIONS argument. Change return type to int. Use
12725 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12726 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12727 pointer. Add status pointer argument. Return a pid instead of a
12728 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12729 changes. In non-stop mode, don't switch to a random thread.
12730 (linux_wait): Rename to...
12731 (linux_wait_1): ... this. Add target_options argument, and handle
12732 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12733 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12734 clean exit and signal exit code. Don't stop all threads in
12735 non-stop mode. In all-stop mode, only stop all threads when
12736 reporting a stop to GDB. Handle explicit thread stop requests.
12737 (async_file_flush, async_file_mark): New.
12738 (linux_wait): New.
12739 (send_sigstop): Use lwpid_of.
12740 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12741 interface changes. In non-stop mode, don't switch to a random
12742 thread.
12743 (linux_resume_one_lwp): Use lwpid_of.
12744 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12745 (linux_resume_one_thread): ... this. Handle resume_stop. In
12746 non-stop mode, don't look for pending flag in all threads.
12747 (resume_status_pending_p): Don't consider explicitly suspended
12748 threads.
12749 (my_waitpid): Reimplement. Emulate __WALL.
12750 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12751 Use lwpid_of.
12752 (sigchld_handler, linux_supports_non_stop, linux_async)
12753 (linux_start_non_stop): New.
12754 (linux_target_ops): Register linux_supports_non_stop, linux_async
12755 and linux_start_non_stop.
12756 (initialize_low): Install SIGCHLD handler.
12757 * thread-db.c (thread_db_create_event, find_one_thread)
12758 (thread_db_get_tls_address): Use lwpid_of.
12759 * win32-low.c (win32_detach): Adjust to use resume_kind.
12760 (win32_wait): Add `options' argument.
12761 * spu-low.c (spu_resume): Adjust to use resume_kind.
12762 (spu_wait): Add `options' argument.
12763
5b1c542e
PA
127642009-04-01 Pedro Alves <pedro@codesourcery.com>
12765
12766 Decouple target code from remote protocol.
12767
12768 * target.h (enum target_waitkind): New.
12769 (struct target_waitstatus): New.
12770 (struct target_ops) <wait>: Return an unsigned long. Take a
12771 target_waitstatus pointer instead of a char pointer.
12772 (mywait): Likewise.
12773 * target.c (mywait): Change prototype to return an unsigned long.
12774 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12775 * server.h (thread_from_wait, old_thread_from_wait): Delete
12776 declarations.
12777 (prepare_resume_reply): Change prototype to take a
12778 target_waitstatus.
12779 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12780 (last_status, last_ptid): New.
12781 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12782 pid instead of a signal.
12783 (attach_inferior): Remove "status" and "signal" parameters.
12784 Adjust.
12785 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12786 not as an address.
12787 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12788 (handle_v_requests, myresume): Remove "status" and "signal"
12789 parameters. Adjust.
12790 (handle_status): New.
12791 (main): Delete local `status'. Adjust.
12792 * remote-utils.c: Include target.h.
12793 (prepare_resume_reply): Change prototype to take a
12794 target_waitstatus. Adjust.
12795
12796 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12797 interface.
12798 * spu-low.c (spu_wait): Adjust.
12799 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12800 Delete.
12801 (win32_wait): Adjust.
12802
2bd7c093
PA
128032009-04-01 Pedro Alves <pedro@codesourcery.com>
12804
12805 * target.h (struct thread_resume): Delete leave_stopped member.
12806 (struct target_ops): Add a `n' argument to the `resume' callback.
12807 * server.c (start_inferior): Adjust.
12808 (handle_v_cont, myresume): Adjust.
12809 * linux-low.c (check_removed_breakpoint): Adjust to resume
12810 interface change, and to removed leave_stopped field.
12811 (resume_ptr): Delete.
12812 (struct thread_resume_array): New.
12813 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12814 resume interface change.
12815 (linux_continue_one_thread, linux_queue_one_thread)
12816 (resume_status_pending_p): Check if the resume field is NULL
12817 instead of checking the leave_stopped member.
12818 (linux_resume): Adjust to the target resume interface change.
12819 * spu-low.c (spu_resume): Adjust to the target resume interface
12820 change.
12821 * win32-low.c (win32_detach, win32_resume): Ditto.
12822
c35fafde
PA
128232009-04-01 Pedro Alves <pedro@codesourcery.com>
12824
12825 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12826 flag.
12827 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12828 pending.
12829 (linux_continue_one_thread): Only preserve the stepping flag if
12830 there's a pending breakpoint.
12831
0a59d50b
PA
128322009-03-31 Pedro Alves <pedro@codesourcery.com>
12833
12834 * server.c (main): After the inferior having exited, call
12835 remote_close before exiting gdbserver.
12836
f04c6d38
TJB
128372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12838
12839 Fix size of FPSCR in Power 7 processors.
12840 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12841 (PPC_FEATURE_HAS_DFP): New #define.
12842 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12843 size of the FPSCR.
12844
78e5cee6
PA
128452009-03-23 Pedro Alves <pedro@codesourcery.com>
12846
12847 * server.c (handle_query) Whitespace and formatting.
12848
1b3f6016
PA
128492009-03-22 Pedro Alves <pedro@codesourcery.com>
12850
12851 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12852 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12853 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12854 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12855 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12856 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12857 Makefile.in, configure.ac: Fix whitespace throughout.
12858 * configure: Regenerate.
12859
a07b2135
PA
128602009-03-22 Pedro Alves <pedro@codesourcery.com>
12861
12862 * inferiors.c (find_inferior): Make it safe for the callback
12863 function to delete the currently iterated inferior.
12864
67cc2626
PA
128652009-03-22 Pedro Alves <pedro@codesourcery.com>
12866
12867 * Makefile.in (linuw_low_h): Move higher.
12868 (thread-db.o): Depend on $(linux_low_h).
12869
54a0b537
PA
128702009-03-17 Pedro Alves <pedro@codesourcery.com>
12871
12872 Rename "process" to "lwp" throughout.
12873
12874 * linux-low.c (all_processes): Rename to...
12875 (all_lwps): ... this.
12876 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12877 (add_process): Rename to ...
12878 (add_lwp): ... this. Adjust.
12879 (linux_create_inferior): Adjust.
12880 (linux_attach_lwp): Adjust.
12881 (linux_attach): Adjust.
12882 (linux_kill_one_process): Rename to ...
12883 (linux_kill_one_lwp): ... this. Adjust.
12884 (linux_kill): Adjust.
12885 (linux_detach_one_process): Rename to ...
12886 (linux_detach_one_lwp): ... this. Adjust.
12887 (linux_detach): Adjust.
12888 (check_removed_breakpoint): Adjust.
12889 (status_pending_p): Adjust.
12890 (linux_wait_for_process): Rename to ...
12891 (linux_wait_for_lwp): ... this. Adjust.
12892 (linux_wait_for_event): Adjust.
12893 (send_sigstop): Adjust.
12894 (wait_for_sigstop): Adjust.
12895 (stop_all_processes): Rename to ...
12896 (stop_all_lwps): ... this.
12897 (linux_resume_one_process): Rename to ...
12898 (linux_resume_one_lwp): ... this. Adjust.
12899 (linux_set_resume_request, linux_continue_one_thread)
12900 (linux_queue_one_thread, resume_status_pending_p)
12901 (usr_store_inferior_registers, regsets_store_inferior_registers)
12902 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12903 Adjust.
12904 * linux-low.h (get_process): Rename to ...
12905 (get_lwp): ... this. Adjust.
12906 (get_thread_process): Rename to ...
12907 (get_thread_lwp): ... this. Adjust.
12908 (get_process_thread): Rename to ...
12909 (get_lwp_thread): ... this. Adjust.
12910 (struct process_info): Rename to ...
12911 (struct lwp_info): ... this.
12912 (all_processes): Rename to ...
12913 (all_lwps): ... this.
12914 * proc-service.c (ps_lgetregs): Adjust.
12915 * thread-db.c (thread_db_create_event, find_one_thread)
12916 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12917
0b16c5cf
PA
129182009-03-14 Pedro Alves <pedro@codesourcery.com>
12919
12920 * server.c (handle_query): Handle "qAttached".
12921
32de4b9d
NS
129222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12923
12924 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12925 GPLv3, update license URL.
12926
2aecd87f
DE
129272009-03-01 Doug Evans <dje@google.com>
12928
93efd302 12929 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12930 (server_h): Add gdb_signals.h.
12931 (signals.o): Update.
12932 * server.h (target_signal_from_host,target_signal_to_host_p)
12933 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12934
86b1f9c5
PM
129352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12936
12937 * remote-utils.c (getpkt): Also generate remote-debug
12938 information if noack_mode is set.
12939
4aa995e1
PA
129402009-02-06 Pedro Alves <pedro@codesourcery.com>
12941
12942 * server.c (handle_query): Report qXfer:siginfo:read and
12943 qXfer:siginfo:write as supported and handle them.
12944 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12945 * linux-low.c (linux_xfer_siginfo): New.
12946 (linux_target_ops): Set it.
12947
62709adf
PA
129482009-01-26 Pedro Alves <pedro@codesourcery.com>
12949
12950 * server.c (gdbserver_usage): Mention --remote-debug.
12951 (main): Accept '--remote-debug' switch.
12952
aef93bd7
DE
129532009-01-18 Doug Evans <dje@google.com>
12954
12955 * regcache.c (new_register_cache): No need to check result of xcalloc.
12956 * server.c (handle_search_memory): Back out calls to xmalloc,
12957 result is checked and error is returned to user upon failure.
12958 (handle_query): Ditto. Add more checks for result of malloc.
12959 (handle_v_cont): Check result of malloc, report error back to
12960 user upon failure.
12961 (handle_v_run): Ditto. Call freeargv.
12962 * server.h (freeargv): Declare.
12963 * utils.c (freeargv): New fn.
12964
54363045
DE
129652009-01-15 Doug Evans <dje@google.com>
12966
f626972c
DE
12967 * gdbreplay.c (perror_with_name): Make arg const char *.
12968 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12969 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12970 * utils.c (perror_with_name): Make arg const char *.
54363045 12971
18aae699
PA
129722009-01-14 Pedro Alves <pedro@codesourcery.com>
12973
12974 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12975 when handling a EXIT_PROCESS_DEBUG_EVENT.
12976
ff703abe
JB
129772009-01-06 Joel Brobecker <brobecker@adacore.com>
12978
12979 * gdbreplay.c (gdbreplay_version): Update copyright year.
12980 * server.c (gdbserver_version): Likewise.
12981
f21cc1a2 129822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12983
12984 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12985 (handle_extended_wait): Improve comment.
0e21c1ec 12986
bca929d3
DE
129872008-12-13 Doug Evans <dje@google.com>
12988
12989 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12990 * server.h (ATTR_MALLOC): New macro.
12991 (xmalloc,xcalloc,xstrdup): Declare.
12992 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12993 * inferiors.c: Ditto.
12994 * linux-low.c: Ditto.
12995 * mem-break.c: Ditto.
12996 * regcache.c: Ditto.
12997 * remote-utils.c: Ditto.
12998 * server.c: Ditto.
12999 * target.c: Ditto.
13000 * win32-low.c: Ditto.
13001
97438e3f
DE
130022008-12-12 Doug Evans <dje@google.com>
13003
896c7fbb
DE
13004 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13005 in debugging printf.
13006
97438e3f
DE
13007 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13008
e3b886f8
DE
130092008-12-09 Doug Evans <dje@google.com>
13010
13011 * linux-low.h (struct process_info): Delete member tid, unused.
13012 * thread-db.c (find_one_thread): Update.
13013 (maybe_attach_thread): Update.
13014
07e059b5
VP
130152008-12-02 Pedro Alves <pedro@codesourcery.com>
13016
889bf7c5
PA
13017 * target.h (struct target_ops): Add qxfer_osdata member.
13018 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13019 and dirent.h.
13020 (linux_qxfer_osdata): New functions.
13021 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13022 callback.
13023 * server.c (handle_query): Handle "qXfer:osdata:read:".
13024 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13025 (buffer_xml_printf): New functions.
13026 * server.h (struct buffer): New.
13027 (buffer_grow_str, buffer_grow_str0): New macros.
13028 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13029 (buffer_xml_printf): Declare.
07e059b5 13030
4cab47ab
DE
130312008-11-24 Doug Evans <dje@google.com>
13032
13033 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13034
f142445f
DJ
130352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13036
13037 * server.c (handle_v_run): Always use the supplied argument list.
13038
d0107bb6 130392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13040
d0107bb6
BW
13041 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13042 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13043
2c4ad781
TJB
130442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13045
13046 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13047 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13048 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13049 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13050 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13051 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13052 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13053 XML target descriptions.
13054 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13055 when inferior is running on an ISA 2.05 or later processor. Add
13056 special case to return offset for full 64-bit slot of FPSCR when
13057 in 32-bits.
13058
dfb64f85
DJ
130592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13060
13061 * Makefile.in (SFILES, clean): Added sparc64 files.
13062 (reg-sparc64.o, reg-sparc64.c): New.
13063 * configure.srv (sparc*-*-linux*): New configuration.
13064 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13065 syscall arguments for SPARC.
13066 (regsets_store_inferior_registers): Likewise.
13067 * linux-sparc-low.c: New file.
13068
66b6e1dd
DE
130692008-10-21 Doug Evans <dje@google.com>
13070
13071 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13072 (READLINE_DIR,READLINE_DEP): Delete.
13073 (INTERNAL_CFLAGS): Update.
13074 (LINTFLAGS): Update.
13075
9b710a42
PA
130762008-10-10 Pedro Alves <pedro@codesourcery.com>
13077
13078 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13079 whole argv from the last run, not just argv[0].
13080
5822d809
PA
130812008-09-08 Pedro Alves <pedro@codesourcery.com>
13082
13083 * regcache.c (new_register_cache): Return NULL if the register
13084 cache size isn't known yet.
13085 (free_register_cache): Avoid dereferencing a NULL regcache.
13086
74aac56f
DJ
130872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13088
13089 * configure.srv: Merge MIPS and MIPS64.
13090
400b20f5
MR
130912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13092
13093 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13094
677c5bb1
LM
130952008-08-18 Luis Machado <luisgpm@br.ibm.com>
13096
13097 * Makefile.in: Add required vsx dependencies.
13098
13099 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13100 Declare init_registers_powerpc_vsx32l.
13101 Declare init_registers_powerpc_vsx64l.
13102 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13103 (ppc_arch_setup): Check for VSX in hwcap.
13104 (ppc_fill_vsxregset): New function.
13105 (ppc_store_vsxregset): New function.
13106 Add new VSX entry in regset_info target_regsets.
13107
13108 * configure.srv: Add new VSX dependencies.
13109
a6f3e723
SL
131102008-08-12 Pedro Alves <pedro@codesourcery.com>
13111
13112 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13113 (remote_open): Set or clear transport_is_reliable.
13114 (putpkt_binary): Don't expect acks in noack mode.
13115 (getpkt): Don't send ack/nac in noack mode.
13116 * server.c (handle_general_set): Handle QStartNoAckMode.
13117 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13118 qSupported.
13119 (main): Reset noack_mode on every connection.
13120 * server.h (noack_mode): Declare.
13121
a417dc56
RW
131222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13123
13124 * Makefile.in (GDBREPLAY_OBS): New variable.
13125 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13126
3221518c
UW
131272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13128 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13131 (usr_store_inferior_registers): Likewise.
13132 (regsets_store_inferior_registers): Likewise.
13133
ec56be1b
PA
131342008-07-31 Rolf Jansen <rj@surtec.com>
13135 Pedro Alves <pedro@codesourcery.com>
13136
13137 * configure.ac: Check for memmem declaration.
13138 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13139 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13140 (disable_packet_qfThreadInfo): Unconditionally compile.
13141 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13142 * configure, config.in: Regenerate.
13143
2fe5e3ff
DE
131442008-07-28 Doug Kwan <dougkwan@google.com>
13145
13146 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13147 (linux_write_memory): Remove declaration of errno.
13148
836acd6d
UW
131492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13150
13151 * linux-low.c (handle_extended_wait): Do not use "status"
13152 variable uninitialized.
13153
aeba519e
PA
131542008-07-07 Pedro Alves <pedro@codesourcery.com>
13155
13156 * server.c (handle_v_attach): Inhibit reporting dll changes.
13157
db42f210
PA
131582008-06-27 Pedro Alves <pedro@codesourcery.com>
13159
13160 * remote-utils.c (prepare_resume_reply): If requested, don't
13161 output "thread:TID" in the T stop reply.
13162
13163 * server.c (disable_packet_vCont, disable_packet_Tthread)
13164 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13165 (handle_query): If requested, disable support for qC, qfThreadInfo
13166 and qsThreadInfo.
13167 (handle_v_requests): If requested, disable support for vCont.
13168 (gdbserver_show_disableable): New.
13169 (main): Handle --disable-packet and --disable-packet=LIST.
13170
13171 * server.h (disable_packet_vCont, disable_packet_Tthread)
13172 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13173
8e4c5421
CD
131742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13175
13176 * server.c (gdbserver_usage): Mention --version.
13177
6e23a804
DJ
131782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13179
13180 * Makefile.in (gdbreplay.o): New rule.
13181
90aa6a40
JM
131822008-06-06 Joseph Myers <joseph@codesourcery.com>
13183
13184 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13185 message, not gdbserver.
13186
c16158bc 131872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13188 Nathan Sidwell <nathan@codesourcery.com>
13189 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13190
13191 * acinclude.m4: Include ../../config/acx.m4.
13192 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13193 * configure, config.in: Regenerate.
13194 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13195 * server.c (gdbserver_version): Print PKGVERSION.
13196 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13197 (main): Adjust gdbserver_usage calls.
13198 * gdbreplay.c (version, host_name): Add declarations.
13199 (gdbreplay_version, gdbreplay_usage): New.
13200 (main): Accept --version and --help options.
13201
aeb75bf5
DJ
132022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13203
13204 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13205 (arm_breakpoint_at): Handle Thumb.
13206 (the_low_target): Add comment.
13207
76b233dd
UW
132082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13209
13210 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13211
08388c79
DE
132122008-05-09 Doug Evans <dje@google.com>
13213
a3c83fae
DE
13214 * server.h (decode_search_memory_packet): Declare.
13215 * remote-utils.c (decode_search_memory_packet): New fn.
13216 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13217 (handle_search_memory): New fn.
13218 (handle_query): Process qSearch:memory packets.
13219
bb9c3d36
UW
132202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13221
13222 * regcache.c (registers_length): Remove.
13223 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13224 full register packet.
13225 * regcache.h (registers_length): Remove prototype.
13226 * server.h (PBUFSIZ): Define to 16384.
13227
7284e1be
UW
132282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13229
13230 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13231 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13232 powerpc-64l.o, and powerpc-altivec64l.o.
13233 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13234 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13235 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13236 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13237 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13238 to srv_xmlfiles.
13239
13240 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13241 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13242 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13243 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13244 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13245 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13246 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13247 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13248 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13249 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13250 (clean): Update.
13251
13252 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13253 (init_registers_powerpc_32l): ... this new prototype.
13254 (init_registers_powerpc_32): Remove, replace by ...
13255 (init_registers_powerpc_altivec32l): ... this new prototype.
13256 (init_registers_powerpc_e500): Remove, replace by ...
13257 (init_registers_powerpc_e500l): ... this new prototype.
13258 (init_registers_ppc64): Remove, replace by ...
13259 (init_registers_powerpc_64l): ... this new prototype.
13260 (init_registers_powerpc_64): Remove, replace by ...
13261 (init_registers_powerpc_altivec64l): ... this new prototype.
13262 (ppc_num_regs): Set to 73.
13263 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13264 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13265 (ppc_cannot_store_register): Handle orig_r3 and trap.
13266 (ppc_arch_setup): Update init_registers_... calls.
13267 (ppc_fill_gregset): Handle orig_r3 and trap.
13268
13269 * inferiors.c (clear_inferiors): Reset current_inferior.
13270
fdc59709
PB
132712008-04-23 Paolo Bonzini <bonzini@gnu.org>
13272
889bf7c5
PA
13273 * acinclude.m4: Add override.m4.
13274 * configure: Regenerate.
fdc59709 13275
c9b2f845
UW
132762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13277
13278 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13279 initial call to init_register_ppc64.
13280
550512b8
UW
132812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13282
43aaf8b6
PA
13283 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13284 single powerpc*-*-linux* case.
550512b8
UW
13285 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13286
b6430ec3
UW
132872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13290 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13291 from reg_xmlfiles.
13292 * linux-ppc-low.c: Include <elf.h>.
13293 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13294 (ppc_hwcap): New global variable.
13295 (ppc_regmap): Remove __SPE__ #ifdef sections.
13296 (ppc_regmap_e500): New global variable.
13297 (ppc_cannot_store_register): Update __SPE__ special case.
13298 (ppc_get_hwcap): New function.
13299 (ppc_arch_setup): Use it to determine whether inferior supports
13300 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13301 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13302 Do not access registers if target does not support AltiVec.
13303 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13304 Do not access registers if target does not support SPE.
13305 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13306
52fa2412
UW
133072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * linux-low.c (disabled_regsets, num_regsets): New.
13310 (use_regsets_p): Delete.
13311 (linux_wait_for_process): Clear disabled_regsets.
13312 (regsets_fetch_inferior_registers): Check and set it.
13313 (regsets_store_inferior_registers): Likewise.
13314 (linux_fetch_registers, linux_store_registers): Do not use
13315 use_regsets_p.
13316 (initialize_low): Allocate disabled_regsets.
13317
e28b3332
DJ
133182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13319
13320 * Makefile.in (LIBOBJS): New.
13321 (OBS): Use LIBOBJS.
13322 (memmem.o): New rule.
13323 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13324 * configure: Regenerated.
13325
4536995d
UW
133262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13327
13328 * server.c (handle_query): Never return "unsupported" for
13329 qXfer:features:read queries.
13330
221c031f
UW
133312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13332
13333 * server.c (get_features_xml): Fix inverted condition.
13334 (handle_query): Always support qXfer:feature:read.
13335
ccd213ac
DJ
133362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13337
13338 * server.c (wrapper_argv): New.
13339 (start_inferior): Handle wrapper_argv. If set, expect an extra
13340 trap.
13341 (gdbserver_usage): Document --wrapper.
13342 (main): Parse --wrapper.
13343
6fe305f7
UW
133442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13345
13346 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13347 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13348 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13349 (ppc_set_pc): Likewise.
13350 (ppc_arch_setup): New function.
13351 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13352 of collect_register.
889bf7c5 13353 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13354
5b0a002e
UW
133552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13356
13357 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13358 instead of linux-ppc64-low.o.
13359 * linux-ppc64-low.c: Remove file.
13360 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13361 (linux-ppc64-low.o): Remove rule.
13362
13363 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13364 (init_registers_powerpc_64): Likewise.
13365 (ppc_regmap): Conditionally define depending on __powerpc64__.
13366 (ppc_cannot_store_register): Do not special-case "fpscr" when
13367 compiled on __powerpc64__.
13368 (ppc_collect_ptrace_register): New function.
13369 (ppc_supply_ptrace_register): New function.
13370 (ppc_breakpoint): Change type to "unsigned int".
13371 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13372 (the_low_target): Conditionally provide initializers for the
889bf7c5 13373 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13374 collect_ptrace_register and supply_ptrace_register members.
13375
9b4b61c8
UW
133762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13377
13378 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13379 * server.c (gdbserver_xmltarget): Define.
13380 (get_features_xml): Use it to replace "target.xml" and arch_string.
13381
13382 * configure.srv: Remove srv_xmltarget. Add XML files that were
13383 mentioned there to srv_xmlfiles instead. Remove conditional tests
13384 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13385 srv_xmlfiles and srv_regobj to include all possible choices.
13386 * configure.ac (srv_xmltarget): Remove.
13387 (srv_xmlfiles): Do not add "target.xml".
13388 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13389 checks for supplementary target information.
13390 * configure: Regenerate.
13391 * Makefile.in (XML_TARGET): Remove.
13392 (target.xml): Remove rule.
13393 (clean): Do not clean up target.xml.
13394 (.PRECIOUS): Do not mention target.xml.
13395
13396 * target.h (struct target_ops): Remove arch_string member.
13397 * linux-low.c (linux_arch_string): Remove.
13398 (linux_target_ops): Remove arch_string initializer.
13399 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13400 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13401 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13402 * spu-low.c (spu_arch_string): Remove.
13403 (spu_target_ops): Remove arch_string initializer.
13404 * win32-low.c (win32_arch_string): Remove.
13405 (win32_target_ops): Remove arch_string initializer.
13406 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13407 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13408 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13409
ee1a7ae4
UW
134102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13411
13412 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13413 by collect_ptrace_register and supply_ptrace_register hooks.
13414 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13415 instead of checking for the_low_target.left_pad_xfer.
13416 (usr_store_inferior_registers): Use collect_ptrace_register callback
13417 instead of checking for the_low_target.left_pad_xfer.
13418
13419 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13420 (s390_supply_ptrace_register): Likewise.
13421 (s390_fill_gregset): Call s390_collect_ptrace_register.
13422 (the_low_target): Update.
13423
13424 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13425 (ppc_supply_ptrace_register): Likewise.
13426 (the_low_target): Update.
13427
13428 * linux-i386-low.c (the_low_target): Update.
13429 * linux-x86-64-low.c (the_low_target): Update.
13430
d61ddec4
UW
134312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13432
13433 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13434 reg-s390.o and reg-s390x.o.
13435
13436 * linux-low.c (new_inferior): New global variable.
13437 (linux_create_inferior, linux_attach): Set it.
13438 (linux_wait_for_process): Call the_low_target.arch_setup after the
13439 target has stopped for the first time.
13440 (initialize_low): Do not call the_low_target.arch_setup.
13441
13442 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13443 (s390_set_pc): Likewise.
13444 (s390_arch_setup): New function.
13445 (the_low_target): Use s390_arch_setup as arch_setup routine.
13446
13447 * regcache.c (realloc_register_cache): New function.
13448 (set_register_cache): Call it for each existing regcache.
13449
d05b4ac3
UW
134502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13451
13452 * server.h (init_registers): Remove prototype.
13453
13454 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13455 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13456 instead of init_registers ().
13457 * linux-arm-low.c (init_registers_arm): Add prototype.
13458 (init_registers_arm_with_iwmmxt): Likewise.
13459 (the_low_target): Add initializer for arch_setup field.
13460 * linux-cris-low.c (init_registers_cris): Add prototype.
13461 (the_low_target): Add initializer for arch_setup field.
13462 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13465 (the_low_target): Add initializer for arch_setup field.
13466 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13467 (the_low_target): Add initializer for arch_setup field.
13468 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13471 (the_low_target): Add initializer for arch_setup field.
13472 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13473 (init_registers_mips64_linux): Likewise.
13474 (the_low_target): Add initializer for arch_setup field.
13475 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13476 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13477 (the_low_target): Add initializer for arch_setup field.
13478 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13479 (init_registers_powerpc_64): Likewise.
13480 (the_low_target): Add initializer for arch_setup field.
13481 * linux-s390-low.c (init_registers_s390): Add prototype.
13482 (init_registers_s390x): Likewise.
13483 (the_low_target): Add initializer for arch_setup field.
13484 * linux-sh-low.c (init_registers_sh): Add prototype.
13485 (the_low_target): Add initializer for arch_setup field.
13486 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13487 (the_low_target): Add initializer for arch_setup field.
13488 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13489 (the_low_target): Add initializer for arch_setup field.
13490
13491 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13492 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13493 instead of init_registers ().
13494 * win32-arm-low.c (init_registers_arm): Add prototype.
13495 (the_low_target): Add initializer for arch_setup field.
13496 * win32-i386-low.c (init_registers_i386): Add prototype.
13497 (the_low_target): Add initializer for arch_setup field.
13498
13499 * spu-low.c (init_registers_spu): Add prototype.
13500 (initialize_low): Call initialie_registers_spu () instead of
13501 initialize_registers ().
13502
fd96d250
PA
135032008-02-19 Pedro Alves <pedro@codesourcery.com>
13504
13505 * server.c (handle_v_requests): When handling the vRun and vAttach
13506 packets, if already debugging a process, don't kill it. Return an
13507 error instead.
13508
d41b6bb4
DJ
135092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13510
13511 * server.c (handle_query): Correct length check.
13512
5ac588cf
PA
135132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13514
13515 * win32-low.c (do_initial_child_stuff): Add process handle
13516 parameter. Set current_process_handle and current_process_id from the
13517 parameters. Clear globals.
13518 (win32_create_inferior): Don't set current_process_handle and
13519 current_process_id here. Instead pass them on the call to
13520 do_initial_child_stuff.
13521 (win32_attach): Likewise.
13522 (win32_clear_inferiors): New.
13523 (win32_kill): Don't close the current process handle or the
13524 current thread handle here. Instead call win32_clear_inferiors.
13525 (win32_detach): Don't open a new handle to the process. Call
13526 win32_clear_inferiors.
13527 (win32_join): Don't rely on current_process_handle; open a new
13528 handle using the process id.
13529 (win32_wait): Call win32_clear_inferiors when the inferior process
13530 has exited.
13531
ecd7ecbc
DJ
135322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13533
13534 * server.c (monitor_show_help): Add "exit".
13535
1525d545
MG
135362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13537
ecd7ecbc 13538 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13539 (clean): Add reg-xtensa.c.
13540 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13541 * configure.srv (xtensa*-*-linux*) New target.
13542 * linux-xtensa-low.c: New.
13543 * xtensa-xtregs.c: New.
1525d545 13544
59a016f0
PA
135452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13546
13547 * hostio.c: Don't include errno.h.
13548 (errno_to_fileio_errno): Move to hostio-errno.
13549 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13550 error number outputting to the target->hostio_last_error callback.
13551 (hostio_packet_error): Use FILEIO_EINVAL directly.
13552 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13553 calls to hostio_error.
13554 * hostio-errno.c: New.
13555 * server.h (hostio_last_error_from_errno): Declare.
13556 * target.h (target_ops): Add hostio_last_error member.
13557 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13558 as hostio_last_error handler.
889bf7c5 13559 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13560 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13561 (wince_hostio_last_error): New functions.
13562 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13563 as hostio_last_error handler.
13564 (win32_target_ops) [!_WIN32_WCE]: Register
13565 hostio_last_error_from_errno as hostio_last_error handler.
13566 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13567 (hostio-errno.o): New rule.
13568 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13569 * configure.srv (srv_hostio_err_objs): New variable. Default to
13570 hostio-errno.o.
13571 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13572 * configure: Regenerate.
13573
2d717e4f
DJ
135742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13577 (linux_kill, linux_detach): Clean up the process list.
13578 * remote-utils.c (remote_open): Improve port number parsing.
13579 (putpkt_binary, input_interrupt): Only send interrupts if the target
13580 is running.
13581 * server.c (extended_protocol): Make static.
13582 (attached): Define earlier.
13583 (exit_requested, response_needed, program_argv): New variables.
13584 (target_running): New.
13585 (start_inferior): Clear attached here.
13586 (attach_inferior): Set attached here.
13587 (require_running): Define.
13588 (handle_query): Use require_running and target_running. Implement
13589 "monitor exit".
13590 (handle_v_attach, handle_v_run): New.
13591 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13592 (gdbserver_usage): Update.
13593 (main): Redo argument parsing. Handle --debug and --multi. Handle
13594 --attach along with other options or after the port. Save
13595 program_argv. Support no initial program. Resynchronize
13596 communication with GDB after an error. Handle "monitor exit".
13597 Use require_running and target_running. Always allow the extended
13598 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13599 restart in extended mode.
13600 * README: Refer to the GDB manual. Update --attach usage.
13601
7407e2de
AS
136022007-12-20 Andreas Schwab <schwab@suse.de>
13603
13604 * linux-low.c (STACK_SIZE): Define.
13605 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13606 (linux_test_for_tracefork): Likewise.
13607
b65d95c5
DJ
136082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * linux-low.c (linux_wait_for_event): Update messages. Do not
13611 reinsert auto-delete breakpoints.
13612 * mem-break.c (struct breakpoint): Change return type of handler to
13613 int.
13614 (set_breakpoint_at): Update handler type.
13615 (reinsert_breakpoint_handler): Return 1 instead of calling
13616 delete_breakpoint.
13617 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13618 setting a new one.
13619 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13620 * mem-break.h (set_breakpoint_at): Update handler type.
13621 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13622 * win32-low.c (auto_delete_breakpoint): New.
13623 (get_child_debug_event): Use it.
13624
4e799345
DJ
136252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13626
13627 * configure.ac: Check for pread and pwrite.
13628 * hostio.c (handle_pread): Fall back to lseek and read.
13629 (handle_pwrite): Fall back to lseek and write.
13630 * config.in, configure: Regenerated.
13631
27524b67
DJ
136322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * server.c (myresume): Add own_buf argument.
13635 (main): Update calls.
13636
a20d5e98
DJ
136372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13638
13639 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13640 * remote-utils.c (remote_open): Do not call disable_async_io.
13641 (block_async_io): Delete.
13642 (unblock_async_io): Make static.
13643 (initialize_async_io): New.
13644 * server.c (handle_v_cont): Handle async I/O here.
13645 (myresume): Likewise. Move other common resume tasks here...
13646 (main): ... from here. Call initialize_async_io. Disable async
13647 I/O before the main loop.
13648 * server.h (initialize_async_io): Declare.
13649 (block_async_io, unblock_async_io): Delete prototypes.
13650 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13651
b79d787e
DJ
136522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13653
13654 * remote-utils.c (readchar): Allow binary data in received messages.
13655
d97903b2
PA
136562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13657
13658 * win32-low.c (attaching): New global.
13659 (win32_create_inferior): Clear the `attaching' global.
13660 (win32_attach): Set the `attaching' global.
13661 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13662 attaching. Only set a breakpoint at the entry point if not
13663 attaching.
13664
311de423
PA
136652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13666
13667 * server.c (main): Don't report dll events on the initial
13668 connection on attaches.
13669
6c2d16d2
PA
136702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13671
13672 * server.c (main): Relax numerical bases supported for the pid of
13673 the --attach command line argument.
13674
5ca906e6
PA
136752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13676
13677 * win32-low.c (win32_attach): Call OpenProcess before
13678 DebugActiveProcess, not after. Add last error output to error
13679 call.
13680
9c6c8194
PA
136812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13682
13683 * win32-low.c (win32_get_thread_context)
13684 (win32_set_thread_context): New functions.
13685 (thread_rec): Use win32_get_thread_context.
13686 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13687 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13688 field.
13689
4d5d1aaa
PA
136902007-12-03 Leo Zayas
13691 Pedro Alves <pedro_alves@portugalmail.pt>
13692
13693 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13694 global variables.
13695 (child_add_thread): Minor cleanup.
13696 (child_continue): Resume artificially suspended threads before
13697 calling ContinueDebugEvent.
13698 (suspend_one_thread): New.
13699 (fake_breakpoint_event): New.
13700 (get_child_debug_event): Change return type to int. Check here if
13701 gdb sent an interrupt request. If a soft interrupt was requested,
13702 fake a breakpoint event. Return 0 if there is no event to handle,
13703 and 1 otherwise.
13704 (win32_wait): Don't check here if gdb sent an interrupt request.
13705 Ensure there is a valid event to handle.
13706 (win32_request_interrupt): Add soft interruption method as last
13707 resort.
13708
c436e841
PA
137092007-12-03 Leo Zayas
13710 Pedro Alves <pedro_alves@portugalmail.pt>
13711
13712 * win32-low.h (win32_thread_info): Add descriptions to the
13713 structure members. Replace `suspend_count' counter by a
13714 `suspended' flag.
13715 * win32-low.c (thread_rec): Update condition of when to get the
13716 context from the inferior. Rely on ContextFlags being set if it
13717 has already been retrieved. Only suspend the inferior thread if
13718 we haven't already. Warn if that fails.
13719 (continue_one_thread): s/suspend_count/suspended/. Only call
13720 ResumeThread once. Warn if that fails.
13721
e7b5fa67
PA
137222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13723
13724 * win32-low.c (win32_wait): Don't read from the inferior when it
13725 has already exited.
13726
a385171d
PA
137272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13728
13729 * Makefile.in (win32_low_h): New variable.
13730 (win32-low.o): Add dependency on $(win32_low_h).
13731 (win32-arm-low.o, win32-i386-low.o): New rules.
13732
f80c84b3
DJ
137332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13734
13735 * hostio.c: Correct copyright year.
13736
a6b151f1
DJ
137372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * Makefile.in (OBS): Add hostio.o.
13740 (hostio.o): New rule.
13741 * server.h (handle_vFile): Declare.
13742 * hostio.c: New file.
13743 * server.c (handle_v_requests): Take packet_len and new_packet_len
13744 for binary packets. Call handle_vFile.
13745 (main): Update call to handle_v_requests.
13746
f9387fc3
DJ
137472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * linux-low.c: Include <sched.h>.
13750
51c2684e
DJ
137512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * linux-low.c (linux_tracefork_grandchild): New.
13754 (linux_tracefork_child): Use clone.
13755 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13756
75f83163
JB
137572007-10-31 Joel Brobecker <brobecker@adacore.com>
13758
13759 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13760
da5898ce
DJ
137612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13764
24a09b5f
DJ
137652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * inferiors.c (change_inferior_id): Delete.
13768 (add_pid_to_list, pull_pid_from_list): New.
13769 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13770 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13771 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13772 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13773 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13774 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13775 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13776 (using_threads): Always set to 1.
13777 (handle_extended_wait): New.
13778 (add_process): Do not set TID.
13779 (linux_create_inferior): Set must_set_ptrace_flags.
13780 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13781 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13782 (linux_thread_alive): Rename TID argument to LWPID.
13783 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13784 (linux_wait_for_event): Do not use TID or check using_threads. Update
13785 call to dead_thread_notify. Call handle_extended_wait.
13786 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13787 (send_sigstop): Delete sigstop_sent.
13788 (wait_for_sigstop): Avoid TID.
13789 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13790 (linux_test_for_tracefork): New.
13791 (linux_lookup_signals): Use thread_db_active and
13792 linux_supports_tracefork_flag.
13793 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13794 * linux-low.h (get_process_thread): Avoid TID.
13795 (struct process_ifo): Move thread_known and tid to the end. Remove
13796 sigstop_sent.
13797 (linux_attach_lwp, thread_db_init): Update prototypes.
13798 * server.h (change_inferior_id): Delete prototype.
13799 (add_pid_to_list, pull_pid_from_list): New prototypes.
13800 * thread-db.c (thread_db_use_events): New.
13801 (find_first_thread): Rename to...
13802 (find_one_thread): ...this. Update callers and messages. Do not
13803 call fatal. Check thread_db_use_events. Do not call
13804 change_inferior_id or new_thread_notify.
13805 (maybe_attach_thread): Update. Do not call new_thread_notify.
13806 (thread_db_init): Set thread_db_use_events. Check use_events.
13807 * utils.c (fatal, warning): Correct message prefix.
13808
30ed0a8f
DJ
138092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * Makefile.in (clean): Remove new files.
13812 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13813 (powerpc-64.o, powerpc-64.c): New rules.
13814 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13815 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13816 with SPE.
13817 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13818 SPE targets.
13819 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13820 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13821 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13822 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13823 (target_regsets): Add AltiVec and SPE register sets.
13824 * configure.ac: Check for AltiVec and SPE.
13825 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13826 (ppc_fill_vrregset, ppc_store_vrregset): New.
13827 (target_regsets): Add AltiVec register set.
13828 * configure: Regenerated.
13829
fd462a61
DJ
138302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13831
13832 * linux-low.c (O_LARGEFILE): Define.
13833 (linux_read_memory): Use /proc/PID/mem.
13834 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13835 * configure, config.in: Regenerated.
13836
69f223ed
DJ
138372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * linux-low.c (linux_wait_for_event): Do not pass signals while
13840 single-stepping.
13841
aec18585
PA
138422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13843
13844 * win32-low.c (create_process): New.
13845 (win32_create_inferior): Use create_process instead of
13846 CreateProcess. If create_process failed retry appending an ".exe"
13847 suffix. Store the GetLastError result immediatelly after
13848 create_process calls and use it on the call to error.
13849
34d86ddd
PA
138502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13851
13852 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13853
5a0e3bd0
JB
138542007-08-23 Joel Brobecker <brobecker@adacore.com>
13855
13856 * configure.ac: Switch license to GPLv3.
13857
f88c79e6
MS
138582007-08-01 Michael Snyder <msnyder@access-company.com>
13859
13860 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13861
6b3d9b83
PA
138622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13863
13864 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13865 typedef.
13866 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13867 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13868 CloseToolhelp32Snapshot.
13869 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13870 CloseToolhelp32Snapshot.
13871
c588c53c
MS
138722007-07-27 Michael Snyder <michael.snyder@access-company.com>
13873
13874 * server.c (main): Check for inferior exit before main loop.
13875
aa0403d9
PA
138762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13879 instead of on tmp_desc.
13880
255e7678
DJ
138812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13882 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13885 (add_thread): Minor cleanups.
13886 (clear_inferiors): Move lower in the file. Clear the DLL
13887 list.
13888 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13889 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13890 (xml_escape_text): New.
13891 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13892 for qSupported.
13893 (handle_v_cont): Report errors.
13894 (gdbserver_version): Update.
13895 (main): Correct size of own_buf. Do not report initial DLL events.
13896 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13897 (unloaded_dll, xml_escape_text): New.
13898 * win32-low.c (enum target_waitkind): Update comments.
13899 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13900 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13901 (win32_EnumProcessModules, win32_GetModuleInformation)
13902 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13903 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13904 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13905 (win32_Module32First, win32_Module32Next, load_toolhelp)
13906 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13907 (get_child_debug_event): Handle DLL events.
13908 (win32_wait): Likewise.
13909
0d37add9
DJ
139102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13911
13912 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13913 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13914
45e2715e
PA
139152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13916
13917 * win32-low.c (handle_output_debug_string): Ignore event if not
13918 waiting.
13919
c5674cf1
PA
139202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13921
13922 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13923
2bbe3cc1
DJ
139242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13925
13926 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13927
ae13219e
DJ
139282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * inferiors.c (change_inferior_id): Add comment.
13931 * linux-low.c (check_removed_breakpoint): Add an early
13932 prototype. Improve debug output.
13933 (linux_attach): Doc update.
13934 (linux_detach_one_process, linux_detach): Clean up before releasing
13935 each process.
13936 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13937 * linux-low.h (struct process_info): Doc improvement.
13938 * mem-break.c (delete_all_breakpoints): New.
13939 * mem-break.h (delete_all_breakpoints): New prototype.
13940 * thread-db.c (find_first_thread): New.
13941 (thread_db_create_event): Call it instead of
13942 thread_db_find_new_threads. Clean up unused variables.
13943 (maybe_attach_thread): Remove first thread handling.
13944 (thread_db_find_new_threads): Use find_first_thread.
13945 (thread_db_get_tls_address): Likewise.
13946
4105de34
DJ
139472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13948
13949 * thread-db.c (thread_db_find_new_threads): Add prototype.
13950 (thread_db_create_event): Check for the main thread before adding
13951 a new thread.
13952 (maybe_attach_thread): Only enable event reporting if TID == 0.
13953 (thread_db_get_tls_address): Check for new threads.
13954
2b876972
DJ
139552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * linux-low.c (linux_create_inferior): Try execv before execvp.
13958 * spu-low.c (spu_create_inferior): Likewise.
13959
7a245884
DJ
139602007-06-13 Mike Frysinger <vapier@gentoo.org>
13961
13962 * linux-low.c (linux_create_inferior): Change execv to execvp.
13963 * spu-low.c (spu_create_inferior): Likewies.
13964
117ce543
DJ
139652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * Makefile.in (clean): Clean new files instead of deleted ones.
13968 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13969 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13970 rules.
13971 * configure.srv: Specify XML files and new regformats for MIPS and
13972 MIPS64 GNU/Linux.
13973 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13974 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13975 an entry for the restart register.
13976 (mips_cannot_fetch_register, mips_cannot_store_register)
13977 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13978 register names to match the XML descriptions.
13979 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13980 restart register instead of $0.
13981
0e7f50da
UW
139822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13983 Markus Deuling <deuling@de.ibm.com>
13984
13985 * remote-utils.c (decode_xfer_write): New function.
13986 * server.h (decode_xfer_write): Add prototype.
13987 * server.c (handle_query): Add PACKET_LEN argument. Support
13988 qXfer:spu:read and qXfer:spu:write packets.
13989 (main): Pass packet_len to handle_query.
13990 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13991 * target.h (target_ops): Add qxfer_spu.
13992
374c1d38
UW
139932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13994
13995 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13996 accessing non-seekable spufs files.
13997
bb63802a
UW
139982007-05-16 Markus Deuling <deuling@de.ibm.com>
13999
889bf7c5 14000 * server.c (handle_query): Add reply for qC packet.
bb63802a 14001
7390519e
PA
140022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14003 Leo Zayas <lerele@champenstudios@com>
14004
14005 * server.h (check_remote_input_interrupt_request): New function.
14006 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14007 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14008 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14009 (check_remote_input_interrupt_request): New function.
14010 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14011 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14012 winapi_GenerateConsoleCtrlEvent): New typedefs.
14013 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14014 to 250 ms.
14015 (win32_wait): Check for remote interrupt request
14016 with check_remote_input_interrupt_request.
14017 (win32_request_interrupt): New function.
14018 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14019
34b34921
PA
140202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14021
14022 * win32-low.c (debug_registers_changed,
14023 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14024 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14025 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14026 (thread_rec): Get context using the low target.
14027 (child_add_thread): Call thread_added on the low target,
14028 which does the same thing.
14029 (regptr): Delete.
14030 (do_initial_child_stuff): Remove debug registers references.
14031 Set context using the low target. Resume threads after
14032 setting the contexts.
14033 (child_continue): Remove dead variable. Remove debug
14034 registers references.
14035 (child_fetch_inferior_registers): Go through the low target.
14036 (do_child_store_inferior_registers): Remove.
14037 (child_store_inferior_registers): Go through the low target.
14038 (win32_resume): Remove debug registers references.
14039 Set context using the low target.
14040 (handle_exception): Change return type to void. Don't record
14041 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14042 first chance exception.
889bf7c5 14043 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14044 goto loop. Always return after waiting for debug event.
14045 (win32_wait): Convert to switch statement. Handle spurious
14046 events.
14047
14048 * win32-i386-low.c (debug_registers_changed,
14049 debug_registers_used): New.
14050 (initial_stuff): Rename to ...
14051 (i386_initial_stuff): ... this. Clear debug registers
14052 state variables.
14053 (store_debug_registers): Delete.
14054 (i386_get_thread_context): New.
14055 (load_debug_registers): Delete.
14056 (i386_set_thread_context): New.
14057 (i386_thread_added): New.
14058 (single_step): Rename to ...
14059 (i386_single_step): ... this.
14060 (do_fetch_inferior_registers): Rename to ...
14061 (i386_fetch_inferior_register): ... this.
14062 (i386_store_inferior_register): New.
14063 (the_low_target): Adapt to new interface.
14064
14065 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14066 (arm_get_thread_context): New.
14067 (arm_set_thread_context): New.
14068 (regptr): New.
14069 (do_fetch_inferior_registers): Rename to ...
14070 (arm_fetch_inferior_register): ... this.
14071 (arm_store_inferior_register): New.
14072 (arm_wince_breakpoint): Reimplement as unsigned long.
14073 (arm_wince_breakpoint_len): Define.
14074 (the_low_target): Adapt to new interface.
14075
14076 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14077 load_debug_registers. Add get_thread_context, set_thread_context,
14078 thread_added and store_inferior_register. Rename
14079 fetch_inferior_registers to fetch_inferior_register.
14080 (regptr): Remove declaration.
14081
dd6953e1
PA
140822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14083
14084 * linux-low.c (linux_detach): Change return type to int. Return 0.
14085 * spu-low.c (spu_detach): Likewise.
14086
444d6139
PA
140872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14088
14089 * target.h (target_ops): Change return type of detach to int.
14090 Add join.
14091 (join_inferior): New.
14092 * server.c (main): Don't skip detach support on mingw32.
14093 If the inferior doesn't support detaching return error.
14094 Call join_inferior instead of using waitpid.
14095 * linux-low.c (linux_join): New.
14096 (linux_target_op): Add linux_join.
14097 * spu-low.c (spu_join): New.
14098 (spu_target_ops): Add spu_join.
14099 * win32-low.c (win32_detach): Adapt to new interface.
14100 Reopen current_process_handle before detaching. Issue a child
14101 resume before detaching.
14102 (win32_join): New.
14103 (win32_target_op): Add win32_join.
14104
1d5315fe
PA
141052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14106
14107 * win32-low.c (win32-attach): Fix return value.
14108 * target.h (target_ops): Describe ATTACH return values.
14109
bf914831
PA
141102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14111
14112 * win32-low.c (GETPROCADDRESS): Define.
14113 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14114 (winapi_DebugSetProcessKillOnExit): Likewise.
14115 (win32_create_inferior): Force usage of ansi CreateProcessA.
14116 (win32_attach): Use GETPROCADDRESS.
14117 (win32_detach): Likewise.
14118
f72f3e60
PA
141192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14120
14121 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14122
ed50f18f
PA
141232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14124
14125 * win32-low.c: Commit leftover changes from 2007-03-29.
14126
0c2ead7e
DJ
141272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14130 fields short instead of int. Add explicit padding.
14131 (i387_cache_to_fsave): Remove unnecessary casts.
14132 (i387_fsave_to_cache): Doc fix.
14133 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14134
73725ff3
DJ
141352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14136
14137 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14138 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14139
d99f33d8
PA
141402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14141
14142 * configure.srv (arm*-*-mingw32ce*): Move near the other
14143 arm targets.
14144
68070c10
PA
141452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14146
2482afc6 14147 * configure.ac: Add errno checking.
68070c10
PA
14148 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14149 sys/file.h and malloc.h.
14150 (AC_CHECK_DECLS): Add perror.
14151 (srv_mingwce): Handle.
2482afc6 14152 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14153 win32-i386-low.o to srv_tgtobj.
14154 (i[34567]86-*-mingw*): Likewise.
14155 (arm*-*-mingw32ce*): Add case.
14156 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14157 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14158 [__MINGW32CE__] (strerror): New function.
14159 [__MINGW32CE__] (errno): Define to GetLastError.
14160 [__MINGW32CE__] (COUNTOF): New macro.
14161 (remote_open): Remove extra close call.
14162 * mem-break.c (delete_breakpoint_at): New function.
14163 * mem-break.h (delete_breakpoint_at): Declare.
14164 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14165 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14166 [USE_WIN32API] (read, write): Add char* casts.
14167 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14168 * server.h: Include wincecompat.h on Windows CE.
14169 [HAVE_ERRNO_H]: Check.
14170 (perror): Declare if not declared.
14171 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14172 (perror_with_name): Remove errno declaration.
14173 * wincecompat.h: New.
14174 * wincecompat.c: New.
14175 * win32-low.h: New.
14176 * win32-arm-low.c: New.
14177 * win32-i386-low.c: New.
14178 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14179 (OUTMSG2): Make it safe.
14180 (_T): New macro.
14181 (COUNTOF): New macro.
14182 (NUM_REGS): Get it from the low target.
14183 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14184 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14185 (thread_rec): Let low target handle debug registers.
14186 (child_add_thread): Likewise.
14187 (child_init_thread_list): Likewise.
14188 (continue_one_thread): Likewise.
14189 (regptr): New.
14190 (do_child_fetch_inferior_registers): Move to ...
14191 * win32-i386-low.c: ... here, and rename to ...
14192 (do_fetch_inferior_registers): ... this.
889bf7c5 14193 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14194 Go through the low target.
14195 (do_child_store_inferior_registers): Use regptr.
14196 (strwinerror): New function.
14197 (win32_create_inferior): Handle Windows CE.
14198 Use strwinerror instead of strerror on Windows error
14199 codes. Add program to the error output.
14200 Don't close the main thread handle on Windows CE.
14201 (win32_attach): Use coredll.dll on Windows CE.
14202 (win32_kill): Close current process and current
14203 thread handles.
14204 (win32_detach): Use coredll.dll on Windows CE.
14205 (win32_resume): Let low target handle debug registers, and
14206 step request.
14207 (handle_exception): Add/Remove initial breakpoint. Avoid
14208 non-existant WSTOPSIG on Windows CE.
14209 (win32_read_inferior_memory): Cast to remove warning.
14210 (win32_arch_string): Go through the low target.
14211 (initialize_low): Call set_breakpoint_data with the low
14212 target's breakpoint.
14213 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14214 FOP_REGNUM, mappings): Move to ...
14215 * win32-i386-low.c: ... here.
14216 * win32-low.c (win32_thread_info): Move to ...
14217 * win32-low.h: ... here.
14218 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14219 win32-arm-low.c and wincecompat.c.
14220 (all:): Add $EXEEXT.
14221 (install-only:): Likewise.
14222 (gdbserver:): Likewise.
14223 (gdbreplay:): Likewise.
14224 * config.in: Regenerate.
14225 * configure: Regenerate.
14226
41093d81
PA
142272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14228
14229 * win32-low.c: Rename typedef thread_info to
14230 win32_thread_info throughout.
14231
544afa54
PA
142322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14233
14234 * win32-i386-low.c: Rename to ...
14235 * win32-low.c: ... this.
14236 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14237 * Makefile.in: Likewise.
14238
bce7165d
PA
142392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14240
14241 * remote-utils.c (monitor_output): Constify msg parameter.
14242 * server.h (monitor_output): Likewise.
14243 * win32-i386-low.c (handle_output_debug_string): New.
14244 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14245 handle_output_debug_string.
14246 (get_child_debug_event): Likewise.
14247
506c7aa0
DJ
142482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14249
14250 * server.c (main): Correct strtoul check.
14251
42c81e2a
DJ
142522007-03-27 Jon Ringle <jon@ringle.org>
14253
14254 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14255
9453113a
DJ
142562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14257
14258 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14259
64a69107
DJ
142602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14261
14262 * terminal.h: Check HAVE_SGTTY_H.
14263
142642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14265
14266 * remote-utils.c (remote_open): Print out the assigned port number.
14267
c74d0ad8
DJ
142682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14269
14270 * remote-utils.c (monitor_output): New function.
14271 * server.c (debug_threads): Define here.
14272 (monitor_show_help): New function.
14273 (handle_query): Handle qRcmd.
14274 (main): Do not handle 'd' packet.
14275 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14276 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14277 of debug_threads.
14278
de7c3b4a
PA
142792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14280
14281 * Makefile.in (EXEEXT): New.
14282 (clean): Use $(EXEEXT).
14283
ef57601b
PA
142842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14285
14286 * target.h (target_ops): Rename send_signal to request_interrupt,
14287 and remove enum target_signal parameter.
14288 * linux-low.c (linux_request_interrupt): Rename from
14289 linux_send_signal, and always send SIGINT.
14290 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14291 and always send SIGINT.
14292 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14293 of send_signal.
14294 (input_interrupt): Likewise.
14295
820f2bda
PA
142962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14297
14298 * server.c (get_features_xml): Check if target implemented
14299 arch_string.
14300 * win32-i386-low.c (win32_arch_string): New.
14301 (win32_target_ops): Add win32_arch_string as arch_string member.
14302
ab39bf24
UW
143032007-02-22 Markus Deuling <deuling@de.ibm.com>
14304
14305 * spu-low.c (spu_arch_string): New.
14306 (spu_target_ops): Add spu_arch_string.
14307
61ff6e04
DJ
143082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14311 * configure.ac: Do not check for terminal.h.
14312 * configure, config.in: Regenerated.
14313
fb1e4ffc
DJ
143142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * Makefile.in (OBS): Add $(XML_BUILTIN).
14317 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14318 (clean): Update.
14319 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14320 (arm-with-iwmmxt.c): New.
14321 * config.in, configure: Regenerate.
14322 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14323 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14324 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14325 (arm*-*-linux*): Add iWMMXt and regset support.
14326 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14327 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14328 (arm_store_wmmxregset, target_regsets): New.
14329 * server.c (get_features_xml): Take annex argument. Check builtin
14330 XML documents.
14331 (handle_query): Handle multiple annexes.
14332
0f48aa01
DJ
143332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * remote-utils.c [USE_WIN32API] (read, write): Define.
14336 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14337 write.
14338
23181151
DJ
143392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14340
14341 * linux-i386-low.c (the_low_target): Set arch_string.
14342 * linux-x86-64-low.c (the_low_target): Likewise.
14343 * linux-low.c (linux_arch_string): New.
14344 (linux_target_ops): Add it.
14345 * linux-low.h (struct linux_target_ops): Add arch_string.
14346 * server.c (write_qxfer_response): Use const void * for DATA.
14347 (get_features_xml): New.
14348 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14349 * target.h (struct target_ops): Add arch_string method.
14350
9d606399
DJ
143512007-01-03 Denis Pilat <denis.pilat@st.com>
14352 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * linux-low.c (linux_kill): Handle being called with no threads.
14355 * win32-i386-low.c (win32_kill): Likewise.
14356 (get_child_debug_event): Clear current_process_handle.
14357
143582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14359 Daniel Jacobowitz <dan@codesourcery.com>
14360
14361 * remote-utils.c (remote_open): Check the type of specified
14362 serial port devices before opening them.
14363 * server.c (main): Kill the inferior if an error occurs during
14364 the first remote_open.
14365
a5e13d24
DJ
143662006-12-05 Markus Deuling <deuling@de.ibm.com>
14367
14368 * README: Update supported targets.
14369
186947f7
DJ
143702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14371
14372 * Makefile.in (clean): Remove reg-mips64.c.
14373 (reg-mips64.c, reg-mips64.o): New rules.
14374 * configure.srv: Handle mips64. Include regset support for mips.
14375 * linux-mips-low.c (union mips_register): New.
14376 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14377 (mips_breakpoint, mips_breakpoint_at): Use int.
14378 (mips_collect_register, mips_supply_register)
14379 (mips_collect_register_32bit, mips_supply_register_32bit)
14380 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14381 (mips_store_fpregset, target_regsets): New.
14382 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14383
a13e2c95
UW
143842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14385
14386 * configure.srv: Add target "spu*-*-*".
14387 * Makefile.in (clean): Remove reg-spu.c.
14388 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14389 * spu-low.c: New file.
14390
cb7283db
DJ
143912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * configure.ac: Correct td_thr_tls_get_addr test.
14394 * configure: Regenerated.
14395
89be2091
DJ
143962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14397
14398 * linux-low.c (linux_wait_for_event): Reformat. Use the
14399 pass_signals array.
14400 * remote-utils.c (decode_address_to_semicolon): New.
14401 * server.c (pass_signals, handle_general_set): New.
14402 (handle_query): Mention QPassSignals for qSupported.
14403 (main): Call handle_general_set.
14404 * server.h (pass_signals, decode_address_to_semicolon): New.
14405
000ef4f0
DJ
144062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14407
14408 * server.c (handle_query): Correct error handling for read_auxv.
14409
b7149293
UW
144102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14411
14412 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14413 and srv_linux_thread_db to yes.
14414 * linux-s390-low.c (s390_fill_gregset): New function.
14415 (target_regsets): Define data structure.
14416
dae5f5cf
DJ
144172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14420 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14421 * config.in, configure: Regenerated.
14422 * inferiors.c (gdb_id_to_thread): New function.
14423 (gdb_id_to_thread_id): Use it.
14424 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14425 * linux-low.h (struct process_info): Add th member.
14426 (thread_db_get_tls_address): New prototype.
14427 * remote-utils.c (decode_address): Make non-static.
14428 * server.c (handle_query): Handle qGetTLSAddr.
14429 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14430 * target.h (struct target_ops): Add get_tls_address.
14431 * thread-db.c (maybe_attach_thread): Save the thread handle.
14432 (thread_db_get_tls_address): New.
14433
32ca6d61
DJ
144342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14437 (linux_resume_one_process): Take a siginfo_t *. Update all
14438 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14439 (struct pending_signals): Add a siginfo_t.
14440 (linux_wait_for_process): Always set last_status.
14441 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14442 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14443 * linux-low.h (struct process_info): Add last_status.
14444
5ffff7c1
DJ
144452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14446
14447 * remote-utils.c (try_rle): New function.
14448 (putpkt_binary): Use it.
14449
8695c747
DJ
144502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14451
14452 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14453 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14454 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14455 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14456 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14457 point registers.
14458
290fadea
RS
144592006-08-08 Richard Sandiford <richard@codesourcery.com>
14460
14461 * server.c (terminal_fd): New variable.
14462 (old_foreground_pgrp): Likewise.
14463 (restore_old_foreground_pgrp): New function.
14464 (start_inferior): Record the terminal file descriptor in terminal_fd
14465 and its original foreground group in old_foreground_pgrp. Register
14466 restore_old_foreground_pgrp with atexit().
14467
9f2e1e63
DJ
144682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * server.c (handle_query): Correct qPart to qXfer.
14471
b80864fb
DJ
144722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * configure.ac: Check for more headers which are missing on
14475 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14476 * configure.srv: Add Cygwin and mingw32.
14477 * remote-utils.c: Don't include headers unconditionally which
14478 are missing on mingw32. Include <winsock.h> for mingw32.
14479 (remote_open): Adjust for mingw32 support. Flush
14480 standard error after writing to it.
14481 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14482 (unblock_async_io, enable_async_io, disable_async_io)
14483 (readchar, getpkt): Update for Winsock support.
14484 (prepare_resume_reply): Expect a protocol signal number.
14485 * server.c: Disable <sys/wait.h> on mingw32.
14486 (start_inferior): Adjust for mingw32 support. Flush
14487 standard error after writing to it.
14488 (attach_inferior): Likewise. Use protocol signal
14489 numbers.
14490 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14491 and names.
14492 * win32-i386-low.c: New file.
14493 * Makefile.in (XM_CLIBS): Set.
14494 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14495 (win32-i386-low.o): New dependency rule.
14496 * linux-low.c (linux_wait): Use target signal numbers.
14497 * target.h (struct target_ops): Doc fix.
14498 * server.h (target_signal_to_name): New prototype.
14499 * gdbreplay.c: Don't include headers unconditionally which
14500 are missing on mingw32. Include <winsock.h> for mingw32.
14501 (remote_close, remote_open): Adjust for Winsock support.
14502 * configure, config.in: Regenerated.
14503
0876f84a
DJ
145042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * server.c (decode_xfer_read, write_qxfer_response): New.
14507 (handle_query): Take a packet length argument. Handle
14508 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14509 the qSupported response.
14510 (main): Update call to handle_query.
14511
01f9e8fa
DJ
145122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14513
14514 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14515 (putpkt_binary): Renamed from putpkt and adjusted for binary
14516 data.
14517 (putpkt): New wrapper for putpkt_binary.
14518 (readchar): Don't mask off the high bit.
14519 (decode_X_packet): New function.
14520 * server.c (main): Call putpkt_binary if a handler sets the packet
14521 length. Save the length of the incoming packet. Handle 'X'.
14522 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14523
be2a5f71
DJ
145242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14525
14526 * server.c (handle_query): Handle qSupported.
14527
ea025f5f
DJ
145282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * remote-utils.c (all_symbols_looked_up): New variable.
14531 (look_up_one_symbol): Check it.
14532 * server.h (look_up_one_symbol): New declaration.
14533 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14534
9308fc88
DJ
145352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14536
14537 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14538 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14539 (PTRACE_GET_THREAD_AREA): Define.
14540 (ps_get_thread_area): New function.
14541
52fb6437
NS
145422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14543
14544 * configure.srv (m68k*-*-uclinux*): New target.
14545 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14546 (linux_resume_one_process): Remove extraneous cast.
14547 (linux_read_offsets): New.
14548 (linux_target_op): Add linux_read_offsets on mmuless systems.
14549 * server.c (handle_query): Add qOffsets logic.
14550 * target.h (struct target_ops): Add read_offsets.
14551
21b0f40c
DJ
145522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14553
14554 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14555 (PTRACE_GET_THREAD_AREA): Define.
14556 (ps_get_thread_area): New function.
14557 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14558 (linux-x86-64-low.o): Update.
14559
0050a760
DJ
145602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14561
14562 * configure.ac: Remove checks for prfpregset_t.
14563 * gdb_proc_service.h: New file.
14564 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14565 new "gdb_proc_service.h".
14566 * proc-service.c: Likewise.
14567 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14568 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14569 * Makefile.in (gdb_proc_service_h): Updated.
14570 * configure, config.in: Regenerated.
14571
b92a518e
DJ
145722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * remote-utils.c (prepare_resume_reply): Move declaration
14575 of gdb_id_from_wait to the top of the block.
14576
545587ee
DJ
145772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14578
14579 * linux-low.c (regsets_store_inferior_registers): Read the regset
14580 from the target before filling it.
14581
9db87ebd
DJ
145822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * server.c (attach_inferior): Return SIGTRAP for a successful
14585 attach.
14586
dd24457d
DJ
145872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * Makefile.in (OBS): Add version.o.
14590 (STAGESTUFF): Delete.
14591 (version.o): Add dependencies.
14592 (version.c): Replace rule.
14593 (clean): Remove version.c.
14594 * server.c (gdbserver_version): New.
14595 (gdbserver_usage): Use printf.
14596 (main): Handle --version and --help.
14597 * server.h (version, host_name): Add declarations.
14598
6f0f660e
EZ
145992005-12-23 Eli Zaretskii <eliz@gnu.org>
14600
889bf7c5
PA
14601 * linux-arm-low.c:
14602 * linux-arm-low.c:
14603 * inferiors.c:
14604 * i387-fp.h:
14605 * i387-fp.c:
14606 * gdbreplay.c:
14607 * regcache.c:
14608 * proc-service.c:
14609 * mem-break.h:
14610 * mem-break.c:
14611 * linux-x86-64-low.c:
14612 * linux-sh-low.c:
14613 * linux-s390-low.c:
14614 * linux-ppc64-low.c:
14615 * linux-ppc-low.c:
14616 * linux-mips-low.c:
14617 * linux-m68k-low.c:
14618 * linux-m32r-low.c:
14619 * linux-low.h:
14620 * linux-low.c:
14621 * linux-ia64-low.c:
14622 * linux-i386-low.c:
14623 * linux-crisv32-low.c:
14624 * thread-db.c:
14625 * terminal.h:
14626 * target.h:
14627 * target.c:
14628 * server.h:
14629 * server.c:
14630 * remote-utils.c:
14631 * regcache.h:
14632 * utils.c:
14633 * Makefile.in:
14634 * configure.ac:
6f0f660e
EZ
14635 * gdbserver.1: Add (C) after Copyright. Update the FSF
14636 address.
14637
9d1fb177
DJ
146382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14639
14640 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14641 (arm_breakpoint_at): Recognize both breakpoints.
14642 (the_low_target): Use the correct breakpoint instruction.
14643
011a70c2
DJ
146442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14647 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14648 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14649 (the_low_target): Update.
14650
7fb85e41
AS
146512005-10-25 Andreas Schwab <schwab@suse.de>
14652
14653 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14654
14655 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14656 (ia64_num_regs): Reduce to 462.
14657
3db0444b
DJ
146582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14659
14660 * acinclude.m4: Correct quoting.
14661 * aclocal.m4: Regenerated.
14662
14663 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14664 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14665 (thread_db_init): Call thread_db_err_str.
14666 * configure.ac: Check for TD_VERSION.
14667 * config.in, configure: Regenerated.
14668
bee0189a
DJ
146692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14670
14671 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14672
e9d25b98
DJ
146732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14674
14675 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14676 is not available. Define HAVE_PTRACE_GETREGS if it is.
14677 * config.in, configure: Regenerated.
14678 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14679 * linux-i386-low.c, linux-m68k-low.c: Update to use
14680 HAVE_PTRACE_GETREGS.
14681 * linux-low.c (regsets_fetch_inferior_registers)
14682 (regsets_store_inferior_registers): Only return 0 if we processed
14683 GENERAL_REGS.
14684 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14685 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14686
a06660f7
DJ
146872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * inferiors.c (struct thread_info): Add gdb_id.
14690 (add_thread): Add gdb_id argument.
14691 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14692 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14693 calls to add_thread.
14694 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14695 * server.c (handle_query): Use thread_to_gdb_id.
14696 (handle_v_cont, main): Use gdb_id_to_thread_id.
14697 * server.h (add_thread): Update prototype.
14698 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14699 prototypes.
14700
5a1f5858
DJ
147012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14702
14703 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14704 left-padded registers.
14705 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14706 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14707
e122f1f5
SE
147082005-07-01 Steve Ellcey <sje@cup.hp.com>
14709
14710 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14711 * configure: Regenerate.
14712 * config.in: Regenerate.
14713 * server.h (NEED_DECLARATION_STRERROR):
14714 Replace with !HAVE_DECL_STRERROR.
14715
d592fa2f
DJ
147162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14717
14718 * linux-low.c (linux_wait, linux_send_signal): Don't test
14719 an unsigned long variable for > 0 if it could be MAX_ULONG.
14720 * server.c (myresume): Likewise.
14721 * target.c (set_desired_inferior): Likewise.
14722
ccbd4912
MK
147232005-06-13 Mark Kettenis <kettenis@gnu.org>
14724
14725 * configure.ac: Simplify and improve check for socklen_t.
14726 * configure, config.in: Regenerate.
14727
f450004a
DJ
147282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * acconfig.h: Remove.
14731 * configure.ac: Add a test for socklen_t. Use three-argument
14732 AC_DEFINE throughout.
14733 * config.in: Regenerated using autoheader 2.59.
14734 * configure: Regenerated.
14735
14736 * gdbreplay.c (socklen_t): Provide a default.
14737 (remote_open): Use socklen_t.
14738 * remote-utils.c (socklen_t): Provide a default.
14739 (remote_open): Use socklen_t.
14740 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14741 unsigned char.
14742
14743 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14744 char for buffers.
14745 * linux-low.c (linux_read_memory, linux_write_memory)
14746 (linux_read_auxv): Likewise.
14747 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14748 (check_mem_write): Likewise.
14749 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14750 Likewise.
14751 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14752 (registers_from_string, register_data): Likewise.
14753 * server.c (handle_query, main): Likewise.
14754 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14755 (decode_M_packet): Likewise.
14756 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14757 * target.h (struct target_ops): Update read_memory, write_memory,
14758 and read_auxv.
14759 (read_inferior_memory, write_inferior_memory): Update.
14760 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14761 to unsigned char *.
14762 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14763 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14764 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14765 linux-s390-low.c, linux-sh-low.c: Update for changes in
14766 read_inferior_memory and the_low_target->breakpoint.
14767
eee84df1
DJ
147682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14771 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14772 * configure.srv: Add powerpc64-*-linux*.
14773 * linux-ppc64-low.c: New file.
14774
45b134e5
OF
147752005-05-23 Orjan Friberg <orjanf@axis.com>
14776
14777 * linux-cris-low.c: New file with support for CRIS.
14778 * linux-crisv32-low.c: Ditto for CRISv32.
14779 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14780 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14781 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14782 reg-crisv32.o, and reg-crisv32.c to make rules.
14783 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14784 recognized targets.
14785
48d93c75
UW
147862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14787
14788 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14789 of sizeof (PTRACE_XFER_TYPE).
14790 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14791
e013ee27
OF
147922005-05-12 Orjan Friberg <orjanf@axis.com>
14793
889bf7c5 14794 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14795 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14796 pointers for hardware watchpoint support.
14797 * linux-low.h (struct linux_target_ops): Ditto.
14798 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14799 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14800 to linux_target_ops.
14801 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14802 reply packet.
14803 * server.c (main): Recognize 'Z' and 'z' packets.
14804
b0ded00b
UW
148052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14806
14807 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14808 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14809 (the_low_target): Add new members.
14810
8643e2ad
DJ
148112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14812
14813 * proc-service.c (ps_lgetregs): Search all_processes instead of
14814 all_threads.
14815
fc620387
DJ
148162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * server.c (start_inferior): Change return type to int.
14819 (attach_inferior): Change sigptr to int *.
14820 (handle_v_cont, handle_v_requests): Change signal to int *.
14821 (main): Change signal to int.
14822
148232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14824
14825 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14826 * configure.srv: Add m32r*-*-linux*.
14827 * linux-m32r-low.c: New file.
14828
e0e76420
DJ
148292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14832
a1928bad
DJ
148332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14834
14835 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14836 Take unsigned long arguments for PIDs.
14837 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14838 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14839 (wait_for_sigstop, linux_resume_one_process)
14840 (regsets_fetch_inferior_registers, linux_send_signal)
14841 (linux_read_auxv): Likewise. Update the types of variables holding
14842 PIDs. Update format string specifiers.
14843 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14844 * remote-utils.c (prepare_resume_reply): Likewise.
14845 * server.c (cont_thread, general_thread, step_thread)
14846 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14847 unsigned long.
14848 (handle_query): Update format specifiers.
14849 (handle_v_cont, main): Use strtoul for thread IDs.
14850 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14851 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14852 (general_thread, step_thread, thread_from_wait)
14853 (old_thread_from_wait): Update.
14854 * target.h (struct thread_resume): Use unsigned long for THREAD.
14855 (struct target_ops): Use unsigned long for arguments to attach and
14856 thread_alive.
14857
dcdb98d2
DJ
148582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * acinclude.m4: Include bfd/bfd.m4 directly.
14861 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14862 <agriffis@toolchain.org>.
14863 * aclocal.m4, configure: Regenerated.
14864
bec39cab
AC
148652005-01-07 Andrew Cagney <cagney@gnu.org>
14866
14867 * configure.ac: Rename configure.in, require autoconf 2.59.
14868 * configure: Re-generate.
14869
434c4c77
DJ
148702004-12-08 Daniel Jacobowitz <dan@debian.org>
14871
14872 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14873 LIBS when finished.
14874 * aclocal.m4: Regenerated.
14875 * configure: Regenerated.
14876
db1d3e1b
AS
148772004-11-21 Andreas Schwab <schwab@suse.de>
14878
14879 * linux-m68k-low.c (m68k_num_gregs): Define.
14880 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14881 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14882 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14883 (m68k_breakpoint_at): New. Add to the_low_target.
14884
14885 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14886 srv_linux_thread_db to yes.
14887
43360365
JB
148882004-10-20 Joel Brobecker <brobecker@gnat.com>
14889
14890 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14891 (ARCH_SET_FS): Likewise.
14892 (ARCH_GET_FS): Likewise.
14893 (ARCH_GET_GS): Likewise.
14894
fd500816
DJ
148952004-10-16 Daniel Jacobowitz <dan@debian.org>
14896
14897 * linux-i386-low.c (ps_get_thread_area): New.
14898 * linux-x86-64-low.c (ps_get_thread_area): New.
14899 * linux-low.c: Include <sys/syscall.h>.
14900 (linux_kill_one_process): Don't kill the first thread here.
14901 (linux_kill): Kill the first thread here.
14902 (kill_lwp): New function.
14903 (send_sigstop, linux_send_signal): Use it.
14904 * proc-service.c: Clean up #ifdefs.
14905 (fpregset_info): Delete.
14906 (ps_lgetregs): Update and enable implementation.
14907 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14908 implementations.
14909 * remote-utils.c (struct sym_cache, symbol_cache): New.
14910 (input_interrupt): Print a clearer message.
14911 (async_io_enabled): New variable.
14912 (enable_async_io, disable_async_io): Use it. Update comments.
14913 (look_up_one_symbol): Use the symbol cache.
14914 * thread-db.c (thread_db_look_up_symbols): New function.
14915 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14916
f6de3c42
DJ
149172004-10-16 Daniel Jacobowitz <dan@debian.org>
14918
14919 * configure.in: Test for -rdynamic.
14920 * configure: Regenerated.
14921 * Makefile (INTERNAL_LDFLAGS): New.
14922 (gdbserver, gdbreplay): Use it.
14923
2c0fc042
AC
149242004-09-02 Andrew Cagney <cagney@gnu.org>
14925
14926 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14927
075b3282
DJ
149282004-03-23 Daniel Jacobowitz <drow@mvista.com>
14929
14930 * linux-low.c (linux_wait): Clear all_processes list also.
14931
fa6a77dc
DJ
149322004-03-12 Daniel Jacobowitz <drow@mvista.com>
14933
14934 * linux-low.c: Include <errno.h>. Remove extern declaration of
14935 errno.
14936
6d782a97
DJ
149372004-03-12 Daniel Jacobowitz <drow@mvista.com>
14938
14939 * gdbreplay.c, server.h, utils.c: Update copyright years.
14940
3a7fb99b
DJ
149412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14942
14943 * server.c (main): Print child status or termination signal from
14944 variable 'signal', not 'sig'.
14945
c3e735a6
DJ
149462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14947
14948 * linux-low.c (linux_read_memory): Change return type to
14949 int. Check for and return error from ptrace().
14950 * target.c (read_inferior_memory): Change return type to int. Pass
14951 back return status from the_target->read_memory().
14952 * target.h (struct target_ops): Adapt *read_memory() prototype.
14953 Update comment.
14954 (read_inferior_memory): Adapt prototype.
14955 * server.c (main): Return an error packet if
14956 read_inferior_memory() returns an error.
14957
a59d1c82
DJ
149582004-03-04 Daniel Jacobowitz <drow@mvista.com>
14959
14960 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14961 Unify with other clean targets.
14962
dc3f8883
DJ
149632004-02-29 Daniel Jacobowitz <drow@mvista.com>
14964
14965 * server.c (handle_v_cont): Call set_desired_inferior.
14966
89a208da
DJ
149672004-02-29 Daniel Jacobowitz <drow@mvista.com>
14968
14969 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14970
62ea82f5
DJ
149712004-02-29 Daniel Jacobowitz <drow@mvista.com>
14972
14973 * linux-low.c (linux_wait): Unblock async I/O.
14974 (linux_resume): Block and enable async I/O.
14975 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14976 * server.h (block_async_io, unblock_async_io): Add prototypes.
14977
6910d122
DJ
149782004-02-29 Daniel Jacobowitz <drow@mvista.com>
14979
14980 * remote-utils.c (remote_open): Print a status notice after
14981 opening a TCP port.
14982 * server.c (attach_inferior): Print a status notice after
14983 attaching.
14984
149852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14986
14987 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14988
c89dc5d4
DJ
149892004-02-26 Daniel Jacobowitz <drow@mvista.com>
14990
14991 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14992 error packet.
14993 * server.c, target.h: Update copyright years.
14994
4b8dad4a
RM
149952004-02-25 Roland McGrath <roland@redhat.com>
14996
14997 * target.h (struct target_ops): New member `read_auxv'.
14998 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14999 * linux-low.c (linux_read_auxv): New function.
15000 (linux_target_ops): Initialize `read_auxv' member to that.
15001
d7446758
JB
150022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15003
15004 Committed by Jim Blandy <jimb@redhat.com>.
15005
15006 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15007 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15008 instead of GPR_SIZE to distiguish s390 and s390x targets.
15009
5544ad89
DJ
150102004-01-31 Daniel Jacobowitz <drow@mvista.com>
15011
15012 * linux-low.c: Update copyright year.
15013 (check_removed_breakpoint): Clear pending_is_breakpoint.
15014 (linux_set_resume_request, linux_queue_one_thread)
15015 (resume_status_pending_p): New functions.
15016 (linux_continue_one_thread): Use process->resume.
15017 (linux_resume): Only resume threads if there are no pending events.
15018 * linux-low.h (struct process_info): Add resume request
15019 pointer.
15020
2a68b70e
DJ
150212004-01-30 Daniel Jacobowitz <drow@mvista.com>
15022
15023 * regcache.c (new_register_cache): Clear the allocated register
15024 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15025
64386c31
DJ
150262003-10-13 Daniel Jacobowitz <drow@mvista.com>
15027
15028 * linux-low.c (linux_resume): Take a struct thread_resume *
15029 argument.
15030 (linux_wait): Update call.
15031 (resume_ptr): New static variable.
15032 (linux_continue_one_thread): Renamed from
15033 linux_continue_one_process. Use resume_ptr.
15034 (linux_resume): Use linux_continue_one_thread.
15035 * server.c (handle_v_cont, handle_v_requests): New functions.
15036 (myresume): New function.
15037 (main): Handle 'v' case.
15038 * target.h (struct thread_resume): New type.
15039 (struct target_ops): Change argument of "resume" to struct
15040 thread_resume *.
15041 (myresume): Delete macro.
15042
c938e9b0
L
150432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15044
15045 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15046 (uninstall): Support DESTDIR.
15047
7f313d07
BC
15048Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15049
15050 * configure.srv: Add xscale*linux copy of arm*linux entry.
15051
3b2fc2ea
DJ
150522003-07-24 Daniel Jacobowitz <drow@mvista.com>
15053
15054 * linux-arm-low.c (arm_reinsert_addr): New function.
15055 (the_low_target): Add arm_reinsert_addr.
15056
1c0a559e
MK
150572003-07-08 Mark Kettenis <kettenis@gnu.org>
15058
15059 * mem-break.c: Remove whitespace at end of file.
15060
43d5792c
DJ
150612003-06-28 Daniel Jacobowitz <drow@mvista.com>
15062
15063 * configure.in: Check whether we need to prototype strerror.
15064 * server.h: Optionally prototype strerror.
15065 * gdbreplay.c (perror_with_name): Use strerror.
15066 * linux-low.c (linux_attach_lwp): Use strerror.
15067 * utils.c (perror_with_name): Use strerror.
15068 * config.in, configure: Regenerated.
15069
c8a86edf
DJ
150702003-06-28 Daniel Jacobowitz <drow@mvista.com>
15071
15072 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15073 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15074
73d37363
DJ
150752003-06-20 Daniel Jacobowitz <drow@mvista.com>
15076
15077 * Makefile.in (SFILES): Update.
15078 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15079 low-sun3.c: Remove files.
15080
6ad8ae5c
DJ
150812003-06-17 Daniel Jacobowitz <drow@mvista.com>
15082
15083 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15084 (linux_detach_one_process, linux_detach): New functions.
15085 (linux_target_ops): Add linux_detach.
15086 * server.c (main): Handle 'D' packet.
15087 * target.h (struct target_ops): Add "detach" member.
15088 (detach_inferior): Define.
15089
1581182a
MK
150902003-06-13 Mark Kettenis <kettenis@gnu.org>
15091
15092 From Kelley Cook <kelleycook@wideopenwest.com>:
15093 * configure.srv: Accept i[34567]86 variants.
15094
e5379b03
DJ
150952003-06-05 Daniel Jacobowitz <drow@mvista.com>
15096
15097 * linux-low.c (linux_wait_for_event): Correct comment typos.
15098 (linux_resume_one_process): Call check_removed_breakpoint.
15099 (linux_send_signal): New function.
15100 (linux_target_ops): Add linux_send_signal.
15101 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15102 of kill.
15103 * target.h (struct target_ops): Add send_signal.
15104
2ff29de4
JB
151052003-05-29 Jim Blandy <jimb@redhat.com>
15106
15107 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15108 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15109 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15110 away part of the register's value.
15111
254787d4
DJ
151122003-03-26 Daniel Jacobowitz <drow@mvista.com>
15113
15114 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15115 (linux_wait_for_event, linux_init_signals): Likewise.
15116
94e10508
DJ
151172003-03-17 Daniel Jacobowitz <drow@mvista.com>
15118
15119 * configure.in: Check for stdlib.h.
15120 * configure: Regenerated.
15121 * config.in: Regenerated.
15122
4c0711e0
DJ
151232003-01-04 Andreas Schwab <schwab@suse.de>
15124
15125 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15126
ef66e766
AC
151272003-01-02 Andrew Cagney <ac131313@redhat.com>
15128
15129 * Makefile.in: Remove obsolete code.
15130
a1358604
DJ
151312002-11-20 Daniel Jacobowitz <drow@mvista.com>
15132
15133 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15134 defined(PT_FPR0_HI).
15135
23ce3b1c
DJ
151362002-11-17 Stuart Hughes <seh@zee2.com>
15137
15138 * linux-arm-low.c (arm_num_regs): Increase.
15139 (arm_regmap): Include status register.
15140
151412002-11-17 Daniel Jacobowitz <drow@mvista.com>
15142
15143 * linux-low.c (register_addr): Remove incorrect -1 check.
15144
a9fa9f7d
DJ
151452002-08-29 Daniel Jacobowitz <drow@mvista.com>
15146
15147 * linux-low.c (linux_create_inferior): Call setpgid. Return
15148 the new PID.
15149 (unstopped_p, linux_signal_pid): Remove.
15150 (linux_target_ops): Remove linux_signal_pid.
15151 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15152 global instead of target method.
15153 * target.h (struct target_ops): Remove signal_pid. Update comment
15154 for create_inferior.
15155 * server.c (signal_pid): New variable.
15156 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15157 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15158 (attach_inferior): Set signal_pid.
15159
17574093
DJ
151602002-08-23 Daniel Jacobowitz <drow@mvista.com>
15161
15162 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15163
151642002-08-20 Jim Blandy <jimb@redhat.com>
15165
15166 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15167 default for this.
15168
151692002-08-01 Andrew Cagney <cagney@redhat.com>
15170
15171 * Makefile.in: Make chill references obsolete.
15172
151732002-07-24 Kevin Buettner <kevinb@redhat.com>
15174
15175 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15176 * configure: Regenerate.
15177 * config.in: Regenerate.
15178
151792002-07-09 David O'Brien <obrien@FreeBSD.org>
15180
15181 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15182 (perror_with_name, remote_close, remote_open, expect, play): Static.
15183
151842002-07-04 Michal Ludvig <mludvig@suse.cz>
15185
4b8dad4a 15186 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15187 byte offsets instead of an array of indexes.
15188 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15189
151902002-06-13 Daniel Jacobowitz <drow@mvista.com>
15191
15192 * regcache.c: Add comment.
15193
151942002-06-11 Daniel Jacobowitz <drow@mvista.com>
15195
15196 * thread-db.c: New file.
15197 * proc-service.c: New file.
15198 * acinclude.m4: New file.
15199 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15200 proc-service.o, and thread-db.o.
15201 (linux-low.o): Add USE_THREAD_DB.
15202 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15203 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15204 * aclocal.m4: Regenerated.
15205 * config.in: Regenerated.
15206 * configure: Regenerated.
15207 * configure.in: Check for proc_service.h, sys/procfs.h,
15208 thread_db.h, and linux/elf.h headrs.
15209 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15210 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15211 Check for -lthread_db and thread support.
15212 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15213 PowerPC, and SuperH.
15214 * i387-fp.c: Constify arguments.
15215 * i387-fp.h: Likewise.
15216 * inferiors.c: (struct thread_info): Renamed from
15217 `struct inferior_info'. Remove PID member. Use generic inferior
15218 list header. All uses updated.
15219 (inferiors, signal_pid): Removed.
15220 (all_threads): New variable.
15221 (get_thread): Define.
15222 (add_inferior_to_list): New function.
15223 (for_each_inferior): New function.
15224 (change_inferior_id): New function.
15225 (add_inferior): Removed.
15226 (remove_inferior): New function.
15227 (add_thread): New function.
15228 (free_one_thread): New function.
15229 (remove_thread): New function.
15230 (clear_inferiors): Use for_each_inferior and free_one_thread.
15231 (find_inferior): New function.
15232 (find_inferior_id): New function.
15233 (inferior_target_data): Update argument type.
15234 (set_inferior_target_data): Likewise.
15235 (inferior_regcache_data): Likewise.
15236 (set_inferior_regcache_data): Likewise.
15237 * linux-low.c (linux_bp_reinsert): Remove.
15238 (all_processes, stopping_threads, using_thrads)
15239 (struct pending_signals, debug_threads, pid_of): New.
15240 (inferior_pid): Replace with macro.
15241 (struct inferior_linux_data): Remove.
15242 (get_stop_pc, add_process): New functions.
15243 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15244 Use add_process and add_thread.
15245 (linux_attach_lwp): New function, based on old linux_attach. Use
15246 add_process and add_thread. Set stop_expected for new threads.
15247 (linux_attach): New function.
15248 (linux_kill_one_process): New function.
15249 (linux_kill): Kill all LWPs.
15250 (linux_thread_alive): Use find_inferior_id.
15251 (check_removed_breakpoints, status_pending_p): New functions.
15252 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15253 Update. Use WNOHANG. Wait for cloned processes also. Update process
15254 struct for the found process.
15255 (linux_wait_for_event): New function.
15256 (linux_wait): Use it. Support LWPs.
15257 (send_sigstop, wait_for_sigstop, stop_all_processes)
15258 (linux_resume_one_process, linux_continue_one_process): New functions.
15259 (linux_resume): Support LWPs.
15260 (REGISTER_RAW_SIZE): Remove.
15261 (fetch_register): Use register_size instead. Call supply_register.
15262 (usr_store_inferior_registers): Likewise. Call collect_register.
15263 Fix recursive case.
15264 (regsets_fetch_inferior_registers): Improve error message.
15265 (regsets_store_inferior_registers): Add debugging.
15266 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15267 (unstopped_p, linux_signal_pid): New functions.
15268 (linux_target_ops): Add linux_signal_pid.
15269 (linux_init_signals): New function.
15270 (initialize_low): Call it. Initialize using_threads.
15271 * regcache.c (inferior_regcache_data): Add valid
15272 flag.
15273 (get_regcache): Fetch registers lazily. Add fetch argument
15274 and update all callers.
15275 (regcache_invalidate_one, regcache_invalidate): New
15276 functions.
15277 (new_register_cache): Renamed from create_register_cache.
15278 Return the new regcache.
15279 (free_register_cache): Change argument to a void *.
15280 (registers_to_string, registers_from_string): Call get_regcache
15281 with fetch flag set.
15282 (register_data): Make static. Pass fetch flag to get_regcache.
15283 (supply_register): Call get_regcache with fetch flag clear.
15284 (collect_register): Call get_regcache with fetch flag set.
15285 (collect_register_as_string): New function.
15286 * regcache.h: Update.
15287 * remote-utils.c (putpkt): Flush after debug output and use
15288 stderr.
15289 Handle input interrupts while waiting for an ACK.
15290 (input_interrupt): Use signal_pid method.
15291 (getpkt): Flush after debug output and use stderr.
15292 (outreg): Use collect_register_as_string.
15293 (new_thread_notify, dead_thread_notify): New functions.
15294 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15295 and general_thread.
15296 (look_up_one_symbol): Flush after debug output.
15297 * server.c (step_thread, server_waiting): New variables.
15298 (start_inferior): Don't use signal_pid. Update call to mywait.
15299 (attach_inferior): Update call to mywait.
15300 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15301 (main): Don't fetch/store registers explicitly. Use
15302 set_desired_inferior. Support proposed ``Hs'' packet. Update
15303 calls to mywait.
15304 * server.h: Update.
15305 (struct inferior_list, struct_inferior_list_entry): New.
15306 * target.c (set_desired_inferior): New.
15307 (write_inferior_memory): Constify.
15308 (mywait): New function.
15309 * target.h: Update.
15310 (struct target_ops): New signal_pid method.
15311 (mywait): Removed macro, added prototype.
15312
15313 * linux-low.h (regset_func): Removed.
15314 (regset_fill_func, regset_store_func): New.
15315 (enum regset_type): New.
15316 (struct regset_info): Add type field. Use new operation types.
15317 (struct linux_target_ops): stop_pc renamed to get_pc.
15318 Add decr_pc_after_break and breakpoint_at.
15319 (get_process, get_thread_proess, get_process_thread)
15320 (strut process_info, all_processes, linux_attach_lwp)
15321 (thread_db_init): New.
15322
15323 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15324 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15325 (the_low_target): Add new members.
15326 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15327 (i386_store_fpxregset): Constify.
15328 (target_regsets): Add new kind identifier.
15329 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15330 (i386_set_pc): Add debugging.
15331 (i386_breakpoint_at): New function.
15332 (the_low_target): Add new members.
15333 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15334 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15335 (mips_breakpoint_at): New.
15336 (the_low_target): Add new members.
15337 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15338 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15339 (the_low_target): Add new members.
15340 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15341 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15342 (the_low_target): Add new members.
15343 * linux-x86-64-low.c (target_regsets): Add new kind
15344 identifier.
15345
153462002-05-15 Daniel Jacobowitz <drow@mvista.com>
15347
15348 From Martin Pool <mbp@samba.org>:
15349 * server.c (gdbserver_usage): New function.
15350 (main): Call it.
15351
153522002-05-14 Daniel Jacobowitz <drow@mvista.com>
15353
15354 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15355 stop_at -> stop_pc.
15356
153572002-05-04 Andrew Cagney <ac131313@redhat.com>
15358
15359 * Makefile.in: Remove obsolete code.
15360
153612002-04-24 Michal Ludvig <mludvig@suse.cz>
15362
15363 * linux-low.c (regsets_fetch_inferior_registers),
15364 (regsets_store_inferior_registers): Removed cast to int from
15365 ptrace() calls.
15366 * regcache.h: Added declaration of struct inferior_info.
15367
153682002-04-20 Daniel Jacobowitz <drow@mvista.com>
15369
15370 * inferiors.c (struct inferior_info): Add regcache_data.
15371 (add_inferior): Call create_register_cache.
15372 (clear_inferiors): Call free_register_cache.
15373 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15374 * regcache.c (struct inferior_regcache_data): New.
15375 (registers): Remove.
15376 (get_regcache): New function.
15377 (create_register_cache, free_register_cache): New functions.
15378 (set_register_cache): Don't initialize the register cache here.
15379 (registers_to_string, registers_from_string, register_data): Call
15380 get_regcache.
15381 * regcache.h: Add prototypes.
15382 * server.h: Likewise.
15383
153842002-04-20 Daniel Jacobowitz <drow@mvista.com>
15385
15386 * mem-break.c: New file.
15387 * mem-break.h: New file.
15388 * Makefile.in: Add mem-break.o rule; update server.h
15389 dependencies.
15390 * inferiors.c (struct inferior_info): Add target_data
15391 member.
15392 (clear_inferiors): Free target_data member if set.
15393 (inferior_target_data, set_inferior_target_data): New functions.
15394 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15395 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15396 * linux-low.c (linux_bp_reinsert): New variable.
15397 (struct inferior_linux_data): New.
15398 (linux_create_inferior): Use set_inferior_target_data.
15399 (linux_attach): Likewise. Call add_inferior.
15400 (linux_wait_for_one_inferior): New function.
15401 (linux_wait): Call it.
15402 (linux_write_memory): Add const.
15403 (initialize_low): Call set_breakpoint_data.
15404 * linux-low.h (struct linux_target_ops): Add breakpoint
15405 handling members.
15406 * server.c (attach_inferior): Remove extra add_inferior
15407 call.
15408 * server.h: Include mem-break.h. Update inferior.c
15409 prototypes.
15410 * target.c (read_inferior_memory)
15411 (write_inferior_memory): New functions.
15412 * target.h (read_inferior_memory)
15413 (write_inferior_memory): Change macros to prototypes.
15414 (struct target_ops): Update comments. Add const to write_memory
15415 definition.
15416
154172002-04-11 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * linux-low.c (usr_store_inferior_registers): Support
15420 registers which are allowed to fail to store.
15421 * linux-low.h (linux_target_ops): Likewise.
15422 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15423 (ppc_cannot_store_register): FPSCR may not be storable.
15424
154252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15426
15427 * server.h: Include <string.h> if HAVE_STRING_H.
15428 * ChangeLog: Correct paths in last ChangeLog entry.
15429
154302002-04-09 Daniel Jacobowitz <drow@mvista.com>
15431
15432 * linux-low.h: Remove obsolete prototypes.
15433 (struct linux_target_ops): New.
15434 (extern the_low_target): New.
15435 * linux-low.c (num_regs, regmap): Remove declarations.
15436 (register_addr): Use the_low_target explicitly.
15437 (fetch_register): Likewise.
15438 (usr_fetch_inferior_registers): Likewise.
15439 (usr_store_inferior_registers): Likewise.
15440 * linux-arm-low.c (num_regs): Remove.
15441 (arm_num_regs): Define.
15442 (arm_regmap): Renamed from regmap, made static.
15443 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15444 made static.
15445 (arm_cannot_store_register): Renamed from cannot_store_register,
15446 made static.
15447 (the_low_target): New.
15448 * linux-i386-low.c (num_regs): Remove.
15449 (i386_num_regs): Define.
15450 (i386_regmap): Renamed from regmap, made static.
15451 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15452 made static.
15453 (i386_cannot_store_register): Renamed from cannot_store_register,
15454 made static.
15455 (the_low_target): New.
15456 * linux-ia64-low.c (num_regs): Remove.
15457 (ia64_num_regs): Define.
15458 (ia64_regmap): Renamed from regmap, made static.
15459 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15460 made static.
15461 (ia64_cannot_store_register): Renamed from cannot_store_register,
15462 made static.
15463 (the_low_target): New.
15464 * linux-m68k-low.c (num_regs): Remove.
15465 (m68k_num_regs): Define.
15466 (m68k_regmap): Renamed from regmap, made static.
15467 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15468 made static.
15469 (m68k_cannot_store_register): Renamed from cannot_store_register,
15470 made static.
15471 (the_low_target): New.
15472 * linux-mips-low.c (num_regs): Remove.
15473 (mips_num_regs): Define.
15474 (mips_regmap): Renamed from regmap, made static.
15475 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15476 made static.
15477 (mips_cannot_store_register): Renamed from cannot_store_register,
15478 made static.
15479 (the_low_target): New.
15480 * linux-ppc-low.c (num_regs): Remove.
15481 (ppc_num_regs): Define.
15482 (ppc_regmap): Renamed from regmap, made static.
15483 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15484 made static.
15485 (ppc_cannot_store_register): Renamed from cannot_store_register,
15486 made static.
15487 (the_low_target): New.
15488 * linux-s390-low.c (num_regs): Remove.
15489 (s390_num_regs): Define.
15490 (s390_regmap): Renamed from regmap, made static.
15491 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15492 made static.
15493 (s390_cannot_store_register): Renamed from cannot_store_register,
15494 made static.
15495 (the_low_target): New.
15496 * linux-sh-low.c (num_regs): Remove.
15497 (sh_num_regs): Define.
15498 (sh_regmap): Renamed from regmap, made static.
15499 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15500 made static.
15501 (sh_cannot_store_register): Renamed from cannot_store_register,
15502 made static.
15503 (the_low_target): New.
15504 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15505 (the_low_target): New.
15506
155072002-04-09 Daniel Jacobowitz <drow@mvista.com>
15508
15509 * Makefile.in: Add stamp-h target.
15510 * configure.in: Create stamp-h.
15511 * configure: Regenerated.
15512
155132002-04-09 Daniel Jacobowitz <drow@mvista.com>
15514
15515 * inferiors.c: New file.
15516 * target.c: New file.
15517 * target.h: New file.
15518 * Makefile.in: Add target.o and inferiors.o. Update
15519 dependencies.
15520 * linux-low.c (inferior_pid): New static variable,
15521 moved from server.c.
15522 (linux_create_inferior): Renamed from create_inferior.
15523 Call add_inferior. Return 0 on success instead of a PID.
15524 (linux_attach): Renamed from myattach.
15525 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15526 (linux_thread_alive): Renamed from mythread_alive.
15527 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15528 child dies.
15529 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15530 (regsets_store_inferior_registers): Correct error message.
15531 Add missing ``return 0''.
15532 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15533 (linux_store_registers): Renamed from store_inferior_registers.
15534 (linux_read_memory): Renamed from read_inferior_memory.
15535 (linux_write_memory): Renamed from write_inferior_memory.
15536 (linux_target_ops): New structure.
15537 (initialize_low): Call set_target_ops ().
15538 * remote-utils.c (unhexify): New function.
15539 (hexify): New function.
15540 (input_interrupt): Send signals to ``signal_pid''.
15541 * server.c (inferior_pid): Remove.
15542 (start_inferior): Update create_inferior call.
15543 (attach_inferior): Call add_inferior.
15544 (handle_query): New function.
15545 (main): Call handle_query for `q' packets.
15546 * server.h: Include "target.h". Remove obsolete prototypes.
15547 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15548
155492002-04-09 Daniel Jacobowitz <drow@mvista.com>
15550
15551 * Makefile.in: Add WARN_CFLAGS. Update configury
15552 dependencies.
15553 * configure.in: Check for <string.h>
15554 * configure: Regenerate.
15555 * config.in: Regenerate.
15556 * gdbreplay.c: Include needed system headers.
15557 (remote_open): Remove strchr prototype.
15558 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15559 * regcache.c (supply_register): Change buf argument to const void *.
15560 (supply_register_by_name): Likewise.
15561 (collect_register): Change buf argument to void *.
15562 (collect_register_by_name): Likewise.
15563 * regcache.h: Add missing prototypes.
15564 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15565 * server.c (handle_query): New function.
15566 (attached): New static variable, moved out of main.
15567 (main): Quiet longjmp clobber warnings.
15568 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15569 * utils.c (error): Remove NORETURN.
15570 (fatal): Likewise.