]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/remote.c: Eliminate target_buf/target_buf_size hack
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5b9ca4d4
PA
12017-09-29 Pedro Alves <palves@redhat.com>
2
3 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4 fails.
5
94c207e0
PA
62017-09-29 Pedro Alves <palves@redhat.com>
7
8 * linux-low.c (handle_extended_wait): Pass parent thread instead
9 of process to thread_db_notice_clone.
10 * linux-low.h (thread_db_notice_clone): Replace parent process
11 parameter with parent thread parameter.
12 * thread-db.c (find_one_thread): Add comment.
13 (thread_db_notice_clone): Replace parent process parameter with
14 parent thread parameter. Temporarily switch to the parent thread.
15
75352e28
SDJ
162017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
17
18 * gdbthread.h: Include "common-gdbthread.h".
19 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
20 "if" when validating the ptid.
21 * remote-utils.c: Include "gdbthread.h".
22 (prepare_resume_reply): Use "switch_to_thread".
23 * target.c (done_accessing_memory): Likewise.
24
ad339634
AA
252017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
26
27 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
28 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
29 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
30 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
31 s390x-gs-linux64-ipa.o to ipa_obj.
32 * linux-s390-low.c (HWCAP_S390_GS): New define.
33 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
34 New functions.
35 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
36 (s390_arch_setup): Check for guarded-storage support and choose
37 appropriate tdesc.
38 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
39 init_registers_s390x_gs_linux64.
40 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
41 enum value.
42 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
43 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
44
cc4d742f
SM
452017-09-22 Simon Marchi <simon.marchi@ericsson.com>
46
47 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
48
f6327dcb
KB
492017-09-21 Kevin Buettner <kevinb@redhat.com>
50
51 * linux-low.h (struct lwp_info): Add new field, thread_handle.
52 (thread_db_thread_handle): Declare.
53 * linux-low.c (linux_target_ops): Initialize thread_handle.
54 * server.c (handle_qxfer_threads_worker): Add support for
55 "handle" attribute.
56 * target.h (struct target_ops): Add new function pointer,
57 thread_handle.
58 (target_thread_handle): Define.
59 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
60 field in lwp.
61 (thread_db_thread_handle): New function.
62
86299109
KB
632017-09-21 Kevin Buettner <kevinb@redhat.com>
64
65 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
66 * linux-low.h (thread_db_notice_clone): Declare.
67 * thread-db.c (thread_db_notice_clone): New function.
68
f557a88a
PA
692017-09-21 Pedro Alves <palves@redhat.com>
70
71 * server.c (gdb_read_memory, handle_status, process_serial_event)
72 (handle_serial_event, handle_target_event): Adjust to
73 set_desired_thread prototype change.
74 * target.c (set_desired_thread): Remove 'use_general' parameter
75 and adjust.
76 * target.h (set_desired_thread): Remove 'use_general' parameter.
77
223ffa71
TT
782017-09-20 Tom Tromey <tom@tromey.com>
79
80 * target.c (target_terminal::terminal_state): Define.
81 (target_terminal::init): Rename from target_terminal_init.
82 (target_terminal::inferior): Rename from
83 target_terminal_inferior.
84 (target_terminal::ours): Rename from target_terminal_ours.
85 (target_terminal::ours_for_output, target_terminal::info): New.
86
04fd3ba9
SM
872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
88
89 * server.c (accumulate_file_name_length): Remove.
90 (emit_dll_description): Adjust to std::string change.
91 (handle_qxfer_libraries): Use std::string to hold document.
92
5e187554
SM
932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
94
95 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
96 return type of xml_escape_text.
97 * server.c (emit_dll_description): Likewise.
98
1526853e
SM
992017-09-16 Simon Marchi <simon.marchi@ericsson.com>
100
101 * server.c (captured_main): Accept argument for --selftest.
102 Update run_tests call.
103 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
104 when registering selftests.
105
c4dfafab
SDJ
1062017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
107
108 * regcache.c (get_thread_regcache): Update code to use "std::vector"
109 instead of "VEC" for "target_desc.reg_defs".
110 (regcache_cpy): Likewise.
111 (registers_to_string): Likewise.
112 (registers_from_string): Likewise.
113 (find_regno): Likewise.
114 (supply_regblock): Likewise.
115 (regcache_raw_read_unsigned): Likewise.
116 * tdesc.c (init_target_desc): Likewise.
117 (tdesc_create_reg): Likewise.
118 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
119 (struct target_desc) <reg_defs>: Convert to "std::vector".
120 (target_desc): Do not initialize "reg_defs".
121 (~target_desc): Update code to use "std::vector" instead of "VEC"
122 for "target_desc.reg_defs".
123 (operator==): Likewise.
124
124aceb4
SM
1252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
126
127 * inferiors.h (thread_to_gdb_id): Remove.
128 * inferiors.c (thread_to_gdb_id): Remove.
129 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
130 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
131 lynx_store_registers, lynx_read_memory, lynx_write_memory):
132 Likewise.
133 * nto-low.c (nto_fetch_registers, nto_store_registers,
134 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
135
96cde54f
SM
1362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
137
138 * inferiors.h (gdb_id_to_thread_id): Remove.
139 * inferiors.c (gdb_id_to_thread_id): Remove.
140 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
141 removal. Move pid declaration closer to where it's used.
142
e8ca139e
SM
1432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
144
145 * server.c (handle_detach): New function.
146 (process_serial_event): Move code out, call handle_detach.
147
f8a4e119
SM
1482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
149
150 * server.c (require_running): Rename to ...
151 (require_running_or_return): ... this ...
152 (require_running_or_break): ... and this.
153 (handle_query, process_serial_event): Adjust.
154
0eb0a407
SM
1552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
156
157 * linux-low.c (linux_set_resume_request): Remove unused
158 variables.
159
785922a5
SM
1602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
161
162 * server.c (first_thread_of): Remove.
163 (process_serial_event): Replace usage of first_thread_of with
164 find_any_thread_of_pid.
165 * tracepoint.c (same_process_p): Remove.
166 (gdb_agent_about_to_close): Replace usage of same_process_p with
167 find_any_thread_of_pid.
168 * linux-x86-low.c (same_process_callback): Remove.
169 (x86_arch_setup_process_callback): Replace usage of
170 same_process_callback with find_any_thread_of_pid.
171 * thread-db.c (any_thread_of): Remove.
172 (switch_to_process): Replace usage of any_thread_of with
173 find_any_thread_of_pid.
174 * inferiors.c (thread_pid_matches_callback): Remove.
175 (find_thread_process): Adjust to use find_any_thread_of_pid.
176
a059f00c
SDJ
1772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
178
179 * regcache.c (get_thread_regcache): Guard calls to "memset"
180 with "!VEC_empty".
181
cc397f3a
SDJ
1822017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
183
184 * linux-low.c (handle_extended_wait): Use
185 "allocate_target_description" instead of "XNEW".
186 * linux-x86-low.c (initialize_low_arch): Likewise.
187
22916b07
YQ
1882017-09-05 Yao Qi <yao.qi@linaro.org>
189
190 * configure.srv (srv_i386_regobj): Remove.
191 (srv_amd64_regobj): Remove.
192 (srv_regobj): Set it to "" for x86 non-linux targets.
193 * linux-x86-tdesc.c (i386_linux_read_description):
194 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
195 (init_registers_i386): Remove the declaration.
196 (tdesc_i386): Remove the declaration.
197 (lynx_i386_arch_setup): Call i386_create_target_description.
198 * nto-x86-low.c: Likewise.
199 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
200 [!__x86_64__]: include arch/i386.h.
201 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
202
38602d55
YQ
2032017-09-05 Yao Qi <yao.qi@linaro.org>
204
205 * configure.srv (srv_amd64_linux_xmlfiles): Remove
206 i386/amd64-XXX-linux from it.
207
44b886ff
YQ
2082017-09-05 Yao Qi <yao.qi@linaro.org>
209
210 * configure.srv: Empty srv_amd64_linux_regobj if $development is
211 false.
212 (ipa_amd64_linux_regobj): Remove.
213 (ipa_x32_linux_regobj): Remove.
214
b4570e4b
YQ
2152017-09-05 Yao Qi <yao.qi@linaro.org>
216
217 * Makefile.in (arch-amd64.o): New rule.
218 * configure.srv: Append arch-amd64.o.
219 * linux-amd64-ipa.c: Include common/x86-xstate.h.
220 (get_ipa_tdesc): Call amd64_linux_read_description.
221 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
222 and init_registers_amd64_XXX.
223 * linux-x86-low.c (x86_linux_read_description): Call
224 amd64_linux_read_description.
225 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
226 (initialize_low_arch): Don't call init_registers_x32_XXX and
227 init_registers_amd64_XXX.
228 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
229 and tdesc_amd64_XXX.
230 [__x86_64__] (amd64_tdesc_test): New function.
231 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
232 and init_registers_amd64_XXX.
233 * linux-x86-tdesc.c: Include arch/amd64.h.
234 (xcr0_to_tdesc_idx): New function.
235 (i386_linux_read_description): New function.
236 (amd64_get_ipa_tdesc_idx): New function.
237 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
238 (amd64_get_ipa_tdesc): Declare.
239
d1f28ea2
YQ
2402017-09-05 Yao Qi <yao.qi@linaro.org>
241
242 * configure.srv (srv_i386_linux_xmlfiles): Remove
243 i386/i386-XXX-linux.xml from it.
244
25a93583
YQ
2452017-09-05 Yao Qi <yao.qi@linaro.org>
246
247 * configure.srv: Set srv_i386_linux_regobj empty if $development
248 is false.
249 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
250 initialize_low_tdesc.
251 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
252 with #if initialize_low_tdesc.
253 * linux-x86-tdesc-selftest.c: New file.
254 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
255
5f035c07
YQ
2562017-09-05 Yao Qi <yao.qi@linaro.org>
257
258 * Makefile.in (arch-i386.o): New rule.
259 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
260 (x86_64-*-linux*): Likewise.
261 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
262 include arch/i386.h.
263 (i386_linux_read_description): Remove code and call
264 i386_create_target_description.
265 * tdesc.c (allocate_target_description): New function.
266 * tdesc.h (set_tdesc_architecture): Remove declaration.
267 (set_tdesc_osabi): Likewise.
268
0abe8a89
YQ
2692017-09-05 Yao Qi <yao.qi@linaro.org>
270
271 * linux-x86-tdesc.c: Don't include <inttypes.h>.
272 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
273 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
274 .xmltarget.
275 * server.c (get_features_xml): Call tdesc_get_features_xml.
276 * tdesc.c (set_tdesc_architecture): New function.
277 (set_tdesc_osabi): New function.
278 (tdesc_get_features_xml): New function.
279 (tdesc_create_feature): Add an argument.
280 * tdesc.h (struct target_desc) <features>: New field.
281 <arch, osabi>: New field.
282 (~target_desc): xfree features, arch, and osabi.
283 (target_desc::oerator==): Don't compare .xmltarget.
284 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
285 (set_tdesc_osabi): Likewise.
286 (tdesc_get_features_xml): Likewise.
287
0a188386
YQ
2882017-09-05 Yao Qi <yao.qi@linaro.org>
289
290 * linux-x86-tdesc.c: Include selftest.h.
291 (i386_tdesc_test): New function.
292 (initialize_low_tdesc): Call selftests::register_test.
293 * tdesc.h: Include regdef.h.
294 (target_desc): Override operator == and !=.
295
f49ff000
YQ
2962017-09-05 Yao Qi <yao.qi@linaro.org>
297
298 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
299 (ipa_obj): Likewise.
300 * linux-i386-ipa.c: Include common/x86-xstate.h
301 (get_ipa_tdesc): Call i386_linux_read_description.
302 (initialize_low_tracepoint): Don't call init_registers_XXX
303 functions, call initialize_low_tdesc instead.
304 * linux-x86-low.c (x86_linux_read_description): Call
305 i386_linux_read_description.
306 (initialize_low_arch): Don't call init_registers_i386_XXX
307 functions, call initialize_low_tdesc.
308 * linux-x86-tdesc.c: New file.
309 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
310 (i386_get_ipa_tdesc_idx): Declare.
311 (i386_get_ipa_tdesc): Declare.
312 (initialize_low_tdesc): Declare.
313
2b68ef2f
YQ
3142017-09-05 Yao Qi <yao.qi@linaro.org>
315
316 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
317 instead of 0.
318
f7000548
YQ
3192017-09-05 Yao Qi <yao.qi@linaro.org>
320
321 * Makefile.in (IPA_OBJS): Add vec-ipa.o
322 * regcache.c (get_thread_regcache): Use VEC_length.
323 (init_register_cache): Likewise.
324 (regcache_cpy): Likewise.
325 (registers_to_string): Iterate reg_defs via VEC_iterate.
326 (find_regno): Likewise.
327 (find_register_by_number): Use VEC_index.
328 (register_size): Call find_register_by_number.
329 (register_data): Call find_register_by_number.
330 (supply_regblock): Use VEC_length.
331 (regcache_raw_read_unsigned): Likewise.
332 * tdesc.c (init_target_desc): Iterate reg_defs via
333 VEC_iterate.
334 (default_description): Update initializer.
335 (copy_target_description): Don't update field num_registers.
336 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
337 <num_registers>: Remove.
338
50a421ac
SM
3392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
340
341 * Makefile.in (.SECONDARY): Define target.
342
23fdd69e
SM
3432017-09-03 Simon Marchi <simon.marchi@ericsson.com>
344
345 * linux-low.c (linux_wait_1): Adjust.
346 * server.c (queue_stop_reply_callback): Adjust.
347
0a2dde4a
SDJ
3482017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
349
350 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
351 QEnvironmentUnset and QEnvironmentReset packets.
352 (handle_query): Inform remote that QEnvironmentHexEncoded,
353 QEnvironmentUnset and QEnvironmentReset are supported.
354
6afd337d
SM
3552017-08-25 Simon Marchi <simon.marchi@ericsson.com>
356
357 * inferiors.h (inferior_target_data): Rename to ...
358 (thread_target_data): ... this.
359 (inferior_regcache_data): Rename to ...
360 (thread_regcache_data): ... this.
361 (set_inferior_regcache_data): Rename to ...
362 (set_thread_regcache_data): ... this.
363 * inferiors.c (inferior_target_data): Rename to ...
364 (thread_target_data): ... this.
365 (inferior_regcache_data): Rename to ...
366 (thread_regcache_data): ... this.
367 (set_inferior_regcache_data): Rename to ...
368 (set_thread_regcache_data): ... this.
369 (free_one_thread): Update.
370 * linux-low.h (get_thread_lwp): Update.
371 * regcache.c (get_thread_regcache): Update.
372 (regcache_invalidate_thread): Update.
373 (free_register_cache_thread): Update.
374 * win32-i386-low.c (update_debug_registers_callback): Update.
375 (win32_get_current_dr): Update.
376 * win32-low.c (thread_rec): Update.
377 (delete_thread_info): Update.
378 (continue_one_thread): Update.
379 (suspend_one_thread): Update.
380
a160cc46
SM
3812017-08-24 Simon Marchi <simon.marchi@ericsson.com>
382
383 * inferiors.c (set_inferior_target_data): Remove.
384 * inferiors.h (set_inferior_target_data): Remove.
385
6d580b63
YQ
3862017-08-18 Yao Qi <yao.qi@linaro.org>
387
388 * Makefile.in (OBS): Add selftest.o.
389 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
390 * configure, config.in: Re-generated.
391 * server.c: Include common/sefltest.h.
392 (captured_main): Handle option --selftest.
393
f5a29eb0
YQ
3942017-08-09 Yao Qi <yao.qi@linaro.org>
395
396 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
397 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
398 i386-avx-mpx.o and i386-mmx.o.
399 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
400 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
401 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
402 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
403 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
404 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
405 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
406 i386/amd64-avx-mpx.xml.
407
57757c2f
YQ
4082017-08-09 Yao Qi <yao.qi@linaro.org>
409
410 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
411 and x32-avx-avx512.o.
412 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
413 i386/x32-avx-avx512.xml.
414
229d26fc
SM
4152017-07-26 Simon Marchi <simon.marchi@ericsson.com>
416
417 * tracepoint.h (enum class fast_tpoint_collect_result): New
418 enumeration.
419 (fast_tracepoint_collecting): Change return type to
420 fast_tpoint_collect_result.
421 * tracepoint.c (fast_tracepoint_collecting): Likewise.
422 * linux-low.h: Include tracepoint.h.
423 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
424 fast_tpoint_collect_result.
425 * linux-low.c (handle_tracepoints): Adjust.
426 (linux_fast_tracepoint_collecting): Change return type to
427 fast_tpoint_collect_result.
428 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
429 linux_wait_1, stuck_in_jump_pad_callback,
430 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
431 proceed_one_lwp): Adjust to type change.
432
2e1e43e1
YQ
4332017-07-10 Yao Qi <yao.qi@linaro.org>
434
435 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
436
adc764e7
YQ
4372017-06-29 Yao Qi <yao.qi@linaro.org>
438
439 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
440 Remove.
441 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
442
a206891a
SM
4432017-06-20 Simon Marchi <simon.marchi@ericsson.com>
444
445 * Makefile.in (IPA_OBJS): Sort and format one item per line.
446
9a6c7d9c
SDJ
4472017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
448
449 * linux-low.c (linux_create_inferior): Adjust code to access the
450 environment information via 'gdb_environ' class.
451 * lynx-low.c (lynx_create_inferior): Likewise.
452 * server.c (our_environ): Make it an instance of 'gdb_environ'.
453 (get_environ): Return a pointer to 'our_environ'.
454 (captured_main): Initialize 'our_environ'.
455 * server.h (get_environ): Adjust prototype.
456 * spu-low.c (spu_create_inferior): Adjust code to access the
457 environment information via 'gdb_environ' class.
458
ae3e2ccf
SM
4592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
460
461 * linux-low.c (linux_read_memory, linux_write_memory): Remove
462 usage of "register" keyword.
463
3e019bdc
SM
4642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
465
466 * configure: Re-generate.
467
8465943a
SM
4682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
469
470 * configure: Re-generate.
471
cf0dd6f0
SM
4722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
473
474 * Makefile.in (COMPILE.pre): Add "-x c++".
475
9845682b
SDJ
4762017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
477
478 * fork-child.c: Conditionally include <signal.h>.
479
aefd8b33
SDJ
4802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
481
482 * server.c (handle_general_set): Handle new packet
483 "QStartupWithShell".
484 (handle_query): Add "QStartupWithShell" to the list of supported
485 packets.
486 (gdbserver_usage): Add help text explaining the
487 new "--startup-with-shell" and "--no-startup-with-shell" CLI
488 options.
489 (captured_main): Recognize and act upon the presence of the new
490 CLI options.
491
2090129c
SDJ
4922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
493 Pedro Alves <palves@redhat.com>
494
495 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
496 * configure: Regenerate.
497 * configure.srv (srv_linux_obj): Add "fork-child.o" and
498 "fork-inferior.o".
499 (i[34567]86-*-lynxos*): Likewise.
500 (spu*-*-*): Likewise.
501 * fork-child.c: New file.
502 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
503 and "environ.h".
504 (linux_ptrace_fun): New function.
505 (linux_create_inferior): Adjust function prototype to reflect
506 change on "target.h". Adjust function code to use
507 "fork_inferior".
508 (linux_request_interrupt): Delete "signal_pid".
509 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
510 (lynx_ptrace_fun): New function.
511 (lynx_create_inferior): Adjust function prototype to reflect
512 change on "target.h". Adjust function code to use
513 "fork_inferior".
514 * nto-low.c (nto_create_inferior): Adjust function prototype and
515 code to reflect change on "target.h". Update comments.
516 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
517 "common-terminal.h" and "environ.h".
518 (terminal_fd): Moved to fork-child.c.
519 (old_foreground_pgrp): Likewise.
520 (restore_old_foreground_pgrp): Likewise.
521 (last_status): Make it global.
522 (last_ptid): Likewise.
523 (our_environ): New variable.
524 (startup_with_shell): Likewise.
525 (program_name): Likewise.
526 (program_argv): Rename to...
527 (program_args): ...this.
528 (wrapper_argv): New variable.
529 (start_inferior): Delete function.
530 (get_exec_wrapper): New function.
531 (get_exec_file): Likewise.
532 (get_environ): Likewise.
533 (prefork_hook): Likewise.
534 (post_fork_inferior): Likewise.
535 (postfork_hook): Likewise.
536 (postfork_child_hook): Likewise.
537 (handle_v_run): Update code to deal with arguments coming from the
538 remote host. Update calls from "start_inferior" to
539 "create_inferior".
540 (captured_main): Likewise. Initialize environment variable. Call
541 "have_job_control".
542 * server.h (post_fork_inferior): New prototype.
543 (get_environ): Likewise.
544 (last_status): Declare.
545 (last_ptid): Likewise.
546 (signal_pid): Likewise.
547 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
548 (spu_ptrace_fun): New function.
549 (spu_create_inferior): Adjust function prototype to reflect change
550 on "target.h". Adjust function code to use "fork_inferior".
551 * target.c (target_terminal_init): New function.
552 (target_terminal_inferior): Likewise.
553 (target_terminal_ours): Likewise.
554 * target.h: Include <vector>.
555 (struct target_ops) <create_inferior>: Update prototype.
556 (create_inferior): Update macro.
557 * utils.c (gdb_flush_out_err): New function.
558 * win32-low.c (win32_create_inferior): Adjust function prototype
559 and code to reflect change on "target.h".
560
043a4934
SDJ
5612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
562
563 * inferiors.c (switch_to_thread): New function.
564
15652511
SDJ
5652017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * Makefile.in (SFILE): Add "common/job-control.c".
568 (OBS): Add "job-control.o".
569
21ea5acd
SDJ
5702017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
571
572 * Makefile: Remove "@host_makefile_frag@".
573
e13cb306
PA
5742017-05-05 Pedro Alves <palves@redhat.com>
575
576 * configure: Regenerate.
577
c94fee56
SDJ
5782017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
579
580 * configure: Regenerate.
581
a0ff9e1a
SM
5822017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
585 software_single_step change of return type to
586 std::vector<CORE_ADDR>.
587 * linux-low.c (install_software_single_step_breakpoints):
588 Likewise.
589 * linux-low.h (install_software_single_step_breakpoints):
590 Likewise.
591
be628ab8
SDJ
5922017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
593
594 * remote-utils.c: Include "gdb_termios.h" instead of
595 "terminal.h".
596 * terminal.h: Delete file.
597
7c5ded6a
SDJ
5982017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
599
600 * server.c: Include <vector>.
601 <program_argv, wrapper_argv>: Convert to std::vector.
602 (start_inferior): Rewrite function to use C++.
603 (handle_v_run): Likewise. Update code that calculates the argv
604 based on the vRun packet; use C++.
605 (captured_main): Likewise.
606
436252de
SM
6072017-04-06 Simon Marchi <simon.marchi@ericsson.com>
608
609 * server.c (handle_v_cont): Initialize thread_resume::thread
610 with null_ptid.
611
9bf2a700
PA
6122017-04-05 Pedro Alves <palves@redhat.com>
613
614 * configure: Regenerate.
615
a121b7c1
PA
6162017-04-05 Pedro Alves <palves@redhat.com>
617
618 * gdbreplay.c (sync_error): Constify.
619 * linux-x86-low.c (push_opcode): Constify.
620
21c8a587
PA
6212017-04-05 Pedro Alves <palves@redhat.com>
622
623 * win32-low.c (get_child_debug_event)
624 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
625 Report TARGET_WAITKIND_SPURIOUS instead.
626
fb32b4f7
PA
6272017-04-05 Pedro Alves <palves@redhat.com>
628
629 * remote-utils.c (remote_prepare, remote_open): Constify.
630 * remote-utils.h (remote_prepare, remote_open): Constify.
631 * server.c (captured_main): Constify 'port' handling.
632
65dd1e59
SM
6332017-04-04 Simon Marchi <simon.marchi@ericsson.com>
634
635 * Makefile.in (clean): Clear .deps.
636
8fa5b777
SM
6372017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
638
639 * .gitignore: Remove generated files, replace with wildcard.
640 * (clean): Replace removal of generated files with wildcard.
641 (version.c): Replace with...
642 (version-generated.c): ...this.
643 (xml-builtin.c): Replace with...
644 (xml-builtin-generated.c): ...this.
645 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
646 (%.c: *regformats*): Replace with...
647 (%-generated.c: *regformats*): ...this.
648
a12e714b
MF
6492017-03-27 Max Filippov <jcmvbkbc@gmail.com>
650
651 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
652 (xtensa_fill_gregset): Call collect_register_by_name for
653 threadptr register.
654 (xtensa_store_gregset): Call supply_register_by_name for
655 threadptr register.
656
1a09b50a
MF
6572017-03-27 Max Filippov <jcmvbkbc@gmail.com>
658
659 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
660 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
661 (xtensa_store_gregset): Call supply_register for all registers in
662 a0_regnum..a0_regnum + C0_NREGS range.
663
1a01e7c6
SM
6642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
665
666 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
667 (ax-ipa.o: ax.c): Remove.
668 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
669 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
670 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
671 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
672 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
673
36bc18a8
SM
6742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
675
676 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
677 (print-utils-ipa.o: ../common/print-utils.c): Remove.
678 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
679 (errors-ipa.o: ../common/errors.c): Remove.
680 (format-ipa.o: ../common/format.c): Remove.
681 (common-utils-ipa.o: ../common/common-utils.c): Remove.
682
a8ebe3d5
SM
6832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
684
685 * Makefile.in (%-ipa.o: %.c): New rule.
686 (tracepoint-ipa.o: tracepoint.c): Remove.
687 (utils-ipa.o: utils.c): Remove.
688 (remote-utils-ipa.o: remote-utils.c): Remove.
689 (regcache-ipa.o: regcache.c): Remove.
690 (i386-linux-ipa.o: i386-linux.c): Remove.
691 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
692 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
693 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
694 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
695 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
696 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
697 (amd64-linux-ipa.o: amd64-linux.c): Remove.
698 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
699 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
700 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
701 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
702 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
703 (aarch64-ipa.o: aarch64.c): Remove.
704 (s390-linux32-ipa.o: s390-linux32.c): Remove.
705 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
706 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
707 (s390-linux64-ipa.o: s390-linux64.c): Remove.
708 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
709 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
710 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
711 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
712 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
713 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
714 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
715 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
716 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
717 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
718 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
719 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
720 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
721 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
722 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
723 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
724 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
725 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
726 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
727 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
728 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
729 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
730 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
731 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
732 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
733 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
734 (tdesc-ipa.o: tdesc.c): Remove.
735 (x32-linux-ipa.o: x32-linux.c): Remove.
736 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
737 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
738
50cfacb7
SM
7392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
740
741 * Makefile.in (%.o: ../arch/%.c): New rule.
742 (arm.o: ../arch/arm.c): Remove.
743 (arm-linux.o: ../arch/arm-linux.c): Remove.
744 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
745 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
746
c5a22423
SM
7472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
748
749 * Makefile.in (%.o: ../nat/%.c): New rule.
750 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
751 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
752 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
753 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
754 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
755 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
756 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
757 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
758 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
759 (linux-personality.o: ../nat/linux-personality.c): Remove.
760 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
761 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
762 (x86-linux.o: ../nat/x86-linux.c): Remove.
763 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
764 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
765
6bda016b
SM
7662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
767
768 * Makefile.in (%.o: ../common/%.c): New rule.
769 (signals.o: ../common/signals.c): Remove.
770 (print-utils.o: ../common/print-utils.c): Remove.
771 (rsp-low.o: ../common/rsp-low.c): Remove.
772 (common-utils.o: ../common/common-utils.c): Remove.
773 (posix-strerror.o: ../common/posix-strerror.c): Remove.
774 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
775 (vec.o: ../common/vec.c): Remove.
776 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
777 (xml-utils.o: ../common/xml-utils.c): Remove.
778 (ptid.o: ../common/ptid.c): Remove.
779 (buffer.o: ../common/buffer.c): Remove.
780 (format.o: ../common/format.c): Remove.
781 (filestuff.o: ../common/filestuff.c): Remove.
782 (agent.o: ../common/agent.c): Remove.
783 (errors.o: ../common/errors.c): Remove.
784 (environ.o: ../common/environ.c): Remove.
785 (common-debug.o: ../common/common-debug.c): Remove.
786 (cleanups.o: ../common/cleanups.c): Remove.
787 (common-exceptions.o: ../common/common-exceptions.c): Remove.
788 (fileio.o: ../common/fileio.c): Remove.
789 (common-regcache.o: ../common/common-regcache.c): Remove.
790 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
791 (new-op.o: ../common/new-op.c): Remove.
792 (btrace-common.o: ../common/btrace-common.c): Remove.
793
21122961
SM
7942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * Makefile.in (%.o: ../target/%.c): New rule.
797 (waitstatus.o: ../target/waitstatus.c): Remove.
798
c362e621
SM
7992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
800
801 * Makefile.in
802 (%.c: ../regformats/%.dat,
803 (%.c: ../regformats/arm/%.dat,
804 (%.c: ../regformats/i386/%.dat,
805 (%.c: ../regformats/rs6000/%.dat): New rules.
806 (aarch64.c): Remove.
807 (reg-arm.c): Remove.
808 (arm-with-iwmmxt.c): Remove.
809 (arm-with-vfpv2.c): Remove.
810 (arm-with-vfpv3.c): Remove.
811 (arm-with-neon.c): Remove.
812 (reg-bfin.c): Remove.
813 (reg-cris.c): Remove.
814 (reg-crisv32.c): Remove.
815 (i386.c): Remove.
816 (i386-linux.c): Remove.
817 (i386-avx.c): Remove.
818 (i386-avx-linux.c): Remove.
819 (i386-avx-avx512.c): Remove.
820 (i386-avx-avx512-linux.c): Remove.
821 (i386-mpx.c): Remove.
822 (i386-mpx-linux.c): Remove.
823 (i386-avx-mpx-avx512-pku.c): Remove.
824 (i386-avx-mpx-avx512-pku-linux.c): Remove.
825 (i386-avx-mpx.c): Remove.
826 (i386-avx-mpx-linux.c): Remove.
827 (i386-mmx.c): Remove.
828 (i386-mmx-linux.c): Remove.
829 (reg-ia64.c): Remove.
830 (reg-m32r.c): Remove.
831 (reg-m68k.c): Remove.
832 (reg-cf.c): Remove.
833 (mips-linux.c): Remove.
834 (mips-dsp-linux.c): Remove.
835 (mips64-linux.c): Remove.
836 (mips64-dsp-linux.c): Remove.
837 (nios2-linux.c): Remove.
838 (powerpc-32.c): Remove.
839 (powerpc-32l.c): Remove.
840 (powerpc-altivec32l.c): Remove.
841 (powerpc-cell32l.c): Remove.
842 (powerpc-vsx32l.c): Remove.
843 (powerpc-isa205-32l.c): Remove.
844 (powerpc-isa205-altivec32l.c): Remove.
845 (powerpc-isa205-vsx32l.c): Remove.
846 (powerpc-e500l.c): Remove.
847 (powerpc-64l.c): Remove.
848 (powerpc-altivec64l.c): Remove.
849 (powerpc-cell64l.c): Remove.
850 (powerpc-vsx64l.c): Remove.
851 (powerpc-isa205-64l.c): Remove.
852 (powerpc-isa205-altivec64l.c): Remove.
853 (powerpc-isa205-vsx64l.c): Remove.
854 (s390-linux32.c): Remove.
855 (s390-linux32v1.c): Remove.
856 (s390-linux32v2.c): Remove.
857 (s390-linux64.c): Remove.
858 (s390-linux64v1.c): Remove.
859 (s390-linux64v2.c): Remove.
860 (s390-te-linux64.c): Remove.
861 (s390-vx-linux64.c): Remove.
862 (s390-tevx-linux64.c): Remove.
863 (s390x-linux64.c): Remove.
864 (s390x-linux64v1.c): Remove.
865 (s390x-linux64v2.c): Remove.
866 (s390x-te-linux64.c): Remove.
867 (s390x-vx-linux64.c): Remove.
868 (s390x-tevx-linux64.c): Remove.
869 (tic6x-c64xp-linux.c): Remove.
870 (tic6x-c64x-linux.c): Remove.
871 (tic6x-c62x-linux.c): Remove.
872 (reg-sh.c): Remove.
873 (reg-sparc64.c): Remove.
874 (reg-spu.c): Remove.
875 (amd64.c): Remove.
876 (amd64-linux.c): Remove.
877 (amd64-avx.c): Remove.
878 (amd64-avx-linux.c): Remove.
879 (amd64-avx-avx512.c): Remove.
880 (amd64-avx-avx512-linux.c): Remove.
881 (amd64-mpx.c): Remove.
882 (amd64-mpx-linux.c): Remove.
883 (amd64-avx-mpx-avx512-pku.c): Remove.
884 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
885 (amd64-avx-mpx.c): Remove.
886 (amd64-avx-mpx-linux.c): Remove.
887 (x32.c): Remove.
888 (x32-linux.c): Remove.
889 (x32-avx.c): Remove.
890 (x32-avx-linux.c): Remove.
891 (x32-avx-avx512.c): Remove.
892 (x32-avx-avx512-linux.c): Remove.
893 (reg-xtensa.c): Remove.
894 (reg-tilegx.c): Remove.
895 (reg-tilegx32.c): Remove.
896
1672e0d9
SDJ
8972017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
898
899 * Makefile.in (SFILES): Add "common/environ.c".
900 (OBJS): Add "common/environ.h".
901
239b6d10
WT
9022017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
903
904 * configure.ac: Check if the fs_base and gs_base members of
905 `struct user_regs_struct' exist.
906 * config.in: Regenerated.
907 * configure: Likewise.
908
694b382c
AT
9092017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
910
911 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
912 target_read_memory.
913 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
914 (get_next_pcs_syscall_next_pc): Likewise.
915
7dc53023
LM
9162016-12-23 Luis Machado <lgustavo@codesourcery.com>
917
918 * win32-i386-low.c: Fix incorrect reference to a couple source files.
919 * nto-x86-low.c: Likewise.
920
ad02e4fe
SM
9212016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
922
923 * Makefile.in: Include disable-implicit-rules.mk.
924
dcb07cfa
PA
9252016-11-23 Pedro Alves <palves@redhat.com>
926
927 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
928 (debug_vprintf): Use std::chrono::steady_clock instead of
929 gettimeofday. Use '.' instead of ':'.
930 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
931 (get_timestamp): Use std::chrono::steady_clock instead of
932 gettimeofday.
933
8629c02c
SM
9342016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
935
936 * Makefile.in: Fix whitespace formatting.
937
b593ecca
SM
9382016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
939
940 * Makefile.in (SFILES, OBS): Flatten list and order
941 alphabetically.
942
9986ba08
PA
9432016-11-23 Pedro Alves <palves@redhat.com>
944
945 * event-loop.c (handle_file_event): Use warning.
946 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
947 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
948 Use warning.
949
4eefa7bc
PA
9502016-11-23 Pedro Alves <palves@redhat.com>
951
952 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
953 output.
954 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
955 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
956 debug_printf and debug_flush for debug output.
957 * server.c (handle_general_set): Likewise.
958 * thread-db.c (try_thread_db_load): Use debug_printf for debug
959 output.
960
5443506e
SM
9612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
962
963 * Makefile.in (.c.o): Replace rule with ...
964 (%.o: %.c): ... this one.
965
3b165252
SM
9662016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
967
968 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
969 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
970 make.
971 * configure.ac: Remove checks for the make program.
972 * configure: Re-generate.
973
0bcda685
PA
9742016-10-28 Pedro Alves <palves@redhat.com>
975
976 * Makefile.in (CXX_DIALECT): Get from configure.
977 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
978 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
979 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
980 * config.in: Regenerate.
981 * configure: Regenerate.
982
c3805894
YQ
9832016-10-27 Yao Qi <yao.qi@linaro.org>
984
985 * linux-low.c (linux_supports_range_stepping): Return true if
986 can_software_single_step return true.
987
89342618
YQ
9882016-10-27 Yao Qi <yao.qi@linaro.org>
989
990 * inferiors.c (find_inferior_in_random): New function.
991 * inferiors.h (find_inferior_in_random): Declare.
992 * linux-low.c (linux_wait_for_event_filtered): Call
993 find_inferior_in_random instead of find_inferior.
994
e3652c84
YQ
9952016-10-27 Yao Qi <yao.qi@linaro.org>
996
997 * linux-low.c (linux_wait_1): If single-step breakpoints are
998 inserted, remove them.
999
5a04c4cf
PA
10002016-10-26 Pedro Alves <palves@redhat.com>
1001
1002 * linux-low.c (handle_extended_wait): Link parent/child fork
1003 threads.
1004 (linux_wait_1): Unlink them.
1005 (linux_set_resume_request): Ignore resume requests for
1006 already-resumed and unhandled fork child threads.
1007 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1008 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1009 New functions.
1010 (handle_v_requests) <vCont>: Don't call require_running.
1011 * server.h (in_queued_stop_replies): New declaration.
1012
cb93dc7f
YQ
10132016-10-24 Yao Qi <yao.qi@linaro.org>
1014
1015 PR server/20733
1016 * linux-aarch64-low.c (append_insns): Cast the return value to
1017 'uint32_t *'.
1018
a1078bea
YQ
10192016-10-10 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1022
1fb77080
SDJ
10232016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1024
1025 * target.c (target_supports_multi_process): New function, moved
1026 from...
1027 * target.h (target_supports_multi_process): ... here. Remove
1028 macro.
1029
39b5a3b9
TT
10302016-10-05 Tom Tromey <tom@tromey.com>
1031
1032 PR remote/20655:
1033 * tracepoint.c (handle_tracepoint_bkpts): Check
1034 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1035
c1d0b70a
YQ
10362016-10-05 Yao Qi <yao.qi@linaro.org>
1037
1038 * configure.srv: Update the path of arm-*.xml files.
1039
0a69eedb
YQ
10402016-10-05 Terry Guo <terry.guo@arm.com>
1041 Yao Qi <yao.qi@linaro.org>
1042
1043 * Makefile.in: Adjust the path of rules.
1044 * configure.srv: Update the path of xml files.
1045 * regformats/arm-with-iwmmxt.dat: Regenerated.
1046 * regformats/arm-with-neon.dat: Likewise.
1047 * regformats/arm-with-vfpv2.dat: Likewise.
1048 * regformats/arm-with-vfpv3.dat Likewise.
1049
17e16485
YQ
10502016-09-30 Yao Qi <yao.qi@linaro.org>
1051
1052 PR gdbserver/20627
1053 * target.c (target_stop_and_wait): Don't call
1054 target_continue_no_signal, use resume_stop instead.
1055
edeeb602
YQ
10562016-09-26 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-low.c (linux_wait_1): Call debug_exit.
1059
503b1c39
PA
10602016-09-23 Pedro Alves <palves@redhat.com>
1061
1062 * Makefile.in (SFILES): Add common/new-op.c.
1063 (OBS): Add common/new-op.o.
1064 (new-op.o): New rule.
1065
74172ecf
SM
10662016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1067
1068 * .gitinore: Ignore more files.
1069
fc6cda2e
YQ
10702016-09-21 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1073 23.
1074
bc1e6c81
SDJ
10752016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1076
1077 * server.c (start_inferior): Call target_mourn_inferior instead of
1078 mourn_inferior; pass ptid_t argument to it.
1079 (resume): Likewise.
1080 (handle_target_event): Likewise.
1081 * target.c (target_mourn_inferior): New function.
1082 * target.h (mourn_inferior): Delete macro.
1083
0e00e962
AA
10842016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1085
1086 * linux-low.c (lwp_is_stepping): New function.
1087
1d8cb77d
CL
10882016-09-06 Carl Love <cel@us.ibm.com>
1089
1090 * server.c (start_inferior): Fixed comment, requested comment change
1091 didn't get updated correctly. Removed reference to ptrace () call as
1092 it is only true on Linux systems.
1093
7313bced
CL
10942016-09-06 Carl Love <cel@us.ibm.com>
1095
1096 * server.c (start_inferior): Do not call
1097 function target_post_create_inferior () if the
1098 inferior process has already exited.
1099
cf6de44d
PA
11002016-09-05 Pedro Alves <palves@redhat.com>
1101
1102 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1103 (COMPILE.pre, CC_LD): Use CXX directly.
1104 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1105 * acinclude.m4: Don't include build-with-cxx.m4.
1106 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1107 * configure: Regenerate.
1108
c1da6748
AT
11092016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1110
1111 PR gdb/19495
1112 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1113 call writing data to own_buf.
1114
f2b9e3df
SDJ
11152016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1116
1117 * target.c (mywait): Call target_wait instead of
1118 the_target->wait.
1119 (target_wait): New function.
1120
049a8570
SDJ
11212016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1122
1123 * server.c (start_inferior): New variable 'ptid'. Replace calls
1124 to the_target->resume by target_continue{,_no_signal}, depending
1125 on the case.
1126 * target.c (target_stop_and_wait): Call target_continue_no_signal
1127 instead of the_target->resume.
1128 (target_continue): New function.
1129
3aa5cfa0
AT
11302016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1131
1132 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1133
754653a7
AZ
11342016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1135
1136 PR server/20491
1137 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1138 ps_prochandle.
1139 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1140 * linux-arm-low.c (ps_get_thread_area): Likewise.
1141 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1142 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1143 * linux-mips-low.c (ps_get_thread_area): Likewise.
1144 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1145 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1146 * linux-x86-low.c (ps_get_thread_area): Likewise.
1147 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1148
ed036b40
PA
11492016-08-19 Pedro Alves <palves@redhat.com>
1150
1151 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1152
c8ef42ee
PA
11532016-08-19 Pedro Alves <palves@redhat.com>
1154
1155 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1156 comment. Use memcpy instead of casting through unsigned long.
1157
9c235a72
PA
11582016-08-19 Pedro Alves <palves@redhat.com>
1159
1160 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1161 allocating around 0x80000000.
1162
201506da
PA
11632016-08-19 Pedro Alves <palves@redhat.com>
1164
1165 PR gdb/20415
1166 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1167 (x32-avx512-linux-ipa.o): New rules.
1168 * configure.ac (x86_64-*-linux*): New x32 check.
1169 * configure.srv (ipa_x32_linux_regobj): New.
1170 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1171 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1172 descriptions.
1173 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1174 descriptions.
1175 * configure: Regenerate.
1176
f348d89a
PA
11772016-08-09 Pedro Alves <palves@redhat.com>
1178
1179 PR gdb/18653
1180 * Makefile.in (OBS): Add signals-state-save-restore.o.
1181 (signals-state-save-restore.o): New rule.
1182 * config.in: Regenerate.
1183 * configure: Regenerate.
1184 * linux-low.c: Include "signals-state-save-restore.h".
1185 (linux_create_inferior): Call
1186 restore_original_signals_state.
1187 * server.c: Include "dispositions-save-restore.h".
1188 (captured_main): Call save_original_signals_state.
1189
1baf5149
PA
11902016-08-05 Pedro Alves <palves@redhat.com>
1191
1192 * configure: Regenerate.
1193
fcd4a73d
YQ
11942016-08-04 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-low.c (regsets_fetch_inferior_registers): Check
1197 errno is ESRCH or not.
1198
979659d0
YQ
11992016-08-02 Yao Qi <yao.qi@linaro.org>
1200
1201 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1202 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1203 (thread_db_load_search): Update.
1204 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1205 td_ta_set_event and td_ta_event_getmsg.
1206
6598661d
PA
12072016-07-26 Pedro Alves <palves@redhat.com>
1208
1209 PR server/20414
1210 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1211 of unsigned long for 64-bit registers and use uint32_t instead of
1212 unsigned int for 32-bit registers.
1213
9cf12d57
PA
12142016-07-26 Pedro Alves <palves@redhat.com>
1215
1216 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1217 to 'ptrace'.
1218
305450ed
TT
12192016-07-21 Tom Tromey <tom@tromey.com>
1220
1221 * configure: Rebuild.
1222
2583da7c
YQ
12232016-07-21 Yao Qi <yao.qi@linaro.org>
1224
1225 * mem-break.c (find_gdb_breakpoint): Cast bp to
1226 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1227
21536b36
YQ
12282016-07-21 Yao Qi <yao.qi@linaro.org>
1229
1230 * server.c (handle_v_requests): Support s and S actions
1231 if target_supports_software_single_step return true.
1232
8901d193
YQ
12332016-07-21 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1236 is resume_step, call maybe_hw_step.
1237 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1238 and unstop them.
1239 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1240 breakpoints or not.
1241 (proceed_one_lwp): If resume request is resume_step, install
1242 reinsert breakpoints and call maybe_hw_step.
1243
0e9a339e
YQ
12442016-07-21 Yao Qi <yao.qi@linaro.org>
1245
1246 * linux-low.c (proceed_one_lwp): Declare.
1247 (linux_resume_one_thread): Remove local variable 'step'.
1248 Lift code enqueue signal. Call proceed_one_lwp instead of
1249 linux_resume_one_lwp.
1250
4281b351
YQ
12512016-07-21 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-low.c (linux_resume_one_thread): Call
1254 enqueue_pending_signal.
1255
984a2c04
YQ
12562016-07-21 Yao Qi <yao.qi@linaro.org>
1257
1258 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1259 * inferiors.c (do_restore_current_thread_cleanup): New function.
1260 (make_cleanup_restore_current_thread): Likewise.
1261 * linux-low.c (install_software_single_step_breakpoints): Call
1262 make_cleanup_restore_current_thread. Switch current_thread to
1263 thread.
1264
bec903c9
YQ
12652016-07-21 Yao Qi <yao.qi@linaro.org>
1266
1267 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1268 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1269 (clone_one_breakpoint): Likewise.
1270 (delete_reinsert_breakpoints): Change parameter to thread.
1271 Callers updated.
1272 (has_reinsert_breakpoints): Likewise.
1273 (uninsert_reinsert_breakpoints): Likewise.
1274 (reinsert_reinsert_breakpoints): Likewise.
1275 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1276 (delete_reinsert_breakpoints): Likewise.
1277 (reinsert_reinsert_breakpoints): Likewise.
1278 (uninsert_reinsert_breakpoints): Likewise.
1279 (has_reinsert_breakpoints): Likewise.
1280
63c40ec7
YQ
12812016-07-21 Yao Qi <yao.qi@linaro.org>
1282
1283 * inferiors.c (get_thread_process): Make parameter const.
1284 * inferiors.h (get_thread_process): Update declaration.
1285 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1286 Add new parameters child_thread and parent_thread. Callers
1287 updated.
1288 * mem-break.h (clone_all_breakpoints): Update declaration.
1289
9aa76cd0
YQ
12902016-07-21 Yao Qi <yao.qi@linaro.org>
1291
1292 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1293 <command_list, handler>: Remove.
1294 (struct gdb_breakpoint): New.
1295 (struct other_breakpoint): New.
1296 (struct reinsert_breakpoint): New.
1297 (is_gdb_breakpoint): New function.
1298 (any_persistent_commands): Update command_list if
1299 is_gdb_breakpoint returns true.
1300 (set_breakpoint): Create breakpoints according to their types.
1301 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1302 (set_gdb_breakpoint_1): Likewise.
1303 (set_gdb_breakpoint): Likewise.
1304 (clear_breakpoint_conditions): Change parameter type to
1305 'struct gdb_breakpoint *'.
1306 (clear_breakpoint_commands): Likewise.
1307 (clear_breakpoint_conditions_and_commands): Likewise.
1308 (add_condition_to_breakpoint): Likewise.
1309 (add_breakpoint_condition): Likewise.
1310 (add_commands_to_breakpoint): Likewise.
1311 (check_breakpoints): Check other_breakpoint.
1312 (clone_one_breakpoint): Clone breakpopint according to its type.
1313 * mem-break.h (struct gdb_breakpoint): Declare.
1314 (set_gdb_breakpoint): Update declaration.
1315 (clear_breakpoint_conditions_and_commands): Likewise.
1316 (add_breakpoint_condition): Likewise.
1317 (add_breakpoint_commands): Likewise.
1318 * server.c (process_point_options): Change parameter type to
1319 'struct gdb_breakpoint *'.
1320
811f8301
YQ
13212016-07-21 Yao Qi <yao.qi@linaro.org>
1322
1323 * mem-break.c (set_breakpoint_at): Rename it to ...
1324 (set_breakpoint_type_at): ... it.
1325 (set_breakpoint_at): Call set_breakpoint_type_at.
1326 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1327 * mem-break.h (set_breakpoint_at): Update comments.
1328
b1c51e36
CLT
13292016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1330
1331 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1332 to buf parameter.
1333 (nios2_store_gregset): Likewise.
1334
ced2dffb
PA
13352016-07-01 Pedro Alves <palves@redhat.com>
1336 Antoine Tremblay <antoine.tremblay@ericsson.com>
1337
1338 * linux-low.c: Change interface to take the target lwp_info
1339 pointer directly and return void. Handle detaching from a zombie
1340 thread.
1341 (linux_detach_lwp_callback): New function.
1342 (linux_detach): Detach from the leader thread after detaching from
1343 the clone threads.
1344
2ac09a5b
YQ
13452016-06-28 Yao Qi <yao.qi@linaro.org>
1346
1347 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1348 for variable new_offset.
1349 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1350 (aarch64_ftrace_insn_reloc_cb): Likewise.
1351 (aarch64_ftrace_insn_reloc_tb): Likewise.
1352 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1353 PRIx64 instead of PRIx32.
1354
79e7fd4f
YQ
13552016-06-28 Yao Qi <yao.qi@linaro.org>
1356
1357 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1358 (the_low_target): Install arm_get_syscall_trapinfo.
1359
061fc021
YQ
13602016-06-28 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1363 function.
1364 (the_low_target): Install aarch64_get_syscall_trapinfo.
1365
4cc32bec
YQ
13662016-06-28 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1369 Callers updated.
1370 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1371 Remove parameter sysno.
1372 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1373 sysret.
1374
782c1122
AA
13752016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1376
1377 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1378 (s390_emit_ne_goto): Likewise.
1379 (s390_emit_lt_goto): Likewise.
1380 (s390_emit_le_goto): Likewise.
1381 (s390_emit_gt_goto): Likewise.
1382 (s390_emit_ge_goto): Likewise.
1383 (s390x_emit_eq_goto): Likewise.
1384 (s390x_emit_ne_goto): Likewise.
1385 (s390x_emit_lt_goto): Likewise.
1386 (s390x_emit_le_goto): Likewise.
1387 (s390x_emit_gt_goto): Likewise.
1388 (s390x_emit_ge_goto): Likewise.
1389 (s390_emit_ops_impl): Mark variable static.
1390 (s390x_emit_ops): Likewise.
1391
2e7b624b
YQ
13922016-06-17 Yao Qi <yao.qi@linaro.org>
1393
1394 * linux-low.c (handle_extended_wait): Call
1395 uninsert_reinsert_breakpoints for the parent process. Remove
1396 reinsert breakpoints from the child process. Reinsert them to
1397 the parent process when vfork is done.
1398 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1399 (reinsert_reinsert_breakpoints): New function.
1400 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1401 (reinsert_reinsert_breakpoints): Declare.
1402
8a81c5d7
YQ
14032016-06-17 Yao Qi <yao.qi@linaro.org>
1404
1405 * linux-low.c (handle_extended_wait): If the parent is doing
1406 step-over, remove the reinsert breakpoints from the forked child.
1407
f50bf8e5
YQ
14082016-06-17 Yao Qi <yao.qi@linaro.org>
1409
1410 * linux-low.c (unsuspend_all_lwps): Declare.
1411 (linux_low_filter_event): If thread exited, call finish_step_over.
1412 If step-over is finished, unsuspend other threads.
1413
8376a3cb
YQ
14142016-06-17 Yao Qi <yao.qi@linaro.org>
1415
1416 * linux-low.c (linux_resume_one_lwp_throw): Assert
1417 has_reinsert_breakpoints returns false.
1418 * mem-break.c (delete_disabled_breakpoints): Assert
1419 bp type isn't reinsert_breakpoint.
1420
f79b145d
YQ
14212016-06-17 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-low.c (maybe_hw_step): New function.
1424 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1425 (finish_step_over): Switch current_thread to lwp temporarily,
1426 and assert has_reinsert_breakpoints returns true.
1427 (proceed_one_lwp): Call maybe_hw_step.
1428 * mem-break.c (has_reinsert_breakpoints): New function.
1429 * mem-break.h (has_reinsert_breakpoints): Declare.
1430
0ae534d2
JT
14312016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1432
1433 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1434
fcdad592
YQ
14352016-05-17 Yao Qi <yao.qi@linaro.org>
1436
1437 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1438 instead of find_inferior.
1439
9e784964
YQ
14402016-05-05 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1443 Initialize res to zero.
1444
cf2ebb6e
YQ
14452016-05-05 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1448 to uint32_t.
1449
c1aebf87
UW
14502016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1451
1452 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1453 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1454 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1455
35fd2deb 14562016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1457 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1458
1459 * tracepoint.c (write_inferior_int8): New function.
1460 (cmd_qtenable_disable): Write enable flag using
1461 write_inferior_int8.
1462
484b3c32
YQ
14632016-04-25 Yao Qi <yao.qi@linaro.org>
1464
1465 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1466 (need_step_over_p): Return zero if the LWP has pending signals
1467 can be delivered on software single step target.
1468
85ba7d86
YQ
14692016-04-25 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1472 return instead of error.
1473
3539aa13
YQ
14742016-04-22 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1477 to 23.
1478
5b061e98
YQ
14792016-04-22 Yao Qi <yao.qi@linaro.org>
1480
1481 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1482 signal when stepping over breakpoint with software single
1483 step.
1484
3451269c
PA
14852016-04-21 Pedro Alves <palves@redhat.com>
1486
1487 * linux-s390-low.c (s390_collect_ptrace_register)
1488 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1489 add casts.
1490 (s390_check_regset): Use void * instead of gdb_byte *.
1491
a2358508
PA
14922016-04-20 Pedro Alves <palves@redhat.com>
1493
1494 * configure: Renegerate.
1495
6885166d
YQ
14962016-04-20 Yao Qi <yao.qi@linaro.org>
1497
1498 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1499 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1500 number 16.
1501 (arm_store_gregset): Likewise.
1502
2b863f51
WT
15032016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1504
1505 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1506 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1507 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1508 (amd64-avx-mpx-linux.c): New rules.
1509 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1510 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1511 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1512 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1513 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1514 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1515 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1516 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1517 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1518 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1519 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1520 * linux-x86-low.c (x86_linux_read_description): Add case for
1521 X86_XSTATE_AVX_MPX_MASK.
1522 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1523 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1524 init_registers_i386_avx_mpx_linux.
1525 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1526 (initialize_low_tracepoint): Call
1527 init_registers_i386_avx_mpx_linux.
1528 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1529 (initialize_low_tracepoint): Call
1530 init_registers_amd64_avx_mpx_linux.
1531 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1532 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1533 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1534 declarations.
1535
9b30624b
PA
15362016-04-18 Pedro Alves <palves@redhat.com>
1537
1538 * configure: Regenerate.
1539
45e3745e
AT
15402016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1541
1542 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1543 (aarch64_emit_sub): Likewise.
1544
2afc13ff
PA
15452016-04-12 Pedro Alves <palves@redhat.com>
1546
1547 * utils.c (prepare_to_throw_exception): Delete.
1548
6e774b13
SM
15492016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1550
1551 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1552
4dca19f8
MK
15532016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1554
1555 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1556
d0a9981f
MK
15572016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1558
1559 * linux-aarch64-ipa.c: Add <elf.h> include.
1560 * linux-ppc-ipa.c: Add <elf.h> include.
1561 * linux-s390-ipa.c: Add <elf.h> include.
1562
252db07e
MK
15632016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1564
1565 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1566 (get_raw_reg_ptr): Likewise.
1567 (get_trace_state_variable_value_ptr): Likewise.
1568 (set_trace_state_variable_value_ptr): Likewise.
1569 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1570 char *.
1571
14e2b6d9
MK
15722016-03-31 Wei-cheng Wang <cole945@gmail.com>
1573 Marcin Kościelnicki <koriakin@0x04.net>
1574
1575 PR/17221
1576 * linux-ppc-low.c (emit_insns): New function.
1577 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1578 (ppc_emit_prologue): New function.
1579 (ppc_emit_epilogue): New function.
1580 (ppc_emit_add): New function.
1581 (ppc_emit_sub): New function.
1582 (ppc_emit_mul): New function.
1583 (ppc_emit_lsh): New function.
1584 (ppc_emit_rsh_signed): New function.
1585 (ppc_emit_rsh_unsigned): New function.
1586 (ppc_emit_ext): New function.
1587 (ppc_emit_zero_ext): New function.
1588 (ppc_emit_log_not): New function.
1589 (ppc_emit_bit_and): New function.
1590 (ppc_emit_bit_or): New function.
1591 (ppc_emit_bit_xor): New function.
1592 (ppc_emit_bit_not): New function.
1593 (ppc_emit_equal): New function.
1594 (ppc_emit_less_signed): New function.
1595 (ppc_emit_less_unsigned): New function.
1596 (ppc_emit_ref): New function.
1597 (ppc_emit_const): New function.
1598 (ppc_emit_reg): New function.
1599 (ppc_emit_pop): New function.
1600 (ppc_emit_stack_flush): New function.
1601 (ppc_emit_swap): New function.
1602 (ppc_emit_stack_adjust): New function.
1603 (ppc_emit_call): New function.
1604 (ppc_emit_int_call_1): New function.
1605 (ppc_emit_void_call_2): New function.
1606 (ppc_emit_if_goto): New function.
1607 (ppc_emit_goto): New function.
1608 (ppc_emit_eq_goto): New function.
1609 (ppc_emit_ne_goto): New function.
1610 (ppc_emit_lt_goto): New function.
1611 (ppc_emit_le_goto): New function.
1612 (ppc_emit_gt_goto): New function.
1613 (ppc_emit_ge_goto): New function.
1614 (ppc_write_goto_address): New function.
1615 (ppc_emit_ops_impl): New static variable.
1616 (ppc64v1_emit_prologue): New function.
1617 (ppc64v2_emit_prologue): New function.
1618 (ppc64_emit_epilogue): New function.
1619 (ppc64_emit_add): New function.
1620 (ppc64_emit_sub): New function.
1621 (ppc64_emit_mul): New function.
1622 (ppc64_emit_lsh): New function.
1623 (ppc64_emit_rsh_signed): New function.
1624 (ppc64_emit_rsh_unsigned): New function.
1625 (ppc64_emit_ext): New function.
1626 (ppc64_emit_zero_ext): New function.
1627 (ppc64_emit_log_not): New function.
1628 (ppc64_emit_bit_and): New function.
1629 (ppc64_emit_bit_or): New function.
1630 (ppc64_emit_bit_xor): New function.
1631 (ppc64_emit_bit_not): New function.
1632 (ppc64_emit_equal): New function.
1633 (ppc64_emit_less_signed): New function.
1634 (ppc64_emit_less_unsigned): New function.
1635 (ppc64_emit_ref): New function.
1636 (ppc64_emit_const): New function.
1637 (ppc64v1_emit_reg): New function.
1638 (ppc64v2_emit_reg): New function.
1639 (ppc64_emit_pop): New function.
1640 (ppc64_emit_stack_flush): New function.
1641 (ppc64_emit_swap): New function.
1642 (ppc64v1_emit_call): New function.
1643 (ppc64v2_emit_call): New function.
1644 (ppc64v1_emit_int_call_1): New function.
1645 (ppc64v2_emit_int_call_1): New function.
1646 (ppc64v1_emit_void_call_2): New function.
1647 (ppc64v2_emit_void_call_2): New function.
1648 (ppc64_emit_if_goto): New function.
1649 (ppc64_emit_eq_goto): New function.
1650 (ppc64_emit_ne_goto): New function.
1651 (ppc64_emit_lt_goto): New function.
1652 (ppc64_emit_le_goto): New function.
1653 (ppc64_emit_gt_goto): New function.
1654 (ppc64_emit_ge_goto): New function.
1655 (ppc64v1_emit_ops_impl): New static variable.
1656 (ppc64v2_emit_ops_impl): New static variable.
1657 (ppc_emit_ops): New function.
1658 (linux_low_target): Wire in ppc_emit_ops.
1659
a2174ba4
MK
16602016-03-31 Wei-cheng Wang <cole945@gmail.com>
1661 Marcin Kościelnicki <koriakin@0x04.net>
1662
1663 PR/17221
1664 * Makefile.in: Add powerpc-*-ipa.o
1665 * configure.srv: Add ipa_obj for powerpc*-linux.
1666 * linux-ppc-ipa.c: New file.
1667 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1668 includes.
1669 (PPC_FIELD): New macro.
1670 (PPC_SEXT): New macro.
1671 (PPC_OP6): New macro.
1672 (PPC_BO): New macro.
1673 (PPC_LI): New macro.
1674 (PPC_BD): New macro.
1675 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1676 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1677 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1678 (ppc_get_thread_area): New function.
1679 (is_elfv2_inferior): New function.
1680 (gen_ds_form): New function.
1681 (GEN_STD): New macro.
1682 (GEN_STDU): New macro.
1683 (GEN_LD): New macro.
1684 (GEN_LDU): New macro.
1685 (gen_d_form): New function.
1686 (GEN_ADDI): New macro.
1687 (GEN_ADDIS): New macro.
1688 (GEN_LI): New macro.
1689 (GEN_LIS): New macro.
1690 (GEN_ORI): New macro.
1691 (GEN_ORIS): New macro.
1692 (GEN_LWZ): New macro.
1693 (GEN_STW): New macro.
1694 (GEN_STWU): New macro.
1695 (gen_xfx_form): New function.
1696 (GEN_MFSPR): New macro.
1697 (GEN_MTSPR): New macro.
1698 (GEN_MFCR): New macro.
1699 (GEN_MTCR): New macro.
1700 (GEN_SYNC): New macro.
1701 (GEN_LWSYNC): New macro.
1702 (gen_x_form): New function.
1703 (GEN_OR): New macro.
1704 (GEN_MR): New macro.
1705 (GEN_LWARX): New macro.
1706 (GEN_STWCX): New macro.
1707 (GEN_CMPW): New macro.
1708 (gen_md_form): New function.
1709 (GEN_RLDICL): New macro.
1710 (GEN_RLDICR): New macro.
1711 (gen_i_form): New function.
1712 (GEN_B): New macro.
1713 (GEN_BL): New macro.
1714 (gen_b_form): New function.
1715 (GEN_BNE): New macro.
1716 (GEN_LOAD): New macro.
1717 (GEN_STORE): New macro.
1718 (gen_limm): New function.
1719 (gen_atomic_xchg): New function.
1720 (gen_call): New function.
1721 (ppc_relocate_instruction): New function.
1722 (ppc_install_fast_tracepoint_jump_pad): New function.
1723 (ppc_get_min_fast_tracepoint_insn_len): New function.
1724 (ppc_get_ipa_tdesc_idx): New function.
1725 (the_low_target): Wire in the new functions.
1726 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1727 tdescs.
1728 * linux-ppc-tdesc.h: New file.
1729
a13c4696
MK
17302016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1731
1732 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1733 (alloc_jump_pad_buffer): New function.
1734 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1735 (alloc_jump_pad_buffer): New function.
1736 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1737 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1738 (alloc_jump_pad_buffer): New function.
1739 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1740 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1741 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1742 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1743
1cda1512
MK
17442016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1745
1746 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1747 * linux-amd64-ipa.c: Likewise.
1748 * linux-i386-ipa.c: Likewise.
1749 * linux-s390-ipa.c: Likewise.
1750 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1751 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1752 set_trace_state_variable_value_ptr.
1753 (struct ipa_sym_addresses): Likewise.
1754 (symbol_list): Likewise.
1755 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1756 accessing gdb_collect directly.
1757 (gdb_collect_ptr_type): New typedef.
1758 (get_raw_reg_ptr_type): New typedef.
1759 (get_trace_state_variable_value_ptr_type): New typedef.
1760 (set_trace_state_variable_value_ptr_type): New typedef.
1761 (gdb_collect_ptr): New global.
1762 (get_raw_reg_ptr): New global.
1763 (get_trace_state_variable_value_ptr): New global.
1764 (set_trace_state_variable_value_ptr): New global.
1765 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1766 accessing get_raw_reg directly.
1767 (get_get_tsv_func_addr): Likewise for
1768 get_trace_state_variable_value_ptr.
1769 (get_set_tsv_func_addr): Likewise for
1770 set_trace_state_variable_value_ptr.
1771 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1772
72fb5488
SM
17732016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1776
28170b88
MK
17772016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1778
1779 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1780 packets.
1781 (relocate_instruction): Remove own_buf.
1782 * server.c (own_buf): Make global.
1783 (handle_v_requests): Make global.
1784 * server.h (own_buf): New declaration.
1785 (handle_v_requests): New prototype.
1786
f39e8743
MK
17872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1788
1789 PR 18377
1790 * linux-s390-low.c (add_insns): New function.
1791 (s390_emit_prologue): New function.
1792 (s390_emit_epilogue): New function.
1793 (s390_emit_add): New function.
1794 (s390_emit_sub): New function.
1795 (s390_emit_mul): New function.
1796 (s390_emit_lsh): New function.
1797 (s390_emit_rsh_signed): New function.
1798 (s390_emit_rsh_unsigned): New function.
1799 (s390_emit_ext): New function.
1800 (s390_emit_log_not): New function.
1801 (s390_emit_bit_and): New function.
1802 (s390_emit_bit_or): New function.
1803 (s390_emit_bit_xor): New function.
1804 (s390_emit_bit_not): New function.
1805 (s390_emit_equal): New function.
1806 (s390_emit_less_signed): New function.
1807 (s390_emit_less_unsigned): New function.
1808 (s390_emit_ref): New function.
1809 (s390_emit_if_goto): New function.
1810 (s390_emit_goto): New function.
1811 (s390_write_goto_address): New function.
1812 (s390_emit_litpool): New function.
1813 (s390_emit_const): New function.
1814 (s390_emit_call): New function.
1815 (s390_emit_reg): New function.
1816 (s390_emit_pop): New function.
1817 (s390_emit_stack_flush): New function.
1818 (s390_emit_zero_ext): New function.
1819 (s390_emit_swap): New function.
1820 (s390_emit_stack_adjust): New function.
1821 (s390_emit_set_r2): New function.
1822 (s390_emit_int_call_1): New function.
1823 (s390_emit_void_call_2): New function.
1824 (s390_emit_eq_goto): New function.
1825 (s390_emit_ne_goto): New function.
1826 (s390_emit_lt_goto): New function.
1827 (s390_emit_le_goto): New function.
1828 (s390_emit_gt_goto): New function.
1829 (s390_emit_ge_goto): New function.
1830 (s390x_emit_prologue): New function.
1831 (s390x_emit_epilogue): New function.
1832 (s390x_emit_add): New function.
1833 (s390x_emit_sub): New function.
1834 (s390x_emit_mul): New function.
1835 (s390x_emit_lsh): New function.
1836 (s390x_emit_rsh_signed): New function.
1837 (s390x_emit_rsh_unsigned): New function.
1838 (s390x_emit_ext): New function.
1839 (s390x_emit_log_not): New function.
1840 (s390x_emit_bit_and): New function.
1841 (s390x_emit_bit_or): New function.
1842 (s390x_emit_bit_xor): New function.
1843 (s390x_emit_bit_not): New function.
1844 (s390x_emit_equal): New function.
1845 (s390x_emit_less_signed): New function.
1846 (s390x_emit_less_unsigned): New function.
1847 (s390x_emit_ref): New function.
1848 (s390x_emit_if_goto): New function.
1849 (s390x_emit_const): New function.
1850 (s390x_emit_call): New function.
1851 (s390x_emit_reg): New function.
1852 (s390x_emit_pop): New function.
1853 (s390x_emit_stack_flush): New function.
1854 (s390x_emit_zero_ext): New function.
1855 (s390x_emit_swap): New function.
1856 (s390x_emit_stack_adjust): New function.
1857 (s390x_emit_int_call_1): New function.
1858 (s390x_emit_void_call_2): New function.
1859 (s390x_emit_eq_goto): New function.
1860 (s390x_emit_ne_goto): New function.
1861 (s390x_emit_lt_goto): New function.
1862 (s390x_emit_le_goto): New function.
1863 (s390x_emit_gt_goto): New function.
1864 (s390x_emit_ge_goto): New function.
1865 (s390_emit_ops): New function.
1866 (struct linux_target_ops): Fill in emit_ops hook.
1867
abd9baf9
MK
18682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1869
1870 PR 18377
1871 * Makefile.in: Add s390 IPA files.
1872 * configure.srv: Build IPA for s390.
1873 * linux-s390-ipa.c: New file.
1874 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1875 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1876 (tdesc_s390_linux32): Likewise.
1877 (init_registers_s390_linux32v1): Likewise.
1878 (tdesc_s390_linux32v1): Likewise.
1879 (init_registers_s390_linux32v2): Likewise.
1880 (tdesc_s390_linux32v2): Likewise.
1881 (init_registers_s390_linux64): Likewise.
1882 (tdesc_s390_linux64): Likewise.
1883 (init_registers_s390_linux64v1): Likewise.
1884 (tdesc_s390_linux64v1): Likewise.
1885 (init_registers_s390_linux64v2): Likewise.
1886 (tdesc_s390_linux64v2): Likewise.
1887 (init_registers_s390_te_linux64): Likewise.
1888 (tdesc_s390_te_linux64): Likewise.
1889 (init_registers_s390_vx_linux64): Likewise.
1890 (tdesc_s390_vx_linux64): Likewise.
1891 (init_registers_s390_tevx_linux64): Likewise.
1892 (tdesc_s390_tevx_linux64): Likewise.
1893 (init_registers_s390x_linux64): Likewise.
1894 (tdesc_s390x_linux64): Likewise.
1895 (init_registers_s390x_linux64v1): Likewise.
1896 (tdesc_s390x_linux64v1): Likewise.
1897 (init_registers_s390x_linux64v2): Likewise.
1898 (tdesc_s390x_linux64v2): Likewise.
1899 (init_registers_s390x_te_linux64): Likewise.
1900 (tdesc_s390x_te_linux64): Likewise.
1901 (init_registers_s390x_vx_linux64): Likewise.
1902 (tdesc_s390x_vx_linux64): Likewise.
1903 (init_registers_s390x_tevx_linux64): Likewise.
1904 (tdesc_s390x_tevx_linux64): Likewise.
1905 (have_hwcap_s390_vx): New static variable.
1906 (s390_arch_setup): Fill have_hwcap_s390_vx.
1907 (s390_get_thread_area): New function.
1908 (s390_ft_entry_gpr_esa): New const.
1909 (s390_ft_entry_gpr_zarch): New const.
1910 (s390_ft_entry_misc): New const.
1911 (s390_ft_entry_fr): New const.
1912 (s390_ft_entry_vr): New const.
1913 (s390_ft_main_31): New const.
1914 (s390_ft_main_64): New const.
1915 (s390_ft_exit_fr): New const.
1916 (s390_ft_exit_vr): New const.
1917 (s390_ft_exit_misc): New const.
1918 (s390_ft_exit_gpr_esa): New const.
1919 (s390_ft_exit_gpr_zarch): New const.
1920 (append_insns): New function.
1921 (s390_relocate_instruction): New function.
1922 (s390_install_fast_tracepoint_jump_pad): New function.
1923 (s390_get_min_fast_tracepoint_insn_len): New function.
1924 (s390_get_ipa_tdesc_idx): New function.
1925 (struct linux_target_ops): Wire in the above functions.
1926 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1927 * linux-s390-tdesc.h: New file.
1928
a4105d04
MK
19292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1930
1931 * linux-s390-low.c (s390_supports_tracepoints): New function.
1932 (struct linux_target_ops): Fill supports_tracepoints hook.
1933
35ac8b3e
YQ
19342016-03-18 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-low.c (lwp_signal_can_be_delivered): New function.
1937 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1938
94610ec4
YQ
19392016-03-18 Yao Qi <yao.qi@linaro.org>
1940
1941 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1942 0 if signal is enqueued. Remove 'signal' from one debugging
1943 message. Move one debugging message to some lines below.
1944 Remove code setting 'signal' to 0.
1945
80aea927
YQ
19462016-03-18 Yao Qi <yao.qi@linaro.org>
1947
1948 * linux-low.c (linux_low_filter_event): Remove redundant
1949 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1950
b04fd3be
MK
19512016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1952
1953 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1954 (struct linux_target_ops): Wire in the above.
1955
c40c8d4b
YQ
19562016-03-03 Yao Qi <yao.qi@linaro.org>
1957
1958 * linux-low.c: Update comments to start_step_over.
1959
0f8288ae
YQ
19602016-03-03 Yao Qi <yao.qi@linaro.org>
1961
1962 PR server/19736
1963 * linux-low.c (handle_extended_wait): Set child suspended
1964 if event_lwp->bp_reinsert isn't zero.
1965
fdbd04a8
YQ
19662016-03-02 Yao Qi <yao.qi@linaro.org>
1967
1968 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1969 enqueue_pending_signal.
1970
6896a8fa
MK
19712016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1972
1973 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1974 is actually loaded.
1975
ab503087
MK
19762016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1977
1978 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1979 (s390_regmap_3264) [!__s390x__]: New global.
1980 (s390_collect_ptrace_register): Skip map entries containing -1.
1981 (s390_supply_ptrace_register): Ditto.
1982 (s390_fill_gprs_high): New function.
1983 (s390_store_gprs_high): New function.
1984 (s390_regsets): Add NT_S390_HIGH_GPRS.
1985 (s390_get_hwcap): Enable on 31-bit.
1986 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1987 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1988 Detect NT_S390_HIGH_GPRS.
1989 (s390_usrregs_info_3264): Enable on 31-bit.
1990 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1991 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1992
ae91f625
MK
19932016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1994
1995 PR gdb/13808
1996 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1997 * configure.srv: Ditto.
1998 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1999 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2000 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2001 (init_registers_amd64_linux): Remove prototype.
2002 (tdesc_amd64_linux): Remove declaration.
2003 (get_ipa_tdesc): New function.
2004 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2005 initialize remaining tdescs.
2006 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2007 (init_registers_i386_linux): Remove prototype.
2008 (tdesc_i386_linux): Remove declaration.
2009 (get_ipa_tdesc): New function.
2010 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2011 initialize remaining tdescs.
2012 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2013 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2014 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2015 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2016 (x86_get_ipa_tdesc_idx): New function.
2017 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2018 * linux-x86-tdesc.h: New file.
2019 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2020 (target_get_ipa_tdesc_idx): New macro.
2021 * tracepoint.c (ipa_tdesc_idx): New macro.
2022 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2023 (symbol_list): Add ipa_tdesc_idx.
2024 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2025 (ipa_tdesc): Remove.
2026 (ipa_tdesc_idx): New variable.
2027 (get_context_regcache): Use get_ipa_tdesc.
2028 (gdb_collect): Ditto.
2029 (gdb_probe): Ditto.
2030 * tracepoint.h (get_ipa_tdesc): New prototype.
2031 (ipa_tdesc): Remove.
2032
e7ad2f14
PA
20332016-02-24 Pedro Alves <palves@redhat.com>
2034
2035 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2036 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2037 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2038 Factor out common code between the USE_SIGTRAP_SIGINFO and
2039 !USE_SIGTRAP_SIGINFO blocks.
2040 (linux_low_filter_event): Call save_stop_reason instead of
2041 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2042 Update comments.
2043 (linux_wait_1): Update comments.
2044
657f9cde
WW
20452016-02-24 Wei-cheng Wang <cole945@gmail.com>
2046
2047 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2048 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2049 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2050 ppc_insert_point, ppc_remove_point.
2051
b00b61e1
MK
20522016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2053
2054 * linux-s390-low.c (s390_supports_z_point_type): New function.
2055 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2056
553cb527
YQ
20572016-02-16 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2060 PC. Get pc from regcache_read_pc.
2061
a5652c21
YQ
20622016-02-12 Yao Qi <yao.qi@linaro.org>
2063
2064 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2065 or linux_get_pc_32bit.
2066 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2067
ed443b61
YQ
20682016-02-12 Yao Qi <yao.qi@linaro.org>
2069
2070 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2071 arm_linux_get_next_pcs_fixup.
2072
020ecd38
MK
20732016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2074
2075 * tracepoint.c (x_tracepoint_action_download): Change
2076 write_inferior_data_ptr to write_inferior_data_pointer.
2077 (cmd_qtstart): Likewise.
2078 (write_inferior_data_ptr): Remove.
2079 (download_agent_expr): Change write_inferior_data_ptr to
2080 write_inferior_data_pointer.
2081 (download_tracepoint_1): Likewise.
2082 (download_tracepoint): Likewise.
2083 (download_trace_state_variables): Likewise.
2084
7cae9051
WW
20852016-02-11 Wei-cheng Wang <cole945@gmail.com>
2086 Marcin Kościelnicki <koriakin@0x04.net>
2087
2088 * tracepoint.c (struct tracepoint_action_ops): Remove.
2089 (struct tracepoint_action): Remove ops.
2090 (m_tracepoint_action_download, r_tracepoint_action_download)
2091 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2092 size and offset accordingly.
2093 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2094 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2095 (tracepoint_action_send, tracepoint_action_download): New functions.
2096 Helpers for trace action handlers.
2097 (add_tracepoint_action): Remove setup actions ops.
2098 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2099
9f6a71b4
YQ
21002016-02-10 Yao Qi <yao.qi@linaro.org>
2101
2102 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2103
1e94266c
SM
21042016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2105
2106 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2107 to AC_OUTPUT.
2108 * configure: Regenerate.
2109
8adce034
SM
21102016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2111
2112 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2113 void * to gdb_byte *.
2114 * linux-low.c (siginfo_fixup): Likewise.
2115 (linux_xfer_siginfo): Likewise.
2116 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2117 Likewise.
2118 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2119
93813b37
WT
21202016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2121
2122 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2123 to srv_tgtobj.
2124 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2125 to srv_tgtobj.
2126 * linux-x86-low.c [__x86_64__]: Include
2127 "nat/amd64-linux-siginfo.h".
2128 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2129 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2130 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2131 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2132 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2133 (cpt_si_fd, si_timerid, si_overrun): Move from
2134 nat/amd64-linux-siginfo.c.
2135 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2136
8424cc97
SM
21372016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * server.c (skip_to_semicolon): Remove.
2140 (process_point_options): Use strchrnul instead of
2141 skip_to_semicolon.
2142
4d18591b
YQ
21432016-01-26 Yao Qi <yao.qi@linaro.org>
2144
2145 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2146 * linux-low.c (install_software_single_step_breakpoints): Don't
2147 call regcache_read_pc.
2148 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2149 argument pc.
2150
d8020970
YQ
21512016-01-26 Yao Qi <yao.qi@linaro.org>
2152
2153 * linux-low.c (install_software_single_step_breakpoints): Call
2154 regcache_read_pc instead of get_pc.
2155
8b207339
YQ
21562016-01-26 Yao Qi <yao.qi@linaro.org>
2157
2158 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2159 (unblock_async_io): Rename to ...
2160 (block_unblock_async_io): ... it. New function.
2161 (enable_async_io): Don't install SIGIO handler. Unblock it
2162 instead.
2163 (disable_async_io): Don't ignore SIGIO. Block it instead.
2164 (initialize_async_io): Install SIGIO handler. Don't call
2165 unblock_async_io.
2166
18879fef
YQ
21672016-01-26 Yao Qi <yao.qi@linaro.org>
2168
2169 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2170 first character is '\003', call *the_target->request_interrupt.
2171
a0f8e08a
YQ
21722016-01-25 Yao Qi <yao.qi@linaro.org>
2173
2174 * remote-utils.c (new_thread_notify): Remove.
2175 (dead_thread_notify): Likewise.
2176 * remote-utils.h (new_thread_notify): Remove declaration.
2177 (dead_thread_notify): Likewise.
2178
cc5fd9ab
MK
21792016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2180
2181 * gdb.trace/pending.exp: Fix expected message on continue.
2182
99e8eb11
MK
21832016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2184
2185 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2186 it works properly on big-endian machines where sizeof (CORE_ADDR)
2187 != sizeof (void *).
2188
a994041d
PA
21892016-01-21 Pedro Alves <palves@redhat.com>
2190
2191 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2192 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2193 * configure: Regenerate.
2194
f7a6a40d
YQ
21952016-01-21 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2198 is_thumb and set it according to CPSR saved on the stack.
2199 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2200 arm_sigreturn_next_pc.
2201
6f69e520
YQ
22022016-01-18 Yao Qi <yao.qi@linaro.org>
2203
2204 * linux-low.c (linux_set_pc_64bit): New function.
2205 (linux_get_pc_64bit): New function.
2206 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2207 Declare.
2208 * linux-sparc-low.c (debug_threads): Remove declaration.
2209 (sparc_get_pc): Remove.
2210 (the_low_target): Use linux_get_pc_64bit instead of
2211 sparc_get_pc.
2212 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2213 (the_low_target): Use linux_get_pc_64bit and
2214 linux_set_pc_64bit.
2215
276d4552
YQ
22162016-01-18 Yao Qi <yao.qi@linaro.org>
2217
2218 * linux-arm-low.c (debug_threads): Remove declaration.
2219 (arm_get_pc, arm_set_pc): Remove.
2220 (the_low_target): Use linux_get_pc_32bit and
2221 linux_set_pc_32bit.
2222 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2223 (the_low_target): Use linux_get_pc_32bit and
2224 linux_set_pc_32bit.
2225 * linux-cris-low.c (debug_threads): Remove declaration.
2226 (cris_get_pc, cris_set_pc,): Remove.
2227 (the_low_target): Use linux_get_pc_32bit and
2228 linux_set_pc_32bit.
2229 * linux-crisv32-low.c (debug_threads): Remove declaration.
2230 (cris_get_pc, cris_set_pc): Remove.
2231 (the_low_target): Use linux_get_pc_32bit and
2232 linux_set_pc_32bit.
2233 * linux-low.c: Include inttypes.h.
2234 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2235 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2236 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2237 (the_low_target): Use linux_get_pc_32bit and
2238 linux_set_pc_32bit.
2239 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2240 (the_low_target): Use linux_get_pc_32bit and
2241 linux_set_pc_32bit.
2242 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2243 (the_low_target): Use linux_get_pc_32bit and
2244 linux_set_pc_32bit.
2245 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2246 (the_low_target): Use linux_get_pc_32bit and
2247 linux_set_pc_32bit.
2248 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2249 (the_low_target): Use linux_get_pc_32bit and
2250 linux_set_pc_32bit.
2251
eb0edac8
GB
22522016-01-18 Gary Benson <gbenson@redhat.com>
2253
2254 * configure.ac (AC_FUNC_FORK): New check.
2255 * config.in: Regenerate.
2256 * configure: Likewise.
2257
1b451dda
YQ
22582016-01-14 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2261 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2262 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2263 arm_get_next_pcs_ctor.
2264
82075af2
JS
22652016-01-12 Josh Stone <jistone@redhat.com>
2266 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2267
2268 * inferiors.h: Include "gdb_vecs.h".
2269 (struct process_info): Add syscalls_to_catch.
2270 * inferiors.c (remove_process): Free syscalls_to_catch.
2271 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2272 syscall_return stops.
2273 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2274 * server.c (handle_general_set): Handle QCatchSyscalls.
2275 (handle_query): Report support for QCatchSyscalls.
2276 * target.h (struct target_ops): Add supports_catch_syscall.
2277 (target_supports_catch_syscall): New macro.
2278 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2279 (struct lwp_info): Add syscall_state.
2280 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2281 Maintain syscall_state and syscalls_to_catch across exec.
2282 (get_syscall_trapinfo): New function, proxy to the_low_target.
2283 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2284 (linux_low_filter_event): Toggle syscall_state entry/return for
2285 syscall traps, and set it ignored for all others.
2286 (gdb_catching_syscalls_p): New function.
2287 (gdb_catch_this_syscall_p): New function.
2288 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2289 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2290 (linux_supports_catch_syscall): New function.
2291 (linux_target_ops): Install it.
2292 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2293 (the_low_target): Install it.
2294
8f13a3ce
MF
22952016-01-12 Mike Frysinger <vapier@gentoo.org>
2296
2297 * acinclude.m4: Include new ../warning.m4 file.
2298 * configure: Regenerated.
2299 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2300
5b3da067
MF
23012016-01-12 Mike Frysinger <vapier@gentoo.org>
2302
2303 * ax.c (is_goto_target): Mark static.
2304 * linux-low.c (register_addr): Likewise.
2305 (linux_fetch_registers, linux_store_registers): Likewise.
2306 * mem-break.c (any_persistent_commands): Fix old prototype.
2307 (add_commands_to_breakpoint): Mark static.
2308 * regcache.c (find_register_by_name): Delete unused func.
2309 * remote-utils.c (hex_or_minus_one): Mark static.
2310 * server.c (monitor_show_help): Mark static.
2311 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2312 handle_v_requests): Likewise.
2313
bc504a31
PA
23142016-01-12 Pedro Alves <palves@redhat.com>
2315
2316 Remove use of the registered trademark symbol throughout.
2317
5a0dd67a
YQ
23182016-01-08 Yao Qi <yao.qi@linaro.org>
2319
2320 * remote-utils.c (getpkt): If c is '\003', call target hook
2321 request_interrupt.
2322
b2ca446f
YQ
23232016-01-06 Yao Qi <yao.qi@linaro.org>
2324
2325 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2326 linux-aarch32-low.c.
2327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2328 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2329 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2330 (thumb2_breakpoint): Declare.
2331 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2332 linux-aarch32-low.h.
2333 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2334 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2335 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2336
edd88788
JB
23372016-01-01 Joel Brobecker <brobecker@adacore.com>
2338
2339 * gdbreplay.c (gdbreplay_version): Change copyright year in
2340 version message.
2341 * server.c (gdbserver_version): Likewise.
2342
65da7f14
PP
23432015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2344
2345 * server.c (crc32_table): Delete.
2346 (crc32): Use libiberty's xcrc32 function.
2347
4abd5ed2
JB
23482015-12-22 Joel Brobecker <brobecker@adacore.com>
2349
2350 * lynx-low.c (lynx_delete_thread_callback): New function.
2351 (lynx_mourn): Properly delete our process and all of its
2352 threads. Remove call to clear_inferiors.
2353
0e50fe5c
JB
23542015-12-22 Joel Brobecker <brobecker@adacore.com>
2355
2356 * target.c (thread_search_callback): Add check that
2357 the thread_stopped target callback is not NULL before
2358 calling it.
2359
35adc03f
YQ
23602015-12-21 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2363 arm breakpoint.
2364
bd2b2909
AT
23652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2366
2367 * server.c (handle_query): Call target_supports_software_single_step.
2368
7fe5e27e
AT
23692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2370
2371 * linux-low.c (single_step): New function.
2372 (linux_resume_one_lwp_throw): Call single_step.
2373 (start_step_over): Likewise.
2374
d9311bfa
AT
23752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2376
2377 * Makefile.in (SFILES): Append arch/arm-linux.c,
2378 arch/arm-get-next-pcs.c.
2379 (arm-linux.o): New rule.
2380 (arm-get-next-pcs.o): New rule.
2381 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2382 arm-linux.o.
2383 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2384 to linux-aarch32-low.c.
2385 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2386 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2387 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2388 (thumb2_breakpoint_len): Likewise.
2389 (arm_is_thumb_mode): Make non-static.
2390 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2391 from linux-aarch32-low.c.
2392 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2393 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2394 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2395 (thumb2_breakpoint_len): Likewise.
2396 (arm_is_thumb_mode): New declaration.
2397 * linux-arm-low.c: Include arch/arm-linux.h
2398 aarch/arm-get-next-pcs.h, sys/syscall.h.
2399 (get_next_pcs_ops): New struct.
2400 (get_next_pcs_addr_bits_remove): New function.
2401 (get_next_pcs_is_thumb): New function.
2402 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2403 (arm_sigreturn_next_pc): Likewise.
2404 (get_next_pcs_syscall_next_pc): Likewise.
2405 (arm_gdbserver_get_next_pcs): Likewise.
2406 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2407 Initialize.
2408 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2409 * server.h: Include gdb_vecs.h.
2410
68ce2059
AT
24112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2412
2413 * Makefile.in (SFILES): Append common/common-regcache.c.
2414 (OBS): Append common-regcache.o.
2415 (common-regcache.o): New rule.
2416 * regcache.c (init_register_cache): Initialize cache to
2417 REG_UNAVAILABLE.
2418 (regcache_raw_read_unsigned): New function.
2419 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2420 register_status enum.
2421
fa5308bd
AT
24222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2423
2424 * linux-aarch64-low.c (the_low_targets): Rename
2425 breakpoint_reinsert_addr to get_next_pcs.
2426 * linux-arm-low.c (the_low_targets): Likewise.
2427 * linux-bfin-low.c (the_low_targets): Likewise.
2428 * linux-cris-low.c (the_low_targets): Likewise.
2429 * linux-crisv32-low.c (the_low_targets): Likewise.
2430 * linux-low.c (can_software_single_step): Likewise.
2431 (install_software_single_step_breakpoints): New function.
2432 (start_step_over): Use install_software_single_step_breakpoints.
2433 * linux-low.h: New CORE_ADDR vector.
2434 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2435 get_next_pcs.
2436 * linux-mips-low.c (the_low_targets): Likewise.
2437 * linux-nios2-low.c (the_low_targets): Likewise.
2438 * linux-sparc-low.c (the_low_targets): Likewise.
2439
4a6ed09b
PA
24402015-12-17 Pedro Alves <palves@redhat.com>
2441
2442 * linux-low.c (linux_kill_one_lwp): Remove references to
2443 LinuxThreads.
2444 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2445 to 'kill'.
2446 (linux_init_signals): Delete.
2447 (initialize_low): Adjust.
2448 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2449
7544db95
PA
24502015-12-16 Pedro Alves <palves@redhat.com>
2451
2452 * configure.ac (compiler warning flags): When testing a
2453 -Wno-foo option, check whether -Wfoo works instead.
2454 * configure: Regenerate.
2455
8020350c
DB
24562015-12-11 Don Breazeal <donb@codesourcery.com>
2457
2458 * server.c (process_serial_event): Don't exit from gdbserver
2459 in remote mode if there are still active inferiors.
2460
db91f502
YQ
24612015-12-11 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2464 arm_breakpoint_at if the process is 32-bit.
2465
b37a6290
YQ
24662015-12-11 Yao Qi <yao.qi@linaro.org>
2467
2468 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2469 arm breakpoint.
2470
17b1509a
YQ
24712015-12-07 Yao Qi <yao.qi@linaro.org>
2472
2473 * configure.srv: Append arm.o to srv_tgtobj for
2474 aarch64*-*-linux* target.
2475 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2476 from linux-arm-low.c.
2477 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2478 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2479 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2480 (thumb2_breakpoint_len): Likewise.
2481 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2482 (arm_breakpoint_kinds): Likewise.
2483 (arm_breakpoint_kind_from_pc): Likewise.
2484 (arm_sw_breakpoint_from_kind): Likewise.
2485 (arm_breakpoint_kind_from_current_state): Likewise.
2486 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2487 (arm_sw_breakpoint_from_kind): Declare.
2488 (arm_breakpoint_kind_from_current_state): Declare.
2489 (arm_breakpoint_at): Declare.
2490 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2491 arm_sw_breakpoint_from_kind if process is 32-bit.
2492 (aarch64_breakpoint_kind_from_pc): New function.
2493 (aarch64_breakpoint_kind_from_current_state): New function.
2494 (the_low_target): Initialize fields breakpoint_kind_from_pc
2495 and breakpoint_kind_from_current_state.
2496 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2497 linux-aarch32-low.c.
2498 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2499 (arm_breakpoint, arm_breakpoint_len): Likewise.
2500 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2501 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2502 (arm_is_thumb_mode): Likewise.
2503 (arm_breakpoint_at): Likewise.
2504 (arm_breakpoint_kind_from_pc): Likewise.
2505 (arm_sw_breakpoint_from_kind): Likewise.
2506 (arm_breakpoint_kind_from_current_state): Likewise.
2507
2508 Revert:
2509 2015-08-04 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2512 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2513 * server.c (extended_protocol): Remove "static".
2514 * server.h (extended_protocol): Declare it.
2515
ece66d65
JS
25162015-12-04 Josh Stone <jistone@redhat.com>
2517
2518 * target.h (struct target_ops) <arch_setup>: Rename to ...
2519 (struct target_ops) <post_create_inferior>: ... this.
2520 (target_arch_setup): Rename to ...
2521 (target_post_create_inferior): ... this, calling post_create_inferior.
2522 * server.c (start_inferior): Update target_arch_setup calls to
2523 target_post_create_inferior.
2524 * linux-low.c (linux_low_ptrace_options): Forward declare.
2525 (linux_arch_setup): Update its comment for general use.
2526 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2527 (struct linux_target_ops): Use linux_post_create_inferior.
2528 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2529 to post_create_inferior.
2530 * nto-low.c (struct nto_target_ops): Likewise.
2531 * spu-low.c (struct spu_target_ops): Likewise.
2532 * win32-low.c (struct win32_target_ops): Likewise.
2533
e58c48b4
AT
25342015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2535
2536 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2537
fbec8956
AT
25382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2539
2540 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2541 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2542 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2544 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2545 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2546 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2547 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2548 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2549 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2550 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2551 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2552
9b4c5f87
AT
25532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2554
2555 * linux-low.c (linux_look_up_symbols): Don't call
2556 linux_supports_traceclone.
2557 * linux-low.h (thread_db_init): Remove use_events argument.
2558 * thread-db.c (thread_db_use_event): Remove global variable.
2559 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2560 (struct thread_db) <td_create_bp>: Remove field.
2561 (thread_db_create_event): Remove function.
2562 (thread_db_enable_reporting): Likewise.
2563 (find_one_thread): Don't check for thread_db_use_events.
2564 (attach_thread): Likewise.
2565 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2566 (try_thread_db_load_1): Don't check for thread_db_use_events.
2567 (thread_db_init): Remove use_events argument and thread events
2568 handling.
2569 (remove_thread_event_breakpoints): Remove function.
2570 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2571
7d00775e
AT
25722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2573
2574 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2575 New function.
2576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2577 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2578 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2579 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2580 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2581 Initialize.
2582 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2583 New function.
2584 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2585 * linux-low.c (can_hardware_single_step): Use
2586 supports_hardware_single_step.
2587 (can_software_single_step): New function.
2588 (start_step_over): Call can_software_single_step.
2589 (linux_supports_hardware_single_step): New function.
2590 (struct target_ops) <supports_software_single_step>: Initialize.
2591 * linux-low.h (struct linux_target_ops)
2592 <supports_hardware_single_step>: Initialize.
2593 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2594 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2595 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2596 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2597 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2599 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2601 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2602 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2603 Initialize.
2604 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2605 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2606 Initialize.
2607 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2608 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2609 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2610 New function.
2611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2612 * target.h (struct target_ops): <supports_software_single_step>:
2613 New field.
2614 (target_supports_software_single_step): New macro.
2615
2d97cd35
AT
26162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2617
2618 * linux-low.c (linux_wait_1): Fix pc advance condition.
2619 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2620 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2621
769ef81f
AT
26222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2623
2624 * linux-arm-low.c (arm_is_thumb_mode): New function.
2625 (arm_breakpoint_at): Use arm_is_thumb_mode.
2626 (arm_breakpoint_kind_from_current_state): New function.
2627 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2628 Initialize.
2629 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2630 (linux_breakpoint_kind_from_current_state): New function.
2631 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2632 * linux-low.h (struct linux_target_ops)
2633 <breakpoint_kind_from_current_state>: New field.
2634 * target.h (struct target_ops): Likewise.
2635 (target_breakpoint_kind_from_current_state): New macro.
2636
1bebeeca
PA
26372015-11-30 Pedro Alves <palves@redhat.com>
2638
2639 * linux-low.c (linux_resume): Wake up the event loop before
2640 returning.
2641
a67a9fae
PA
26422015-11-30 Pedro Alves <palves@redhat.com>
2643
2644 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2645 check.
2646 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2647 to -1.
2648 * target.c (struct thread_search): New structure.
2649 (thread_search_callback): New function.
2650 (prev_general_thread): New global.
2651 (prepare_to_access_memory, done_accessing_memory): New functions.
2652 * target.h (prepare_to_access_memory, done_accessing_memory):
2653 Replace macros with function declarations.
2654
f2faf941
PA
26552015-11-30 Pedro Alves <palves@redhat.com>
2656
2657 PR 14618
2658 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2659 report TARGET_WAITKIND_NO_RESUMED.
2660 * remote-utils.c (prepare_resume_reply): Handle
2661 TARGET_WAITKIND_NO_RESUMED.
2662 * server.c (report_no_resumed): New global.
2663 (handle_query) <qSupported>: Handle "no-resumed+". Report
2664 "no-resumed+" support.
2665 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2666 return error if the client doesn't support no-resumed events.
2667 (push_stop_notification): New function.
2668 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2669 events if the client supports them.
2670
a681f9c9
PA
26712015-11-30 Pedro Alves <palves@redhat.com>
2672
2673 * linux-low.c (thread_still_has_status_pending_p): Don't check
2674 vCont;t here.
2675 (lwp_resumed): New function.
2676 (status_pending_p_callback): Return early if the LWP is not
2677 supposed to be resumed.
2678
65706a29
PA
26792015-11-30 Pedro Alves <palves@redhat.com>
2680
2681 * linux-low.c (handle_extended_wait): Assert that the LWP's
2682 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2683 thread create events, leave the new child's status pending.
2684 (linux_low_filter_event): If GDB wants to hear about thread exit
2685 events, leave the LWP marked dead and don't delete it.
2686 (linux_wait_for_event_filtered): Don't check for thread exit.
2687 (filter_exit_event): New function.
2688 (linux_wait_1): Use it, when returning an exit event.
2689 (linux_resume_one_lwp_throw): Assert that the LWP's
2690 waitstatus is TARGET_WAITKIND_IGNORE.
2691 * remote-utils.c (prepare_resume_reply): Handle
2692 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2693 * server.c (report_thread_events): New global.
2694 (handle_general_set): Handle QThreadEvents.
2695 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2696 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2697 TARGET_WAITKIND_THREAD_EXITED.
2698 * server.h (report_thread_events): Declare.
2699
56cf4bed
PA
27002015-11-30 Pedro Alves <palves@redhat.com>
2701
2702 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2703 the thread's last_resume_kind was resume_stop.
2704
500c1d85
PA
27052015-11-30 Pedro Alves <palves@redhat.com>
2706
2707 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2708 before returning.
2709
de979965
PA
27102015-11-30 Pedro Alves <palves@redhat.com>
2711
2712 * server.c (handle_v_requests): Handle vCtrlC.
2713
34c65914
PA
27142015-11-30 Pedro Alves <palves@redhat.com>
2715
2716 * gdbthread.h (find_any_thread_of_pid): Declare.
2717 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2718 functions.
2719 * server.c (handle_query): If current_thread is NULL, look for
2720 another thread of the selected process.
2721
79efa585 27222015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2723 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2724
2725 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2726 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2727 name in reply.
2728 * target.h (struct target_ops) <thread_name>: New field.
2729 (target_thread_name): New macro.
2730
80d82c19
JB
27312015-11-23 Joel Brobecker <brobecker@adacore.com>
2732
2733 * regcache.h (regcache_invalidate_pid): Add declaration.
2734 * regcache.c (regcache_invalidate_pid): New function, extracted
2735 from regcache_invalidate.
2736 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2737 Add trivial documentation comment.
2738 * lynx-low.c: Use regcache_invalidate_pid instead of
2739 regcache_invalidate.
2740
64da5dd5
JB
27412015-11-23 Joel Brobecker <brobecker@adacore.com>
2742
2743 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2744 and Elf64_auxv_t if the target is Android.
2745
37ce4055
DE
27462015-11-22 Doug Evans <xdje42@gmail.com>
2747
2748 * target.h: #include <sys/types.h>.
2749
06e03fff
PA
27502015-11-19 Pedro Alves <palves@redhat.com>
2751
2752 * linux-low.c (linux_process_qsupported): Change prototype.
2753 Adjust.
2754 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2755 Change prototype.
2756 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2757 and adjust to loop over all features.
2758 * server.c (handle_query) <qSupported>: Adjust to call
2759 target_process_qsupported once, passing it a vector of unprocessed
2760 features.
2761 * target.h (struct target_ops) <process_qsupported>: Change
2762 prototype.
2763 (target_process_qsupported): Adjust.
2764
9a084706
PA
27652015-11-19 Pedro Alves <palves@redhat.com>
2766
2767 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2768 mode.
2769 * configure: Regenerate.
2770
dad44a1f
PA
27712015-11-19 Pedro Alves <palves@redhat.com>
2772
2773 * configure: Regenerate.
2774
231c0592
YQ
27752015-11-19 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2778 type to uint32_t.
2779
6c1c9a8b
YQ
27802015-11-19 Yao Qi <yao.qi@linaro.org>
2781
2782 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2783 (struct aarch64_operand): Move enum out.
2784
9caa3311
YQ
27852015-11-19 Yao Qi <yao.qi@linaro.org>
2786
2787 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2788 struct user_fpsimd_state *.
2789 (aarch64_store_fpregset): Likewise.
2790
6a69a054
YQ
27912015-11-19 Yao Qi <yao.qi@linaro.org>
2792
2793 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2794 struct user_pt_regs *.
2795 (aarch64_store_gregset): Likewise.
2796
1798301e
PA
27972015-11-18 Pedro Alves <palves@redhat.com>
2798
2799 * Makefile.in (all_object_files): Add $IPA_OBJS.
2800
ce7715e2
PA
28012015-11-17 Pedro Alves <palves@redhat.com>
2802
2803 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2804 GDB_SIGNAL_0 and gdb_signal_to_string.
2805
c0879059
PA
28062015-11-17 Pedro Alves <palves@redhat.com>
2807
2808 * win32-low.c (handle_output_debug_string): Remove parameter.
2809 (win32_kill): Remove our_status local and adjust call to
2810 handle_output_debug_string.
2811 (get_child_debug_event): Adjust call to
2812 handle_output_debug_string.
2813
1996e237
SM
28142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2815
2816 * linux-mips-low.c (mips_fill_gregset): Add cast.
2817 (mips_store_gregset): Likewise.
2818 (mips_fill_fpregset): Likewise.
2819 (mips_store_fpregset): Likewise.
2820
cbec665b
SM
28212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2822
2823 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2824 priv.
2825
eb3e3c67
SM
28262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2827
2828 * linux-mips-low.c (mips_linux_new_thread): Change type of
2829 watch_type to enum target_hw_bp_type.
2830
171de4b8
SM
28312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2832
2833 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2834 Change return type to arm_hwbp_type.
2835
04248ead
SM
28362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2837
2838 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2839 (arm_store_gregset): Likewise.
2840 * linux-arm-low.c (arm_get_hwcap): Likewise.
2841 (arm_read_description): Likewise.
2842
04b3479c
SM
28432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2844
2845 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2846
2bc84e8a
SM
28472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2848
2849 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2850 (ppc_fill_vsxregset): Likewise.
2851 (ppc_store_vsxregset): Likewise.
2852 (ppc_fill_vrregset): Likewise.
2853 (ppc_store_vrregset): Likewise.
2854 (ppc_fill_evrregset): Likewise.
2855 (ppc_store_evrregset): Likewise.
2856
e6c5bb05
SM
28572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * linux-ppc-low.c (ppc_usrregs_info): Remove
2860 forward-declaration.
2861 (ppc_arch_setup): Move lower in file.
2862
7ea45d72
SM
28632015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2864
2865 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2866 (ps_pdwrite): Likewise.
2867
69291610
HW
28682015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2869
2870 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2871 to after assert checks.
2872
b42945fd
SM
28732015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2874
2875 * proc-service.c (ps_pdread): Add/adjust casts.
2876 (ps_pdwrite): Add/adjust casts.
2877
d6f85c84
SM
28782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2879
2880 * server.c (handle_search_memory_1): Cast return value of
2881 memmem.
2882
f98cd059
SM
28832015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2884
2885 * server.c (write_qxfer_response): Change type of data to
2886 gdb_byte *.
2887
d2412fa5
PA
28882015-10-29 Pedro Alves <palves@redhat.com>
2889
2890 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2891
c17414a2
PA
28922015-10-29 Pedro Alves <palves@redhat.com>
2893
2894 * tracepoint.c (clear_installed_tracepoints): Add casts.
2895
e053fbc4
PA
28962015-10-29 Pedro Alves <palves@redhat.com>
2897
2898 * server.c (handle_v_cont, process_serial_event): Add enum
2899 gdb_signal casts to signal parsing code.
2900
add67df8
PA
29012015-10-29 Pedro Alves <palves@redhat.com>
2902
2903 * linux-low.h (NULL_REGSET): Define.
2904 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2905 * linux-arm-low.c (arm_regsets): Likewise.
2906 * linux-crisv32-low.c (cris_regsets): Likewise.
2907 * linux-m68k-low.c (m68k_regsets): Likewise.
2908 * linux-mips-low.c (mips_regsets): Likewise.
2909 * linux-nios2-low.c (nios2_regsets): Likewise.
2910 * linux-ppc-low.c (ppc_regsets): Likewise.
2911 * linux-s390-low.c (s390_regsets): Likewise.
2912 * linux-sh-low.c (sh_regsets): Likewise.
2913 * linux-sparc-low.c (sparc_regsets): Likewise.
2914 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2915 * linux-tile-low.c (tile_regsets): Likewise.
2916 * linux-x86-low.c (x86_regsets): Likewise.
2917 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2918
50bc912a
PA
29192015-10-29 Pedro Alves <palves@redhat.com>
2920
2921 * linux-low.h (NULL_REGSET): Define.
2922 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2923 * linux-arm-low.c (arm_regsets): Likewise.
2924 * linux-crisv32-low.c (cris_regsets): Likewise.
2925 * linux-m68k-low.c (m68k_regsets): Likewise.
2926 * linux-mips-low.c (mips_regsets): Likewise.
2927 * linux-nios2-low.c (nios2_regsets): Likewise.
2928 * linux-ppc-low.c (ppc_regsets): Likewise.
2929 * linux-s390-low.c (s390_regsets): Likewise.
2930 * linux-sh-low.c (sh_regsets): Likewise.
2931 * linux-sparc-low.c (sparc_regsets): Likewise.
2932 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2933 * linux-tile-low.c (tile_regsets): Likewise.
2934 * linux-x86-low.c (x86_regsets): Likewise.
2935 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2936
682b2546
DE
29372015-10-26 Doug Evans <dje@google.com>
2938
2939 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2940
963843d4
DE
29412015-10-26 Doug Evans <dje@google.com>
2942
2943 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2944
d41401ac
DE
29452015-10-26 Doug Evans <dje@google.com>
2946
2947 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2948 for debug_printf.
2949 (attach_thread, find_new_threads_callback): Ditto.
2950
3db28855
AT
29512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2952
2953 * mem-break.h (set_breakpoint_data): Remove.
2954
fb78e89c
AT
29552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2956
2957 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2958 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2959 (initialize_low): Remove set_breakpoint_data call.
2960 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2961 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2962 (initialize_low): Remove set_breakpoint_data call.
2963 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2964 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2965 (initialize_low): Remove set_breakpoint_data call.
2966
2e6ee069
AT
29672015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2968
2969 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2970 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2971 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2972 * target.h (target_breakpoint_kind_from_pc): New macro.
2973
1652a986
AT
29742015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2975
2976 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2977 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2978 the default breakpoint kind.
2979
abeead09
AT
29802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2981
2982 * linux-arm-low.c (arm_supports_z_point_type): Add software
2983 breakpoint support.
2984
b0b4b501
AT
29852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2986
2987 * linux-arm-low.c: Refactor breakpoint definitions.
2988 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2989 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2990
8689682c
AT
29912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2992
2993 * Makefile.in: Add arm.c/o.
2994 * configure.srv: Likewise.
2995 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2996 (arm_breakpoint_kind_from_pc): New function.
2997 (arm_sw_breakpoint_from_kind): Return proper kind.
2998 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2999
27165294
AT
30002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3001
3002 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3003 removal.
3004 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3005 (struct raw_breakpoint) <size>: Remove.
3006 (struct raw_breakpoint) <kind>: Add.
3007 (bp_size): New function.
3008 (bp_opcode): Likewise.
3009 (find_raw_breakpoint_at): Adjust for kind.
3010 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3011 (remove_memory_breakpoint): Adjust for kind call bp_size.
3012 (set_raw_breakpoint_at): Adjust for kind.
3013 (set_breakpoint): Likewise.
3014 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3015 (delete_raw_breakpoint): Adjust for kind.
3016 (delete_breakpoint): Likewise.
3017 (find_gdb_breakpoint): Likewise.
3018 (set_gdb_breakpoint_1): Likewise.
3019 (set_gdb_breakpoint): Likewise.
3020 (delete_gdb_breakpoint_1): Likewise.
3021 (delete_gdb_breakpoint): Likewise.
3022 (uninsert_raw_breakpoint): Likewise.
3023 (reinsert_raw_breakpoint): Likewise.
3024 (set_breakpoint_data): Remove.
3025 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3026 (check_mem_read): Adjust for kind call bp_size.
3027 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3028 (clone_one_breakpoint): Adjust for kind.
3029 * mem-break.h (set_gdb_breakpoint): Likewise.
3030 (delete_gdb_breakpoint): Likewise.
3031 * server.c (process_serial_event): Likewise.
3032
dd373349
AT
30332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3034
3035 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3036 (struct linux_target_ops) <breakpoint>: Remove.
3037 (struct linux_target_ops) <breakpoint_len>: Remove.
3038 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3039 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3040 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3041 (arm_sw_breakpoint_from_kind): New function.
3042 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3043 (struct linux_target_ops) <breakpoint>: Remove.
3044 (struct linux_target_ops) <breakpoint_len>: Remove.
3045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3047 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3048 (struct linux_target_ops) <breakpoint>: Remove.
3049 (struct linux_target_ops) <breakpoint_len>: Remove.
3050 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3051 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3052 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3053 (struct linux_target_ops) <breakpoint>: Remove.
3054 (struct linux_target_ops) <breakpoint_len>: Remove.
3055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3056 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3057 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3058 and sw_breakpoint_from_kind to increment the pc.
3059 (linux_breakpoint_kind_from_pc): New function.
3060 (linux_sw_breakpoint_from_kind): New function.
3061 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3062 (initialize_low): Call breakpoint_kind_from_pc and
3063 sw_breakpoint_from_kind to replace breakpoint_data/len.
3064 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3065 New field.
3066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3067 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3068 (struct linux_target_ops) <breakpoint>: Remove.
3069 (struct linux_target_ops) <breakpoint_len>: Remove.
3070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3072 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3073 (struct linux_target_ops) <breakpoint>: Remove.
3074 (struct linux_target_ops) <breakpoint_len>: Remove.
3075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3077 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3078 (struct linux_target_ops) <breakpoint>: Remove.
3079 (struct linux_target_ops) <breakpoint_len>: Remove.
3080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3082 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3083 (struct linux_target_ops) <breakpoint>: Remove.
3084 (struct linux_target_ops) <breakpoint_len>: Remove.
3085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3087 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3088 (struct linux_target_ops) <breakpoint>: Remove.
3089 (struct linux_target_ops) <breakpoint_len>: Remove.
3090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3092 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3093 (struct linux_target_ops) <breakpoint>: Remove.
3094 (struct linux_target_ops) <breakpoint_len>: Remove.
3095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3097 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3098 (struct linux_target_ops) <breakpoint>: Remove.
3099 (struct linux_target_ops) <breakpoint_len>: Remove.
3100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3102 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3103 (struct linux_target_ops) <breakpoint>: Remove.
3104 (struct linux_target_ops) <breakpoint_len>: Remove.
3105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3107 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3108 (struct linux_target_ops) <breakpoint>: Remove.
3109 (struct linux_target_ops) <breakpoint_len>: Remove.
3110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3112 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3113 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3114 (struct linux_target_ops) <breakpoint>: Remove.
3115 (struct linux_target_ops) <breakpoint_len>: Remove.
3116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3118 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3119 (struct linux_target_ops) <breakpoint>: Remove.
3120 (struct linux_target_ops) <breakpoint_len>: Remove.
3121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3123
4cd98a19
AT
31242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3125
3126 * linux-cris-low.c (cris_get_pc): Remove void arg.
3127
774ee6d2
AR
31282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3129
3130 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3131 variable name.
3132
833dcd29
AR
31332015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3134
3135 * inferiors.c (thread_pid_matches_callback): New function.
3136 (find_thread_process): New function.
3137 (remove_thread): Reset current_thread.
3138 (remove_process): Assert threads have been removed first.
3139
8d689ee5
YQ
31402015-10-15 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3143 if it is 3.
3144 (aarch64_remove_point): Likewise.
3145 * regcache.c (regcache_register_size): New function.
3146
1c2e1515
YQ
31472015-10-12 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-aarch64-low.c: Update all callers as emit_load_store
3150 is renamed to aarch64_emit_load_store.
3151
e1c587c3
YQ
31522015-10-12 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-aarch64-low.c: Update all callers of function renaming
3155 from emit_insn to aarch64_emit_insn.
3156
b6542f81
YQ
31572015-10-12 Yao Qi <yao.qi@linaro.org>
3158
3159 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3160 arch/aarch64-insn.h.
3161 (struct aarch64_memory_operand): Likewise.
3162 (ENCODE): Likewise.
3163 (emit_insn): Move to arch/aarch64-insn.c.
3164 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3165 (emit_load_store): Move to arch/aarch64-insn.c.
3166 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3167 (can_encode_int32): Remove.
3168
246994ce
YQ
31692015-10-12 Yao Qi <yao.qi@linaro.org>
3170
3171 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3172 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3173 (aarch64_relocate_instruction): Likewise.
3174 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3175 (struct aarch64_insn_visitor): Likewise.
3176
0badd99f
YQ
31772015-10-12 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3180 (struct aarch64_insn_visitor): New.
3181 (struct aarch64_insn_relocation_data): New.
3182 (aarch64_ftrace_insn_reloc_b): New function.
3183 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3184 (aarch64_ftrace_insn_reloc_cb): Likewise.
3185 (aarch64_ftrace_insn_reloc_tb): Likewise.
3186 (aarch64_ftrace_insn_reloc_adr): Likewise.
3187 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3188 (aarch64_ftrace_insn_reloc_others): Likewise.
3189 (visitor): New.
3190 (aarch64_relocate_instruction): Use visitor.
3191
dfaffe9d
YQ
31922015-10-12 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3195 int. Add argument buf.
3196 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3197 aarch64_relocate_instruction.
3198
70b439f0
YQ
31992015-10-12 Yao Qi <yao.qi@linaro.org>
3200
3201 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3202 argument insn. Remove local variable insn. Don't call
3203 target_read_uint32.
3204 (aarch64_install_fast_tracepoint_jump_pad): Call
3205 target_read_uint32.
3206
7781c06f
YQ
32072015-09-30 Yao Qi <yao.qi@linaro.org>
3208
3209 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3210 (emit_load_store_pair): Likewise.
3211
9a3c8263
SM
32122015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3213
3214 * dll.c (match_dll): Add cast(s).
3215 (unloaded_dll): Likewise.
3216 * linux-low.c (second_thread_of_pid_p): Likewise.
3217 (delete_lwp_callback): Likewise.
3218 (count_events_callback): Likewise.
3219 (select_event_lwp_callback): Likewise.
3220 (linux_set_resume_request): Likewise.
3221 * server.c (accumulate_file_name_length): Likewise.
3222 (emit_dll_description): Likewise.
3223 (handle_qxfer_threads_worker): Likewise.
3224 (visit_actioned_threads): Likewise.
3225 * thread-db.c (any_thread_of): Likewise.
3226 * tracepoint.c (same_process_p): Likewise.
3227 (match_blocktype): Likewise.
3228 (build_traceframe_info_xml): Likewise.
3229
224c3ddb
SM
32302015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3231
3232 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3233 assignment.
3234 (gdb_unparse_agent_expr): Likewise.
3235 * hostio.c (require_data): Likewise.
3236 (handle_pread): Likewise.
3237 * linux-low.c (disable_regset): Likewise.
3238 (fetch_register): Likewise.
3239 (store_register): Likewise.
3240 (get_dynamic): Likewise.
3241 (linux_qxfer_libraries_svr4): Likewise.
3242 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3243 (set_fast_tracepoint_jump): Likewise.
3244 (uninsert_fast_tracepoint_jumps_at): Likewise.
3245 (reinsert_fast_tracepoint_jumps_at): Likewise.
3246 (validate_inserted_breakpoint): Likewise.
3247 (clone_agent_expr): Likewise.
3248 * regcache.c (init_register_cache): Likewise.
3249 * remote-utils.c (putpkt_binary_1): Likewise.
3250 (decode_M_packet): Likewise.
3251 (decode_X_packet): Likewise.
3252 (look_up_one_symbol): Likewise.
3253 (relocate_instruction): Likewise.
3254 (monitor_output): Likewise.
3255 * server.c (handle_search_memory): Likewise.
3256 (handle_qxfer_exec_file): Likewise.
3257 (handle_qxfer_libraries): Likewise.
3258 (handle_qxfer): Likewise.
3259 (handle_query): Likewise.
3260 (handle_v_cont): Likewise.
3261 (handle_v_run): Likewise.
3262 (captured_main): Likewise.
3263 * target.c (write_inferior_memory): Likewise.
3264 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3265 * tracepoint.c (init_trace_buffer): Likewise.
3266 (add_tracepoint_action): Likewise.
3267 (add_traceframe): Likewise.
3268 (add_traceframe_block): Likewise.
3269 (cmd_qtdpsrc): Likewise.
3270 (cmd_qtdv): Likewise.
3271 (cmd_qtstatus): Likewise.
3272 (response_source): Likewise.
3273 (response_tsv): Likewise.
3274 (cmd_qtnotes): Likewise.
3275 (gdb_collect): Likewise.
3276 (initialize_tracepoint): Likewise.
3277
afbe19f8
PL
32782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3279
3280 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3281 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3282 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3283 <NOP>: New.
3284 (enum aarch64_condition_codes): New enum.
3285 (w0): New static global.
3286 (fp): Likewise.
3287 (lr): Likewise.
3288 (struct aarch64_memory_operand) <type>: New
3289 MEMORY_OPERAND_POSTINDEX type.
3290 (postindex_memory_operand): New helper function.
3291 (emit_ret): New function.
3292 (emit_load_store_pair): New function, factored out of emit_stp
3293 with support for MEMORY_OPERAND_POSTINDEX.
3294 (emit_stp): Rewrite using emit_load_store_pair.
3295 (emit_ldp): New function.
3296 (emit_load_store): Likewise.
3297 (emit_ldr): Mention post-index instruction in comment.
3298 (emit_ldrh): New function.
3299 (emit_ldrb): New function.
3300 (emit_ldrsw): Mention post-index instruction in comment.
3301 (emit_str): Likewise.
3302 (emit_subs): New function.
3303 (emit_cmp): Likewise.
3304 (emit_and): Likewise.
3305 (emit_orr): Likewise.
3306 (emit_orn): Likewise.
3307 (emit_eor): Likewise.
3308 (emit_mvn): Likewise.
3309 (emit_lslv): Likewise.
3310 (emit_lsrv): Likewise.
3311 (emit_asrv): Likewise.
3312 (emit_mul): Likewise.
3313 (emit_sbfm): Likewise.
3314 (emit_sbfx): Likewise.
3315 (emit_ubfm): Likewise.
3316 (emit_ubfx): Likewise.
3317 (emit_csinc): Likewise.
3318 (emit_cset): Likewise.
3319 (emit_nop): Likewise.
3320 (emit_ops_insns): New helper function.
3321 (emit_pop): Likewise.
3322 (emit_push): Likewise.
3323 (aarch64_emit_prologue): New function.
3324 (aarch64_emit_epilogue): Likewise.
3325 (aarch64_emit_add): Likewise.
3326 (aarch64_emit_sub): Likewise.
3327 (aarch64_emit_mul): Likewise.
3328 (aarch64_emit_lsh): Likewise.
3329 (aarch64_emit_rsh_signed): Likewise.
3330 (aarch64_emit_rsh_unsigned): Likewise.
3331 (aarch64_emit_ext): Likewise.
3332 (aarch64_emit_log_not): Likewise.
3333 (aarch64_emit_bit_and): Likewise.
3334 (aarch64_emit_bit_or): Likewise.
3335 (aarch64_emit_bit_xor): Likewise.
3336 (aarch64_emit_bit_not): Likewise.
3337 (aarch64_emit_equal): Likewise.
3338 (aarch64_emit_less_signed): Likewise.
3339 (aarch64_emit_less_unsigned): Likewise.
3340 (aarch64_emit_ref): Likewise.
3341 (aarch64_emit_if_goto): Likewise.
3342 (aarch64_emit_goto): Likewise.
3343 (aarch64_write_goto_address): Likewise.
3344 (aarch64_emit_const): Likewise.
3345 (aarch64_emit_call): Likewise.
3346 (aarch64_emit_reg): Likewise.
3347 (aarch64_emit_pop): Likewise.
3348 (aarch64_emit_stack_flush): Likewise.
3349 (aarch64_emit_zero_ext): Likewise.
3350 (aarch64_emit_swap): Likewise.
3351 (aarch64_emit_stack_adjust): Likewise.
3352 (aarch64_emit_int_call_1): Likewise.
3353 (aarch64_emit_void_call_2): Likewise.
3354 (aarch64_emit_eq_goto): Likewise.
3355 (aarch64_emit_ne_goto): Likewise.
3356 (aarch64_emit_lt_goto): Likewise.
3357 (aarch64_emit_le_goto): Likewise.
3358 (aarch64_emit_gt_goto): Likewise.
3359 (aarch64_emit_ge_got): Likewise.
3360 (aarch64_emit_ops_impl): New static global variable.
3361 (aarch64_emit_ops): New target function, return
3362 &aarch64_emit_ops_impl.
3363 (struct linux_target_ops): Install it.
3364
bb903df0
PL
33652015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3366
3367 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3368 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3369 aarch64-ipa.o.
3370 * linux-aarch64-ipa.c: New file.
3371 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3372 and endian.h.
3373 (aarch64_get_thread_area): New target method.
3374 (extract_signed_bitfield): New helper function.
3375 (aarch64_decode_ldr_literal): New function.
3376 (enum aarch64_opcodes): New enum.
3377 (struct aarch64_register): New struct.
3378 (struct aarch64_operand): New struct.
3379 (x0): New static global.
3380 (x1): Likewise.
3381 (x2): Likewise.
3382 (x3): Likewise.
3383 (x4): Likewise.
3384 (w2): Likewise.
3385 (ip0): Likewise.
3386 (sp): Likewise.
3387 (xzr): Likewise.
3388 (aarch64_register): New helper function.
3389 (register_operand): Likewise.
3390 (immediate_operand): Likewise.
3391 (struct aarch64_memory_operand): New struct.
3392 (offset_memory_operand): New helper function.
3393 (preindex_memory_operand): Likewise.
3394 (enum aarch64_system_control_registers): New enum.
3395 (ENCODE): New macro.
3396 (emit_insn): New helper function.
3397 (emit_b): New function.
3398 (emit_bcond): Likewise.
3399 (emit_cb): Likewise.
3400 (emit_tb): Likewise.
3401 (emit_blr): Likewise.
3402 (emit_stp): Likewise.
3403 (emit_ldp_q_offset): Likewise.
3404 (emit_stp_q_offset): Likewise.
3405 (emit_load_store): Likewise.
3406 (emit_ldr): Likewise.
3407 (emit_ldrsw): Likewise.
3408 (emit_str): Likewise.
3409 (emit_ldaxr): Likewise.
3410 (emit_stxr): Likewise.
3411 (emit_stlr): Likewise.
3412 (emit_data_processing_reg): Likewise.
3413 (emit_data_processing): Likewise.
3414 (emit_add): Likewise.
3415 (emit_sub): Likewise.
3416 (emit_mov): Likewise.
3417 (emit_movk): Likewise.
3418 (emit_mov_addr): Likewise.
3419 (emit_mrs): Likewise.
3420 (emit_msr): Likewise.
3421 (emit_sevl): Likewise.
3422 (emit_wfe): Likewise.
3423 (append_insns): Likewise.
3424 (can_encode_int32_in): New helper function.
3425 (aarch64_relocate_instruction): New function.
3426 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3427 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3428 (struct linux_target_ops): Install aarch64_get_thread_area,
3429 aarch64_install_fast_tracepoint_jump_pad and
3430 aarch64_get_min_fast_tracepoint_insn_len.
3431
787749ea
PL
34322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3433
3434 * Makefile.in (aarch64-insn.o): New rule.
3435 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3436
9812b2e6
YQ
34372015-09-21 Yao Qi <yao.qi@linaro.org>
3438
3439 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3440
18fe412b
YQ
34412015-09-21 Yao Qi <yao.qi@linaro.org>
3442
3443 * tracepoint.c (max_jump_pad_size): Remove.
3444
a0cc84cd
YQ
34452015-09-18 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-aarch64-low.c: Don't include sys/uio.h.
3448 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3449
d78908cf
WW
34502015-09-16 Wei-cheng Wang <cole945@gmail.com>
3451
3452 * tracepoint.c (eval_result_type): Change prototype.
3453 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3454
d57e0d50
PA
34552015-09-15 Pedro Alves <palves@redhat.com>
3456
3457 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3458 Check whether to report exec events instead of checking whether
3459 multiprocess is enabled.
3460
5a676acc
PA
34612015-09-15 Pedro Alves <palves@redhat.com>
3462
3463 PR remote/18965
3464 * remote-utils.c (prepare_resume_reply): Merge
3465 TARGET_WAITKIND_VFORK_DONE switch case with the
3466 TARGET_WAITKIND_FORKED case.
3467
7c5d0fad
YQ
34682015-09-15 Yao Qi <yao.qi@linaro.org>
3469
3470 * server.c (handle_query): Check string comparison using
3471 "else if" instead of "if".
3472
750ce8d1
YQ
34732015-09-15 Yao Qi <yao.qi@linaro.org>
3474
3475 * server.c (vCont_supported): New global variable.
3476 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3477 matches. Append ";vContSupported+" to own_buf.
3478 (handle_v_requests): Append ";s;S" to own_buf if target supports
3479 hardware single step or vCont_supported is false.
3480 (capture_main): Set vCont_supported to zero.
3481
70b90b91
YQ
34822015-09-15 Yao Qi <yao.qi@linaro.org>
3483
3484 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3485 it to ...
3486 (linux_supports_hardware_single_step): ... New function.
3487 (linux_target_ops): Update.
3488 * lynx-low.c (lynx_target_ops): Set field
3489 supports_hardware_single_step to target_can_do_hardware_single_step.
3490 * nto-low.c (nto_target_ops): Likewise.
3491 * spu-low.c (spu_target_ops): Likewise.
3492 * win32-low.c (win32_target_ops): Likewise.
3493 * target.c (target_can_do_hardware_single_step): New function.
3494 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3495 Remove. <supports_hardware_single_step>: New field.
3496 (target_supports_conditional_breakpoints): Remove.
3497 (target_supports_hardware_single_step): New macro.
3498 (target_can_do_hardware_single_step): Declare.
3499 * server.c (handle_query): Use target_supports_hardware_single_step
3500 instead of target_supports_conditional_breakpoints.
3501
ade90bde
YQ
35022015-09-15 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3505 function.
3506 (struct linux_target_ops the_low_target): Install
3507 aarch64_linux_siginfo_fixup.
3508
94585166
DB
35092015-09-11 Don Breazeal <donb@codesourcery.com>
3510 Luis Machado <lgustavo@codesourcery.com>
3511
3512 * linux-low.c (linux_mourn): Static declaration.
3513 (linux_arch_setup): Move in front of
3514 handle_extended_wait.
3515 (linux_arch_setup_thread): New function.
3516 (handle_extended_wait): Handle exec events. Call
3517 linux_arch_setup_thread. Make event_lwp argument a
3518 pointer-to-a-pointer.
3519 (check_zombie_leaders): Do not check stopped threads.
3520 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3521 (linux_low_filter_event): Add lwp and thread for exec'ing
3522 non-leader thread if leader thread has been deleted.
3523 Refactor code into linux_arch_setup_thread and call it.
3524 Pass child lwp pointer by reference to handle_extended_wait.
3525 (linux_wait_for_event_filtered): Update comment.
3526 (linux_wait_1): Prevent clobbering exec event status.
3527 (linux_supports_exec_events): New function.
3528 (linux_target_ops) <supports_exec_events>: Initialize new member.
3529 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3530 new member.
3531 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3532 * server.c (report_exec_events): New global variable.
3533 (handle_query): Handle qSupported query for exec-events feature.
3534 (captured_main): Initialize report_exec_events.
3535 * server.h (report_exec_events): Declare new global variable.
3536 * target.h (struct target_ops) <supports_exec_events>: New
3537 member.
3538 (target_supports_exec_events): New macro.
3539 * win32-low.c (win32_target_ops) <supports_exec_events>:
3540 Initialize new member.
3541
0568462b
MM
35422015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3543
3544 * linux-low.c (linux_low_enable_btrace): Remove.
3545 (linux_target_ops): Replace linux_low_enable_btrace with
3546 linux_enable_btrace.
3547
39edd165
YQ
35482015-09-03 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-aarch64-low.c (aarch64_insert_point): Call
3551 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3552 returns true.
3553
1db33b5a
UW
35542015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3555
3556 * linux-low.c (check_stopped_by_breakpoint): Use
3557 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3558
ab290430
PA
35592015-08-27 Pedro Alves <palves@redhat.com>
3560
3561 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3562
8d749320
SM
35632015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3564
6711b7f8
SM
3565 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3566 the XNEW-family equivalent.
8d749320
SM
3567 (compile_bytecodes): Likewise.
3568 * dll.c (loaded_dll): Likewise.
3569 * event-loop.c (append_callback_event): Likewise.
3570 (create_file_handler): Likewise.
3571 (create_file_event): Likewise.
3572 * hostio.c (handle_open): Likewise.
3573 * inferiors.c (add_thread): Likewise.
3574 (add_process): Likewise.
3575 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3576 * linux-arm-low.c (arm_new_process): Likewise.
3577 (arm_new_thread): Likewise.
3578 * linux-low.c (add_to_pid_list): Likewise.
3579 (linux_add_process): Likewise.
3580 (handle_extended_wait): Likewise.
3581 (add_lwp): Likewise.
3582 (enqueue_one_deferred_signal): Likewise.
3583 (enqueue_pending_signal): Likewise.
3584 (linux_resume_one_lwp_throw): Likewise.
3585 (linux_resume_one_thread): Likewise.
3586 (linux_read_memory): Likewise.
3587 (linux_write_memory): Likewise.
3588 * linux-mips-low.c (mips_linux_new_process): Likewise.
3589 (mips_linux_new_thread): Likewise.
3590 (mips_add_watchpoint): Likewise.
3591 * linux-x86-low.c (initialize_low_arch): Likewise.
3592 * lynx-low.c (lynx_add_process): Likewise.
3593 * mem-break.c (set_raw_breakpoint_at): Likewise.
3594 (set_breakpoint): Likewise.
3595 (add_condition_to_breakpoint): Likewise.
3596 (add_commands_to_breakpoint): Likewise.
3597 (clone_agent_expr): Likewise.
3598 (clone_one_breakpoint): Likewise.
3599 * regcache.c (new_register_cache): Likewise.
3600 * remote-utils.c (look_up_one_symbol): Likewise.
3601 * server.c (queue_stop_reply): Likewise.
3602 (start_inferior): Likewise.
3603 (queue_stop_reply_callback): Likewise.
3604 (handle_target_event): Likewise.
3605 * spu-low.c (fetch_ppc_memory): Likewise.
3606 (store_ppc_memory): Likewise.
3607 * target.c (set_target_ops): Likewise.
3608 * thread-db.c (thread_db_load_search): Likewise.
3609 (try_thread_db_load_1): Likewise.
3610 * tracepoint.c (add_tracepoint): Likewise.
3611 (add_tracepoint_action): Likewise.
3612 (create_trace_state_variable): Likewise.
3613 (cmd_qtdpsrc): Likewise.
3614 (cmd_qtro): Likewise.
3615 (add_while_stepping_state): Likewise.
3616 * win32-low.c (child_add_thread): Likewise.
3617 (get_image_name): Likewise.
3618
ed8b7b42
YQ
36192015-08-25 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3622
db3cb7cb
YQ
36232015-08-25 Yao Qi <yao.qi@linaro.org>
3624
3625 * Makefile.in (aarch64-linux.o): New rule.
3626 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3627 srv_tgtobj.
3628 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3629 (aarch64_init_debug_reg_state): Make it extern.
3630 (aarch64_linux_prepare_to_resume): Remove.
3631
f6011a1c
YQ
36322015-08-25 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3635 lwp_arch_private_info and ptid_of_lwp.
3636
88e2cf7e
YQ
36372015-08-25 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3640 Find proc_info by find_process_pid. All callers updated.
3641
5e35436e
YQ
36422015-08-25 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3645 Remove.
3646 (debug_reg_change_callback): Remove.
3647 (aarch64_notify_debug_reg_change): Remove.
3648
4a8a7965
YQ
36492015-08-25 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3652 Call current_lwp_ptid.
3653
32a271ee
YQ
36542015-08-25 Yao Qi <yao.qi@linaro.org>
3655
3656 * linux-aarch64-low.c (debug_reg_change_callback): Use
3657 debug_printf.
3658
0d51c8d7
YQ
36592015-08-25 Yao Qi <yao.qi@linaro.org>
3660
3661 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3662
31a43dd5
YQ
36632015-08-25 Yao Qi <yao.qi@linaro.org>
3664
3665 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3666
8ee52567
YQ
36672015-08-25 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3670 the code.
3671
ff3f0f45
YQ
36722015-08-25 Yao Qi <yao.qi@linaro.org>
3673
3674 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3675 Remove.
3676 (debug_reg_change_callback): Remove argument entry and add argument
3677 lwp. Remove local variable thread. Don't print thread id in the
3678 debugging output. Don't check whether pid of thread equals to pid.
3679 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3680 iterate_over_lwps instead find_inferior.
3681
3d40fbb5
PA
36822015-08-24 Pedro Alves <palves@redhat.com>
3683
3684 * inferiors.c (get_first_process): New function.
3685 * inferiors.h (get_first_process): New declaration.
3686 * remote-utils.c (read_ptid): Default to the first process in the
3687 list, instead of to the current thread's process.
3688
438e1e42
PA
36892015-08-24 Pedro Alves <palves@redhat.com>
3690
3691 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3692 * event-loop.c: Likewise.
3693 * remote-utils.c: Likewise.
3694 * tracepoint.c: Likewise.
3695
a8c6d4fc
PA
36962015-08-24 Pedro Alves <palves@redhat.com>
3697
3698 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3699 ptid_get_lwp.
3700
99b0bb12
PA
37012015-08-21 Pedro Alves <palves@redhat.com>
3702
3703 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3704 instead of literal 1.
3705
f8904751
PA
37062015-08-21 Pedro Alves <palves@redhat.com>
3707
3708 * tdesc.c (default_description): Explicitly zero-initialize.
3709
465a859e
PA
37102015-08-21 Pedro Alves <palves@redhat.com>
3711
3712 PR gdb/18749
3713 * inferiors.c (remove_thread): Discard any pending stop reply for
3714 this thread.
3715 * server.c (remove_all_on_match_pid): Rename to ...
3716 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3717 instead of a pid.
3718 (discard_queued_stop_replies): Change parameter to a ptid. Now
3719 extern.
3720 (handle_v_kill, kill_inferior_callback, captured_main)
3721 (process_serial_event): Adjust.
3722 * server.h (discard_queued_stop_replies): Declare.
3723
f0db101d
PA
37242015-08-21 Pedro Alves <palves@redhat.com>
3725
3726 * linux-low.c (wait_for_sigstop): Always switch to no thread
3727 selected if the previously current thread dies.
3728 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3729 process instead of the current thread's.
3730 * remote-utils.c (input_interrupt): Don't check if there's no
3731 current thread.
3732 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3733 current thread to the general thread fails, error out.
3734 (handle_qxfer_auxv, handle_qxfer_libraries)
3735 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3736 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3737 (handle_query): Check if there's a thread selected instead of
3738 checking whether there's any thread in the thread list.
3739 (handle_qxfer_threads, handle_qxfer_btrace)
3740 (handle_qxfer_btrace_conf): Don't error out early if there's no
3741 thread in the thread list.
3742 (handle_v_cont, myresume): Don't set the current thread to the
3743 continue thread.
3744 (process_serial_event) <Hg handling>: Also set thread_id if the
3745 previous general thread is still alive.
3746 (process_serial_event) <g/G handling>: If setting the current
3747 thread to the general thread fails, error out.
3748 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3749 thread's lwp instead of the current thread's.
3750 * target.c (set_desired_thread): If the desired thread was not
3751 found, leave the current thread pointing to NULL. Return an int
3752 (boolean) indicating success.
3753 * target.h (set_desired_thread): Change return type to int.
3754
40045d91
MF
37552015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3756
3757 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3758 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3759 #includes.
3760 (ps_get_thread_area): New function.
3761
45face3b
GB
37622015-08-19 Gary Benson <gbenson@redhat.com>
3763
3764 * hostio.c (handle_pread): Do not attempt to read more data
3765 than hostio_reply_with_data can fit in a packet.
3766
16d5f642
JB
37672015-08-18 Joel Brobecker <brobecker@adacore.com>
3768
3769 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3770
a738da3a
MF
37712015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3772
3773 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3774
33ebda9d
PA
37752015-08-06 Pedro Alves <palves@redhat.com>
3776
3777 * tracepoint.c (expr_eval_result): Now an int.
3778
a44892be
PA
37792015-08-06 Pedro Alves <palves@redhat.com>
3780
3781 * gdbthread.h (struct regcache): Forward declare.
3782 (struct thread_info) <regcache_data>: Now a struct regcache
3783 pointer.
3784 * inferiors.c (inferior_regcache_data)
3785 (set_inferior_regcache_data): Now work with struct regcache
3786 pointers.
3787 * inferiors.h (struct regcache): Forward declare.
3788 (inferior_regcache_data, set_inferior_regcache_data): Now work
3789 with struct regcache pointers.
3790 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3791 (free_register_cache_thread): Remove struct regcache pointer
3792 casts.
3793
608a1e46
PA
37942015-08-06 Pedro Alves <palves@redhat.com>
3795
3796 * server.c (captured_main): On error, print the exception message
3797 to stderr, and if run_once is set, throw a quit.
3798
f0ce0d3a
PA
37992015-08-06 Pedro Alves <palves@redhat.com>
3800
3801 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3802 the current thread.
3803
bf47e248
PA
38042015-08-06 Pedro Alves <palves@redhat.com>
3805
3806 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3807 reading beyond the passed in buffer length.
3808
b6b9ffcc
PL
38092015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3810
3811 * tracepoint.c (symbol_list) <required>: Remove.
3812
863d01bd
PA
38132015-08-06 Pedro Alves <palves@redhat.com>
3814
3815 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3816 count if stopping and suspending threads.
3817 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3818 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3819 (linux_detach): Complete an ongoing step-over.
3820 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3821 throughout.
3822 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3823 (linux_wait_1): If passing a signal to the inferior after
3824 finishing a step-over, unsuspend and re-resume all lwps. If we
3825 see a single-step event but the thread should be continuing, don't
3826 pass the trap to gdb.
3827 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3828 internal_error instead of gdb_assert.
3829 (enqueue_pending_signal): New function.
3830 (check_ptrace_stopped_lwp_gone): Add debug output.
3831 (start_step_over): Use internal_error instead of gdb_assert.
3832 (complete_ongoing_step_over): New function.
3833 (linux_resume_one_thread): Don't resume a suspended thread.
3834 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3835 it stepping.
3836
00db26fa
PA
38372015-08-06 Pedro Alves <palves@redhat.com>
3838
3839 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3840 (linux_thread_alive): Use lwp_is_marked_dead.
3841 (extended_event_reported): Delete.
3842 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3843 instead of extended_event_reported.
3844 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3845 as well.
3846 (lwp_is_marked_dead): New function.
3847 (lwp_running): Use lwp_is_marked_dead.
3848 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3849 comment.
3850
ad071a30
PA
38512015-08-06 Pedro Alves <palves@redhat.com>
3852
3853 * linux-low.c (linux_wait_1): Move fork event output out of the
3854 !report_to_gdb check. Pass event_child->waitstatus to
3855 target_waitstatus_to_string instead of ourstatus.
3856
524b57e6
YQ
38572015-08-04 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3860 if current_thread is 32 bit.
3861
6085d6f6
YQ
38622015-08-04 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3865 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3866 * server.c (extended_protocol): Remove "static".
3867 * server.h (extended_protocol): Declare it.
3868
8a7e4587
YQ
38692015-08-04 Yao Qi <yao.qi@linaro.org>
3870
3871 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3872 both aarch64 and aarch32.
3873 (aarch64_set_pc): Likewise.
3874
3b53ae99
YQ
38752015-08-04 Yao Qi <yao.qi@linaro.org>
3876
3877 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3878 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3879 arm-with-neon.xml to srv_xmlfiles.
3880 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3881 (is_64bit_tdesc): New function.
3882 (aarch64_linux_read_description): New function.
3883 (aarch64_arch_setup): Call aarch64_linux_read_description.
3884 (regs_info): Rename to regs_info_aarch64.
3885 (aarch64_regs_info): Return right regs_info.
3886 (initialize_low_arch): Call initialize_low_arch_aarch32.
3887
bd9e6534
YQ
38882015-08-04 Yao Qi <yao.qi@linaro.org>
3889
3890 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3891 * linux-aarch32-low.c: New file.
3892 * linux-aarch32-low.h: New file.
3893 * linux-arm-low.c (arm_fill_gregset): Move it to
3894 linux-aarch32-low.c.
3895 (arm_store_gregset): Likewise.
3896 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3897 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3898 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3899 (regs_info): Rename to regs_info_arm.
3900 (arm_regs_info): Return regs_info_aarch32 if
3901 have_ptrace_getregset is 1 and target description is
3902 arm_with_neon or arm_with_vfpv3.
3903 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3904 Call initialize_low_arch_aarch32 instead.
3905
ded48a5e
YQ
39062015-08-04 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3909 * linux-low.c: ... here.
3910 * linux-low.h (have_ptrace_getregset): Declare it.
3911
96e9210f
PA
39122015-08-04 Pedro Alves <palves@redhat.com>
3913
3914 * thread-db.c (struct thread_db): Use new typedefs.
3915 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3916 CHK calls.
3917 (disable_thread_event_reporting): Cast result of dlsym to
3918 destination function pointer type.
3919 (thread_db_mourn): Use td_ta_delete_ftype.
3920
af60a1ef
SL
39212015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3922
3923 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3924 arch variant.
3925 (CDX_BREAKPOINT): Define for R2.
3926 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3927 (the_low_target): Add comments.
3928
e8b41681
YQ
39292015-07-30 Yao Qi <yao.qi@linaro.org>
3930
3931 * linux-arm-low.c (arm_hwcap): Remove it.
3932 (arm_read_description): New local variable arm_hwcap. Don't
3933 set arm_hwcap to zero.
3934
89abb039
YQ
39352015-07-30 Yao Qi <yao.qi@linaro.org>
3936
3937 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3938 Use regcache->tdesc instead.
3939 (arm_store_wmmxregset): Likewise.
3940 (arm_fill_vfpregset): Likewise.
3941 (arm_store_vfpregset): Likewise.
3942
deca266c
YQ
39432015-07-30 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-arm-low.c: Include arch/arm.h.
3946 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3947 (arm_store_gregset): Likewise.
3948
aa58a496
SM
39492015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3950
3951 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3952 ptrace's 4th parameter.
3953
50904b25
YQ
39542015-07-27 Yao Qi <yao.qi@linaro.org>
3955
3956 * configure.srv (case aarch64*-*-linux*): Don't set
3957 srv_linux_usrregs.
3958
5826e159
PA
39592015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3960
3961 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3962 sys/ptrace.h.
3963 * linux-arm-low.c: Likewise.
3964 * linux-cris-low.c: Likewise.
3965 * linux-crisv32-low.c: Likewise.
3966 * linux-low.c: Likewise.
3967 * linux-m68k-low.c: Likewise.
3968 * linux-mips-low.c: Likewise.
3969 * linux-nios2-low.c: Likewise.
3970 * linux-s390-low.c: Likewise.
3971 * linux-sparc-low.c: Likewise.
3972 * linux-tic6x-low.c: Likewise.
3973 * linux-tile-low.c: Likewise.
3974 * linux-x86-low.c: Likewise.
3975
54019719
PA
39762015-07-24 Pedro Alves <palves@redhat.com>
3977
3978 * config.in: Regenerate.
3979 * configure: Regenerate.
3980
eb7aa561
PA
39812015-07-24 Pedro Alves <palves@redhat.com>
3982
3983 * acinclude.m4: Include ../ptrace.m4.
3984 * configure.ac: Call GDB_AC_PTRACE.
3985 * config.in, configure: Regenerate.
3986
55d7b841
YQ
39872015-07-24 Yao Qi <yao.qi@linaro.org>
3988
3989 * linux-low.c (linux_create_inferior): Remove setting to
3990 proc->priv->new_inferior.
3991 (linux_attach): Likewise.
3992 (linux_low_filter_event): Likewise.
3993 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3994
c06cbd92
YQ
39952015-07-24 Yao Qi <yao.qi@linaro.org>
3996
3997 * linux-low.c (linux_arch_setup): New function.
3998 (linux_low_filter_event): If proc->tdesc is NULL and
3999 proc->attached is true, call the_low_target.arch_setup.
4000 Otherwise, keep status pending, and return.
4001 (linux_resume_one_lwp_throw): Don't call get_pc if
4002 thread->while_stepping isn't NULL. Don't call
4003 get_thread_regcache if proc->tdesc is NULL.
4004 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4005 (linux_target_ops): Install arch_setup.
4006 * server.c (start_inferior): Call the_target->arch_setup.
4007 * target.h (struct target_ops) <arch_setup>: New field.
4008 (target_arch_setup): New marco.
4009 * lynx-low.c (lynx_target_ops): Update.
4010 * nto-low.c (nto_target_ops): Update.
4011 * spu-low.c (spu_target_ops): Update.
4012 * win32-low.c (win32_target_ops): Update.
4013
5ae3ebba
YQ
40142015-07-24 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-low.c (linux_add_process): Don't set
4017 proc->priv->new_inferior.
4018 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4019 (linux_attach): Likewise.
4020
eb97750b
YQ
40212015-07-24 Yao Qi <yao.qi@linaro.org>
4022
4023 * server.c (start_inferior): Code refactor.
4024
51aee833
YQ
40252015-07-24 Yao Qi <yao.qi@linaro.org>
4026
4027 * server.c (process_serial_event): Set general_thread.
4028
af1b22f3
YQ
40292015-07-21 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4032 aarch64_linux_get_debug_reg_capacity.
4033
554717a3
YQ
40342015-07-17 Yao Qi <yao.qi@linaro.org>
4035
4036 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4037 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4038 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4039 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4040 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4041 (AARCH64_HWP_ALIGNMENT): Likewise.
4042 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4043 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4044 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4045 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4046 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4047 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4048 (struct aarch64_debug_reg_state): Likewise.
4049 (struct arch_lwp_info): Likewise.
4050 (aarch64_align_watchpoint): Likewise.
4051 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4052 (aarch64_watchpoint_length): Likewise.
4053 (aarch64_point_encode_ctrl_reg): Likewise
4054 (aarch64_point_is_aligned): Likewise.
4055 (aarch64_align_watchpoint): Likewise.
4056 (aarch64_linux_set_debug_regs):
4057 (aarch64_dr_state_insert_one_point): Likewise.
4058 (aarch64_dr_state_remove_one_point): Likewise.
4059 (aarch64_handle_breakpoint): Likewise.
4060 (aarch64_handle_aligned_watchpoint): Likewise.
4061 (aarch64_handle_unaligned_watchpoint): Likewise.
4062 (aarch64_handle_watchpoint): Likewise.
4063
c67ca4de
YQ
40642015-07-17 Yao Qi <yao.qi@linaro.org>
4065
4066 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4067 and don't aarch64_get_debug_reg_state. All callers update.
4068 (aarch64_handle_aligned_watchpoint): Likewise.
4069 (aarch64_handle_unaligned_watchpoint): Likewise.
4070 (aarch64_handle_watchpoint): Likewise.
4071 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4072 (aarch64_remove_point): Likewise.
4073
25abf979
YQ
40742015-07-17 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4077 debug_printf.
4078 (aarch64_handle_unaligned_watchpoint): Likewise.
4079
db1ff28b
JK
40802015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4081
4082 Revert the previous 3 commits:
4083 Move gdb_regex* to common/
4084 Move linux_find_memory_regions_full & co.
4085 gdbserver build-id attribute generator
4086
700ca40f
JK
40872015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4088 Jan Kratochvil <jan.kratochvil@redhat.com>
4089
4090 gdbserver build-id attribute generator.
4091 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4092 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4093 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4094 (find_phdr): New.
4095 (get_dynamic): Use find_pdhr to traverse program headers.
4096 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4097 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4098 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4099 (get_hex_build_id): New.
4100 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4101 to reply XML document.
4102
9904185c
JK
41032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4104 Jan Kratochvil <jan.kratochvil@redhat.com>
4105
4106 * target.c: Include target/target-utils.h and fcntl.h.
4107 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4108 (target_fileio_read_stralloc): New functions.
4109
6e5b4429
JK
41102015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4111
4112 * Makefile.in (OBS): Add gdb_regex.o.
4113 (gdb_regex.o): New.
4114 * config.in: Rebuilt.
4115 * configure: Rebuilt.
4116
ddc98fbf
JK
41172015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4118 Jan Kratochvil <jan.kratochvil@redhat.com>
4119
4120 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4121 * Makefile.in (OBS): Add target-utils.o.
4122 (linux-maps.o, target-utils.o): New.
4123 * configure.srv (srv_linux_obj): Add linux-maps.o.
4124
e57bb7a0
PL
41252015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4126
4127 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4128 function, return 1.
4129 (the_low_target): Install it.
4130
586b02a9
PA
41312015-07-14 Pedro Alves <palves@redhat.com>
4132
4133 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4134 Instead, ignore ECHILD, and throw an error for other errnos.
4135
58c1b36c
PA
41362015-07-10 Pedro Alves <palves@redhat.com>
4137
4138 * event-loop.c (struct callback_event) <data>: Change type to
4139 gdb_client_data instance instead of gdb_client_data pointer.
4140 (append_callback_event): Adjust.
4141
421530db
PL
41422015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4143
4144 * linux-aarch64-low.c: Add comments for each linux_target_ops
4145 method. Remove comments already covered in target_ops and
4146 linux_target_ops definitions.
4147 (the_low_target): Add comments for each unimplemented method.
4148
c2d65f38
YQ
41492015-07-09 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-aarch64-low.c (aarch64_regmap): Remove.
4152 (aarch64_usrregs_info): Remove.
4153 (regs_info): Set field usrregs to NULL.
4154
b20a6524
MM
41552015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4156
4157 * linux-low.c: Include "rsp-low.h"
4158 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4159 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4160 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4161 (handle_btrace_enable_pt): New.
4162 (handle_btrace_general_set): Support "pt".
4163 (handle_btrace_conf_general_set): Support "pt:size".
4164
96c97461
PL
41652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4166
4167 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4168 Z_PACKET_SW_BP.
4169
37d66942
PL
41702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4171
4172 * linux-aarch64-low.c: Remove comment about endianness.
4173 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4174 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4175 memcmp.
4176
dc06243f
GB
41772015-06-24 Gary Benson <gbenson@redhat.com>
4178
4179 * linux-i386-ipa.c (stdint.h): Do not include.
4180 * lynx-i386-low.c (stdint.h): Likewise.
4181 * lynx-ppc-low.c (stdint.h): Likewise.
4182 * mem-break.c (stdint.h): Likewise.
4183 * thread-db.c (stdint.h): Likewise.
4184 * tracepoint.c (stdint.h): Likewise.
4185 * win32-low.c (stdint.h): Likewise.
4186
124e13d9
SM
41872015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4188
4189 * server.c (write_qxfer_response): Update call to
4190 remote_escape_output.
4191
909c2cda
JK
41922015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4193 Jan Kratochvil <jan.kratochvil@redhat.com>
4194
4195 Merge multiple hex conversions.
4196 * gdbreplay.c (tohex): Rename to 'fromhex'.
4197 (logchar): Use fromhex.
4198
24c05f46
JK
41992015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4200
4201 * server.c (handle_qxfer_libraries): Set `version' attribute for
4202 <library-list>.
4203
14d2069a
GB
42042015-06-10 Gary Benson <gbenson@redhat.com>
4205
4206 * target.h (struct target_ops) <multifs_open>: New field.
4207 <multifs_unlink>: Likewise.
4208 <multifs_readlink>: Likewise.
4209 * linux-low.c (nat/linux-namespaces.h): New include.
4210 (linux_target_ops): Initialize the_target->multifs_open,
4211 the_target->multifs_unlink and the_target->multifs_readlink.
4212 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4213 * hostio.c (hostio_fs_pid): New static variable.
4214 (hostio_handle_new_gdb_connection): New function.
4215 (handle_setfs): Likewise.
4216 (handle_open): Use the_target->multifs_open as appropriate.
4217 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4218 (handle_readlink): Use the_target->multifs_readlink as
4219 appropriate.
4220 (handle_vFile): Handle vFile:setfs packets.
4221 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4222 after target_handle_new_gdb_connection.
4223
4b8b5e72
GB
42242015-06-10 Gary Benson <gbenson@redhat.com>
4225
4226 * configure.ac (AC_CHECK_FUNCS): Add setns.
4227 * config.in: Regenerate.
4228 * configure: Likewise.
4229 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4230 (linux-namespaces.o): New rule.
4231 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4232
3ac2e371
GB
42332015-06-09 Gary Benson <gbenson@redhat.com>
4234
4235 * hostio.c (handle_open): Process mode argument with
4236 fileio_to_host_mode.
4237
ca9b78ce
YQ
42382015-06-01 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4241 * linux-x86-low.c: Likewise.
4242
bfacd19d
DB
42432015-05-28 Don Breazeal <donb@codesourcery.com>
4244
4245 * linux-low.c (handle_extended_wait): Initialize
4246 thread_info.last_resume_kind for new fork children.
4247
452003ef
PA
42482015-05-15 Pedro Alves <palves@redhat.com>
4249
4250 * target.h (target_handle_new_gdb_connection): Rewrite using if
4251 wrapped in do/while.
4252
1041a03c
JB
42532015-05-14 Joel Brobecker <brobecker@adacore.com>
4254
4255 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4256 * configure, config.in: Regenerate.
4257 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4258 Declare typedef.
4259
c269dbdb
DB
42602015-05-12 Don Breazeal <donb@codesourcery.com>
4261
4262 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4263 PTRACE_EVENT_VFORK_DONE.
4264 (linux_low_ptrace_options, extended_event_reported): Add vfork
4265 events.
4266 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4267 and "vforkdone" for RSP 'T' Stop Reply Packet.
4268 * server.h (report_vfork_events): Declare
4269 global variable.
4270
3a8a0396
DB
42712015-05-12 Don Breazeal <donb@codesourcery.com>
4272
4273 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4274 (the_low_target) <new_fork>: Initialize new member.
4275 * linux-arm-low.c (arm_new_fork): New function.
4276 (the_low_target) <new_fork>: Initialize new member.
4277 * linux-low.c (handle_extended_wait): Call new target function
4278 new_fork.
4279 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4280 * linux-mips-low.c (mips_add_watchpoint): New function
4281 extracted from mips_insert_point.
4282 (the_low_target) <new_fork>: Initialize new member.
4283 (mips_linux_new_fork): New function.
4284 (mips_insert_point): Call mips_add_watchpoint.
4285 * linux-x86-low.c (x86_linux_new_fork): New function.
4286 (the_low_target) <new_fork>: Initialize new member.
4287
de0d863e
DB
42882015-05-12 Don Breazeal <donb@codesourcery.com>
4289
4290 * linux-low.c (handle_extended_wait): Implement return value,
4291 rename argument 'event_child' to 'event_lwp', handle
4292 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4293 (linux_low_ptrace_options): New function.
4294 (linux_low_filter_event): Call linux_low_ptrace_options,
4295 use different argument fo linux_enable_event_reporting,
4296 use return value from handle_extended_wait.
4297 (extended_event_reported): New function.
4298 (linux_wait_1): Call extended_event_reported and set
4299 status to report fork events.
4300 (linux_write_memory): Add pid to debug message.
4301 (reset_lwp_ptrace_options_callback): New function.
4302 (linux_handle_new_gdb_connection): New function.
4303 (linux_target_ops): Initialize new structure member.
4304 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4305 * lynx-low.c: Initialize new structure member.
4306 * remote-utils.c (prepare_resume_reply): Implement stop reason
4307 "fork" for "T" stop message.
4308 * server.c (handle_query): Call handle_new_gdb_connection.
4309 * server.h (report_fork_events): Declare global flag.
4310 * target.h (struct target_ops) <handle_new_gdb_connection>:
4311 New member.
4312 (target_handle_new_gdb_connection): New macro.
4313 * win32-low.c: Initialize new structure member.
4314
ddcbc397
DB
43152015-05-12 Don Breazeal <donb@codesourcery.com>
4316
4317 * mem-break.c (APPEND_TO_LIST): Define macro.
4318 (clone_agent_expr): New function.
4319 (clone_one_breakpoint): New function.
4320 (clone_all_breakpoints): New function.
4321 * mem-break.h: Declare new functions.
4322
89245bc0
DB
43232015-05-12 Don Breazeal <donb@codesourcery.com>
4324
4325 * linux-low.c (linux_supports_fork_events): New function.
4326 (linux_supports_vfork_events): New function.
4327 (linux_target_ops): Initialize new structure members.
4328 (initialize_low): Call linux_check_ptrace_features.
4329 * lynx-low.c (lynx_target_ops): Initialize new structure
4330 members.
4331 * server.c (report_fork_events, report_vfork_events):
4332 New global flags.
4333 (handle_query): Add new features to qSupported packet and
4334 response.
4335 (captured_main): Initialize new global variables.
4336 * target.h (struct target_ops) <supports_fork_events>:
4337 New member.
4338 <supports_vfork_events>: New member.
4339 (target_supports_fork_events): New macro.
4340 (target_supports_vfork_events): New macro.
4341 * win32-low.c (win32_target_ops): Initialize new structure
4342 members.
4343
835205d0
GB
43442015-05-12 Gary Benson <gbenson@redhat.com>
4345
4346 * server.c (handle_qxfer_exec_file): Use current process
4347 if annex is empty.
4348
21e94bd9
SL
43492015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4350
4351 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4352 Remove HAVE_PTRACE_GETREGS conditionals.
4353 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4354 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4355
45614f15
YQ
43562015-05-08 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-low.c (linux_supports_conditional_breakpoints): New
4359 function.
4360 (linux_target_ops): Install new target method.
4361 * lynx-low.c (lynx_target_ops): Install NULL hook for
4362 supports_conditional_breakpoints.
4363 * nto-low.c (nto_target_ops): Likewise.
4364 * spu-low.c (spu_target_ops): Likewise.
4365 * win32-low.c (win32_target_ops): Likewise.
4366 * server.c (handle_query): Check
4367 target_supports_conditional_breakpoints.
4368 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4369 New field.
4370 (target_supports_conditional_breakpoints): New macro.
4371
80ad801e
PA
43722015-05-06 Pedro Alves <palves@redhat.com>
4373
4374 PR server/18081
4375 * server.c (start_inferior): If the process exits, mourn it.
4376
819843c7
GB
43772015-04-21 Gary Benson <gbenson@redhat.com>
4378
4379 * hostio.c (fileio_open_flags_to_host): Factored out to
4380 fileio_to_host_openflags in common/fileio.c. Single use
4381 updated.
4382
a2d5a9d7
MF
43832015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4384
4385 * linux-xtensa-low.c (xtensa_fill_gregset)
4386 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4387 XCHAL_HAVE_LOOP.
4388
deb44829
MF
43892015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4390
4391 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4392 (regs_info): Replace usrregs pointer with NULL.
4393
e57f1de3
GB
43942015-04-17 Gary Benson <gbenson@redhat.com>
4395
4396 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4397 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4398 * server.c (handle_qxfer_exec_file): New function.
4399 (qxfer_packets): Add exec-file entry.
4400 (handle_query): Report qXfer:exec-file:read as supported packet.
4401
62828379
RN
44022015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4403
4404 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4405
b88bb450
GB
44062015-04-09 Gary Benson <gbenson@redhat.com>
4407
4408 * hostio-errno.c (errno_to_fileio_error): Remove function.
4409 Update caller to use remote_fileio_to_fio_error.
4410
c8f4bfdd
YQ
44112015-04-09 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-low.c (linux_insert_point): Call
4414 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4415 (linux_remove_point): Call remove_memory_breakpoint if type is
4416 raw_bkpt_type_sw.
4417 * linux-x86-low.c (x86_insert_point): Don't call
4418 insert_memory_breakpoint.
4419 (x86_remove_point): Don't call remove_memory_breakpoint.
4420
41f98f02
PA
44212015-04-01 Pedro Alves <palves@redhat.com>
4422 Cleber Rosa <crosa@redhat.com>
4423
4424 * server.c (gdbserver_usage): Reorganize and extend the usage
4425 message.
4426
2bf6fb9d
PA
44272015-03-24 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4430 output. Also dump TRAP_TRACE.
4431 (linux_low_filter_event): In debug output, distinguish a
4432 resume_stop SIGSTOP from a delayed SIGSTOP.
4433
369f6daa
GB
44342015-03-24 Gary Benson <gbenson@redhat.com>
4435
4436 * linux-x86-low.c (x86_linux_new_thread): Moved to
4437 nat/x86-linux.c.
4438 (x86_linux_prepare_to_resume): Likewise.
4439
8e5d4070
GB
44402015-03-24 Gary Benson <gbenson@redhat.com>
4441
4442 * Makefile.in (x86-linux-dregs.o): New rule.
4443 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4444 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4445 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4446 (x86_linux_dr_get): Likewise.
4447 (x86_linux_dr_set): Likewise.
4448 (update_debug_registers_callback): Likewise.
4449 (x86_linux_dr_set_addr): Likewise.
4450 (x86_linux_dr_get_addr): Likewise.
4451 (x86_linux_dr_set_control): Likewise.
4452 (x86_linux_dr_get_control): Likewise.
4453 (x86_linux_dr_get_status): Likewise.
4454 (x86_linux_update_debug_registers): Likewise.
4455
2b95d440
GB
44562015-03-24 Gary Benson <gbenson@redhat.com>
4457
4458 * linux-x86-low.c (x86_linux_update_debug_registers):
4459 New function, factored out from...
4460 (x86_linux_prepare_to_resume): ...this.
4461
14b0bc68
GB
44622015-03-24 Gary Benson <gbenson@redhat.com>
4463
4464 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4465 (x86_linux_dr_set): Likewise.
4466 (update_debug_registers_callback): Likewise.
4467 (x86_linux_dr_set_addr): Likewise.
4468 (x86_linux_dr_get_addr): Likewise.
4469 (x86_linux_dr_set_control): Likewise.
4470 (x86_linux_dr_get_control): Likewise.
4471 (x86_linux_dr_get_status): Likewise.
4472 (x86_linux_prepare_to_resume): Likewise.
4473
5dfe6ca8
GB
44742015-03-24 Gary Benson <gbenson@redhat.com>
4475
4476 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4477 Use perror_with_name. Pass string through gettext.
4478 (x86_linux_dr_set): Likewise.
4479
d33472ad
GB
44802015-03-24 Gary Benson <gbenson@redhat.com>
4481
4482 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4483 (x86_linux_dr_set_addr): ...this.
4484 (x86_dr_low_get_addr): Rename to...
4485 (x86_linux_dr_get_addr): ...this.
4486 (x86_dr_low_set_control): Rename to...
4487 (x86_linux_dr_set_control): ...this.
4488 (x86_dr_low_get_control): Rename to...
4489 (x86_linux_dr_get_control): ...this.
4490 (x86_dr_low_get_status): Rename to...
4491 (x86_linux_dr_get_status): ...this.
4492 (x86_dr_low): Update with new function names.
4493
4b134ca1
GB
44942015-03-24 Gary Benson <gbenson@redhat.com>
4495
4496 * Makefile.in (x86-linux.o): New rule.
4497 * configure.srv: Add x86-linux.o to relevant targets.
4498 * linux-low.c (lwp_set_arch_private_info): New function.
4499 (lwp_arch_private_info): Likewise.
4500 * linux-x86-low.c: Include nat/x86-linux.h.
4501 (arch_lwp_info): Removed structure.
4502 (update_debug_registers_callback):
4503 Use lwp_set_debug_registers_changed.
4504 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4505 and lwp_set_debug_registers_changed.
4506 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4507
34c703da
GB
45082015-03-24 Gary Benson <gbenson@redhat.com>
4509
4510 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4511 * linux-arm-low.c (arm_new_thread): Likewise.
4512 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4513 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4514 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4515 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4516
cff068da
GB
45172015-03-24 Gary Benson <gbenson@redhat.com>
4518
4519 * linux-low.c (ptid_of_lwp): New function.
4520 (lwp_is_stopped): Likewise.
4521 (lwp_stop_reason): Likewise.
4522 * linux-x86-low.c (update_debug_registers_callback):
4523 Use lwp_is_stopped.
4524 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4525 lwp_stop_reason.
4526
b2f7c7e8
GB
45272015-03-24 Gary Benson <gbenson@redhat.com>
4528
4529 * linux-low.h (linux_stop_lwp): Remove declaration.
4530
6d4ee8c6
GB
45312015-03-24 Gary Benson <gbenson@redhat.com>
4532
4533 * linux-low.h: Include nat/linux-nat.h.
4534 * linux-low.c (iterate_over_lwps_args): New structure.
4535 (iterate_over_lwps_filter): New function.
4536 (iterate_over_lwps): Likewise.
4537 * linux-x86-low.c (update_debug_registers_callback):
4538 Update signature to what iterate_over_lwps expects.
4539 Remove PID check that iterate_over_lwps now performs.
4540 (x86_dr_low_set_addr): Use iterate_over_lwps.
4541 (x86_dr_low_set_control): Likewise.
4542
70a0bb6b
GB
45432015-03-24 Gary Benson <gbenson@redhat.com>
4544
4545 * linux-x86-low.c (x86_debug_reg_state): New function.
4546 (x86_linux_prepare_to_resume): Use the above.
4547
7b669087
GB
45482015-03-24 Gary Benson <gbenson@redhat.com>
4549
4550 * linux-low.c (current_lwp_ptid): New function.
4551 * linux-x86-low.c: Include nat/linux-nat.h.
4552 (x86_dr_low_get_addr): Use current_lwp_ptid.
4553 (x86_dr_low_get_control): Likewise.
4554 (x86_dr_low_get_status): Likewise.
4555
eef49a3d
PA
45562015-03-20 Pedro Alves <palves@redhat.com>
4557
4558 * tracepoint.c (cmd_qtstatus): Make "str" const.
4559
b2333d22
PA
45602015-03-20 Pedro Alves <palves@redhat.com>
4561
4562 * server.c (handle_general_set): Make "req_str" const.
4563
23f238d3
PA
45642015-03-19 Pedro Alves <palves@redhat.com>
4565
4566 * linux-low.c (linux_resume_one_lwp): Rename to ...
4567 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4568 instead call perror_with_name.
4569 (check_ptrace_stopped_lwp_gone): New function.
4570 (linux_resume_one_lwp): Reimplement as wrapper around
4571 linux_resume_one_lwp_throw that swallows errors if the LWP is
4572 gone.
4573
91baf43f
PA
45742015-03-19 Pedro Alves <palves@redhat.com>
4575
4576 * linux-low.c (count_events_callback, select_event_lwp_callback):
4577 No longer check whether the thread has resume_stop as last resume
4578 kind.
4579
8bf3b159
PA
45802015-03-19 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.c (count_events_callback, select_event_lwp_callback):
4583 Use the lwp's status_pending_p field, not the thread's.
4584
b90fc188
PA
45852015-03-19 Pedro Alves <palves@redhat.com>
4586
4587 * linux-low.c (select_event_lwp_callback): Update comments to
4588 no longer mention SIGTRAP.
4589
464b0089
GB
45902015-03-18 Gary Benson <gbenson@redhat.com>
4591
4592 * server.c (handle_query): Do not report vFile:fstat as supported.
4593
aa9e327f
GB
45942015-03-11 Gary Benson <gbenson@redhat.com>
4595
4596 * hostio.c (sys/types.h): New include.
4597 (sys/stat.h): Likewise.
4598 (common-remote-fileio.h): Likewise.
4599 (handle_fstat): New function.
4600 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4601
791c0056
GB
46022015-03-11 Gary Benson <gbenson@redhat.com>
4603
4604 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4605 struct stat.st_blocks and struct stat.st_blksize.
4606 * configure: Regenerate.
4607 * config.in: Likewise.
4608 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4609 (OBS): Add common-remote-fileio.o.
4610 (common-remote-fileio.o): New rule.
4611
9a9df970
PA
46122015-03-09 Pedro Alves <palves@redhat.com>
4613
4614 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4615 'struct sockaddr' pointer in 'accept' call.
4616
9eb1356e
PA
46172015-03-09 Pedro Alves <palves@redhat.com>
4618
4619 Revert:
4620 2015-03-07 Pedro Alves <palves@redhat.com>
4621 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4622 or <winsock2.h> here. Instead include "gdb_socket.h".
4623 (remote_open): Use union gdb_sockaddr_u.
4624 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4625 or <winsock2.h> here. Instead include "gdb_socket.h".
4626 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4627 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4628 or <sys/un.h>.
4629 (init_named_socket, gdb_agent_helper_thread): Use union
4630 gdb_sockaddr_u.
4631
aac331e4
PA
46322015-03-07 Pedro Alves <palves@redhat.com>
4633
4634 * configure.ac (build_warnings): Move
4635 -Wdeclaration-after-statement to the C-specific set.
4636 * configure: Regenerate.
4637
366c75fc
PA
46382015-03-07 Pedro Alves <palves@redhat.com>
4639
4640 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4641 or <winsock2.h> here. Instead include "gdb_socket.h".
4642 (remote_open): Use union gdb_sockaddr_u.
4643 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4644 or <winsock2.h> here. Instead include "gdb_socket.h".
4645 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4646 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4647 or <sys/un.h>.
4648 (init_named_socket, gdb_agent_helper_thread): Use union
4649 gdb_sockaddr_u.
4650
492d29ea
PA
46512015-03-07 Pedro Alves <palves@redhat.com>
4652
4653 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4654 instead.
4655
60a191ed
YQ
46562015-03-06 Yao Qi <yao.qi@linaro.org>
4657
4658 * linux-aarch64-low.c (aarch64_insert_point): Use
4659 show_debug_regs as a boolean.
4660 (aarch64_remove_point): Likewise.
4661
f5771b1d
PA
46622015-03-05 Pedro Alves <palves@redhat.com>
4663
4664 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4665 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4666 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4667 * nto-low.c (nto_target_ops): Likewise.
4668 * spu-low.c (spu_target_ops): Likewise.
4669 * win32-low.c (win32_target_ops): Likewise.
4670
3e572f71
PA
46712015-03-04 Pedro Alves <palves@redhat.com>
4672
72f4393d 4673 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4674 Decide whether a breakpoint triggered based on the SIGTRAP's
4675 siginfo.si_code.
72f4393d
L
4676 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4677 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4678 (linux_low_filter_event): Check for breakpoints before checking
4679 watchpoints.
4680 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4681 siginfo.si_code.
72f4393d
L
4682 (linux_stopped_by_sw_breakpoint)
4683 (linux_supports_stopped_by_sw_breakpoint)
4684 (linux_stopped_by_hw_breakpoint)
4685 (linux_supports_stopped_by_hw_breakpoint): New functions.
4686 (linux_target_ops): Install new target methods.
3e572f71 4687
1ec68e26
PA
46882015-03-04 Pedro Alves <palves@redhat.com>
4689
4690 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4691 * server.c (swbreak_feature, hwbreak_feature): New globals.
4692 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4693 (captured_main): Clear swbreak_feature and hwbreak_feature.
4694 * server.h (swbreak_feature, hwbreak_feature): Declare.
4695 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4696 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4697 supports_stopped_by_hw_breakpoint>: New fields.
4698 (target_supports_stopped_by_sw_breakpoint)
4699 (target_stopped_by_sw_breakpoint)
4700 (target_supports_stopped_by_hw_breakpoint)
4701 (target_stopped_by_hw_breakpoint): Declare.
4702
15c66dd6
PA
47032015-03-04 Pedro Alves <palves@redhat.com>
4704
4705 enum lwp_stop_reason -> enum target_stop_reason
4706 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4707 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4708 (linux_wait_1, stuck_in_jump_pad_callback)
4709 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4710 (linux_stopped_by_watchpoint):
4711 * linux-low.h (enum lwp_stop_reason): Delete.
4712 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4713 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4714
98fc70d6
YQ
47152015-03-04 Yao Qi <yao.qi@linaro.org>
4716
4717 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4718
dd2ac174
GB
47192015-03-03 Gary Benson <gbenson@redhat.com>
4720
4721 * hostio.c (handle_vFile): Fix prefix lengths.
4722
d68e53f4
MM
47232015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4724
4725 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4726 ptr_bits.
4727
bf2d68ab
AA
47282015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4729
4730 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4731 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4732 (clean): Add "rm -f" for above C files.
4733 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4734 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4735 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4736 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4737 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4738 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4739 (init_registers_s390x_vx_linux64)
4740 (init_registers_s390x_tevx_linux64)
4741 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4742 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4743 declarations.
4744 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4745 (s390_store_vxrs_high): New functions.
4746 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4747 NT_S390_VXRS_HIGH.
4748 (s390_arch_setup): Add logic for selecting one of the new target
4749 descriptions. Activate the new vector regsets if applicable.
4750 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4751 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4752 and init_registers_s390x_tevx_linux64.
4753
c966a859
PA
47542015-03-01 Pedro Alves <palves@redhat.com>
4755
4756 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4757 parameter.
4758
4180215b
PA
47592015-02-27 Pedro Alves <palves@redhat.com>
4760
4761 * linux-x86-low.c (u_debugreg_offset): New function.
4762 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4763
749bab01
PA
47642015-02-27 Pedro Alves <palves@redhat.com>
4765
4766 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4767 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4768 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4769 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4770 (ps_lsetfpregs, ps_getpid)
4771 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4772 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4773 (ps_lsetxregs, ps_plog): Declare.
4774
3c14e5a3
PA
47752015-02-27 Pedro Alves <palves@redhat.com>
4776
4777 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4778 IP_AGENT_EXPORT_FUNC.
4779 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4780 IP_AGENT_EXPORT_FUNC.
4781 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4782 (IP_AGENT_EXPORT): Delete.
4783 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4784 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4785 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4786 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4787 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4788 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4789 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4790 (traceframe_read_count, traceframe_write_count)
4791 (traceframes_created, trace_state_variables, get_raw_reg)
4792 (get_trace_state_variable_value, set_trace_state_variable_value)
4793 (ust_loaded, helper_thread_id, cmd_buf): Use
4794 IPA_SYM_EXPORTED_NAME.
4795 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4796 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4797 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4798 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4799 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4800 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4801 EXTERN_C_PUSH/EXTERN_C_POP.
4802 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4803 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4804 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4805 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4806 (traceframe_write_count, traceframe_read_count)
4807 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4808 (about_to_request_buffer_space, get_trace_state_variable_value)
4809 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4810 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4811 EXTERN_C_PUSH/EXTERN_C_POP.
4812 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4813 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4814 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4815 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4816 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4817 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4818 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4819 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4820 Define.
4821 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4822 (IP_AGENT_EXPORT_VAR_DECL): Define.
4823 (tracing): Declare.
4824 (gdb_agent_get_raw_reg): Declare.
4825
fe978cb0
PA
48262015-02-27 Tom Tromey <tromey@redhat.com>
4827 Pedro Alves <palves@redhat.com>
4828
4829 Rename symbols whose names are reserved C++ keywords throughout.
4830
3bc3d82a
PA
48312015-02-27 Pedro Alves <palves@redhat.com>
4832
4833 * Makefile.in (COMPILER): New, get it from autoconf.
4834 (CXX): Get from autoconf instead.
4835 (COMPILE.pre): Use COMPILER.
4836 (CC-LD): Rename to ...
4837 (CC_LD): ... this. Use COMPILER.
4838 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4839 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4840 * acinclude.m4: Include build-with-cxx.m4.
4841 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4842 Disable -Werror by default if building in C++ mode.
4843 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4844 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4845 the C++ compiler. Save/restore CXXFLAGS too.
4846 * configure: Regenerate.
4847
07697489
PA
48482015-02-27 Pedro Alves <palves@redhat.com>
4849
4850 * acinclude.m4: Include libiberty.m4.
4851 * configure.ac: Call libiberty_INIT.
4852 * config.in, configure: Regenerate.
4853
9beb7c4e
PA
48542015-02-26 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (linux_wait_1): When incrementing the PC past a
4857 program breakpoint always use the_low_target.breakpoint_len as
4858 increment, rather than the maximum between that and
4859 the_low_target.decr_pc_after_break.
4860
8090aef2
PA
48612015-02-23 Pedro Alves <palves@redhat.com>
4862
4863 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4864 thread was doing a step-over; always adjust the PC if
4865 we stepped over a permanent breakpoint.
4866 (linux_wait_1): If we stepped over breakpoint that was on top of a
4867 permanent breakpoint, manually advance the PC past it.
4868
bc9540e8
PA
48692015-02-23 Pedro Alves <palves@redhat.com>
4870
4871 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4872 modes.
4873 (x86_fill_gregset, x86_store_gregset): Use it when handling
4874 $orig_eax.
4875
2db9a427
PA
48762015-02-20 Pedro Alves <palves@redhat.com>
4877
4878 * thread-db.c: Include "nat/linux-procfs.h".
4879 (thread_db_init): Skip listing new threads if the kernel supports
4880 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4881
afa8d396
PA
48822015-02-20 Pedro Alves <palves@redhat.com>
4883
4884 * linux-low.c (status_pending_p_callback): Use ptid_match.
4885
c9587f88
AT
48862015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4887
4888 PR breakpoints/16812
4889 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4890 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4891 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4892
b05ec7a5
AT
48932015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4894
4895 PR breakpoints/15956
4896 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4897
d33501a5
MM
48982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4899
4900 * linux-low.c (linux_low_btrace_conf): Print size.
4901 * server.c (handle_btrace_conf_general_set): New.
4902 (hanle_general_set): Call handle_btrace_conf_general_set.
4903 (handle_query): Report Qbtrace-conf:bts:size as supported.
4904
f4abbc16
MM
49052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4906
4907 * linux-low.c (linux_low_enable_btrace): Update parameters.
4908 (linux_low_btrace_conf): New.
4909 (linux_target_ops)<to_btrace_conf>: Initialize.
4910 * server.c (current_btrace_conf): New.
4911 (handle_btrace_enable): Rename to ...
4912 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4913 to target_enable_btrace. Update comment. Update users.
4914 (handle_qxfer_btrace_conf): New.
4915 (qxfer_packets): Add btrace-conf entry.
4916 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4917 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4918 (target_ops)<read_btrace_conf>: New.
4919 (target_enable_btrace): Update parameters.
4920 (target_read_btrace_conf): New.
4921
043c3577
MM
49222015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4923
4924 * server.c (handle_btrace_general_set): Remove call to
4925 target_supports_btrace.
4926 (supported_btrace_packets): New.
4927 (handle_query): Call supported_btrace_packets.
4928 * target.h: include btrace-common.h.
4929 (btrace_target_info): Removed.
4930 (supports_btrace, target_supports_btrace): Update parameters.
4931
734b0e4b
MM
49322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4933
4934 * Makefile.in (SFILES): Add common/btrace-common.c.
4935 (OBS): Add common/btrace-common.o.
4936 (btrace-common.o): Add build rules.
4937 * linux-low: Include btrace-common.h.
4938 (linux_low_read_btrace): Use struct btrace_data. Call
4939 btrace_data_init and btrace_data_fini.
4940
d6c146e9
PA
49412015-02-06 Pedro Alves <palves@redhat.com>
4942
4943 * thread-db.c (find_new_threads_callback): Add debug output.
4944
20ba1ce6
PA
49452015-02-04 Pedro Alves <palves@redhat.com>
4946
4947 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4948 (resume_stopped_resumed_lwps): New function.
4949 (linux_wait_for_event_filtered): Use it.
4950
8cc73a39
SDJ
49512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4952
4953 * Makefile.in (SFILES): Add linux-personality.c.
4954 (linux-personality.o): New rule.
4955 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4956 list of objects to be built.
4957 * linux-low.c: Include nat/linux-personality.h.
4958 (linux_create_inferior): Remove code to disable address space
4959 randomization (moved to ../nat/linux-personality.c). Create
4960 cleanup to disable address space randomization.
4961
fb23d554
SDJ
49622015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4963
4964 * Makefile.in (posix-strerror.o): New rule.
4965 (mingw-strerror.o): Likewise.
4966 * configure: Regenerated.
4967 * configure.ac: Source file ../common/common.host. Initialize new
4968 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4969
cdf43629
YQ
49702015-01-14 Yao Qi <yao@codesourcery.com>
4971
4972 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4973 (ppc-linux.o): New rule.
4974 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4975 * configure.ac: AC_CHECK_FUNCS(getauxval).
4976 * config.in: Re-generated.
4977 * configure: Re-generated.
4978 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4979 ppc64_64bit_inferior_p
4980
514c5338
YQ
49812015-01-14 Yao Qi <yao@codesourcery.com>
4982
4983 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4984 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4985 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4986 (PT_ORIG_R3, PT_TRAP): Likewise.
4987 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4988 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4989 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4990
3368c1e5
JB
49912015-01-10 Joel Brobecker <brobecker@adacore.com>
4992
4993 * i387-fp.c (i387_cache_to_xsave): In look over
4994 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4995 zmmh_low_space field by use of zmmh_high_space.
4996
582511be
PA
49972015-01-09 Pedro Alves <palves@redhat.com>
4998
4999 * linux-low.c (step_over_bkpt): Move higher up in the file.
5000 (handle_extended_wait): Don't store the stop_pc here.
5001 (get_stop_pc): Adjust comments and rename to ...
5002 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5003 stopped for a software breakpoint or hardware breakpoint.
5004 (thread_still_has_status_pending_p): New function.
5005 (status_pending_p_callback): Use
5006 thread_still_has_status_pending_p. If the event is no longer
5007 interesting, resume the LWP.
5008 (handle_tracepoints): Add assert.
5009 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5010 (wstatus_maybe_breakpoint): New function.
5011 (cancel_breakpoint): Delete function.
5012 (check_stopped_by_watchpoint): New function, factored out from
5013 linux_low_filter_event.
5014 (lp_status_maybe_breakpoint): Delete function.
5015 (linux_low_filter_event): Remove filter_ptid argument.
5016 Leave thread group exits pending here. Store the LWP's stop PC.
5017 Always leave events pending.
5018 (linux_wait_for_event_filtered): Pull all events out of the
5019 kernel, and leave them all pending.
5020 (count_events_callback, select_event_lwp_callback): Consider all
5021 events.
5022 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5023 (select_event_lwp): Only give preference to the stepping LWP in
5024 all-stop mode. Adjust comments.
5025 (ignore_event): New function.
5026 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5027 references to cancel_breakpoints. Adjust to renames. Also give
5028 equal priority to all LWPs that have had events in non-stop mode.
5029 If reporting a software breakpoint event, unadjust the LWP's PC.
5030 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5031 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5032 Adjust.
5033 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5034 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5035 (linux_stopped_by_watchpoint): Adjust.
5036 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5037 * linux-low.h (enum lwp_stop_reason): New.
5038 (struct lwp_info) <stop_pc>: Adjust comment.
5039 <stopped_by_watchpoint>: Delete field.
5040 <stop_reason>: New field.
5041 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5042 * mem-break.c (software_breakpoint_inserted_here)
5043 (hardware_breakpoint_inserted_here): New function.
5044 * mem-break.h (software_breakpoint_inserted_here)
5045 (hardware_breakpoint_inserted_here): Declare.
5046 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5047 (cancel_breakpoints): Delete.
5048 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5049 (upload_fast_traceframes): Remove references to
5050 cancel_breakpoints.
5051
a33e3959
PA
50522015-01-09 Pedro Alves <palves@redhat.com>
5053
5054 * thread-db.c (find_new_threads_callback): Ignore thread if the
5055 kernel thread ID is -1.
5056
8784d563
PA
50572015-01-09 Pedro Alves <palves@redhat.com>
5058
5059 * linux-low.c (linux_attach_fail_reason_string): Move to
5060 nat/linux-ptrace.c, and rename.
5061 (linux_attach_lwp): Update comment.
5062 (attach_proc_task_lwp_callback): New function.
5063 (linux_attach): Adjust to rename and use
5064 linux_proc_attach_tgid_threads.
5065 (linux_attach_fail_reason_string): Delete declaration.
5066
76f2b779
JB
50672015-01-01 Joel Brobecker <brobecker@adacore.com>
5068
5069 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5070 * server.c (gdbserver_version): Likewise.
5071
fafcc06a
SDJ
50722014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5073
5074 * remote-utils.c: Include ctype.h.
5075 (input_interrupt): Explicitly handle the case when the char
5076 received is the NUL byte. Improve the printing of non-ASCII
5077 characters.
5078
beed38b8
JB
50792014-12-16 Joel Brobecker <brobecker@adacore.com>
5080
5081 * linux-low.c (linux_low_filter_event): Update call to
5082 linux_enable_event_reporting following the addition of
5083 a new parameter to that function.
5084
bf330350
CU
50852014-12-16 Catalin Udma <catalin.udma@freescale.com>
5086
5087 PR server/17457
5088 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5089 (AARCH64_FPCR_REGNO): Likewise.
5090 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5091 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5092 (aarch64_store_fpregset): Likewise.
5093
5227d625
JB
50942014-12-15 Joel Brobecker <brobecker@adacore.com>
5095
5096 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5097 Remove FIXME comment about assumption about N.
5098
f93b65a0
JB
50992014-12-13 Joel Brobecker <brobecker@adacore.com>
5100
5101 * configure.ac: If large-file support is disabled in GDBserver,
5102 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5103 * configure: Regenerate.
5104
e5a9158d
AA
51052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5106
5107 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5108 warning upon ENODATA from ptrace.
5109 * linux-s390-low.c (s390_store_tdb): New.
5110 (s390_regsets): Add regset for NT_S390_TDB.
5111
feea5f36
AA
51122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5113
5114 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5115 without a fill_function.
5116 * linux-s390-low.c (s390_fill_last_break): Remove.
5117 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5118 (s390_arch_setup): Use regset's size instead of fill_function for
5119 loop end condition.
5120
098dbe61
AA
51212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5122
5123 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5124 the regset's store function when ptrace returned an error.
5125 * regcache.c (get_thread_regcache): Invalidate register cache
5126 before fetching inferior's registers.
5127
28eef672
AA
51282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5129
5130 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5131 while-loop as for-loop.
5132 (regsets_store_inferior_registers): Likewise.
5133
bdca27a2
YQ
51342014-11-28 Yao Qi <yao@codesourcery.com>
5135
5136 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5137 * config.in, configure: Re-generate.
5138 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5139 is defined.
5140
9c232dda
YQ
51412014-11-21 Yao Qi <yao@codesourcery.com>
5142
5143 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5144 (AC_CHECK_HEADERS): Remove malloc.h.
5145 * configure: Re-generated.
5146 * config.in: Re-generated.
5147 * server.h: Don't include alloca.h and malloc.h.
5148 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5149 Don't include malloc.h.
5150
43968415
JB
51512014-11-17 Joel Brobecker <brobecker@adacore.com>
5152
5153 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5154 corresponding ERRNO check in same block.
5155
40e91bc7
PA
51562014-11-12 Pedro Alves <palves@redhat.com>
5157
5158 * server.c (cont_thread): Update comment.
5159 (start_inferior, attach_inferior): No longer clear cont_thread.
5160 (handle_v_cont): No longer set cont_thread.
5161 (captured_main): Clear cont_thread each time a GDB connects.
5162
c2c118cf
PA
51632014-11-12 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5166 thread, and don't resume all threads if the Hc thread has exited.
5167
78708b7c
PA
51682014-11-12 Pedro Alves <palves@redhat.com>
5169
5170 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5171 the process group instead of to a specific LWP.
5172
a2abc7de
PA
51732014-10-15 Pedro Alves <palves@redhat.com>
5174
5175 PR server/17487
5176 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5177 parameter.
5178 (arm_set_thread_context): Delete.
5179 (the_low_target): Adjust.
5180 * win32-i386-low.c (debug_registers_changed)
5181 (debug_registers_used): Delete.
5182 (update_debug_registers_callback): New function.
5183 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5184 needing to update their debug registers.
5185 (win32_get_current_dr): New function.
5186 (x86_dr_low_get_addr, x86_dr_low_get_control)
5187 (x86_dr_low_get_status): Fetch the debug register from the thread
5188 record's context.
5189 (i386_initial_stuff): Adjust.
5190 (i386_get_thread_context): Remove current_event parameter. Don't
5191 clear debug_registers_changed nor copy DR values to
5192 debug_reg_state.
5193 (i386_set_thread_context): Delete.
5194 (i386_prepare_to_resume): New function.
5195 (i386_thread_added): Mark the thread as needing to update irs
5196 debug registers.
5197 (the_low_target): Remove i386_set_thread_context and install
5198 i386_prepare_to_resume.
5199 * win32-low.c (win32_get_thread_context): Adjust.
5200 (win32_set_thread_context): Use SetThreadContext
5201 directly.
5202 (win32_prepare_to_resume): New function.
5203 (win32_require_context): New function, factored out from ...
5204 (thread_rec): ... this.
5205 (continue_one_thread): Call win32_prepare_to_resume on each thread
5206 we're about to continue.
5207 (win32_resume): Call win32_prepare_to_resume on the event thread.
5208 * win32-low.h (struct win32_thread_info)
5209 <debug_registers_changed>: New field.
5210 (struct win32_target_ops): Change prototype of set_thread_context,
5211 delete set_thread_context and add prepare_to_resume.
5212 (win32_require_context): New declaration.
5213
a442d071
GB
52142014-10-08 Gary Benson <gbenson@redhat.com>
5215
5216 * server.h: Do not include common-exceptions.h.
5217
6f1947e8
GB
52182014-10-08 Gary Benson <gbenson@redhat.com>
5219
5220 * server.h: Do not include cleanups.h.
5221
63b434a4
JH
52222014-09-30 James Hogan <james.hogan@imgtec.com>
5223
5224 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5225 mips64-dsp-linux.c.
5226
c4d9ceb6
YQ
52272014-09-23 Yao Qi <yao@codesourcery.com>
5228
5229 * linux-low.c (lp_status_maybe_breakpoint): New function.
5230 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5231 (count_events_callback): Likewise.
5232 (select_event_lwp_callback): Likewise.
5233 (cancel_breakpoints_callback): Likewise.
5234
89a5711c
DB
52352014-09-19 Don Breazeal <donb@codesourcery.com>
5236
5237 * linux-low.c (handle_extended_wait): Call
5238 linux_ptrace_get_extended_event.
5239 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5240 linux_is_extended_waitstatus.
5241
bffc0964
JB
52422014-09-16 Joel Brobecker <brobecker@adacore.com>
5243
5244 * Makefile.in (CPPFLAGS): Define.
5245 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5246 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5247
0bfdf32f
GB
52482014-09-16 Gary Benson <gbenson@redhat.com>
5249
5250 * inferiors.h (current_inferior): Renamed as...
5251 (current_thread): New variable. All uses updated.
5252 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5253 (maybe_move_out_of_jump_pad): Likewise.
5254 (cancel_breakpoint): Likewise.
5255 (linux_low_filter_event): Likewise.
5256 (wait_for_sigstop): Likewise.
5257 (linux_resume_one_lwp): Likewise.
5258 (need_step_over_p): Likewise.
5259 (start_step_over): Likewise.
5260 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5261 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5262 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5263 and save_inferior as saved_thread.
5264 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5265 saved_thread.
5266 (regcache_invalidate_thread): Likewise.
5267 * remote-utils.c (prepare_resume_reply): Likewise.
5268 * thread-db.c (thread_db_get_tls_address): Likewise.
5269 (disable_thread_event_reporting): Likewise.
5270 (remove_thread_event_breakpoints): Likewise.
5271 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5272 as saved_thread.
5273 * target.h (set_desired_inferior): Renamed as...
5274 (set_desired_thread): New declaration. All uses updated.
5275 * server.c (myresume): Updated comment to reference thread instead
5276 of inferior.
5277 (handle_serial_event): Likewise.
5278 (handle_target_event): Likewise.
5279
361c8ade
GB
52802014-09-12 Tom Tromey <tromey@redhat.com>
5281 Gary Benson <gbenson@redhat.com>
5282
5283 * regcache.h: Include common-regcache.h.
5284 (regcache_read_pc): Don't declare.
5285 * regcache.c (get_thread_regcache_for_ptid): New function.
5286
bd9269f7
GB
52872014-09-11 Tom Tromey <tromey@redhat.com>
5288 Gary Benson <gbenson@redhat.com>
5289
5290 * symbol.c: New file.
5291 * Makefile.in (SFILES): Add symbol.c.
5292 (OBS): Add symbol.o.
5293
f8c1d06b
GB
52942014-09-11 Gary Benson <gbenson@redhat.com>
5295
5296 * target.c (target_stop_ptid, target_continue_ptid): New
5297 functions.
5298
721ec300
GB
52992014-09-11 Tom Tromey <tromey@redhat.com>
5300 Gary Benson <gbenson@redhat.com>
5301
5302 * target.h: Include target/target.h.
5303 * target.c (target_read_memory, target_read_uint32)
5304 (target_write_memory): New functions.
5305
c5e92cca
GB
53062014-09-11 Gary Benson <gbenson@redhat.com>
5307
5308 * server.h (debug_hw_points): Don't declare.
5309 * server.c (debug_hw_points): Don't define. Replace all uses
5310 with show_debug_regs.
5311 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5312 all uses with show_debug_regs.
5313
2e4bb98a
EBM
53142014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5315
5316 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5317 endianness into account.
5318 (ppc_supply_ptrace_register): Likewise.
5319
ac740bc7
JH
53202014-09-03 James Hogan <james.hogan@imgtec.com>
5321
5322 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5323 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5324
97ea6506
GB
53252014-09-03 Gary Benson <gbenson@redhat.com>
5326
5327 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5328 ALL_DEBUG_ADDRESS_REGISTERS.
5329
df7e5265
GB
53302014-09-02 Gary Benson <gbenson@redhat.com>
5331
5332 * i386-low.h: Renamed as...
5333 * x86-low.h: New file. All type, function and variable name
5334 prefixes changed from "i386_" to "x86_". All references updated.
5335 * i386-low.c: Renamed as...
5336 * x86-low.c: New file. All type, function and variable name
5337 prefixes changed from "i386_" to "x86_". All references updated.
5338
ed859da7
GB
53392014-09-02 Gary Benson <gbenson@redhat.com>
5340
5341 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5342 (x86_linux_new_thread): Likewise.
5343
860789c7
GB
53442014-08-29 Gary Benson <gbenson@redhat.com>
5345
5346 * server.h (setjmp.h): Do not include.
5347 (toplevel): Do not declare.
5348 (common-exceptions.h): Include.
5349 (cleanups.h): Likewise.
5350 * server.c (toplevel): Do not define.
5351 (exit_code): New static global.
5352 (detach_or_kill_for_exit_cleanup): New function.
5353 (main): New function. Original main renamed to...
5354 (captured_main): New function.
5355 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5356
ff55e1b5
GB
53572014-08-29 Gary Benson <gbenson@redhat.com>
5358
5359 * Makefile.in (SFILES): Add common/common-exceptions.c.
5360 (OBS): Add common-exceptions.o.
5361 (common-exceptions.o): New rule.
5362 * utils.c (prepare_to_throw_exception): New function.
5363
e9bcb658
GB
53642014-08-29 Gary Benson <gbenson@redhat.com>
5365
5366 * config.in: Regenerate.
5367 * configure: Likewise.
5368
e3180625
GB
53692014-08-29 Gary Benson <gbenson@redhat.com>
5370
5371 * Makefile.in (SFILES): Add common/cleanups.c.
5372 (OBS): cleanups.o.
5373 (cleanups.o): New rule.
5374
e3d6ba5d
GB
53752014-08-29 Gary Benson <gbenson@redhat.com>
5376
5377 * utils.c (internal_vwarning): New function.
5378
7096e886
GB
53792014-08-28 Gary Benson <gbenson@redhat.com>
5380
5381 * utils.h (fatal): Remove declaration.
5382 * utils.c (fatal): Remove function.
5383
14ce3192
GB
53842014-08-28 Gary Benson <gbenson@redhat.com>
5385
5386 * tracepoint.c (gdb_agent_init): Replace fatal with
5387 perror_with_name.
5388 (initialize_tracepoint): Likewise.
5389
50278d59
GB
53902014-08-28 Gary Benson <gbenson@redhat.com>
5391
5392 * remote-utils.c (remote_prepare): Replace fatal with error.
5393
aa96c426
GB
53942014-08-28 Gary Benson <gbenson@redhat.com>
5395
5396 * linux-low.c (linux_async): Replace fatal with warning.
5397 Tidy up and return.
5398 (linux_start_non_stop): Return -1 if linux_async failed.
5399
f7160e97
GB
54002014-08-28 Gary Benson <gbenson@redhat.com>
5401
5402 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5403 gdb_assert.
5404 (i386_dr_low_get_addr): Remove vague comment.
5405 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5406 gdb_assert.
5407
38e08fca
GB
54082014-08-28 Gary Benson <gbenson@redhat.com>
5409
5410 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5411 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5412 internal_error.
5413 (linux_resume_one_lwp): Likewise.
5414 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5415 gdb_assert.
5416 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5417 with internal_error.
5418 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5419 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5420 (find_register_by_name): Replace fatal with internal_error.
5421 (find_regno): Likewise.
5422 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5423 * thread-db.c (thread_db_create_event): Likewise.
5424 (thread_db_load_search): Likewise.
5425 (try_thread_db_load_1): Likewise.
5426 * tracepoint.c (get_jump_space_head): Replace fatal with
5427 internal_error.
5428 (claim_trampoline_space): Likewise.
5429 (have_fast_tracepoint_trampoline_buffer): Likewise.
5430 (cmd_qtstart): Likewise.
5431 (stop_tracing): Likewise.
5432 (fast_tracepoint_collecting): Likewise.
5433 (target_malloc): Likewise.
5434 (download_tracepoint): Likewise.
5435 (download_trace_state_variables): Replace check with gdb_assert.
5436 (upload_fast_traceframes): Replace fatal with internal_error.
5437
34abf635
GB
54382014-08-19 Tom Tromey <tromey@redhat.com>
5439 Gary Benson <gbenson@redhat.com>
5440
5441 * Makefile.in (SFILES): Add common/common-debug.c.
5442 (OBS): Add common-debug.o.
5443 (common-debug.o): New rule.
5444 * debug.h (debug_printf): Don't declare.
5445 * debug.c (debug_printf): Renamed and rewritten as...
5446 (debug_vprintf): New function.
5447
f6e94d78
GB
54482014-08-19 Gary Benson <gbenson@redhat.com>
5449
5450 * utils.h: Do not include print-utils.h.
5451
9239eeab
GB
54522014-08-19 Tom Tromey <tromey@redhat.com>
5453 Gary Benson <gbenson@redhat.com>
5454
5455 * server.h: Add static assertion.
5456 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5457
ef87c8bb
GB
54582014-08-19 Tom Tromey <tromey@redhat.com>
5459 Gary Benson <gbenson@redhat.com>
5460
5461 * Makefile.in (SFILES): Add common/errors.c.
5462 (OBS): Add errors.o.
5463 (IPA_OBS): Add errors-ipa.o.
5464 (errors.o): New rule.
5465 (errors-ipa.o): Likewise.
5466 * utils.h (perror_with_name, error, warning): Don't declare.
5467 * utils.c (warning): Renamed and rewritten as...
5468 (vwarning): New function.
5469 (error): Renamed and rewritten as...
5470 (verror): New function.
5471 (internal_error): Renamed and rewritten as...
5472 (internal_verror): New function.
5473
bb974a24
GB
54742014-08-07 Gary Benson <gbenson@redhat.com>
5475
5476 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5477 * configure: Regenerate.
5478 * config.in: Likewise.
5479 * server.h: Do not include errno.h.
5480 * event-loop.c: Likewise.
5481 * hostio-errno.c: Likewise.
5482 * linux-low.c: Likewise.
5483 * remote-utils.c: Likewise.
5484 * spu-low.c: Likewise.
5485 * utils.c: Likewise.
5486 * gdbreplay.c: Unconditionally include errno.h.
5487
6d3d12eb
GB
54882014-08-07 Gary Benson <gbenson@redhat.com>
5489
5490 * server.h: Do not include string.h.
5491 * event-loop.c: Likewise.
5492 * linux-low.c: Likewise.
5493 * regcache.c: Likewise.
5494 * remote-utils.c: Likewise.
5495 * spu-low.c: Likewise.
5496 * utils.c: Likewise.
5497
dccbb609
GB
54982014-08-07 Gary Benson <gbenson@redhat.com>
5499
5500 * server.h: Do not include gdb_assert.h.
5501
e76df0d0
GB
55022014-08-07 Gary Benson <gbenson@redhat.com>
5503
5504 * server.h: Do not include common-utils.h.
5505
4cb9c816
GB
55062014-08-07 Gary Benson <gbenson@redhat.com>
5507
5508 * server.h: Do not include ptid.h.
5509 * notif.h: Likewise.
5510
3995eeee
GB
55112014-08-07 Gary Benson <gbenson@redhat.com>
5512
5513 * server.h: Do not include gdb_locale.h.
5514
cb9f1a9b
GB
55152014-08-07 Gary Benson <gbenson@redhat.com>
5516
5517 * server.h: Do not include gdb/signals.h.
5518 * win32-low.c: Likewise.
5519
a5fceff8
GB
55202014-08-07 Gary Benson <gbenson@redhat.com>
5521
5522 * server.h: Do not include pathmax.h.
5523
b9391142
GB
55242014-08-07 Gary Benson <gbenson@redhat.com>
5525
5526 * server.h: Do not include libiberty.h.
5527 * linux-bfin-low.c: Likewise.
5528
0e443c87
GB
55292014-08-07 Gary Benson <gbenson@redhat.com>
5530
5531 * server.h: Do not include ansidecl.h.
5532
8ebb3f56
GB
55332014-08-07 Gary Benson <gbenson@redhat.com>
5534
5535 * linux-x86-low.c: Do not include stddef.h.
5536 * lynx-ppc-low.c: Likewise.
5537 * tracepoint.c: Likewise.
5538
8980bdf6
GB
55392014-08-07 Gary Benson <gbenson@redhat.com>
5540
5541 * server.h: Do not include stdarg.h.
5542 * nto-low.c: Likewise.
5543
d7096f71
GB
55442014-08-07 Gary Benson <gbenson@redhat.com>
5545
5546 * server.h: Do not include stdlib.h.
5547 * inferiors.c: Likewise.
5548 * linux-low.c: Likewise.
5549 * regcache.c: Likewise.
5550 * spu-low.c: Likewise.
5551 * tracepoint.c: Likewise.
5552 * utils.c: Likewise.
5553
d02f550d
GB
55542014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include stdio.h.
5557 * linux-low.c: Likewise.
5558 * remote-utils.c: Likewise.
5559 * spu-low.c: Likewise.
5560 * utils.c: Likewise.
5561 * wincecompat.c: Likewise.
5562
87f6c4e3
GB
55632014-08-06 Gary Benson <gbenson@redhat.com>
5564
5565 * regcache.c (init_register_cache): Move conditionals inside if.
5566
7089dca4
GB
55672014-08-06 Gary Benson <gbenson@redhat.com>
5568
5569 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5570
462f517e
GB
55712014-07-31 Gary Benson <gbenson@redhat.com>
5572
5573 * ax.h: Do not include server.h.
5574 * gdbthread.h: Likewise.
5575 * lynx-low.h: Likewise.
5576 * notif.h: Likewise.
5577
976411d6
GB
55782014-07-30 Gary Benson <gbenson@redhat.com>
5579
5580 * server.h: Include common-defs.h.
5581 Do not include config.h or build-gnulib-gdbserver/config.h.
5582
d41f6d8e
GB
55832014-07-30 Gary Benson <gbenson@redhat.com>
5584
5585 * hostio-errno.c: Move server.h to top of includes list.
5586 * inferiors.c: Likewise.
5587 * linux-x86-low.c: Likewise.
5588 * notif.c: Include server.h.
5589
314c6a35
TT
55902014-07-24 Tom Tromey <tromey@redhat.com>
5591 Gary Benson <gbenson@redhat.com>
5592
5593 * server.h (CORE_ADDR): Now unsigned.
5594
69ff6be5
PA
55952014-07-16 Pedro Alves <palves@redhat.com>
5596
5597 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5598
ce9e3fe7
PA
55992014-07-15 Pedro Alves <palves@redhat.com>
5600
5601 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5602 copy.
5603
e76126e8
PA
56042014-07-11 Pedro Alves <palves@redhat.com>
5605
5606 * linux-low.c (kill_wait_lwp): New function, based on
5607 kill_one_lwp_callback, but use my_waitpid directly.
5608 (kill_one_lwp_callback, linux_kill): Use it.
5609
8e9db26e
PA
56102014-06-23 Pedro Alves <palves@redhat.com>
5611
5612 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5613 before setting DR0..DR3.
5614
698b3e08
GB
56152014-06-20 Gary Benson <gbenson@redhat.com>
5616
5617 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5618 * configure: Regenerated.
5619 * config.in: Likewise.
5620
125f8a3d
GB
56212014-06-20 Gary Benson <gbenson@redhat.com>
5622
5623 * Makefile.in (SFILES): Update locations for files moved
5624 from common to nat.
5625 (object file files): Reordered.
5626
42995dbd
GB
56272014-06-20 Gary Benson <gbenson@redhat.com>
5628
5629 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5630 (i386_dr_low_set_addr): Likewise.
5631 (i386_dr_low_get_addr): Likewise.
5632 (i386_dr_low_can_set_control): Likewise.
5633 (i386_dr_low_set_control): Likewise.
5634 (i386_dr_low_get_control): Likewise.
5635 (i386_dr_low_get_status): Likewise.
5636 (i386_get_debug_register_length): Likewise.
5637 * linux-x86-low.c (i386_dr_low_set_addr):
5638 Changed signature. Made static.
5639 (i386_dr_low_get_addr): Likewise.
5640 (i386_dr_low_set_control): Likewise.
5641 (i386_dr_low_get_control): Likewise.
5642 (i386_dr_low_get_status): Likewise.
5643 (i386_dr_low): New global variable.
5644 * win32-i386-low.c (i386_dr_low_set_addr):
5645 Changed signature. Made static.
5646 (i386_dr_low_get_addr): Likewise.
5647 (i386_dr_low_set_control): Likewise.
5648 (i386_dr_low_get_control): Likewise.
5649 (i386_dr_low_get_status): Likewise.
5650 (i386_dr_low): New global variable.
5651
e1d2394b
MS
56522014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5653
5654 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5655 * Makefile.in (AR, AR_FLAGS): Define.
5656 * configure: Regenerate.
5657
3a8ee006
GB
56582014-06-19 Gary Benson <gbenson@redhat.com>
5659
5660 * Makefile.in (i386-dregs.o): New rule.
5661 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5662 * i386-low.c (target.h): Remove include.
5663 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5664 (DR_CONTROL_SHIFT): Likewise.
5665 (DR_CONTROL_SIZE): Likewise.
5666 (DR_RW_EXECUTE): Likewise.
5667 (DR_RW_WRITE): Likewise.
5668 (DR_RW_READ): Likewise.
5669 (DR_RW_IORW): Likewise.
5670 (DR_LEN_1): Likewise.
5671 (DR_LEN_2): Likewise.
5672 (DR_LEN_4): Likewise.
5673 (DR_LEN_8): Likewise.
5674 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5675 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5676 (DR_ENABLE_SIZE): Likewise.
5677 (DR_LOCAL_SLOWDOWN): Likewise.
5678 (DR_GLOBAL_SLOWDOWN): Likewise.
5679 (DR_CONTROL_RESERVED): Likewise.
5680 (I386_DR_CONTROL_MASK): Likewise.
5681 (I386_DR_VACANT): Likewise.
5682 (I386_DR_LOCAL_ENABLE): Likewise.
5683 (I386_DR_GLOBAL_ENABLE): Likewise.
5684 (I386_DR_DISABLE): Likewise.
5685 (I386_DR_SET_RW_LEN): Likewise.
5686 (I386_DR_GET_RW_LEN): Likewise.
5687 (I386_DR_WATCH_HIT): Likewise.
5688 (i386_wp_op_t): Likewise.
5689 (i386_show_dr): Likewise.
5690 (i386_length_and_rw_bits): Likewise.
5691 (i386_insert_aligned_watchpoint): Likewise.
5692 (i386_remove_aligned_watchpoint): Likewise.
5693 (i386_handle_nonaligned_watchpoint): Likewise.
5694 i386_update_inferior_debug_regs(): Likewise.
5695 (i386_dr_insert_watchpoint): Likewise.
5696 (i386_dr_remove_watchpoint): Likewise.
5697 (i386_dr_region_ok_for_watchpoint): Likewise.
5698 (i386_dr_stopped_data_address): Likewise.
5699 (i386_dr_stopped_by_watchpoint): Likewise.
5700
8f26655c
GB
57012014-06-19 Gary Benson <gbenson@redhat.com>
5702
5703 * i386-low.c (i386_dr_show): Renamed to
5704 i386_show_dr and made static. All uses updated.
5705 (i386_dr_length_and_rw_bits): Renamed to
5706 i386_length_and_rw_bits and made static.
5707 All uses updated.
5708 (i386_dr_insert_aligned_watchpoint): Renamed to
5709 i386_insert_aligned_watchpoint and made static.
5710 All uses updated.
5711 (i386_dr_remove_aligned_watchpoint): Renamed to
5712 i386_remove_aligned_watchpoint and made static.
5713 All uses updated.
5714 (i386_dr_update_inferior_debug_regs): Renamed to
5715 i386_update_inferior_debug_regs and made static.
5716 All uses updated.
5717
b9228891
GB
57182014-06-18 Gary Benson <gbenson@redhat.com>
5719
5171def3
GB
5720 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5721 (i386_dr_low_can_set_control): Likewise.
5722 (i386_get_debug_register_length): Likewise.
5723 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5724 (i386_dr_low_can_set_control): Likewise.
5725 (i386_get_debug_register_length): Likewise.
5726
57272014-06-17 Gary Benson <gbenson@redhat.com>
5728
b9228891
GB
5729 * i386-low.h (i386-dregs.h): New include.
5730 (DR_FIRSTADDR): Now in i386-dregs.h.
5731 (DR_LASTADDR): Likewise.
5732 (DR_NADDR): Likewise.
5733 (DR_STATUS): Likewise.
5734 (DR_CONTROL): Likewise.
5735 (i386_debug_reg_state): Likewise.
5736 (i386_dr_insert_watchpoint): Likewise.
5737 (i386_dr_remove_watchpoint): Likewise.
5738 (i386_dr_region_ok_for_watchpoint): Likewise.
5739 (i386_dr_stopped_data_address): Likewise.
5740 (i386_dr_stopped_by_watchpoint): Likewise.
5741 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5742
4be83cc2
GB
57432014-06-18 Gary Benson <gbenson@redhat.com>
5744
5745 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5746 i386_dr_insert_watchpoint.
5747 (i386_low_remove_watchpoint): Renamed to
5748 i386_dr_remove_watchpoint.
5749 (i386_low_region_ok_for_watchpoint): Renamed to
5750 i386_dr_region_ok_for_watchpoint.
5751 (i386_low_stopped_data_address): Renamed to
5752 i386_dr_stopped_data_address.
5753 (i386_low_stopped_by_watchpoint): Renamed to
5754 i386_dr_stopped_by_watchpoint.
5755 * i386-low.c (i386_show_dr): Renamed to
5756 i386_dr_show and made nonstatic. All uses updated.
5757 (i386_length_and_rw_bits): Renamed to
5758 i386_dr_length_and_rw_bits and made nonstatic.
5759 All uses updated.
5760 (i386_insert_aligned_watchpoint): Renamed to
5761 i386_dr_insert_aligned_watchpoint and made nonstatic.
5762 All uses updated.
5763 (i386_remove_aligned_watchpoint): Renamed to
5764 i386_dr_remove_aligned_watchpoint and made nonstatic.
5765 All uses updated.
5766 (i386_update_inferior_debug_regs): Renamed to
5767 i386_dr_update_inferior_debug_regs and made nonstatic.
5768 All uses updated.
5769 (i386_low_insert_watchpoint): Renamed to
5770 i386_dr_insert_watchpoint. All uses updated.
5771 (i386_low_remove_watchpoint): Renamed to
5772 i386_dr_remove_watchpoint. All uses updated.
5773 (i386_low_region_ok_for_watchpoint): Renamed to
5774 i386_dr_region_ok_for_watchpoint. All uses updated.
5775 (i386_low_stopped_data_address): Renamed to
5776 i386_dr_stopped_data_address. All uses updated.
5777 (i386_low_stopped_by_watchpoint): Renamed to
5778 i386_dr_stopped_by_watchpoint. All uses updated.
5779
131aa0d4
GB
57802014-06-18 Gary Benson <gbenson@redhat.com>
5781
5782 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5783 (i386_dr_low_can_set_control): Likewise.
5784 (i386_insert_aligned_watchpoint): New check.
5785
d9305f7f
GB
57862014-06-18 Gary Benson <gbenson@redhat.com>
5787
5788 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5789 Renamed to state.
5790
e927c9fc
GB
57912014-06-18 Gary Benson <gbenson@redhat.com>
5792
5793 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5794 instead of fatal and error.
5795 (i386_handle_nonaligned_watchpoint): Likewise.
5796
1b6d4134
GB
57972014-06-18 Gary Benson <gbenson@redhat.com>
5798
5799 * i386-low.c (i386_get_debug_register_length): New macro.
5800 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5801 (i386_show_dr): Use debug_printf instead of fprintf. Use
5802 phex to format values.
5803
6e62758f
GB
58042014-06-18 Gary Benson <gbenson@redhat.com>
5805
5806 * i386-low.h: Comment changes.
5807 * i386-low.c: Likewise.
5808
fc6e2f03
GB
58092014-06-18 Gary Benson <gbenson@redhat.com>
5810
5811 * i386-low.c: Whitespace changes.
5812
f9d1eeed
TT
58132014-06-12 Tom Tromey <tromey@redhat.com>
5814
5815 * utils.c (freeargv): Remove.
5816
0b04e523
TT
58172014-06-12 Tom Tromey <tromey@redhat.com>
5818
5819 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5820 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5821 (parse_debug_format_options): Likewise.
5822 (gdbserver_usage): Likewise.
5823 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5824 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5825 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5826 against libiberty.
5827 ($(LIBGNU)): Depend on libiberty.
5828 (all-lib): Recurse into all subdirs.
5829 (install-only): Invoke "install" target in subdirs.
5830 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5831 targets.
5832 * configure: Rebuild.
5833 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5834 for vasprintf, vsnprintf, or gettimeofday.
5835 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5836 srv_tgtobj.
5837
270c9937
JB
58382014-06-05 Joel Brobecker <brobecker@adacore.com>
5839
5840 * development.sh: Delete.
5841 * Makefile.in (config.status): Adjust dependency on development.sh.
5842 * configure.ac: Adjust development.sh source call.
5843 * configure: Regenerate.
5844
0a261ed8
PA
58452014-06-02 Pedro Alves <palves@redhat.com>
5846
5847 * ax.c (gdb_free_agent_expr): New function.
5848 * ax.h (gdb_free_agent_expr): New declaration.
5849 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5850 list.
5851 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5852 static.
5853 (clear_breakpoint_conditions_and_commands): New function.
5854 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5855 (clear_breakpoint_conditions_and_commands): New declaration.
5856
e9dae05e
RR
58572014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5858
5859 * linux-aarch64-low.c (asm/ptrace.h): Include.
5860
5876f503
JK
58612014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5862
5863 Fix TLS access for -static -pthread.
5864 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5865 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5866 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5867
802e8e6d
PA
58682014-05-20 Pedro Alves <palves@redhat.com>
5869
5870 * linux-aarch64-low.c (aarch64_insert_point)
5871 (aarch64_remove_point): No longer check whether the type is
5872 supported here. Adjust to new interface.
5873 (the_low_target): Install aarch64_supports_z_point_type as
5874 supports_z_point_type method.
5875 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5876 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5877 instead of a Z packet char. Adjust.
5878 (arm_supports_z_point_type): New function.
5879 (arm_insert_point, arm_remove_point): Adjust to new interface.
5880 (the_low_target): Install arm_supports_z_point_type.
5881 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5882 (cris_insert_point, cris_remove_point): Adjust to new interface.
5883 Don't check whether the type is supported here.
5884 (the_low_target): Install cris_supports_z_point_type.
5885 * linux-low.c (linux_supports_z_point_type): New function.
5886 (linux_insert_point, linux_remove_point): Adjust to new interface.
5887 * linux-low.h (struct linux_target_ops) <insert_point,
5888 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5889 raw_breakpoint pointer parameter.
5890 <supports_z_point_type>: New method.
5891 * linux-mips-low.c (mips_supports_z_point_type): New function.
5892 (mips_insert_point, mips_remove_point): Adjust to new interface.
5893 Use mips_supports_z_point_type.
5894 (the_low_target): Install mips_supports_z_point_type.
5895 * linux-ppc-low.c (the_low_target): Install NULL as
5896 supports_z_point_type method.
5897 * linux-s390-low.c (the_low_target): Install NULL as
5898 supports_z_point_type method.
5899 * linux-sparc-low.c (the_low_target): Install NULL as
5900 supports_z_point_type method.
5901 * linux-x86-low.c (x86_supports_z_point_type): New function.
5902 (x86_insert_point): Adjust to new insert_point interface. Use
5903 insert_memory_breakpoint. Adjust to new
5904 i386_low_insert_watchpoint interface.
5905 (x86_remove_point): Adjust to remove_point interface. Use
5906 remove_memory_breakpoint. Adjust to new
5907 i386_low_remove_watchpoint interface.
5908 (the_low_target): Install x86_supports_z_point_type.
5909 * lynx-low.c (lynx_target_ops): Install NULL as
5910 supports_z_point_type callback.
5911 * nto-low.c (nto_supports_z_point_type): New.
5912 (nto_insert_point, nto_remove_point): Adjust to new interface.
5913 (nto_target_ops): Install nto_supports_z_point_type.
5914 * mem-break.c: Adjust intro comment.
5915 (struct raw_breakpoint) <raw_type, size>: New fields.
5916 <inserted>: Update comment.
5917 <shlib_disabled>: Delete field.
5918 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5919 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5920 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5921 (raw_bkpt_type_to_target_hw_bp_type): New function.
5922 (find_enabled_raw_code_breakpoint_at): New function.
5923 (find_raw_breakpoint_at): New type and size parameters. Use them.
5924 (insert_memory_breakpoint): New function, based off
5925 set_raw_breakpoint_at.
5926 (remove_memory_breakpoint): New function.
5927 (set_raw_breakpoint_at): Reimplement.
5928 (set_breakpoint): New, based on set_breakpoint_at.
5929 (set_breakpoint_at): Reimplement.
5930 (delete_raw_breakpoint): Go through the_target->remove_point
5931 instead of assuming memory breakpoints.
5932 (find_gdb_breakpoint_at): Delete.
5933 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5934 (find_gdb_breakpoint): New function.
5935 (set_gdb_breakpoint_at): Delete.
5936 (z_type_supported): New function.
5937 (set_gdb_breakpoint_1): New function, loosely based off
5938 set_gdb_breakpoint_at.
5939 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5940 (delete_gdb_breakpoint_at): Delete.
5941 (delete_gdb_breakpoint_1): New function, loosely based off
5942 delete_gdb_breakpoint_at.
5943 (delete_gdb_breakpoint): New function.
5944 (clear_gdb_breakpoint_conditions): Rename to ...
5945 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5946 breakpoint.
5947 (add_condition_to_breakpoint): Make static.
5948 (add_breakpoint_condition): Take a struct breakpoint pointer
5949 instead of an address. Adjust.
5950 (gdb_condition_true_at_breakpoint): Rename to ...
5951 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5952 z_type parameter.
5953 (gdb_condition_true_at_breakpoint): Reimplement.
5954 (add_breakpoint_commands): Take a struct breakpoint pointer
5955 instead of an address. Adjust.
5956 (gdb_no_commands_at_breakpoint): Rename to ...
5957 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5958 parameter. Return true if no breakpoint was found. Change debug
5959 output.
5960 (gdb_no_commands_at_breakpoint): Reimplement.
5961 (run_breakpoint_commands): Rename to ...
5962 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5963 and change return type to boolean.
5964 (run_breakpoint_commands): New function.
5965 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5966 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5967 breakpoint. Go through the_target->remove_point instead of
5968 assuming memory breakpoint.
5969 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5970 software and hardware breakpoints.
5971 (reinsert_raw_breakpoint): Go through the_target->insert_point
5972 instead of assuming memory breakpoint.
5973 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5974 software and hardware breakpoints.
5975 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5976 Check both software and hardware breakpoints.
5977 (validate_inserted_breakpoint): Assert the breakpoint is a
5978 software breakpoint. Set the inserted flag to -1 instead of
5979 setting shlib_disabled.
5980 (delete_disabled_breakpoints): Adjust.
5981 (validate_breakpoints): Only validate software breakpoints.
5982 Adjust to inserted flag change.
5983 (check_mem_read, check_mem_write): Skip breakpoint types other
5984 than software breakpoints. Adjust to inserted flag change.
5985 * mem-break.h (enum raw_bkpt_type): New enum.
5986 (raw_breakpoint, struct process_info): Forward declare.
5987 (Z_packet_to_target_hw_bp_type): Delete declaration.
5988 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5989 (set_gdb_breakpoint, delete_gdb_breakpoint)
5990 (clear_breakpoint_conditions): New declarations.
5991 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5992 (breakpoint_inserted_here): Update comment.
5993 (add_breakpoint_condition, add_breakpoint_commands): Replace
5994 address parameter with a breakpoint pointer parameter.
5995 (gdb_breakpoint_here): Update comment.
5996 (delete_gdb_breakpoint_at): Delete.
5997 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5998 * server.c (process_point_options): Take a struct breakpoint
5999 pointer instead of an address. Adjust.
6000 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6001 delete_gdb_breakpoint.
6002 * spu-low.c (spu_target_ops): Install NULL as
6003 supports_z_point_type method.
6004 * target.h: Include mem-break.h.
6005 (struct target_ops) <prepare_to_access_memory>: Update comment.
6006 <supports_z_point_type>: New field.
6007 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6008 instead of a char. Also take a raw breakpoint pointer.
6009 * win32-arm-low.c (the_low_target): Install NULL as
6010 supports_z_point_type.
6011 * win32-i386-low.c (i386_supports_z_point_type): New function.
6012 (i386_insert_point, i386_remove_point): Adjust to new interface.
6013 (the_low_target): Install i386_supports_z_point_type.
6014 * win32-low.c (win32_supports_z_point_type): New function.
6015 (win32_insert_point, win32_remove_point): Adjust to new interface.
6016 (win32_target_ops): Install win32_supports_z_point_type.
6017 * win32-low.h (struct win32_target_ops):
6018 <supports_z_point_type>: New method.
6019 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6020 instead of a char. Also take a raw breakpoint pointer.
6021
932539e3
PA
60222014-05-20 Pedro Alves <palves@redhat.com>
6023
6024 * mem-break.h: Include break-common.h.
6025 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6026 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6027 (Z_packet_to_target_hw_bp_type): New declaration.
6028 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6029 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6030 (Z_PACKET_ACCESS_WP): Delete macros.
6031 (Z_packet_to_hw_type): Delete function.
6032 * i386-low.h: Don't include break-common.h here.
6033 (Z_packet_to_hw_type): Delete declaration.
6034 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6035 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6036 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6037 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6038 * linux-aarch64-low.c: Don't include break-common.h here.
6039 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6040 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6041 (Z_packet_to_target_hw_bp_type): Delete function.
6042 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6043 function.
6044 (mips_insert_point, mips_remove_point): Use
6045 Z_packet_to_target_hw_bp_type.
6046
4ff0d3d8
PA
60472014-05-20 Pedro Alves <palves@redhat.com>
6048
6049 * linux-aarch64-low.c: Include break-common.h.
6050 (enum target_point_type): Delete.
6051 (Z_packet_to_point_type): Rename to ...
6052 (Z_packet_to_target_hw_bp_type): ... this, and return a
6053 target_hw_bp_type instead.
6054 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6055 instead of an enum target_point_type.
6056 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6057 breakpoint type.
6058 (aarch64_dr_state_insert_one_point)
6059 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6060 (aarch64_handle_aligned_watchpoint)
6061 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6062 Take an enum target_hw_bp_type instead of an enum
6063 target_point_type.
6064 (aarch64_supports_z_point_type): New function.
6065 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6066 use Z_packet_to_target_hw_bp_type.
6067
786dc519
JB
60682014-05-20 Joel Brobecker <brobecker@adacore.com>
6069
6070 * configure.ac: Only use -Werror by default when DEVELOPMENT
6071 is true.
6072 * configure: Regenerate.
6073
9e0aa64f
JK
60742014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6077 * linux-x86-low.c (X86_64_USER_REGS): New.
6078 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6079
2b577b92
YQ
60802014-04-28 Yao Qi <yao@codesourcery.com>
6081
6082 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6083 name.
6084
94611da2
PA
60852014-04-25 Pedro Alves <palves@redhat.com>
6086
6087 PR server/16255
6088 * linux-low.c (linux_attach_fail_reason_string): New function.
6089 (linux_attach_lwp): Delete.
6090 (linux_attach_lwp_1): Rename to ...
6091 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6092 argument. Remove "initial" parameter. Return int instead of
6093 void. Don't error or warn here.
6094 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6095 failure to attach to the tgid. Call warning when failing to
6096 attach to an lwp.
6097 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6098 argument. Remove "initial" parameter. Return int instead of
6099 void. Don't error or warn here.
6100 (linux_attach_fail_reason_string): New declaration.
6101 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6102 interface change. Use linux_attach_fail_reason_string.
6103
01f9f808
MS
61042014-04-24 Michael Sturm <michael.sturm@mintel.com>
6105 Walfred Tedeschi <walfred.tedeschi@intel.com>
6106
6107 * Makefile.in: Added rules to handle new files
6108 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6109 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6110 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6111 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6112 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6113 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6114 x32-avx512-linux.o.
6115 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6116 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6117 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6118 i386/x32-avx512.xml.
6119 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6120 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6121 i386/x32-avx512-linux.xml.
6122 * i387-fp.c (num_avx512_k_registers): New constant for number
6123 of K registers.
6124 (num_avx512_zmmh_low_registers): New constant for number of
6125 lower ZMM registers (0-15).
6126 (num_avx512_zmmh_high_registers): New constant for number of
6127 higher ZMM registers (16-31).
6128 (num_avx512_ymmh_registers): New contant for number of higher
6129 YMM registers (ymm16-31 added by avx521 on x86_64).
6130 (num_avx512_xmm_registers): New constant for number of higher
6131 XMM registers (xmm16-31 added by AVX512 on x86_64).
6132 (struct i387_xsave): Add space for AVX512 registers.
6133 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6134 Add code to handle AVX512 registers.
6135 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6136 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6137 prototypei from generated file.
6138 (tdesc_amd64_avx512_linux): Likewise.
6139 (init_registers_x32_avx512_linux): Likewise.
6140 (tdesc_x32_avx512_linux): Likewise.
6141 (init_registers_i386_avx512_linux): Likewise.
6142 (tdesc_i386_avx512_linux): Likewise.
6143 (x86_64_regmap): Add AVX512 registers.
6144 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6145 mask.
6146 (initialize_low_arch): Add code to initialize AVX512 registers.
6147
51aa91f9
PA
61482014-04-23 Pedro Alves <palves@redhat.com>
6149
6150 * mem-break.c (find_gdb_breakpoint_at): Make static.
6151 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6152
a4165e94
PA
61532014-04-23 Pedro Alves <palves@redhat.com>
6154
6155 * i386-low.c: Don't include break-common.h here.
6156 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6157 prototype to take target_hw_bp_type as argument instead of a Z
6158 packet char.
6159 * i386-low.h: Include break-common.h here.
6160 (Z_packet_to_hw_type): Declare.
6161 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6162 prototypes.
6163 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6164 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6165 (x86_remove_point): Convert the packet number to a
6166 target_hw_bp_type before calling i386_low_remove_watchpoint.
6167 * win32-i386-low.c (i386_insert_point): Convert the packet number
6168 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6169 (i386_remove_point): Convert the packet number to a
6170 target_hw_bp_type before calling i386_low_remove_watchpoint.
6171
b8acf843
PA
61722014-04-23 Pedro Alves <palves@redhat.com>
6173
6174 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6175
d708bcd1
PA
61762014-04-10 Pedro Alves <palves@redhat.com>
6177
6178 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6179 Check if the condition or command is NULL before checking if the
6180 breakpoint is known. On success, return true.
6181 * mem-break.h (add_breakpoint_condition): Document return.
6182 (add_breakpoint_commands): Add describing comment.
6183 * server.c (skip_to_semicolon): New function.
6184 (process_point_options): Use it.
6185
2eec7d5b
PA
61862014-04-09 Pedro Alves <palves@redhat.com>
6187
6188 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6189 to lwpid_of.
6190
fa96cb38
PA
61912014-02-27 Pedro Alves <palves@redhat.com>
6192
6193 PR 12702
6194 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6195 macros.
6196 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6197 output.
6198 (last_thread_of_process_p): Take a PID argument instead of a
6199 thread pointer.
6200 (linux_wait_for_lwp): Delete.
6201 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6202 functions.
6203 (linux_low_filter_event): New function, party factored out from
6204 linux_wait_for_event.
6205 (linux_wait_for_event): Rename to ...
6206 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6207 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6208 sigsuspend. Check for zombie leaders.
6209 (linux_wait_for_event): Reimplement as wrapper around
6210 linux_wait_for_event_filtered.
6211 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6212 a normal or signal exit is seen, it's the whole process exiting.
6213 (wait_for_sigstop): No longer a for_each_inferior callback.
6214 Rewrite on top of linux_wait_for_event_filtered.
6215 (stop_all_lwps): Call wait_for_sigstop directly.
6216 * server.c (resume, handle_target_event): Handle
6217 TARGET_WAITKIND_NO_RESUMED.
6218
d763de10
JB
62192014-02-26 Joel Brobecker <brobecker@adacore.com>
6220
6221 * win32-low.c (psapi_get_dll_name,
6222 * win32_CreateToolhelp32Snapshot): Delete.
6223 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6224 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6225 Delete.
6226 (handle_load_dll): Add function description.
6227 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6228
850a0f76
JB
62292014-02-26 Joel Brobecker <brobecker@adacore.com>
6230
6231 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6232 Add comment.
6233 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6234 base address when calling win32_add_one_solib.
6235 (handle_load_dll): Delete local variable load_addr.
6236 Remove 0x1000 offset applied to DLL base address when calling
6237 win32_add_one_solib.
6238 (handle_unload_dll): Add comment.
6239
f25b3fc3
JB
62402014-02-26 Joel Brobecker <brobecker@adacore.com>
6241
6242 * win32-low.c (win32_add_all_dlls): Renames
6243 win32_ensure_ntdll_loaded. Rewrite function documentation.
6244 Adjust implementation to always load all DLLs.
6245 Add 0x1000 offset to DLL base address when calling
6246 win32_add_one_solib.
6247 (child_initialization_done): New static global.
6248 (do_initial_child_stuff): Set child_initialization_done to
6249 zero during child initialization, and 1 after. Replace call
6250 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6251 Add comment.
6252 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6253 (handle_unload_dll): Add function documentation.
6254 (get_child_debug_event): Ignore load and unload DLL events
6255 during child initialization.
6256
d86d4aaf
DE
62572014-02-20 Doug Evans <dje@google.com>
6258
3bc32da3 6259 Remove global all_lwps.
d86d4aaf
DE
6260 * inferiors.h (ptid_of): Move here from linux-low.h.
6261 (pid_of, lwpid_of): Ditto.
6262 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6263 parameter is a struct thread_info * now.
6264 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6265 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6266 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6267 directly.
6268 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6269 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6270 * linux-arm-low.c (update_registers_callback): Update, "entry"
6271 parameter is a struct thread_info * now.
6272 Fetch lwpid from current_inferior directly.
6273 (arm_insert_point): Pass &all_threads to find_inferior instead of
6274 &all_lwps.
6275 (arm_remove_point): Ditto.
6276 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6277 (arm_prepare_to_resume): Fetch pid from thread.
6278 (arm_read_description): Fetch lwpid from current_inferior directly.
6279 * linux-low.c (all_lwps): Delete.
6280 (delete_lwp): Delete call to remove_inferior.
6281 (handle_extended_wait): Fetch lwpid from thread.
6282 (add_lwp): Don't set lwp->entry.id. Remove call to
6283 add_inferior_to_list.
6284 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6285 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6286 (kill_one_lwp_callback): Ditto.
6287 (linux_kill): Don't dereference NULL pointer.
6288 Fetch ptid,lwpid from thread.
6289 (get_detach_signal): Fetch ptid from thread.
6290 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6291 Simplify call to regcache_invalidate_thread.
6292 (delete_lwp_callback): Update, "entry" parameter is a
6293 struct thread_info * now. Fetch pid from thread.
6294 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6295 (status_pending_p_callback): Update, "entry" parameter is a
6296 struct thread_info * now. Fetch ptid from thread.
6297 (find_lwp_pid): Update, "entry" parameter is a
6298 struct thread_info * now.
6299 (linux_wait_for_lwp): Fetch pid from thread.
6300 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6301 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6302 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6303 (dequeue_one_deferred_signal): Ditto.
6304 (cancel_breakpoint): Fetch ptid from current_inferior.
6305 (linux_wait_for_event): Pass &all_threads to find_inferior,
6306 not &all_lwps. Fetch ptid, lwpid from thread.
6307 (count_events_callback): Update, "entry" parameter is a
6308 struct thread_info * now.
6309 (select_singlestep_lwp_callback): Ditto.
6310 (select_event_lwp_callback): Ditto.
6311 (cancel_breakpoints_callback): Ditto.
6312 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6313 not &all_lwps.
6314 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6315 (unsuspend_one_lwp): Update, "entry" parameter is a
6316 struct thread_info * now.
6317 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6318 not &all_lwps.
6319 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6320 Fetch lwpid from thread, not lwp.
6321 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6322 Pass &all_threads to find_inferior, not &all_lwps.
6323 (send_sigstop): Fetch lwpid from thread, not lwp.
6324 (send_sigstop_callback): Update, "entry" parameter is a
6325 struct thread_info * now.
6326 (suspend_and_send_sigstop_callback): Ditto.
6327 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6328 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6329 struct thread_info * now.
6330 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6331 from thread, lwp.
6332 (lwp_running): Update, "entry" parameter is a
6333 struct thread_info * now.
6334 (stop_all_lwps): Fetch ptid from thread.
6335 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6336 (linux_resume_one_lwp): Fetch lwpid from thread.
6337 (linux_set_resume_request): Update, "entry" parameter is a
6338 struct thread_info * now. Fetch pid, lwpid from thread.
6339 (resume_status_pending_p): Update, "entry" parameter is a
6340 struct thread_info * now.
6341 (need_step_over_p): Ditto. Fetch lwpid from thread.
6342 (start_step_over): Fetch lwpid from thread.
6343 (linux_resume_one_thread): Update, "entry" parameter is a
6344 struct thread_info * now. Fetch lwpid from thread.
6345 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6346 (proceed_one_lwp): Update, "entry" parameter is a
6347 struct thread_info * now. Fetch lwpid from thread.
6348 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6349 struct thread_info * now.
6350 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6351 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6352 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6353 directly.
6354 (regsets_store_inferior_registers): Ditto.
6355 (fetch_register, store_register): Ditto.
6356 (linux_read_memory, linux_write_memory): Ditto.
6357 (linux_request_interrupt): Ditto.
6358 (linux_read_auxv): Ditto.
6359 (linux_xfer_siginfo): Ditto.
6360 (linux_qxfer_spu): Ditto.
6361 (linux_qxfer_libraries_svr4): Ditto.
6362 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6363 moved to inferiors.h.
6364 (get_lwp): Delete.
6365 (get_thread_lwp): Update.
6366 (struct lwp_info): Delete member "entry". Simplify comment for
6367 member "thread".
6368 (all_lwps): Delete.
6369 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6370 current_inferior directly.
6371 (update_watch_registers_callback): Update, "entry" parameter is a
6372 struct thread_info * now. Fetch pid from thread.
6373 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6374 (mips_insert_point): Fetch lwpid from current_inferior.
6375 Pass &all_threads to find_inferior, not &all_lwps.
6376 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6377 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6378 directly.
6379 (mips_stopped_data_address): Ditto.
6380 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6381 directly.
6382 * linux-tile-low.c (tile_arch_setup): Ditto.
6383 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6384 (update_debug_registers_callback): Update, "entry" parameter is a
6385 struct thread_info * now. Fetch pid from thread.
6386 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6387 Pass &all_threads to find_inferior, not &all_lwps.
6388 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6389 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6390 Pass &all_threads to find_inferior, not &all_lwps.
6391 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6392 (i386_dr_low_get_status): Ditto.
6393 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6394 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6395 (x86_linux_read_description): Ditto.
6396 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6397
3b8361aa
DE
63982014-02-20 Doug Evans <dje@google.com>
6399
6400 * inferiors.c (get_first_inferior): Fix buglet.
6401
f7667f0d
DE
64022014-02-19 Doug Evans <dje@google.com>
6403
6404 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6405 * inferiors.c (add_thread): Change result type to struct thread_info *.
6406 All callers updated.
6407 (add_lwp): Call add_thread here instead of in callers.
6408 All callers updated.
6409 * linux-low.h (get_lwp_thread): Rewrite.
6410 (struct lwp_info): New member "thread".
6411
b3312d80
DE
64122014-02-19 Doug Evans <dje@google.com>
6413
6414 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6415 All callers updated.
6416
ecc6f45c
DE
64172014-02-19 Doug Evans <dje@google.com>
6418
6419 * inferiors.c (add_thread): Fix whitespace.
6420
649ebbca
DE
64212014-02-19 Doug Evans <dje@google.com>
6422
6423 * dll.c (clear_dlls): Replace accessing list implemention details
6424 with API function.
6425 * gdbthread.h (get_first_thread): Declare.
6426 * inferiors.c (for_each_inferior_with_data): New function.
6427 (get_first_thread): New function.
6428 (find_thread_ptid): Simplify.
6429 (get_first_inferior): New function.
6430 (clear_list): Delete.
6431 (one_inferior_p): New function.
6432 (clear_inferior_list): New function.
6433 (clear_inferiors): Update.
6434 * inferiors.h (for_each_inferior_with_data): Declare.
6435 (clear_inferior_list): Declare.
6436 (one_inferior_p): Declare.
6437 (get_first_inferior): Declare.
6438 * linux-low.c (linux_wait_for_event): Replace accessing list
6439 implemention details with API function.
6440 * server.c (target_running): Ditto.
6441 (accumulate_file_name_length): New function.
6442 (emit_dll_description): New function.
6443 (handle_qxfer_libraries): Replace accessing list implemention
6444 details with API function.
6445 (handle_qxfer_threads_worker): New function.
6446 (handle_qxfer_threads_proper): Replace accessing list implemention
6447 details with API function.
6448 (handle_query): Ditto.
6449 (visit_actioned_threads_callback_ftype): New typedef.
6450 (visit_actioned_threads_data): New struct.
6451 (visit_actioned_threads): Rewrite to be find_inferior callback.
6452 (resume): Call find_inferior.
6453 (handle_status): Replace accessing list implemention
6454 details with API function.
6455 (process_serial_event): Replace accessing list implemention details
6456 with API function.
6457 * target.c (set_desired_inferior): Replace accessing list implemention
6458 details with API function.
6459 * tracepoint.c (same_process_p): New function.
6460 (gdb_agent_about_to_close): Replace accessing list implemention
6461 details with API function.
6462 * win32-low.c (child_delete_thread): Replace accessing list
6463 implemention details with API function.
6464 (match_dll_by_basename): New function.
6465 (dll_is_loaded_by_basename): New function.
6466 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6467 details call to dll_is_loaded_by_basename.
6468
80894984
DE
64692014-02-19 Doug Evans <dje@google.com>
6470
6471 * dll.h (struct dll_info): Add comment.
6472 * gdbthread.h (struct thread_info): Add comment.
6473 (current_ptid): Simplify.
6474 * inferiors.c (add_process): Update.
6475 (remove_process): Update.
6476 * inferiors.h (struct process_info): Rename member "head" to "entry".
6477 * linux-low.c (delete_lwp): Update.
6478 (add_lwp): Update.
6479 (last_thread_of_process_p): Update.
6480 (kill_one_lwp_callback, linux_kill): Update.
6481 (status_pending_p_callback): Update.
6482 (wait_for_sigstop): Update. Simplify read of ptid.
6483 (start_step_over): Update.
6484 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6485 (get_lwp_thread): Update.
6486 (struct lwp_info): Rename member "head" to "entry".
6487 * regcache.h (inferior_list_entry): Delete.
6488 * server.c (kill_inferior_callback): Update.
6489 (detach_or_kill_inferior_callback): Update.
6490 (print_started_pid): Update.
6491 (print_attached_pid): Update.
6492 (process_serial_event): Simplify read of ptid.
6493 * thread-db.c (thread_db_create_event): Update.
6494 (thread_db_get_tls_address): Update.
6495 * win32-low.c (current_inferior_ptid): Simplify.
6496
46917d26
TT
64972014-02-19 Tom Tromey <tromey@redhat.com>
6498
6499 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6500 argument.
6501 (target_supports_btrace): Update.
6502
0759a81e
YQ
65032014-02-14 Yao Qi <yao@codesourcery.com>
6504
6505 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6506 (rsp-low-ipa.o): New target.
6507
a7191e8b
TT
65082014-02-12 Tom Tromey <tromey@redhat.com>
6509
6510 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6511 convert_ascii_to_int.
6512 * regcache.c (registers_to_string): Likewise.
6513 * remote-utils.c (decode_M_packet): Likewise.
6514 * server.c (process_serial_event): Likewise.
6515
ff0e980e
TT
65162014-02-12 Tom Tromey <tromey@redhat.com>
6517
6518 * server.c (handle_query, handle_v_run): Use hex2bin, not
6519 unhexify.
6520 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6521
e9371aff
TT
65222014-02-12 Tom Tromey <tromey@redhat.com>
6523
6524 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6525 convert_int_to_ascii.
6526 * regcache.c (registers_to_string, collect_register_as_string):
6527 Likewise.
6528 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6529 Likewise.
6530 * server.c (process_serial_event): Likewise.
6531 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6532 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6533
971dc0b8
TT
65342014-02-12 Tom Tromey <tromey@redhat.com>
6535
6536 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6537 bin2hex, not hexify.
6538 * tracepoint.c (cmd_qtstatus): Likewise.
6539
0a822afb
TT
65402014-02-12 Tom Tromey <tromey@redhat.com>
6541
6542 * remote-utils.c (monitor_output): Pass explicit length to
6543 hexify.
6544
9c3d6531
TT
65452014-02-12 Tom Tromey <tromey@redhat.com>
6546
6547 * tracepoint.c: Include rsp-low.h.
6548 * server.c: Include rsp-low.h.
6549 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6550 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6551 declare.
6552 * remote-utils.c: Include rsp-low.h.
6553 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6554 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6555 (convert_int_to_ascii, convert_ascii_to_int): Move to
6556 common/rsp-low.c.
6557 * regcache.c: Include rsp-low.h.
6558 * ax.c: Include rsp-low.h.
6559 * Makefile.in (SFILES): Add common/rsp-low.c.
6560 (OBS): Add rsp-low.o.
6561 (rsp-low.o): New target.
6562
01fd3ea5
TT
65632014-02-12 Tom Tromey <tromey@redhat.com>
6564
6565 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6566 Include print-utils.h.
6567 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6568 (plongest, thirty_two, phex_nz): Remove.
6569 * Makefile.in (SFILES): Add common/print-utils.c.
6570 (OBS): Add print-utils.o.
6571 (print-utils-ipa.o): New target.
6572 (print-utils.o): New target.
6573 (IPA_OBJS): Add print-utils-ipa.o.
6574
e99dc820
TT
65752014-02-06 Tom Tromey <tromey@redhat.com>
6576
6577 * Makefile.in (SFILES): Fix indentation.
6578
ee1e2d4f
DE
65792014-02-05 Doug Evans <dje@google.com>
6580
6581 * linux-low.c (linux_wait_for_event): Improve comment.
6582 (linux_wait_1): Keep current_inferior in sync with event_child.
6583
f5a02773
DE
65842014-01-22 Doug Evans <dje@google.com>
6585
6586 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6587
87ce2a04
DE
65882014-01-22 Doug Evans <dje@google.com>
6589
6590 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6591 * configure: Regenerate.
6592 * config.in: Regenerate.
6593 * Makefile.in (SFILES): Add debug.c.
6594 (OBS): Add debug.o.
6595 * debug.c: New file.
6596 * debug.h: New file.
6597 * linux-aarch64-low.c (*): Update all debugging printfs to use
6598 debug_printf instead of fprintf.
6599 * linux-arm-low.c (*): Ditto.
6600 * linux-cris-low.c (*): Ditto.
6601 * linux-crisv32-low.c (*): Ditto.
6602 * linux-m32r-low.c (*): Ditto.
6603 * linux-sparc-low.c (*): Ditto.
6604 * linux-x86.c (*): Ditto.
6605 * linux-low.c (*): Ditto.
6606 (linux_wait_1): Add calls to debug_enter, debug_exit.
6607 (linux_wait): Remove redundant debugging printf.
6608 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6609 (linux_resume, unstop_all_lwps): Ditto.
6610 * mem-break.c (*): Update all debugging printfs to use
6611 debug_printf instead of fprintf.
6612 * remote-utils.c (*): Ditto.
6613 * thread-db.c (*): Ditto.
6614 * server.c #include <ctype.h>, "gdb_vecs.h".
6615 (debug_threads): Moved to debug.c.
6616 (*): Update all debugging printfs to use debug_printf instead of
6617 fprintf.
6618 (start_inferior): Replace call to fflush with call to debug_flush.
6619 (monitor_show_help): Mention set debug-format.
6620 (parse_debug_format_options): New function.
6621 (handle_monitor_command): Handle "monitor set debug-format".
6622 (gdbserver_usage): Mention --debug-format.
6623 (main): Parse --debug-format.
6624 * server.h (debug_threads): Declaration moved to debug.h.
6625 #include "debug.h".
6626 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6627 trace_debug_1 that uses debug_printf.
6628 (tracepoint_look_up_symbols): Update all debugging printfs to use
6629 debug_printf instead of fprintf.
6630
e671835b
BS
66312014-01-20 Baruch Siach <baruch@tkos.co.il>
6632
6633 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6634 sys/ptrace.h.
6635
b5737fa9
PA
66362014-01-17 Pedro Alves <palves@redhat.com>
6637
ea38d2a9 6638 PR build/16445
c7faa97a
PA
6639 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6640 defined after including gdb_proc_service.h.
b5737fa9 6641
40ed484e
DE
66422014-01-16 Doug Evans <dje@google.com>
6643
6644 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6645 (match_dll): Use it.
6646
969c39fb
MM
66472014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6648
6649 * target.h (target_ops) <read_btrace>: Change parameters and
6650 return type to allow error reporting.
6651 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6652 trace reading errors on.
6653 * linux-low.c (linux_low_read_btrace): Pass trace reading
6654 errors on.
6655 (linux_low_disable_btrace): New.
6656
ab7f45ba
DE
66572014-01-15 Doug Evans <dje@google.com>
6658
6659 * inferiors.c (thread_id_to_gdb_id): Delete.
6660 * inferiors.h (thread_id_to_gdb_id): Delete.
6661
66af0f44
EZ
66622014-01-13 Eli Zaretskii <eliz@gnu.org>
6663
6664 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6665 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6666 versions.
6667
9939e131
PA
66682014-01-08 Pedro Alves <palves@redhat.com>
6669
6670 * server.c (handle_status): Don't discard previous queued stop
6671 replies or thread's pending status here.
6672 (main) <disconnection>: Do it here instead.
6673
b7ea362b
PA
66742014-01-08 Pedro Alves <palves@redhat.com>
6675
6676 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6677 * server.c (visit_actioned_threads, handle_pending_status): New
6678 function.
6679 (handle_v_cont): Factor out parts to ...
6680 (resume): ... this new function. If in all-stop, and a thread
6681 being resumed has a pending status, report it without actually
6682 resuming.
6683 (myresume): Adjust to use the new 'resume' function.
6684 (clear_pending_status_callback, set_pending_status_callback)
6685 (find_status_pending_thread_callback): New functions.
6686 (handle_status): Handle the case of multiple threads having
6687 interesting statuses to report. Report threads' real last signal
6688 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6689 with an interesting thread to report the status for, instead of
6690 always reporting the status of the first thread.
6691
28498c42
JB
66922014-01-01 Joel Brobecker <brobecker@adacore.com>
6693
6694 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6695 * gdbreplay.c (gdbreplay_version): Likewise.
6696
f45c82da
YZ
66972013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6698
6699 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6700 iov.iov_len with the real length in use.
6701
379a5e2d
JB
67022013-12-13 Joel Brobecker <brobecker@adacore.com>
6703
6704 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6705 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6706 for all targets that use win32-low.c.
6707 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6708 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6709
4210d83e
PA
67102013-12-13 Pedro Alves <palves@redhat.com>
6711
6712 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6713 if equal to TARGET_WAITKIND_LOADED.
6714 * win32-low.c (cached_status): New static global.
6715 (win32_wait): Add declaration.
6716 (do_initial_child_stuff): Flush all initial pending debug events
6717 up to the initial breakpoint.
6718 (win32_wait): If CACHED_STATUS was set, return that instead
6719 of doing a real wait. Remove the code resuming the execution
6720 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6721 during the initial phase. Also remove the code changing
6722 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6723 TARGET_WAITKIND_STOPPED.
6724
e7f0d979
YQ
67252013-12-11 Yao Qi <yao@codesourcery.com>
6726
6727 * notif.c (handle_notif_ack): Return 0 if no notification
6728 matches.
6729
ebcf782c
DE
67302013-11-20 Doug Evans <dje@google.com>
6731
6732 * linux-low.c (linux_set_resume_request): Fix comment.
6733
20ad9378
DE
67342013-11-20 Doug Evans <dje@google.com>
6735
6736 * linux-low.c (resume_status_pending_p): Tweak comment.
6737
a196ebeb
WT
67382013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6739
6740 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6741 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6742 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6743 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6744 (srv_amd64_regobj): Add amd64-mpx.o.
6745 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6746 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6747 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6748 * i387-fp.c (num_pl_bnd_register) Added constant.
6749 (num_pl_bnd_cfg_registers) Added constant.
6750 (struct i387_xsave) Added reserved area and MPX fields.
6751 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6752 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6753 function.
6754 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6755 (init_registers_amd64_mpx_linux): Declare new function.
6756 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6757 (x86_64_regmap): Add MPX registers.
6758 (x86_linux_read_description): Add MPX case.
6759 (initialize_low_arch): Initialize MPX targets.
6760
0080a2f6
TT
67612013-11-18 Tom Tromey <tromey@redhat.com>
6762
6763 * configure: Rebuild.
6764 * configure.ac: Don't check for stdlib.h.
6765 * gdbreplay.c: Unconditionally include stdlib.h.
6766
2978b111
TT
67672013-11-18 Tom Tromey <tromey@redhat.com>
6768
6769 * config.in: Rebuild.
6770 * configure: Rebuild.
6771 * configure.ac: Don't use AC_HEADER_DIRENT.
6772
a3d08894
TT
67732013-11-18 Tom Tromey <tromey@redhat.com>
6774
6775 * server.h: Don't check HAVE_STRING_H.
6776 * gdbreplay.c: Don't check HAVE_STRING_H.
6777 * configure: Rebuild.
6778
0a5dd17d
TT
67792013-11-18 Tom Tromey <tromey@redhat.com>
6780
6781 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6782 LIBGNU.
6783
1bd2f0ba
TT
67842013-11-08 Tom Tromey <tromey@redhat.com>
6785
6786 * configure, config.in: Rebuild.
6787 * configure.ac: Remove unused configury.
6788
3266f10b
TT
67892013-11-08 Tom Tromey <tromey@redhat.com>
6790
6791 * acinclude.m4: Include common.m4, codeset.m4.
6792 * configure, config.in: Rebuild.
6793 * configure.ac: Use GDB_AC_COMMON.
6794
6682d959
AA
67952013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6796
6797 * linux-s390-low.c (HWCAP_S390_TE): New define.
6798 (s390_arch_setup): Consider the TE field in the HWCAP for
6799 determining 'have_regset_tdb'.
6800
fd0a4d76
SDJ
68012013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6802
6803 PR gdb/16014
6804 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6805 call to sizeof.
6806
1a3d890b
PA
68072013-10-02 Pedro Alves <palves@redhat.com>
6808
6809 * server.c (process_serial_event): Don't output "GDBserver
6810 exiting" if GDB is connected through stdio.
6811 * target.c (mywait): Likewise, be silent if GDB is connected
6812 through stdio.
6813
97ad4581
JB
68142013-10-01 Joel Brobecker <brobecker@adacore.com>
6815
6816 * lynx-low.c (lynx_add_threads_after_attach): New function.
6817 (lynx_attach): Remove call to add_thread. Add call to
6818 lynx_add_threads_after_attach instead.
6819
5b4e221c
MF
68202013-09-28 Mike Frysinger <vapier@gentoo.org>
6821
6822 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6823 * config.in, configure: Regenerated.
6824
ee47b2f8
YQ
68252013-09-18 Yao Qi <yao@codesourcery.com>
6826
6827 PR server/15959
6828 * server.c (start_inferior): Clear 'resume_info'.
6829
d6707650 68302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6831
d6707650
JW
6832 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6833 for each register.
6834
9243dd0e 68352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6836
9243dd0e
JW
6837 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6838 linux-tile-low.o to srv_tgtobj.
6839
c623a6ef
WN
68402013-09-16 Will Newton <will.newton@linaro.org>
6841
6842 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6843 out regs.
6844
fb71d39e
PA
68452013-09-06 Pedro Alves <palves@redhat.com>
6846
6847 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6848 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6849 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6850 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6851 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6852 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6853
8e7e9910
PA
68542013-09-06 Pedro Alves <palves@redhat.com>
6855
6856 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6857 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6858
7c3a12ca
PA
68592013-09-06 Pedro Alves <palves@redhat.com>
6860
6861 * linux-amd64-ipa.c: Include tracepoint.h.
6862 * linux-i386-ipa.c: Include tracepoint.h.
6863
8eb3d7b6
RW
68642013-09-06 Ricard Wanderlof <ricardw@axis.com>
6865
6866 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6867 (ps_get_thread_area): New function.
6868
eddddb9d
RW
68692013-09-06 Ricard Wanderlof <ricardw@axis.com>
6870
6871 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6872 (initialize_low_arch): Call init_registers_crisv32 rather than
6873 init_register_crisv32.
6874
533b0600
PA
68752013-09-05 Pedro Alves <palves@redhat.com>
6876
6877 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6878 to ...
6879 * hostio.h: ... this new file.
6880 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6881 win32-low.c: Include hostio.h.
6882
0ce3d3b5
PA
68832013-09-05 Pedro Alves <palves@redhat.com>
6884
6885 * server.h (gdb_client_data, handler_func, callback_handler_func)
6886 (delete_file_handler, add_file_handler, append_callback_event)
6887 (delete_callback_event, start_event_loop, initialize_event_loop):
6888 Move to event-loop.h and include it.
6889 * event-loop.h: New file.
6890
799cdc37
PA
68912013-09-05 Pedro Alves <palves@redhat.com>
6892
6893 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6894 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6895 (loaded_dll, unloaded_dll): Move to ...
6896 * dll.h: ... this new file.
6897 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6898
6a6bbd9d
PA
68992013-09-05 Pedro Alves <palves@redhat.com>
6900
6901 * server.h (current_process, get_thread_process, all_processes)
6902 (add_inferior_to_list, for_each_inferior, current_inferior)
6903 (remove_inferior, add_process, remove_process, find_process_pid)
6904 (have_started_inferiors_p, have_attached_inferiors_p)
6905 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6906 (clear_inferiors, find_inferior, find_inferior_id)
6907 (inferior_target_data, set_inferior_target_data)
6908 (inferior_regcache_data, set_inferior_regcache_data): Move to
6909 inferiors.h, and include it.
6910 * inferiors.h: New file.
6911
f699aaba
PA
69122013-09-05 Pedro Alves <palves@redhat.com>
6913
6914 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6915 Move ...
72f4393d 6916 * ax.h: ... here.
f699aaba 6917
c144c7a0
PA
69182013-09-05 Pedro Alves <palves@redhat.com>
6919
6920 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6921 tracepoint.h.
6922 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6923 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6924 (handle_tracepoint_general_set, handle_tracepoint_query)
6925 (tracepoint_finished_step, tracepoint_was_hit)
6926 (release_while_stepping_state_list, current_traceframe)
6927 (in_readonly_region, traceframe_read_mem)
6928 (fetch_traceframe_registers, traceframe_read_sdata)
6929 (traceframe_read_info, struct fast_tpoint_collect_status)
6930 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6931 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6932 (supply_fast_tracepoint_registers)
6933 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6934 (ipa_tdesc, claim_trampoline_space)
6935 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6936 (agent_mem_read, agent_get_trace_state_variable_value)
6937 (agent_set_trace_state_variable_value, agent_tsv_read)
6938 (agent_mem_read_string, get_raw_reg_func_addr)
6939 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6940 * tracepoint.h: ... this new file.
6941
ff42e6ab
PA
69422013-09-05 Pedro Alves <palves@redhat.com>
6943
6944 * server.h (perror_with_name, error, fatal, warning, paddress)
6945 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6946 include it.
6947 * utils.h: New file.
6948
541af0f4
PA
69492013-09-05 Pedro Alves <palves@redhat.com>
6950
6951 * server.h (remote_debug, noack_mode, transport_is_reliable)
6952 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6953 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6954 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6955 (write_enn, initialize_async_io, enable_async_io)
6956 (disable_async_io, check_remote_input_interrupt_request)
6957 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6958 (dead_thread_notify, prepare_resume_reply)
6959 (decode_address_to_semicolon, decode_address, decode_m_packet)
6960 (decode_M_packet, decode_X_packet, decode_xfer_write)
6961 (decode_search_memory_packet, unhexify, hexify)
6962 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6963 (look_up_one_symbol, relocate_instruction)
6964 (monitor_output): Move to remote-utils.h, and include it.
6965 * remote-utils.h: New file.
6966
eebdf26b
PA
69672013-09-05 Pedro Alves <palves@redhat.com>
6968
6969 * server.h (_): Delete.
6970
3aafd2ff
PA
69712013-09-02 Pedro Alves <palves@redhat.com>
6972
6973 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6974 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6975 allocated.
6976 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6977
cee83bcb
PM
69782013-09-02 Pierre Muller <muller@sourceware.org>
6979
6980 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6981 or WriteProcessMemory complete successfully and handle
6982 ERROR_PARTIAL_COPY error.
6983
9a13b2fa
PA
69842013-09-02 Pedro Alves <palves@redhat.com>
6985
6986 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6987 error instead of EIO.
6988
602e3198
JK
69892013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6990
6991 PR server/15604
6992 * linux-low.c: Include filestuff.h.
6993 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6994 * lynx-low.c: Include filestuff.h.
6995 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6996 * server.c: Include filestuff.h.
6997 (main): Call notice_open_fds.
6998 * spu-low.c: Include filestuff.h.
6999 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7000
96d7229d
LM
70012013-08-22 Luis Machado <lgustavo@codesourcery.com>
7002
7003 * Makefile.in: Explain why ../target and ../nat are not
7004 listed as include file search paths.
7005 (linux-waitpid.o): New object file rule.
7006 * configure.srv (srv_native_linux_obj): New variable.
7007 Replace all occurrences of linux native object files with
7008 $srv_native_linux_obj.
7009 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7010 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7011 (linux_enable_event_reporting): Remove declaration.
7012 (my_waitpid): Moved to common/linux-waitpid.c.
7013 (linux_wait_for_event): Pass ptid when calling
7014 linux_enable_event_reporting.
7015 (linux_supports_tracefork_flag): Remove.
7016 (linux_enable_event_reporting): Likewise.
7017 (linux_tracefork_grandchild): Remove.
7018 (STACK_SIZE): Moved to common/linux-ptrace.c.
7019 (linux_tracefork_child): Remove.
7020 (linux_test_for_tracefork): Remove.
7021 (linux_look_up_symbols): Call linux_supports_traceclone.
7022 (initialize_low): Remove call to linux_test_for_tracefork.
7023 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7024 common/linux-ptrace.h.
7025 (PTRACE_TYPE_ARG4): Likewise.
7026 Include linux-ptrace.h.
7027
32940073
PA
70282013-08-21 Pedro Alves <palves@redhat.com>
7029
7030 * config.in: Renegerate.
7031
33b60d58 70322013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7033
33b60d58
LM
7034 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7035 (SFILES): Remove $(srcdir)/common/target-common.c and
7036 add $(srcdir)/target/waitstatus.c.
7037 (OBS): Remove target-common.o and add waitstatus.o.
7038 (server_h): Remove $(srcdir)/../common/target-common.h and
7039 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7040 and $(srcdir)/../target/waitstatus.h.
7041 (target-common.o): Remove.
7042 (waitstatus.o): New target object file.
7043 * target.h: Do not include target-common.h and
7044 include target/resume.h, target/wait.h and
7045 target/waitstatus.h.
7046
b8e1b30e
LM
70472013-08-13 Luis Machado <lgustavo@codesourcery.com>
7048
7049 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7050 to PTRACE_TYPE_ARG3.
7051 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7052 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7053 PTRACE_TYPE_ARG4.
7054 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7055 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7056
7a60ad40
YQ
70572013-07-27 Jie Zhang <jie@codesourcery.com>
7058 Daniel Jacobowitz <dan@codesourcery.com>
7059 Yao Qi <yao@codesourcery.com>
7060
7061 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7062 (mips-linux-watch.o): New rule.
7063 (mips_linux_watch_h): New variable.
7064 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7065 srv_tgtobj.
7066 * linux-mips-low.c: Include mips-linux-watch.h.
7067 (struct arch_process_info, struct arch_lwp_info): New.
7068 (update_watch_registers_callback): New function.
7069 (mips_linux_new_process, mips_linux_new_thread) New functions.
7070 (mips_linux_prepare_to_resume, mips_insert_point): New
7071 functions.
7072 (mips_remove_point, mips_stopped_by_watchpoint): New
7073 functions.
7074 (rsp_bp_type_to_target_hw_bp_type): New function.
7075 (mips_stopped_data_address): New function.
7076 (the_low_target): Add watchpoint support functions.
7077
de6f69ad
YQ
70782013-07-27 Yao Qi <yao@codesourcery.com>
7079
7080 * i386-low.c: Include break-common.h.
7081 (enum target_hw_bp_type): Remove.
7082
3360c0bf
LM
70832013-07-24 Luis Machado <lgustavo@codesourcery.com>
7084
7085 * Makefile.in (SFILES): /common/target-common.c.
7086 (OBS): Add target-common.o.
7087 (server_h): Add $(srcdir)/../common/target-common.h.
7088 (target-common.o): New target.
7089 * server.c (queue_stop_reply_callback): Free
7090 status string after use.
7091 * target.c (target_waitstatus_to_string): Remove.
7092 * target.h: Include target-common.h.
7093 (resume_kind): Likewise.
7094 (target_waitkind): Likewise.
7095 (target_waitstatus): Likewise.
7096 (TARGET_WNOHANG): Likewise.
7097
bd885420
YQ
70982013-07-04 Yao Qi <yao@codesourcery.com>
7099
7100 * Makefile.in (host_alias): Use @host_noncanonical@.
7101 (target_alias): Use @target_noncanonical@.
7102 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7103 ACX_NONCANONICAL_HOST.
7104 * configure: Regenerated.
7105
7106 Revert:
7107 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7108
7109 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7110 * configure: Rebuild.
7111 * Makefile.in (version_host, version_target): Get from configure.
7112 (version.c): Use $(version_host) and $(version_target).
7113
17ef446e
PA
71142013-07-03 Pedro Alves <palves@redhat.com>
7115
7116 * Makefile.in (config.status): Depend on development.sh.
7117 * acinclude.m4: Include libmcheck.m4.
7118 * configure: Regenerate.
7119
7a9a7487
MG
71202013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7121
7122 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7123 attribute inside the parentheses.
7124 (winapi_DebugSetProcessKillOnExit): Ditto.
7125 (winapi_DebugBreakProcess): Ditto.
7126 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7127
49b64de6
MG
71282013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7129
7130 * notif.h (notif_event): Add a dummy member to avoid compiler
7131 errors.
7132
d5749ee7
PA
71332013-07-01 Pedro Alves <palves@redhat.com>
7134
7135 * hostio.c (HOSTIO_PATH_MAX): Define.
7136 (require_filename, handle_open, handle_unlink, handle_readlink):
7137 Use it.
7138
d8d2a3ee
PA
71392013-07-01 Pedro Alves <palves@redhat.com>
7140
7141 * server.h: Include "pathmax.h".
7142 * linux-low.c: Don't include sys/param.h.
7143 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7144 MAXPATHLEN.
7145 * win32-low.c: Don't include sys/param.h.
7146 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7147
bc7dea8d
PA
71482013-07-01 Pedro Alves <palves@redhat.com>
7149
7150 * event-loop.c: Don't check HAVE_UNISTD_H before including
7151 <unistd.h>.
7152 * gdbreplay.c: Likewise.
7153 * remote-utils.c: Likewise.
7154 * server.c: Likewise.
7155 * configure.ac: Don't check for unistd.h.
7156 * configure: Regenerate.
7157
d6c2da54
TT
71582013-06-28 Tom Tromey <tromey@redhat.com>
7159
7160 * Makefile.in (version.c): Use version.in, not
7161 common/version.in.
7162
257b6bec
MG
71632013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7164
7165 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7166 * configure: Rebuild.
7167 * Makefile.in (version_host, version_target): Get from configure.
7168 (version.c): Use $(version_host) and $(version_target).
7169
86ebe149
DK
71702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7171
7172 Fix trace-status to output user name without trailing colon.
7173 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7174
f30aa5af
DK
71752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7176
7177 Fix trace-status to output proper start-time and stop-time.
7178 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7179 output start time and stop time in hex as gdb expects.
7180
28a93511
YQ
71812013-06-26 Pedro Alves <pedro@codesourcery.com>
7182
7183 * tracepoint.c (build_traceframe_info_xml): Output trace state
7184 variables present in the trace buffer.
7185
01208463
TT
71862013-06-24 Tom Tromey <tromey@redhat.com>
7187
7188 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7189 create-version.sh.
7190 (version.o): Remove.
7191 * gdbreplay.c: Include version.h.
7192 (version, host_name): Don't declare.
7193 * server.h: Include version.h.
7194 (version, host_name): Don't declare.
7195
760256f9
PA
71962013-06-12 Pedro Alves <palves@redhat.com>
7197
7198 * linux-x86-low.c (linux_is_elf64): Delete global.
7199 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7200 with local linux_pid_exe_is_elf_64_file use.
7201
030031ee
PA
72022013-06-11 Pedro Alves <palves@redhat.com>
7203
7204 * linux-low.c (regset_disabled, disable_regset): New functions.
7205 (regsets_fetch_inferior_registers)
7206 (regsets_store_inferior_registers): Use them.
7207 (initialize_regsets_info); Don't allocate the disabled_regsets
7208 array here.
7209 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7210 comment.
7211
5da6eb0a
PA
72122013-06-11 Pedro Alves <palves@redhat.com>
7213
7214 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7215 xmalloc.
7216
7e5aaa09
PA
72172013-06-11 Pedro Alves <palves@redhat.com>
7218
7219 * linux-x86-low.c (initialize_low_arch): Call
7220 init_registers_x32_avx_linux.
7221
d878444c
JK
72222013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7223
7224 Fix compatibility with Android Bionic.
7225 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7226 it is not empty.
7227
3aee8918
PA
72282013-06-07 Pedro Alves <palves@redhat.com>
7229
5f2b57b5 7230 PR server/14823
3aee8918
PA
7231 * Makefile.in (OBS): Add tdesc.o.
7232 (IPA_OBJS): Add tdesc-ipa.o.
7233 (tdesc-ipa.o): New rule.
7234 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7235 interface.
7236 * linux-low.c (new_inferior): Delete.
7237 (disabled_regsets, num_regsets): Delete.
7238 (linux_add_process): Adjust to set the new per-process
7239 new_inferior flag.
7240 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7241 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7242 was a stop. When calling arch_setup, switch the current inferior
7243 to the thread that got an event.
7244 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7245 (regsets_fetch_inferior_registers)
7246 (regsets_store_inferior_registers): New regsets_info parameter.
7247 Adjust to use it.
7248 (linux_register_in_regsets): New regs_info parameter. Adjust to
7249 use it.
7250 (register_addr, fetch_register, store_register): New usrregs_info
7251 parameter. Adjust to use it.
7252 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7253 parameter regs_info. Adjust to use it.
7254 (linux_fetch_registers): Get the current inferior's regs_info, and
7255 adjust to use it.
7256 (linux_store_registers): Ditto.
7257 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7258 (initialize_low): Don't initialize the target_regsets here. Call
7259 initialize_low_arch.
7260 * linux-low.h (target_regsets): Delete declaration.
7261 (struct regsets_info): New.
7262 (struct usrregs_info): New.
7263 (struct regs_info): New.
7264 (struct process_info_private) <new_inferior>: New field.
7265 (struct linux_target_ops): Delete the num_regs, regmap, and
7266 regset_bitmap fields. New field regs_info.
7267 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7268 * i387-fp.c (num_xmm_registers): Delete.
7269 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7270 calls to new interface.
7271 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7272 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7273 Infer the number of xmm registers from the regcache's target
7274 description.
7275 * i387-fp.h (num_xmm_registers): Delete.
7276 * inferiors.c (add_thread): Don't install the thread's regcache
7277 here.
7278 * proc-service.c (gregset_info): Fetch the current inferior's
7279 regs_info. Adjust to use it.
7280 * regcache.c: Include tdesc.h.
7281 (register_bytes, reg_defs, num_registers)
7282 (gdbserver_expedite_regs): Delete.
7283 (get_thread_regcache): If the thread doesn't have a regcache yet,
7284 create one, instead of aborting gdbserver.
7285 (regcache_invalidate_one): Rename to ...
7286 (regcache_invalidate_thread): ... this.
7287 (regcache_invalidate_one): New.
7288 (regcache_invalidate): Only invalidate registers of the current
7289 process.
7290 (init_register_cache): Add target_desc parameter, and use it.
7291 (new_register_cache): Ditto. Assert the target description has a
7292 non zero registers_size.
7293 (regcache_cpy): Add assertions. Adjust.
7294 (realloc_register_cache, set_register_cache): Delete.
7295 (registers_to_string, registers_from_string): Adjust.
7296 (find_register_by_name, find_regno, find_register_by_number)
7297 (register_cache_size): Add target_desc parameter, and use it.
7298 (free_register_cache_thread, free_register_cache_thread_one)
7299 (regcache_release, register_cache_size): New.
7300 (register_size): Add target_desc parameter, and use it.
7301 (register_data, supply_register, supply_register_zeroed)
7302 (supply_regblock, supply_register_by_name, collect_register)
7303 (collect_register_as_string, collect_register_by_name): Adjust.
7304 * regcache.h (struct target_desc): Forward declare.
7305 (struct regcache) <tdesc>: New field.
7306 (init_register_cache, new_register_cache): Add target_desc
7307 parameter.
7308 (regcache_invalidate_thread): Declare.
7309 (regcache_invalidate_one): Delete declaration.
7310 (regcache_release): Declare.
7311 (find_register_by_number, register_cache_size, register_size)
7312 (find_regno): Add target_desc parameter.
7313 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7314 declarations.
7315 * remote-utils.c: Include tdesc.h.
7316 (outreg, prepare_resume_reply): Adjust.
7317 * server.c: Include tdesc.h.
7318 (gdbserver_xmltarget): Delete declaration.
7319 (get_features_xml, process_serial_event): Adjust.
7320 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7321 declare.
7322 (struct process_info) <tdesc>: New field.
7323 (ipa_tdesc): Declare.
7324 * tdesc.c: New file.
7325 * tdesc.h: New file.
7326 * tracepoint.c: Include tdesc.h.
7327 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7328 (get_context_regcache): Adjust to pass ipa_tdesc down.
7329 (do_action_at_tracepoint): Adjust to get the register cache size
7330 from the context regcache's description.
7331 (traceframe_walk_blocks): Adjust to get the register cache size
7332 from the current trace frame's description.
7333 (traceframe_get_pc): Adjust to get current trace frame's
7334 description and pass it down.
7335 (gdb_collect): Adjust to get the register cache size from the
7336 IPA's description.
7337 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7338 (gdbserver_xmltarget): Delete.
7339 (initialize_low_tracepoint): Set the ipa's target description.
7340 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7341 (initialize_low_tracepoint): Set the ipa's target description.
7342 * linux-x86-low.c: Include tdesc.h.
7343 [__x86_64__] (is_64bit_tdesc): New.
7344 (ps_get_thread_area, x86_get_thread_area): Use it.
7345 (i386_cannot_store_register): Rename to ...
7346 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7347 (i386_cannot_fetch_register): Rename to ...
7348 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7349 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7350 to new interface.
7351 (target_regsets): Rename to ...
7352 (x86_regsets): ... this.
7353 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7354 interface.
7355 (x86_siginfo_fixup): Use is_64bit_tdesc.
7356 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7357 (tdesc_x32_avx_linux, tdesc_x32_linux)
7358 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7359 Declare.
7360 (x86_linux_update_xmltarget): Delete.
7361 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7362 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7363 (AMD64_LINUX_USER64_CS): New.
7364 (x86_linux_read_description): New, based on
7365 x86_linux_update_xmltarget.
7366 (same_process_callback): New.
7367 (x86_arch_setup_process_callback): New.
7368 (x86_linux_update_xmltarget): New.
7369 (x86_regsets_info): New.
7370 (amd64_linux_regs_info): New.
7371 (i386_linux_usrregs_info): New.
7372 (i386_linux_regs_info): New.
7373 (x86_linux_regs_info): New.
7374 (x86_arch_setup): Reimplement.
7375 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7376 (x86_emit_ops): Ditto.
7377 (the_low_target): Adjust. Install x86_linux_regs_info,
7378 x86_cannot_fetch_register, and x86_cannot_store_register.
7379 (initialize_low_arch): New.
7380 * linux-ia64-low.c (tdesc_ia64): Declare.
7381 (ia64_fetch_register): Adjust.
7382 (ia64_usrregs_info, regs_info): New globals.
7383 (ia64_regs_info): New function.
7384 (the_low_target): Adjust.
7385 (initialize_low_arch): New function.
7386 * linux-sparc-low.c (tdesc_sparc64): Declare.
7387 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7388 Adjust.
7389 (sparc_arch_setup): New function.
7390 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7391 (the_low_target): Adjust.
7392 (initialize_low_arch): New function.
7393 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7394 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7395 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7396 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7397 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7398 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7399 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7400 (tdesc_powerpc_isa205_vsx64l): Declare.
7401 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7402 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7403 (ppc_set_pc, ppc_get_hwcap): Adjust.
7404 (ppc_usrregs_info): Forward declare.
7405 (!__powerpc64__) ppc_regmap_adjusted: New global.
7406 (ppc_arch_setup): Adjust to the current process'es target
7407 description.
7408 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7409 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7410 (ppc_store_evrregset): Adjust.
7411 (target_regsets): Rename to ...
7412 (ppc_regsets): ... this, and make static.
7413 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7414 (ppc_regs_info): New function.
7415 (the_low_target): Adjust.
7416 (initialize_low_arch): New function.
7417 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7418 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7419 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7420 (tdesc_s390x_linux64v2): Declare.
7421 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7422 (s390_fill_gregset, s390_store_last_break): Adjust.
7423 (target_regsets): Rename to ...
7424 (s390_regsets): ... this, and make static.
7425 (s390_get_pc, s390_set_pc): Adjust.
7426 (s390_get_hwcap): New target_desc parameter, and use it.
7427 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7428 (s390_arch_setup): Adjust to set the current process'es target
7429 description. Don't adjust the regmap.
7430 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7431 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7432 (regs_info_3264): New globals.
7433 (s390_regs_info): New function.
7434 (the_low_target): Adjust.
7435 (initialize_low_arch): New function.
7436 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7437 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7438 [__mips64] (init_registers_mips_linux)
7439 (init_registers_mips_dsp_linux): Delete defines.
7440 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7441 (have_dsp): New global.
7442 (mips_read_description): New, based on mips_arch_setup.
7443 (mips_arch_setup): Reimplement.
7444 (get_usrregs_info): New function.
7445 (mips_cannot_fetch_register, mips_cannot_store_register)
7446 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7447 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7448 (target_regsets): Rename to ...
7449 (mips_regsets): ... this, and make static.
7450 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7451 (dsp_regs_info, regs_info): New globals.
7452 (mips_regs_info): New function.
7453 (the_low_target): Adjust.
7454 (initialize_low_arch): New function.
7455 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7456 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7457 Declare.
7458 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7459 (arm_read_description): New, with bits factored from
7460 arm_arch_setup.
7461 (arm_arch_setup): Reimplement.
7462 (target_regsets): Rename to ...
7463 (arm_regsets): ... this, and make static.
7464 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7465 (arm_regs_info): New function.
7466 (the_low_target): Adjust.
7467 (initialize_low_arch): New function.
7468 * linux-m68k-low.c (tdesc_m68k): Declare.
7469 (target_regsets): Rename to ...
7470 (m68k_regsets): ... this, and make static.
7471 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7472 (m68k_regs_info): New function.
7473 (m68k_arch_setup): New function.
7474 (the_low_target): Adjust.
7475 (initialize_low_arch): New function.
7476 * linux-sh-low.c (tdesc_sharch): Declare.
7477 (target_regsets): Rename to ...
7478 (sh_regsets): ... this, and make static.
7479 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7480 (sh_regs_info, sh_arch_setup): New functions.
7481 (the_low_target): Adjust.
7482 (initialize_low_arch): New function.
7483 * linux-bfin-low.c (tdesc_bfin): Declare.
7484 (bfin_arch_setup): New function.
7485 (bfin_usrregs_info, regs_info): New globals.
7486 (bfin_regs_info): New function.
7487 (the_low_target): Adjust.
7488 (initialize_low_arch): New function.
7489 * linux-cris-low.c (tdesc_cris): Declare.
7490 (cris_arch_setup): New function.
7491 (cris_usrregs_info, regs_info): New globals.
7492 (cris_regs_info): New function.
7493 (the_low_target): Adjust.
7494 (initialize_low_arch): New function.
7495 * linux-cris-low.c (tdesc_crisv32): Declare.
7496 (cris_arch_setup): New function.
7497 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7498 (cris_regs_info): New function.
7499 (the_low_target): Adjust.
7500 (initialize_low_arch): New function.
7501 * linux-m32r-low.c (tdesc_m32r): Declare.
7502 (m32r_arch_setup): New function.
7503 (m32r_usrregs_info, regs_info): New globals.
7504 (m32r_regs_info): Adjust.
7505 (initialize_low_arch): New function.
7506 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7507 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7508 (tic6x_usrregs_info): Forward declare.
7509 (tic6x_read_description): New function, based on ...
7510 (tic6x_arch_setup): ... this. Reimplement.
7511 (target_regsets): Rename to ...
7512 (tic6x_regsets): ... this, and make static.
7513 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7514 (tic6x_regs_info): New function.
7515 (the_low_target): Adjust.
7516 (initialize_low_arch): New function.
7517 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7518 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7519 (target_regsets): Rename to ...
7520 (xtensa_regsets): ... this, and make static.
7521 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7522 globals.
7523 (xtensa_arch_setup, xtensa_regs_info): New functions.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7527 (nios2_arch_setup): Set the current process'es tdesc.
7528 (target_regsets): Rename to ...
7529 (nios2_regsets): ... this.
7530 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7531 (nios2_regs_info): New function.
7532 (the_low_target): Adjust.
7533 (initialize_low_arch): New function.
a261b8f5
PA
7534 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7535 (aarch64_arch_setup): Set the current process'es tdesc.
7536 (target_regsets): Rename to ...
7537 (aarch64_regsets): ... this.
7538 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7539 (aarch64_regs_info): New function.
7540 (the_low_target): Adjust.
7541 (initialize_low_arch): New function.
3aee8918
PA
7542 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7543 globals.
7544 (target_regsets): Rename to ...
7545 (tile_regsets): ... this.
7546 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7547 (tile_regs_info): New function.
7548 (tile_arch_setup): Set the current process'es tdesc.
7549 (the_low_target): Adjust.
7550 (initialize_low_arch): New function.
7551 * spu-low.c (tdesc_spu): Declare.
7552 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7553 * win32-arm-low.c (tdesc_arm): Declare.
7554 (arm_arch_setup): New function.
7555 (the_low_target): Install arm_arch_setup instead of
7556 init_registers_arm.
7557 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7558 (init_windows_x86): Rename to ...
7559 (i386_arch_setup): ... this. Set `win32_tdesc'.
7560 (the_low_target): Adjust.
7561 * win32-low.c (win32_tdesc): New global.
7562 (child_add_thread): Don't create the thread cache here.
7563 (do_initial_child_stuff): Set the new process'es tdesc.
7564 * win32-low.h (struct target_desc): Forward declare.
7565 (win32_tdesc): Declare.
7566 * lynx-i386-low.c (tdesc_i386): Declare global.
7567 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7568 * lynx-low.c (lynx_tdesc): New global.
7569 (lynx_add_process): Set the new process'es tdesc.
7570 * lynx-low.h (struct target_desc): Forward declare.
7571 (lynx_tdesc): Declare global.
7572 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7573 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7574 * nto-low.c (nto_tdesc): New global.
7575 (do_attach): Set the new process'es tdesc.
7576 * nto-low.h (struct target_desc): Forward declare.
7577 (nto_tdesc): Declare.
7578 * nto-x86-low.c (tdesc_i386): Declare.
7579 (nto_x86_arch_setup): Set `nto_tdesc'.
7580
b1fbec62
GB
75812013-06-04 Gary Benson <gbenson@redhat.com>
7582
7583 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7584 to qSupported response when appropriate.
7585 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7586 with nonzero-length annex.
7587 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7588 arguments supplied in annex.
7589
d1ec4ce7
DE
75902013-05-31 Doug Evans <dje@google.com>
7591
ac44adcb 7592 PR server/15594
d1ec4ce7
DE
7593 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7594 64 bits in 64-cross-32 environment.
7595
9b25f2d3
PA
75962013-05-28 Pedro Alves <palves@redhat.com>
7597
7598 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7599 (aarch64-without-fpu.c): Delete rule.
7600 * configure.srv (aarch64*-*-linux*): Remove references to
7601 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7602 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7603 declaration.
7604
6740dc9c
PA
76052013-05-24 Pedro Alves <palves@redhat.com>
7606
7607 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7608 instead of strchr/decode_address. Error if the range isn't split
7609 with a ','. Don't assume there's be a ':' in the action.
7610
c2d6af84
PA
76112013-05-23 Yao Qi <yao@codesourcery.com>
7612 Pedro Alves <palves@redhat.com>
7613
7614 * linux-low.c (lwp_in_step_range): New function.
7615 (linux_wait_1): If the thread was range stepping and stopped
7616 outside the stepping range, report the stop to GDB. Otherwise,
7617 continue stepping. Add range stepping debug output.
7618 (linux_set_resume_request): Copy the step range from the resume
7619 request to the lwp.
7620 (linux_supports_range_stepping): New.
7621 (linux_target_ops) <supports_range_stepping>: Set to
7622 linux_supports_range_stepping.
7623 * linux-low.h (struct linux_target_ops)
7624 <supports_range_stepping>: New field.
7625 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7626 * linux-x86-low.c (x86_supports_range_stepping): New.
7627 (the_low_target) <supports_range_stepping>: Set to
7628 x86_supports_range_stepping.
7629 * server.c (handle_v_cont): Handle 'r' action.
7630 (handle_v_requests): Append ";r" if the target supports range
7631 stepping.
7632 * target.h (struct thread_resume) <step_range_start,
7633 step_range_end>: New fields.
7634 (struct target_ops) <supports_range_stepping>:
7635 New field.
7636 (target_supports_range_stepping): New macro.
7637
58794e1a
JB
76382013-05-17 Joel Brobecker <brobecker@adacore.com>
7639
7640 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7641 confusion in comment.
7642
d631c5a7
JB
76432013-05-17 Joel Brobecker <brobecker@adacore.com>
7644
7645 * lynx-low.c (struct process_info_private): New type.
7646 (lynx_add_process): New function.
7647 (lynx_create_inferior, lynx_attach): Replace calls to
7648 add_process by calls to lynx_add_process.
7649 (lynx_resume): If PTID is null, then try using
7650 current_process()->private->last_wait_event_ptid.
7651 Add comments.
7652 (lynx_clear_inferiors): Delete. The contents of that function
7653 has been inlined in lynx_mourn;
7654 (lynx_wait_1): Save the ptid in the process's private data.
7655 (lynx_mourn): Free the process' private data. Replace call
7656 to lynx_clear_inferiors by call to clear_inferiors.
7657
96f7a20f
YQ
76582013-05-17 Yao Qi <yao@codesourcery.com>
7659
7660 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7661 the right place.
7662
db0dfaa0
LM
76632013-05-16 Luis Machado <lgustavo@codesourcery.com>
7664
7665 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7666 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7667 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7668 PT_TEXT_END_ADDR guards. Update comments.
7669 (linux_target_op) <read_offsets>: Conditionally define to
7670 linux_read_offsets if the target is UCLIBC and if it defines
7671 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7672
68f5f838
SL
76732013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7674 Andrew Jenner <andrew@codesourcery.com>
7675
7676 * Makefile.in (SFILES): Add linux-nios2-low.c.
7677 (clean): Add action to delete nios2-linux.c.
7678 (nios2-linux.c): New rule.
7679 * configure.srv: Add nios2*-*-linux*.
7680 * linux-nios2-low.c: New.
7681
1ebff1fd
HAQ
76822013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7683
7684 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7685
f6150862
HZ
76862013-04-25 Hui Zhu <hui@codesourcery.com>
7687
7688 PR gdb/15186
f6150862
HZ
7689 * ax.c (ax_printf): Add fflush.
7690
614c279d
TT
76912013-04-22 Tom Tromey <tromey@redhat.com>
7692
7693 * Makefile.in (SFILES): Add filestuff.c.
7694 (OBS): Add filestuff.o.
7695 (filestuff.o): New target.
7696 * config.in, configure: Rebuild.
7697 * configure.ac: Check for fdwalk, pipe2.
7698
7d4e5717
PA
76992013-04-17 Pedro Alves <palves@redhat.com>
7700
7701 * configure.ac (USE_THREAD_DB): Delete variable.
7702 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7703 Don't AC_SUBST USE_THREAD_DB.
7704 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7705 * config.in, configure: Regenerate.
7706
d5c93e41
PA
77072013-04-16 Pedro Alves <palves@redhat.com>
7708
7709 * linux-low.h (struct lwp_info) <thread_known>: Move under
7710 the USE_THREAD_DB #ifdef.
7711
04f5fe89
PA
77122013-04-16 Pedro Alves <palves@redhat.com>
7713
7714 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7715 (linux-low.o): Delete rule.
7716 * linux-low.h: Always include "gdb_thread_db.h" instead of
7717 conditionally including thread_db.h.
7718 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7719 HAVE_THREAD_DB_H.
7720
480b27bf
JK
77212013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7722
7723 * Makefile.in (install-only): Fix make install regression.
7724
43662968
JK
77252013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7728 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7729 installation.
7730 * gdbserver.1: Remove.
7731
3e74e146
PA
77322013-03-22 Pedro Alves <palves@redhat.com>
7733
7734 * linux-low.c (handle_extended_wait): Don't call
7735 linux_enable_event_reporting.
7736
a8347a2a
TT
77372013-03-15 Tony Theodore <tonyt@logyst.com>
7738
7739 PR build/9098:
7740 * Makefile.in (SHELL): Use @SHELL@.
7741
eeb56fa7
SDJ
77422013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7743
7744 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7745 compiler warning.
7746
4fa7e2ff
JB
77472013-03-13 Joel Brobecker <brobecker@adacore.com>
7748
7749 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7750 Remove extraneous NULL element.
7751
8ddb1965
YQ
77522013-03-13 Yao Qi <yao@codesourcery.com>
7753
7754 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7755 'V' block in trace frame.
7756
9accd112
MM
77572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7758
7759 * target.h (struct target_ops): Add btrace ops.
7760 (target_supports_btrace): New macro.
7761 (target_enable_btrace): New macro.
7762 (target_disable_btrace): New macro.
7763 (target_read_btrace): New macro.
7764 * gdbthread.h (struct thread_info): Add btrace field.
7765 * server.c: Include btrace-common.h.
7766 (handle_btrace_general_set): New function.
7767 (handle_btrace_enable): New function.
7768 (handle_btrace_disable): New function.
7769 (handle_general_set): Call handle_btrace_general_set.
7770 (handle_qxfer_btrace): New function.
7771 (struct qxfer qxfer_packets[]): Add btrace entry.
7772 * inferiors.c (remove_thread): Disable btrace.
7773 * linux-low: Include linux-btrace.h.
7774 (linux_low_enable_btrace): New function.
7775 (linux_low_read_btrace): New function.
7776 (linux_target_ops): Add btrace ops.
7777 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7778 Add srv_linux_btrace=yes.
7779 (x86_64-*-linux*): Add linux-btrace.o.
7780 Add srv_linux_btrace=yes.
7781 * configure.ac: Define HAVE_LINUX_BTRACE.
7782 * config.in: Regenerated.
7783 * configure: Regenerated.
7784
5cc22e4c
MM
77852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7786
7787 * server.c (handle_qxfer): Preserve error message if -3 is
7788 returned.
7789 (qxfer): Document the -3 return value.
7790
7c97f91e
MM
77912013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7792
7793 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7794 (linux_btrace_h): New variable.
7795 (linux-btrace.o): New rule.
7796
be9a119c 77972013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7798 Hafiz Abid Qadeer <abidh@codesourcery.com>
7799
7800 * tracepoint.c (trace_buffer_size): New global.
7801 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7802 (init_trace_buffer): Change to one-argument function. Allocate
7803 trace buffer memory.
7804 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7805 handle QTBuffer:size packet.
7806 (cmd_bigqtbuffer_size): New function.
7807 (initialize_tracepoint): Call init_trace_buffer with
7808 DEFAULT_TRACE_BUFFER_SIZE.
7809 * server.c (handle_query): Add QTBuffer:size in the
7810 supported packets.
7811
e64f7499
YQ
78122013-03-07 Yao Qi <yao@codesourcery.com>
7813
7814 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7815 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7816 of -1.
7817 (cmd_qtsp): Adjust condition. Do post increment.
7818 Set cur_action and cur_step_action back to 0.
7819
f0ae6fc3
PA
78202013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7821
7822 PR server/15236
7823 * linux-low.c (linux_write_memory): Return early success if LEN is
7824 zero.
7825
b5b0b0af
CV
78262013-03-05 Corinna Vinschen <vinschen@redhat.de>
7827
334ad4a8 7828 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7829
589bc927
TT
78302013-02-28 Tom Tromey <tromey@redhat.com>
7831
7832 * configure.ac: Invoke AC_SYS_LARGEFILE.
7833 * configure, config.in: Rebuild.
7834
dfe07582
CV
78352013-02-28 Corinna Vinschen <vinschen@redhat.com>
7836
7837 * win32-low.c: Throughout, fix format strings and casts of
7838 printf-like functions to avoid type related warnings on all
7839 platforms.
7840 (get_child_debug_event): Print dwDebugEventCode as hex since
7841 that's how it's usually documented.
7842
736cd585
YQ
78432013-02-28 Yao Qi <yao@codesourcery.com>
7844
7845 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7846 pulongest.
7847
e1f58301
JW
78482013-02-27 Jiong Wang <jiwang@tilera.com>
7849
7850 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7851 (reg-tilegx32.c): New rule.
7852 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7853 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7854 different register info initializer according to elf class.
7855 (init_registers_tilgx32): New function. The tilegx32 register info
7856 initializer.
7857 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7858 (tile_store_gregset): Likewise.
7859
d171ca78
YQ
78602013-02-27 Yao Qi <yao@codesourcery.com>
7861
7862 * server.c (process_point_options): Print debug message when
7863 debug_threads is true.
7864
282bbdf3
YQ
78652013-02-26 Yao Qi <yao@codesourcery.com>
7866
7867 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7868
aca22551
PA
78692013-02-19 Pedro Alves <palves@redhat.com>
7870 Kai Tietz <ktietz@redhat.com>
7871
7872 PR gdb/15161
7873
7874 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7875 instead of strtoul to extract address from packet.
7876 (process_serial_event) <'z'>: Likewise.
7877
4f3cee1c
YQ
78782013-02-18 Yao Qi <yao@codesourcery.com>
7879
7880 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7881
8e1d55a3
PA
78822013-02-14 Pedro Alves <palves@redhat.com>
7883
7884 Plug memory leak.
7885
7886 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7887 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7888
458820da
PA
78892013-02-14 Pedro Alves <palves@redhat.com>
7890
7891 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7892
baea0dae
PA
78932013-02-14 Pedro Alves <palves@redhat.com>
7894
7895 * tracepoint.c (save_string): Delete.
7896 (add_tracepoint_action): Use savestring instead of save_string.
7897
0b1afbb3
PA
78982013-02-12 Pedro Alves <palves@redhat.com>
7899
7900 * linux-xtensa-low.c: Ditto.
7901 * xtensa-xtregs.c: Ditto.
7902
8a4ac37e
PA
79032013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7904
7905 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7906 thread_db.
7907
148de6bb
MS
79082013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7909
7910 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7911 aarch64_num_wp_regs and aarch64_num_bp_regs to
7912 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7913
55fac6e0
MS
79142013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7915
7916 * linux-aarch64-low.c (ps_get_thread_area): Replace
7917 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7918
176eb98c
MS
79192013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7920 Marcus Shawcroft <marcus.shawcroft@arm.com>
7921 Nigel Stephens <nigel.stephens@arm.com>
7922 Yufeng Zhang <yufeng.zhang@arm.com>
7923
7924 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7925 (aarch64.c, aarch64-without-fpu.c): New targets.
7926 * configure.srv (aarch64*-*-linux*): New.
7927 * linux-aarch64-low.c: New file.
7928
56f7af9c
MS
79292013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7930
43aaf8b6 7931 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7932 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7933 (dequeue_one_deferred_signal, linux_resume_one_thread)
7934 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7935 (linux_tracefork_grandchild, linux_test_for_tracefork)
7936 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7937 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7938 where the argument is 0.
7939
60f662b0
YQ
79402013-01-25 Yao Qi <yao@codesourcery.com>
7941
7942 * event-loop.c: Include "queue.h".
7943 (gdb_event_p): New typedef.
7944 (struct gdb_event) <next_event>: Remove.
7945 (event_queue): Change to QUEUE(gdb_event_p).
7946 (async_queue_event): Remove.
7947 (gdb_event_xfree): New.
7948 (initialize_event_loop): New.
7949 (process_event): Use API from QUEUE.
7950 (wait_for_event): Likewise.
7951 * server.c (main): Call initialize_event_loop.
7952 * server.h (initialize_event_loop): Declare.
7953
5ae4861a
YQ
79542013-01-18 Yao Qi <yao@codesourcery.com>
7955
7956 * ax.h (struct eval_agent_expr_context): New.
7957 (gdb_eval_agent_expr): Update declaration.
7958 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7959 TFRAME. Add new argument CTX.
7960 * server.h (struct eval_agent_expr_context): Declare.
7961 (agent_mem_read, agent_tsv_read): Update declaration.
7962 (agent_mem_read_string): Likewise.
7963 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7964 (add_traceframe_block): Add new argument TPOINT.
7965 Increase TPOINT->traceframe_usage.
7966 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7967 eval_tracepoint_agent_expr.
7968 (condition_true_at_tracepoint): Likewise.
7969 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7970 (agent_mem_read_string, agent_tsv_read): Likewise.
7971
85e00e85
YQ
79722013-01-16 Yao Qi <yao@codesourcery.com>
7973
7974 * linux-low.c (linux_resume_one_lwp): Don't check
7975 'lwp->bp_reinsert != 0'.
7976
4039cf45
JB
79772013-01-07 Joel Brobecker <brobecker@adacore.com>
7978 Pedro Alves <palves@redhat.com>
7979
7980 * lynx-low.c (ptrace_request_to_str): Define a temporary
7981 macro and use it to simplify this function's implementation.
7982
9044dee2
JB
79832013-01-07 Joel Brobecker <brobecker@adacore.com>
7984
7985 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7986 sets errno.
7987
e6352c8f
JB
79882013-01-07 Joel Brobecker <brobecker@adacore.com>
7989
7990 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7991
50681a27
JB
79922013-01-07 Joel Brobecker <brobecker@adacore.com>
7993
7994 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7995
3f6e77ef
JB
79962013-01-07 Joel Brobecker <brobecker@adacore.com>
7997
7998 * lynx-low.c (lynx_resume): Use the resume_info parameter
7999 to determine the ptid for the lynx_ptrace call, unless
8000 it is equal to minus_one_ptid, in which case we use the
8001 ptid of the current_inferior.
8002 (lynx_wait_1): After having received a thread create/exit
8003 event, resume the inferior's execution using the signaling
8004 thread's ptid, rather than the old ptid.
8005
7fda33ae
JB
80062013-01-07 Joel Brobecker <brobecker@adacore.com>
8007
8008 * lynx-low.c (lynx_resume): Delete variable ret.
8009
b9786c74
JB
80102013-01-01 Joel Brobecker <brobecker@adacore.com>
8011
8012 * gdbreplay.c (gdbreplay_version): Update copyright year.
8013 * server.c (gdbserver_version): Likewise.
8014
8b93d60f
JB
80152012-12-17 Joel Brobecker <brobecker@adacore.com>
8016
8017 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8018 new thread.
8019
037335a7
JB
80202012-12-17 Joel Brobecker <brobecker@adacore.com>
8021
8022 * lynx-low.c (ptrace_request_to_str): Add handling for
8023 PTRACE_GETTRACESIG.
8024
52d4cbd8
JB
80252012-12-17 Joel Brobecker <brobecker@adacore.com>
8026
8027 * lynx-low.c (lynx_attach): Delete variable new_process.
8028
ab8f6ca9
JB
80292012-12-17 Joel Brobecker <brobecker@adacore.com>
8030
8031 * lynx-low.c (lynx_create_inferior): Delete variable
8032 new_process.
8033
78cbc024
JB
80342012-12-17 Joel Brobecker <brobecker@adacore.com>
8035
8036 * lynx-low.c (ptrace_request_to_str): Do not handle
8037 PTRACE_GETTHREADLIST if this macro does not exist.
8038
14a00470
YQ
80392012-12-15 Yao Qi <yao@codesourcery.com>
8040
8041 * Makefile.in (OBS): Add notif.o.
8042 * notif.c, notif.h: New.
8043 * server.c: Include "notif.h".
8044 (struct vstop_notif) <next>: Remove.
8045 <base>: New field.
8046 (queue_stop_reply): Update.
8047 (push_event, send_next_stop_reply): Remove.
8048 (discard_queued_stop_replies): Update.
8049 (notif_stop): New variable.
8050 (handle_v_stopped): Remove.
8051 (handle_v_requests): Don't call handle_v_stopped. Call
8052 handle_ack_notif instead.
8053 (queue_stop_reply_callback): Call notif_event_enque instead
8054 of queue_stop_reply.
8055 (handle_status): Don't call send_next_stop_reply, call
8056 notif_write_event instead.
8057 (kill_inferior_callback): Likewise.
8058 (detach_or_kill_inferior_callback): Likewise.
8059 (main): Call initialize_notif.
8060 (process_serial_event): Call QUEUE_is_empty.
8061 (handle_target_event): Call notif_push instead of push event.
8062 * server.h (push_event): Remove declaration.
8063
61c125b9
TT
80642012-12-10 Tom Tromey <tromey@redhat.com>
8065
8066 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8067 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8068 macros.
8069 (.c.o): Rewrite.
8070 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8071 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8072 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8073 (amd64-linux-ipa.o, ax.o): Rewrite.
8074 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8075 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8076 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8077 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8078 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8079 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8080 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8081 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8082 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8083 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8084 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8085 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8086 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8087 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8088 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8089 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8090 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8091 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8092 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8093 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8094 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8095 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8096 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8097 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8098 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8099 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8100 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8101 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8102 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8103 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8104 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8105 (reg-tilegx.o): Remove.
8106 (all_object_files): New macro.
8107 Include .deps files.
8108 * aclocal.m4, configure: Rebuild.
8109 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8110 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8111 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8112
e90e9ad9
TT
81132012-12-05 Tom Tromey <tromey@redhat.com>
8114
8115 PR gdb/14917:
8116 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8117
02d403bf 81182012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8119
8120 * configure.ac: Check for linux/perf_event.h.
8121 * config.in: Regenerated.
8122 * configure: Regenerated.
8123
0270a750
PA
81242012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8125
8126 * hostio.c (handle_readlink): Decrease buffer size
8127 parameter passed to readlink by one byte.
8128
8c29b58e
YQ
81292012-11-26 Yao Qi <yao@codesourcery.com>
8130
8131 * configure.ac (build_warnings): Append '-Wempty-body'.
8132 * configure: Regenerated.
8133 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8134 body.
8135
8bdce1ff
PM
81362012-11-15 Pierre Muller <muller@sourceware.org>
8137
8138 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8139 * config.in: Regenerate.
8140 * configure: Regenerate.
8141 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8142 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8143 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8144 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8145 header.
8146 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8147 instead of <sys/wait.h> header.
8148 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8149
02d403bf 81502012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8151
8152 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8153 (various make rules): Remove -DGDBSERVER
8154
fbd5db48
YQ
81552012-11-09 Yao Qi <yao@codesourcery.com>
8156
8157 * spu-low.c (current_ptid): Move it to ..
8158 * gdbthread.h: ... here. New.
8159 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8160 * server.c (myresume, process_serial_event): Likewise.
8161 * thread-db.c (thread_db_find_new_threads): Likewise.
8162 * tracepoint.c (run_inferior_command): Likewise.
8163
b3dc46ff
AB
81642012-10-01 Andrew Burgess <aburgess@broadcom.com>
8165
8166 * server.c (handle_search_memory_1): Include access length in
8167 warning message.
8168
07c04788
HPN
81692012-09-05 Michael Brandt <michael.brandt@axis.com>
8170
8171 * linux-crisv32-low.c: Fix compile errors.
8172
918d227b
YQ
81732012-09-04 Yao Qi <yao@codesourcery.com>
8174
8175 * tracepoint.c (cmd_qtsv): Adjust debug message.
8176 Don't check CUR_TPOINT.
8177
18c1b81a
YQ
81782012-08-28 Yao Qi <yao@codesourcery.com>
8179
8180 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8181 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8182 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8183 Remove declarations of xmalloc, xreallloc, xstrdup and
8184 freeargv.
8185 * Makefile.in (libiberty_h): New.
8186 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8187 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8188
dc82f37b
YQ
81892012-08-23 Yao Qi <yao@codesourcery.com>
8190
8191 * server.h: Remove declaration of 'xsnprintf'.
8192
406b1477
KS
81932012-08-22 Keith Seitz <keiths@redhat.com>
8194
8195 * server.h: Include build-gnulib-gbserver/config.h.
8196 * gdbreplay.c: Likewise.
8197
e6712ff1
DE
81982012-08-08 Doug Evans <dje@google.com>
8199
8200 * Makefile.in (SFILES): Add gdb_vecs.c.
8201 (OBS): Add gdb_vecs.o.
8202 (gdb_vecs_h, host_defs_h): New variables.
8203 (thread-db.o): Add $(gdb_vecs_h) dependency.
8204 (gdb_vecs.o): New rule.
8205 * thread-db.c: #include "gdb_vecs.h".
8206 (thread_db_load_search): Use a vector to iterate over path elements.
8207 Handle text appearing after "$pdir".
8208
8209 * configure.ac: Add check for strstr.
8210 * config.in: Regenerate.
8211 * configure: Regenerate.
8212
7c3270ae
UW
82132012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8214
8215 * hostio.c (handle_pread): If pread fails, fall back to attempting
8216 lseek/read.
8217 (handle_pwrite): Likewise for pwrite.
8218
b62e2b27
UW
82192012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8220
8221 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8222 between unsupported TYPE and unimplementable ADDR/LEN combination.
8223 (arm_insert_point): Act on new return value.
8224
78a99e91
PA
82252012-07-31 Pedro Alves <palves@redhat.com>
8226
8227 * server.c (process_point_options): Only skip tokens if we find
8228 one that is unrecognized. Don't treat 'X' specially while
8229 skipping unrecognized tokens.
8230
fcf303ab
UW
82312012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8232
8233 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8234 to 4-byte-align HW breakpoint addresses for Thumb.
8235
7255706c
YQ
82362012-07-27 Yao Qi <yao@codesourcery.com>
8237
8238 PR remote/14161.
8239
8240 * server.h: Declare gdb_agent_about_to_close.
8241 * target.c (kill_inferior): Include "agent.h".
8242 New. Send command 'kill'.
8243 * target.h (kill_inferior): Removed macro.
8244 * tracepoint.c (gdb_agent_about_to_close): New.
8245 (gdb_agent_helper_thread): Handle command 'close'.
8246 Wait endlessly until the inferior stops.
8247 Install gdb_agent_remove_socket to atexit hook.
8248 (agent_socket_name): New static variable.
8249 (gdb_agent_socket_init): Replace local variable 'name' with
8250 'agent_socket_name'.
8251 (gdb_agent_remove_socket): New.
8252
5a3f286f
YQ
82532012-07-27 Yao Qi <yao@codesourcery.com>
8254
8255 * server.c (process_point_options): Stop at 'X' when parsing.
8256
961bd387
ME
82572012-07-19 Michael Eager <eager@eagercon.com>
8258
a261b8f5 8259 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8260 to hw_execute.
8261 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8262 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8263 hardware breakpoint.
8264
aa7c7447
JK
82652012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8266
8267 * gdbserver/linux-low.c (initialize_low): Call
8268 linux_ptrace_init_warnings.
8269
7f216e7c
DE
82702012-07-02 Doug Evans <dje@google.com>
8271
8272 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8273 pointer to int.
8274
d3ce09f5
SS
82752012-07-02 Stan Shebs <stan@codesourcery.com>
8276
8277 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8278 (ax.o): Add it to build rule.
8279 (ax-ipa.o): Ditto.
8280 (OBS): Add format.o.
8281 (IPA_OBS): Add format.o.
8282 * server.c (handle_query): Claim support for breakpoint commands.
8283 (process_point_options): Add command case.
8284 (process_serial_event): Leave running if there are printfs in
8285 effect.
8286 * mem-break.h (any_persistent_commands): Declare.
8287 (add_breakpoint_commands): Declare.
8288 (gdb_no_commands_at_breakpoint): Declare.
8289 (run_breakpoint_commands): Declare.
8290 * mem-break.c (struct point_command_list): New struct.
8291 (struct breakpoint): New field command_list.
8292 (any_persistent_commands): New function.
8293 (add_commands_to_breakpoint): New function.
8294 (add_breakpoint_commands): New function.
8295 (gdb_no_commands_at_breakpoint): New function.
8296 (run_breakpoint_commands): New function.
8297 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8298 locally.
8299 * ax.c: Include format.h.
8300 (ax_printf): New function.
8301 (gdb_eval_agent_expr): Add printf opcode.
8302
2f8f6aed
YQ
83032012-06-13 Yao Qi <yao@codesourcery.com>
8304
8305 * server.c (start_inferior): Remove duplicated writes to fields
8306 'last_resume_kind' and 'last_status' of 'current_inferior'.
8307
0c9070b3
YQ
83082012-06-12 Yao Qi <yao@codesourcery.com>
8309 Pedro Alves <palves@redhat.com>
8310
8311 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8312 comment.
8313 * server.c (handle_v_cont): Extend comment.
8314
c52daf70
YQ
83152012-06-11 Yao Qi <yao@codesourcery.com>
8316
8317 * linux-low.c (linux_attach): Add 'static'.
8318
d38bbb0a
YQ
83192012-06-06 Yao Qi <yao@codesourcery.com>
8320
8321 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8322
89dc0afd
JK
83232012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8324
8325 Fix gcc -flto compilation warning.
8326 * server.c (main): Make variable multi_mode and attach volatile.
8327
75f62ce7
TJB
83282012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8329
8330 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8331 if the platform doesn't know about it.
8332
65f479b6
PA
83332012-05-30 Jeff Kenton <jkenton@tilera.com>
8334
8335 * Makefile.in (SFILES): Add linux-tile-low.c.
8336 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8337 * configure.srv: Handle tilegx-*-linux*.
8338 * linux-tile-low.c: New file.
8339
0c5bf5a9
JK
83402012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8341
8342 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8343
a493e3e2
PA
83442012-05-24 Pedro Alves <palves@redhat.com>
8345
8346 PR gdb/7205
8347
43aaf8b6 8348 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8349
2ea28649
PA
83502012-05-24 Pedro Alves <palves@redhat.com>
8351
8352 PR gdb/7205
8353
8354 Replace target_signal with gdb_signal throughout.
8355
8d409d16
MR
83562012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8357
8358 * linux-low.c (linux_store_registers): Avoid the copying sequence
8359 when no data has been retrieved by ptrace.
8360
23512c01
MGD
83612012-05-22 Will Deacon <will.deacon@arm.com>
8362
8363 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8364 Include asm/ptrace.h.
8365 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8366 already defined.
8367
4934b29e
MR
83682012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8369
8370 * linux-low.c (linux_store_registers): Don't re-retrieve data
8371 with ptrace that has already been obtained from /proc. Always
8372 copy any data retrieved with ptrace to the buffer supplied.
8373
bde24c0a
PA
83742012-05-11 Yao Qi <yao@codesourcery.com>
8375 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (enum stopping_threads_kind): New.
8378 (stopping_threads): Change type to `enum stopping_threads_kind'.
8379 (handle_extended_wait): If stopping and suspending threads, leave
8380 the new_lwp suspended too.
8381 (linux_wait_for_event): Adjust.
8382 (stop_all_lwps): Set `stopping_threads' to
8383 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8384 whether we're suspending threads or just stopping them. Assert no
8385 recursion happens.
8386
623b6bdf
YQ
83872012-04-29 Yao Qi <yao@codesourcery.com>
8388
8389 * server.h: Move some code to ...
8390 * gdbthread.h: ... here. New.
8391 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8392 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8393 (nto-low.o, win32-low.o): Likewise.
8394 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8395 * regcache.c, remote-utils.c, server.c: Likewise.
8396 * target.c, tracepoint.c, win32-low.c: Likewise.
8397
f15f9948
TJB
83982012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8399
8400 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8401 (PTRACE_ARG4_TYPE): Likewise.
8402 (PTRACE_XFER_TYPE): Likewise.
8403 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8404 ptrace to PTRACE_ARG3_TYPE.
8405 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8406 (PTRACE_ARG4_TYPE): Likewise.
8407 (PTRACE_XFER_TYPE): Likewise.
8408 (linux_detach_one_lwp): Cast fourth argument of
8409 ptrace to long then PTRACE_ARG4_TYPE.
8410 (regsets_fetch_inferior_registers): Cast third argument of
8411 ptrace to long then PTRACE_ARG3_TYPE.
8412 (regsets_store_inferior_registers): Likewise.
8413
38ea300a
PA
84142012-04-20 Pedro Alves <palves@redhat.com>
8415
8416 * configure: Regenerate.
8417
c971b7fa
PA
84182012-04-19 Pedro Alves <palves@redhat.com>
8419
43aaf8b6 8420 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8421 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8422 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8423 (all, install-only, uninstall, clean-info, all-lib, clean): No
8424 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8425 (maintainer-clean realclean distclean): Use subdir_do.
8426 (subdir_do): New.
8427 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8428 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8429 * acinclude.m4: Include acx_configure_dir.m4.
8430 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8431 calls. Call AC_PROG_RANLIB. Configure gnulib using
8432 ACX_CONFIGURE_DIR.
8433 (GNULIB): New.
8434 (GNULIB_STDINT_H): Adjust.
8435 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8436 * gdbreplay.c: Include build-gnulib/config.h.
8437 * server.h: Likewise.
8438 * aclocal.m4: Regenerate.
8439 * config.in: Regenerate.
8440 * configure: Regenerate.
c971b7fa 8441
809277f8
PA
84422012-04-19 Pedro Alves <palves@redhat.com>
8443
8444 * Makefile.in (LIBGNU, INCGNU): Adjust.
8445 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8446 (all, install-only, uninstall, clean-info, all-lib, clean)
8447 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8448 * configure.ac: Adjust AC_OUTPUT output.
8449 * aclocal.m4: Regenerate.
8450 * configure: Regenerate.
8451
fd9bb8b8
PA
84522012-04-19 Pedro Alves <palves@redhat.com>
8453
8454 * Makefile.in (generated_files): New.
8455 (server_h): Remove the explicit dependency on config.h, and depend
8456 on $generated_files.
8457
1c298c66
PA
84582012-04-19 Pedro Alves <palves@redhat.com>
8459
8460 * Makefile.in (INCGNU): Add -Ignulib.
8461
57c4b50b
PA
84622012-04-19 Pedro Alves <palves@redhat.com>
8463
8464 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8465 (INCGNU): ... this, and spell out -I here.
8466 (GNULIB_LIB): Rename to ...
8467 (LIBGNU): ... this.
8468 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8469
1030e047
PA
84702012-04-19 Pedro Alves <palves@redhat.com>
8471
8472 * config.in: Regenerate.
8473
447d4319
PA
84742012-04-19 Pedro Alves <palves@redhat.com>
8475
8476 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8477 * server.h (memmem): Remove declaration.
8478 * config.in: Regenerate.
8479 * configure: Regenerate.
8480
aad9eab9
YQ
84812012-04-19 Yao Qi <yao@codesourcery.com>
8482
8483 * Makefile.in (SFILES): Add common/vec.c.
8484 (OBS): Add vec.o.
8485 (vec.o): New rule.
8486
3e10640f
YQ
84872012-04-19 Yao Qi <yao@codesourcery.com>
8488
8489 * remote-utils.c (prepare_resume_reply): Replace with macro
8490 target_core_of_thread.
8491 * server.c (handle_qxfer_threads_proper): Likewise.
8492 * target.h (traget_core_of_thread): New macro.
8493
71622373
PA
84942012-04-18 Pedro Alves <palves@redhat.com>
8495
8496 * aclocal.m4: Regenerate.
8497 * configure: Regenerate.
8498
80d26939
YQ
84992012-04-16 Yao Qi <yao@codesourcery.com>
8500
8501 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8502 duplicated on address.
8503
42476b70
YQ
85042012-04-16 Yao Qi <yao@codesourcery.com>
8505
8506 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8507 (struct tracepoint_action_ops) <send>: New field.
8508 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8509 (agent_expr_send, x_tracepoint_action_send): New.
8510 (l_tracepoint_action_send): New.
8511 (cmd_qtdp): Download and install tracepoint
8512 according to `use_agent'.
8513 (run_inferior_command): Add one more parameter `len'.
8514 Update callers.
8515 (tracepoint_send_agent): New.
8516 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8517
7bc83639
YQ
85182012-04-16 Yao Qi <yao@codesourcery.com>
8519
8520 * tracepoint.c (download_tracepoints): Moved to ...
8521 (cmd_qtstart): ... here.
8522
5f18041e
YQ
85232012-04-14 Yao Qi <yao@codesourcery.com>
8524
8525 * tracepoint.c: Include inttypes.h.
8526 (struct collect_memory_action): Use sized types.
8527 (struct tracepoint): Likewise.
8528 (cmd_qtdp, stop_tracing): Update print specifiers.
8529 (cmd_qtp, response_tracepoint): Likewise.
8530 (collect_data_at_tracepoint): Likewise.
8531 (collect_data_at_step): Likewise.
8532
55a8c076
YQ
85332012-04-14 Yao Qi <yao@codesourcery.com>
8534
8535 Import gnulib module inttypes.
8536 * aclocal.m4, config.in, configure: Regenerated.
8537
dc750257
YQ
85382012-04-14 Yao Qi <yao@codesourcery.com>
8539
8540 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8541 Makefile and config.status at last.
8542
0ab5faf9
YQ
85432012-04-13 Yao Qi <yao@codesourcery.com>
8544
8545 * tracepoint.c: Include stdint.h unconditionally.
8546
18f5fd81
TJB
85472012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8548
8549 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8550 on BFD_HAVE_SYS_PROCFS_TYPE.
8551 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8552 * configure: Regenerate.
8553 * config.in: Likewise.
8554
4d47af5c
L
85552012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8556
8557 * Makefile.in (clean): Also remove x32.c x32-linux.c
8558 x32-avx.c x32-avx-linux.c.
8559 (x32.o): New target.
8560 (x32.c): Likewise.
8561 (x32-linux.o): Likewise.
8562 (x32-linux.c): Likewise.
8563 (x32-avx.o): Likewise.
8564 (x32-avx.c): Likewise.
8565 (x32-avx-linux.o): Likewise.
8566 (x32-avx-linux.c): Likewise.
8567
8568 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8569 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8570 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8571 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8572 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8573 i386/x32-avx-linux.xml.
8574
8575 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8576 (init_registers_x32_avx_linux): Likwise.
8577 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8578 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8579
ecedbe58
PA
85802012-04-13 Pedro Alves <palves@redhat.com>
8581
8582 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8583 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8584 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8585 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8586 the sub-make.
8587
c92b5177
L
85882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8589
8590 * linux-x86-low.c (compat_x32_clock_t): New.
8591 (compat_x32_siginfo_t): Likewise.
8592 (compat_x32_siginfo_from_siginfo): Likewise.
8593 (siginfo_from_compat_x32_siginfo): Likewise.
8594 (linux_is_elf64): Likewise.
8595 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8596 and siginfo_from_compat_x32_siginfo for x32.
8597 (x86_arch_setup): Set linux_is_elf64.
8598
214d508e
L
85992012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8600
8601 PR gdb/13969
8602 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8603 e_machine field.
8604 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8605 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8606 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8607 compatible with process.
8608
c9a1864a
YQ
86092012-04-12 Yao Qi <yao@codesourcery.com>
8610
8611 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8612 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8613 (install-only, install-info, clean): Handle sub dir gnulib.
8614 (all-lib, am--refresh): New targets.
8615 (memmem.o): Remove target.
8616 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8617 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8618 (AC_REPLACE_FUNCS): Remove memmem.
8619 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8620 (AC_OUTPUT): Generate Makefile in gnulib/.
8621 * aclocal.m4, config.in, configure: Regenerated.
8622
367ba2c2
MR
86232012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8624
8625 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8626
9d236627
PA
86272012-04-05 Pedro Alves <palves@redhat.com>
8628
8629 -Werror=strict-aliasing
8630
8631 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8632 pointer.
8633
111217b3
PA
86342012-04-04 Pedro Alves <palves@redhat.com>
8635
8636 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8637 (sparc_store_gregset_from_stack, sparc_store_gregset)
8638 (sparc_breakpoint_at): Fix formatting.
8639
8365dcf5
TJB
86402012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8641
8642 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8643 are available.
8644 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8645 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8646 * config.in: Regenerate.
8647 * configure: Likewise.
8648
689cc2ae
PA
86492012-03-29 Pedro Alves <palves@redhat.com>
8650
8651 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8652 Correct ptrace arguments.
8653
c14dfd32
PA
86542012-03-28 Pedro Alves <palves@redhat.com>
8655
8656 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8657 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8658 (IA64_FR1_REGNUM): New defines.
8659 (ia64_fetch_register): New.
8660 (the_low_target): Install it.
8661 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8662 field.
8663 * linux-low.c (linux_fetch_registers): Try the
8664 the_low_target.fetch_register hook first.
8665
8666 * linux-arm-low.c (the_low_target): Adjust.
8667 * linux-bfin-low.c (the_low_target): Adjust.
8668 * linux-cris-low.c (the_low_target): Adjust.
8669 * linux-crisv32-low.c (the_low_target): Adjust.
8670 * linux-m32r-low.c (the_low_target): Adjust.
8671 * linux-m68k-low.c (the_low_target): Adjust.
8672 * linux-mips-low.c (the_low_target): Adjust.
8673 * linux-ppc-low.c (the_low_target): Adjust.
8674 * linux-s390-low.c (the_low_target): Adjust.
8675 * linux-sh-low.c (the_low_target): Adjust.
8676 * linux-sparc-low.c (the_low_target): Adjust.
8677 * linux-tic6x-low.c (the_low_target): Adjust.
8678 * linux-x86-low.c (the_low_target): Adjust.
8679 * linux-xtensa-low.c (the_low_target): Adjust.
8680
63c88e13
PA
86812012-03-26 Pedro Alves <palves@redhat.com>
8682
8683 * server.c (handle_qxfer_libraries): Don't bail early if
8684 the_target->qxfer_libraries_svr4 is not NULL.
8685
fb723180
PA
86862012-03-26 Pedro Alves <palves@redhat.com>
8687
8688 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8689
0afae3cf
PA
86902012-03-23 Pedro Alves <palves@redhat.com>
8691
8692 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8693 "library-list-svr4" element's start tag when the the DSO list is
8694 empty.
8695
485f1ee4
PA
86962012-03-23 Pedro Alves <palves@redhat.com>
8697
8698 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8699 a variable whose type size is the same as the inferior's pointer
8700 size.
8701
a5362b9a
TS
87022012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8703
8704 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8705 struct siginfo.
8706 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8707 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8708 * linux-low.h: Include <signal.h>.
8709 (struct siginfo): Remove forward declaration.
8710 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8711 struct siginfo.
8712
d226c142
MF
87132012-03-21 Mike Frysinger <vapier@gentoo.org>
8714
8715 * .gitignore: Ignore more files.
8716
122f36ef
PA
87172012-03-19 Pedro Alves <palves@redhat.com>
8718 Jan Kratochvil <jan.kratochvil@redhat.com>
8719
8720 * server.c (cont_thread, general_thread): Add describing comments.
8721 (start_inferior): Clear `cont_thread'.
8722 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8723 of a process.
8724
fc3e5175
YQ
87252012-03-15 Yao Qi <yao@codesourcery.com>
8726
8727 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8728 handling to ...
8729 (cmd_qtdp): ... here.
8730
8d0d92cd
YQ
87312012-03-15 Yao Qi <yao@codesourcery.com>
8732
8733 * tracepoint.c (struct tracepoint_action_ops): New.
8734 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8735 (m_tracepoint_action_download): New.
8736 (r_tracepoint_action_download): New.
8737 (x_tracepoint_action_download): New.
8738 (l_tracepoint_action_download): New.
8739 (add_tracepoint_action): Install `action->ops' according type.
8740 (download_tracepoint_1): Move code `download' function pointer
8741 of various tracepoint_action_ops.
8742
87b0bb13
JK
87432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8744
8745 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8746 linux_ptrace_attach_warnings.
8747
5f572dec
JK
87482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8749
8750 * Makefile.in (linux-ptrace.o): New.
8751 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8752 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8753 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8754 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8755 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8756 of these targets.
8757 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8758
f4647387
YQ
87592012-03-08 Yao Qi <yao@codesourcery.com>
8760 Pedro Alves <palves@redhat.com>
8761
8762 Fix PR server/13392.
8763 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8764 offset of JMP insn.
8765 * tracepoint.c (remove_tracepoint): New.
8766 (cmd_qtdp): Call remove_tracepoint when failed to install.
8767
9b224c5e
PA
87682012-03-07 Pedro Alves <palves@redhat.com>
8769
8770 * linux-low.c (get_detach_signal): New.
8771 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8772 Pass on pending signals to PTRACE_DETACH. Check the result of the
8773 ptrace call.
8774 * server.c (program_signals, program_signals_p): New.
8775 (handle_general_set): Handle QProgramSignals.
8776 * server.h (program_signals, program_signals_p): Declare.
8777
e237a7e2
JK
87782012-03-05 Pedro Alves <palves@redhat.com>
8779 Jan Kratochvil <jan.kratochvil@redhat.com>
8780
8781 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8782 New comment why.
8783
5808517f
YQ
87842012-03-03 Yao Qi <yao@codesourcery.com>
8785
8786 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8787 agent_look_up_symbols.
8788
58b4daa5
YQ
87892012-03-03 Yao Qi <yao@codesourcery.com>
8790
8791 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8792 (linux-x86-low.o): Likewise.
8793 * server.h: Remove in_process_agent_loaded.
8794 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8795 common/agent.c.
8796 Update callers.
8797
8ffcbaaf
YQ
87982012-03-03 Yao Qi <yao@codesourcery.com>
8799
8800 * tracepoint.c (gdb_agent_capability): New global.
8801 (in_process_agent_loaded_ust): Renamed to
8802 `in_process_agent_supports_ust'.
8803 Update callers.
8804 (in_process_agent_supports_ust): Call agent_capability_check.
8805 (clear_installed_tracepoints): Assert that agent supports
8806 agent.
8807
d1feda86
YQ
88082012-03-03 Yao Qi <yao@codesourcery.com>
8809
8810 * linux-low.c (linux_supports_agent): New.
8811 (linux_target_ops): Initialize field `supports_agent' with
8812 linux_supports_agent.
8813 * target.h (struct target_ops) <supports_agent>: New.
8814 (target_supports_agent): New macro.
8815 * server.c (handle_general_set): Handle packet 'QAgent'.
8816 (handle_query): Send `QAgent+'.
8817 * Makefile.in (server.o): Depends on agent.h.
8818
2fa291ac
YQ
88192012-03-03 Yao Qi <yao@codesourcery.com>
8820
8821 * Makefile.in (OBS): Add agent.o.
8822 Add new rule for agent.o.
8823 Track dependence of tracepoint.c on agent.h.
8824 * tracepoint.c (run_inferior_command_1):
8825 (run_inferior_command): Call agent_run_command.
8826 (gdb_ust_connect_sync_socket): Deleted. Move it to
8827 common/agent.c.
8828 (resume_thread, stop_thread): Likewise.
8829 (gdb_ust_socket_init): Renamed to ...
8830 (gdb_agent_socket_init): ... New.
8831 (gdb_ust_thread): Renamed to ...
8832 (gdb_agent_helper_thread): ... New.
8833 (gdb_ust_init): Move some code to ...
8834 (gdb_agent_init): ... here. New.
8835 [HAVE_UST]: Call gdb_ust_init.
8836 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8837 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8838 * config.in, configure: Regenerated.
8839
05044653
PA
88402012-03-02 Pedro Alves <palves@redhat.com>
8841
8842 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8843 * linux-low.c (struct simple_pid_list): New.
8844 (stopped_pids): New a struct simple_pid_list pointer.
8845 (add_to_pid_list, pull_pid_from_list): New.
8846 (handle_extended_wait): Don't assume the first signal new children
8847 report is SIGSTOP. Adjust call to pull_pid_from_list.
8848 (linux_wait_for_lwp): Adjust.
8849
8d00225b
YQ
88502012-03-02 Yao Qi <yao@codesourcery.com>
8851
8852 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8853 debug log.
8854
19560ba5
YQ
88552012-03-02 Yao Qi <yao@codesourcery.com>
8856
8857 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8858 `stop_pc' and `tpoint'. Update caller.
8859
1faeff08
MR
88602012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8861
8862 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8863 * linux-low.c (use_linux_regsets): New macro.
8864 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8865 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8866 (linux_register_in_regsets): New function.
8867 (usr_fetch_inferior_registers): Skip registers covered by
8868 regsets.
8869 (usr_store_inferior_registers): Likewise.
8870 (usr_fetch_inferior_registers): New macro.
8871 (usr_store_inferior_registers): Likewise.
8872 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8873 (linux_store_registers): Likewise.
8874 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8875 prototype.
8876 (init_registers_mips64_dsp_linux): Likewise.
8877 (init_registers_mips_linux): New macro.
8878 (init_registers_mips_dsp_linux): Likewise.
8879 (mips_dsp_num_regs): Likewise.
8880 (DSP_BASE, DSP_CONTROL): New fallback macros.
8881 (mips_base_regs): New macro.
8882 (mips_regmap): Use it. Fix the size.
8883 (mips_dsp_regmap): New variable.
8884 (mips_dsp_regset_bitmap): Likewise.
8885 (mips_arch_setup): New function.
8886 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8887 than mips_regmap.
8888 (mips_cannot_store_register): Likewise.
8889 (the_low_target): Update .arch_setup, .num_regs and .regmap
8890 initializers. Add .regset_bitmap initializer.
8891 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8892 initializer.
8893 * linux-bfin-low.c (the_low_target): Likewise.
8894 * linux-cris-low.c (the_low_target): Likewise.
8895 * linux-crisv32-low.c (the_low_target): Likewise.
8896 * linux-ia64-low.c (the_low_target): Likewise.
8897 * linux-m32r-low.c (the_low_target): Likewise.
8898 * linux-m68k-low.c (the_low_target): Likewise.
8899 * linux-ppc-low.c (the_low_target): Likewise.
8900 * linux-s390-low.c (the_low_target): Likewise.
8901 * linux-sh-low.c (the_low_target): Likewise.
8902 * linux-sparc-low.c (the_low_target): Likewise.
8903 * linux-tic6x-low.c (the_low_target): Likewise.
8904 * linux-x86-low.c (the_low_target): Likewise.
8905 * linux-xtensa-low.c (the_low_target): Likewise.
8906 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8907 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8908 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8909 srv_xmlfiles.
8910 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8911 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8912
c03e6ccc
YQ
89132012-02-29 Yao Qi <yao@codesourcery.com>
8914 Pedro Alves <palves@redhat.com>
8915
8916 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8917 `step_over_finished' is true.
8918
644cebc9
PA
89192012-02-27 Pedro Alves <palves@redhat.com>
8920
8921 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8922 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8923
c14d7ab2
PA
89242012-02-27 Pedro Alves <palves@redhat.com>
8925
8926 PR server/9684
8927 * linux-low.c (pid_is_stopped): New.
8928 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8929
412c89dd
LM
89302012-02-25 Luis Machado <lgustavo@codesourcery.com>
8931
8932 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8933 of conditions.
8934
b745defe
MR
89352012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8936
8937 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8938
9f3a5c85
LM
89392012-02-24 Luis Machado <lgustavo@codesourcery>
8940
8941 * server.c (handle_query): Advertise support for target-side
8942 breakpoint condition evaluation.
8943 (process_point_options): New function.
8944 (process_serial_event): When inserting a breakpoint, check for
8945 a target-side condition that should be evaluated.
8946
8947 * mem-break.c: Include regcache.h and ax.h.
8948 (point_cond_list_t): New data structure.
8949 (breakpoint) <cond_list>: New field.
8950 (find_gdb_breakpoint_at): Make non-static.
8951 (delete_gdb_breakpoint_at): Clear any target-side
8952 conditions.
8953 (clear_gdb_breakpoint_conditions): New function.
8954 (add_condition_to_breakpoint): Likewise.
8955 (add_breakpoint_condition): Likewise.
8956 (gdb_condition_true_at_breakpoint): Likewise.
8957 (gdb_breakpoint_here): Return result directly instead
8958 of going through a local variable.
8959
8960 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8961 (clear_gdb_breakpoint_conditions): Likewise.
8962 (add_breakpoint_condition): Likewise.
8963 (gdb_condition_true_at_breakpoint): Likewise.
8964
8965 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8966 (need_step_over_p): Take target-side breakpoint condition into
8967 consideration.
8968
5e1dc496
LM
89692012-02-24 Luis Machado <lgustavo@codesourcery>
8970
8971 * server.h: Include tracepoint.h.
8972 (agent_mem_read, agent_get_trace_state_variable_value,
8973 agent_set_trace_state_variable_value,
8974 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8975 get_set_tsv_func_addr): New prototypes.
8976
8977 * ax.h: New include file.
8978 * ax.c: New source file.
8979
8980 * tracepoint.c: Include ax.h.
8981 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8982 agent_expr, eval_result_type): Move to ax.h.
8983 (parse_agent_expr): Rename to ...
8984 (gdb_parse_agent_expr): ... this, make it non-static and move
8985 to ax.h.
8986 (unparse_agent_expr) Rename to ...
8987 (gdb_unparse_agent_expr): ... this, make it non-static and move
8988 to ax.h.
8989 (eval_agent_expr): Rename to ...
8990 (eval_tracepoint_agent_expr): ... this.
8991 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8992 forward declarations.
8993 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8994 (agent_get_trace_state_variable_value): New function.
8995 (agent_set_trace_state_variable_value): New function.
8996 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8997 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8998 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8999 (condition_true_at_tracepoint): Likewise.
9000 (parse_agent_expr): Rename to ...
9001 (gdb_parse_agent_expr): ... this and move to ax.c.
9002 (unparse_agent_expr): Rename to ...
9003 (gdb_unparse_agent_expr): ... this and move to ax.c.
9004 (gdb_agent_op_name): Move to ax.c.
9005 (eval_agent_expr): Rename to ...
9006 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9007 and move to ax.c.
9008 (eval_tracepoint_agent_expr): New function.
9009 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9010 non-static.
5e1dc496
LM
9011 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9012 ax.c.
9013 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9014 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9015 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9016 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9017 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9018 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9019 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9020 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9021 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9022 (compile_bytecodes): Remove forward declaration.
9023 (is_goto_target): Move to ax.c.
9024 (compile_bytecodes): Move to ax.c and call
9025 agent_get_trace_state_variable_value (...) and
9026 agent_set_trace_state_variable_value (...).
9027
9028 * Makefile.in: Update ax.c and IPA dependencies.
9029
277e4e52
PA
90302012-02-24 Pedro Alves <palves@redhat.com>
9031
9032 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9033 (cmd_bigqtbuffer_circular): ... this. Only handle
9034 'QTBuffer:circular:'.
9035 (handle_tracepoint_general_set): Adjust.
9036
bf4c19f7
YQ
90372012-02-16 Yao Qi <yao@codesourcery.com>
9038
9039 * inferiors.c: Move code to ...
9040 * dll.c: .... here. New.
9041 * server.h: Declare clear_dlls.
9042 * Makefile.in (SFILES): Add dll.c.
9043 (OBS): Add dll.o
9044 (dll.o): New rule.
9045
d73f2619
YQ
90462012-02-11 Yao Qi <yao@codesourcery.com>
9047
9048 * server.c: (handle_monitor_command): Add a new parameter
9049 `own_buf'.
9050 (handle_query): Update caller.
9051
f8255c2a
JB
90522012-02-09 Joel Brobecker <brobecker@adacore.com>
9053
9054 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9055 * configure, config.in: Regenerate.
9056 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9057 is not defined.
9058
da84f473
PA
90592012-02-02 Pedro Alves <palves@redhat.com>
9060
9061 Try SIGKILL first, then PTRACE_KILL.
9062 * linux-low.c (linux_kill_one_lwp): New.
9063 (linux_kill_one_lwp): Rename to ...
9064 (kill_one_lwp_callback): ... this. Use the new
9065 linux_kill_one_lwp.
9066
e886a173
PA
90672012-02-02 Pedro Alves <palves@redhat.com>
9068
9069 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9070 inferior.
9071
be07f1a2
PA
90722012-01-27 Pedro Alves <palves@redhat.com>
9073
9074 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9075 (elf_64_file_p): Make static.
9076 (linux_pid_exe_is_elf_64_file): New.
9077 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9078 Delete declarations.
9079 (linux_pid_exe_is_elf_64_file): Declare.
9080 * linux-x86-low.c (x86_arch_setup): Use
9081 linux_pid_exe_is_elf_64_file.
9082
d8301ad1
JK
90832012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 * linux-low.c (linux_wait_for_event_1): Rename to ...
9086 (linux_wait_for_event): ... here and merge it with former
9087 linux_wait_for_event - new variable wait_ptid, use it.
9088 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9089
01b17894
PA
90902012-01-23 Pedro Alves <palves@redhat.com>
9091
9092 * server.c (main): Avoid yet another case of infinite loop while
9093 detaching/killing after a longjmp.
9094
e825046f
JK
90952012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9096
9097 Code cleanup.
9098 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9099
b9e7b9c3
UW
91002012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9101
9102 * hostio.c (handle_readlink): New function.
9103 (handle_vFile): Call it to handle "vFile:readlink" packets.
9104
901f9912
UW
91052012-01-20 Pedro Alves <palves@redhat.com>
9106 Ulrich Weigand <ulrich.weigand@linaro.org>
9107
9108 * server.c (handle_v_requests): Only support vAttach and vRun to
9109 start multiple processes when in extended protocol mode.
9110
fc1ab1a0
PA
91112012-01-17 Pedro Alves <palves@redhat.com>
9112
9113 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9114 memalign plus mprotect to allocate the scratch buffer.
9115
7d5d4e98
PA
91162012-01-13 Pedro Alves <palves@redhat.com>
9117
9118 * server.c (attach_inferior): Clear `cont_thread'.
9119
f128d5e9
PA
91202012-01-13 Pedro Alves <palves@redhat.com>
9121
9122 * server.c (main): Avoid infinite loop while detaching/killing
9123 after a longjmp.
9124
06db92f0
DE
91252012-01-09 Doug Evans <dje@google.com>
9126
9127 * server.c (start_inferior): Set last_ptid in --wrapper case.
9128
32d92999
YQ
91292012-01-06 Yao Qi <yao@codesourcery.com>
9130
9131 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9132 defined.
9133 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9134
5e0a92a9
YQ
91352012-01-04 Yao Qi <yao@codesourcery.com>
9136
9137 * tracepoint.c (cmd_qtdp): Print debug message
9138 for static tracepoint.
9139
ae639e8c
YQ
91402012-01-04 Yao Qi <yao@codesourcery.com>
9141
9142 * tracepoint.c (trace_vdebug): Differentiate debug message
9143 between gdbserver and IPA.
9144
f72429c5
YQ
91452012-01-03 Yao Qi <yao@codesourcery.com>
9146
9147 * tracepoint.c (tracepoint_was_hit): Don't collect for
9148 static tracepoint.
9149
12c3e59c
JB
91502012-01-02 Joel Brobecker <brobecker@adacore.com>
9151
9152 * terminal.h: Reformat copyright header.
9153
67827812
JB
91542012-01-02 Joel Brobecker <brobecker@adacore.com>
9155
9156 * server.c (gdbserver_version): Update copyright year.
9157 * gdbreplay.c (gdbreplay_version): Likewise.
9158
3e52c33d
JK
91592011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9160
9161 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9162
9163 Revert:
9164 2011-12-18 Hui Zhu <teawater@gmail.com>
9165 * linux-low.c (linux_create_inferior): Save return value to ret.
9166
66f1260e
HZ
91672011-12-18 Hui Zhu <teawater@gmail.com>
9168
9169 * linux-low.c (linux_create_inferior): Save return value to ret.
9170
e77616d7
DE
91712011-12-16 Doug Evans <dje@google.com>
9172
e7b06c57
DE
9173 * linux-low.c (linux_create_inferior): If stdio connection,
9174 redirect stdin from /dev/null, stdout to stderr.
9175 * remote-utils.c (remote_is_stdio): New static global.
9176 (remote_connection_is_stdio): New function.
9177 (remote_prepare): Handle stdio connection.
9178 (remote_open): Ditto.
9179 (remote_close): Don't close stdin for stdio connections.
9180 (read_prim,write_prim): New functions. Replace all calls to
9181 read/write to these.
9182 * server.c (main): Watch for "-" argument. Move call to
9183 remote_prepare before start_inferior.
9184 * server.h (STDIO_CONNECTION_NAME): New macro.
9185 (remote_connection_is_stdio): Declare.
9186
e77616d7
DE
9187 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9188 in debugging output.
9189
82067193
YQ
91902011-12-15 Yao Qi <yao@codesourcery.com>
9191
9192 * tracepoint.c: Include sys/syscall.h.
9193 (gdb_ust_thread): Remove preprocessor conditional.
9194
82bfbe7e
PA
91952011-12-14 Pedro Alves <pedro@codesourcery.com>
9196
9197 * linux-low.c (linux_detach_one_lwp): Call
9198 the_low_target.prepare_to_resume before detaching.
9199
712c6575
YQ
92002011-12-14 Yao Qi <yao@codesourcery.com>
9201
9202 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9203 of write.
9204
d54d1edf
YQ
92052011-12-14 Yao Qi <yao@codesourcery.com>
9206
9207 * i386-low.c (i386_low_stopped_data_address): Initialize local
9208 variable `control'.
9209
6210a125
PA
92102011-12-13 Pedro Alves <pedro@codesourcery.com>
9211
9212 PR remote/13492
9213
9214 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9215 DR_CONTROL unless necessary. Extend comments.
9216 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9217 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9218
2ece8244
YQ
92192011-12-13 Yao Qi <yao@codesourcery.com>
9220
9221 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9222 macros.
9223 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9224
784867a5
JK
92252011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9228 Print new debug message for such case.
9229
6bf36717
JK
92302011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9231
9232 Fix overlapping memcpy.
9233 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9234 the read_inferior_memory transfer.
9235 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9236 write_inferior_memory transfer.
9237 (set_fast_tracepoint_jump): New variable buf. Use it for the
9238 read_inferior_memory and write_inferior_memory transfers.
9239 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9240 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9241 Use it for the write_inferior_memory transfer.
9242 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9243 buffers.
9244
50275556
MR
92452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9246
9247 * linux-low.c (fetch_register, store_register): Make code
9248 consistent, fix formatting.
9249
7325beb4
MR
92502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9251
9252 * linux-low.c (usr_store_inferior_registers): Factor out code
9253 to handle individual registers into...
9254 (store_register): ... this new function.
9255
c642a434
UW
92562011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9257
9258 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9259 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9260 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9261 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9262 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9263 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9264 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9265 (srv_xmlfiles): Add new XML files.
9266
9267 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9268 and <sys/uio.h>.
9269 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9270 (init_registers_s390_linux32v1): Add prototype.
9271 (init_registers_s390_linux32v2): Likewise.
9272 (init_registers_s390_linux64v1): Likewise.
9273 (init_registers_s390_linux64v2): Likewise.
9274 (init_registers_s390x_linux64v1): Likewise.
9275 (init_registers_s390x_linux64v2): Likewise.
9276 (s390_num_regs): Increment to 52.
9277 (s390_regmap): Add orig_r2 register.
9278 (s390_num_regs_3264): Increment to 68.
9279 (s390_regmap_3264): Add orig_r2 register.
9280 (s390_collect_ptrace_register): Handle orig_r2 register.
9281 (s390_supply_ptrace_register): Likewise.
9282 (s390_fill_last_break): New function.
9283 (s390_store_last_break): Likewise.
9284 (s390_fill_system_call): New function.
9285 (s390_store_system_call): Likewise.
9286 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9287 register sets.
9288 (s390_check_regset): New function.
9289 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9290 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9291 Update target_regsets for available register sets.
9292
2268b414
JK
92932011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9294 Jan Kratochvil <jan.kratochvil@redhat.com>
9295
9296 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9297 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9298 New.
9299 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9300 * linux-low.h (struct process_info_private): New member r_debug.
9301 * server.c (handle_qxfer_libraries): Call
9302 the_target->qxfer_libraries_svr4.
9303 (handle_qxfer_libraries_svr4): New function.
9304 (qxfer_packets): New entry "libraries-svr4".
9305 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9306 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9307 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9308 PACKET_qXfer_libraries_svr4.
9309
d6db1fab
UW
93102011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9311
9312 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9313 PSW address/mask between 8-byte and 16-byte formats.
9314 (s390_supply_ptrace_register): Likewise.
9315 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9316 basic addressing mode bit.
9317
242f5f1c
SS
93182011-11-24 Stan Shebs <stan@codesourcery.com>
9319
9320 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9321
f196051f
SS
93222011-11-17 Stan Shebs <stan@codesourcery.com>
9323
9324 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9325 (tracing_start_time): New global.
9326 (tracing_stop_time): New global.
9327 (tracing_user_name): New global.
9328 (tracing_notes): New global.
9329 (tracing_stop_note): New global.
9330 (cmd_qtstart): Set traceframe_usage, start_time.
9331 (stop_tracing): Set stop_time.
9332 (cmd_qtstatus): Report additional status.
9333 (cmd_qtp): New function.
9334 (handle_tracepoint_query): Call it.
9335 (cmd_qtnotes): New function.
9336 (handle_tracepoint_general_set): Call it.
9337 (get_timestamp): Rename from tsv_get_timestamp.
9338
405f8e94
SS
93392011-11-14 Stan Shebs <stan@codesourcery.com>
9340 Kwok Cheung Yeung <kcy@codesourcery.com>
9341
9342 * linux-x86-low.c (small_jump_insn): New.
9343 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9344 trampoline and error message, build a trampoline and issue a small
9345 jump instruction to it.
9346 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9347 trampoline and error message.
9348 (x86_get_min_fast_tracepoint_insn_len): New.
9349 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9350 * linux-low.h (struct linux_target_ops): Add arguments to
9351 install_fast_tracepoint_jump_pad operation, add new operation.
9352 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9353 arguments.
9354 (linux_get_min_fast_tracepoint_insn_len): New function.
9355 (linux_target_op): Add new operation.
9356 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9357 (gdb_trampoline_buffer_end): Ditto.
9358 (gdb_trampoline_buffer_error): Ditto.
9359 (struct ipa_sym_addresses): Add fields for new IPA variables.
9360 (symbol_list): Add entries for new IPA variables.
9361 (struct tracepoint): Add fields to hold the address range of the
9362 trampoline used by the tracepoint.
9363 (trampoline_buffer_head): New static variable.
9364 (trampoline_buffer_tail): Ditto.
9365 (claim_trampoline_space): New function.
9366 (have_fast_tracepoint_trampoline_buffer): New function.
9367 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9368 structure.
9369 (install_fast_tracepoint): Ditto, also add error buffer argument.
9370 (cmd_qtminftpilen): New function.
9371 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9372 (fast_tracepoint_from_trampoline_address): New function.
9373 (fast_tracepoint_collecting): Handle trampoline as part of jump
9374 pad space.
9375 (set_trampoline_buffer_space): New function.
9376 (initialize_tracepoint): Initialize new IPA variables.
9377 * target.h (struct target_ops): Add arguments to
9378 install_fast_tracepoint_jump_pad operation, add new
9379 get_min_fast_tracepoint_insn_len operation.
9380 (target_get_min_fast_tracepoint_insn_len): New.
9381 (install_fast_tracepoint_jump_pad): Add arguments.
9382 * server.h (IPA_BUFSIZ): Define.
9383 * linux-i386-ipa.c: Include extra header files.
9384 (initialize_fast_tracepoint_trampoline_buffer): New function.
9385 (initialize_low_tracepoint): Call it.
9386 * server.h (set_trampoline_buffer_space): Declare.
9387 (claim_trampoline_space): Ditto.
9388 (have_fast_tracepoint_trampoline_buffer): Ditto.
9389
1e4d1764
YQ
93902011-11-14 Yao Qi <yao@codesourcery.com>
9391
9392 * server.c (handle_query): Handle InstallInTrace for qSupported.
9393 * tracepoint.c (add_tracepoint): Sort list.
9394 (install_tracepoint, download_tracepoint): New.
9395 (cmd_qtdp): Call them to install and download tracepoints.
9396 (sort_tracepoints): Removed.
9397 (cmd_qtstart): Update.
9398
5c73ff4e
YQ
93992011-11-14 Yao Qi <yao@codesourcery.com>
9400
9401 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9402 * mem-break.h: Declare.
9403 * tracepoint.c (cmd_qtstart): Move some code to ...
9404 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9405 New.
9406 (download_tracepoints): Move some code to ...
9407 (download_tracepoint_1): ... here. New.
9408
86a30030
YQ
94092011-11-08 Yao Qi <yao@codesourcery.com>
9410
9411 * remote-utils.c (relocate_instruction): A comment fix.
9412
8d26e50c
JB
94132011-11-07 Joel Brobecker <brobecker@adacore.com>
9414
9415 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9416 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9417 dr_status_mirror and dr_control_mirror from debug_reg_state.
9418 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9419 (i386_initial_stuff): Remove use of deleted globals.
9420 (i386_get_thread_context, i386_set_thread_context,
9421 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9422 from debug_reg_state.
9423
a59306a3
YQ
94242011-11-05 Yao Qi <yao@codesourcery.com>
9425
9426 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9427 address as TPOINT's.
9428
3065dfb6
SS
94292011-11-02 Stan Shebs <stan@codesourcery.com>
9430
9431 * tracepoint.c (agent_mem_read_string): New function.
9432 (eval_agent_expr): Call it for tracenz.
9433 * server.c (handle_query): Report support for tracenz.
9434
fd0d8c7c
YQ
94352011-11-02 Yao Qi <yao@codesourcery.com>
9436
9437 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9438
609086b1
YQ
94392011-11-02 Yao Qi <yao@codesourcery.com>
9440
9441 * target.h: Fix a typo in comment.
9442
b9fd1791
PA
94432011-10-31 Pedro Alves <pedro@codesourcery.com>
9444
9445 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9446 clobber the breakpoints' shadows with fast tracepoint jumps.
9447 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9448 * target.c (write_inferior_memory): Also pass MYADDR down to
9449 check_mem_write.
9450
03583c20
UW
94512011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9452
9453 * configure.ac: Check support for personality routine.
9454 * configure: Regenerate.
9455 * config.in: Likewise.
9456 * linux-low.c: Include <sys/personality.h>.
9457 Define ADDR_NO_RANDOMIZE if necessary.
9458 (linux_create_inferior): Disable address space randomization when
9459 forking inferior, if requested.
9460 (linux_supports_disable_randomization): New function.
9461 (linux_target_ops): Install it.
9462 * server.h (disable_randomization): Declare.
9463 * server.c (disable_randomization): New global variable.
9464 (handle_general_set): Handle QDisableRandomization.
9465 (handle_query): Likewise for qSupported.
9466 (main): Support --disable-randomization and --no-disable-randomization
9467 command line arguments.
9468 * target.h (struct target_ops): Add supports_disable_randomization.
9469 (target_supports_disable_randomization): New macro.
9470
723b724b
MF
94712011-09-29 Mike Frysinger <vapier@gentoo.org>
9472
9473 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9474 ifdef check.
9475 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9476 [!PT_GETDSBT] (target_loadmap): New definition.
9477 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9478 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9479 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9480 and PT_GETDSBT to LINUX_LOADMAP.
9481 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9482 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9483
55329a5c 94842011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9485
9486 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9487 (arm_linux_hwbp_cap): New static variable.
9488 (arm_linux_get_hwbp_cap): Replace by ...
9489 (arm_linux_init_hwbp_cap): ... this new function.
9490 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9491 (arm_linux_get_hw_watchpoint_count): Likewise.
9492 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9493 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9494 (arm_prepare_to_resume): Use perror_with_name instead of error.
9495
55329a5c 94962011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9497
9498 * linux-arm-low.c: Include <signal.h>.
9499 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9500 (struct arm_linux_hwbp_cap): New data type.
9501 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9502 (struct arm_linux_hw_breakpoint): New data type.
9503 (MAX_BPTS, MAX_WPTS): Define.
9504 (struct arch_process_info, struct arch_lwp_info): New data types.
9505 (arm_linux_get_hwbp_cap): New function.
9506 (arm_linux_get_hw_breakpoint_count): Likewise.
9507 (arm_linux_get_hw_watchpoint_count): Likewise.
9508 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9509 (arm_hwbp_control_initialize): Likewise.
9510 (arm_hwbp_control_is_enabled): Likewise.
9511 (arm_hwbp_control_is_initialized): Likewise.
9512 (arm_hwbp_control_disable): Likewise.
9513 (arm_linux_hw_breakpoint_equal): Likewise.
9514 (arm_linux_hw_point_initialize): Likewise.
9515 (struct update_registers_data): New data structure.
9516 (update_registers_callback: New function.
9517 (arm_insert_point): Likewise.
9518 (arm_remove_point): Likewise.
9519 (arm_stopped_by_watchpoint): Likewise.
9520 (arm_stopped_data_address): Likewise.
9521 (arm_new_process): Likewise.
9522 (arm_new_thread): Likewise.
9523 (arm_prepare_to_resume): Likewise.
9524 (the_low_target): Register arm_insert_point, arm_remove_point,
9525 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9526 arm_new_thread, and arm_prepare_to_resume.
9527
6b9801d4
SS
95282011-09-15 Stan Shebs <stan@codesourcery.com>
9529
9530 * server.h (struct emit_ops): Add compare-goto fields.
9531 * tracepoint.c (gdb_agent_op_sizes): New table.
9532 (emit_eq_goto): New function.
9533 (emit_ne_goto): New function.
9534 (emit_lt_goto): New function.
9535 (emit_le_goto): New function.
9536 (emit_gt_goto): New function.
9537 (emit_ge_goto): New function.
9538 (is_goto_target): New function.
9539 (compile_bytecodes): Recognize special cases of compare-goto
9540 combinations and call specialized emitters for them.
9541 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9542 (amd64_emit_ne_goto): New function.
9543 (amd64_emit_lt_goto): New function.
9544 (amd64_emit_le_goto): New function.
9545 (amd64_emit_gt_goto): New function.
9546 (amd64_emit_ge_goto): New function.
9547 (amd64_emit_ops): Add the new functions.
9548 (i386_emit_eq_goto): New function.
9549 (i386_emit_ne_goto): New function.
9550 (i386_emit_lt_goto): New function.
9551 (i386_emit_le_goto): New function.
9552 (i386_emit_gt_goto): New function.
9553 (i386_emit_ge_goto): New function.
9554 (i386_emit_ops): Add the new functions.
9555
bf15cbda
SS
95562011-09-08 Stan Shebs <stan@codesourcery.com>
9557
9558 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9559 (i386_emit_epilogue): Restore %ebx.
9560
943ca1dd
JZ
95612011-08-31 Jie Zhang <jzhang918@gmail.com>
9562
9563 * server.c (step_thread): Remove definition.
9564 (process_serial_event): Don't handle Hs.
9565 * server.h (step_thread): Remove declaration.
9566 * target.c (set_desired_inferior): Remove use of step_thread.
9567
e3deef73
LM
95682011-08-24 Luis Machado <lgustavo@codesourcery.com>
9569
9570 * linux-low.c: Include linux-procfs.h.
9571 (linux_attach_lwp_1): Update comments.
9572 (linux_attach): Scan for existing threads when attaching to a
9573 process that is the tgid.
9574 * Makefile.in: Update dependencies.
9575
13da1c97
LM
95762011-08-24 Luis Machado <lgustavo@codesourcery.com>
9577
9578 * configure.srv: Add linux-procfs.o dependencies.
9579
881127c9
YQ
95802011-08-14 Yao Qi <yao@codesourcery.com>
9581
9582 * target.h (struct target_ops): Fix indent.
9583 * win32-low.c (win32_target_ops): Fix comment.
9584
58dbd541
YQ
95852011-08-14 Andrew Jenner <andrew@codesourcery.com>
9586 Yao Qi <yao@codesourcery.com>
9587
9588 * Makefile.in (clean): Remove tic6x-*.c files.
9589 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9590 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9591 (tic6x-c64xp-linux.c): Likewise.
9592 * configure.srv: Add support for tic6x-*-uclinux.
9593 * linux-tic6x-low.c: New.
9594 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9595
78d85199
YQ
95962011-08-14 Andrew Stubbs <ams@codesourcery.com>
9597 Yao Qi <yao@codesourcery.com>
9598
9599 * target.h (struct target_ops): Add read_loadmap.
9600 * linux-low.c (struct target_loadseg): New type.
9601 (struct target_loadmap): New type.
9602 (linux_read_loadmap): New function.
9603 (linux_target_ops): Add linux_read_loadmap.
9604 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9605 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9606 to NULL.
78d85199 9607
a959a88d
EZ
96082011-08-05 Eli Zaretskii <eliz@gnu.org>
9609
9610 * win32-low.c: Include <stdint.h>.
9611
1ced966e
PA
96122011-07-22 Pedro Alves <pedro@codesourcery.com>
9613
9614 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9615 to the inferior here.
9616 (i386_remove_aligned_watchpoint): Ditto.
9617 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9618 fit part of the watchpoint in the debug registers.
9619 (i386_update_inferior_debug_regs): New.
9620 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9621 registers, and only update the inferior on success.
9622 (i386_low_remove_watchpoint): Ditto.
9623
d26e3629
KY
96242011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9625
9626 * linux-low.c (compare_ints, unique, list_threads, show_process,
9627 linux_core_of_thread): Delete.
9628 (linux_target_ops): Change linux_core_of_thread to
9629 linux_common_core_of_thread.
9630 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9631 * utils.c (malloc_failure): Change type of argument.
9632 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9633 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9634 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9635 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9636 (IPA_OBJS): Add common-utils-ipa.o.
9637 (ptid_h, linux_osdata_h): New macros.
9638 (server_h): Add common/common-utils.h, common/xml-utils.h,
9639 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9640 common/ptid.h.
9641 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9642 ptid.o, buffer.o): New rules.
9643 (linux-low.o): Add common/linux-osdata.h as a dependency.
9644 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9645 * configure.ac: Add AC_HEADER_DIRENT check.
9646 * config.in: Regenerate.
9647 * configure: Regenerate.
9648 * remote-utils.c (xml_escape_text): Delete.
9649 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9650 buffer_xml_printf): Move to common/buffer.c.
9651 * server.c (main): Remove call to initialize_inferiors.
9652 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9653 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9654 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9655 internal_error, gdb_assert, gdb_assert_fail): Delete.
9656 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9657 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9658 common/buffer.h.
9659 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9660 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9661 initialize_inferiors): Delete.
9662
2275a1a7
PA
96632011-07-20 Pedro Alves <pedro@codesourcery.com>
9664
9665 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9666 symbol error.
9667
0a5b1e09
PA
96682011-05-31 Pedro Alves <pedro@codesourcery.com>
9669
9670 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9671 assertion.
9672 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9673
6938fd34
YQ
96742011-05-26 Yao Qi <yao@codesourcery.com>
9675
9676 * Makefile.in (thread-db.o): Track dependence to
9677 common/gdb_thread_db.h.
9678 * thread-db.c: include gdb_thread_db.h from right place.
9679
b481f9e0
TT
96802011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9681
9682 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9683 __FILE__ and __LINE__ to internal_error.
9684
98a5dd13
DE
96852011-05-13 Doug Evans <dje@google.com>
9686
9687 * thread-db.c (try_thread_db_load_from_sdir): New function.
9688 (try_thread_db_load_from_dir): New function.
9689 (thread_db_load_search): Handle $sdir, ignore $pdir.
9690 Remove trying of system directories if search of
9691 libthread-db-search-path fails, that is now done via $sdir.
9692
d248b706
KY
96932011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9694
9695 * server.c (handle_query): Add EnableDisableTracepoints to the list
9696 of supported features.
43aaf8b6 9697 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9698 tracepoints.
43aaf8b6
PA
9699 (cmd_qtenable_disable): New.
9700 (cmd_qtstart): Install tracepoints even if disabled.
9701 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9702 receiving a QTEnable or QTDisable packet.
9703 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9704 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9705 tracepoints.
9706 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9707
84e578fb
DE
97082011-05-10 Doug Evans <dje@google.com>
9709
9710 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9711
71f55dd8
DE
97122011-05-04 Doug Evans <dje@google.com>
9713
9714 * linux-low.c (linux_join): Skip process lookup.
9715 * spu-low.c (spu_join): Ditto.
9716 * server.c (join_inferiors_callback): Delete.
9717 (process_serial_event): For 'D' packet (detach) call join_inferior
9718 directly.
9719
4d393d60
JM
97202011-05-04 Joseph Myers <joseph@codesourcery.com>
9721
9722 * README: Don't mention xscale*-*-linux*.
9723 * configure.srv (xscale*-*-linux*): Don't handle target.
9724
b00ad6ff
NF
97252011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9726
9727 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9728 casting pointers.
9729 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9730 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9731 (i386_emit_void_call_2): Likewise.
9732
af96c192
YQ
97332011-04-26 Yao Qi <yao@codesourcery.com>
9734
43aaf8b6
PA
9735 * linux-low.c: Move common macros to linux-ptrace.h.
9736 Include linux-ptrace.h.
af96c192
YQ
9737 * Makefile.in (linux_ptrace_h): New.
9738 (linux-low.o): Depends on linux-ptrace.h.
9739
03f2bd59
JK
97402011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9741
9742 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9743 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9744 (remote_prepare): New function with most of the TCP code from ...
9745 (remote_open): ... here. Detect PORT here unconditionally. Move also
9746 setting transport_is_reliable.
9747 * server.c (run_once): New variable.
9748 (gdbserver_usage): Document it.
9749 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9750 the first run if RUN_ONCE.
9751 * server.h (run_once, remote_prepare): New declarations.
9752
7a9dd1b2
TT
97532011-04-19 Tom Tromey <tromey@redhat.com>
9754
9755 * win32-low.c (handle_load_dll): Remove duplicate "the".
9756
81239425
PM
97572011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9758
9759 Remove support for old Cygwin 1.5 versions.
9760 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9761 function to avoid warning.
9762 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9763 warning.
9764
9e0627f1
PM
97652011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9766
9767 * gdbserver/server.h (Macro _): Define it if not available.
9768
588eebee
MS
97692011-03-14 Michael Snyder <msnyder@vmware.com>
9770
348af9f7 9771 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9772
43f70d4c
JB
97732011-03-10 Joel Brobecker <brobecker@adacore.com>
9774
9775 * Makefile.in (maintainer-clean realclean distclean): Remove
9776 "make ... subdir_do" command.
9777
348af9f7
MS
97782011-03-10 Michael Snyder <msnyder@vmware.com>
9779
9780 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9781
9782 * server.c (handle_v_run): Free alloced buffer on early return.
9783
e637a4f5
YQ
97842011-03-09 Yao Qi <yao@codesourcery.com>
9785
9786 Revert:
9787 2011-03-04 Yao Qi <yao@codesourcery.com>
9788
9789 * Makefile.in: Remove GNU make feature --directory.
9790
9791 2011-03-05 Yao Qi <yao@codesourcery.com>
9792
9793 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9794 (subdir_do): New make target. Copied from gdb/Makefile.
9795 (maintainer-clean, realclean, distclean, clean): Call corresponding
9796 make targets in common/Makefile.
9797
9798 2011-02-11 Yao Qi <yao@codesourcery.com>
9799
9800 * configure.ac: Call AC_PROG_RANLIB.
9801 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9802 * configure: Regenerate.
9803
e6edda56
JK
98042011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9805
9806 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9807
e5141119
JB
98082011-03-06 Yao Qi <yao@codesourcery.com>
9809
9810 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9811
64794aa4
JB
98122011-03-05 Yao Qi <yao@codesourcery.com>
9813
9814 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9815 (subdir_do): New make target. Copied from gdb/Makefile.
9816 (maintainer-clean, realclean, distclean, clean): Call corresponding
9817 make targets in common/Makefile.
9818
7a762829
YQ
98192011-03-04 Yao Qi <yao@codesourcery.com>
9820
9821 * Makefile.in: Remove GNU make feature --directory.
9822
348af9f7
MS
98232011-03-04 Michael Snyder <msnyder@vmware.com>
9824
9825 * server.c (queue_stop_reply): Call xmalloc not malloc.
9826
98272011-03-02 Michael Snyder <msnyder@vmware.com>
9828
9829 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9830
9f72fee2
MS
98312011-02-28 Michael Snyder <msnyder@vmware.com>
9832
588eebee
MS
9833 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9834 (cmd_qtframe): Ditto.
9835 (cmd_qtbuffer): Ditto.
9836 (cmd_bigqtbuffer): Ditto.
9837
9f72fee2
MS
9838 * utils.c (decimal2str): Initialize 'width' to nine, then
9839 don't mess with it.
9840
8040bd49
UW
98412011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9842
9843 * hostio.c (require_data): Free *data, not data.
9844
7e52cbd0
JK
98452011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9846
9847 * hostio.c (require_data): Use free, not xfree.
9848
9130f83e
MS
98492011-02-27 Michael Snyder <msnyder@vmware.com>
9850
4b812f4e
MS
9851 * server.c (handle_query): Discard unused value.
9852
9130f83e
MS
9853 * hostio.c (require_data): Free malloc memory before returning
9854 error.
9855
69d37113
MS
98562011-02-26 Michael Snyder <msnyder@vmware.com>
9857
9858 * linux-low.c (list_threads): Call closedir for dirent.
9859
35f5825a
MS
98602011-02-27 Michael Snyder <msnyder@vmware.com>
9861
2a589cef
MS
9862 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9863 a case statement falls through.
9864
0adea5f7
MS
9865 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9866
35f5825a
MS
9867 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9868 in comparison.
9869
238f1c74
MS
98702011-02-26 Michael Snyder <msnyder@vmware.com>
9871
9872 * utils.c (decimal2str): Eliminate dead code and dead param.
9873 (pulongest): Drop dead param from call to decimal2str.
9874 (plongest): Ditto.
9875
633ff500
JB
98762011-02-24 Joel Brobecker <brobecker@adacore.com>
9877
9878 Revert the following patch (not approved yet):
9879 2011-02-21 Hui Zhu <teawater@gmail.com>
9880 * tracepoint.c (tp_printf): New function.
9881 (eval_agent_expr): Handle gdb_agent_op_printf.
9882
f9c6ff72
HZ
98832011-02-21 Hui Zhu <teawater@gmail.com>
9884
9885 * tracepoint.c (tp_printf): New function.
9886 (eval_agent_expr): Handle gdb_agent_op_printf.
9887
94d5e490
TT
98882011-02-18 Tom Tromey <tromey@redhat.com>
9889
9890 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9891 (tracepoint.o): Likewise.
9892 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9893 (gdb_agent_op_names): Likewise.
9894
c7f96d2b
TT
98952011-02-18 Tom Tromey <tromey@redhat.com>
9896
9897 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9898 gdb_agent_op_rot>: New constants.
9899 (gdb_agent_op_names): Add pick and roll.
9900 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9901 cases.
9902
0feedb2c
JK
99032011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9904
9905 * aclocal.m4: Regenerated with aclocal-1.11.1.
9906
b3b9301e
PA
99072011-02-14 Pedro Alves <pedro@codesourcery.com>
9908
9909 * server.c (handle_qxfer_traceframe_info): New.
9910 (qxfer_packets): Register "traceframe-info".
9911 (handle_query): Report support for qXfer:traceframe-info:read+.
9912 * tracepoint.c (match_blocktype): New.
9913 (traceframe_find_block_type): Rename to ...
9914 (traceframe_walk_blocks): ... this. Add callback filter argument,
9915 and use it.
9916 (traceframe_find_block_type): New, reimplemented on top of
9917 traceframe_walk_blocks.
9918 (build_traceframe_info_xml): New.
9919 (traceframe_read_info): New.
9920 * server.h (traceframe_read_info): Declare.
9921
4f3e6fb7
YQ
99222011-02-11 Yao Qi <yao@codesourcery.com>
9923
9924 * configure.ac: Call AC_PROG_RANLIB.
9925 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9926 * configure: Regenerate.
9927
764880b7
PA
99282011-02-07 Pedro Alves <pedro@codesourcery.com>
9929
9930 * server.c (gdb_read_memory): Change return semantics to allow
9931 partial transfers.
9932 (handle_search_memory_1): Adjust.
9933 (process_serial_event) <'m' packet>: Handle partial transfers.
9934 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9935
1c79eb8a
PA
99362011-01-28 Pedro Alves <pedro@codesourcery.com>
9937
9938 * regcache.c (init_register_cache): Initialize
9939 regcache->register_status.
9940 (free_register_cache): Release regcache->register_status.
9941 (regcache_cpy): Copy register_status.
9942 (registers_to_string): Print 'x's for unavailable registers.
9943 (supply_register): Mark the register's status valid or
9944 unavailable, depending on whether a buffer was passed in or not.
9945 (supply_register_zeroed): New.
9946 (supply_regblock): Mark the registers' status valid or
9947 unavailable, depending on whether a buffer was passed in or not.
9948 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9949 (struct regcache): New `register_status' field.
9950 (supply_register_zeroed): Declare.
9951 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9952 supply_register_zeroed, rather than passing a NULL buffer to
9953 supply_register.
9954 * tracepoint.c (fetch_traceframe_registers): Update comment.
9955
85724a0e
PA
99562011-01-28 Pedro Alves <pedro@codesourcery.com>
9957
9958 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9959 buffer explicit.
9960
d08aafef
PA
99612011-01-25 Pedro Alves <pedro@codesourcery.com>
9962
9963 * server.h (decode_xfer_write): Change prototype.
9964 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9965 and don't extract the annex here.
9966 * server.c (decode_xfer_read): Remove `annex' parameter,
9967 and don't extract the annex here.
9968 (decode_xfer): New.
9969 (struct qxfer): New.
9970 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9971 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9972 (handle_qxfer_statictrace): New functions, abstracted out from
9973 handle_query, and made to use the struct qxfer interface.
9974 (handle_threads_qxfer_proper): Rename to ...
9975 (handle_qxfer_threads_proper): ... this.
9976 (handle_threads_qxfer): Rename to ...
9977 (handle_qxfer_threads): ... this. Adjust.
9978 (qxfer_packets): New array.
9979 (handle_qxfer): New function.
9980 (handle_query): Use handle_qxfer.
9981
493e2a69
MS
99822011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9983
9984 * gdbreplay.c: Shorten lines of >= 80 columns.
9985 * linux-low.c: Ditto.
9986 * linux-ppc-low.c: Ditto.
9987 * linux-s390-low.c: Ditto.
9988 * linux-sparc-low.c: Ditto.
9989 * linux-x86-low.c: Ditto.
9990 * linux-xtensa-low.c: Ditto.
9991 * mem-break.c: Ditto.
9992 * nto-low.c: Ditto.
9993 * regcache.h: Ditto.
9994 * remote-utils.c: Ditto.
9995 * server.c: Ditto.
9996 * server.h: Ditto.
9997 * thread-db.c: Ditto.
9998 * tracepoint.c: Ditto.
9999 * utils.c: Ditto.
10000 * win32-low.h: Ditto.
10001
44944448
JB
100022011-01-05 Joel Brobecker <brobecker@adacore.com>
10003
10004 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10005 update.
10006
71ce852c
JB
100072011-01-01 Joel Brobecker <brobecker@adacore.com>
10008
10009 * server.c (gdbserver_version): Update copyright year in version
10010 output.
10011 * gdbreplay.c (gdbreplay_version): Ditto.
10012
eb826dc6
MF
100132010-12-29 Jie Zhang <jie.zhang@analog.com>
10014
10015 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10016 * linux-bfin-low.c: New file.
10017 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10018 PT_DATA_ADDR for BFIN targets.
10019 * Makefile.in (SFILES): Add linux-bfin-low.c.
10020 (clean): Remove reg-bfin.c.
10021 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10022 * README: Mention supported Blackfin targets.
10023
39ab222a
MF
100242010-12-23 Mike Frysinger <vapier@gentoo.org>
10025
10026 * .gitignore: New file.
10027
a1f2ce7d
MF
100282010-11-16 Mike Frysinger <vapier@gentoo.org>
10029
10030 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10031
f474844c
JZ
100322010-10-22 Jie Zhang <jie@codesourcery.com>
10033
10034 * Makefile.in: Add FLAGS_TO_PASS variable.
10035 (install): Remove dependency of install-only and recursively
10036 invoke make for install-only.
10037
f1048712
DE
100382010-10-04 Doug Evans <dje@google.com>
10039
10040 * Makefile.in (uninstall): Use $(DESTDIR).
10041
b53a1623
PA
100422010-09-24 Pedro Alves <pedro@codesourcery.com>
10043
e6ee044d
PA
10044 PR gdb/11842
10045
b53a1623
PA
10046 * linux-x86-low.c (compat_siginfo_from_siginfo)
10047 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10048 si_code is < 0. Check for si_code == SI_TIMER before checking for
10049 si_code < 0.
10050
fa1bd1e4
JB
100512010-09-13 Joel Brobecker <brobecker@adacore.com>
10052
10053 * lynx-i386-low.c: New file.
10054 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10055
47fac8f8
JB
100562010-09-13 Joel Brobecker <brobecker@adacore.com>
10057
10058 * lynx-low.c (ptrace_request_to_str): Remove handling for
10059 request values that have been removed in LynxOS 5.x.
10060
1adfc54d
JB
100612010-09-13 Joel Brobecker <brobecker@adacore.com>
10062
10063 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10064 <ptrace.h>
10065
c2a66c29
NS
100662010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10067
10068 * configure.ac: Add --enable-inprocess-agent option.
10069 * configure: Rebuilt.
10070
32fcada3
YQ
100712010-09-06 Yao Qi <yao@codesourcery.com>
10072
10073 * linux-low.c (linux_kill): Remove unused variable.
10074 (linux_stabilize_threads): Likewise.
10075 * server.c (start_inferior): Likewise.
10076 (queue_stop_reply_callback): Likewise.
10077 * tracepoint.c (do_action_at_tracepoint): Likewise.
10078
0cccb683
YQ
100792010-09-06 Yao Qi <yao@codesourcery.com>
10080
10081 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10082 on return.
10083
423ec54c
JK
100842010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10085
10086 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10087
12ac6819
PA
100882010-09-06 Pedro Alves <pedro@codesourcery.com>
10089
10090 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10091 "$(IPA_DEPFILES)".
10092
8ed54b31
JB
100932010-09-01 Joel Brobecker <brobecker@adacore.com>
10094
10095 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10096 gdbserver/lynx-ppc-low.c: New files.
10097 * Makefile.in (lynx_low_h): New variable.
10098 (lynx-low.o, lynx-ppc-low.o): New rules.
10099 * configure.ac: On LynxOS, link with -lnetinet.
10100 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10101 * configure: regenerate.
10102
bb0116a4
JB
101032010-09-01 Joel Brobecker <brobecker@adacore.com>
10104
10105 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10106 * configure.ac: Add check for vasprintf and vsnprintf.
10107 * configure, config.in: Regenerate.
10108 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10109
a778ab81 101102010-09-01 Joel Brobecker <brobecker@adacore.com>
10111
10112 * gdbreplay.c: Move include of alloca.h up, next to include of
10113 malloc.h.
10114 * server.h: Add include of malloc.h.
10115 * mem-break.c: Remove include of malloc.h.
10116 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10117
8b034a19 101182010-09-01 Joel Brobecker <brobecker@adacore.com>
10119
10120 * Makefile.in (memmem.o): Build with -Wno-error.
10121
101222010-09-01 Joel Brobecker <brobecker@adacore.com>
10123
10124 * utils.c (xsnprintf): Make non-static.
10125 * server.h: Add xsnprintf declaration.
10126 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10127 replace calls to snprintf by calls to xsnprintf throughout.
10128
101292010-09-01 Joel Brobecker <brobecker@adacore.com>
10130
10131 * configure.ac: Add configure check for alloca.
10132 * configure, config.in: Regenerate.
10133 * server.h: Include alloca.h if it exists.
10134 * gdbreplay.c: Include alloca.h if it exists.
10135
1a981360
PA
101362010-08-28 Pedro Alves <pedro@codesourcery.com>
10137
10138 * linux-low.c (__SIGRTMIN): Define if not already defined.
10139 (linux_create_inferior): Check for __ANDROID__ rather than
10140 __SIGRTMIN.
10141 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10142 are already deferred.
10143 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10144 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10145 stopped and already has a pending signal to report.
10146 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10147 a pending signal to report or is moving out of a jump pad.
10148 (linux_init_signals): Check for __ANDROID__ rather than
10149 __SIGRTMIN.
10150
b4d51a55
PA
101512010-08-28 Pedro Alves <pedro@codesourcery.com>
10152
10153 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10154 debug_threads check. Avoid a linear search when not doing debug
10155 output.
10156
ec48365d
PA
101572010-08-27 Pedro Alves <pedro@codesourcery.com>
10158
10159 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10160 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10161 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10162 (process_event): Change local fd's type to gdb_fildes_t.
10163 (create_file_handler): Adjust prototype.
10164 (delete_file_handler): Adjust prototype.
10165 (handle_file_event): Adjust prototype. Use pfildes.
10166 (create_file_event): Adjsut prototype.
10167 * remote-utils.c (remote_desc, listen_desc): Change type to
10168 gdb_fildes_t.
10169 * server.h: New gdb_fildes_t typedef.
10170 [USE_WIN32API]: Include winsock2.h.
10171 (delete_file_handler, add_file_handler): Adjust prototypes.
10172 (pfildes): Declare.
10173 * utils.c (pfildes): New.
10174
854d88f0
PA
101752010-08-27 Pedro Alves <pedro@codesourcery.com>
10176
10177 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10178 * configure: Regenerate.
10179
0146f85b
PA
101802010-08-27 Pedro Alves <pedro@codesourcery.com>
10181
10182 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10183 (linux_done_accessing_memory): ... this.
10184 (linux_target_ops): Adjust.
10185 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10186 * nto-low.c (nto_target_ops): Adjust comment.
10187 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10188 * spu-low.c (spu_target_ops): Adjust comment.
10189 * target.h (target_ops): Rename unprepare_to_access_memory field
10190 to done_accessing_memory.
10191 (unprepare_to_access_memory): Rename to ...
10192 (done_accessing_memory): ... this.
10193
90d74c30
PA
101942010-08-26 Pedro Alves <pedro@codesourcery.com>
10195
10196 * linux-low.c (linux_prepare_to_access_memory): New.
10197 (linux_unprepare_to_access_memory): New.
10198 (linux_target_ops): Install them.
10199 * server.c (read_memory): Rename to ...
10200 (gdb_read_memory): ... this. Use
10201 prepare_to_access_memory/prepare_to_access_memory.
10202 (write_memory): Rename to ...
10203 (gdb_write_memory): ... this. Use
10204 prepare_to_access_memory/prepare_to_access_memory.
10205 (handle_search_memory_1): Adjust.
10206 (process_serial_event): Adjust.
10207 * target.h (struct target_ops): New fields
10208 prepare_to_access_memory and unprepare_to_access_memory.
10209 (prepare_to_access_memory, unprepare_to_access_memory): New.
10210 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10211 prepare_to_access_memory/prepare_to_access_memory.
10212 * nto-low.c (nto_target_ops): Adjust.
10213 * spu-low.c (spu_target_ops): Adjust.
10214 * win32-low.c (win32_target_ops): Adjust.
10215
fd467969
PA
102162010-08-26 Pedro Alves <pedro@codesourcery.com>
10217
10218 * Makefile.in (WARN_CFLAGS): Get it from configure.
10219 (WERROR_CFLAGS): New.
10220 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10221 * configure.ac: Introduce --enable-werror, which adds -Werror to
10222 the compiler command line. Enabled by default. Disable with
10223 --disable-werror. Add -Wdeclaration-after-statement
10224 Wpointer-arith and -Wformat-nonliteral to warning flags.
10225 * configure: Regenerate.
10226
331e2f5f
PA
102272010-08-26 Pedro Alves <pedro@codesourcery.com>
10228
10229 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10230
e581f2b4
PA
102312010-08-26 Pedro Alves <pedro@codesourcery.com>
10232
10233 * gdbreplay.c (remote_error): New.
10234 (gdbchar): New.
10235 (expect): Use gdbchar. Check for error reading from GDB.
10236 Clarify sync error output.
10237 (play): Check for errors writing to GDB.
10238 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10239 * remote-utils.c (getpkt): Check for errors writing to the remote
10240 descriptor.
10241
3c11dd79
PA
102422010-08-25 Pedro Alves <pedro@codesourcery.com>
10243
10244 * linux-low.c (linux_wait_1): Move non-debugging code out of
10245 `debug_threads' control.
10246
d20a8ad9
PA
102472010-08-25 Pedro Alves <pedro@codesourcery.com>
10248
10249 * linux-low.c (linux_wait_1): Don't set last_status here.
10250 * server.c (push_event, queue_stop_reply_callback): Assert we're
10251 not pushing a TARGET_WAITKIND_IGNORE event.
10252 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10253 (myresume, handle_target_event): Set the thread's last_resume_kind
10254 and last_status from the target returned status.
10255
964e4306
PA
102562010-08-25 Pedro Alves <pedro@codesourcery.com>
10257
10258 PR threads/10729
10259
10260 * linux-x86-low.c (update_debug_registers_callback): New.
10261 (i386_dr_low_set_addr): Use it.
10262 (i386_dr_low_get_addr): New.
10263 (i386_dr_low_set_control): Use update_debug_registers_callback.
10264 (i386_dr_low_get_control): New.
10265 (i386_dr_low_get_status): Adjust.
10266 * linux-low.c (linux_stop_lwp): New.
10267 * linux-low.h (linux_stop_lwp): Declare.
10268
10269 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10270 argument instead of a i386_debug_reg_state.
10271 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10272 a i386_debug_reg_state.
10273 (i386_insert_aligned_watchpoint): Adjust.
10274 (i386_remove_aligned_watchpoint): Adjust.
10275 (i386_low_stopped_data_address): Read the debug registers from the
10276 inferior instead of from the mirrors.
10277 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10278 (i386_dr_low_get_addr): Declare.
10279 (i386_dr_low_get_control): Declare.
10280 (i386_dr_low_get_status): Change prototype.
10281
10282 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10283 (i386_dr_low_get_addr): New.
10284 (i386_dr_low_get_control): New.
10285 (i386_dr_low_get_status): Adjust prototype. Return
10286 dr_status_mirror.
10287 (i386_initial_stuff): Clear dr_status_mirror and
10288 dr_control_mirror.
10289 (i386_get_thread_context): Adjust.
10290 (i386_set_thread_context): Adjust.
10291 (i386_thread_added): Adjust.
10292
5f21a75b
PA
102932010-08-24 Pedro Alves <pedro@codesourcery.com>
10294
10295 * linux-low.h (linux_thread_area): Delete declaration.
10296
3e4c1235
TS
102972010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10298
10299 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10300 after its termination.
10301
1971b033
PA
103022010-08-09 Pedro Alves <pedro@codesourcery.com>
10303
10304 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10305 (gdb_wants_all_stopped): Delete.
10306 (linux_wait_1): Don't call them.
10307 * server.c (handle_v_cont): Tag all threads as want-stopped.
10308 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10309 stopped as "client-wants-stopped".
10310
310444ac
PA
103112010-07-31 Pedro Alves <pedro@codesourcery.com>
10312
10313 * Makefile.in (signals_h): New.
10314 (server_h): Depend on it.
10315 (server.o): Don't depend on $(signals_def).
10316 (signals.o): Depend on $(signals_def).
10317
a19cae16
JK
103182010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10319
10320 * Makefile.in (signals_def): New.
10321 (server_h): Append include/gdb/signals.h and signals_def.
10322 (server.o): Append signals_def.
10323
30d50328
JK
103242010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10325
10326 * server.c (handle_target_event): Use target_signal_to_host for
10327 resume_info.sig initialization.
10328 * target.h (struct thread_resume) <sig>: New comment.
10329
5c3216e2
OS
103302010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10331
c6f46ca0
OS
10332 * server.c (handle_query): strcpy() the returned string from paddress()
10333 instead of sprintf().
5c3216e2
OS
10334 * utils.c (paddress): Return phex_nz().
10335
6bd31874
JB
103362010-07-07 Joel Brobecker <brobecker@adacore.com>
10337
10338 * server.c (handle_v_cont): Call mourn_inferior if process
10339 just exited.
10340 (myresume): Likewise.
10341
0fb4aa4b
PA
103422010-07-01 Pedro Alves <pedro@codesourcery.com>
10343
10344 Static tracepoints, and integration with UST.
10345
10346 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10347 * mem-break.c (uninsert_all_breakpoints)
10348 (reinsert_all_breakpoints): New.
10349 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10350 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10351 (gdb_agent_ust_loaded, helper_thread_id)
10352 (gdb_agent_helper_thread_id): New macros.
10353 (struct ipa_sym_addresses): Add addr_ust_loaded,
10354 addr_helper_thread_id, addr_cmd_buf.
10355 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10356 (in_process_agent_loaded_ust): New.
10357 (write_e_ust_not_loaded): New.
10358 (maybe_write_ipa_ust_not_loaded): New.
10359 (struct collect_static_trace_data_action): New.
10360 (enum tracepoint_type) <static_tracepoint>: New.
10361 (struct tracepoint) <handle>: Mention static tracepoints.
10362 (struct static_tracepoint_ctx): New.
10363 (CMD_BUF_SIZE): New.
10364 (add_tracepoint_action): Handle static tracepoint actions.
10365 (unprobe_marker_at): New.
10366 (clear_installed_tracepoints): Handle static tracepoints.
10367 (cmd_qtdp): Handle static tracepoints.
10368 (probe_marker_at): New.
10369 (cmd_qtstart): Handle static tracepoints.
10370 (response_tracepoint): Handle static tracepoints.
10371 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10372 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10373 (get_context_regcache): Handle static tracepoints.
10374 (do_action_at_tracepoint): Handle static tracepoint actions.
10375 (traceframe_find_block_type): Handle static trace data blocks.
10376 (traceframe_read_sdata): New.
10377 (download_tracepoints): Download static tracepoint actions.
10378 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10379 (GDB_PROBE_NAME): New.
10380 (ust_ops): New.
10381 (GET_UST_SYM): New.
10382 (USTF): New.
10383 (dlsym_ust): New.
10384 (ust_marker_to_static_tracepoint): New.
10385 (gdb_probe): New.
10386 (collect_ust_data_at_tracepoint): New.
10387 (gdb_ust_probe): New.
10388 (UNIX_PATH_MAX, SOCK_DIR): New.
10389 (gdb_ust_connect_sync_socket): New.
10390 (resume_thread, stop_thread): New.
10391 (run_inferior_command): New.
10392 (init_named_socket): New.
10393 (gdb_ust_socket_init): New.
10394 (cstr_to_hexstr): New.
10395 (next_st): New.
10396 (first_marker, next_marker): New.
10397 (response_ust_marker): New.
10398 (cmd_qtfstm, cmd_qtsstm): New.
10399 (unprobe_marker_at, probe_marker_at): New.
10400 (cmd_qtstmat, gdb_ust_thread): New.
10401 (gdb_ust_init): New.
10402 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10403 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10404 (ST_REGENTRY): New.
10405 (x86_64_st_collect_regmap): New.
10406 (X86_64_NUM_ST_COLLECT_GREGS): New.
10407 (AMD64_RIP_REGNUM): New.
10408 (supply_static_tracepoint_registers): New.
10409 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10410 (ST_REGENTRY): New.
10411 (i386_st_collect_regmap): New.
10412 (i386_NUM_ST_COLLECT_GREGS): New.
10413 (supply_static_tracepoint_registers): New.
10414 * server.c (handle_query): Handle qXfer:statictrace:read.
10415 <qSupported>: Report support for StaticTracepoints, and
10416 qXfer:statictrace:read features.
10417 * server.h (traceframe_read_sdata)
10418 (supply_static_tracepoint_registers): Declare.
10419 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10420 (unpack_varlen_hex): Include in IPA build.
10421 * Makefile.in (ustlibs, ustinc): New.
10422 (IPA_OBJS): Add remote-utils-ipa.o.
10423 ($(IPA_LIB)): Link -ldl and -lpthread.
10424 (UST_CFLAGS): New.
10425 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10426 * config.in, configure: Regenerate.
10427
9e4344e5
PA
104282010-06-20 Ian Lance Taylor <iant@google.com>
10429 Pedro Alves <pedro@codesourcery.com>
10430
10431 * linux-x86-low.c (always_true): Delete.
10432 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10433 trying to fool the compiler with always_true.
10434
c6beb2cb
PA
104352010-06-20 Pedro Alves <pedro@codesourcery.com>
10436
10437 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10438 conditions in gdbserver.
10439
d2ed6730
UW
104402010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10441
10442 * spu-low.c (spu_read_memory): Wrap around local store limit.
10443 (spu_write_memory): Likewise.
10444
4e29fb54
PA
104452010-06-15 Pedro Alves <pedro@codesourcery.com>
10446
10447 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10448 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10449 LONGEST uses.
10450 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10451 uses.
10452 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10453 uses with LONGEST uses.
10454
6a271cae
PA
104552010-06-14 Stan Shebs <stan@codesourcery.com>
10456 Pedro Alves <pedro@codesourcery.com>
10457
10458 Bytecode compiler.
10459
10460 * linux-x86-low.c: Include limits.h.
10461 (add_insns): New.
10462 (always_true): New.
10463 (EMIT_ASM): New.
10464 (EMIT_ASM32): New.
10465 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10466 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10467 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10468 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10469 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10470 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10471 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10472 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10473 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10474 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10475 (amd64_emit_void_call_2): New.
10476 (amd64_emit_ops): New.
10477 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10478 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10479 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10480 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10481 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10482 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10483 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10484 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10485 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10486 (i386_emit_stack_adjust, i386_emit_int_call_1)
10487 (i386_emit_void_call_2): New.
10488 (i386_emit_ops): New.
10489 (x86_emit_ops): New.
10490 (the_low_target): Install x86_emit_ops.
10491 * server.h (struct emit_ops): New.
10492 (get_raw_reg_func_addr): Declare.
10493 (current_insn_ptr, emit_error): Declare.
10494 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10495 (set_trace_state_variable_value): New defines.
10496 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10497 addr_get_trace_state_variable_value and
10498 addr_set_trace_state_variable_value.
10499 (symbol_list): New fields for get_raw_reg,
10500 get_trace_state_variable_value and set_trace_state_variable_value.
10501 (condfn): New typedef.
10502 (struct tracepoint): New field `compiled_cond'.
10503 (do_action_at_tracepoint): Clear compiled_cond.
10504 (get_trace_state_variable_value, set_trace_state_variable_value):
10505 Export in the IPA.
10506 (condition_true_at_tracepoint): If there's a compiled condition,
10507 run that.
10508 (current_insn_ptr, emit_error): New globals.
10509 (struct bytecode_address): New.
10510 (get_raw_reg_func_addr): New.
10511 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10512 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10513 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10514 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10515 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10516 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10517 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10518 (compile_tracepoint_condition, compile_bytecodes): New.
10519 * target.h (emit_ops): Forward declare.
10520 (struct target_ops): New field emit_ops.
10521 (target_emit_ops): New.
10522 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10523 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10524 * linux-low.c (linux_emit_ops): New.
10525 (linux_target_ops): Install it.
10526 * linux-low.h (struct linux_target_ops): New field emit_ops.
10527
92b72907
UW
105282010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10529
10530 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10531 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10532
fa593d66
PA
105332010-06-01 Pedro Alves <pedro@codesourcery.com>
10534 Stan Shebs <stan@codesourcery.com>
10535
10536 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10537 (all): Depend on $(extra_libraries).
10538 (install-only): Install the IPA.
10539 (IPA_OBJS, IPA_LIB): New.
10540 (clean): Remove the IPA lib.
10541 (IPAGENT_CFLAGS): New.
10542 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10543 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10544 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10545 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10546 * configure.ac: Check for atomic builtins support in the compiler.
10547 (IPA_DEPFILES, extra_libraries): Define.
10548 * configure.srv (ipa_obj): Add description.
10549 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10550 (i[34567]86-*-linux*): Set ipa_obj.
10551 (x86_64-*-linux*): Set ipa_obj.
10552 * linux-low.c (stabilizing_threads): New.
10553 (supports_fast_tracepoints): New.
10554 (linux_detach): Stabilize threads before detaching.
10555 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10556 the lwp is either not stabilizing, or is moving out of a jump pad.
10557 (linux_fast_tracepoint_collecting): New.
10558 (maybe_move_out_of_jump_pad): New.
10559 (enqueue_one_deferred_signal): New.
10560 (dequeue_one_deferred_signal): New.
10561 (linux_wait_for_event_1): If moving out of a jump pad, defer
10562 pending signals to later.
10563 (linux_stabilize_threads): New.
10564 (linux_wait_1): Check if threads need moving out of jump pads, and
10565 do it if so.
10566 (stuck_in_jump_pad_callback): New.
10567 (move_out_of_jump_pad_callback): New.
10568 (lwp_running): New.
10569 (linux_resume_one_lwp): Handle moving out of jump pads.
10570 (linux_set_resume_request): Dequeue deferred signals.
10571 (need_step_over_p): Also step over fast tracepoint jumps.
10572 (start_step_over): Also uninsert fast tracepoint jumps.
10573 (finish_step_over): Also reinsert fast tracepoint jumps.
10574 (linux_install_fast_tracepoint_jump): New.
10575 (linux_target_ops): Install linux_stabilize_threads and
10576 linux_install_fast_tracepoint_jump_pad.
10577 * linux-low.h (linux_target_ops) <get_thread_area,
10578 install_fast_tracepoint_jump_pad>: New fields.
10579 (struct lwp_info) <collecting_fast_tracepoint,
10580 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10581 (linux_get_thread_area): Declare.
10582 * linux-x86-low.c (jump_insn): New.
10583 (x86_get_thread_area): New.
10584 (append_insns): New.
10585 (push_opcode): New.
10586 (amd64_install_fast_tracepoint_jump_pad): New.
10587 (i386_install_fast_tracepoint_jump_pad): New.
10588 (x86_install_fast_tracepoint_jump_pad): New.
10589 (the_low_target): Install x86_get_thread_area and
10590 x86_install_fast_tracepoint_jump_pad.
10591 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10592 (struct fast_tracepoint_jump): New.
10593 (fast_tracepoint_jump_insn): New.
10594 (fast_tracepoint_jump_shadow): New.
10595 (find_fast_tracepoint_jump_at): New.
10596 (fast_tracepoint_jump_here): New.
10597 (delete_fast_tracepoint_jump): New.
10598 (set_fast_tracepoint_jump): New.
10599 (uninsert_fast_tracepoint_jumps_at): New.
10600 (reinsert_fast_tracepoint_jumps_at): New.
10601 (set_breakpoint_at): Use write_inferior_memory.
10602 (uninsert_raw_breakpoint): Use write_inferior_memory.
10603 (check_mem_read): Mask out fast tracepoint jumps.
10604 (check_mem_write): Mask out fast tracepoint jumps.
10605 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10606 (set_fast_tracepoint_jump): Declare.
10607 (delete_fast_tracepoint_jump)
10608 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10609 (reinsert_fast_tracepoint_jumps_at): Declare.
10610 * regcache.c: Don't compile many functions when building the
10611 in-process agent library.
10612 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10613 the register buffer in the heap.
10614 (free_register_cache): If the register buffer isn't owned by the
10615 regcache, don't free it.
10616 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10617 pre-existing register caches.
10618 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10619 type.
10620 (convert_ascii_to_int): : Constify `from' parameter type.
10621 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10622 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10623 the needed buffer in-place.
10624 (relocate_instruction): New.
10625 * server.c (handle_query) <qSymbols>: If the target supports
10626 tracepoints, give it a chance of looking up symbols. Report
10627 support for fast tracepoints.
10628 (handle_status): Stabilize threads.
10629 (process_serial_event): Adjust.
10630 * server.h (struct fast_tracepoint_jump): Forward declare.
10631 (struct process_info) <fast_tracepoint_jumps>: New field.
10632 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10633 (decode_X_packet, decode_M_packet): Adjust.
10634 (relocate_instruction): Declare.
10635 (in_process_agent_loaded): Declare.
10636 (tracepoint_look_up_symbols): Declare.
10637 (struct fast_tpoint_collect_status): Declare.
10638 (fast_tracepoint_collecting): Declare.
10639 (force_unlock_trace_buffer): Declare.
10640 (handle_tracepoint_bkpts): Declare.
10641 (initialize_low_tracepoint)
10642 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10643 * target.h (struct target_ops) <stabilize_threads,
10644 install_fast_tracepoint_jump_pad>: New fields.
10645 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10646 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10647 [HAVE_STDINT_H]: Include stdint.h.
10648 (trace_debug_1): Rename to ...
10649 (trace_vdebug): ... this.
10650 (trace_debug): Rename to ...
10651 (trace_debug_1): ... this. Add `level' parameter.
10652 (trace_debug): New.
10653 (ATTR_USED, ATTR_NOINLINE): New.
10654 (IP_AGENT_EXPORT): New.
10655 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10656 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10657 (about_to_request_buffer_space, trace_buffer_is_full)
10658 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10659 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10660 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10661 (traceframe_write_count, traceframes_created)
10662 (trace_state_variables)
10663 New renaming defines.
10664 (struct ipa_sym_addresses): New.
10665 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10666 (symbol_list): New.
10667 (ipa_sym_addrs): New.
10668 (all_tracepoint_symbols_looked_up): New.
10669 (in_process_agent_loaded): New.
10670 (write_e_ipa_not_loaded): New.
10671 (maybe_write_ipa_not_loaded): New.
10672 (tracepoint_look_up_symbols): New.
10673 (debug_threads) [IN_PROCESS_AGENT]: New.
10674 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10675 (UNKNOWN_SIDE_EFFECTS): New.
10676 (stop_tracing): New.
10677 (flush_trace_buffer): New.
10678 (stop_tracing_bkpt): New.
10679 (flush_trace_buffer_bkpt): New.
10680 (read_inferior_integer): New.
10681 (read_inferior_uinteger): New.
10682 (read_inferior_data_pointer): New.
10683 (write_inferior_data_pointer): New.
10684 (write_inferior_integer): New.
10685 (write_inferior_uinteger): New.
10686 (struct collect_static_trace_data_action): Delete.
10687 (enum tracepoint_type): New.
10688 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10689 <actions_str, step_actions, step_actions_str>: Only include in
10690 GDBserver.
fa593d66
PA
10691 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10692 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10693 (tracepoints): Use IP_AGENT_EXPORT.
10694 (last_tracepoint): Don't include in the IPA.
10695 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10696 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10697 (alloced_trace_state_variables): New.
10698 (trace_state_variables): Use IP_AGENT_EXPORT.
10699 (traceframe_t): Delete unused variable.
10700 (circular_trace_buffer): Don't include in the IPA.
10701 (trace_buffer_start): Delete.
10702 (struct trace_buffer_control): New.
10703 (trace_buffer_free): Delete.
10704 (struct ipa_trace_buffer_control): New.
10705 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10706 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10707 New.
10708 (trace_buffer_ctrl): New.
10709 (TRACE_BUFFER_CTRL_CURR): New.
10710 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10711 Reimplement as macros.
10712 (trace_buffer_wrap): Delete.
10713 (traceframe_write_count, traceframe_read_count)
10714 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10715 (struct tracepoint_hit_ctx) <type>: New field.
10716 (struct fast_tracepoint_ctx): New.
10717 (memory_barrier): New.
10718 (cmpxchg): New.
10719 (record_tracepoint_error): Update atomically in the IPA.
10720 (clear_inferior_trace_buffer): New.
10721 (about_to_request_buffer_space): New.
10722 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10723 updating the same buffer.
10724 (add_tracepoint): Default the tracepoint's type to trap
10725 tracepoint, and orig_size to -1.
10726 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10727 internal variables.
10728 (create_trace_state_variable): New parameter `gdb'. Handle it.
10729 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10730 (cmd_qtdp): Handle fast tracepoints.
10731 (cmd_qtdv): Adjust.
10732 (max_jump_pad_size): New.
10733 (gdb_jump_pad_head): New.
10734 (get_jump_space_head): New.
10735 (claim_jump_space): New.
10736 (sort_tracepoints): New.
10737 (MAX_JUMP_SIZE): New.
10738 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10739 IPA.
10740 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10741 support. Upload fast traceframes, and delete internal IPA
10742 breakpoints.
10743 (stop_tracing_handler): New.
10744 (flush_trace_buffer_handler): New.
10745 (cmd_qtstop): Upload fast tracepoints.
10746 (response_tracepoint): Handle fast tracepoints.
10747 (tracepoint_finished_step): Upload fast traceframes. Set the
10748 tracepoint hit context's tracepoint type.
10749 (handle_tracepoint_bkpts): New.
10750 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10751 type. Add comment about fast tracepoints.
10752 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10753 non-existing action_str field.
10754 (get_context_regcache): Handle fast tracepoints.
10755 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10756 to the regcache.
10757 (fast_tracepoint_from_jump_pad_address): New.
10758 (fast_tracepoint_from_ipa_tpoint_address): New.
10759 (collecting_t): New.
10760 (force_unlock_trace_buffer): New.
10761 (fast_tracepoint_collecting): New.
10762 (collecting): New.
10763 (gdb_collect): New.
10764 (write_inferior_data_ptr): New.
10765 (target_tp_heap): New.
10766 (target_malloc): New.
10767 (download_agent_expr): New.
10768 (UALIGN): New.
10769 (download_tracepoints): New.
10770 (download_trace_state_variables): New.
10771 (upload_fast_traceframes): New.
10772 (IPA_FIRST_TRACEFRAME): New.
10773 (IPA_NEXT_TRACEFRAME_1): New.
10774 (IPA_NEXT_TRACEFRAME): New.
10775 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10776 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10777 (gdb_jump_pad_buffer_end): New.
10778 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10779 (initialize_tracepoint): Adjust.
10780 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10781 buffer. Initialize the low module.
10782 * utils.c (PREFIX, TOOLNAME): New.
10783 (malloc_failure): Use PREFIX.
10784 (error): In the IPA, an error causes an exit.
10785 (fatal, warning): Use PREFIX.
10786 (internal_error): Use TOOLNAME.
10787 (NUMCELLS): Increase to 10.
10788 * configure, config.in: Regenerate.
10789
d149dd1d
PA
107902010-06-01 Pedro Alves <pedro@codesourcery.com>
10791
10792 * server.c (handle_query) <qSupported>: Do two passes over the
10793 qSupported string to avoid nesting strtok.
10794
f6528abd
JK
107952010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10796
10797 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10798 (CDEPS): New.
10799 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10800 -Wl,--dynamic-list.
10801 * configure: Regenerate.
10802 * proc-service.list: New.
10803
ca2a87a0
JK
108042010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10805
10806 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10807 New comment.
10808
363a6e9f
OS
108092010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10810
10811 * gdbreplay.c (remote_open): Check error return from socket() call by
10812 its equality to -1 not by it being negative.
10813 * remote-utils.c (remote_open): Likewise.
10814
d23b6cb1
PA
108152010-05-23 Pedro Alves <pedro@codesourcery.com>
10816
10817 * config.h: Regenerate.
10818
28d3cf85
MK
108192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10820
10821 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10822 doesn't provide PTRACE_GET_THREAD_AREA.
10823
fea36a59
MK
108242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10825
10826 * linux-m68k-low.c: Include <asm/ptrace.h>
10827 (ps_get_thread_area): Implement.
10828
24b066ba
DE
108292010-05-03 Doug Evans <dje@google.com>
10830
10831 * event-loop.c (struct callback_event): New struct.
10832 (callback_list): New global.
10833 (append_callback_event, delete_callback_event): New functions.
10834 (process_callback): New function.
10835 (start_event_loop): Call it.
10836 * remote-utils.c (NOT_SCHEDULED): Define.
10837 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10838 moved out of readchar.
10839 (readchar): Rewrite. Call reschedule before returning.
10840 (reset_readchar): New function.
10841 (remote_close): Call it.
10842 (process_remaining, reschedule): New functions.
10843 * server.h (callback_handler_func): New typedef.
10844 (append_callback_event, delete_callback_event): Declare.
10845
9836d6ea
PA
108462010-05-03 Pedro Alves <pedro@codesourcery.com>
10847
10848 * proc-service.c (ps_pglobal_lookup): Use
10849 thread_db_look_up_one_symbol.
10850 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10851 parameter. Use it instead of all_symbols_looked_up.
10852 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10853 field.
10854 (all_symbols_looked_up): Don't declare.
10855 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10856 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10857 field.
10858 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10859 Set all_symbols_looked_up here.
10860 (thread_db_look_up_one_symbol): New.
10861 (thread_db_get_tls_address): Adjust.
10862 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10863 thread_db object on the heap, and tentatively set it in the
10864 process structure.
10865 (thread_db_init): Don't set all_symbols_looked_up here.
10866 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10867
7984d532
PA
108682010-05-03 Pedro Alves <pedro@codesourcery.com>
10869
10870 * linux-low.c (linux_kill, linux_detach): Adjust.
10871 (status_pending_p_callback): Remove redundant statement. Check
10872 for !TARGET_WAITIKIND_IGNORE, instead of
10873 TARGET_WAITKIND_STOPPED.
10874 (handle_tracepoints): Make sure LWP is locked. Adjust.
10875 (linux_wait_for_event_1): Adjust.
10876 (linux_cancel_breakpoints): New.
10877 (unsuspend_one_lwp): New.
10878 (unsuspend_all_lwps): New.
10879 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10880 (send_sigstop_callback): Change return type to int, add new
10881 `except' parameter and handle it.
10882 (suspend_and_send_sigstop_callback): New.
10883 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10884 pass them down. If SUSPEND, also increment the lwp's suspend
10885 count.
10886 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10887 (need_step_over_p): Don't consider suspended LWPs.
10888 (start_step_over): Adjust.
10889 (proceed_one_lwp): Change return type to int, add new `except'
10890 parameter and handle it.
10891 (unsuspend_and_proceed_one_lwp): New.
10892 (proceed_all_lwps): Use find_inferior instead of
10893 for_each_inferior.
10894 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10895 also decrement the suspend count of LWPs. Pass `except' down,
10896 instead of hacking its suspend count.
10897 (linux_pause_all): Add `freeze' parameter. Adjust.
10898 (linux_unpause_all): New.
10899 (linux_target_ops): Install linux_unpause_all.
10900 * server.c (handle_status): Adjust.
10901 * target.h (struct target_ops): New fields `unpause_all' and
10902 `cancel_breakpoints'. Add new parameter to `pause_all'.
10903 (pause_all): Add new `freeze' parameter.
10904 (unpause_all): New.
10905 (cancel_breakpoints): New.
10906 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10907 cancel breakpoints.
10908 (cmd_qtstart): Pause threads.
10909 (stop_tracing): Pause threads, and cancel breakpoints.
10910 * win32-low.c (win32_target_ops): Adjust.
10911
e471f25b
PA
109122010-05-03 Pedro Alves <pedro@codesourcery.com>
10913
10914 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10915 the inferior right away from here...
10916 (linux_wait_1): ... to here, and adjust to check the thread's
10917 last_resume_kind instead of the lwp's step or stop_expected flags.
10918
1915ef4f
PA
109192010-05-02 Pedro Alves <pedro@codesourcery.com>
10920
10921 * README: Use consistent `GDB' and `GDBserver' spellings.
10922
f9e39928
PA
109232010-05-02 Pedro Alves <pedro@codesourcery.com>
10924
10925 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10926 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10927 (linux_detach_one_lwp): Assume the lwp is stopped.
10928 (any_thread_of): Delete.
10929 (linux_detach): Stop all lwps here. Don't blindly delete all
10930 breakpoints.
10931 (delete_lwp_callback): New.
10932 (linux_mourn): Delete all lwps of the process that is gone.
10933 (linux_wait_1): Don't delete the last lwp of the process here.
10934 * mem-break.h (mark_breakpoints_out): Declare.
10935 * mem-break.c (mark_breakpoints_out): New.
10936 (free_all_breakpoints): Use it.
10937 * server.c (handle_target_event): If the process is gone, mark
10938 breakpoints out.
10939 * thread-db.c (struct thread_db) <create_bp>: New field.
10940 (thread_db_enable_reporting): Fix prototype. Store a thread event
10941 breakpoint reference in the thread_db struct.
10942 (thread_db_load_search): Clear the thread_db object.
10943 (try_thread_db_load_1): Ditto.
10944 (switch_to_process): New.
10945 (disable_thread_event_reporting): Use it.
10946 (remove_thread_event_breakpoints): New.
10947 (thread_db_detach, thread_db_mourn): Use it.
10948
1e7fc18c
PA
109492010-05-01 Pedro Alves <pedro@codesourcery.com>
10950
10951 * linux-low.c (linux_enable_event_reporting): New.
10952 (linux_wait_for_event_1, handle_extended_wait): Use it.
10953
02fc4de7
PA
109542010-04-30 Pedro Alves <pedro@codesourcery.com>
10955
10956 * linux-low.c (linux_kill_one_lwp, linux_kill)
10957 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10958 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10959 SIGSTOP even if the LWP is stopped.
10960 (send_sigstop_callback): New.
10961 (stop_all_lwps): Use send_sigstop_callback instead.
10962 (linux_resume_one_thread): Adjust.
10963 (proceed_one_lwp): Still proceed an LWP that the client has
10964 requested to stop, if we haven't reported it as stopped yet. Make
10965 sure that LWPs the client want stopped, have a pending SIGSTOP.
10966
bc3b5632
DE
109672010-04-26 Doug Evans <dje@google.com>
10968
ae1ada35
DE
10969 * server.c (handle_general_set): Make static.
10970
bc3b5632
DE
10971 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10972 Print received char after testing for error/eof instead of before.
10973 (input_interrupt): Tweak comment.
10974
65730243
DE
109752010-04-23 Doug Evans <dje@google.com>
10976
10977 * server.c (start_inferior): Print inferior argv if --debug.
10978
a8ae7dc0
AR
109792010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10980
10981 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10982 * nto-x86-low.c: Include server.h
10983
1c07cc19
PM
109842010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10985
10986 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10987 be consistent with other sources of this directory.
10988 (init_registers_amd64): Correct name of source file of this function
10989 in the comment.
10990
e0a61e09
PM
109912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10992
10993 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10994 64-bit executables.
10995
54709339
PM
109962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10997
10998 * win32-i386-low.c: Add 64-bit support.
10999 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11000 (init_registers_amd64): Declare.
11001 (mappings): Add 64-bit version of array.
11002 (init_windows_x86): New function.
11003 (the_low_target): Change init_arch field to init_windows_x86.
11004
e8f0053d
PM
110052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11006
11007 * win32-low.c: Adapt to support also 64-bit architecture.
11008 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11009 (get_image_name): Use SIZE_T type for local variable `done'.
11010 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11011 (toolhelp_get_dll_name): Idem.
11012 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11013 Use uintptr_t typecast to avoid warning.
11014 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11015 (handle_exception): Use phex_nz to avoid warning.
11016 (win32_wait): Remove unused local variable `process'.
11017
c481e77e
PM
110182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11019
11020 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11021 `amd64-avx.o'.
11022
12ea4b69
PM
110232010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11024
11025 * configure.ac: Use `ws2_32' library for srv_mingw.
11026 * configure: Regenerate.
11027 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11028 * remote-utils.c: Likewise.
11029
f6d1620c
L
110302010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11031
11032 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11033 if __x86_64__ is defined.
11034
8e642873
PM
110352010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11036
11037 * configure: Regenerate.
11038
711e434b
PM
110392010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11040
11041 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11042 * target.h (target_ops): New get_tib_address field.
11043 * win32-low.h (win32_thread_info): Add thread_local_base field.
11044 * win32-low.c (child_add_thread): Add tlb argument.
11045 Set thread_local_base field to TLB.
11046 (get_child_debug_event): Adapt to child_add_thread change.
11047 (win32_get_tib_address): New function.
11048 (win32_target_ops): Set get_tib_address field to
11049 win32_get_tib_address.
11050 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11051
505106cd
PA
110522010-04-12 Pedro Alves <pedro@codesourcery.com>
11053
505106cd
PA
11054 * linux-low.c (linux_mourn): Also remove the process.
11055 * server.c (handle_target_event): Don't remove the process here.
11056 * nto-low.c (nto_mourn): New.
11057 (nto_target_ops): Install it.
11058 * spu-low.c (spu_mourn): New.
11059 (spu_target_ops): Install it.
11060 * win32-low.c (win32_mourn): New.
11061 (win32_target_ops): Install it.
11062
e8470a06
PA
110632010-04-12 Pedro Alves <pedro@codesourcery.com>
11064
11065 * server.h (buffer_xml_printf): Remove redundant `;'.
11066
45ba0d02
PA
110672010-04-12 Pedro Alves <pedro@codesourcery.com>
11068
11069 * regcache.c (set_register_cache): Invalidate regcaches before
11070 changing the register cache layout.
11071 (regcache_invalidate_one): Allow a NULL regcache.
11072 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11073 regcaches before changing the register cache layout or the target
11074 regsets.
11075
59e04013
L
110762010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11077
11078 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11079 variable warning on Linux/x86-64.
11080
8336d594
PA
110812010-04-11 Pedro Alves <pedro@codesourcery.com>
11082
11083 GDBserver disconnected tracing support.
11084
11085 * linux-low.c (linux_remove_process): Delete.
11086 (add_lwp): Don't set last_resume_kind here.
11087 (linux_kill): Use `mourn'.
11088 (linux_detach): Use `thread_db_detach', and `mourn'.
11089 (linux_mourn): New.
11090 (linux_attach_lwp_1): Adjust comment.
11091 (linux_attach): last_resume_kind moved the thread_info; adjust.
11092 (status_pending_p_callback): Adjust.
11093 (linux_wait_for_event_1): Adjust.
11094 (count_events_callback, select_singlestep_lwp_callback)
11095 (select_event_lwp_callback, cancel_breakpoints_callback)
11096 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11097 (proceed_one_lwp): Adjust.
11098 (linux_async): Add debug output.
11099 (linux_thread_stopped): New.
11100 (linux_pause_all): New.
11101 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11102 linux_pause_all.
11103 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11104 (thread_db_free): Delete declaration.
11105 (thread_db_detach, thread_db_mourn): Declare.
11106 * thread-db.c (thread_db_init): Use thread_db_mourn.
11107 (thread_db_free): Delete, split in two.
11108 (disable_thread_event_reporting): New.
11109 (thread_db_detach): New.
11110 (thread_db_mourn): New.
11111
11112 * server.h (struct thread_info) <last_resume_kind>: New field.
11113 <attached>: Add comment.
11114 <gdb_detached>: New field.
11115 (handler_func): Change return type to int.
11116 (handle_serial_event, handle_target_event): Ditto.
11117 (gdb_connected): Declare.
11118 (tracing): Delete.
11119 (disconnected_tracing): Declare.
11120 (stop_tracing): Declare.
11121
11122 * server.c (handle_query) <qSupported>: Report support for
11123 disconnected tracing.
11124 (queue_stop_reply_callback): Account for running threads.
11125 (gdb_wants_thread_stopped): New.
11126 (gdb_wants_all_threads_stopped): New.
11127 (gdb_reattached_process): New.
11128 (handle_status): Clear the `gdb_detached' flag of all processes.
11129 In all-stop, stop all threads.
11130 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11131 (process_serial_event): If the remote connection breaks, or if an
11132 exit was forced with "monitor exit", force an event loop exit.
11133 Handle disconnected tracing on detach.
11134 (handle_serial_event): Adjust.
11135 (handle_target_event): If GDB isn't connected, forward events back
11136 to the inferior, unless the last process exited, in which case,
11137 exit gdbserver. Adjust interface.
11138
11139 * remote-utils.c (remote_open): Don't block in accept. Instead
11140 register an event loop source on the listen socket file
11141 descriptor. Refactor bits into ...
11142 (listen_desc): ... this new global.
11143 (gdb_connected): ... this new function.
11144 (enable_async_notification): ... this new function.
11145 (handle_accept_event): ... this new function.
11146 (remote_close): Clear remote_desc.
11147
11148 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11149
11150 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11151 New fields.
11152 (mourn_inferior): Define.
11153 (target_process_qsupported): Avoid the dangling else problem.
11154 (thread_stopped): Define.
11155 (pause_all): Define.
11156 (target_waitstatus_to_string): Declare.
11157 * target.c (target_waitstatus_to_string): New.
11158
11159 * tracepoint.c (tracing): Make extern.
11160 (disconnected_tracing): New.
11161 (stop_tracing): Make extern. Handle tracing stops due to GDB
11162 disconnecting.
11163 (cmd_qtdisconnected): New.
11164 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11165 (handle_tracepoint_general_set): Handle QTDisconnected.
11166
11167 * event-loop.c (event_handler_func): Change return type to int.
11168 (process_event): Bail out if the event handler wants the event
11169 loop to stop.
11170 (handle_file_event): Ditto.
11171 (start_event_loop): Bail out if the event handler wants the event
11172 loop to stop.
11173
11174 * nto-low.c (nto_target_ops): Adjust.
11175 * spu-low.c (spu_wait): Don't remove the process here.
11176 (spu_target_ops): Adjust.
11177 * win32-low.c (win32_wait): Don't remove the process here.
11178 (win32_target_ops): Adjust.
11179
5d267c4c
PA
111802010-04-11 Pedro Alves <pedro@codesourcery.com>
11181
11182 * regcache.c (realloc_register_cache): Invalidate inferior's
11183 regcache before recreating it.
11184
623ccd72
PA
111852010-04-09 Pedro Alves <pedro@codesourcery.com>
11186
11187 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11188
219f2f23
PA
111892010-04-09 Stan Shebs <stan@codesourcery.com>
11190 Pedro Alves <pedro@codesourcery.com>
11191
11192 * server.h (LONGEST): New.
11193 (struct thread_info) <while_stepping>: New field.
11194 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11195 Declare.
11196 (initialize_tracepoint, handle_tracepoint_general_set)
11197 (handle_tracepoint_query, tracepoint_finished_step)
11198 (tracepoint_was_hit, release_while_stepping_state_list):
11199 (current_traceframe): Declare.
11200 * server.c (handle_general_set): Handle tracepoint packets.
11201 (read_memory): New.
11202 (write_memory): New.
11203 (handle_search_memory_1): Use read_memory.
11204 (handle_query): Report support for conditional tracepoints, trace
11205 state variables, and tracepoint sources. Handle tracepoint
11206 queries.
11207 (main): Initialize the tracepoints module.
11208 (process_serial_event): Handle traceframe reads/writes.
11209
11210 * linux-low.c (handle_tracepoints): New.
11211 (linux_wait_1): Call it.
11212 (linux_resume_one_lwp): Handle while-stepping.
11213 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11214 (linux_target_ops): Install them.
11215 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11216 New field.
11217 * linux-x86-low.c (x86_supports_tracepoints): New.
11218 (the_low_target). Install it.
11219
11220 * mem-break.h (delete_breakpoint): Declare.
11221 * mem-break.c (delete_breakpoint): Make external.
11222
11223 * target.h (struct target_ops): Add `supports_tracepoints',
11224 `read_pc', and `write_pc' fields.
11225 (target_supports_tracepoints): Define.
11226 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11227 (phex_nz): New.
11228
11229 * regcache.h (struct regcache) <registers_owned>: New field.
11230 (init_register_cache, regcache_cpy): Declare.
11231 (regcache_read_pc, regcache_write_pc): Declare.
11232 (register_cache_size): Declare.
11233 (supply_regblock): Declare.
11234 * regcache.c (init_register_cache): New.
11235 (new_register_cache): Use it.
11236 (regcache_cpy): New.
11237 (register_cache_size): New.
11238 (supply_regblock): New.
11239 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11240
219f2f23
PA
11241 * tracepoint.c: New.
11242
11243 * Makefile.in (OBS): Add tracepoint.o.
11244 (tracepoint.o): New rule.
11245
3a13a53b
L
112462010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11247
11248 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11249 (i386-mmx.o): New.
11250 (i386-mmx.c): Likewise.
11251 (i386-mmx-linux.o): Likewise.
11252 (i386-mmx-linux.c): Likewise.
11253
11254 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11255 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11256 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11257 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11258
11259 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11260 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11261 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11262
1570b33e
L
112632010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11264
11265 * Makefile.in (clean): Updated.
11266 (i386-avx.o): New.
11267 (i386-avx.c): Likewise.
11268 (i386-avx-linux.o): Likewise.
11269 (i386-avx-linux.c): Likewise.
11270 (amd64-avx.o): Likewise.
11271 (amd64-avx.c): Likewise.
11272 (amd64-avx-linux.o): Likewise.
11273 (amd64-avx-linux.c): Likewise.
11274
11275 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11276 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11277 (srv_amd64_regobj): Add amd64-avx.o.
11278 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11279 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11280 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11281 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11282 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11283 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11284 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11285
11286 * i387-fp.c: Include "i386-xstate.h".
11287 (i387_xsave): New.
11288 (i387_cache_to_xsave): Likewise.
11289 (i387_xsave_to_cache): Likewise.
11290 (x86_xcr0): Likewise.
11291
11292 * i387-fp.h (i387_cache_to_xsave): Likewise.
11293 (i387_xsave_to_cache): Likewise.
11294 (x86_xcr0): Likewise.
11295
11296 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11297 * linux-crisv32-low.c (target_regsets): Likewise.
11298 * linux-m68k-low.c (target_regsets): Likewise.
11299 * linux-mips-low.c (target_regsets): Likewise.
11300 * linux-ppc-low.c (target_regsets): Likewise.
11301 * linux-s390-low.c (target_regsets): Likewise.
11302 * linux-sh-low.c (target_regsets): Likewise.
11303 * linux-sparc-low.c (target_regsets): Likewise.
11304 * linux-xtensa-low.c (target_regsets): Likewise.
11305
11306 * linux-low.c: Include <sys/uio.h>.
11307 (regsets_fetch_inferior_registers): Support nt_type.
11308 (regsets_store_inferior_registers): Likewise.
11309 (linux_process_qsupported): New.
11310 (linux_target_ops): Add linux_process_qsupported.
11311
11312 * linux-low.h (regset_info): Add nt_type.
11313 (linux_target_ops): Add process_qsupported.
11314
11315 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11316 and <sys/uio.h>.
11317 (init_registers_i386_avx_linux): New.
11318 (init_registers_amd64_avx_linux): Likewise.
11319 (xmltarget_i386_linux_no_xml): Likewise.
11320 (xmltarget_amd64_linux_no_xml): Likewise.
11321 (PTRACE_GETREGSET): Likewise.
11322 (PTRACE_SETREGSET): Likewise.
11323 (x86_fill_xstateregset): Likewise.
11324 (x86_store_xstateregset): Likewise.
11325 (use_xml): Likewise.
11326 (x86_linux_update_xmltarget): Likewise.
11327 (x86_linux_process_qsupported): Likewise.
11328 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11329 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11330 init_registers_i386_linux here. Call
11331 x86_linux_update_xmltarget.
11332 (the_low_target): Add x86_linux_process_qsupported.
11333
11334 * server.c (handle_query): Call target_process_qsupported.
11335
11336 * target.h (target_ops): Add process_qsupported.
11337 (target_process_qsupported): New.
11338
fc7238bb
PA
113392010-04-03 Pedro Alves <pedro@codesourcery.com>
11340
11341 * inferiors.c (add_thread): Set last_status kind to
11342 TARGET_WAITKIND_IGNORE.
11343 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11344 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11345 (linux_wait_1): Move `thread' local definition to block that uses
11346 it. Don't NULL initialize `event_child'.
11347 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11348 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11349 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11350
bdabb078
PA
113512010-04-01 Pedro Alves <pedro@codesourcery.com>
11352
11353 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11354 an extended waitstatus, or by a watchpoint.
11355 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11356 thread was stepping or has been stopped by a watchpoint.
11357
d3bbe7a0
PA
113582010-04-01 Pedro Alves <pedro@codesourcery.com>
11359
11360 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11361 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11362 of another, then delete the previous, and validate all
11363 breakpoints.
11364 (validate_inserted_breakpoint): New.
11365 (delete_disabled_breakpoints): New.
11366 (validate_breakpoints): New.
11367 (check_mem_read): Validate breakpoints before trusting their
11368 shadow. Delete disabled breakpoints.
11369 (check_mem_write): Validate breakpoints before trusting they
11370 should be inserted. Delete disabled breakpoints.
11371 * mem-break.h (validate_breakpoints):
11372 * server.c (handle_query): Validate breakpoints when we see a
11373 qSymbol query.
11374
8b07ae33
PA
113752010-04-01 Pedro Alves <pedro@codesourcery.com>
11376
11377 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11378 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11379 if we could tell there's a GDB breakpoint at stop_pc.
11380 (need_step_over_p): Don't do a step over if we find a GDB
11381 breakpoint at the resume PC.
11382
11383 * mem-break.c (struct raw_breakpoint): New.
11384 (enum bkpt_type): New type `gdb_breakpoint'.
11385 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11386 fields. New field `raw'.
11387 (find_raw_breakpoint_at): New.
11388 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11389 breakpoint instead.
11390 (set_breakpoint_at): Adjust.
11391 (delete_raw_breakpoint): New.
11392 (release_breakpoint): New.
11393 (delete_breakpoint): Rename to...
11394 (delete_breakpoint_1): ... this. Add proc parameter. Use
11395 release_breakpoint. Return ENOENT.
11396 (delete_breakpoint): Reimplement.
11397 (find_breakpoint_at): Delete.
11398 (find_gdb_breakpoint_at): New.
11399 (delete_breakpoint_at): Delete.
11400 (set_gdb_breakpoint_at): New.
11401 (delete_gdb_breakpoint_at): New.
11402 (gdb_breakpoint_here): New.
11403 (set_reinsert_breakpoint): Use release_breakpoint.
11404 (uninsert_breakpoint): Rename to ...
11405 (uninsert_raw_breakpoint): ... this.
11406 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11407 (reinsert_raw_breakpoint): Change parameter type to
11408 raw_breakpoint.
11409 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11410 instead.
11411 (check_breakpoints): Adjust. Use release_breakpoint.
11412 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11413 (breakpoint_inserted_here): Ditto.
11414 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11415 Don't trust the breakpoint's shadow if it is not inserted.
11416 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11417 (delete_all_breakpoints): Adjust.
11418 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11419 use delete_breakpoint_1.
11420
11421 * mem-break.h (breakpoints_supported): Delete declaration.
11422 (set_gdb_breakpoint_at): Declare.
11423 (gdb_breakpoint_here): Declare.
11424 (delete_breakpoint_at): Delete.
11425 (delete_gdb_breakpoint_at): Declare.
11426
11427 * server.h (struct raw_breakpoint): Forward declare.
11428 (struct process_info): New field `raw_breakpoints'.
11429
11430 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11431 breakpoints.
11432
6bf5e0ba
PA
114332010-03-24 Pedro Alves <pedro@codesourcery.com>
11434
11435 * linux-low.c (status_pending_p_callback): Fix comment.
11436 (linux_wait_for_event_1): Move most of the internal breakpoint
11437 handling from here...
11438 (linux_wait_1): ... to here.
11439 (count_events_callback): New.
11440 (select_singlestep_lwp_callback): New.
11441 (select_event_lwp_callback): New.
11442 (cancel_breakpoints_callback): New.
11443 (select_event_lwp): New.
11444 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11445 priority to all LWPs that have had events that should be reported
11446 to the client. Cancel breakpoints when about to reporting the
11447 event to the client, not while stopping lwps. No longer cancel
11448 finished single-steps here.
11449 (cancel_finished_single_step): Delete.
11450 (cancel_finished_single_steps): Delete.
11451
414a389f
PA
114522010-03-24 Pedro Alves <pedro@codesourcery.com>
11453
11454 * mem-break.c (enum bkpt_type): New.
11455 (struct breakpoint): New field `type'.
11456 (set_breakpoint_at): Change return type to struct breakpoint
11457 pointer. Set type to `other_breakpoint' by default.
11458 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11459 in the breakpoint list.
11460 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11461 (reinsert_breakpoint): Rename to ...
11462 (reinsert_raw_breakpoint): ... this.
11463 (reinsert_breakpoints_at): Adjust.
11464 * mem-break.h (struct breakpoint): Declare.
11465 (set_breakpoint_at): Change return type to struct breakpoint
11466 pointer.
11467
2280c721
PA
114682010-03-24 Pedro Alves <pedro@codesourcery.com>
11469
11470 * server.c (handle_query): Assign, not compare.
11471
d50171e4
PA
114722010-03-24 Pedro Alves <pedro@codesourcery.com>
11473
11474 Teach linux gdbserver to step-over-breakpoints.
11475
11476 * linux-low.c (can_hardware_single_step): New.
11477 (supports_breakpoints): New.
11478 (handle_extended_wait): If stopping threads, read the stop pc of
11479 the new cloned LWP.
11480 (get_pc): New.
11481 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11482 low target doesn't support retrieving the PC.
11483 (add_lwp): Set last_resume_kind to resume_continue.
11484 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11485 (linux_attach): Don't clear stop_expected. Set the lwp's
11486 last_resume_kind to resume_stop.
11487 (linux_detach_one_lwp): Don't check for removed breakpoints.
11488 (check_removed_breakpoint): Delete.
11489 (status_pending_p): Rename to ...
11490 (status_pending_p_callback): ... this. Don't check for removed
11491 breakpoints. Don't consider threads that are stopped from GDB's
11492 perspective.
11493 (linux_wait_for_lwp): Always read the stop_pc here.
11494 (cancel_breakpoint): New.
11495 (step_over_bkpt): New global.
11496 (linux_wait_for_event_1): Implement stepping over breakpoints.
11497 (gdb_wants_lwp_stopped): New.
11498 (gdb_wants_all_stopped): New.
11499 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11500 single-step traps here. Store the thread's last reported target
11501 wait status.
11502 (send_sigstop): Don't clear stop_expected. Always set it,
11503 instead.
11504 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11505 (cancel_finished_single_step): New.
11506 (cancel_finished_single_steps): New.
11507 (wait_for_sigstop): Don't cancel finished single-step traps here.
11508 (linux_resume_one_lwp): Don't check for removed breakpoints.
11509 Don't set `step' on non-hardware step archs.
11510 (linux_set_resume_request): Ignore resume_stop requests if already
11511 stopping or stopped. Set the lwp's last_resume_kind.
11512 (resume_status_pending_p): Don't check for removed breakpoints.
11513 (need_step_over_p): New.
11514 (start_step_over): New.
11515 (finish_step_over): New.
11516 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11517 requests. Clear the thread's last reported target waitstatus.
11518 Don't use the `suspended' flag. Don't consider pending breakpoints.
11519 (linux_resume): Start a step-over if necessary.
11520 (proceed_one_lwp): New.
11521 (proceed_all_lwps): New.
11522 (unstop_all_lwps): New.
11523 * linux-low.h (struct lwp_info): Rewrite comment for the
11524 `suspended' flag. Add the `stop_pc' field. Delete the
11525 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11526 Add `'last_resume_kind' and `need_step_over' fields.
11527 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11528 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11529 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11530 (set_raw_breakpoint_at): New.
11531 (set_breakpoint_at): Rewrite to use it.
11532 (reinsert_breakpoint_handler): Delete.
11533 (set_reinsert_breakpoint): New.
11534 (reinsert_breakpoint_by_bp): Delete.
11535 (delete_reinsert_breakpoints): New.
11536 (uninsert_breakpoint): Rewrite.
11537 (uninsert_breakpoints_at): New.
11538 (reinsert_breakpoint): Rewrite.
11539 (reinsert_breakpoints_at): New.
11540 (check_breakpoints): Rewrite.
11541 (breakpoint_here): New.
11542 (breakpoint_inserted_here): New.
11543 (check_mem_read): Adjust.
11544 * mem-break.h (breakpoints_supported, breakpoint_here)
11545 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11546 (reinsert_breakpoint_by_bp): Delete declaration.
11547 (delete_reinsert_breakpoints): Declare.
11548 (reinsert_breakpoint): Delete declaration.
11549 (reinsert_breakpoints_at): Declare.
11550 (uninsert_breakpoint): Delete declaration.
11551 (uninsert_breakpoints_at): Declare.
11552 (check_breakpoints): Adjust prototype.
11553 * server.h: Adjust include order.
11554 (struct thread_info): Declare here. Add a `last_status' field.
11555
30ba68cb
MS
115562010-03-23 Michael Snyder <msnyder@vmware.com>
11557
11558 * server.c (crc32): New function.
11559 (handle_query): Add handling for 'qCRC:' request.
11560
b9a881c2
PA
115612010-03-23 Pedro Alves <pedro@codesourcery.com>
11562
11563 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11564 lwp had been stopped by a watchpoint.
11565
e92d13d5
PA
115662010-03-16 Pedro Alves <pedro@codesourcery.com>
11567
11568 * server.h (internal_error): Declare.
11569 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11570 * utils.c (internal_error): New function.
11571
64daa791
AS
115722010-03-15 Andreas Schwab <schwab@redhat.com>
11573
11574 * configure.srv: Fix typo setting srv_regobj.
11575
f52cd8cd
PA
115762010-03-15 Pedro Alves <pedro@codesourcery.com>
11577
11578 * linux-low.c (fetch_register): Avoid passing a non string literal
11579 format to `error'.
11580 (usr_store_inferior_registers): Ditto.
11581
93ae6fdc
PA
115822010-03-14 Pedro Alves <pedro@codesourcery.com>
11583
11584 * linux-low.c (linux_write_memory): Bail out early if peeking
11585 memory failed.
11586
c3adc08c
PA
115872010-03-14 Pedro Alves <pedro@codesourcery.com>
11588
11589 * linux-low.h (struct lwp_info): New fields
11590 `stopped_by_watchpoint' and `stopped_data_address'.
11591 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11592 here, and cache them in the lwp object.
11593 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11594 directly.
11595 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11596 field.
11597 (linux_stopped_by_watchpoint): Rewrite.
11598 (linux_stopped_data_address): Rewrite.
11599
bce522a2
PA
116002010-03-06 Simo Melenius <simo.melenius@iki.fi>
11601
11602 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11603 switching the current inferior, not before.
11604
90884b2b
L
116052010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11606
11607 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11608 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11609 i386-linux.c and amd64-linux.c.
11610 (reg-i386.o): Removed.
11611 (reg-i386.c): Likewise.
11612 (reg-i386-linux.o): Likewise.
11613 (reg-i386-linux.c): Likewise.
11614 (reg-x86-64.o): Likewise.
11615 (reg-x86-64.c): Likewise.
11616 (reg-x86-64-linux.o): Likewise.
11617 (reg-x86-64-linux.c): Likewise.
11618 (i386.o): New.
11619 (i386.c): Likewise.
11620 (i386-linux.o): Likewise.
11621 (i386-linux.c): Likewise.
11622 (amd64.o): Likewise.
11623 (amd64.c): Likewise.
11624 (amd64-linux.o): Likewise.
11625 (amd64-linux.c): Likewise.
11626
11627 * configure.srv (srv_i386_regobj): New.
11628 (srv_i386_linux_regobj): Likewise.
11629 (srv_amd64_regobj): Likewise.
11630 (srv_amd64_linux_regobj): Likewise.
11631 (srv_i386_32bit_xmlfiles): Likewise.
11632 (srv_i386_64bit_xmlfiles): Likewise.
11633 (srv_i386_xmlfiles): Likewise.
11634 (srv_amd64_xmlfiles): Likewise.
11635 (srv_i386_linux_xmlfiles): Likewise.
11636 (srv_amd64_linux_xmlfiles): Likewise.
11637 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11638 srv_xmlfiles to $srv_i386_xmlfiles.
11639 (i[34567]86-*-mingw32ce*): Likewise.
11640 (i[34567]86-*-mingw*): Likewise.
11641 (i[34567]86-*-nto*): Likewise.
11642 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11643 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11644 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11645 (x86_64-*-linux*): Likewise.
11646
11647 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11648 (init_registers_amd64_linux): New.
11649 (x86_arch_setup): Replace init_registers_x86_64_linux with
11650 init_registers_amd64_linux.
11651
193f13e6
MK
116522010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11653
11654 * configure.ac: Check for libdl. If it is not available link against
11655 static libthread_db.
11656 * configure: Regenerate.
11657
85d721b8
PA
116582010-02-22 Pedro Alves <pedro@codesourcery.com>
11659
11660 PR9605
11661
11662 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11663 handing a read watchpoint.
11664 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11665
6076632b
DE
116662010-02-12 Doug Evans <dje@google.com>
11667
11668 * linux-low.c (linux_supports_tracefork_flag): Document.
11669 (linux_look_up_symbols): Add comment.
11670
3327ccf7
L
116712010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11672
11673 * regcache.c (supply_register): Clear regcache if buf is NULL.
11674
0718675c 116752010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11676 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11677
11678 * inferiors.c (find_inferior): Add function documentation.
11679 (unloaded_dll): Handle the case where the unloaded dll has not
11680 been previously registered in the dll list.
11681
177321bd
DJ
116822010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11683
11684 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11685 (thumb2_breakpoint): New.
11686 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11687
2b009048
DJ
116882010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11689
11690 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11691 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11692 breakpoints.
11693
3be029c7
PA
116942010-01-21 Pedro Alves <pedro@codesourcery.com>
11695
11696 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11697
18f5de3b
JK
116982010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11699
11700 * linux-s390-low.c (s390_collect_ptrace_register)
11701 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11702
3743bb4f
DE
117032010-01-21 Doug Evans <dje@google.com>
11704
14ce3065
DE
11705 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11706 (PTRACE_ARG4_TYPE): New macro.
11707 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11708 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11709 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11710 (usr_store_inferior_registers): Ditto.
11711 (linux_read_memory, linux_write_memory): Ditto.
11712 (linux_test_for_tracefork): Ditto.
11713
3743bb4f
DE
11714 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11715 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11716
8b315be5
PA
117172010-01-21 Pedro Alves <pedro@codesourcery.com>
11718
11719 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11720 target.
11721
85492558
PA
117222010-01-21 Pedro Alves <pedro@codesourcery.com>
11723
11724 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11725 prototype to take a regcache. Adjust.
11726
442ea881
PA
117272010-01-20 Pedro Alves <pedro@codesourcery.com>
11728
11729 * regcache.h (struct thread_info): Forward declare.
11730 (struct regcache): New.
11731 (new_register_cache): Adjust prototype.
11732 (get_thread_regcache): Declare.
11733 (free_register_cache): Adjust prototype.
11734 (registers_to_string, registers_from_string): Ditto.
11735 (supply_register, supply_register_by_name, collect_register)
11736 (collect_register_as_string, collect_register_by_name): Ditto.
11737 * regcache.c (struct inferior_regcache_data): Delete.
11738 (get_regcache): Rename to ...
11739 (get_thread_regcache): ... this. Adjust. Switch inferior before
11740 fetching registers.
11741 (regcache_invalidate_one): Adjust.
11742 (regcache_invalidate): Fix prototype.
11743 (new_register_cache): Return the new register cache.
11744 (free_register_cache): Change prototype.
11745 (realloc_register_cache): Adjust.
11746 (registers_to_string): Change prototype to take a regcache. Adjust.
11747 (registers_from_string): Ditto.
11748 (register_data): Ditto.
11749 (supply_register): Ditto.
11750 (supply_register_by_name): Ditto.
11751 (collect_register): Ditto.
11752 (collect_register_as_string): Ditto.
11753 (collect_register_by_name): Ditto.
11754 * server.c (process_serial_event): Adjust.
11755 * linux-low.h (regset_fill_func, regset_store_func): Change
11756 prototype.
11757 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11758 Change prototype.
11759 * linux-low.c (get_stop_pc): Adjust.
11760 (check_removed_breakpoint): Adjust.
11761 (linux_wait_for_event): Adjust.
11762 (linux_resume_one_lwp): Adjust.
11763 (fetch_register): Add regcache parameter. Adjust.
11764 (usr_store_inferior_registers): Ditto.
11765 (regsets_fetch_inferior_registers): Ditto.
11766 (regsets_store_inferior_registers): Ditto.
11767 (linux_fetch_registers, linux_store_registers): Ditto.
11768 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11769 regcache. Adjust.
43aaf8b6
PA
11770 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11771 Ditto.
442ea881
PA
11772 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11773 prototype to take a regcache.
11774 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11775 * remote-utils.c (convert_ascii_to_int, outreg)
11776 (prepare_resume_reply): Change prototype to take a regcache.
11777 Adjust.
11778 * target.h (struct target_ops) <fetch_registers, store_registers>:
11779 Change prototype to take a regcache.
11780 (fetch_inferior_registers, store_inferior_registers): Change
11781 prototype to take a regcache. Adjust.
11782 * proc-service.c (ps_lgetregs): Adjust.
11783 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11784 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11785 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11786 take a regcache. Adjust.
11787 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11788 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11789 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11790 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11791 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11792 (cris_cannot_fetch_register):
11793 (cris_breakpoint_at): Change prototype to take a regcache.
11794 Adjust.
11795 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11796 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11797 to take a regcache. Adjust.
11798 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11799 Adjust.
11800 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11801 take a regcache. Adjust.
11802 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11803 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11804 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11805 * linux-mips-low.c (mips_get_pc):
11806 (mips_set_pc): Change prototype to take a regcache. Adjust.
11807 (mips_reinsert_addr): Adjust.
11808 (mips_collect_register): Change prototype to take a regcache.
11809 Adjust.
11810 (mips_supply_register):
11811 (mips_collect_register_32bit, mips_supply_register_32bit)
11812 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11813 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11814 * linux-ppc-low.c (ppc_supply_ptrace_register)
11815 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11816 (parse_spufs_run): Adjust.
11817 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11818 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11819 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11820 take a regcache. Adjust.
11821 * linux-s390-low.c (s390_collect_ptrace_register)
11822 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11823 (s390_set_pc): Change prototype to take a regcache. Adjust.
11824 (s390_arch_setup): Adjust.
11825 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11826 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11827 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11828 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11829 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11830 regcache. Adjust.
11831 (sparc_breakpoint_at): Adjust.
11832 * linux-xtensa-low.c (xtensa_fill_gregset):
11833 (xtensa_store_gregset):
11834 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11835 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11836 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11837 prototype to take a regcache. Adjust.
11838 * win32-arm-low.c (arm_fetch_inferior_register)
11839 (arm_store_inferior_register): Change prototype to take a
11840 regcache. Adjust.
11841 * win32-i386-low.c (i386_fetch_inferior_register)
11842 (i386_store_inferior_register): Change prototype to take a
11843 regcache. Adjust.
11844 * win32-low.c (child_fetch_inferior_registers)
11845 (child_store_inferior_registers): Change prototype to take a
11846 regcache. Adjust.
11847 (win32_wait): Adjust.
11848 (win32_fetch_inferior_registers): Change prototype to take a
11849 regcache. Adjust.
11850 (win32_store_inferior_registers): Adjust.
11851 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11852 store_inferior_register>: Change prototype to take a regcache.
11853
60c3d7b0
DE
118542010-01-20 Doug Evans <dje@google.com>
11855
11856 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11857 #ifdef.
11858 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11859 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11860
dc146f7c
VP
118612010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11862
11863 * linux-low.c (linux_core_of_thread): New.
11864 (compare_ints, show_process, list_threads): New.
11865 (linux_qxfer_osdata): Report threads and cores.
11866 (linux_target_op): Register linux_core_of_thread.
11867 * remote-utils.c (prepare_resume_reply): Report the core.
11868 (buffer_xml_printf): Support %d specifier.
11869 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11870 New.
11871 (handle_query): Handle qXfer:threads. Announce availability
11872 thereof.
11873 * target.h (struct target_ops): New field core_of_thread.
11874
7803799a
UW
118752010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11876
11877 * Makefile.in (clean): Remove new generated files.
11878 (reg-s390.o, reg-s390.c): Remove rules.
11879 (reg-s390x.o, reg-s390x.c): Likewise.
11880 (s390-linux32.o, s390-linux32.c): Add rules.
11881 (s390-linux64.o, s390-linux64.c): Likewise.
11882 (s390x-linux64.o, s390x-linux64.c): Likewise.
11883 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11884 * linux-s390-low.c: Include <elf.h>.
11885 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11886 (init_registers_s390): Remove prototype.
11887 (init_registers_s390x): Likewise.
11888 (init_registers_s390_linux32): Add prototype.
11889 (init_registers_s390_linux64): Likewise.
11890 (init_registers_s390x_linux64): Likewise.
11891 (s390_num_regs_3264): New define.
11892 (s390_regmap_3264): New global variable.
11893 (s390_cannot_fetch_register): Remove obsolete check.
11894 (s390_cannot_store_register): Likewise.
11895 (s390_collect_ptrace_register): Handle upper/lower register halves.
11896 (s390_supply_ptrace_register): Likewise.
11897 (s390_fill_gregset): Update to register number changes.
11898 (s390_get_hwcap): New routine.
11899 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11900 Install appropriate regmap and register set.
11901
6e7ffa39
JB
119022010-01-01 Joel Brobecker <brobecker@adacore.com>
11903
11904 * server.c (gdbserver_version): Update copyright year to 2010.
11905 * gdbreplay.c (gdbreplay_version): Likewise.
11906
957f3f49
DE
119072009-12-28 Doug Evans <dje@google.com>
11908
11909 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11910 elf/external.h. Include <elf.h> instead but only if necessary.
11911
ca5c370d
PA
119122009-12-28 Pedro Alves <pedro@codesourcery.com>
11913
11914 * linux-low.c (linux_remove_process): Remove `detaching'
11915 parameter. Don't release/detach from thread_db here.
11916 (linux_kill): Release/detach from thread_db here, ...
11917 (linux_detach): ... and here, before actually detaching.
11918 (linux_wait_1): ... and here, when a process exits.
11919 * thread-db.c (any_thread_of): New.
11920 (thread_db_free): Switch the current inferior to a thread of the
11921 passed in process.
11922
4ee62156
DE
119232009-12-21 Doug Evans <dje@google.com>
11924
d90e6a88
DE
11925 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11926
c5f62d5f
DE
11927 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11928 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11929 warning ifndef __NR_tkill. Move setting of errno there too.
11930 Delete unnecessary resetting of errno after syscall.
11931 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11932
10e86dd7
DE
11933 * configure.ac: Check for dladdr.
11934 * config.in: Regenerate.
11935 * configure: Regenerate.
11936 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11937 (try_thread_db_load): Update.
11938
4ee62156
DE
11939 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11940
00f515da
DE
119412009-12-18 Doug Evans <dje@google.com>
11942
e9464885
DE
11943 * event-loop.c: Include unistd.h if it exists.
11944
07d4f67e
DE
11945 * linux-low.c (my_waitpid): Move definition away from being in
11946 between linux_tracefork_child/linux_test_for_tracefork.
11947
00f515da
DE
11948 * gdb_proc_service.h (psaddr_t): Fix type.
11949 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11950 signature to match glibc.
11951
1de1badb
DE
119522009-12-16 Doug Evans <dje@google.com>
11953
11954 * linux-low.c (linux_read_memory): Fix argument to read.
11955
aeeb81d1
PA
119562009-11-26 Pedro Alves <pedro@codesourcery.com>
11957
11958 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11959 events, don't leave current_inferior pointing at null.
11960
10357975
PA
119612009-11-26 Pedro Alves <pedro@codesourcery.com>
11962
11963 * win32-low.c (LOG): Delete.
11964 (OUTMSG): Output to stderr.
11965 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11966 on compile time LOG macro.
11967 (win32_wait): Fix debug output.
11968
cf6e3471
PA
119692009-11-26 Pedro Alves <pedro@codesourcery.com>
11970
11971 * win32-low.c (win32_add_one_solib): If the dll name is
11972 "ntdll.dll", prepend the system directory to the dll path.
11973
0c85e18e
MK
119742009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11975
11976 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11977
9ac544ce 119782009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11979 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11980
11981 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11982 * configure.ac: Check for __mcoldfire__ and set
11983 gdb_cv_m68k_is_coldfire.
11984 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11985 reg-cf.o and reg-m68k.o.
11986 * configure: Regenerated.
11987
fd7dd3e6
PA
119882009-11-16 Pedro Alves <pedro@codesourcery.com>
11989
11990 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11991 Pass it to thread_db_free.
11992 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11993 proper `detaching' argument to linux_remove_process.
11994 * linux-low.h (thread_db_free): Add `detaching' parameter.
11995 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11996 to thread_db_free.
11997 (thread_db_free): Add `detaching' parameter. Only
11998 call td_ta_clear_event if detaching from process.
11999
75aa492e
MK
120002009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12001
12002 * thread-db.c (thread_db_free): Fix typo.
12003
21e1bee4
PP
120042009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12005
12006 PR gdb/10838
12007 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12008
8838b45e
NS
120092009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12010
12011 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12012 with an i686 compiler.
12013 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12014 needed.
12015 * configure: Rebuilt.
12016
8a35fb51
SL
120172009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12018
12019 PR gdb/10783
12020
12021 * server.c (handle_search_memory_1): Correct read_addr initialization
12022 in loop for searching subsequent chunks.
12023
96f15937
PP
120242009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12025
12026 * configure.ac: New --with-libthread-db option.
12027 * thread-db.c: Allow direct dependence on libthread_db.
12028 (thread_db_free): Adjust.
12029 * config.in: Regenerate.
12030 * configure: Likewise.
889bf7c5 12031
5f7d1694
PP
120322009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12033
12034 PR gdb/10757
12035 * thread-db.c (attach_thread): New function.
12036 (maybe_attach_thread): Return success/failure.
12037 (find_new_threads_callback): Adjust.
889bf7c5
PA
12038 (thread_db_find_new_threads): Loop until no new threads.
12039
88e3b899
PA
120402009-10-13 Pedro Alves <pedro@codesourcery.com>
12041
12042 * proc-service.c (ps_lgetregs): Formatting.
12043
cdbfd419
PP
120442009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12045
12046 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12047 * configure.ac: Adjust.
12048 * linux-low.h (struct process_info_private): Move members to struct
12049 thread_db.
12050 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12051 * linux-low.c (linux_remove_process): Adjust.
12052 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12053 * server.c (handle_query): Move code ...
12054 (handle_monitor_command): ... here. New function.
12055 * target.h (struct target_ops): New member.
12056 * thread-db.c (struct thread_db): New.
12057 (libthread_db_search_path): New variable.
12058 (thread_db_create_event, thread_db_enable_reporting)
12059 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12060 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12061 (try_thread_db_load_1, dladdr_to_soname): New functions.
12062 (try_thread_db_load, thread_db_load_search): New functions.
12063 (thread_db_init): Search for libthread_db.
12064 (thread_db_free): New function.
12065 (thread_db_handle_monitor_command): Likewise.
12066 * config.in: Regenerate.
12067 * configure: Regenerate.
889bf7c5 12068
4168d2d6
UW
120692009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12070
12071 * spu-low.c (spu_kill): Wait for inferior to terminate.
12072 Call clear_inferiors.
12073 (spu_detach): Call clear_inferiors.
12074
81ecdfbb
RW
120752009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12076
12077 * aclocal.m4: Regenerate.
12078 * config.in: Likewise.
12079 * configure: Likewise.
12080
0b9ff2c0
UW
120812009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12082
12083 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12084 (parse_spufs_run): New function.
12085 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12086 (ppc_breakpoint_at): Handle SPU breakpoints.
12087
efcbbd14
UW
120882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12089
12090 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12091 (SPUFS_MAGIC): Define.
12092 (spu_enumerate_spu_ids): New function.
12093 (linux_qxfer_spu): New function.
12094 (linux_target_ops): Install linux_qxfer_spu.
12095
f4d9bade
UW
120962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12097
12098 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12099 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12100 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12101 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12102 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12103 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12104 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12105 (init_registers_powerpc_cell32l): Add prototype.
12106 (init_registers_powerpc_cell64l): Likewise.
12107 (ppc_arch_setup): Detect Cell/B.E. architecture.
12108
96e946ca
RW
121092009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12110
12111 * Makefile.in (datarootdir): New variable.
12112
58d6951d
DJ
121132009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12114
12115 * linux-low.c (linux_write_memory): Update debugging output.
12116 * Makefile.in (clean): Add new descriptions.
12117 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12118 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12119 * configure.srv: Add new files for arm*-*-linux*.
12120 * linux-arm-low.c: Add new declarations.
12121 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12122 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12123 (HWCAP_VFPv3D16): New.
12124 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12125 instead of __IWMMXT__.
12126 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12127 (arm_arch_setup): New.
12128 (target_regsets): Remove #ifdef. Add VFP regset.
12129 (the_low_target): Use arm_arch_setup.
12130
12b42a12
DJ
121312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12132
12133 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12134 the main thread again.
12135
ac8c974e
AR
121362009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12137
12138 Adding Neutrino gdbserver.
12139 * configure: Regenerated.
12140 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12141 * configure.srv (i[34567]86-*-nto*): New target.
12142 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12143 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12144 (nto_comctrl) [__QNX__]: New function.
12145 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12146
4424e0c3 121472009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12148
12149 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12150 srv_tgtobj.
12151
912cf4ba
PA
121522009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12153 Pedro Alves <pedro@codesourcery.com>
12154
12155 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12156 don't support CONTEXT_EXTENDED_REGISTERS.
12157 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12158 (the_low_target): Install them.
12159 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12160 failing with ERROR_PIPE_NOT_CONNECTED.
12161
aa5ca48f
DE
121622009-06-30 Doug Evans <dje@google.com>
12163 Pierre Muller <muller@ics.u-strasbg.fr>
12164
12165 Add h/w watchpoint support to x86-linux, win32-i386.
12166 * Makefile.in (SFILES): Add i386-low.c
12167 (i386_low_h): Define.
12168 (i386-low.o): Add dependencies.
12169 (linux-x86-low.o): Add i386-low.h dependency.
12170 (win32-i386-low.o): Ditto.
12171 * i386-low.c: New file.
12172 * i386-low.h: New file.
12173 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12174 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12175 * linux-low.c (linux_add_process): Initialize arch_private.
12176 (linux_remove_process): Free arch_private.
12177 (add_lwp): Initialize arch_private.
12178 (delete_lwp): Free arch_private.
12179 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12180 provided.
12181 * linux-low.h (process_info_private): New member arch_private.
12182 (lwp_info): New member arch_private.
12183 (linux_target_ops): New members new_process, new_thread,
12184 prepare_to_resume.
12185 (ptid_of): New macro.
12186 * linux-x86-low.c: Include stddef.h, i386-low.h.
12187 (arch_process_info): New struct.
12188 (arch_lwp_info): New struct.
12189 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12190 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12191 (i386_dr_low_get_status): New function.
12192 (x86_insert_point, x86_remove_point): New functions.
12193 (x86_stopped_by_watchpoint): New function.
12194 (x86_stopped_data_address): New function.
12195 (x86_linux_new_process, x86_linux_new_thread): New functions.
12196 (x86_linux_prepare_to_resume): New function.
12197 (the_low_target): Add entries for insert_point, remove_point,
12198 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12199 prepare_to_resume.
12200 * server.c (debug_hw_points): New global.
12201 (monitor_show_help): Document set debug-hw-points.
12202 (handle_query): Process "set debug-hw-points".
12203 * server.h (debug_hw_points): Declare.
12204 (paddress): Declare.
12205 * utils.c (NUMCELLS, CELLSIZE): New macros.
12206 (get_sell, xsnprintf, paddress): New functions.
12207 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12208 remove_point, stopped_by_watchpoint, stopped_data_address.
12209 * win32-i386-low.c: Include i386-low.h.
12210 (debug_reg_state): Replaces dr.
12211 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12212 (i386_dr_low_get_status): New function.
12213 (i386_insert_point, i386_remove_point): New functions.
12214 (i386_stopped_by_watchpoint): New function.
12215 (i386_stopped_data_address): New function.
12216 (i386_initial_stuff): Update.
12217 (get_thread_context,set_thread_context,i386_thread_added): Update.
12218 (the_low_target): Add entries for insert_point,
12219 remove_point, stopped_by_watchpoint, stopped_data_address.
12220 * win32-low.c (win32_insert_watchpoint): New function.
12221 (win32_remove_watchpoint): New function.
12222 (win32_stopped_by_watchpoint): New function.
12223 (win32_stopped_data_address): New function.
12224 (win32_target_ops): Add entries for insert_watchpoint,
12225 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12226 * win32-low.h (win32_target_ops): New members insert_point,
12227 remove_point, stopped_by_watchpoint, stopped_data_address.
12228
d993e290
PA
122292009-06-25 Pedro Alves <pedro@codesourcery.com>
12230
12231 * server.c (process_serial_event): Re-return unsupported, not
12232 error, if the type isn't recognized. Re-allow supporting only
12233 insert or remove packets. Also call require_running for
12234 breakpoints. Add missing break statement to default case. Tidy.
12235 * target.h (struct target_ops): Rename insert_watchpoint to
12236 insert_point, and remove_watchpoint to remove_point.
12237
12238 * linux-low.h (struct linux_target_ops): Likewise.
12239 * linux-low.c (linux_insert_watchpoint): Rename to ...
12240 (linux_insert_point): ... this. Adjust.
12241 (linux_remove_watchpoint): Rename to ...
12242 (linux_remove_point): ... this. Adjust.
12243 (linux_target_ops): Adjust.
12244 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12245 (cris_insert_point): ... this.
12246 (cris_remove_watchpoint): Rename to ...
12247 (cris_remove_point): ... this.
12248 (the_low_target): Adjust.
12249
0f54c268
PM
122502009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12251
12252 * server.c (handle_v_kill): Pass signal_pid to
12253 kill_inferior if multi_process is zero.
12254
c6314022
AR
122552009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12256
12257 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12258 * target.h (target_ops): Comment for *_watchpoint to make it clear
12259 the functions can get types '0' and '1'.
12260
4463ce24
AR
122612009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12262
12263 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12264 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12265 * regcache.c (get_regcache): Likewise.
12266 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12267 * win32-low.c (child_fetch_inferior_registers): Remove check for
12268 regno 0.
12269
cf8fd78b
PA
122702009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12271 Pedro Alves <pedro@codesourcery.com>
12272
12273 * target.h (struct target_ops) <supports_multi_process>: New
12274 callback.
12275 (target_supports_multi_process): New.
12276 * server.c (handle_query): Even if GDB reports support, only
12277 enable multi-process if the target also supports it. Report
12278 multi-process support only if the target backend supports it.
12279 * linux-low.c (linux_supports_multi_process): New function.
12280 (linux_target_ops): Install it as target_supports_multi_process
12281 callback.
12282
47c0c975
DE
122832009-05-24 Doug Evans <dje@google.com>
12284
e09875d4
DE
12285 Global renaming of find_thread_pid to find_thread_ptid.
12286 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12287 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12288 All callers updated.
12289
e27d73f6
DE
12290 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12291 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12292 directly.
12293
47c0c975
DE
12294 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12295 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12296 (linux_resume_one_lwp): Ditto.
12297
2acc282a
DE
122982009-05-23 Doug Evans <dje@google.com>
12299
12300 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12301 from struct inferior_list_entry * to struct lwp_info *.
12302 All callers updated.
12303
9f1036c1
DE
123042009-05-13 Doug Evans <dje@google.com>
12305
12306 * linux-x86-low.c: Don't include assert.h.
12307 (x86_siginfo_fixup): Use fatal, not assert.
12308 (x86_arch_setup): Fix comment.
12309
d0722149
DE
123102009-05-12 Doug Evans <dje@google.com>
12311
12312 Biarch support for i386/amd64 gdbserver.
12313 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12314 Add linux-x86-low.c.
12315 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12316 (linux-x86-low.o): Add.
12317 * linux-x86-64-low.c: Delete.
12318 * linux-i386-low.c: Delete.
12319 * linux-x86-low.c: New file.
12320 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12321 linux-x86-low.o.
12322 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12323 linux-x86-low.o.
12324 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12325 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12326 (linux_child_pid_to_exec_file): New function.
12327 (elf_64_header_p, elf_64_file_p): New functions.
12328 (siginfo_fixup): New function.
12329 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12330 give target a chance to convert layout.
12331 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12332 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12333
fdeb2a12
DE
123342009-05-07 Doug Evans <dje@google.com>
12335
12336 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12337 (regsets_store_inferior_registers): Ditto.
12338
a6dbe5df
PA
123392009-05-06 Pedro Alves <pedro@codesourcery.com>
12340
12341 PR server/10048
12342
12343 * linux-low.c (must_set_ptrace_flags): Delete.
12344 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12345 of the global.
12346 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12347 `lwp->must_set_ptrace_flags' instead.
ba42693b 12348 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12349 (linux_wait_1): ... not here.
12350
5091eb23
DE
123512009-04-30 Doug Evans <dje@google.com>
12352
9f767825
DE
12353 * inferiors.c (started_inferior_callback): New function.
12354 (attached_inferior_callback): New function.
12355 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12356 * server.c (print_started_pid, print_attached_pid): New functions.
12357 (detach_or_kill_for_exit): New function.
12358 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12359 * server.h (have_started_inferiors_p): Declare.
12360 (have_attached_inferiors_p): Declare.
12361
5091eb23
DE
12362 * inferiors.c (remove_process): Fix memory leak, free process.
12363 * linux-low.c (linux_remove_process): New function.
12364 (linux_kill): Call it instead of remove_process.
12365 (linux_detach, linux_wait_1): Ditto.
12366
155c8968
PA
123672009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12368
12369 * configure.srv: Add x86 Windows CE target.
12370
7fe519cb
UW
123712009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12372
12373 * inferiors.c (get_thread_process): Make global.
12374 * server.h (get_thread_process): Add prototype.
12375 * thread-db.c (find_one_thread): Use get_thread_process
12376 instead of current_process.
12377 (thread_db_get_tls_address): Do not crash if called when
12378 thread layer is not yet initialized.
12379
5472f405
UW
123802009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12381
12382 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12383 * spu-low.c (current_tid): Rename to ...
12384 (current_ptid): ... this.
12385 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12386 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12387 ptid_get_lwp (current_ptid) instead of current_tid.
12388 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12389 instead of current_tid. Use find_process_pid to verify pid
12390 argument is valid. Pass proper argument to remove_process.
12391 (spu_thread_alive): Compare current_ptid instead of current_tid.
12392 (spu_resume): Likewise.
12393
55ac2b99
PA
123942009-04-02 Pedro Alves <pedro@codesourcery.com>
12395
12396 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12397 variable.
12398
95954743
PA
123992009-04-01 Pedro Alves <pedro@codesourcery.com>
12400
12401 Implement the multiprocess extensions, and add linux multiprocess
12402 support.
12403
12404 * server.h (ULONGEST): Declare.
12405 (struct ptid, ptid_t): New.
12406 (minus_one_ptid, null_ptid): Declare.
12407 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12408 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12409 (struct inferior_list_entry): Change `id' type from unsigned from
12410 to ptid_t.
12411 (struct sym_cache, struct breakpoint, struct
12412 process_info_private): Forward declare.
12413 (struct process_info): Declare.
12414 (current_process): Declare.
12415 (all_processes): Declare.
12416 (initialize_inferiors): Declare.
12417 (add_thread): Adjust to use ptid_t.
12418 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12419 (add_process, remove_process, find_thread_pid): Declare.
12420 (find_inferior_id): Adjust to use ptid_t.
12421 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12422 (multi_process): Declare.
12423 (push_event): Adjust to use ptid_t.
12424 (read_ptid, write_ptid): Declare.
12425 (prepare_resume_reply): Adjust to use ptid_t.
12426 (clear_symbol_cache): Declare.
12427 * inferiors.c (all_processes): New.
12428 (null_ptid, minus_one_ptid): New.
12429 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12430 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12431 (add_thread): Change unsigned long to ptid. Remove gdb_id
12432 parameter. Adjust.
12433 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12434 (gdb_id_to_thread): Rename to ...
12435 (find_thread_pid): ... this. Change unsigned long to ptid.
12436 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12437 (loaded_dll, pull_pid_from_list): Adjust.
12438 (add_process, remove_process, find_process_pid)
12439 (get_thread_process, current_process, initialize_inferiors): New.
12440 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12441 (struct target_waitstatus) <related_pid>: Ditto.
12442 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12443 return type to int.
12444 (struct target_ops) <join>: Add `pid' argument.
12445 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12446 (struct target_ops) <wait>: Add `ptid' field. Change return type
12447 to ptid.
12448 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12449 (mywait): Add `ptid' argument. Change return type to ptid_t.
12450 (target_pid_to_str): Declare.
12451 * target.c (set_desired_inferior): Adjust to use ptids.
12452 (mywait): Add new `ptid' argument. Adjust.
12453 (target_pid_to_str): New.
12454 * mem-break.h (free_all_breakpoints): Declare.
12455 * mem-break.c (breakpoints): Delelete.
12456 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12457 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12458 to use per-process breakpoint list.
12459 (free_all_breakpoints): New.
12460 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12461 (symbol_cache, all_symbols_looked_up): Delete.
12462 (hexchars): New.
12463 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12464 read_ptid): New.
12465 (prepare_resume_reply): Change ptid argument's type from unsigned
12466 long to ptid_t. Adjust. Implement W;process and X;process.
12467 (free_sym_cache, clear_symbol_cache): New.
12468 (look_up_one_symbol): Adjust to per-process symbol cache. *
12469 * server.c (cont_thread, general_thread, step_thread): Change type
12470 to ptid_t.
12471 (attached): Delete.
12472 (multi_process): New.
12473 (last_ptid): Change type to ptid_t.
12474 (struct vstop_notif) <ptid>: Change type to ptid_t.
12475 (queue_stop_reply, push_event): Change `ptid' argument's type to
12476 ptid_t.
12477 (discard_queued_stop_replies): Add `pid' argument.
12478 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12479 changes. Don't reference the `attached' global.
12480 (attach_inferior): Adjust to mywait interface changes.
12481 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12482 features. Handle and report "multiprocess+". Handle
12483 "qAttached:PID".
12484 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12485 changes.
12486 (handle_v_kill): New.
12487 (handle_v_stopped): Adjust to use target_pid_to_str.
12488 (handle_v_requests): Allow multiple attaches and runs when
12489 multiprocess extensions are in effect. Handle "vKill".
12490 (myresume): Adjust to use ptids.
12491 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12492 (handle_status): Adjust to discard_queued_stop_replies interface
12493 change.
12494 (first_thread_of, kill_inferior_callback)
12495 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12496 (main): Call initialize_inferiors. Adjust to use ptids, killing
12497 and detaching from all inferiors. Handle multiprocess packet
12498 variants.
12499 * linux-low.h: Include gdb_proc_service.h.
12500 (struct process_info_private): New.
12501 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12502 <lwpid_of>: Use ptid_get_lwp.
12503 (get_lwp_thread): Adjust.
12504 (struct lwp_info): Add `dead' member.
12505 (find_lwp_pid): Declare.
12506 * linux-low.c (thread_db_active): Delete.
12507 (new_inferior): Adjust comment.
12508 (inferior_pid): Delete.
12509 (linux_add_process): New.
12510 (handle_extended_wait): Adjust.
12511 (add_lwp): Change unsigned long to ptid.
12512 (linux_create_inferior): Add process to processes table. Adjust
12513 to use ptids. Don't set new_inferior here.
12514 (linux_attach_lwp): Rename to ...
12515 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12516 it. Adjust to use ptids.
12517 (linux_attach_lwp): New.
12518 (linux_attach): Add process to processes table. Don't set
12519 new_inferior here.
12520 (struct counter): New.
12521 (second_thread_of_pid_p, last_thread_of_process_p): New.
12522 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12523 multiple processes.
12524 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12525 processes. Remove process from process table.
12526 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12527 to multiple processes.
12528 (any_thread_of): New.
12529 (linux_detach): Add `pid' argument, and handle it. Remove process
12530 from processes table.
12531 (linux_join): Add `pid' argument. Handle it.
12532 (linux_thread_alive): Change unsighed long argument to ptid_t.
12533 Consider dead lwps as not being alive.
12534 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12535 threads we're not interested in.
12536 (same_lwp, find_lwp_pid): New.
12537 (linux_wait_for_lwp): Change `pid' argument's type from int to
12538 ptid_t. Adjust.
12539 (linux_wait_for_event): Rename to ...
12540 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12541 from int to ptid_t. Adjust.
12542 (linux_wait_for_event): New.
12543 (linux_wait_1): Add `ptid' argument. Change return type to
12544 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12545 that exit from the process table.
12546 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12547 Adjust.
12548 (mark_lwp_dead): New.
12549 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12550 stopping all threads, mark its main lwp as dead.
12551 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12552 ptids.
12553 (fetch_register, usr_store_inferior_registers)
12554 (regsets_fetch_inferior_registers)
12555 (regsets_store_inferior_registers, linux_read_memory)
12556 (linux_write_memory): Inline `inferior_pid'.
12557 (linux_look_up_symbols): Adjust to use per-process
12558 `thread_db_active'.
12559 (linux_request_interrupt): Adjust to use ptids.
12560 (linux_read_auxv): Inline `inferior_pid'.
12561 (initialize_low): Don't reference thread_db_active.
12562 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12563 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12564 (ps_getpid): Return the pid of the current inferior.
12565 * thread-db.c (proc_handle, thread_agent): Delete.
12566 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12567 per-process data.
12568 (find_one_thread): Change argument type to ptid_t. Adjust to
12569 per-process data.
12570 (maybe_attach_thread): Adjust to per-process data and ptids.
12571 (thread_db_find_new_threads): Ditto.
12572 (thread_db_init): Ditto.
12573 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12574 processes table. Adjust to use ptids.
12575 (spu_kill, spu_detach): Adjust interface. Remove process from
12576 processes table.
12577 (spu_join, spu_thread_alive): Adjust interface.
12578 (spu_wait): Adjust interface. Remove process from processes
12579 table. Adjust to use ptids.
12580 * win32-low.c (current_inferior_tid): Delete.
12581 (current_inferior_ptid): New.
12582 (debug_event_ptid): New.
12583 (thread_rec): Take a ptid. Adjust.
12584 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12585 (child_delete_thread): Ditto.
12586 (do_initial_child_stuff): Add `attached' argument. Add process to
12587 processes table.
12588 (child_fetch_inferior_registers, child_store_inferior_registers):
12589 Adjust.
12590 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12591 (win32_attach): Pass 1 to do_initial_child_stuff.
12592 (win32_kill): Adjust interface. Remove process from processes
12593 table.
12594 (win32_detach): Ditto.
12595 (win32_join): Adjust interface.
12596 (win32_thread_alive): Take a ptid.
12597 (win32_resume): Adjust to use ptids.
12598 (get_child_debug_event): Ditto.
12599 (win32_wait): Adjust interface. Remove exiting process from
12600 processes table.
12601
bd99dc85
PA
126022009-04-01 Pedro Alves <pedro@codesourcery.com>
12603
12604 Non-stop mode support.
12605
12606 * server.h (non_stop): Declare.
12607 (gdb_client_data, handler_func): Declare.
12608 (delete_file_handler, add_file_handler, start_event_loop):
12609 Declare.
12610 (handle_serial_event, handle_target_event, push_event)
12611 (putpkt_notif): Declare.
12612 * target.h (enum resume_kind): New.
12613 (struct thread_resume): Replace `step' field by `kind' field.
12614 (TARGET_WNOHANG): Define.
12615 (struct target_ops) <wait>: Add `options' argument.
12616 <supports_non_stop, async, start_non_stop>: New fields.
12617 (target_supports_non_stop, target_async): New.
12618 (start_non_stop): Declare.
12619 (mywait): Add `options' argument.
12620 * target.c (mywait): Add `options' argument. Print child exit
12621 notifications here.
12622 (start_non_stop): New.
12623 * server.c (non_stop, own_buf, mem_buf): New globals.
12624 (struct vstop_notif): New.
12625 (notif_queue): New global.
12626 (queue_stop_reply, push_event, discard_queued_stop_replies)
12627 (send_next_stop_reply): New.
12628 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12629 interface changes.
12630 (attach_inferior): In non-stop mode, don't wait for the target
12631 here.
12632 (handle_general_set): Handle QNonStop.
12633 (handle_query): When handling qC, return the current general
12634 thread, instead of the first thread of the list.
12635 (handle_query): If the backend supports non-stop mode, include
12636 QNonStop+ in the qSupported query response.
12637 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12638 and non-stop mode.
12639 (handle_v_attach, handle_v_run): Handle non-stop mode.
12640 (handle_v_stopped): New.
12641 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12642 (myresume): Adjust to use resume_kind. Handle non-stop.
12643 (queue_stop_reply_callback): New.
12644 (handle_status): Handle non-stop mode.
12645 (main): Clear non_stop flag on reconnection. Use the event-loop.
12646 Refactor serial protocol handling from here ...
12647 (process_serial_event): ... to this new function. When GDB
12648 selects any thread, select one here. In non-stop mode, wait until
12649 GDB acks all pending events before exiting.
12650 (handle_serial_event, handle_target_event): New.
12651 * remote-utils.c (remote_open): Install remote_desc in the event
12652 loop.
12653 (remote_close): Remove remote_desc from the event loop.
12654 (putpkt_binary): Rename to...
12655 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12656 (putpkt_binary): New as wrapper around putpkt_binary_1.
12657 (putpkt_notif): New.
12658 (prepare_resume_reply): In non-stop mode, don't change the
12659 general_thread.
12660 * event-loop.c: New.
12661 * Makefile.in (OBJ): Add event-loop.o.
12662 (event-loop.o): New rule.
12663
12664 * linux-low.h (pid_of): Moved here.
12665 (lwpid_of): New.
12666 (get_lwp_thread): Use lwpid_of.
12667 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12668 * linux-low.c (pid_of): Delete.
12669 (inferior_pid): Use lwpid_of.
12670 (linux_event_pipe): New.
12671 (target_is_async_p): New.
12672 (delete_lwp): New.
12673 (handle_extended_wait): Use lwpid_of.
12674 (add_lwp): Don't set lwpid field.
12675 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12676 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12677 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12678 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12679 first. Adjust to linux_wait_for_event interface changes. Use
12680 lwpid_of.
12681 (linux_detach): Don't delete the main lwp here.
12682 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12683 (status_pending_p): Don't consider explicitly suspended lwps.
12684 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12685 pointer. Add OPTIONS argument. Change return type to int. Use
12686 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12687 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12688 pointer. Add status pointer argument. Return a pid instead of a
12689 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12690 changes. In non-stop mode, don't switch to a random thread.
12691 (linux_wait): Rename to...
12692 (linux_wait_1): ... this. Add target_options argument, and handle
12693 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12694 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12695 clean exit and signal exit code. Don't stop all threads in
12696 non-stop mode. In all-stop mode, only stop all threads when
12697 reporting a stop to GDB. Handle explicit thread stop requests.
12698 (async_file_flush, async_file_mark): New.
12699 (linux_wait): New.
12700 (send_sigstop): Use lwpid_of.
12701 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12702 interface changes. In non-stop mode, don't switch to a random
12703 thread.
12704 (linux_resume_one_lwp): Use lwpid_of.
12705 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12706 (linux_resume_one_thread): ... this. Handle resume_stop. In
12707 non-stop mode, don't look for pending flag in all threads.
12708 (resume_status_pending_p): Don't consider explicitly suspended
12709 threads.
12710 (my_waitpid): Reimplement. Emulate __WALL.
12711 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12712 Use lwpid_of.
12713 (sigchld_handler, linux_supports_non_stop, linux_async)
12714 (linux_start_non_stop): New.
12715 (linux_target_ops): Register linux_supports_non_stop, linux_async
12716 and linux_start_non_stop.
12717 (initialize_low): Install SIGCHLD handler.
12718 * thread-db.c (thread_db_create_event, find_one_thread)
12719 (thread_db_get_tls_address): Use lwpid_of.
12720 * win32-low.c (win32_detach): Adjust to use resume_kind.
12721 (win32_wait): Add `options' argument.
12722 * spu-low.c (spu_resume): Adjust to use resume_kind.
12723 (spu_wait): Add `options' argument.
12724
5b1c542e
PA
127252009-04-01 Pedro Alves <pedro@codesourcery.com>
12726
12727 Decouple target code from remote protocol.
12728
12729 * target.h (enum target_waitkind): New.
12730 (struct target_waitstatus): New.
12731 (struct target_ops) <wait>: Return an unsigned long. Take a
12732 target_waitstatus pointer instead of a char pointer.
12733 (mywait): Likewise.
12734 * target.c (mywait): Change prototype to return an unsigned long.
12735 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12736 * server.h (thread_from_wait, old_thread_from_wait): Delete
12737 declarations.
12738 (prepare_resume_reply): Change prototype to take a
12739 target_waitstatus.
12740 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12741 (last_status, last_ptid): New.
12742 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12743 pid instead of a signal.
12744 (attach_inferior): Remove "status" and "signal" parameters.
12745 Adjust.
12746 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12747 not as an address.
12748 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12749 (handle_v_requests, myresume): Remove "status" and "signal"
12750 parameters. Adjust.
12751 (handle_status): New.
12752 (main): Delete local `status'. Adjust.
12753 * remote-utils.c: Include target.h.
12754 (prepare_resume_reply): Change prototype to take a
12755 target_waitstatus. Adjust.
12756
12757 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12758 interface.
12759 * spu-low.c (spu_wait): Adjust.
12760 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12761 Delete.
12762 (win32_wait): Adjust.
12763
2bd7c093
PA
127642009-04-01 Pedro Alves <pedro@codesourcery.com>
12765
12766 * target.h (struct thread_resume): Delete leave_stopped member.
12767 (struct target_ops): Add a `n' argument to the `resume' callback.
12768 * server.c (start_inferior): Adjust.
12769 (handle_v_cont, myresume): Adjust.
12770 * linux-low.c (check_removed_breakpoint): Adjust to resume
12771 interface change, and to removed leave_stopped field.
12772 (resume_ptr): Delete.
12773 (struct thread_resume_array): New.
12774 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12775 resume interface change.
12776 (linux_continue_one_thread, linux_queue_one_thread)
12777 (resume_status_pending_p): Check if the resume field is NULL
12778 instead of checking the leave_stopped member.
12779 (linux_resume): Adjust to the target resume interface change.
12780 * spu-low.c (spu_resume): Adjust to the target resume interface
12781 change.
12782 * win32-low.c (win32_detach, win32_resume): Ditto.
12783
c35fafde
PA
127842009-04-01 Pedro Alves <pedro@codesourcery.com>
12785
12786 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12787 flag.
12788 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12789 pending.
12790 (linux_continue_one_thread): Only preserve the stepping flag if
12791 there's a pending breakpoint.
12792
0a59d50b
PA
127932009-03-31 Pedro Alves <pedro@codesourcery.com>
12794
12795 * server.c (main): After the inferior having exited, call
12796 remote_close before exiting gdbserver.
12797
f04c6d38
TJB
127982009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12799
12800 Fix size of FPSCR in Power 7 processors.
12801 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12802 (PPC_FEATURE_HAS_DFP): New #define.
12803 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12804 size of the FPSCR.
12805
78e5cee6
PA
128062009-03-23 Pedro Alves <pedro@codesourcery.com>
12807
12808 * server.c (handle_query) Whitespace and formatting.
12809
1b3f6016
PA
128102009-03-22 Pedro Alves <pedro@codesourcery.com>
12811
12812 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12813 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12814 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12815 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12816 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12817 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12818 Makefile.in, configure.ac: Fix whitespace throughout.
12819 * configure: Regenerate.
12820
a07b2135
PA
128212009-03-22 Pedro Alves <pedro@codesourcery.com>
12822
12823 * inferiors.c (find_inferior): Make it safe for the callback
12824 function to delete the currently iterated inferior.
12825
67cc2626
PA
128262009-03-22 Pedro Alves <pedro@codesourcery.com>
12827
12828 * Makefile.in (linuw_low_h): Move higher.
12829 (thread-db.o): Depend on $(linux_low_h).
12830
54a0b537
PA
128312009-03-17 Pedro Alves <pedro@codesourcery.com>
12832
12833 Rename "process" to "lwp" throughout.
12834
12835 * linux-low.c (all_processes): Rename to...
12836 (all_lwps): ... this.
12837 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12838 (add_process): Rename to ...
12839 (add_lwp): ... this. Adjust.
12840 (linux_create_inferior): Adjust.
12841 (linux_attach_lwp): Adjust.
12842 (linux_attach): Adjust.
12843 (linux_kill_one_process): Rename to ...
12844 (linux_kill_one_lwp): ... this. Adjust.
12845 (linux_kill): Adjust.
12846 (linux_detach_one_process): Rename to ...
12847 (linux_detach_one_lwp): ... this. Adjust.
12848 (linux_detach): Adjust.
12849 (check_removed_breakpoint): Adjust.
12850 (status_pending_p): Adjust.
12851 (linux_wait_for_process): Rename to ...
12852 (linux_wait_for_lwp): ... this. Adjust.
12853 (linux_wait_for_event): Adjust.
12854 (send_sigstop): Adjust.
12855 (wait_for_sigstop): Adjust.
12856 (stop_all_processes): Rename to ...
12857 (stop_all_lwps): ... this.
12858 (linux_resume_one_process): Rename to ...
12859 (linux_resume_one_lwp): ... this. Adjust.
12860 (linux_set_resume_request, linux_continue_one_thread)
12861 (linux_queue_one_thread, resume_status_pending_p)
12862 (usr_store_inferior_registers, regsets_store_inferior_registers)
12863 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12864 Adjust.
12865 * linux-low.h (get_process): Rename to ...
12866 (get_lwp): ... this. Adjust.
12867 (get_thread_process): Rename to ...
12868 (get_thread_lwp): ... this. Adjust.
12869 (get_process_thread): Rename to ...
12870 (get_lwp_thread): ... this. Adjust.
12871 (struct process_info): Rename to ...
12872 (struct lwp_info): ... this.
12873 (all_processes): Rename to ...
12874 (all_lwps): ... this.
12875 * proc-service.c (ps_lgetregs): Adjust.
12876 * thread-db.c (thread_db_create_event, find_one_thread)
12877 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12878
0b16c5cf
PA
128792009-03-14 Pedro Alves <pedro@codesourcery.com>
12880
12881 * server.c (handle_query): Handle "qAttached".
12882
32de4b9d
NS
128832009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12884
12885 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12886 GPLv3, update license URL.
12887
2aecd87f
DE
128882009-03-01 Doug Evans <dje@google.com>
12889
93efd302 12890 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12891 (server_h): Add gdb_signals.h.
12892 (signals.o): Update.
12893 * server.h (target_signal_from_host,target_signal_to_host_p)
12894 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12895
86b1f9c5
PM
128962009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12897
12898 * remote-utils.c (getpkt): Also generate remote-debug
12899 information if noack_mode is set.
12900
4aa995e1
PA
129012009-02-06 Pedro Alves <pedro@codesourcery.com>
12902
12903 * server.c (handle_query): Report qXfer:siginfo:read and
12904 qXfer:siginfo:write as supported and handle them.
12905 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12906 * linux-low.c (linux_xfer_siginfo): New.
12907 (linux_target_ops): Set it.
12908
62709adf
PA
129092009-01-26 Pedro Alves <pedro@codesourcery.com>
12910
12911 * server.c (gdbserver_usage): Mention --remote-debug.
12912 (main): Accept '--remote-debug' switch.
12913
aef93bd7
DE
129142009-01-18 Doug Evans <dje@google.com>
12915
12916 * regcache.c (new_register_cache): No need to check result of xcalloc.
12917 * server.c (handle_search_memory): Back out calls to xmalloc,
12918 result is checked and error is returned to user upon failure.
12919 (handle_query): Ditto. Add more checks for result of malloc.
12920 (handle_v_cont): Check result of malloc, report error back to
12921 user upon failure.
12922 (handle_v_run): Ditto. Call freeargv.
12923 * server.h (freeargv): Declare.
12924 * utils.c (freeargv): New fn.
12925
54363045
DE
129262009-01-15 Doug Evans <dje@google.com>
12927
f626972c
DE
12928 * gdbreplay.c (perror_with_name): Make arg const char *.
12929 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12930 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12931 * utils.c (perror_with_name): Make arg const char *.
54363045 12932
18aae699
PA
129332009-01-14 Pedro Alves <pedro@codesourcery.com>
12934
12935 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12936 when handling a EXIT_PROCESS_DEBUG_EVENT.
12937
ff703abe
JB
129382009-01-06 Joel Brobecker <brobecker@adacore.com>
12939
12940 * gdbreplay.c (gdbreplay_version): Update copyright year.
12941 * server.c (gdbserver_version): Likewise.
12942
f21cc1a2 129432009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12944
12945 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12946 (handle_extended_wait): Improve comment.
0e21c1ec 12947
bca929d3
DE
129482008-12-13 Doug Evans <dje@google.com>
12949
12950 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12951 * server.h (ATTR_MALLOC): New macro.
12952 (xmalloc,xcalloc,xstrdup): Declare.
12953 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12954 * inferiors.c: Ditto.
12955 * linux-low.c: Ditto.
12956 * mem-break.c: Ditto.
12957 * regcache.c: Ditto.
12958 * remote-utils.c: Ditto.
12959 * server.c: Ditto.
12960 * target.c: Ditto.
12961 * win32-low.c: Ditto.
12962
97438e3f
DE
129632008-12-12 Doug Evans <dje@google.com>
12964
896c7fbb
DE
12965 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12966 in debugging printf.
12967
97438e3f
DE
12968 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12969
e3b886f8
DE
129702008-12-09 Doug Evans <dje@google.com>
12971
12972 * linux-low.h (struct process_info): Delete member tid, unused.
12973 * thread-db.c (find_one_thread): Update.
12974 (maybe_attach_thread): Update.
12975
07e059b5
VP
129762008-12-02 Pedro Alves <pedro@codesourcery.com>
12977
889bf7c5
PA
12978 * target.h (struct target_ops): Add qxfer_osdata member.
12979 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12980 and dirent.h.
12981 (linux_qxfer_osdata): New functions.
12982 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12983 callback.
12984 * server.c (handle_query): Handle "qXfer:osdata:read:".
12985 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12986 (buffer_xml_printf): New functions.
12987 * server.h (struct buffer): New.
12988 (buffer_grow_str, buffer_grow_str0): New macros.
12989 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12990 (buffer_xml_printf): Declare.
07e059b5 12991
4cab47ab
DE
129922008-11-24 Doug Evans <dje@google.com>
12993
12994 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12995
f142445f
DJ
129962008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12997
12998 * server.c (handle_v_run): Always use the supplied argument list.
12999
d0107bb6 130002008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13001
d0107bb6
BW
13002 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13003 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13004
2c4ad781
TJB
130052008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13006
13007 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13008 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13009 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13010 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13011 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13012 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13013 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13014 XML target descriptions.
13015 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13016 when inferior is running on an ISA 2.05 or later processor. Add
13017 special case to return offset for full 64-bit slot of FPSCR when
13018 in 32-bits.
13019
dfb64f85
DJ
130202008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13021
13022 * Makefile.in (SFILES, clean): Added sparc64 files.
13023 (reg-sparc64.o, reg-sparc64.c): New.
13024 * configure.srv (sparc*-*-linux*): New configuration.
13025 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13026 syscall arguments for SPARC.
13027 (regsets_store_inferior_registers): Likewise.
13028 * linux-sparc-low.c: New file.
13029
66b6e1dd
DE
130302008-10-21 Doug Evans <dje@google.com>
13031
13032 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13033 (READLINE_DIR,READLINE_DEP): Delete.
13034 (INTERNAL_CFLAGS): Update.
13035 (LINTFLAGS): Update.
13036
9b710a42
PA
130372008-10-10 Pedro Alves <pedro@codesourcery.com>
13038
13039 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13040 whole argv from the last run, not just argv[0].
13041
5822d809
PA
130422008-09-08 Pedro Alves <pedro@codesourcery.com>
13043
13044 * regcache.c (new_register_cache): Return NULL if the register
13045 cache size isn't known yet.
13046 (free_register_cache): Avoid dereferencing a NULL regcache.
13047
74aac56f
DJ
130482008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13049
13050 * configure.srv: Merge MIPS and MIPS64.
13051
400b20f5
MR
130522008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13053
13054 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13055
677c5bb1
LM
130562008-08-18 Luis Machado <luisgpm@br.ibm.com>
13057
13058 * Makefile.in: Add required vsx dependencies.
13059
13060 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13061 Declare init_registers_powerpc_vsx32l.
13062 Declare init_registers_powerpc_vsx64l.
13063 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13064 (ppc_arch_setup): Check for VSX in hwcap.
13065 (ppc_fill_vsxregset): New function.
13066 (ppc_store_vsxregset): New function.
13067 Add new VSX entry in regset_info target_regsets.
13068
13069 * configure.srv: Add new VSX dependencies.
13070
a6f3e723
SL
130712008-08-12 Pedro Alves <pedro@codesourcery.com>
13072
13073 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13074 (remote_open): Set or clear transport_is_reliable.
13075 (putpkt_binary): Don't expect acks in noack mode.
13076 (getpkt): Don't send ack/nac in noack mode.
13077 * server.c (handle_general_set): Handle QStartNoAckMode.
13078 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13079 qSupported.
13080 (main): Reset noack_mode on every connection.
13081 * server.h (noack_mode): Declare.
13082
a417dc56
RW
130832008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13084
13085 * Makefile.in (GDBREPLAY_OBS): New variable.
13086 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13087
3221518c
UW
130882008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13089 Daniel Jacobowitz <dan@codesourcery.com>
13090
13091 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13092 (usr_store_inferior_registers): Likewise.
13093 (regsets_store_inferior_registers): Likewise.
13094
ec56be1b
PA
130952008-07-31 Rolf Jansen <rj@surtec.com>
13096 Pedro Alves <pedro@codesourcery.com>
13097
13098 * configure.ac: Check for memmem declaration.
13099 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13100 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13101 (disable_packet_qfThreadInfo): Unconditionally compile.
13102 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13103 * configure, config.in: Regenerate.
13104
2fe5e3ff
DE
131052008-07-28 Doug Kwan <dougkwan@google.com>
13106
13107 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13108 (linux_write_memory): Remove declaration of errno.
13109
836acd6d
UW
131102008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13111
13112 * linux-low.c (handle_extended_wait): Do not use "status"
13113 variable uninitialized.
13114
aeba519e
PA
131152008-07-07 Pedro Alves <pedro@codesourcery.com>
13116
13117 * server.c (handle_v_attach): Inhibit reporting dll changes.
13118
db42f210
PA
131192008-06-27 Pedro Alves <pedro@codesourcery.com>
13120
13121 * remote-utils.c (prepare_resume_reply): If requested, don't
13122 output "thread:TID" in the T stop reply.
13123
13124 * server.c (disable_packet_vCont, disable_packet_Tthread)
13125 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13126 (handle_query): If requested, disable support for qC, qfThreadInfo
13127 and qsThreadInfo.
13128 (handle_v_requests): If requested, disable support for vCont.
13129 (gdbserver_show_disableable): New.
13130 (main): Handle --disable-packet and --disable-packet=LIST.
13131
13132 * server.h (disable_packet_vCont, disable_packet_Tthread)
13133 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13134
8e4c5421
CD
131352008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13136
13137 * server.c (gdbserver_usage): Mention --version.
13138
6e23a804
DJ
131392008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * Makefile.in (gdbreplay.o): New rule.
13142
90aa6a40
JM
131432008-06-06 Joseph Myers <joseph@codesourcery.com>
13144
13145 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13146 message, not gdbserver.
13147
c16158bc 131482008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13149 Nathan Sidwell <nathan@codesourcery.com>
13150 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13151
13152 * acinclude.m4: Include ../../config/acx.m4.
13153 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13154 * configure, config.in: Regenerate.
13155 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13156 * server.c (gdbserver_version): Print PKGVERSION.
13157 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13158 (main): Adjust gdbserver_usage calls.
13159 * gdbreplay.c (version, host_name): Add declarations.
13160 (gdbreplay_version, gdbreplay_usage): New.
13161 (main): Accept --version and --help options.
13162
aeb75bf5
DJ
131632008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13164
13165 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13166 (arm_breakpoint_at): Handle Thumb.
13167 (the_low_target): Add comment.
13168
76b233dd
UW
131692008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13170
13171 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13172
08388c79
DE
131732008-05-09 Doug Evans <dje@google.com>
13174
a3c83fae
DE
13175 * server.h (decode_search_memory_packet): Declare.
13176 * remote-utils.c (decode_search_memory_packet): New fn.
13177 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13178 (handle_search_memory): New fn.
13179 (handle_query): Process qSearch:memory packets.
13180
bb9c3d36
UW
131812008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13182
13183 * regcache.c (registers_length): Remove.
13184 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13185 full register packet.
13186 * regcache.h (registers_length): Remove prototype.
13187 * server.h (PBUFSIZ): Define to 16384.
13188
7284e1be
UW
131892008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13190
13191 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13192 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13193 powerpc-64l.o, and powerpc-altivec64l.o.
13194 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13195 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13196 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13197 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13198 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13199 to srv_xmlfiles.
13200
13201 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13202 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13203 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13204 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13205 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13206 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13207 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13208 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13209 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13210 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13211 (clean): Update.
13212
13213 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13214 (init_registers_powerpc_32l): ... this new prototype.
13215 (init_registers_powerpc_32): Remove, replace by ...
13216 (init_registers_powerpc_altivec32l): ... this new prototype.
13217 (init_registers_powerpc_e500): Remove, replace by ...
13218 (init_registers_powerpc_e500l): ... this new prototype.
13219 (init_registers_ppc64): Remove, replace by ...
13220 (init_registers_powerpc_64l): ... this new prototype.
13221 (init_registers_powerpc_64): Remove, replace by ...
13222 (init_registers_powerpc_altivec64l): ... this new prototype.
13223 (ppc_num_regs): Set to 73.
13224 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13225 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13226 (ppc_cannot_store_register): Handle orig_r3 and trap.
13227 (ppc_arch_setup): Update init_registers_... calls.
13228 (ppc_fill_gregset): Handle orig_r3 and trap.
13229
13230 * inferiors.c (clear_inferiors): Reset current_inferior.
13231
fdc59709
PB
132322008-04-23 Paolo Bonzini <bonzini@gnu.org>
13233
889bf7c5
PA
13234 * acinclude.m4: Add override.m4.
13235 * configure: Regenerate.
fdc59709 13236
c9b2f845
UW
132372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13238
13239 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13240 initial call to init_register_ppc64.
13241
550512b8
UW
132422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13243
43aaf8b6
PA
13244 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13245 single powerpc*-*-linux* case.
550512b8
UW
13246 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13247
b6430ec3
UW
132482008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13249
13250 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13251 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13252 from reg_xmlfiles.
13253 * linux-ppc-low.c: Include <elf.h>.
13254 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13255 (ppc_hwcap): New global variable.
13256 (ppc_regmap): Remove __SPE__ #ifdef sections.
13257 (ppc_regmap_e500): New global variable.
13258 (ppc_cannot_store_register): Update __SPE__ special case.
13259 (ppc_get_hwcap): New function.
13260 (ppc_arch_setup): Use it to determine whether inferior supports
13261 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13262 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13263 Do not access registers if target does not support AltiVec.
13264 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13265 Do not access registers if target does not support SPE.
13266 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13267
52fa2412
UW
132682008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13269
13270 * linux-low.c (disabled_regsets, num_regsets): New.
13271 (use_regsets_p): Delete.
13272 (linux_wait_for_process): Clear disabled_regsets.
13273 (regsets_fetch_inferior_registers): Check and set it.
13274 (regsets_store_inferior_registers): Likewise.
13275 (linux_fetch_registers, linux_store_registers): Do not use
13276 use_regsets_p.
13277 (initialize_low): Allocate disabled_regsets.
13278
e28b3332
DJ
132792008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13280
13281 * Makefile.in (LIBOBJS): New.
13282 (OBS): Use LIBOBJS.
13283 (memmem.o): New rule.
13284 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13285 * configure: Regenerated.
13286
4536995d
UW
132872008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * server.c (handle_query): Never return "unsupported" for
13290 qXfer:features:read queries.
13291
221c031f
UW
132922008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13293
13294 * server.c (get_features_xml): Fix inverted condition.
13295 (handle_query): Always support qXfer:feature:read.
13296
ccd213ac
DJ
132972008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13298
13299 * server.c (wrapper_argv): New.
13300 (start_inferior): Handle wrapper_argv. If set, expect an extra
13301 trap.
13302 (gdbserver_usage): Document --wrapper.
13303 (main): Parse --wrapper.
13304
6fe305f7
UW
133052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13306
13307 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13308 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13309 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13310 (ppc_set_pc): Likewise.
13311 (ppc_arch_setup): New function.
13312 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13313 of collect_register.
889bf7c5 13314 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13315
5b0a002e
UW
133162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13317
13318 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13319 instead of linux-ppc64-low.o.
13320 * linux-ppc64-low.c: Remove file.
13321 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13322 (linux-ppc64-low.o): Remove rule.
13323
13324 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13325 (init_registers_powerpc_64): Likewise.
13326 (ppc_regmap): Conditionally define depending on __powerpc64__.
13327 (ppc_cannot_store_register): Do not special-case "fpscr" when
13328 compiled on __powerpc64__.
13329 (ppc_collect_ptrace_register): New function.
13330 (ppc_supply_ptrace_register): New function.
13331 (ppc_breakpoint): Change type to "unsigned int".
13332 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13333 (the_low_target): Conditionally provide initializers for the
889bf7c5 13334 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13335 collect_ptrace_register and supply_ptrace_register members.
13336
9b4b61c8
UW
133372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13338
13339 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13340 * server.c (gdbserver_xmltarget): Define.
13341 (get_features_xml): Use it to replace "target.xml" and arch_string.
13342
13343 * configure.srv: Remove srv_xmltarget. Add XML files that were
13344 mentioned there to srv_xmlfiles instead. Remove conditional tests
13345 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13346 srv_xmlfiles and srv_regobj to include all possible choices.
13347 * configure.ac (srv_xmltarget): Remove.
13348 (srv_xmlfiles): Do not add "target.xml".
13349 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13350 checks for supplementary target information.
13351 * configure: Regenerate.
13352 * Makefile.in (XML_TARGET): Remove.
13353 (target.xml): Remove rule.
13354 (clean): Do not clean up target.xml.
13355 (.PRECIOUS): Do not mention target.xml.
13356
13357 * target.h (struct target_ops): Remove arch_string member.
13358 * linux-low.c (linux_arch_string): Remove.
13359 (linux_target_ops): Remove arch_string initializer.
13360 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13361 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13362 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13363 * spu-low.c (spu_arch_string): Remove.
13364 (spu_target_ops): Remove arch_string initializer.
13365 * win32-low.c (win32_arch_string): Remove.
13366 (win32_target_ops): Remove arch_string initializer.
13367 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13368 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13369 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13370
ee1a7ae4
UW
133712008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13372
13373 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13374 by collect_ptrace_register and supply_ptrace_register hooks.
13375 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13376 instead of checking for the_low_target.left_pad_xfer.
13377 (usr_store_inferior_registers): Use collect_ptrace_register callback
13378 instead of checking for the_low_target.left_pad_xfer.
13379
13380 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13381 (s390_supply_ptrace_register): Likewise.
13382 (s390_fill_gregset): Call s390_collect_ptrace_register.
13383 (the_low_target): Update.
13384
13385 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13386 (ppc_supply_ptrace_register): Likewise.
13387 (the_low_target): Update.
13388
13389 * linux-i386-low.c (the_low_target): Update.
13390 * linux-x86-64-low.c (the_low_target): Update.
13391
d61ddec4
UW
133922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13393
13394 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13395 reg-s390.o and reg-s390x.o.
13396
13397 * linux-low.c (new_inferior): New global variable.
13398 (linux_create_inferior, linux_attach): Set it.
13399 (linux_wait_for_process): Call the_low_target.arch_setup after the
13400 target has stopped for the first time.
13401 (initialize_low): Do not call the_low_target.arch_setup.
13402
13403 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13404 (s390_set_pc): Likewise.
13405 (s390_arch_setup): New function.
13406 (the_low_target): Use s390_arch_setup as arch_setup routine.
13407
13408 * regcache.c (realloc_register_cache): New function.
13409 (set_register_cache): Call it for each existing regcache.
13410
d05b4ac3
UW
134112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13412
13413 * server.h (init_registers): Remove prototype.
13414
13415 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13416 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13417 instead of init_registers ().
13418 * linux-arm-low.c (init_registers_arm): Add prototype.
13419 (init_registers_arm_with_iwmmxt): Likewise.
13420 (the_low_target): Add initializer for arch_setup field.
13421 * linux-cris-low.c (init_registers_cris): Add prototype.
13422 (the_low_target): Add initializer for arch_setup field.
13423 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13424 (the_low_target): Add initializer for arch_setup field.
13425 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13426 (the_low_target): Add initializer for arch_setup field.
13427 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13428 (the_low_target): Add initializer for arch_setup field.
13429 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13430 (the_low_target): Add initializer for arch_setup field.
13431 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13432 (the_low_target): Add initializer for arch_setup field.
13433 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13434 (init_registers_mips64_linux): Likewise.
13435 (the_low_target): Add initializer for arch_setup field.
13436 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13437 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13438 (the_low_target): Add initializer for arch_setup field.
13439 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13440 (init_registers_powerpc_64): Likewise.
13441 (the_low_target): Add initializer for arch_setup field.
13442 * linux-s390-low.c (init_registers_s390): Add prototype.
13443 (init_registers_s390x): Likewise.
13444 (the_low_target): Add initializer for arch_setup field.
13445 * linux-sh-low.c (init_registers_sh): Add prototype.
13446 (the_low_target): Add initializer for arch_setup field.
13447 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13448 (the_low_target): Add initializer for arch_setup field.
13449 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13450 (the_low_target): Add initializer for arch_setup field.
13451
13452 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13453 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13454 instead of init_registers ().
13455 * win32-arm-low.c (init_registers_arm): Add prototype.
13456 (the_low_target): Add initializer for arch_setup field.
13457 * win32-i386-low.c (init_registers_i386): Add prototype.
13458 (the_low_target): Add initializer for arch_setup field.
13459
13460 * spu-low.c (init_registers_spu): Add prototype.
13461 (initialize_low): Call initialie_registers_spu () instead of
13462 initialize_registers ().
13463
fd96d250
PA
134642008-02-19 Pedro Alves <pedro@codesourcery.com>
13465
13466 * server.c (handle_v_requests): When handling the vRun and vAttach
13467 packets, if already debugging a process, don't kill it. Return an
13468 error instead.
13469
d41b6bb4
DJ
134702008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13471
13472 * server.c (handle_query): Correct length check.
13473
5ac588cf
PA
134742008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13475
13476 * win32-low.c (do_initial_child_stuff): Add process handle
13477 parameter. Set current_process_handle and current_process_id from the
13478 parameters. Clear globals.
13479 (win32_create_inferior): Don't set current_process_handle and
13480 current_process_id here. Instead pass them on the call to
13481 do_initial_child_stuff.
13482 (win32_attach): Likewise.
13483 (win32_clear_inferiors): New.
13484 (win32_kill): Don't close the current process handle or the
13485 current thread handle here. Instead call win32_clear_inferiors.
13486 (win32_detach): Don't open a new handle to the process. Call
13487 win32_clear_inferiors.
13488 (win32_join): Don't rely on current_process_handle; open a new
13489 handle using the process id.
13490 (win32_wait): Call win32_clear_inferiors when the inferior process
13491 has exited.
13492
ecd7ecbc
DJ
134932008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13494
13495 * server.c (monitor_show_help): Add "exit".
13496
1525d545
MG
134972008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13498
ecd7ecbc 13499 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13500 (clean): Add reg-xtensa.c.
13501 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13502 * configure.srv (xtensa*-*-linux*) New target.
13503 * linux-xtensa-low.c: New.
13504 * xtensa-xtregs.c: New.
1525d545 13505
59a016f0
PA
135062008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13507
13508 * hostio.c: Don't include errno.h.
13509 (errno_to_fileio_errno): Move to hostio-errno.
13510 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13511 error number outputting to the target->hostio_last_error callback.
13512 (hostio_packet_error): Use FILEIO_EINVAL directly.
13513 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13514 calls to hostio_error.
13515 * hostio-errno.c: New.
13516 * server.h (hostio_last_error_from_errno): Declare.
13517 * target.h (target_ops): Add hostio_last_error member.
13518 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13519 as hostio_last_error handler.
889bf7c5 13520 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13521 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13522 (wince_hostio_last_error): New functions.
13523 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13524 as hostio_last_error handler.
13525 (win32_target_ops) [!_WIN32_WCE]: Register
13526 hostio_last_error_from_errno as hostio_last_error handler.
13527 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13528 (hostio-errno.o): New rule.
13529 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13530 * configure.srv (srv_hostio_err_objs): New variable. Default to
13531 hostio-errno.o.
13532 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13533 * configure: Regenerate.
13534
2d717e4f
DJ
135352008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13536
13537 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13538 (linux_kill, linux_detach): Clean up the process list.
13539 * remote-utils.c (remote_open): Improve port number parsing.
13540 (putpkt_binary, input_interrupt): Only send interrupts if the target
13541 is running.
13542 * server.c (extended_protocol): Make static.
13543 (attached): Define earlier.
13544 (exit_requested, response_needed, program_argv): New variables.
13545 (target_running): New.
13546 (start_inferior): Clear attached here.
13547 (attach_inferior): Set attached here.
13548 (require_running): Define.
13549 (handle_query): Use require_running and target_running. Implement
13550 "monitor exit".
13551 (handle_v_attach, handle_v_run): New.
13552 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13553 (gdbserver_usage): Update.
13554 (main): Redo argument parsing. Handle --debug and --multi. Handle
13555 --attach along with other options or after the port. Save
13556 program_argv. Support no initial program. Resynchronize
13557 communication with GDB after an error. Handle "monitor exit".
13558 Use require_running and target_running. Always allow the extended
13559 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13560 restart in extended mode.
13561 * README: Refer to the GDB manual. Update --attach usage.
13562
7407e2de
AS
135632007-12-20 Andreas Schwab <schwab@suse.de>
13564
13565 * linux-low.c (STACK_SIZE): Define.
13566 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13567 (linux_test_for_tracefork): Likewise.
13568
b65d95c5
DJ
135692007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * linux-low.c (linux_wait_for_event): Update messages. Do not
13572 reinsert auto-delete breakpoints.
13573 * mem-break.c (struct breakpoint): Change return type of handler to
13574 int.
13575 (set_breakpoint_at): Update handler type.
13576 (reinsert_breakpoint_handler): Return 1 instead of calling
13577 delete_breakpoint.
13578 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13579 setting a new one.
13580 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13581 * mem-break.h (set_breakpoint_at): Update handler type.
13582 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13583 * win32-low.c (auto_delete_breakpoint): New.
13584 (get_child_debug_event): Use it.
13585
4e799345
DJ
135862007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13587
13588 * configure.ac: Check for pread and pwrite.
13589 * hostio.c (handle_pread): Fall back to lseek and read.
13590 (handle_pwrite): Fall back to lseek and write.
13591 * config.in, configure: Regenerated.
13592
27524b67
DJ
135932007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * server.c (myresume): Add own_buf argument.
13596 (main): Update calls.
13597
a20d5e98
DJ
135982007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13601 * remote-utils.c (remote_open): Do not call disable_async_io.
13602 (block_async_io): Delete.
13603 (unblock_async_io): Make static.
13604 (initialize_async_io): New.
13605 * server.c (handle_v_cont): Handle async I/O here.
13606 (myresume): Likewise. Move other common resume tasks here...
13607 (main): ... from here. Call initialize_async_io. Disable async
13608 I/O before the main loop.
13609 * server.h (initialize_async_io): Declare.
13610 (block_async_io, unblock_async_io): Delete prototypes.
13611 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13612
b79d787e
DJ
136132007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13614
13615 * remote-utils.c (readchar): Allow binary data in received messages.
13616
d97903b2
PA
136172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13618
13619 * win32-low.c (attaching): New global.
13620 (win32_create_inferior): Clear the `attaching' global.
13621 (win32_attach): Set the `attaching' global.
13622 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13623 attaching. Only set a breakpoint at the entry point if not
13624 attaching.
13625
311de423
PA
136262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13627
13628 * server.c (main): Don't report dll events on the initial
13629 connection on attaches.
13630
6c2d16d2
PA
136312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13632
13633 * server.c (main): Relax numerical bases supported for the pid of
13634 the --attach command line argument.
13635
5ca906e6
PA
136362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13637
13638 * win32-low.c (win32_attach): Call OpenProcess before
13639 DebugActiveProcess, not after. Add last error output to error
13640 call.
13641
9c6c8194
PA
136422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * win32-low.c (win32_get_thread_context)
13645 (win32_set_thread_context): New functions.
13646 (thread_rec): Use win32_get_thread_context.
13647 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13648 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13649 field.
13650
4d5d1aaa
PA
136512007-12-03 Leo Zayas
13652 Pedro Alves <pedro_alves@portugalmail.pt>
13653
13654 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13655 global variables.
13656 (child_add_thread): Minor cleanup.
13657 (child_continue): Resume artificially suspended threads before
13658 calling ContinueDebugEvent.
13659 (suspend_one_thread): New.
13660 (fake_breakpoint_event): New.
13661 (get_child_debug_event): Change return type to int. Check here if
13662 gdb sent an interrupt request. If a soft interrupt was requested,
13663 fake a breakpoint event. Return 0 if there is no event to handle,
13664 and 1 otherwise.
13665 (win32_wait): Don't check here if gdb sent an interrupt request.
13666 Ensure there is a valid event to handle.
13667 (win32_request_interrupt): Add soft interruption method as last
13668 resort.
13669
c436e841
PA
136702007-12-03 Leo Zayas
13671 Pedro Alves <pedro_alves@portugalmail.pt>
13672
13673 * win32-low.h (win32_thread_info): Add descriptions to the
13674 structure members. Replace `suspend_count' counter by a
13675 `suspended' flag.
13676 * win32-low.c (thread_rec): Update condition of when to get the
13677 context from the inferior. Rely on ContextFlags being set if it
13678 has already been retrieved. Only suspend the inferior thread if
13679 we haven't already. Warn if that fails.
13680 (continue_one_thread): s/suspend_count/suspended/. Only call
13681 ResumeThread once. Warn if that fails.
13682
e7b5fa67
PA
136832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13684
13685 * win32-low.c (win32_wait): Don't read from the inferior when it
13686 has already exited.
13687
a385171d
PA
136882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13689
13690 * Makefile.in (win32_low_h): New variable.
13691 (win32-low.o): Add dependency on $(win32_low_h).
13692 (win32-arm-low.o, win32-i386-low.o): New rules.
13693
f80c84b3
DJ
136942007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * hostio.c: Correct copyright year.
13697
a6b151f1
DJ
136982007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * Makefile.in (OBS): Add hostio.o.
13701 (hostio.o): New rule.
13702 * server.h (handle_vFile): Declare.
13703 * hostio.c: New file.
13704 * server.c (handle_v_requests): Take packet_len and new_packet_len
13705 for binary packets. Call handle_vFile.
13706 (main): Update call to handle_v_requests.
13707
f9387fc3
DJ
137082007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13709
13710 * linux-low.c: Include <sched.h>.
13711
51c2684e
DJ
137122007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * linux-low.c (linux_tracefork_grandchild): New.
13715 (linux_tracefork_child): Use clone.
13716 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13717
75f83163
JB
137182007-10-31 Joel Brobecker <brobecker@adacore.com>
13719
13720 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13721
da5898ce
DJ
137222007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13723
13724 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13725
24a09b5f
DJ
137262007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13727
13728 * inferiors.c (change_inferior_id): Delete.
13729 (add_pid_to_list, pull_pid_from_list): New.
13730 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13731 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13732 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13733 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13734 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13735 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13736 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13737 (using_threads): Always set to 1.
13738 (handle_extended_wait): New.
13739 (add_process): Do not set TID.
13740 (linux_create_inferior): Set must_set_ptrace_flags.
13741 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13742 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13743 (linux_thread_alive): Rename TID argument to LWPID.
13744 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13745 (linux_wait_for_event): Do not use TID or check using_threads. Update
13746 call to dead_thread_notify. Call handle_extended_wait.
13747 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13748 (send_sigstop): Delete sigstop_sent.
13749 (wait_for_sigstop): Avoid TID.
13750 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13751 (linux_test_for_tracefork): New.
13752 (linux_lookup_signals): Use thread_db_active and
13753 linux_supports_tracefork_flag.
13754 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13755 * linux-low.h (get_process_thread): Avoid TID.
13756 (struct process_ifo): Move thread_known and tid to the end. Remove
13757 sigstop_sent.
13758 (linux_attach_lwp, thread_db_init): Update prototypes.
13759 * server.h (change_inferior_id): Delete prototype.
13760 (add_pid_to_list, pull_pid_from_list): New prototypes.
13761 * thread-db.c (thread_db_use_events): New.
13762 (find_first_thread): Rename to...
13763 (find_one_thread): ...this. Update callers and messages. Do not
13764 call fatal. Check thread_db_use_events. Do not call
13765 change_inferior_id or new_thread_notify.
13766 (maybe_attach_thread): Update. Do not call new_thread_notify.
13767 (thread_db_init): Set thread_db_use_events. Check use_events.
13768 * utils.c (fatal, warning): Correct message prefix.
13769
30ed0a8f
DJ
137702007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13771
13772 * Makefile.in (clean): Remove new files.
13773 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13774 (powerpc-64.o, powerpc-64.c): New rules.
13775 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13776 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13777 with SPE.
13778 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13779 SPE targets.
13780 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13781 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13782 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13783 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13784 (target_regsets): Add AltiVec and SPE register sets.
13785 * configure.ac: Check for AltiVec and SPE.
13786 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13787 (ppc_fill_vrregset, ppc_store_vrregset): New.
13788 (target_regsets): Add AltiVec register set.
13789 * configure: Regenerated.
13790
fd462a61
DJ
137912007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13792
13793 * linux-low.c (O_LARGEFILE): Define.
13794 (linux_read_memory): Use /proc/PID/mem.
13795 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13796 * configure, config.in: Regenerated.
13797
69f223ed
DJ
137982007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13799
13800 * linux-low.c (linux_wait_for_event): Do not pass signals while
13801 single-stepping.
13802
aec18585
PA
138032007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13804
13805 * win32-low.c (create_process): New.
13806 (win32_create_inferior): Use create_process instead of
13807 CreateProcess. If create_process failed retry appending an ".exe"
13808 suffix. Store the GetLastError result immediatelly after
13809 create_process calls and use it on the call to error.
13810
34d86ddd
PA
138112007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13812
13813 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13814
5a0e3bd0
JB
138152007-08-23 Joel Brobecker <brobecker@adacore.com>
13816
13817 * configure.ac: Switch license to GPLv3.
13818
f88c79e6
MS
138192007-08-01 Michael Snyder <msnyder@access-company.com>
13820
13821 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13822
6b3d9b83
PA
138232007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13824
13825 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13826 typedef.
13827 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13828 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13829 CloseToolhelp32Snapshot.
13830 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13831 CloseToolhelp32Snapshot.
13832
c588c53c
MS
138332007-07-27 Michael Snyder <michael.snyder@access-company.com>
13834
13835 * server.c (main): Check for inferior exit before main loop.
13836
aa0403d9
PA
138372007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13838
13839 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13840 instead of on tmp_desc.
13841
255e7678
DJ
138422007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13843 Daniel Jacobowitz <dan@codesourcery.com>
13844
13845 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13846 (add_thread): Minor cleanups.
13847 (clear_inferiors): Move lower in the file. Clear the DLL
13848 list.
13849 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13850 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13851 (xml_escape_text): New.
13852 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13853 for qSupported.
13854 (handle_v_cont): Report errors.
13855 (gdbserver_version): Update.
13856 (main): Correct size of own_buf. Do not report initial DLL events.
13857 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13858 (unloaded_dll, xml_escape_text): New.
13859 * win32-low.c (enum target_waitkind): Update comments.
13860 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13861 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13862 (win32_EnumProcessModules, win32_GetModuleInformation)
13863 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13864 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13865 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13866 (win32_Module32First, win32_Module32Next, load_toolhelp)
13867 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13868 (get_child_debug_event): Handle DLL events.
13869 (win32_wait): Likewise.
13870
0d37add9
DJ
138712007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13872
13873 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13874 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13875
45e2715e
PA
138762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * win32-low.c (handle_output_debug_string): Ignore event if not
13879 waiting.
13880
c5674cf1
PA
138812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13882
13883 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13884
2bbe3cc1
DJ
138852007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13886
13887 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13888
ae13219e
DJ
138892007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * inferiors.c (change_inferior_id): Add comment.
13892 * linux-low.c (check_removed_breakpoint): Add an early
13893 prototype. Improve debug output.
13894 (linux_attach): Doc update.
13895 (linux_detach_one_process, linux_detach): Clean up before releasing
13896 each process.
13897 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13898 * linux-low.h (struct process_info): Doc improvement.
13899 * mem-break.c (delete_all_breakpoints): New.
13900 * mem-break.h (delete_all_breakpoints): New prototype.
13901 * thread-db.c (find_first_thread): New.
13902 (thread_db_create_event): Call it instead of
13903 thread_db_find_new_threads. Clean up unused variables.
13904 (maybe_attach_thread): Remove first thread handling.
13905 (thread_db_find_new_threads): Use find_first_thread.
13906 (thread_db_get_tls_address): Likewise.
13907
4105de34
DJ
139082007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13909
13910 * thread-db.c (thread_db_find_new_threads): Add prototype.
13911 (thread_db_create_event): Check for the main thread before adding
13912 a new thread.
13913 (maybe_attach_thread): Only enable event reporting if TID == 0.
13914 (thread_db_get_tls_address): Check for new threads.
13915
2b876972
DJ
139162007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * linux-low.c (linux_create_inferior): Try execv before execvp.
13919 * spu-low.c (spu_create_inferior): Likewise.
13920
7a245884
DJ
139212007-06-13 Mike Frysinger <vapier@gentoo.org>
13922
13923 * linux-low.c (linux_create_inferior): Change execv to execvp.
13924 * spu-low.c (spu_create_inferior): Likewies.
13925
117ce543
DJ
139262007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13927
13928 * Makefile.in (clean): Clean new files instead of deleted ones.
13929 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13930 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13931 rules.
13932 * configure.srv: Specify XML files and new regformats for MIPS and
13933 MIPS64 GNU/Linux.
13934 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13935 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13936 an entry for the restart register.
13937 (mips_cannot_fetch_register, mips_cannot_store_register)
13938 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13939 register names to match the XML descriptions.
13940 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13941 restart register instead of $0.
13942
0e7f50da
UW
139432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13944 Markus Deuling <deuling@de.ibm.com>
13945
13946 * remote-utils.c (decode_xfer_write): New function.
13947 * server.h (decode_xfer_write): Add prototype.
13948 * server.c (handle_query): Add PACKET_LEN argument. Support
13949 qXfer:spu:read and qXfer:spu:write packets.
13950 (main): Pass packet_len to handle_query.
13951 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13952 * target.h (target_ops): Add qxfer_spu.
13953
374c1d38
UW
139542007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13955
13956 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13957 accessing non-seekable spufs files.
13958
bb63802a
UW
139592007-05-16 Markus Deuling <deuling@de.ibm.com>
13960
889bf7c5 13961 * server.c (handle_query): Add reply for qC packet.
bb63802a 13962
7390519e
PA
139632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13964 Leo Zayas <lerele@champenstudios@com>
13965
13966 * server.h (check_remote_input_interrupt_request): New function.
13967 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13968 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13969 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13970 (check_remote_input_interrupt_request): New function.
13971 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13972 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13973 winapi_GenerateConsoleCtrlEvent): New typedefs.
13974 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13975 to 250 ms.
13976 (win32_wait): Check for remote interrupt request
13977 with check_remote_input_interrupt_request.
13978 (win32_request_interrupt): New function.
13979 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13980
34b34921
PA
139812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13982
13983 * win32-low.c (debug_registers_changed,
13984 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13985 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13986 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13987 (thread_rec): Get context using the low target.
13988 (child_add_thread): Call thread_added on the low target,
13989 which does the same thing.
13990 (regptr): Delete.
13991 (do_initial_child_stuff): Remove debug registers references.
13992 Set context using the low target. Resume threads after
13993 setting the contexts.
13994 (child_continue): Remove dead variable. Remove debug
13995 registers references.
13996 (child_fetch_inferior_registers): Go through the low target.
13997 (do_child_store_inferior_registers): Remove.
13998 (child_store_inferior_registers): Go through the low target.
13999 (win32_resume): Remove debug registers references.
14000 Set context using the low target.
14001 (handle_exception): Change return type to void. Don't record
14002 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14003 first chance exception.
889bf7c5 14004 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14005 goto loop. Always return after waiting for debug event.
14006 (win32_wait): Convert to switch statement. Handle spurious
14007 events.
14008
14009 * win32-i386-low.c (debug_registers_changed,
14010 debug_registers_used): New.
14011 (initial_stuff): Rename to ...
14012 (i386_initial_stuff): ... this. Clear debug registers
14013 state variables.
14014 (store_debug_registers): Delete.
14015 (i386_get_thread_context): New.
14016 (load_debug_registers): Delete.
14017 (i386_set_thread_context): New.
14018 (i386_thread_added): New.
14019 (single_step): Rename to ...
14020 (i386_single_step): ... this.
14021 (do_fetch_inferior_registers): Rename to ...
14022 (i386_fetch_inferior_register): ... this.
14023 (i386_store_inferior_register): New.
14024 (the_low_target): Adapt to new interface.
14025
14026 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14027 (arm_get_thread_context): New.
14028 (arm_set_thread_context): New.
14029 (regptr): New.
14030 (do_fetch_inferior_registers): Rename to ...
14031 (arm_fetch_inferior_register): ... this.
14032 (arm_store_inferior_register): New.
14033 (arm_wince_breakpoint): Reimplement as unsigned long.
14034 (arm_wince_breakpoint_len): Define.
14035 (the_low_target): Adapt to new interface.
14036
14037 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14038 load_debug_registers. Add get_thread_context, set_thread_context,
14039 thread_added and store_inferior_register. Rename
14040 fetch_inferior_registers to fetch_inferior_register.
14041 (regptr): Remove declaration.
14042
dd6953e1
PA
140432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14044
14045 * linux-low.c (linux_detach): Change return type to int. Return 0.
14046 * spu-low.c (spu_detach): Likewise.
14047
444d6139
PA
140482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14049
14050 * target.h (target_ops): Change return type of detach to int.
14051 Add join.
14052 (join_inferior): New.
14053 * server.c (main): Don't skip detach support on mingw32.
14054 If the inferior doesn't support detaching return error.
14055 Call join_inferior instead of using waitpid.
14056 * linux-low.c (linux_join): New.
14057 (linux_target_op): Add linux_join.
14058 * spu-low.c (spu_join): New.
14059 (spu_target_ops): Add spu_join.
14060 * win32-low.c (win32_detach): Adapt to new interface.
14061 Reopen current_process_handle before detaching. Issue a child
14062 resume before detaching.
14063 (win32_join): New.
14064 (win32_target_op): Add win32_join.
14065
1d5315fe
PA
140662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14067
14068 * win32-low.c (win32-attach): Fix return value.
14069 * target.h (target_ops): Describe ATTACH return values.
14070
bf914831
PA
140712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14072
14073 * win32-low.c (GETPROCADDRESS): Define.
14074 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14075 (winapi_DebugSetProcessKillOnExit): Likewise.
14076 (win32_create_inferior): Force usage of ansi CreateProcessA.
14077 (win32_attach): Use GETPROCADDRESS.
14078 (win32_detach): Likewise.
14079
f72f3e60
PA
140802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14081
14082 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14083
ed50f18f
PA
140842007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14085
14086 * win32-low.c: Commit leftover changes from 2007-03-29.
14087
0c2ead7e
DJ
140882007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14091 fields short instead of int. Add explicit padding.
14092 (i387_cache_to_fsave): Remove unnecessary casts.
14093 (i387_fsave_to_cache): Doc fix.
14094 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14095
73725ff3
DJ
140962007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14097
14098 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14099 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14100
d99f33d8
PA
141012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14102
14103 * configure.srv (arm*-*-mingw32ce*): Move near the other
14104 arm targets.
14105
68070c10
PA
141062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14107
2482afc6 14108 * configure.ac: Add errno checking.
68070c10
PA
14109 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14110 sys/file.h and malloc.h.
14111 (AC_CHECK_DECLS): Add perror.
14112 (srv_mingwce): Handle.
2482afc6 14113 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14114 win32-i386-low.o to srv_tgtobj.
14115 (i[34567]86-*-mingw*): Likewise.
14116 (arm*-*-mingw32ce*): Add case.
14117 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14118 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14119 [__MINGW32CE__] (strerror): New function.
14120 [__MINGW32CE__] (errno): Define to GetLastError.
14121 [__MINGW32CE__] (COUNTOF): New macro.
14122 (remote_open): Remove extra close call.
14123 * mem-break.c (delete_breakpoint_at): New function.
14124 * mem-break.h (delete_breakpoint_at): Declare.
14125 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14126 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14127 [USE_WIN32API] (read, write): Add char* casts.
14128 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14129 * server.h: Include wincecompat.h on Windows CE.
14130 [HAVE_ERRNO_H]: Check.
14131 (perror): Declare if not declared.
14132 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14133 (perror_with_name): Remove errno declaration.
14134 * wincecompat.h: New.
14135 * wincecompat.c: New.
14136 * win32-low.h: New.
14137 * win32-arm-low.c: New.
14138 * win32-i386-low.c: New.
14139 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14140 (OUTMSG2): Make it safe.
14141 (_T): New macro.
14142 (COUNTOF): New macro.
14143 (NUM_REGS): Get it from the low target.
14144 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14145 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14146 (thread_rec): Let low target handle debug registers.
14147 (child_add_thread): Likewise.
14148 (child_init_thread_list): Likewise.
14149 (continue_one_thread): Likewise.
14150 (regptr): New.
14151 (do_child_fetch_inferior_registers): Move to ...
14152 * win32-i386-low.c: ... here, and rename to ...
14153 (do_fetch_inferior_registers): ... this.
889bf7c5 14154 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14155 Go through the low target.
14156 (do_child_store_inferior_registers): Use regptr.
14157 (strwinerror): New function.
14158 (win32_create_inferior): Handle Windows CE.
14159 Use strwinerror instead of strerror on Windows error
14160 codes. Add program to the error output.
14161 Don't close the main thread handle on Windows CE.
14162 (win32_attach): Use coredll.dll on Windows CE.
14163 (win32_kill): Close current process and current
14164 thread handles.
14165 (win32_detach): Use coredll.dll on Windows CE.
14166 (win32_resume): Let low target handle debug registers, and
14167 step request.
14168 (handle_exception): Add/Remove initial breakpoint. Avoid
14169 non-existant WSTOPSIG on Windows CE.
14170 (win32_read_inferior_memory): Cast to remove warning.
14171 (win32_arch_string): Go through the low target.
14172 (initialize_low): Call set_breakpoint_data with the low
14173 target's breakpoint.
14174 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14175 FOP_REGNUM, mappings): Move to ...
14176 * win32-i386-low.c: ... here.
14177 * win32-low.c (win32_thread_info): Move to ...
14178 * win32-low.h: ... here.
14179 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14180 win32-arm-low.c and wincecompat.c.
14181 (all:): Add $EXEEXT.
14182 (install-only:): Likewise.
14183 (gdbserver:): Likewise.
14184 (gdbreplay:): Likewise.
14185 * config.in: Regenerate.
14186 * configure: Regenerate.
14187
41093d81
PA
141882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14189
14190 * win32-low.c: Rename typedef thread_info to
14191 win32_thread_info throughout.
14192
544afa54
PA
141932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14194
14195 * win32-i386-low.c: Rename to ...
14196 * win32-low.c: ... this.
14197 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14198 * Makefile.in: Likewise.
14199
bce7165d
PA
142002007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14201
14202 * remote-utils.c (monitor_output): Constify msg parameter.
14203 * server.h (monitor_output): Likewise.
14204 * win32-i386-low.c (handle_output_debug_string): New.
14205 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14206 handle_output_debug_string.
14207 (get_child_debug_event): Likewise.
14208
506c7aa0
DJ
142092007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14210
14211 * server.c (main): Correct strtoul check.
14212
42c81e2a
DJ
142132007-03-27 Jon Ringle <jon@ringle.org>
14214
14215 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14216
9453113a
DJ
142172007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14218
14219 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14220
64a69107
DJ
142212007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * terminal.h: Check HAVE_SGTTY_H.
14224
142252007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14226
14227 * remote-utils.c (remote_open): Print out the assigned port number.
14228
c74d0ad8
DJ
142292007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14230
14231 * remote-utils.c (monitor_output): New function.
14232 * server.c (debug_threads): Define here.
14233 (monitor_show_help): New function.
14234 (handle_query): Handle qRcmd.
14235 (main): Do not handle 'd' packet.
14236 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14237 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14238 of debug_threads.
14239
de7c3b4a
PA
142402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14241
14242 * Makefile.in (EXEEXT): New.
14243 (clean): Use $(EXEEXT).
14244
ef57601b
PA
142452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14246
14247 * target.h (target_ops): Rename send_signal to request_interrupt,
14248 and remove enum target_signal parameter.
14249 * linux-low.c (linux_request_interrupt): Rename from
14250 linux_send_signal, and always send SIGINT.
14251 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14252 and always send SIGINT.
14253 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14254 of send_signal.
14255 (input_interrupt): Likewise.
14256
820f2bda
PA
142572007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14258
14259 * server.c (get_features_xml): Check if target implemented
14260 arch_string.
14261 * win32-i386-low.c (win32_arch_string): New.
14262 (win32_target_ops): Add win32_arch_string as arch_string member.
14263
ab39bf24
UW
142642007-02-22 Markus Deuling <deuling@de.ibm.com>
14265
14266 * spu-low.c (spu_arch_string): New.
14267 (spu_target_ops): Add spu_arch_string.
14268
61ff6e04
DJ
142692007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14272 * configure.ac: Do not check for terminal.h.
14273 * configure, config.in: Regenerated.
14274
fb1e4ffc
DJ
142752007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * Makefile.in (OBS): Add $(XML_BUILTIN).
14278 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14279 (clean): Update.
14280 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14281 (arm-with-iwmmxt.c): New.
14282 * config.in, configure: Regenerate.
14283 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14284 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14285 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14286 (arm*-*-linux*): Add iWMMXt and regset support.
14287 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14288 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14289 (arm_store_wmmxregset, target_regsets): New.
14290 * server.c (get_features_xml): Take annex argument. Check builtin
14291 XML documents.
14292 (handle_query): Handle multiple annexes.
14293
0f48aa01
DJ
142942007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14295
14296 * remote-utils.c [USE_WIN32API] (read, write): Define.
14297 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14298 write.
14299
23181151
DJ
143002007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14301
14302 * linux-i386-low.c (the_low_target): Set arch_string.
14303 * linux-x86-64-low.c (the_low_target): Likewise.
14304 * linux-low.c (linux_arch_string): New.
14305 (linux_target_ops): Add it.
14306 * linux-low.h (struct linux_target_ops): Add arch_string.
14307 * server.c (write_qxfer_response): Use const void * for DATA.
14308 (get_features_xml): New.
14309 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14310 * target.h (struct target_ops): Add arch_string method.
14311
9d606399
DJ
143122007-01-03 Denis Pilat <denis.pilat@st.com>
14313 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * linux-low.c (linux_kill): Handle being called with no threads.
14316 * win32-i386-low.c (win32_kill): Likewise.
14317 (get_child_debug_event): Clear current_process_handle.
14318
143192006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14320 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * remote-utils.c (remote_open): Check the type of specified
14323 serial port devices before opening them.
14324 * server.c (main): Kill the inferior if an error occurs during
14325 the first remote_open.
14326
a5e13d24
DJ
143272006-12-05 Markus Deuling <deuling@de.ibm.com>
14328
14329 * README: Update supported targets.
14330
186947f7
DJ
143312006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * Makefile.in (clean): Remove reg-mips64.c.
14334 (reg-mips64.c, reg-mips64.o): New rules.
14335 * configure.srv: Handle mips64. Include regset support for mips.
14336 * linux-mips-low.c (union mips_register): New.
14337 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14338 (mips_breakpoint, mips_breakpoint_at): Use int.
14339 (mips_collect_register, mips_supply_register)
14340 (mips_collect_register_32bit, mips_supply_register_32bit)
14341 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14342 (mips_store_fpregset, target_regsets): New.
14343 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14344
a13e2c95
UW
143452006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14346
14347 * configure.srv: Add target "spu*-*-*".
14348 * Makefile.in (clean): Remove reg-spu.c.
14349 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14350 * spu-low.c: New file.
14351
cb7283db
DJ
143522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * configure.ac: Correct td_thr_tls_get_addr test.
14355 * configure: Regenerated.
14356
89be2091
DJ
143572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * linux-low.c (linux_wait_for_event): Reformat. Use the
14360 pass_signals array.
14361 * remote-utils.c (decode_address_to_semicolon): New.
14362 * server.c (pass_signals, handle_general_set): New.
14363 (handle_query): Mention QPassSignals for qSupported.
14364 (main): Call handle_general_set.
14365 * server.h (pass_signals, decode_address_to_semicolon): New.
14366
000ef4f0
DJ
143672006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (handle_query): Correct error handling for read_auxv.
14370
b7149293
UW
143712005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14372
14373 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14374 and srv_linux_thread_db to yes.
14375 * linux-s390-low.c (s390_fill_gregset): New function.
14376 (target_regsets): Define data structure.
14377
dae5f5cf
DJ
143782006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14379
14380 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14381 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14382 * config.in, configure: Regenerated.
14383 * inferiors.c (gdb_id_to_thread): New function.
14384 (gdb_id_to_thread_id): Use it.
14385 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14386 * linux-low.h (struct process_info): Add th member.
14387 (thread_db_get_tls_address): New prototype.
14388 * remote-utils.c (decode_address): Make non-static.
14389 * server.c (handle_query): Handle qGetTLSAddr.
14390 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14391 * target.h (struct target_ops): Add get_tls_address.
14392 * thread-db.c (maybe_attach_thread): Save the thread handle.
14393 (thread_db_get_tls_address): New.
14394
32ca6d61
DJ
143952006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14396
14397 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14398 (linux_resume_one_process): Take a siginfo_t *. Update all
14399 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14400 (struct pending_signals): Add a siginfo_t.
14401 (linux_wait_for_process): Always set last_status.
14402 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14403 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14404 * linux-low.h (struct process_info): Add last_status.
14405
5ffff7c1
DJ
144062006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14407
14408 * remote-utils.c (try_rle): New function.
14409 (putpkt_binary): Use it.
14410
8695c747
DJ
144112006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14412
14413 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14414 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14415 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14416 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14417 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14418 point registers.
14419
290fadea
RS
144202006-08-08 Richard Sandiford <richard@codesourcery.com>
14421
14422 * server.c (terminal_fd): New variable.
14423 (old_foreground_pgrp): Likewise.
14424 (restore_old_foreground_pgrp): New function.
14425 (start_inferior): Record the terminal file descriptor in terminal_fd
14426 and its original foreground group in old_foreground_pgrp. Register
14427 restore_old_foreground_pgrp with atexit().
14428
9f2e1e63
DJ
144292006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14430
14431 * server.c (handle_query): Correct qPart to qXfer.
14432
b80864fb
DJ
144332006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14434
14435 * configure.ac: Check for more headers which are missing on
14436 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14437 * configure.srv: Add Cygwin and mingw32.
14438 * remote-utils.c: Don't include headers unconditionally which
14439 are missing on mingw32. Include <winsock.h> for mingw32.
14440 (remote_open): Adjust for mingw32 support. Flush
14441 standard error after writing to it.
14442 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14443 (unblock_async_io, enable_async_io, disable_async_io)
14444 (readchar, getpkt): Update for Winsock support.
14445 (prepare_resume_reply): Expect a protocol signal number.
14446 * server.c: Disable <sys/wait.h> on mingw32.
14447 (start_inferior): Adjust for mingw32 support. Flush
14448 standard error after writing to it.
14449 (attach_inferior): Likewise. Use protocol signal
14450 numbers.
14451 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14452 and names.
14453 * win32-i386-low.c: New file.
14454 * Makefile.in (XM_CLIBS): Set.
14455 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14456 (win32-i386-low.o): New dependency rule.
14457 * linux-low.c (linux_wait): Use target signal numbers.
14458 * target.h (struct target_ops): Doc fix.
14459 * server.h (target_signal_to_name): New prototype.
14460 * gdbreplay.c: Don't include headers unconditionally which
14461 are missing on mingw32. Include <winsock.h> for mingw32.
14462 (remote_close, remote_open): Adjust for Winsock support.
14463 * configure, config.in: Regenerated.
14464
0876f84a
DJ
144652006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14466
14467 * server.c (decode_xfer_read, write_qxfer_response): New.
14468 (handle_query): Take a packet length argument. Handle
14469 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14470 the qSupported response.
14471 (main): Update call to handle_query.
14472
01f9e8fa
DJ
144732006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14474
14475 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14476 (putpkt_binary): Renamed from putpkt and adjusted for binary
14477 data.
14478 (putpkt): New wrapper for putpkt_binary.
14479 (readchar): Don't mask off the high bit.
14480 (decode_X_packet): New function.
14481 * server.c (main): Call putpkt_binary if a handler sets the packet
14482 length. Save the length of the incoming packet. Handle 'X'.
14483 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14484
be2a5f71
DJ
144852006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * server.c (handle_query): Handle qSupported.
14488
ea025f5f
DJ
144892006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14490
14491 * remote-utils.c (all_symbols_looked_up): New variable.
14492 (look_up_one_symbol): Check it.
14493 * server.h (look_up_one_symbol): New declaration.
14494 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14495
9308fc88
DJ
144962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14499 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14500 (PTRACE_GET_THREAD_AREA): Define.
14501 (ps_get_thread_area): New function.
14502
52fb6437
NS
145032006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14504
14505 * configure.srv (m68k*-*-uclinux*): New target.
14506 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14507 (linux_resume_one_process): Remove extraneous cast.
14508 (linux_read_offsets): New.
14509 (linux_target_op): Add linux_read_offsets on mmuless systems.
14510 * server.c (handle_query): Add qOffsets logic.
14511 * target.h (struct target_ops): Add read_offsets.
14512
21b0f40c
DJ
145132006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14516 (PTRACE_GET_THREAD_AREA): Define.
14517 (ps_get_thread_area): New function.
14518 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14519 (linux-x86-64-low.o): Update.
14520
0050a760
DJ
145212006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * configure.ac: Remove checks for prfpregset_t.
14524 * gdb_proc_service.h: New file.
14525 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14526 new "gdb_proc_service.h".
14527 * proc-service.c: Likewise.
14528 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14529 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14530 * Makefile.in (gdb_proc_service_h): Updated.
14531 * configure, config.in: Regenerated.
14532
b92a518e
DJ
145332006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * remote-utils.c (prepare_resume_reply): Move declaration
14536 of gdb_id_from_wait to the top of the block.
14537
545587ee
DJ
145382006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-low.c (regsets_store_inferior_registers): Read the regset
14541 from the target before filling it.
14542
9db87ebd
DJ
145432006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * server.c (attach_inferior): Return SIGTRAP for a successful
14546 attach.
14547
dd24457d
DJ
145482006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * Makefile.in (OBS): Add version.o.
14551 (STAGESTUFF): Delete.
14552 (version.o): Add dependencies.
14553 (version.c): Replace rule.
14554 (clean): Remove version.c.
14555 * server.c (gdbserver_version): New.
14556 (gdbserver_usage): Use printf.
14557 (main): Handle --version and --help.
14558 * server.h (version, host_name): Add declarations.
14559
6f0f660e
EZ
145602005-12-23 Eli Zaretskii <eliz@gnu.org>
14561
889bf7c5
PA
14562 * linux-arm-low.c:
14563 * linux-arm-low.c:
14564 * inferiors.c:
14565 * i387-fp.h:
14566 * i387-fp.c:
14567 * gdbreplay.c:
14568 * regcache.c:
14569 * proc-service.c:
14570 * mem-break.h:
14571 * mem-break.c:
14572 * linux-x86-64-low.c:
14573 * linux-sh-low.c:
14574 * linux-s390-low.c:
14575 * linux-ppc64-low.c:
14576 * linux-ppc-low.c:
14577 * linux-mips-low.c:
14578 * linux-m68k-low.c:
14579 * linux-m32r-low.c:
14580 * linux-low.h:
14581 * linux-low.c:
14582 * linux-ia64-low.c:
14583 * linux-i386-low.c:
14584 * linux-crisv32-low.c:
14585 * thread-db.c:
14586 * terminal.h:
14587 * target.h:
14588 * target.c:
14589 * server.h:
14590 * server.c:
14591 * remote-utils.c:
14592 * regcache.h:
14593 * utils.c:
14594 * Makefile.in:
14595 * configure.ac:
6f0f660e
EZ
14596 * gdbserver.1: Add (C) after Copyright. Update the FSF
14597 address.
14598
9d1fb177
DJ
145992005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14600
14601 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14602 (arm_breakpoint_at): Recognize both breakpoints.
14603 (the_low_target): Use the correct breakpoint instruction.
14604
011a70c2
DJ
146052005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14608 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14609 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14610 (the_low_target): Update.
14611
7fb85e41
AS
146122005-10-25 Andreas Schwab <schwab@suse.de>
14613
14614 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14615
14616 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14617 (ia64_num_regs): Reduce to 462.
14618
3db0444b
DJ
146192005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * acinclude.m4: Correct quoting.
14622 * aclocal.m4: Regenerated.
14623
14624 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14625 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14626 (thread_db_init): Call thread_db_err_str.
14627 * configure.ac: Check for TD_VERSION.
14628 * config.in, configure: Regenerated.
14629
bee0189a
DJ
146302005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14631
14632 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14633
e9d25b98
DJ
146342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14635
14636 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14637 is not available. Define HAVE_PTRACE_GETREGS if it is.
14638 * config.in, configure: Regenerated.
14639 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14640 * linux-i386-low.c, linux-m68k-low.c: Update to use
14641 HAVE_PTRACE_GETREGS.
14642 * linux-low.c (regsets_fetch_inferior_registers)
14643 (regsets_store_inferior_registers): Only return 0 if we processed
14644 GENERAL_REGS.
14645 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14646 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14647
a06660f7
DJ
146482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * inferiors.c (struct thread_info): Add gdb_id.
14651 (add_thread): Add gdb_id argument.
14652 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14653 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14654 calls to add_thread.
14655 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14656 * server.c (handle_query): Use thread_to_gdb_id.
14657 (handle_v_cont, main): Use gdb_id_to_thread_id.
14658 * server.h (add_thread): Update prototype.
14659 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14660 prototypes.
14661
5a1f5858
DJ
146622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14663
14664 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14665 left-padded registers.
14666 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14667 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14668
e122f1f5
SE
146692005-07-01 Steve Ellcey <sje@cup.hp.com>
14670
14671 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14672 * configure: Regenerate.
14673 * config.in: Regenerate.
14674 * server.h (NEED_DECLARATION_STRERROR):
14675 Replace with !HAVE_DECL_STRERROR.
14676
d592fa2f
DJ
146772005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * linux-low.c (linux_wait, linux_send_signal): Don't test
14680 an unsigned long variable for > 0 if it could be MAX_ULONG.
14681 * server.c (myresume): Likewise.
14682 * target.c (set_desired_inferior): Likewise.
14683
ccbd4912
MK
146842005-06-13 Mark Kettenis <kettenis@gnu.org>
14685
14686 * configure.ac: Simplify and improve check for socklen_t.
14687 * configure, config.in: Regenerate.
14688
f450004a
DJ
146892005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14690
14691 * acconfig.h: Remove.
14692 * configure.ac: Add a test for socklen_t. Use three-argument
14693 AC_DEFINE throughout.
14694 * config.in: Regenerated using autoheader 2.59.
14695 * configure: Regenerated.
14696
14697 * gdbreplay.c (socklen_t): Provide a default.
14698 (remote_open): Use socklen_t.
14699 * remote-utils.c (socklen_t): Provide a default.
14700 (remote_open): Use socklen_t.
14701 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14702 unsigned char.
14703
14704 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14705 char for buffers.
14706 * linux-low.c (linux_read_memory, linux_write_memory)
14707 (linux_read_auxv): Likewise.
14708 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14709 (check_mem_write): Likewise.
14710 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14711 Likewise.
14712 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14713 (registers_from_string, register_data): Likewise.
14714 * server.c (handle_query, main): Likewise.
14715 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14716 (decode_M_packet): Likewise.
14717 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14718 * target.h (struct target_ops): Update read_memory, write_memory,
14719 and read_auxv.
14720 (read_inferior_memory, write_inferior_memory): Update.
14721 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14722 to unsigned char *.
14723 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14724 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14725 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14726 linux-s390-low.c, linux-sh-low.c: Update for changes in
14727 read_inferior_memory and the_low_target->breakpoint.
14728
eee84df1
DJ
147292005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14732 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14733 * configure.srv: Add powerpc64-*-linux*.
14734 * linux-ppc64-low.c: New file.
14735
45b134e5
OF
147362005-05-23 Orjan Friberg <orjanf@axis.com>
14737
14738 * linux-cris-low.c: New file with support for CRIS.
14739 * linux-crisv32-low.c: Ditto for CRISv32.
14740 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14741 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14742 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14743 reg-crisv32.o, and reg-crisv32.c to make rules.
14744 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14745 recognized targets.
14746
48d93c75
UW
147472005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14748
14749 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14750 of sizeof (PTRACE_XFER_TYPE).
14751 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14752
e013ee27
OF
147532005-05-12 Orjan Friberg <orjanf@axis.com>
14754
889bf7c5 14755 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14756 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14757 pointers for hardware watchpoint support.
14758 * linux-low.h (struct linux_target_ops): Ditto.
14759 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14760 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14761 to linux_target_ops.
14762 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14763 reply packet.
14764 * server.c (main): Recognize 'Z' and 'z' packets.
14765
b0ded00b
UW
147662005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14767
14768 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14769 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14770 (the_low_target): Add new members.
14771
8643e2ad
DJ
147722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * proc-service.c (ps_lgetregs): Search all_processes instead of
14775 all_threads.
14776
fc620387
DJ
147772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14778
14779 * server.c (start_inferior): Change return type to int.
14780 (attach_inferior): Change sigptr to int *.
14781 (handle_v_cont, handle_v_requests): Change signal to int *.
14782 (main): Change signal to int.
14783
147842005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14785
14786 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14787 * configure.srv: Add m32r*-*-linux*.
14788 * linux-m32r-low.c: New file.
14789
e0e76420
DJ
147902005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14791
14792 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14793
a1928bad
DJ
147942005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14797 Take unsigned long arguments for PIDs.
14798 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14799 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14800 (wait_for_sigstop, linux_resume_one_process)
14801 (regsets_fetch_inferior_registers, linux_send_signal)
14802 (linux_read_auxv): Likewise. Update the types of variables holding
14803 PIDs. Update format string specifiers.
14804 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14805 * remote-utils.c (prepare_resume_reply): Likewise.
14806 * server.c (cont_thread, general_thread, step_thread)
14807 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14808 unsigned long.
14809 (handle_query): Update format specifiers.
14810 (handle_v_cont, main): Use strtoul for thread IDs.
14811 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14812 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14813 (general_thread, step_thread, thread_from_wait)
14814 (old_thread_from_wait): Update.
14815 * target.h (struct thread_resume): Use unsigned long for THREAD.
14816 (struct target_ops): Use unsigned long for arguments to attach and
14817 thread_alive.
14818
dcdb98d2
DJ
148192005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14820
14821 * acinclude.m4: Include bfd/bfd.m4 directly.
14822 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14823 <agriffis@toolchain.org>.
14824 * aclocal.m4, configure: Regenerated.
14825
bec39cab
AC
148262005-01-07 Andrew Cagney <cagney@gnu.org>
14827
14828 * configure.ac: Rename configure.in, require autoconf 2.59.
14829 * configure: Re-generate.
14830
434c4c77
DJ
148312004-12-08 Daniel Jacobowitz <dan@debian.org>
14832
14833 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14834 LIBS when finished.
14835 * aclocal.m4: Regenerated.
14836 * configure: Regenerated.
14837
db1d3e1b
AS
148382004-11-21 Andreas Schwab <schwab@suse.de>
14839
14840 * linux-m68k-low.c (m68k_num_gregs): Define.
14841 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14842 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14843 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14844 (m68k_breakpoint_at): New. Add to the_low_target.
14845
14846 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14847 srv_linux_thread_db to yes.
14848
43360365
JB
148492004-10-20 Joel Brobecker <brobecker@gnat.com>
14850
14851 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14852 (ARCH_SET_FS): Likewise.
14853 (ARCH_GET_FS): Likewise.
14854 (ARCH_GET_GS): Likewise.
14855
fd500816
DJ
148562004-10-16 Daniel Jacobowitz <dan@debian.org>
14857
14858 * linux-i386-low.c (ps_get_thread_area): New.
14859 * linux-x86-64-low.c (ps_get_thread_area): New.
14860 * linux-low.c: Include <sys/syscall.h>.
14861 (linux_kill_one_process): Don't kill the first thread here.
14862 (linux_kill): Kill the first thread here.
14863 (kill_lwp): New function.
14864 (send_sigstop, linux_send_signal): Use it.
14865 * proc-service.c: Clean up #ifdefs.
14866 (fpregset_info): Delete.
14867 (ps_lgetregs): Update and enable implementation.
14868 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14869 implementations.
14870 * remote-utils.c (struct sym_cache, symbol_cache): New.
14871 (input_interrupt): Print a clearer message.
14872 (async_io_enabled): New variable.
14873 (enable_async_io, disable_async_io): Use it. Update comments.
14874 (look_up_one_symbol): Use the symbol cache.
14875 * thread-db.c (thread_db_look_up_symbols): New function.
14876 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14877
f6de3c42
DJ
148782004-10-16 Daniel Jacobowitz <dan@debian.org>
14879
14880 * configure.in: Test for -rdynamic.
14881 * configure: Regenerated.
14882 * Makefile (INTERNAL_LDFLAGS): New.
14883 (gdbserver, gdbreplay): Use it.
14884
2c0fc042
AC
148852004-09-02 Andrew Cagney <cagney@gnu.org>
14886
14887 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14888
075b3282
DJ
148892004-03-23 Daniel Jacobowitz <drow@mvista.com>
14890
14891 * linux-low.c (linux_wait): Clear all_processes list also.
14892
fa6a77dc
DJ
148932004-03-12 Daniel Jacobowitz <drow@mvista.com>
14894
14895 * linux-low.c: Include <errno.h>. Remove extern declaration of
14896 errno.
14897
6d782a97
DJ
148982004-03-12 Daniel Jacobowitz <drow@mvista.com>
14899
14900 * gdbreplay.c, server.h, utils.c: Update copyright years.
14901
3a7fb99b
DJ
149022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14903
14904 * server.c (main): Print child status or termination signal from
14905 variable 'signal', not 'sig'.
14906
c3e735a6
DJ
149072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14908
14909 * linux-low.c (linux_read_memory): Change return type to
14910 int. Check for and return error from ptrace().
14911 * target.c (read_inferior_memory): Change return type to int. Pass
14912 back return status from the_target->read_memory().
14913 * target.h (struct target_ops): Adapt *read_memory() prototype.
14914 Update comment.
14915 (read_inferior_memory): Adapt prototype.
14916 * server.c (main): Return an error packet if
14917 read_inferior_memory() returns an error.
14918
a59d1c82
DJ
149192004-03-04 Daniel Jacobowitz <drow@mvista.com>
14920
14921 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14922 Unify with other clean targets.
14923
dc3f8883
DJ
149242004-02-29 Daniel Jacobowitz <drow@mvista.com>
14925
14926 * server.c (handle_v_cont): Call set_desired_inferior.
14927
89a208da
DJ
149282004-02-29 Daniel Jacobowitz <drow@mvista.com>
14929
14930 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14931
62ea82f5
DJ
149322004-02-29 Daniel Jacobowitz <drow@mvista.com>
14933
14934 * linux-low.c (linux_wait): Unblock async I/O.
14935 (linux_resume): Block and enable async I/O.
14936 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14937 * server.h (block_async_io, unblock_async_io): Add prototypes.
14938
6910d122
DJ
149392004-02-29 Daniel Jacobowitz <drow@mvista.com>
14940
14941 * remote-utils.c (remote_open): Print a status notice after
14942 opening a TCP port.
14943 * server.c (attach_inferior): Print a status notice after
14944 attaching.
14945
149462004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14947
14948 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14949
c89dc5d4
DJ
149502004-02-26 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14953 error packet.
14954 * server.c, target.h: Update copyright years.
14955
4b8dad4a
RM
149562004-02-25 Roland McGrath <roland@redhat.com>
14957
14958 * target.h (struct target_ops): New member `read_auxv'.
14959 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14960 * linux-low.c (linux_read_auxv): New function.
14961 (linux_target_ops): Initialize `read_auxv' member to that.
14962
d7446758
JB
149632004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14964
14965 Committed by Jim Blandy <jimb@redhat.com>.
14966
14967 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14968 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14969 instead of GPR_SIZE to distiguish s390 and s390x targets.
14970
5544ad89
DJ
149712004-01-31 Daniel Jacobowitz <drow@mvista.com>
14972
14973 * linux-low.c: Update copyright year.
14974 (check_removed_breakpoint): Clear pending_is_breakpoint.
14975 (linux_set_resume_request, linux_queue_one_thread)
14976 (resume_status_pending_p): New functions.
14977 (linux_continue_one_thread): Use process->resume.
14978 (linux_resume): Only resume threads if there are no pending events.
14979 * linux-low.h (struct process_info): Add resume request
14980 pointer.
14981
2a68b70e
DJ
149822004-01-30 Daniel Jacobowitz <drow@mvista.com>
14983
14984 * regcache.c (new_register_cache): Clear the allocated register
14985 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14986
64386c31
DJ
149872003-10-13 Daniel Jacobowitz <drow@mvista.com>
14988
14989 * linux-low.c (linux_resume): Take a struct thread_resume *
14990 argument.
14991 (linux_wait): Update call.
14992 (resume_ptr): New static variable.
14993 (linux_continue_one_thread): Renamed from
14994 linux_continue_one_process. Use resume_ptr.
14995 (linux_resume): Use linux_continue_one_thread.
14996 * server.c (handle_v_cont, handle_v_requests): New functions.
14997 (myresume): New function.
14998 (main): Handle 'v' case.
14999 * target.h (struct thread_resume): New type.
15000 (struct target_ops): Change argument of "resume" to struct
15001 thread_resume *.
15002 (myresume): Delete macro.
15003
c938e9b0
L
150042003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15005
15006 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15007 (uninstall): Support DESTDIR.
15008
7f313d07
BC
15009Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15010
15011 * configure.srv: Add xscale*linux copy of arm*linux entry.
15012
3b2fc2ea
DJ
150132003-07-24 Daniel Jacobowitz <drow@mvista.com>
15014
15015 * linux-arm-low.c (arm_reinsert_addr): New function.
15016 (the_low_target): Add arm_reinsert_addr.
15017
1c0a559e
MK
150182003-07-08 Mark Kettenis <kettenis@gnu.org>
15019
15020 * mem-break.c: Remove whitespace at end of file.
15021
43d5792c
DJ
150222003-06-28 Daniel Jacobowitz <drow@mvista.com>
15023
15024 * configure.in: Check whether we need to prototype strerror.
15025 * server.h: Optionally prototype strerror.
15026 * gdbreplay.c (perror_with_name): Use strerror.
15027 * linux-low.c (linux_attach_lwp): Use strerror.
15028 * utils.c (perror_with_name): Use strerror.
15029 * config.in, configure: Regenerated.
15030
c8a86edf
DJ
150312003-06-28 Daniel Jacobowitz <drow@mvista.com>
15032
15033 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15034 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15035
73d37363
DJ
150362003-06-20 Daniel Jacobowitz <drow@mvista.com>
15037
15038 * Makefile.in (SFILES): Update.
15039 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15040 low-sun3.c: Remove files.
15041
6ad8ae5c
DJ
150422003-06-17 Daniel Jacobowitz <drow@mvista.com>
15043
15044 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15045 (linux_detach_one_process, linux_detach): New functions.
15046 (linux_target_ops): Add linux_detach.
15047 * server.c (main): Handle 'D' packet.
15048 * target.h (struct target_ops): Add "detach" member.
15049 (detach_inferior): Define.
15050
1581182a
MK
150512003-06-13 Mark Kettenis <kettenis@gnu.org>
15052
15053 From Kelley Cook <kelleycook@wideopenwest.com>:
15054 * configure.srv: Accept i[34567]86 variants.
15055
e5379b03
DJ
150562003-06-05 Daniel Jacobowitz <drow@mvista.com>
15057
15058 * linux-low.c (linux_wait_for_event): Correct comment typos.
15059 (linux_resume_one_process): Call check_removed_breakpoint.
15060 (linux_send_signal): New function.
15061 (linux_target_ops): Add linux_send_signal.
15062 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15063 of kill.
15064 * target.h (struct target_ops): Add send_signal.
15065
2ff29de4
JB
150662003-05-29 Jim Blandy <jimb@redhat.com>
15067
15068 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15069 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15070 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15071 away part of the register's value.
15072
254787d4
DJ
150732003-03-26 Daniel Jacobowitz <drow@mvista.com>
15074
15075 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15076 (linux_wait_for_event, linux_init_signals): Likewise.
15077
94e10508
DJ
150782003-03-17 Daniel Jacobowitz <drow@mvista.com>
15079
15080 * configure.in: Check for stdlib.h.
15081 * configure: Regenerated.
15082 * config.in: Regenerated.
15083
4c0711e0
DJ
150842003-01-04 Andreas Schwab <schwab@suse.de>
15085
15086 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15087
ef66e766
AC
150882003-01-02 Andrew Cagney <ac131313@redhat.com>
15089
15090 * Makefile.in: Remove obsolete code.
15091
a1358604
DJ
150922002-11-20 Daniel Jacobowitz <drow@mvista.com>
15093
15094 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15095 defined(PT_FPR0_HI).
15096
23ce3b1c
DJ
150972002-11-17 Stuart Hughes <seh@zee2.com>
15098
15099 * linux-arm-low.c (arm_num_regs): Increase.
15100 (arm_regmap): Include status register.
15101
151022002-11-17 Daniel Jacobowitz <drow@mvista.com>
15103
15104 * linux-low.c (register_addr): Remove incorrect -1 check.
15105
a9fa9f7d
DJ
151062002-08-29 Daniel Jacobowitz <drow@mvista.com>
15107
15108 * linux-low.c (linux_create_inferior): Call setpgid. Return
15109 the new PID.
15110 (unstopped_p, linux_signal_pid): Remove.
15111 (linux_target_ops): Remove linux_signal_pid.
15112 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15113 global instead of target method.
15114 * target.h (struct target_ops): Remove signal_pid. Update comment
15115 for create_inferior.
15116 * server.c (signal_pid): New variable.
15117 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15118 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15119 (attach_inferior): Set signal_pid.
15120
17574093
DJ
151212002-08-23 Daniel Jacobowitz <drow@mvista.com>
15122
15123 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15124
151252002-08-20 Jim Blandy <jimb@redhat.com>
15126
15127 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15128 default for this.
15129
151302002-08-01 Andrew Cagney <cagney@redhat.com>
15131
15132 * Makefile.in: Make chill references obsolete.
15133
151342002-07-24 Kevin Buettner <kevinb@redhat.com>
15135
15136 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15137 * configure: Regenerate.
15138 * config.in: Regenerate.
15139
151402002-07-09 David O'Brien <obrien@FreeBSD.org>
15141
15142 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15143 (perror_with_name, remote_close, remote_open, expect, play): Static.
15144
151452002-07-04 Michal Ludvig <mludvig@suse.cz>
15146
4b8dad4a 15147 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15148 byte offsets instead of an array of indexes.
15149 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15150
151512002-06-13 Daniel Jacobowitz <drow@mvista.com>
15152
15153 * regcache.c: Add comment.
15154
151552002-06-11 Daniel Jacobowitz <drow@mvista.com>
15156
15157 * thread-db.c: New file.
15158 * proc-service.c: New file.
15159 * acinclude.m4: New file.
15160 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15161 proc-service.o, and thread-db.o.
15162 (linux-low.o): Add USE_THREAD_DB.
15163 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15164 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15165 * aclocal.m4: Regenerated.
15166 * config.in: Regenerated.
15167 * configure: Regenerated.
15168 * configure.in: Check for proc_service.h, sys/procfs.h,
15169 thread_db.h, and linux/elf.h headrs.
15170 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15171 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15172 Check for -lthread_db and thread support.
15173 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15174 PowerPC, and SuperH.
15175 * i387-fp.c: Constify arguments.
15176 * i387-fp.h: Likewise.
15177 * inferiors.c: (struct thread_info): Renamed from
15178 `struct inferior_info'. Remove PID member. Use generic inferior
15179 list header. All uses updated.
15180 (inferiors, signal_pid): Removed.
15181 (all_threads): New variable.
15182 (get_thread): Define.
15183 (add_inferior_to_list): New function.
15184 (for_each_inferior): New function.
15185 (change_inferior_id): New function.
15186 (add_inferior): Removed.
15187 (remove_inferior): New function.
15188 (add_thread): New function.
15189 (free_one_thread): New function.
15190 (remove_thread): New function.
15191 (clear_inferiors): Use for_each_inferior and free_one_thread.
15192 (find_inferior): New function.
15193 (find_inferior_id): New function.
15194 (inferior_target_data): Update argument type.
15195 (set_inferior_target_data): Likewise.
15196 (inferior_regcache_data): Likewise.
15197 (set_inferior_regcache_data): Likewise.
15198 * linux-low.c (linux_bp_reinsert): Remove.
15199 (all_processes, stopping_threads, using_thrads)
15200 (struct pending_signals, debug_threads, pid_of): New.
15201 (inferior_pid): Replace with macro.
15202 (struct inferior_linux_data): Remove.
15203 (get_stop_pc, add_process): New functions.
15204 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15205 Use add_process and add_thread.
15206 (linux_attach_lwp): New function, based on old linux_attach. Use
15207 add_process and add_thread. Set stop_expected for new threads.
15208 (linux_attach): New function.
15209 (linux_kill_one_process): New function.
15210 (linux_kill): Kill all LWPs.
15211 (linux_thread_alive): Use find_inferior_id.
15212 (check_removed_breakpoints, status_pending_p): New functions.
15213 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15214 Update. Use WNOHANG. Wait for cloned processes also. Update process
15215 struct for the found process.
15216 (linux_wait_for_event): New function.
15217 (linux_wait): Use it. Support LWPs.
15218 (send_sigstop, wait_for_sigstop, stop_all_processes)
15219 (linux_resume_one_process, linux_continue_one_process): New functions.
15220 (linux_resume): Support LWPs.
15221 (REGISTER_RAW_SIZE): Remove.
15222 (fetch_register): Use register_size instead. Call supply_register.
15223 (usr_store_inferior_registers): Likewise. Call collect_register.
15224 Fix recursive case.
15225 (regsets_fetch_inferior_registers): Improve error message.
15226 (regsets_store_inferior_registers): Add debugging.
15227 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15228 (unstopped_p, linux_signal_pid): New functions.
15229 (linux_target_ops): Add linux_signal_pid.
15230 (linux_init_signals): New function.
15231 (initialize_low): Call it. Initialize using_threads.
15232 * regcache.c (inferior_regcache_data): Add valid
15233 flag.
15234 (get_regcache): Fetch registers lazily. Add fetch argument
15235 and update all callers.
15236 (regcache_invalidate_one, regcache_invalidate): New
15237 functions.
15238 (new_register_cache): Renamed from create_register_cache.
15239 Return the new regcache.
15240 (free_register_cache): Change argument to a void *.
15241 (registers_to_string, registers_from_string): Call get_regcache
15242 with fetch flag set.
15243 (register_data): Make static. Pass fetch flag to get_regcache.
15244 (supply_register): Call get_regcache with fetch flag clear.
15245 (collect_register): Call get_regcache with fetch flag set.
15246 (collect_register_as_string): New function.
15247 * regcache.h: Update.
15248 * remote-utils.c (putpkt): Flush after debug output and use
15249 stderr.
15250 Handle input interrupts while waiting for an ACK.
15251 (input_interrupt): Use signal_pid method.
15252 (getpkt): Flush after debug output and use stderr.
15253 (outreg): Use collect_register_as_string.
15254 (new_thread_notify, dead_thread_notify): New functions.
15255 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15256 and general_thread.
15257 (look_up_one_symbol): Flush after debug output.
15258 * server.c (step_thread, server_waiting): New variables.
15259 (start_inferior): Don't use signal_pid. Update call to mywait.
15260 (attach_inferior): Update call to mywait.
15261 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15262 (main): Don't fetch/store registers explicitly. Use
15263 set_desired_inferior. Support proposed ``Hs'' packet. Update
15264 calls to mywait.
15265 * server.h: Update.
15266 (struct inferior_list, struct_inferior_list_entry): New.
15267 * target.c (set_desired_inferior): New.
15268 (write_inferior_memory): Constify.
15269 (mywait): New function.
15270 * target.h: Update.
15271 (struct target_ops): New signal_pid method.
15272 (mywait): Removed macro, added prototype.
15273
15274 * linux-low.h (regset_func): Removed.
15275 (regset_fill_func, regset_store_func): New.
15276 (enum regset_type): New.
15277 (struct regset_info): Add type field. Use new operation types.
15278 (struct linux_target_ops): stop_pc renamed to get_pc.
15279 Add decr_pc_after_break and breakpoint_at.
15280 (get_process, get_thread_proess, get_process_thread)
15281 (strut process_info, all_processes, linux_attach_lwp)
15282 (thread_db_init): New.
15283
15284 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15285 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15286 (the_low_target): Add new members.
15287 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15288 (i386_store_fpxregset): Constify.
15289 (target_regsets): Add new kind identifier.
15290 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15291 (i386_set_pc): Add debugging.
15292 (i386_breakpoint_at): New function.
15293 (the_low_target): Add new members.
15294 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15295 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15296 (mips_breakpoint_at): New.
15297 (the_low_target): Add new members.
15298 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15299 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15300 (the_low_target): Add new members.
15301 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15302 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15303 (the_low_target): Add new members.
15304 * linux-x86-64-low.c (target_regsets): Add new kind
15305 identifier.
15306
153072002-05-15 Daniel Jacobowitz <drow@mvista.com>
15308
15309 From Martin Pool <mbp@samba.org>:
15310 * server.c (gdbserver_usage): New function.
15311 (main): Call it.
15312
153132002-05-14 Daniel Jacobowitz <drow@mvista.com>
15314
15315 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15316 stop_at -> stop_pc.
15317
153182002-05-04 Andrew Cagney <ac131313@redhat.com>
15319
15320 * Makefile.in: Remove obsolete code.
15321
153222002-04-24 Michal Ludvig <mludvig@suse.cz>
15323
15324 * linux-low.c (regsets_fetch_inferior_registers),
15325 (regsets_store_inferior_registers): Removed cast to int from
15326 ptrace() calls.
15327 * regcache.h: Added declaration of struct inferior_info.
15328
153292002-04-20 Daniel Jacobowitz <drow@mvista.com>
15330
15331 * inferiors.c (struct inferior_info): Add regcache_data.
15332 (add_inferior): Call create_register_cache.
15333 (clear_inferiors): Call free_register_cache.
15334 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15335 * regcache.c (struct inferior_regcache_data): New.
15336 (registers): Remove.
15337 (get_regcache): New function.
15338 (create_register_cache, free_register_cache): New functions.
15339 (set_register_cache): Don't initialize the register cache here.
15340 (registers_to_string, registers_from_string, register_data): Call
15341 get_regcache.
15342 * regcache.h: Add prototypes.
15343 * server.h: Likewise.
15344
153452002-04-20 Daniel Jacobowitz <drow@mvista.com>
15346
15347 * mem-break.c: New file.
15348 * mem-break.h: New file.
15349 * Makefile.in: Add mem-break.o rule; update server.h
15350 dependencies.
15351 * inferiors.c (struct inferior_info): Add target_data
15352 member.
15353 (clear_inferiors): Free target_data member if set.
15354 (inferior_target_data, set_inferior_target_data): New functions.
15355 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15356 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15357 * linux-low.c (linux_bp_reinsert): New variable.
15358 (struct inferior_linux_data): New.
15359 (linux_create_inferior): Use set_inferior_target_data.
15360 (linux_attach): Likewise. Call add_inferior.
15361 (linux_wait_for_one_inferior): New function.
15362 (linux_wait): Call it.
15363 (linux_write_memory): Add const.
15364 (initialize_low): Call set_breakpoint_data.
15365 * linux-low.h (struct linux_target_ops): Add breakpoint
15366 handling members.
15367 * server.c (attach_inferior): Remove extra add_inferior
15368 call.
15369 * server.h: Include mem-break.h. Update inferior.c
15370 prototypes.
15371 * target.c (read_inferior_memory)
15372 (write_inferior_memory): New functions.
15373 * target.h (read_inferior_memory)
15374 (write_inferior_memory): Change macros to prototypes.
15375 (struct target_ops): Update comments. Add const to write_memory
15376 definition.
15377
153782002-04-11 Daniel Jacobowitz <drow@mvista.com>
15379
15380 * linux-low.c (usr_store_inferior_registers): Support
15381 registers which are allowed to fail to store.
15382 * linux-low.h (linux_target_ops): Likewise.
15383 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15384 (ppc_cannot_store_register): FPSCR may not be storable.
15385
153862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15387
15388 * server.h: Include <string.h> if HAVE_STRING_H.
15389 * ChangeLog: Correct paths in last ChangeLog entry.
15390
153912002-04-09 Daniel Jacobowitz <drow@mvista.com>
15392
15393 * linux-low.h: Remove obsolete prototypes.
15394 (struct linux_target_ops): New.
15395 (extern the_low_target): New.
15396 * linux-low.c (num_regs, regmap): Remove declarations.
15397 (register_addr): Use the_low_target explicitly.
15398 (fetch_register): Likewise.
15399 (usr_fetch_inferior_registers): Likewise.
15400 (usr_store_inferior_registers): Likewise.
15401 * linux-arm-low.c (num_regs): Remove.
15402 (arm_num_regs): Define.
15403 (arm_regmap): Renamed from regmap, made static.
15404 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15405 made static.
15406 (arm_cannot_store_register): Renamed from cannot_store_register,
15407 made static.
15408 (the_low_target): New.
15409 * linux-i386-low.c (num_regs): Remove.
15410 (i386_num_regs): Define.
15411 (i386_regmap): Renamed from regmap, made static.
15412 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15413 made static.
15414 (i386_cannot_store_register): Renamed from cannot_store_register,
15415 made static.
15416 (the_low_target): New.
15417 * linux-ia64-low.c (num_regs): Remove.
15418 (ia64_num_regs): Define.
15419 (ia64_regmap): Renamed from regmap, made static.
15420 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15421 made static.
15422 (ia64_cannot_store_register): Renamed from cannot_store_register,
15423 made static.
15424 (the_low_target): New.
15425 * linux-m68k-low.c (num_regs): Remove.
15426 (m68k_num_regs): Define.
15427 (m68k_regmap): Renamed from regmap, made static.
15428 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15429 made static.
15430 (m68k_cannot_store_register): Renamed from cannot_store_register,
15431 made static.
15432 (the_low_target): New.
15433 * linux-mips-low.c (num_regs): Remove.
15434 (mips_num_regs): Define.
15435 (mips_regmap): Renamed from regmap, made static.
15436 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15437 made static.
15438 (mips_cannot_store_register): Renamed from cannot_store_register,
15439 made static.
15440 (the_low_target): New.
15441 * linux-ppc-low.c (num_regs): Remove.
15442 (ppc_num_regs): Define.
15443 (ppc_regmap): Renamed from regmap, made static.
15444 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15445 made static.
15446 (ppc_cannot_store_register): Renamed from cannot_store_register,
15447 made static.
15448 (the_low_target): New.
15449 * linux-s390-low.c (num_regs): Remove.
15450 (s390_num_regs): Define.
15451 (s390_regmap): Renamed from regmap, made static.
15452 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15453 made static.
15454 (s390_cannot_store_register): Renamed from cannot_store_register,
15455 made static.
15456 (the_low_target): New.
15457 * linux-sh-low.c (num_regs): Remove.
15458 (sh_num_regs): Define.
15459 (sh_regmap): Renamed from regmap, made static.
15460 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15461 made static.
15462 (sh_cannot_store_register): Renamed from cannot_store_register,
15463 made static.
15464 (the_low_target): New.
15465 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15466 (the_low_target): New.
15467
154682002-04-09 Daniel Jacobowitz <drow@mvista.com>
15469
15470 * Makefile.in: Add stamp-h target.
15471 * configure.in: Create stamp-h.
15472 * configure: Regenerated.
15473
154742002-04-09 Daniel Jacobowitz <drow@mvista.com>
15475
15476 * inferiors.c: New file.
15477 * target.c: New file.
15478 * target.h: New file.
15479 * Makefile.in: Add target.o and inferiors.o. Update
15480 dependencies.
15481 * linux-low.c (inferior_pid): New static variable,
15482 moved from server.c.
15483 (linux_create_inferior): Renamed from create_inferior.
15484 Call add_inferior. Return 0 on success instead of a PID.
15485 (linux_attach): Renamed from myattach.
15486 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15487 (linux_thread_alive): Renamed from mythread_alive.
15488 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15489 child dies.
15490 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15491 (regsets_store_inferior_registers): Correct error message.
15492 Add missing ``return 0''.
15493 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15494 (linux_store_registers): Renamed from store_inferior_registers.
15495 (linux_read_memory): Renamed from read_inferior_memory.
15496 (linux_write_memory): Renamed from write_inferior_memory.
15497 (linux_target_ops): New structure.
15498 (initialize_low): Call set_target_ops ().
15499 * remote-utils.c (unhexify): New function.
15500 (hexify): New function.
15501 (input_interrupt): Send signals to ``signal_pid''.
15502 * server.c (inferior_pid): Remove.
15503 (start_inferior): Update create_inferior call.
15504 (attach_inferior): Call add_inferior.
15505 (handle_query): New function.
15506 (main): Call handle_query for `q' packets.
15507 * server.h: Include "target.h". Remove obsolete prototypes.
15508 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15509
155102002-04-09 Daniel Jacobowitz <drow@mvista.com>
15511
15512 * Makefile.in: Add WARN_CFLAGS. Update configury
15513 dependencies.
15514 * configure.in: Check for <string.h>
15515 * configure: Regenerate.
15516 * config.in: Regenerate.
15517 * gdbreplay.c: Include needed system headers.
15518 (remote_open): Remove strchr prototype.
15519 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15520 * regcache.c (supply_register): Change buf argument to const void *.
15521 (supply_register_by_name): Likewise.
15522 (collect_register): Change buf argument to void *.
15523 (collect_register_by_name): Likewise.
15524 * regcache.h: Add missing prototypes.
15525 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15526 * server.c (handle_query): New function.
15527 (attached): New static variable, moved out of main.
15528 (main): Quiet longjmp clobber warnings.
15529 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15530 * utils.c (error): Remove NORETURN.
15531 (fatal): Likewise.